@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202505231607 → 0.7.0-nightly.202505241606

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 _0xffd7c1=_0x3ffc;(function(_0x1c6cdf,_0x576ab2){const _0xc62552=_0x3ffc,_0x18d830=_0x1c6cdf();while(!![]){try{const _0x1038b0=-parseInt(_0xc62552(0x1f6))/0x1*(-parseInt(_0xc62552(0x1ff))/0x2)+-parseInt(_0xc62552(0x1ca))/0x3*(parseInt(_0xc62552(0x1f2))/0x4)+-parseInt(_0xc62552(0x1da))/0x5*(parseInt(_0xc62552(0x1fa))/0x6)+-parseInt(_0xc62552(0x216))/0x7*(parseInt(_0xc62552(0x1d2))/0x8)+parseInt(_0xc62552(0x208))/0x9+parseInt(_0xc62552(0x205))/0xa+parseInt(_0xc62552(0x1b3))/0xb;if(_0x1038b0===_0x576ab2)break;else _0x18d830['push'](_0x18d830['shift']());}catch(_0x43f9df){_0x18d830['push'](_0x18d830['shift']());}}}(_0x5bde,0xde5bc));Object['defineProperty'](exports,Symbol[_0xffd7c1(0x1e9)],{'value':_0xffd7c1(0x1f7)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0xffd7c1(0x1ec)),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require(_0xffd7c1(0x21b)),w=require(_0xffd7c1(0x21e)),P=require(_0xffd7c1(0x21f)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0x5bde(){const _0x55c529=['get','error','symbol','HTTPService','224pXmcJw','length','Reply','defineProperty','59462toAoQq','Module','resolveComment','pipe','12TGOgsb','rangeType','updateComment','OpenOrReOpen','ThreadCommentModel','8pTBzQS','Add','deleteComment','stringify','UNRECOGNIZED','replyId','15115090YXJWzZ','_sessionService','threadId','9255834ApJIWp','reply','UniverInstanceType','addUser','content','parentId','Plugin','post','Delete','payload','_threadCommentModel','Inject','_userService','solved','91hZNwKP','subscribe','rangeId','getCurrentUser','Solve','@univerjs/thread-comment','setConfig','_initDataSource','rxjs','@univerjs/network','getComment','map','forEach','replies','/list','_config','Solved','requireSession','personId','UniverLicensePlugin','_threadCommentDataSource','listComments','6959282OwBAMz','onReady','delete','_init','find','dayjs','Injector','Disposable','filter','UniverThreadCommentUIPlugin','_httpService','/universer-api/comment/unit/','commentUpdate$','customRanges','UserManagerService','users','root','type','_initUserSync','getMemberID','CollaborationSessionService','/add','YYYY/MM/DD\x20HH:mm','60366hYIGNI','_commentService','size','_configService','_threadCommentDataSourceService','ref','/universer-api/user/list','values','17432PXzWnI','merge','body','createTimestamp','unitId','pluginName','onStarting','thread-comment-data-source.config','3361265QKeAOQ','user','userID','format','CustomRangeType','Edit','getOwnPropertyDescriptor','slice','_injector','Unknown','getUnit','add','getUser','UniverThreadCommentDataSourcePlugin','parse','toStringTag','/edit','code','@univerjs-pro/license','userId'];_0x5bde=function(){return _0x55c529;};return _0x5bde();}var I=(_0x340b44=>(_0x340b44[_0x340b44[_0xffd7c1(0x1fd)]=0x0]='OpenOrReOpen',_0x340b44[_0x340b44[_0xffd7c1(0x226)]=0x1]='Solved',_0x340b44[_0x340b44[_0xffd7c1(0x203)]=-0x1]='UNRECOGNIZED',_0x340b44))(I||{}),v=(_0x520030=>(_0x520030[_0x520030[_0xffd7c1(0x1e3)]=0x0]=_0xffd7c1(0x1e3),_0x520030[_0x520030[_0xffd7c1(0x200)]=0x1]=_0xffd7c1(0x200),_0x520030[_0x520030['Reply']=0x2]=_0xffd7c1(0x1f4),_0x520030[_0x520030[_0xffd7c1(0x1df)]=0x3]=_0xffd7c1(0x1df),_0x520030[_0x520030[_0xffd7c1(0x210)]=0x4]='Delete',_0x520030[_0x520030[_0xffd7c1(0x21a)]=0x5]=_0xffd7c1(0x21a),_0x520030[_0x520030[_0xffd7c1(0x203)]=-0x1]=_0xffd7c1(0x203),_0x520030))(v||{});const f=_0x455437=>c[_0xffd7c1(0x1b8)](new Date(+_0x455437))['format'](_0xffd7c1(0x1c9)),R=async(_0x3cb26b,_0x45b5c1)=>{const _0x4277f7=_0xffd7c1,_0x3bc52b=_0x3cb26b['get'](c[_0x4277f7(0x1c1)]),_0x25d6fb=_0x3cb26b[_0x4277f7(0x1ee)](P[_0x4277f7(0x1f1)]);_0x45b5c1[_0x4277f7(0x222)](_0x49a959=>{const _0x27beb0=_0x4277f7;_0x3bc52b[_0x27beb0(0x1e6)](_0x49a959)&&_0x45b5c1[_0x27beb0(0x1b5)](_0x49a959);}),_0x45b5c1[_0x4277f7(0x1cc)]&&(await _0x25d6fb[_0x4277f7(0x1ee)](_0x4277f7(0x1d0),{'params':{'userIDs':[..._0x45b5c1]}}))['body']['users'][_0x4277f7(0x222)](_0x55b207=>{_0x55b207&&_0x3bc52b['addUser'](_0x55b207);});};var $=Object[_0xffd7c1(0x1e0)],E=(_0xa4b534,_0x18007d,_0x502393,_0x52d361)=>{const _0x5e52b1=_0xffd7c1;for(var _0xa0454=_0x52d361>0x1?void 0x0:_0x52d361?$(_0x18007d,_0x502393):_0x18007d,_0x3e61f5=_0xa4b534[_0x5e52b1(0x1f3)]-0x1,_0x1da931;_0x3e61f5>=0x0;_0x3e61f5--)(_0x1da931=_0xa4b534[_0x3e61f5])&&(_0xa0454=_0x1da931(_0xa0454)||_0xa0454);return _0xa0454;},S=(_0x395aea,_0x3916fc)=>(_0x5e7c79,_0x1bd90b)=>_0x3916fc(_0x5e7c79,_0x1bd90b,_0x395aea);let p=class extends c[_0xffd7c1(0x1ba)]{constructor(_0x32cceb,_0x62f9ce,_0x48de18,_0x38b025){const _0x49cb3f=_0xffd7c1;super(),this['_commentService']=_0x32cceb,this['_threadCommentModel']=_0x62f9ce,this[_0x49cb3f(0x214)]=_0x48de18,this[_0x49cb3f(0x1e2)]=_0x38b025,this[_0x49cb3f(0x1b6)](),this[_0x49cb3f(0x1c5)]();}[_0xffd7c1(0x1c5)](){const _0x2fb269=_0xffd7c1;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$'][_0x2fb269(0x1f9)](w['bufferTime'](0x10))['subscribe'](_0x2de257=>{const _0x3b8f3b=_0x2fb269,_0x403a89=new Set();_0x2de257[_0x3b8f3b(0x222)](_0x218148=>{const _0x4f1ae7=_0x3b8f3b;switch(_0x218148[_0x4f1ae7(0x1c4)]){case _0x4f1ae7(0x1e5):{const _0x207d6b=_0x218148[_0x4f1ae7(0x211)][_0x4f1ae7(0x228)];_0x403a89[_0x4f1ae7(0x1e5)](_0x207d6b);break;}}}),R(this[_0x3b8f3b(0x1e2)],_0x403a89);}));}[_0xffd7c1(0x1b6)](){const _0x3816e1=_0xffd7c1;this['disposeWithMe'](this[_0x3816e1(0x1cb)][_0x3816e1(0x1bf)][_0x3816e1(0x217)](async _0x310e5e=>{const _0x101589=_0x3816e1;var _0xaabfe,_0x44c48c,_0x3f155a,_0x58395e;const _0x12749d=(_0xaabfe=this[_0x101589(0x212)][_0x101589(0x1e4)](_0x310e5e[_0x101589(0x1d6)])[_0x101589(0x1b7)](_0x505abe=>_0x505abe[_0x101589(0x207)]===_0x310e5e[_0x101589(0x207)]))==null?void 0x0:_0xaabfe[_0x101589(0x1c3)];if(!_0x12749d)return;const {unitId:_0x2bfa44,subUnitId:_0x3d6411}=_0x12749d;switch(_0x310e5e[_0x101589(0x1db)]&&this['_userService'][_0x101589(0x20b)](_0x310e5e['user']),_0x310e5e[_0x101589(0x1c4)]){case v[_0x101589(0x200)]:break;case v['Reply']:{this[_0x101589(0x212)]['addComment'](_0x2bfa44,_0x3d6411,{'unitId':_0x2bfa44,'subUnitId':_0x3d6411,'ref':'','id':_0x310e5e[_0x101589(0x204)],'dT':f(+_0x310e5e[_0x101589(0x1d5)]),'threadId':_0x310e5e[_0x101589(0x207)],'personId':(_0x3f155a=(_0x44c48c=_0x310e5e[_0x101589(0x1db)])==null?void 0x0:_0x44c48c['userID'])!=null?_0x3f155a:_0x310e5e[_0x101589(0x1ed)],'text':JSON[_0x101589(0x1e8)](_0x310e5e['content']),'parentId':_0x12749d['id']});break;}case v[_0x101589(0x210)]:{const _0x40fd11=this['_threadCommentModel'][_0x101589(0x220)](_0x2bfa44,_0x3d6411,_0x310e5e[_0x101589(0x204)]);_0x40fd11&&_0x40fd11[_0x101589(0x20d)]&&this[_0x101589(0x212)][_0x101589(0x201)](_0x2bfa44,_0x3d6411,_0x310e5e['replyId']);break;}case v[_0x101589(0x1df)]:{this[_0x101589(0x212)][_0x101589(0x1fc)](_0x2bfa44,_0x3d6411,{'commentId':_0x310e5e['replyId'],'text':JSON[_0x101589(0x1e8)](_0x310e5e[_0x101589(0x20c)])});break;}case v[_0x101589(0x21a)]:{const _0x16a7f7=(_0x58395e=this[_0x101589(0x212)][_0x101589(0x1e4)](_0x310e5e[_0x101589(0x1d6)])[_0x101589(0x1b7)](_0x350cf1=>_0x350cf1[_0x101589(0x207)]===_0x310e5e['threadId']))==null?void 0x0:_0x58395e['root'];_0x16a7f7&&this[_0x101589(0x212)][_0x101589(0x1f8)](_0x2bfa44,_0x3d6411,_0x16a7f7['id'],_0x310e5e[_0x101589(0x215)]===I[_0x101589(0x226)]);break;}}}));}};p=E([S(0x0,c[_0xffd7c1(0x213)](b['CommentService'])),S(0x1,c[_0xffd7c1(0x213)](M[_0xffd7c1(0x1fe)])),S(0x2,c[_0xffd7c1(0x213)](c[_0xffd7c1(0x1c1)])),S(0x3,c[_0xffd7c1(0x213)](c[_0xffd7c1(0x1b9)]))],p);const q=_0xffd7c1(0x1d9),D={};var A=Object[_0xffd7c1(0x1e0)],x=(_0x10207d,_0x55f01d,_0x47891d,_0x27f53a)=>{const _0x9bedec=_0xffd7c1;for(var _0x50d167=_0x27f53a>0x1?void 0x0:_0x27f53a?A(_0x55f01d,_0x47891d):_0x55f01d,_0xfe8748=_0x10207d[_0x9bedec(0x1f3)]-0x1,_0x525166;_0xfe8748>=0x0;_0xfe8748--)(_0x525166=_0x10207d[_0xfe8748])&&(_0x50d167=_0x525166(_0x50d167)||_0x50d167);return _0x50d167;},_=(_0x5e8392,_0x1a1076)=>(_0x6634f5,_0x39bfc3)=>_0x1a1076(_0x6634f5,_0x39bfc3,_0x5e8392);function Y(_0xaf2165,_0x25f74e){const _0x4c095e=_0xffd7c1,_0x2282d5=_0xaf2165['replies'][0x0];return{..._0x25f74e,'id':_0x2282d5[_0x4c095e(0x204)],'resolved':_0xaf2165[_0x4c095e(0x215)]===0x1,'dT':f(_0x2282d5[_0x4c095e(0x1d5)]),'personId':_0x2282d5[_0x4c095e(0x1ed)],'threadId':_0x2282d5[_0x4c095e(0x207)]};}function _0x3ffc(_0x32388b,_0x58add7){const _0x5bdecb=_0x5bde();return _0x3ffc=function(_0x3ffce6,_0x4cc13f){_0x3ffce6=_0x3ffce6-0x1b0;let _0x1526fa=_0x5bdecb[_0x3ffce6];return _0x1526fa;},_0x3ffc(_0x32388b,_0x58add7);}function G(_0x2d242a,_0x28cd98,_0x387255){const _0x30516f=_0xffd7c1;var _0x59121b,_0x50147b;if(((_0x50147b=(_0x59121b=_0x2d242a==null?void 0x0:_0x2d242a[_0x30516f(0x223)])==null?void 0x0:_0x59121b[_0x30516f(0x1f3)])!=null?_0x50147b:0x0)>0x0){const _0x3bba77=(_0x5104fa,_0x2d709f)=>({'id':_0x5104fa['replyId'],'threadId':_0x5104fa[_0x30516f(0x207)],'dT':f(_0x5104fa['createTimestamp']),'personId':_0x5104fa[_0x30516f(0x1ed)],'resolved':_0x2d242a[_0x30516f(0x215)]===I['Solved'],'unitId':_0x28cd98,'subUnitId':_0x387255,'text':JSON[_0x30516f(0x1e8)](_0x5104fa[_0x30516f(0x20c)]),'parentId':_0x2d709f}),_0x187b88=_0x3bba77(_0x2d242a[_0x30516f(0x223)][0x0]);return{..._0x187b88,'children':_0x2d242a[_0x30516f(0x223)][_0x30516f(0x1e1)](0x1)['map'](_0x2c3dc2=>_0x3bba77(_0x2c3dc2,_0x187b88['id']))};}return null;}let g=class{constructor(_0x5da154,_0x3174ca,_0x303225,_0x5eb344){const _0x580d9f=_0xffd7c1;this[_0x580d9f(0x1bd)]=_0x5da154,this[_0x580d9f(0x214)]=_0x3174ca,this[_0x580d9f(0x206)]=_0x303225,this[_0x580d9f(0x1e2)]=_0x5eb344;}async['addComment'](_0x42c55b){const _0x252814=_0xffd7c1;var _0x229d76,_0x11afd0;const {parentId:_0x427c17,unitId:_0xffa395,text:_0x2a2557,threadId:_0x26b256}=_0x42c55b,_0x1b38f6=(_0x11afd0=(_0x229d76=_0x2a2557['customRanges'])==null?void 0x0:_0x229d76[_0x252814(0x1bb)](_0x4009b1=>_0x4009b1[_0x252814(0x1fb)]===c[_0x252814(0x1de)]['COMMENT'])[_0x252814(0x221)](_0x21942e=>_0x21942e[_0x252814(0x218)]))!=null?_0x11afd0:[],_0x146451=JSON[_0x252814(0x202)](_0x2a2557),_0x2816d1=(await this[_0x252814(0x206)][_0x252814(0x227)](_0xffa395))[_0x252814(0x1c6)]();if(_0x427c17){const _0x565ca0={'memberId':_0x2816d1,'unitId':_0xffa395,'content':_0x146451,'mention':_0x1b38f6,'threadId':_0x26b256},_0x37edab=(await this[_0x252814(0x1bd)]['post']('/universer-api/comment/unit/'+_0xffa395+'/reply',{'body':_0x565ca0}))['body'][_0x252814(0x209)];return{..._0x42c55b,'id':_0x37edab[_0x252814(0x204)],'dT':c[_0x252814(0x1b8)](+_0x37edab[_0x252814(0x1d5)])[_0x252814(0x1dd)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x37edab['userId']};}else{const _0xc6ed97={'memberId':_0x2816d1,'unitId':_0xffa395,'content':_0x146451,'mention':_0x1b38f6},_0x3cd16f=await this[_0x252814(0x1bd)][_0x252814(0x20f)](_0x252814(0x1be)+_0xffa395+_0x252814(0x1c8),{'body':_0xc6ed97});return Y(_0x3cd16f['body']['comment'],_0x42c55b);}}async[_0xffd7c1(0x1fc)](_0x226585){const _0x40902a=_0xffd7c1;var _0x58d8c2,_0x4059bd;const {text:_0x17a0d8,unitId:_0x2120db}=_0x226585,_0x35f862=(_0x4059bd=(_0x58d8c2=_0x17a0d8[_0x40902a(0x1c0)])==null?void 0x0:_0x58d8c2[_0x40902a(0x1bb)](_0x468a5f=>_0x468a5f[_0x40902a(0x1fb)]===c[_0x40902a(0x1de)]['COMMENT'])[_0x40902a(0x221)](_0xa25acc=>_0xa25acc[_0x40902a(0x218)]))!=null?_0x4059bd:[],_0xe37cfb=JSON[_0x40902a(0x202)](_0x17a0d8),_0x5687ce=_0x226585['threadId'],_0x217dac=_0x226585['id'],_0x1c5cc0={'memberId':(await this[_0x40902a(0x206)][_0x40902a(0x227)](_0x2120db))[_0x40902a(0x1c6)](),'unitId':_0x2120db,'threadId':_0x5687ce,'mention':_0x35f862,'content':_0xe37cfb,'replyId':_0x217dac},_0x2616f2=await this['_httpService'][_0x40902a(0x20f)](_0x40902a(0x1be)+_0x2120db+_0x40902a(0x1ea),{'body':_0x1c5cc0});return!_0x2616f2['body']['error']||_0x2616f2[_0x40902a(0x1d4)][_0x40902a(0x1ef)][_0x40902a(0x1eb)]===0x1;}async[_0xffd7c1(0x1f8)](_0x4a742d){const _0x17bd31=_0xffd7c1,{unitId:_0x1f432f}=_0x4a742d,_0xc1c4c6=_0x4a742d['threadId'],_0xaa01d7={'memberId':this[_0x17bd31(0x214)][_0x17bd31(0x219)]()[_0x17bd31(0x1dc)],'unitId':_0x1f432f,'threadId':_0xc1c4c6,'solved':_0x4a742d['resolved']?I[_0x17bd31(0x226)]:I[_0x17bd31(0x1fd)]},_0x5c81ff=await this[_0x17bd31(0x1bd)][_0x17bd31(0x20f)](_0x17bd31(0x1be)+_0x1f432f+'/solved',{'body':_0xaa01d7});return!_0x5c81ff[_0x17bd31(0x1d4)]['error']||_0x5c81ff[_0x17bd31(0x1d4)]['error'][_0x17bd31(0x1eb)]===0x1;}async['deleteComment'](_0x5c88ea,_0x2353ca,_0x370224,_0x12afd8){const _0x26c894=_0xffd7c1,_0x3930db={'memberId':(await this[_0x26c894(0x206)][_0x26c894(0x227)](_0x5c88ea))[_0x26c894(0x1c6)](),'threadId':_0x370224,'replyId':_0x12afd8,'unitId':_0x5c88ea},_0x114cc2=await this['_httpService'][_0x26c894(0x20f)](_0x26c894(0x1be)+_0x5c88ea+'/delete',{'body':_0x3930db});return!_0x114cc2[_0x26c894(0x1d4)][_0x26c894(0x1ef)]||_0x114cc2['body'][_0x26c894(0x1ef)][_0x26c894(0x1eb)]===0x1;}async[_0xffd7c1(0x1b2)](_0x1ae5c4,_0x56601e,_0x1964a4){const _0x368da6=_0xffd7c1,_0x3e71ca={'unitId':_0x1ae5c4,'threadId':_0x1964a4},_0x1434e7=await this[_0x368da6(0x1bd)]['post'](_0x368da6(0x1be)+_0x1ae5c4+_0x368da6(0x224),{'body':_0x3e71ca}),_0xfa9c87=_0x1964a4[_0x368da6(0x221)](_0x2760e0=>G(_0x1434e7[_0x368da6(0x1d4)]['comments'][_0x2760e0],_0x1ae5c4,_0x56601e))[_0x368da6(0x1bb)](Boolean);return Object[_0x368da6(0x1d1)](_0x1434e7['body'][_0x368da6(0x1c2)])[_0x368da6(0x222)](_0x30b311=>{const _0x5228cc=_0x368da6;this[_0x5228cc(0x214)]['addUser'](_0x30b311);}),_0xfa9c87;}['saveCommentToSnapshot'](_0x3dd797){const _0x365dcd=_0xffd7c1;return{'id':_0x3dd797['id'],'threadId':_0x3dd797[_0x365dcd(0x207)],'ref':_0x3dd797[_0x365dcd(0x1cf)]};}};g=x([_(0x0,c[_0xffd7c1(0x213)](P['HTTPService'])),_(0x1,c[_0xffd7c1(0x213)](c[_0xffd7c1(0x1c1)])),_(0x2,c[_0xffd7c1(0x213)](b[_0xffd7c1(0x1c7)])),_(0x3,c['Inject'](c[_0xffd7c1(0x1b9)]))],g);var H=Object[_0xffd7c1(0x1e0)],J=(_0x18cccc,_0x58305a,_0x5c145c,_0x327beb)=>{for(var _0x4d6962=_0x327beb>0x1?void 0x0:_0x327beb?H(_0x58305a,_0x5c145c):_0x58305a,_0x3c0f0c=_0x18cccc['length']-0x1,_0x202ac3;_0x3c0f0c>=0x0;_0x3c0f0c--)(_0x202ac3=_0x18cccc[_0x3c0f0c])&&(_0x4d6962=_0x202ac3(_0x4d6962)||_0x4d6962);return _0x4d6962;},y=(_0x149e54,_0x5bf7e4)=>(_0xe3f055,_0x3588ae)=>_0x5bf7e4(_0xe3f055,_0x3588ae,_0x149e54);let C=class extends c[_0xffd7c1(0x1ba)]{constructor(_0x36e352,_0x3d0537){const _0x2c22c1=_0xffd7c1;super(),this[_0x2c22c1(0x1ce)]=_0x36e352,this[_0x2c22c1(0x1b1)]=_0x3d0537,this[_0x2c22c1(0x21d)]();}['_initDataSource'](){const _0x58a1e5=_0xffd7c1;this[_0x58a1e5(0x1ce)]['dataSource']=this[_0x58a1e5(0x1b1)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0xffd7c1(0x213)](g))],C);var F=Object[_0xffd7c1(0x1f5)],L=Object[_0xffd7c1(0x1e0)],Z=(_0x3fb045,_0x3ac6cb,_0x13dae2)=>_0x3ac6cb in _0x3fb045?F(_0x3fb045,_0x3ac6cb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x13dae2}):_0x3fb045[_0x3ac6cb]=_0x13dae2,W=(_0x2476a1,_0x1eb0a9,_0x3f33a3,_0x38ed79)=>{const _0x46ff68=_0xffd7c1;for(var _0x3776ba=_0x38ed79>0x1?void 0x0:_0x38ed79?L(_0x1eb0a9,_0x3f33a3):_0x1eb0a9,_0x4ccb5b=_0x2476a1[_0x46ff68(0x1f3)]-0x1,_0x1bd8ff;_0x4ccb5b>=0x0;_0x4ccb5b--)(_0x1bd8ff=_0x2476a1[_0x4ccb5b])&&(_0x3776ba=_0x1bd8ff(_0x3776ba)||_0x3776ba);return _0x3776ba;},O=(_0x399380,_0x2b6425)=>(_0x2b71a6,_0x10da1e)=>_0x2b6425(_0x2b71a6,_0x10da1e,_0x399380),N=(_0x4e7d01,_0x39c708,_0x458544)=>Z(_0x4e7d01,typeof _0x39c708!=_0xffd7c1(0x1f0)?_0x39c708+'':_0x39c708,_0x458544);exports[_0xffd7c1(0x1e7)]=class extends c[_0xffd7c1(0x20e)]{constructor(_0x59e461=D,_0x5d6176,_0x3654c2){const _0x52910a=_0xffd7c1;super(),this[_0x52910a(0x225)]=_0x59e461,this[_0x52910a(0x1e2)]=_0x5d6176,this[_0x52910a(0x1cd)]=_0x3654c2;const {..._0x286fe4}=c[_0x52910a(0x1d3)]({},D,this[_0x52910a(0x225)]);this[_0x52910a(0x1cd)][_0x52910a(0x21c)](q,_0x286fe4);}[_0xffd7c1(0x1d8)](){const _0x231320=_0xffd7c1;[[g],[C],[p]][_0x231320(0x222)](_0x5bc432=>{const _0xe43858=_0x231320;this[_0xe43858(0x1e2)][_0xe43858(0x1e5)](_0x5bc432);});}[_0xffd7c1(0x1b4)](){const _0x1ae994=_0xffd7c1;this[_0x1ae994(0x1e2)][_0x1ae994(0x1ee)](C),this['_injector']['get'](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0xffd7c1(0x1d7),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0xffd7c1(0x1c4),c[_0xffd7c1(0x20a)]['UNIVER_UNKNOWN']),exports[_0xffd7c1(0x1e7)]=W([c['DependentOn'](j[_0xffd7c1(0x1bc)],b['UniverCollaborationClientPlugin'],T[_0xffd7c1(0x1b0)]),O(0x1,c[_0xffd7c1(0x213)](c[_0xffd7c1(0x1b9)])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0x444990=_0x4014;function _0x4014(_0x1f8217,_0x35ab7f){const _0x4e0e8c=_0x4e0e();return _0x4014=function(_0x401498,_0x45de70){_0x401498=_0x401498-0x13c;let _0x349ca9=_0x4e0e8c[_0x401498];return _0x349ca9;},_0x4014(_0x1f8217,_0x35ab7f);}(function(_0x221fca,_0x1f6e29){const _0x33b3e3=_0x4014,_0x4efeec=_0x221fca();while(!![]){try{const _0x12fb78=parseInt(_0x33b3e3(0x161))/0x1*(-parseInt(_0x33b3e3(0x146))/0x2)+parseInt(_0x33b3e3(0x173))/0x3*(-parseInt(_0x33b3e3(0x13c))/0x4)+parseInt(_0x33b3e3(0x18b))/0x5*(-parseInt(_0x33b3e3(0x19e))/0x6)+-parseInt(_0x33b3e3(0x160))/0x7+parseInt(_0x33b3e3(0x148))/0x8*(parseInt(_0x33b3e3(0x13e))/0x9)+-parseInt(_0x33b3e3(0x1a4))/0xa*(-parseInt(_0x33b3e3(0x182))/0xb)+parseInt(_0x33b3e3(0x141))/0xc*(parseInt(_0x33b3e3(0x186))/0xd);if(_0x12fb78===_0x1f6e29)break;else _0x4efeec['push'](_0x4efeec['shift']());}catch(_0x11ea45){_0x4efeec['push'](_0x4efeec['shift']());}}}(_0x4e0e,0x9c2bd));Object[_0x444990(0x17f)](exports,Symbol[_0x444990(0x1a2)],{'value':_0x444990(0x1b4)});function _0x4e0e(){const _0x4c82c6=['CommentService','_threadCommentDataSource','merge','symbol','rangeId','userID','Solved','content','get','stringify','solved','getCurrentUser','@univerjs/network','3989174woVEwf','546283iBmdsx','/solved','rxjs','_threadCommentModel','dayjs','post','replyId','deleteComment','root','subscribe','pluginName','UniverThreadCommentDataSourcePlugin','comments','@univerjs-pro/license','find','forEach','COMMENT','error','3TqwWkc','onStarting','values','CollaborationSessionService','UniverThreadCommentUIPlugin','filter','/add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','requireSession','IThreadCommentDataSourceService','length','UNRECOGNIZED','defineProperty','unitId','YYYY/MM/DD\x20HH:mm','477884qXyLus','Unknown','user','UserManagerService','4616573LUqmPP','IConfigService','@univerjs-pro/collaboration-client','HTTPService','UniverCollaborationClientPlugin','93580oTUwtn','updateComment','onReady','getComment','_userService','resolveComment','Disposable','Inject','resolved','replies','/edit','/list','UniverInstanceType','Solve','_httpService','@univerjs/core','_config','users','map','42DhWtRS','dataSource','userId','getMemberID','toStringTag','threadId','190TgwgDd','addUser','getOwnPropertyDescriptor','/delete','Add','Injector','UniverLicensePlugin','thread-comment-data-source.config','CustomRangeType','/reply','/universer-api/comment/unit/','body','Delete','_commentService','Plugin','_configService','Module','comment','reply','_initUserSync','rangeType','@univerjs/thread-comment','format','customRanges','commentUpdate$','_injector','5093068EcNZzn','createTimestamp','36WPWLjF','getUnit','delete','60zfhwGE','disposeWithMe','Reply','payload','setConfig','2euAjwZ','_threadCommentDataSourceService','1118160lNSrne','_sessionService','type','_init','parse','code','Edit','OpenOrReOpen','_initDataSource','/universer-api/user/list','addComment'];_0x4e0e=function(){return _0x4c82c6;};return _0x4e0e();}const b=require(_0x444990(0x188)),T=require(_0x444990(0x16e)),c=require(_0x444990(0x19a)),j=require('@univerjs/thread-comment-ui'),M=require(_0x444990(0x1b9)),w=require(_0x444990(0x163)),P=require(_0x444990(0x15f)),U=_0x444990(0x17a);var I=(_0x4c3320=>(_0x4c3320[_0x4c3320['OpenOrReOpen']=0x0]=_0x444990(0x14f),_0x4c3320[_0x4c3320[_0x444990(0x159)]=0x1]=_0x444990(0x159),_0x4c3320[_0x4c3320[_0x444990(0x17e)]=-0x1]='UNRECOGNIZED',_0x4c3320))(I||{}),v=(_0x31bf7a=>(_0x31bf7a[_0x31bf7a[_0x444990(0x183)]=0x0]=_0x444990(0x183),_0x31bf7a[_0x31bf7a[_0x444990(0x1a8)]=0x1]=_0x444990(0x1a8),_0x31bf7a[_0x31bf7a[_0x444990(0x143)]=0x2]=_0x444990(0x143),_0x31bf7a[_0x31bf7a['Edit']=0x3]=_0x444990(0x14e),_0x31bf7a[_0x31bf7a['Delete']=0x4]=_0x444990(0x1b0),_0x31bf7a[_0x31bf7a[_0x444990(0x198)]=0x5]=_0x444990(0x198),_0x31bf7a[_0x31bf7a[_0x444990(0x17e)]=-0x1]=_0x444990(0x17e),_0x31bf7a))(v||{});const f=_0xca6986=>c[_0x444990(0x165)](new Date(+_0xca6986))[_0x444990(0x1ba)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x1e1164,_0x9baa00)=>{const _0x2694a8=_0x444990,_0x172b08=_0x1e1164[_0x2694a8(0x15b)](c['UserManagerService']),_0x3cf7de=_0x1e1164[_0x2694a8(0x15b)](P['HTTPService']);_0x9baa00[_0x2694a8(0x170)](_0x18870a=>{const _0x19c2da=_0x2694a8;_0x172b08['getUser'](_0x18870a)&&_0x9baa00[_0x19c2da(0x140)](_0x18870a);}),_0x9baa00['size']&&(await _0x3cf7de[_0x2694a8(0x15b)](_0x2694a8(0x151),{'params':{'userIDs':[..._0x9baa00]}}))['body'][_0x2694a8(0x19c)]['forEach'](_0x41dbc5=>{const _0x40b35f=_0x2694a8;_0x41dbc5&&_0x172b08[_0x40b35f(0x1a5)](_0x41dbc5);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x2e278e,_0xd9780a,_0x254b88,_0x2eb11c)=>{for(var _0x59b28e=_0x2eb11c>0x1?void 0x0:_0x2eb11c?$(_0xd9780a,_0x254b88):_0xd9780a,_0x13fdaf=_0x2e278e['length']-0x1,_0x376b57;_0x13fdaf>=0x0;_0x13fdaf--)(_0x376b57=_0x2e278e[_0x13fdaf])&&(_0x59b28e=_0x376b57(_0x59b28e)||_0x59b28e);return _0x59b28e;},S=(_0x457594,_0x76e887)=>(_0x9eb10,_0x4d63db)=>_0x76e887(_0x9eb10,_0x4d63db,_0x457594);let p=class extends c[_0x444990(0x191)]{constructor(_0x1e98d3,_0x4c1d08,_0x10042f,_0x31502f){const _0x572d89=_0x444990;super(),this[_0x572d89(0x1b1)]=_0x1e98d3,this[_0x572d89(0x164)]=_0x4c1d08,this[_0x572d89(0x18f)]=_0x10042f,this[_0x572d89(0x1bd)]=_0x31502f,this['_init'](),this[_0x572d89(0x1b7)]();}['_initUserSync'](){const _0x3de091=_0x444990;this[_0x3de091(0x142)](this['_threadCommentModel'][_0x3de091(0x1bc)]['pipe'](w['bufferTime'](0x10))['subscribe'](_0x34b0b0=>{const _0x66e41a=_0x3de091,_0x2f2e20=new Set();_0x34b0b0['forEach'](_0xcee43d=>{const _0x1e3b01=_0x4014;switch(_0xcee43d[_0x1e3b01(0x14a)]){case'add':{const _0x46d99d=_0xcee43d[_0x1e3b01(0x144)]['personId'];_0x2f2e20['add'](_0x46d99d);break;}}}),R(this[_0x66e41a(0x1bd)],_0x2f2e20);}));}[_0x444990(0x14b)](){const _0x3170e9=_0x444990;this['disposeWithMe'](this['_commentService'][_0x3170e9(0x1bc)][_0x3170e9(0x16a)](async _0x570230=>{const _0x4d23a8=_0x3170e9;var _0x3665ca,_0x5668a9,_0x37ea15,_0x1f2380;const _0x4e2d21=(_0x3665ca=this[_0x4d23a8(0x164)][_0x4d23a8(0x13f)](_0x570230[_0x4d23a8(0x180)])[_0x4d23a8(0x16f)](_0x290583=>_0x290583['threadId']===_0x570230[_0x4d23a8(0x1a3)]))==null?void 0x0:_0x3665ca[_0x4d23a8(0x169)];if(!_0x4e2d21)return;const {unitId:_0x23561c,subUnitId:_0x516b61}=_0x4e2d21;switch(_0x570230[_0x4d23a8(0x184)]&&this[_0x4d23a8(0x18f)]['addUser'](_0x570230[_0x4d23a8(0x184)]),_0x570230[_0x4d23a8(0x14a)]){case v[_0x4d23a8(0x1a8)]:break;case v[_0x4d23a8(0x143)]:{this[_0x4d23a8(0x164)][_0x4d23a8(0x152)](_0x23561c,_0x516b61,{'unitId':_0x23561c,'subUnitId':_0x516b61,'ref':'','id':_0x570230[_0x4d23a8(0x167)],'dT':f(+_0x570230[_0x4d23a8(0x13d)]),'threadId':_0x570230[_0x4d23a8(0x1a3)],'personId':(_0x37ea15=(_0x5668a9=_0x570230['user'])==null?void 0x0:_0x5668a9[_0x4d23a8(0x158)])!=null?_0x37ea15:_0x570230[_0x4d23a8(0x1a0)],'text':JSON[_0x4d23a8(0x14c)](_0x570230[_0x4d23a8(0x15a)]),'parentId':_0x4e2d21['id']});break;}case v[_0x4d23a8(0x1b0)]:{const _0x45b0b3=this[_0x4d23a8(0x164)][_0x4d23a8(0x18e)](_0x23561c,_0x516b61,_0x570230[_0x4d23a8(0x167)]);_0x45b0b3&&_0x45b0b3['parentId']&&this['_threadCommentModel'][_0x4d23a8(0x168)](_0x23561c,_0x516b61,_0x570230[_0x4d23a8(0x167)]);break;}case v['Edit']:{this[_0x4d23a8(0x164)][_0x4d23a8(0x18c)](_0x23561c,_0x516b61,{'commentId':_0x570230[_0x4d23a8(0x167)],'text':JSON[_0x4d23a8(0x14c)](_0x570230[_0x4d23a8(0x15a)])});break;}case v[_0x4d23a8(0x198)]:{const _0x52e14a=(_0x1f2380=this[_0x4d23a8(0x164)]['getUnit'](_0x570230[_0x4d23a8(0x180)])[_0x4d23a8(0x16f)](_0x25f2f0=>_0x25f2f0[_0x4d23a8(0x1a3)]===_0x570230[_0x4d23a8(0x1a3)]))==null?void 0x0:_0x1f2380[_0x4d23a8(0x169)];_0x52e14a&&this[_0x4d23a8(0x164)][_0x4d23a8(0x190)](_0x23561c,_0x516b61,_0x52e14a['id'],_0x570230[_0x4d23a8(0x15d)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x444990(0x192)](b[_0x444990(0x153)])),S(0x1,c[_0x444990(0x192)](M['ThreadCommentModel'])),S(0x2,c[_0x444990(0x192)](c[_0x444990(0x185)])),S(0x3,c[_0x444990(0x192)](c[_0x444990(0x1a9)]))],p);const q=_0x444990(0x1ab),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x127b30,_0x169359,_0x3a174b,_0xaf9644)=>{const _0x107f4e=_0x444990;for(var _0x14a8a8=_0xaf9644>0x1?void 0x0:_0xaf9644?A(_0x169359,_0x3a174b):_0x169359,_0x856333=_0x127b30[_0x107f4e(0x17d)]-0x1,_0x2eb7ed;_0x856333>=0x0;_0x856333--)(_0x2eb7ed=_0x127b30[_0x856333])&&(_0x14a8a8=_0x2eb7ed(_0x14a8a8)||_0x14a8a8);return _0x14a8a8;},_=(_0x21fe17,_0x40d0d9)=>(_0x3535b9,_0x28b632)=>_0x40d0d9(_0x3535b9,_0x28b632,_0x21fe17);function Y(_0x4d73b5,_0x2c1fea){const _0x5bb067=_0x444990,_0x58ae5f=_0x4d73b5[_0x5bb067(0x194)][0x0];return{..._0x2c1fea,'id':_0x58ae5f[_0x5bb067(0x167)],'resolved':_0x4d73b5[_0x5bb067(0x15d)]===0x1,'dT':f(_0x58ae5f[_0x5bb067(0x13d)]),'personId':_0x58ae5f['userId'],'threadId':_0x58ae5f['threadId']};}function G(_0xb8891a,_0x2f0a74,_0x38a5f8){const _0x5ecfc3=_0x444990;var _0x5d3612,_0x31c5f5;if(((_0x31c5f5=(_0x5d3612=_0xb8891a==null?void 0x0:_0xb8891a[_0x5ecfc3(0x194)])==null?void 0x0:_0x5d3612[_0x5ecfc3(0x17d)])!=null?_0x31c5f5:0x0)>0x0){const _0x5a8879=(_0x219f1f,_0x540761)=>({'id':_0x219f1f['replyId'],'threadId':_0x219f1f[_0x5ecfc3(0x1a3)],'dT':f(_0x219f1f[_0x5ecfc3(0x13d)]),'personId':_0x219f1f['userId'],'resolved':_0xb8891a[_0x5ecfc3(0x15d)]===I['Solved'],'unitId':_0x2f0a74,'subUnitId':_0x38a5f8,'text':JSON[_0x5ecfc3(0x14c)](_0x219f1f[_0x5ecfc3(0x15a)]),'parentId':_0x540761}),_0x4c0c6e=_0x5a8879(_0xb8891a[_0x5ecfc3(0x194)][0x0]);return{..._0x4c0c6e,'children':_0xb8891a['replies']['slice'](0x1)[_0x5ecfc3(0x19d)](_0x7bbcc2=>_0x5a8879(_0x7bbcc2,_0x4c0c6e['id']))};}return null;}let g=class{constructor(_0x3e102c,_0x2defb8,_0x38496e,_0x5d474c){const _0x3b07b1=_0x444990;this[_0x3b07b1(0x199)]=_0x3e102c,this['_userService']=_0x2defb8,this[_0x3b07b1(0x149)]=_0x38496e,this[_0x3b07b1(0x1bd)]=_0x5d474c;}async['addComment'](_0x214d76){const _0x52cdb2=_0x444990;var _0x21e1b3,_0x44d7ed;const {parentId:_0x4fb749,unitId:_0x56f580,text:_0x727d8a,threadId:_0x586c16}=_0x214d76,_0x2dc21c=(_0x44d7ed=(_0x21e1b3=_0x727d8a[_0x52cdb2(0x1bb)])==null?void 0x0:_0x21e1b3[_0x52cdb2(0x178)](_0x3a4173=>_0x3a4173[_0x52cdb2(0x1b8)]===c['CustomRangeType'][_0x52cdb2(0x171)])[_0x52cdb2(0x19d)](_0x375826=>_0x375826['rangeId']))!=null?_0x44d7ed:[],_0x24d855=JSON[_0x52cdb2(0x15c)](_0x727d8a),_0x4e1c3c=(await this[_0x52cdb2(0x149)][_0x52cdb2(0x17b)](_0x56f580))['getMemberID']();if(_0x4fb749){const _0x302e66={'memberId':_0x4e1c3c,'unitId':_0x56f580,'content':_0x24d855,'mention':_0x2dc21c,'threadId':_0x586c16},_0x5a4dc0=(await this[_0x52cdb2(0x199)][_0x52cdb2(0x166)](_0x52cdb2(0x1ae)+_0x56f580+_0x52cdb2(0x1ad),{'body':_0x302e66}))[_0x52cdb2(0x1af)][_0x52cdb2(0x1b6)];return{..._0x214d76,'id':_0x5a4dc0[_0x52cdb2(0x167)],'dT':c[_0x52cdb2(0x165)](+_0x5a4dc0[_0x52cdb2(0x13d)])[_0x52cdb2(0x1ba)](_0x52cdb2(0x181)),'personId':_0x5a4dc0['userId']};}else{const _0x15faf5={'memberId':_0x4e1c3c,'unitId':_0x56f580,'content':_0x24d855,'mention':_0x2dc21c},_0x11a2de=await this[_0x52cdb2(0x199)][_0x52cdb2(0x166)](_0x52cdb2(0x1ae)+_0x56f580+_0x52cdb2(0x179),{'body':_0x15faf5});return Y(_0x11a2de[_0x52cdb2(0x1af)][_0x52cdb2(0x1b5)],_0x214d76);}}async[_0x444990(0x18c)](_0x57a3fc){const _0x3610db=_0x444990;var _0x76c8cb,_0x3d6196;const {text:_0x3f5654,unitId:_0x2cf297}=_0x57a3fc,_0x26b436=(_0x3d6196=(_0x76c8cb=_0x3f5654[_0x3610db(0x1bb)])==null?void 0x0:_0x76c8cb[_0x3610db(0x178)](_0x26afcd=>_0x26afcd[_0x3610db(0x1b8)]===c[_0x3610db(0x1ac)][_0x3610db(0x171)])[_0x3610db(0x19d)](_0x4e07fb=>_0x4e07fb[_0x3610db(0x157)]))!=null?_0x3d6196:[],_0x5dece3=JSON[_0x3610db(0x15c)](_0x3f5654),_0x5bd27b=_0x57a3fc[_0x3610db(0x1a3)],_0x543ae0=_0x57a3fc['id'],_0x44d441={'memberId':(await this[_0x3610db(0x149)][_0x3610db(0x17b)](_0x2cf297))[_0x3610db(0x1a1)](),'unitId':_0x2cf297,'threadId':_0x5bd27b,'mention':_0x26b436,'content':_0x5dece3,'replyId':_0x543ae0},_0x4b72c4=await this['_httpService'][_0x3610db(0x166)](_0x3610db(0x1ae)+_0x2cf297+_0x3610db(0x195),{'body':_0x44d441});return!_0x4b72c4['body']['error']||_0x4b72c4[_0x3610db(0x1af)][_0x3610db(0x172)][_0x3610db(0x14d)]===0x1;}async['resolveComment'](_0x5dc68e){const _0x4ce88e=_0x444990,{unitId:_0x876bba}=_0x5dc68e,_0x2ec9a6=_0x5dc68e['threadId'],_0x31e232={'memberId':this[_0x4ce88e(0x18f)][_0x4ce88e(0x15e)]()['userID'],'unitId':_0x876bba,'threadId':_0x2ec9a6,'solved':_0x5dc68e[_0x4ce88e(0x193)]?I[_0x4ce88e(0x159)]:I[_0x4ce88e(0x14f)]},_0x41831f=await this[_0x4ce88e(0x199)][_0x4ce88e(0x166)](_0x4ce88e(0x1ae)+_0x876bba+_0x4ce88e(0x162),{'body':_0x31e232});return!_0x41831f[_0x4ce88e(0x1af)][_0x4ce88e(0x172)]||_0x41831f[_0x4ce88e(0x1af)][_0x4ce88e(0x172)][_0x4ce88e(0x14d)]===0x1;}async[_0x444990(0x168)](_0x3df187,_0x51b829,_0x13655b,_0x833810){const _0x2fb14a=_0x444990,_0x4d7321={'memberId':(await this[_0x2fb14a(0x149)][_0x2fb14a(0x17b)](_0x3df187))[_0x2fb14a(0x1a1)](),'threadId':_0x13655b,'replyId':_0x833810,'unitId':_0x3df187},_0x1ad100=await this['_httpService'][_0x2fb14a(0x166)](_0x2fb14a(0x1ae)+_0x3df187+_0x2fb14a(0x1a7),{'body':_0x4d7321});return!_0x1ad100[_0x2fb14a(0x1af)]['error']||_0x1ad100[_0x2fb14a(0x1af)][_0x2fb14a(0x172)]['code']===0x1;}async['listComments'](_0x150726,_0x4f6af8,_0x490e55){const _0x14abcb=_0x444990,_0x186358={'unitId':_0x150726,'threadId':_0x490e55},_0x426630=await this['_httpService'][_0x14abcb(0x166)](_0x14abcb(0x1ae)+_0x150726+_0x14abcb(0x196),{'body':_0x186358}),_0x446258=_0x490e55[_0x14abcb(0x19d)](_0x435115=>G(_0x426630[_0x14abcb(0x1af)][_0x14abcb(0x16d)][_0x435115],_0x150726,_0x4f6af8))[_0x14abcb(0x178)](Boolean);return Object[_0x14abcb(0x175)](_0x426630[_0x14abcb(0x1af)]['users'])[_0x14abcb(0x170)](_0xb0e210=>{const _0x364d31=_0x14abcb;this['_userService'][_0x364d31(0x1a5)](_0xb0e210);}),_0x446258;}['saveCommentToSnapshot'](_0x1d9dd0){const _0x306401=_0x444990;return{'id':_0x1d9dd0['id'],'threadId':_0x1d9dd0[_0x306401(0x1a3)],'ref':_0x1d9dd0['ref']};}};g=x([_(0x0,c['Inject'](P[_0x444990(0x189)])),_(0x1,c[_0x444990(0x192)](c[_0x444990(0x185)])),_(0x2,c['Inject'](b[_0x444990(0x176)])),_(0x3,c[_0x444990(0x192)](c[_0x444990(0x1a9)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x4cda63,_0x5d23ab,_0x59c923,_0xfd89f3)=>{const _0x3a79cf=_0x444990;for(var _0x5eeb1c=_0xfd89f3>0x1?void 0x0:_0xfd89f3?H(_0x5d23ab,_0x59c923):_0x5d23ab,_0x3d937b=_0x4cda63[_0x3a79cf(0x17d)]-0x1,_0x5b57f9;_0x3d937b>=0x0;_0x3d937b--)(_0x5b57f9=_0x4cda63[_0x3d937b])&&(_0x5eeb1c=_0x5b57f9(_0x5eeb1c)||_0x5eeb1c);return _0x5eeb1c;},y=(_0x451236,_0x44c315)=>(_0x3969c5,_0x21f6a3)=>_0x44c315(_0x3969c5,_0x21f6a3,_0x451236);let C=class extends c[_0x444990(0x191)]{constructor(_0x5bd023,_0x290d00){const _0x1a2c13=_0x444990;super(),this[_0x1a2c13(0x147)]=_0x5bd023,this[_0x1a2c13(0x154)]=_0x290d00,this[_0x1a2c13(0x150)]();}['_initDataSource'](){const _0x4a8b5a=_0x444990;this[_0x4a8b5a(0x147)][_0x4a8b5a(0x19f)]=this[_0x4a8b5a(0x154)],this[_0x4a8b5a(0x147)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x444990(0x17c)]),y(0x1,c[_0x444990(0x192)](g))],C);var F=Object[_0x444990(0x17f)],L=Object[_0x444990(0x1a6)],Z=(_0x255e70,_0x36786b,_0x5cb627)=>_0x36786b in _0x255e70?F(_0x255e70,_0x36786b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5cb627}):_0x255e70[_0x36786b]=_0x5cb627,W=(_0x6e7628,_0x16021b,_0x1b17c5,_0x2c2057)=>{const _0xe73a94=_0x444990;for(var _0x24bc6d=_0x2c2057>0x1?void 0x0:_0x2c2057?L(_0x16021b,_0x1b17c5):_0x16021b,_0x4dffef=_0x6e7628[_0xe73a94(0x17d)]-0x1,_0x5b06f3;_0x4dffef>=0x0;_0x4dffef--)(_0x5b06f3=_0x6e7628[_0x4dffef])&&(_0x24bc6d=_0x5b06f3(_0x24bc6d)||_0x24bc6d);return _0x24bc6d;},O=(_0x4faa36,_0x4ccbd7)=>(_0x141df0,_0x512ac5)=>_0x4ccbd7(_0x141df0,_0x512ac5,_0x4faa36),N=(_0x27fa45,_0x3aecc2,_0x15e001)=>Z(_0x27fa45,typeof _0x3aecc2!=_0x444990(0x156)?_0x3aecc2+'':_0x3aecc2,_0x15e001);exports[_0x444990(0x16c)]=class extends c[_0x444990(0x1b2)]{constructor(_0x19327d=D,_0x56cd96,_0x2feeb5){const _0x4ad3a7=_0x444990;super(),this[_0x4ad3a7(0x19b)]=_0x19327d,this[_0x4ad3a7(0x1bd)]=_0x56cd96,this[_0x4ad3a7(0x1b3)]=_0x2feeb5;const {..._0x27773e}=c[_0x4ad3a7(0x155)]({},D,this[_0x4ad3a7(0x19b)]);this[_0x4ad3a7(0x1b3)][_0x4ad3a7(0x145)](q,_0x27773e);}[_0x444990(0x174)](){[[g],[C],[p]]['forEach'](_0x1fed09=>{const _0x4f88a4=_0x4014;this[_0x4f88a4(0x1bd)]['add'](_0x1fed09);});}[_0x444990(0x18d)](){const _0xbd5c0b=_0x444990;this[_0xbd5c0b(0x1bd)][_0xbd5c0b(0x15b)](C),this[_0xbd5c0b(0x1bd)][_0xbd5c0b(0x15b)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x444990(0x16b),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x444990(0x14a),c[_0x444990(0x197)]['UNIVER_UNKNOWN']),exports[_0x444990(0x16c)]=W([c['DependentOn'](j[_0x444990(0x177)],b[_0x444990(0x18a)],T[_0x444990(0x1aa)]),O(0x1,c[_0x444990(0x192)](c['Injector'])),O(0x2,c[_0x444990(0x187)])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x5ce6d6=_0x1597;(function(_0x2e273f,_0x45ce0b){const _0x4abcd9=_0x1597,_0x194beb=_0x2e273f();while(!![]){try{const _0x22d439=parseInt(_0x4abcd9(0x1f8))/0x1+parseInt(_0x4abcd9(0x1d4))/0x2*(-parseInt(_0x4abcd9(0x1e7))/0x3)+parseInt(_0x4abcd9(0x201))/0x4*(parseInt(_0x4abcd9(0x209))/0x5)+parseInt(_0x4abcd9(0x1d9))/0x6*(-parseInt(_0x4abcd9(0x1cf))/0x7)+-parseInt(_0x4abcd9(0x1e2))/0x8*(-parseInt(_0x4abcd9(0x22e))/0x9)+parseInt(_0x4abcd9(0x212))/0xa+parseInt(_0x4abcd9(0x1e4))/0xb*(-parseInt(_0x4abcd9(0x1d1))/0xc);if(_0x22d439===_0x45ce0b)break;else _0x194beb['push'](_0x194beb['shift']());}catch(_0xd76287){_0x194beb['push'](_0x194beb['shift']());}}}(_0x188f,0xebd49));import{CommentService as _0xba2742,CollaborationSessionService as _0xfa68d,UniverCollaborationClientPlugin as _0x554242}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x12a870}from'@univerjs-pro/license';import{dayjs as _0x1e305e,UserManagerService as _0xd8758c,Inject as _0x59ab9f,Injector as _0x10ffc5,Disposable as _0x1f4696,CustomRangeType as _0x4a1339,UniverInstanceType as _0x563e5b,DependentOn as _0x24198d,IConfigService as _0x143756,Plugin as _0x44f14f,merge as _0x842076}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x310ccb}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x40f162,IThreadCommentDataSourceService as _0x173173}from'@univerjs/thread-comment';import{bufferTime as _0x121ead}from'rxjs';import{HTTPService as _0x1c0427}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5a0705=>(_0x5a0705[_0x5a0705['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x5a0705[_0x5a0705['Solved']=0x1]=_0x5ce6d6(0x1f4),_0x5a0705[_0x5a0705[_0x5ce6d6(0x20c)]=-0x1]='UNRECOGNIZED',_0x5a0705))(I||{}),v=(_0x57ac5c=>(_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x1df)]=0x0]=_0x5ce6d6(0x1df),_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x20f)]=0x1]='Add',_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x21e)]=0x2]='Reply',_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x1f5)]=0x3]='Edit',_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x1d6)]=0x4]=_0x5ce6d6(0x1d6),_0x57ac5c[_0x57ac5c['Solve']=0x5]=_0x5ce6d6(0x214),_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x20c)]=-0x1]=_0x5ce6d6(0x20c),_0x57ac5c))(v||{});const D=_0x17ebd0=>_0x1e305e(new Date(+_0x17ebd0))[_0x5ce6d6(0x1cb)](_0x5ce6d6(0x1fc)),B=async(_0x33b4e9,_0x299153)=>{const _0x3fa37b=_0x5ce6d6,_0x5e2f94=_0x33b4e9[_0x3fa37b(0x223)](_0xd8758c),_0x4df365=_0x33b4e9[_0x3fa37b(0x223)](_0x1c0427);_0x299153[_0x3fa37b(0x1ce)](_0x572127=>{const _0x551729=_0x3fa37b;_0x5e2f94[_0x551729(0x21d)](_0x572127)&&_0x299153[_0x551729(0x1f7)](_0x572127);}),_0x299153[_0x3fa37b(0x1cc)]&&(await _0x4df365[_0x3fa37b(0x223)](_0x3fa37b(0x1e5),{'params':{'userIDs':[..._0x299153]}}))['body'][_0x3fa37b(0x204)][_0x3fa37b(0x1ce)](_0x3e55c7=>{const _0x83124d=_0x3fa37b;_0x3e55c7&&_0x5e2f94[_0x83124d(0x1ed)](_0x3e55c7);});};function _0x1597(_0x172810,_0x5a72d4){const _0x188fc8=_0x188f();return _0x1597=function(_0x15970e,_0x163375){_0x15970e=_0x15970e-0x1c9;let _0x585507=_0x188fc8[_0x15970e];return _0x585507;},_0x1597(_0x172810,_0x5a72d4);}function _0x188f(){const _0x4a5a23=['Delete','personId','onStarting','30mPToDC','unitId','resolved','requireSession','stringify','getMemberID','Unknown','pipe','root','8ibGjNr','userID','1672ociPiT','/universer-api/user/list','rangeType','201SUmZnQ','values','_commentService','reply','deleteComment','_threadCommentDataSourceService','addUser','symbol','/delete','_threadCommentModel','getCurrentUser','_configService','code','Solved','Edit','getUnit','delete','101731RdPckX','thread-comment-data-source.config','_httpService','post','YYYY/MM/DD\x20HH:mm','content','map','_initUserSync','parse','56JGoHxW','rangeId','_threadCommentDataSource','users','add','_init','/edit','replyId','661865RAfyzB','payload','_injector','UNRECOGNIZED','userId','onReady','Add','COMMENT','resolveComment','12805250aXJCaY','_initDataSource','Solve','/add','find','_userService','subscribe','solved','type','createTimestamp','customRanges','getUser','Reply','updateComment','ref','user','commentUpdate$','get','comments','disposeWithMe','body','/list','/universer-api/comment/unit/','OpenOrReOpen','threadId','addComment','replies','error','232209socOrE','slice','length','listComments','/solved','format','size','_sessionService','forEach','1276723mDqbyE','parentId','41556vmdDap','getOwnPropertyDescriptor','filter','25582ixdgQe','comment'];_0x188f=function(){return _0x4a5a23;};return _0x188f();}var K=Object[_0x5ce6d6(0x1d2)],V=(_0xab3062,_0x5ab8a6,_0x3ba0ef,_0x486938)=>{const _0x2d552a=_0x5ce6d6;for(var _0x366c17=_0x486938>0x1?void 0x0:_0x486938?K(_0x5ab8a6,_0x3ba0ef):_0x5ab8a6,_0x2a83ae=_0xab3062[_0x2d552a(0x230)]-0x1,_0x5c99b1;_0x2a83ae>=0x0;_0x2a83ae--)(_0x5c99b1=_0xab3062[_0x2a83ae])&&(_0x366c17=_0x5c99b1(_0x366c17)||_0x366c17);return _0x366c17;},p=(_0xf602d,_0x41dd73)=>(_0x108466,_0x30866f)=>_0x41dd73(_0x108466,_0x30866f,_0xf602d);let S=class extends _0x1f4696{constructor(_0x4eaa14,_0x1c29b0,_0x8dd5fa,_0x8e33be){const _0x1ff891=_0x5ce6d6;super(),this[_0x1ff891(0x1e9)]=_0x4eaa14,this[_0x1ff891(0x1f0)]=_0x1c29b0,this[_0x1ff891(0x217)]=_0x8dd5fa,this[_0x1ff891(0x20b)]=_0x8e33be,this[_0x1ff891(0x206)](),this[_0x1ff891(0x1ff)]();}['_initUserSync'](){const _0xe619d7=_0x5ce6d6;this[_0xe619d7(0x225)](this[_0xe619d7(0x1f0)][_0xe619d7(0x222)][_0xe619d7(0x1e0)](_0x121ead(0x10))[_0xe619d7(0x218)](_0x39986d=>{const _0x3879a7=new Set();_0x39986d['forEach'](_0x40c67c=>{const _0x201624=_0x1597;switch(_0x40c67c[_0x201624(0x21a)]){case _0x201624(0x205):{const _0x1b823e=_0x40c67c[_0x201624(0x20a)][_0x201624(0x1d7)];_0x3879a7['add'](_0x1b823e);break;}}}),B(this['_injector'],_0x3879a7);}));}[_0x5ce6d6(0x206)](){const _0x250aac=_0x5ce6d6;this[_0x250aac(0x225)](this['_commentService'][_0x250aac(0x222)][_0x250aac(0x218)](async _0x51e0d2=>{const _0x146159=_0x250aac;var _0x48265d,_0x3d3959,_0x4e8934,_0x3f9895;const _0x52297d=(_0x48265d=this[_0x146159(0x1f0)][_0x146159(0x1f6)](_0x51e0d2[_0x146159(0x1da)])[_0x146159(0x216)](_0x35a6d4=>_0x35a6d4[_0x146159(0x22a)]===_0x51e0d2[_0x146159(0x22a)]))==null?void 0x0:_0x48265d[_0x146159(0x1e1)];if(!_0x52297d)return;const {unitId:_0x5a96e6,subUnitId:_0x191a44}=_0x52297d;switch(_0x51e0d2['user']&&this['_userService'][_0x146159(0x1ed)](_0x51e0d2['user']),_0x51e0d2[_0x146159(0x21a)]){case v[_0x146159(0x20f)]:break;case v['Reply']:{this[_0x146159(0x1f0)][_0x146159(0x22b)](_0x5a96e6,_0x191a44,{'unitId':_0x5a96e6,'subUnitId':_0x191a44,'ref':'','id':_0x51e0d2[_0x146159(0x208)],'dT':D(+_0x51e0d2[_0x146159(0x21b)]),'threadId':_0x51e0d2[_0x146159(0x22a)],'personId':(_0x4e8934=(_0x3d3959=_0x51e0d2[_0x146159(0x221)])==null?void 0x0:_0x3d3959[_0x146159(0x1e3)])!=null?_0x4e8934:_0x51e0d2[_0x146159(0x20d)],'text':JSON[_0x146159(0x200)](_0x51e0d2[_0x146159(0x1fd)]),'parentId':_0x52297d['id']});break;}case v[_0x146159(0x1d6)]:{const _0x5bb6fe=this[_0x146159(0x1f0)]['getComment'](_0x5a96e6,_0x191a44,_0x51e0d2['replyId']);_0x5bb6fe&&_0x5bb6fe[_0x146159(0x1d0)]&&this[_0x146159(0x1f0)][_0x146159(0x1eb)](_0x5a96e6,_0x191a44,_0x51e0d2[_0x146159(0x208)]);break;}case v[_0x146159(0x1f5)]:{this['_threadCommentModel'][_0x146159(0x21f)](_0x5a96e6,_0x191a44,{'commentId':_0x51e0d2[_0x146159(0x208)],'text':JSON[_0x146159(0x200)](_0x51e0d2['content'])});break;}case v[_0x146159(0x214)]:{const _0xa2fd2a=(_0x3f9895=this[_0x146159(0x1f0)]['getUnit'](_0x51e0d2[_0x146159(0x1da)])[_0x146159(0x216)](_0x5cee72=>_0x5cee72[_0x146159(0x22a)]===_0x51e0d2[_0x146159(0x22a)]))==null?void 0x0:_0x3f9895[_0x146159(0x1e1)];_0xa2fd2a&&this['_threadCommentModel'][_0x146159(0x211)](_0x5a96e6,_0x191a44,_0xa2fd2a['id'],_0x51e0d2[_0x146159(0x219)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x59ab9f(_0xba2742)),p(0x1,_0x59ab9f(_0x40f162)),p(0x2,_0x59ab9f(_0xd8758c)),p(0x3,_0x59ab9f(_0x10ffc5))],S);const z=_0x5ce6d6(0x1f9),M={};var k=Object[_0x5ce6d6(0x1d2)],Q=(_0x3f239e,_0x435dab,_0x6f681b,_0x1c5651)=>{for(var _0x1d8197=_0x1c5651>0x1?void 0x0:_0x1c5651?k(_0x435dab,_0x6f681b):_0x435dab,_0x2a028b=_0x3f239e['length']-0x1,_0x382de1;_0x2a028b>=0x0;_0x2a028b--)(_0x382de1=_0x3f239e[_0x2a028b])&&(_0x1d8197=_0x382de1(_0x1d8197)||_0x1d8197);return _0x1d8197;},_=(_0x303e88,_0x32b15e)=>(_0x4939a1,_0x5edf7e)=>_0x32b15e(_0x4939a1,_0x5edf7e,_0x303e88);function X(_0x1d2313,_0xccca9f){const _0x197498=_0x5ce6d6,_0x161e8e=_0x1d2313[_0x197498(0x22c)][0x0];return{..._0xccca9f,'id':_0x161e8e[_0x197498(0x208)],'resolved':_0x1d2313[_0x197498(0x219)]===0x1,'dT':D(_0x161e8e[_0x197498(0x21b)]),'personId':_0x161e8e[_0x197498(0x20d)],'threadId':_0x161e8e[_0x197498(0x22a)]};}function ee(_0x4ff60d,_0x46620e,_0x18e14c){const _0x415989=_0x5ce6d6;var _0x155a32,_0x414cbd;if(((_0x414cbd=(_0x155a32=_0x4ff60d==null?void 0x0:_0x4ff60d[_0x415989(0x22c)])==null?void 0x0:_0x155a32[_0x415989(0x230)])!=null?_0x414cbd:0x0)>0x0){const _0x5e098d=(_0x30813b,_0x5f084d)=>({'id':_0x30813b[_0x415989(0x208)],'threadId':_0x30813b[_0x415989(0x22a)],'dT':D(_0x30813b[_0x415989(0x21b)]),'personId':_0x30813b[_0x415989(0x20d)],'resolved':_0x4ff60d[_0x415989(0x219)]===I[_0x415989(0x1f4)],'unitId':_0x46620e,'subUnitId':_0x18e14c,'text':JSON[_0x415989(0x200)](_0x30813b[_0x415989(0x1fd)]),'parentId':_0x5f084d}),_0x280fc0=_0x5e098d(_0x4ff60d[_0x415989(0x22c)][0x0]);return{..._0x280fc0,'children':_0x4ff60d[_0x415989(0x22c)][_0x415989(0x22f)](0x1)[_0x415989(0x1fe)](_0x351487=>_0x5e098d(_0x351487,_0x280fc0['id']))};}return null;}let f=class{constructor(_0x3c1497,_0x4b0308,_0x22e2d3,_0x47136c){const _0x2482a4=_0x5ce6d6;this['_httpService']=_0x3c1497,this[_0x2482a4(0x217)]=_0x4b0308,this['_sessionService']=_0x22e2d3,this[_0x2482a4(0x20b)]=_0x47136c;}async[_0x5ce6d6(0x22b)](_0x458b20){const _0x555017=_0x5ce6d6;var _0x1352ba,_0x42d966;const {parentId:_0x59b18c,unitId:_0x4cd18a,text:_0x49b408,threadId:_0x236e79}=_0x458b20,_0xf3bfe0=(_0x42d966=(_0x1352ba=_0x49b408[_0x555017(0x21c)])==null?void 0x0:_0x1352ba[_0x555017(0x1d3)](_0x151e2b=>_0x151e2b['rangeType']===_0x4a1339[_0x555017(0x210)])[_0x555017(0x1fe)](_0x567ac3=>_0x567ac3['rangeId']))!=null?_0x42d966:[],_0x37cd69=JSON[_0x555017(0x1dd)](_0x49b408),_0xe61618=(await this['_sessionService'][_0x555017(0x1dc)](_0x4cd18a))['getMemberID']();if(_0x59b18c){const _0x48b68f={'memberId':_0xe61618,'unitId':_0x4cd18a,'content':_0x37cd69,'mention':_0xf3bfe0,'threadId':_0x236e79},_0x332c07=(await this[_0x555017(0x1fa)][_0x555017(0x1fb)](_0x555017(0x228)+_0x4cd18a+'/reply',{'body':_0x48b68f}))[_0x555017(0x226)][_0x555017(0x1ea)];return{..._0x458b20,'id':_0x332c07[_0x555017(0x208)],'dT':_0x1e305e(+_0x332c07[_0x555017(0x21b)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x332c07[_0x555017(0x20d)]};}else{const _0x95a326={'memberId':_0xe61618,'unitId':_0x4cd18a,'content':_0x37cd69,'mention':_0xf3bfe0},_0x70eb65=await this['_httpService']['post'](_0x555017(0x228)+_0x4cd18a+_0x555017(0x215),{'body':_0x95a326});return X(_0x70eb65[_0x555017(0x226)][_0x555017(0x1d5)],_0x458b20);}}async[_0x5ce6d6(0x21f)](_0x4bd245){const _0x51ffda=_0x5ce6d6;var _0x5ae242,_0x22018a;const {text:_0x61b9bf,unitId:_0x2c71de}=_0x4bd245,_0x5ec4a5=(_0x22018a=(_0x5ae242=_0x61b9bf[_0x51ffda(0x21c)])==null?void 0x0:_0x5ae242[_0x51ffda(0x1d3)](_0x25e8bb=>_0x25e8bb[_0x51ffda(0x1e6)]===_0x4a1339[_0x51ffda(0x210)])[_0x51ffda(0x1fe)](_0xc415cf=>_0xc415cf[_0x51ffda(0x202)]))!=null?_0x22018a:[],_0x1f9643=JSON['stringify'](_0x61b9bf),_0x2ea379=_0x4bd245['threadId'],_0x4a46ba=_0x4bd245['id'],_0x5d3db7={'memberId':(await this[_0x51ffda(0x1cd)][_0x51ffda(0x1dc)](_0x2c71de))['getMemberID'](),'unitId':_0x2c71de,'threadId':_0x2ea379,'mention':_0x5ec4a5,'content':_0x1f9643,'replyId':_0x4a46ba},_0x3926d6=await this[_0x51ffda(0x1fa)][_0x51ffda(0x1fb)](_0x51ffda(0x228)+_0x2c71de+_0x51ffda(0x207),{'body':_0x5d3db7});return!_0x3926d6['body'][_0x51ffda(0x22d)]||_0x3926d6[_0x51ffda(0x226)][_0x51ffda(0x22d)][_0x51ffda(0x1f3)]===0x1;}async['resolveComment'](_0x1a7b5c){const _0x931ba7=_0x5ce6d6,{unitId:_0x46f6d1}=_0x1a7b5c,_0x38ec30=_0x1a7b5c['threadId'],_0x52f6d7={'memberId':this[_0x931ba7(0x217)][_0x931ba7(0x1f1)]()[_0x931ba7(0x1e3)],'unitId':_0x46f6d1,'threadId':_0x38ec30,'solved':_0x1a7b5c[_0x931ba7(0x1db)]?I[_0x931ba7(0x1f4)]:I[_0x931ba7(0x229)]},_0x57c4ed=await this[_0x931ba7(0x1fa)][_0x931ba7(0x1fb)](_0x931ba7(0x228)+_0x46f6d1+_0x931ba7(0x1ca),{'body':_0x52f6d7});return!_0x57c4ed[_0x931ba7(0x226)][_0x931ba7(0x22d)]||_0x57c4ed[_0x931ba7(0x226)][_0x931ba7(0x22d)][_0x931ba7(0x1f3)]===0x1;}async[_0x5ce6d6(0x1eb)](_0x448ed6,_0x5696ce,_0x2cdda3,_0x59d13a){const _0x5689de=_0x5ce6d6,_0x3d6456={'memberId':(await this[_0x5689de(0x1cd)]['requireSession'](_0x448ed6))[_0x5689de(0x1de)](),'threadId':_0x2cdda3,'replyId':_0x59d13a,'unitId':_0x448ed6},_0x40a87a=await this[_0x5689de(0x1fa)][_0x5689de(0x1fb)](_0x5689de(0x228)+_0x448ed6+_0x5689de(0x1ef),{'body':_0x3d6456});return!_0x40a87a[_0x5689de(0x226)]['error']||_0x40a87a[_0x5689de(0x226)][_0x5689de(0x22d)][_0x5689de(0x1f3)]===0x1;}async[_0x5ce6d6(0x1c9)](_0x1d0da3,_0x59b865,_0x2e187f){const _0x30c1f0=_0x5ce6d6,_0x3f21b5={'unitId':_0x1d0da3,'threadId':_0x2e187f},_0x3b27d9=await this[_0x30c1f0(0x1fa)]['post'](_0x30c1f0(0x228)+_0x1d0da3+_0x30c1f0(0x227),{'body':_0x3f21b5}),_0x4dc3bf=_0x2e187f[_0x30c1f0(0x1fe)](_0xfa5e04=>ee(_0x3b27d9['body'][_0x30c1f0(0x224)][_0xfa5e04],_0x1d0da3,_0x59b865))[_0x30c1f0(0x1d3)](Boolean);return Object[_0x30c1f0(0x1e8)](_0x3b27d9[_0x30c1f0(0x226)][_0x30c1f0(0x204)])[_0x30c1f0(0x1ce)](_0x3667f4=>{const _0x3b7980=_0x30c1f0;this[_0x3b7980(0x217)][_0x3b7980(0x1ed)](_0x3667f4);}),_0x4dc3bf;}['saveCommentToSnapshot'](_0x465833){const _0x2abb6e=_0x5ce6d6;return{'id':_0x465833['id'],'threadId':_0x465833['threadId'],'ref':_0x465833[_0x2abb6e(0x220)]};}};f=Q([_(0x0,_0x59ab9f(_0x1c0427)),_(0x1,_0x59ab9f(_0xd8758c)),_(0x2,_0x59ab9f(_0xfa68d)),_(0x3,_0x59ab9f(_0x10ffc5))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x35d5e4,_0x5bb460,_0x1a8912,_0x31fd9f)=>{const _0x24fbd8=_0x5ce6d6;for(var _0x474c3e=_0x31fd9f>0x1?void 0x0:_0x31fd9f?re(_0x5bb460,_0x1a8912):_0x5bb460,_0x42d8c9=_0x35d5e4[_0x24fbd8(0x230)]-0x1,_0x172e81;_0x42d8c9>=0x0;_0x42d8c9--)(_0x172e81=_0x35d5e4[_0x42d8c9])&&(_0x474c3e=_0x172e81(_0x474c3e)||_0x474c3e);return _0x474c3e;},N=(_0x17080e,_0x45ed40)=>(_0x1d4dc1,_0x10515e)=>_0x45ed40(_0x1d4dc1,_0x10515e,_0x17080e);let g=class extends _0x1f4696{constructor(_0x33b52a,_0x481875){const _0x4cb860=_0x5ce6d6;super(),this[_0x4cb860(0x1ec)]=_0x33b52a,this[_0x4cb860(0x203)]=_0x481875,this['_initDataSource']();}[_0x5ce6d6(0x213)](){const _0x655a87=_0x5ce6d6;this[_0x655a87(0x1ec)]['dataSource']=this['_threadCommentDataSource'],this[_0x655a87(0x1ec)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x173173),N(0x1,_0x59ab9f(f))],g);var se=Object['defineProperty'],oe=Object[_0x5ce6d6(0x1d2)],ne=(_0x52b464,_0xe3765,_0x16823e)=>_0xe3765 in _0x52b464?se(_0x52b464,_0xe3765,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x16823e}):_0x52b464[_0xe3765]=_0x16823e,ie=(_0x4e4a7b,_0x2b3292,_0x279b7e,_0x17da8b)=>{const _0x5033c9=_0x5ce6d6;for(var _0x462096=_0x17da8b>0x1?void 0x0:_0x17da8b?oe(_0x2b3292,_0x279b7e):_0x2b3292,_0x13038f=_0x4e4a7b[_0x5033c9(0x230)]-0x1,_0x210846;_0x13038f>=0x0;_0x13038f--)(_0x210846=_0x4e4a7b[_0x13038f])&&(_0x462096=_0x210846(_0x462096)||_0x462096);return _0x462096;},w=(_0x7dbc30,_0xe65d37)=>(_0x3c77ad,_0x4d0406)=>_0xe65d37(_0x3c77ad,_0x4d0406,_0x7dbc30),$=(_0x148cf4,_0x593ec9,_0x2f25ff)=>ne(_0x148cf4,typeof _0x593ec9!=_0x5ce6d6(0x1ee)?_0x593ec9+'':_0x593ec9,_0x2f25ff);let b=class extends _0x44f14f{constructor(_0x37c2fb=M,_0x3f9375,_0x4ee275){const _0x11c783=_0x5ce6d6;super(),this['_config']=_0x37c2fb,this['_injector']=_0x3f9375,this['_configService']=_0x4ee275;const {..._0x245f63}=_0x842076({},M,this['_config']);this[_0x11c783(0x1f2)]['setConfig'](z,_0x245f63);}[_0x5ce6d6(0x1d8)](){const _0x20db4d=_0x5ce6d6;[[f],[g],[S]][_0x20db4d(0x1ce)](_0x2a3874=>{const _0x6781a9=_0x20db4d;this[_0x6781a9(0x20b)][_0x6781a9(0x205)](_0x2a3874);});}[_0x5ce6d6(0x20e)](){const _0x3fd414=_0x5ce6d6;this[_0x3fd414(0x20b)][_0x3fd414(0x223)](g),this['_injector']['get'](S);}};$(b,'pluginName',W),$(b,'type',_0x563e5b['UNIVER_UNKNOWN']),b=ie([_0x24198d(_0x310ccb,_0x554242,_0x12a870),w(0x1,_0x59ab9f(_0x10ffc5)),w(0x2,_0x143756)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x538291=_0x2055;(function(_0x2199bb,_0x488327){const _0x30ccad=_0x2055,_0x1a1a7d=_0x2199bb();while(!![]){try{const _0x3304a7=-parseInt(_0x30ccad(0x17b))/0x1*(parseInt(_0x30ccad(0x1bc))/0x2)+-parseInt(_0x30ccad(0x1a3))/0x3*(parseInt(_0x30ccad(0x190))/0x4)+parseInt(_0x30ccad(0x193))/0x5*(-parseInt(_0x30ccad(0x1d3))/0x6)+parseInt(_0x30ccad(0x1b4))/0x7+parseInt(_0x30ccad(0x1ac))/0x8*(parseInt(_0x30ccad(0x18d))/0x9)+parseInt(_0x30ccad(0x1c8))/0xa+parseInt(_0x30ccad(0x1b7))/0xb;if(_0x3304a7===_0x488327)break;else _0x1a1a7d['push'](_0x1a1a7d['shift']());}catch(_0x2f3a6d){_0x1a1a7d['push'](_0x1a1a7d['shift']());}}}(_0x3bcc,0x3de09));function _0x3bcc(){const _0x12b173=['threadId','27NRirsB','requireSession','post','7244kReAcO','_configService','deleteComment','638545uszlaG','ref','_init','setConfig','Reply','code','saveCommentToSnapshot','getMemberID','/edit','_config','users','replies','pipe','resolveComment','getCurrentUser','YYYY/MM/DD\x20HH:mm','48nSlLuC','forEach','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','_sessionService','_httpService','Edit','userID','resolved','90776JnFdmT','_threadCommentDataSourceService','/universer-api/user/list','_initDataSource','user','reply','UNRECOGNIZED','getOwnPropertyDescriptor','423822idlzCi','Solve','getUser','1772353zQEwug','syncUpdateMutationToColla','Solved','length','OpenOrReOpen','2IFKSXl','/universer-api/comment/unit/','symbol','createTimestamp','subscribe','_initUserSync','customRanges','comments','content','map','parse','comment','1895180fDURGT','updateComment','parentId','onReady','type','filter','addComment','unitId','pluginName','body','/delete','6IFrCvt','/solved','userId','delete','COMMENT','_injector','format','rangeId','get','stringify','payload','find','dataSource','commentUpdate$','values','35094YIGGGH','defineProperty','disposeWithMe','_userService','error','add','/add','root','getComment','thread-comment-data-source.config','_threadCommentModel','_commentService','rangeType','Add','Unknown','Delete','replyId'];_0x3bcc=function(){return _0x12b173;};return _0x3bcc();}function _0x2055(_0x1eba7f,_0x2c9c60){const _0x3bcc10=_0x3bcc();return _0x2055=function(_0x2055bc,_0x262525){_0x2055bc=_0x2055bc-0x173;let _0x3d2650=_0x3bcc10[_0x2055bc];return _0x3d2650;},_0x2055(_0x1eba7f,_0x2c9c60);}import{CommentService as _0x1c15ac,CollaborationSessionService as _0x190768,UniverCollaborationClientPlugin as _0x38e298}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x15d46a}from'@univerjs-pro/license';import{dayjs as _0x2fc50a,UserManagerService as _0x28089d,Inject as _0x329691,Injector as _0x516ead,Disposable as _0x3745f8,CustomRangeType as _0x29ac7f,UniverInstanceType as _0x369264,DependentOn as _0x322c5e,IConfigService as _0x387356,Plugin as _0x41684c,merge as _0x4b727e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x7ab6ad}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2ef6b5,IThreadCommentDataSourceService as _0x3a072d}from'@univerjs/thread-comment';import{bufferTime as _0x309254}from'rxjs';import{HTTPService as _0x3ec942}from'@univerjs/network';const W=_0x538291(0x1a5);var I=(_0xa56933=>(_0xa56933[_0xa56933[_0x538291(0x1bb)]=0x0]=_0x538291(0x1bb),_0xa56933[_0xa56933[_0x538291(0x1b9)]=0x1]=_0x538291(0x1b9),_0xa56933[_0xa56933[_0x538291(0x1b2)]=-0x1]=_0x538291(0x1b2),_0xa56933))(I||{}),v=(_0x41679c=>(_0x41679c[_0x41679c[_0x538291(0x189)]=0x0]=_0x538291(0x189),_0x41679c[_0x41679c['Add']=0x1]=_0x538291(0x188),_0x41679c[_0x41679c[_0x538291(0x197)]=0x2]='Reply',_0x41679c[_0x41679c[_0x538291(0x1a9)]=0x3]=_0x538291(0x1a9),_0x41679c[_0x41679c[_0x538291(0x18a)]=0x4]=_0x538291(0x18a),_0x41679c[_0x41679c['Solve']=0x5]=_0x538291(0x1b5),_0x41679c[_0x41679c['UNRECOGNIZED']=-0x1]=_0x538291(0x1b2),_0x41679c))(v||{});const D=_0x8d4208=>_0x2fc50a(new Date(+_0x8d4208))[_0x538291(0x1d9)](_0x538291(0x1a2)),B=async(_0xccda61,_0x34c742)=>{const _0x4e13ff=_0x538291,_0xb877de=_0xccda61[_0x4e13ff(0x174)](_0x28089d),_0x25ed45=_0xccda61[_0x4e13ff(0x174)](_0x3ec942);_0x34c742[_0x4e13ff(0x1a4)](_0x32d03c=>{const _0x4123bd=_0x4e13ff;_0xb877de[_0x4123bd(0x1b6)](_0x32d03c)&&_0x34c742[_0x4123bd(0x1d6)](_0x32d03c);}),_0x34c742['size']&&(await _0x25ed45['get'](_0x4e13ff(0x1ae),{'params':{'userIDs':[..._0x34c742]}}))[_0x4e13ff(0x1d1)][_0x4e13ff(0x19d)][_0x4e13ff(0x1a4)](_0x119ea5=>{_0x119ea5&&_0xb877de['addUser'](_0x119ea5);});};var K=Object[_0x538291(0x1b3)],V=(_0x455b9c,_0x5a6467,_0x1bdf95,_0x444213)=>{for(var _0x35c436=_0x444213>0x1?void 0x0:_0x444213?K(_0x5a6467,_0x1bdf95):_0x5a6467,_0x1b5b54=_0x455b9c['length']-0x1,_0x2962e5;_0x1b5b54>=0x0;_0x1b5b54--)(_0x2962e5=_0x455b9c[_0x1b5b54])&&(_0x35c436=_0x2962e5(_0x35c436)||_0x35c436);return _0x35c436;},p=(_0x2168e9,_0x5f506e)=>(_0x1f3b7d,_0x7841a1)=>_0x5f506e(_0x1f3b7d,_0x7841a1,_0x2168e9);let S=class extends _0x3745f8{constructor(_0x38a8c5,_0xb3cdad,_0x5890df,_0x1c2049){const _0x3b61a0=_0x538291;super(),this[_0x3b61a0(0x186)]=_0x38a8c5,this[_0x3b61a0(0x185)]=_0xb3cdad,this[_0x3b61a0(0x17e)]=_0x5890df,this[_0x3b61a0(0x1d8)]=_0x1c2049,this[_0x3b61a0(0x195)](),this[_0x3b61a0(0x1c1)]();}[_0x538291(0x1c1)](){const _0x5b1783=_0x538291;this[_0x5b1783(0x17d)](this[_0x5b1783(0x185)][_0x5b1783(0x179)][_0x5b1783(0x19f)](_0x309254(0x10))[_0x5b1783(0x1c0)](_0x226f61=>{const _0x17e890=_0x5b1783,_0x5c8fd1=new Set();_0x226f61[_0x17e890(0x1a4)](_0x3bf874=>{const _0x3948b1=_0x17e890;switch(_0x3bf874[_0x3948b1(0x1cc)]){case _0x3948b1(0x180):{const _0x5cad9e=_0x3bf874[_0x3948b1(0x176)]['personId'];_0x5c8fd1[_0x3948b1(0x180)](_0x5cad9e);break;}}}),B(this[_0x17e890(0x1d8)],_0x5c8fd1);}));}[_0x538291(0x195)](){const _0x173566=_0x538291;this[_0x173566(0x17d)](this[_0x173566(0x186)][_0x173566(0x179)]['subscribe'](async _0x3757a8=>{const _0x2a4326=_0x173566;var _0x1079f0,_0x513fcb,_0x399fd0,_0x1b41a4;const _0x261fc5=(_0x1079f0=this[_0x2a4326(0x185)]['getUnit'](_0x3757a8[_0x2a4326(0x1cf)])[_0x2a4326(0x177)](_0x52efdf=>_0x52efdf[_0x2a4326(0x18c)]===_0x3757a8['threadId']))==null?void 0x0:_0x1079f0[_0x2a4326(0x182)];if(!_0x261fc5)return;const {unitId:_0x49e7b2,subUnitId:_0x48f14f}=_0x261fc5;switch(_0x3757a8[_0x2a4326(0x1b0)]&&this[_0x2a4326(0x17e)]['addUser'](_0x3757a8['user']),_0x3757a8[_0x2a4326(0x1cc)]){case v[_0x2a4326(0x188)]:break;case v['Reply']:{this[_0x2a4326(0x185)][_0x2a4326(0x1ce)](_0x49e7b2,_0x48f14f,{'unitId':_0x49e7b2,'subUnitId':_0x48f14f,'ref':'','id':_0x3757a8[_0x2a4326(0x18b)],'dT':D(+_0x3757a8[_0x2a4326(0x1bf)]),'threadId':_0x3757a8[_0x2a4326(0x18c)],'personId':(_0x399fd0=(_0x513fcb=_0x3757a8[_0x2a4326(0x1b0)])==null?void 0x0:_0x513fcb[_0x2a4326(0x1aa)])!=null?_0x399fd0:_0x3757a8['userId'],'text':JSON[_0x2a4326(0x1c6)](_0x3757a8[_0x2a4326(0x1c4)]),'parentId':_0x261fc5['id']});break;}case v[_0x2a4326(0x18a)]:{const _0x307deb=this[_0x2a4326(0x185)][_0x2a4326(0x183)](_0x49e7b2,_0x48f14f,_0x3757a8[_0x2a4326(0x18b)]);_0x307deb&&_0x307deb[_0x2a4326(0x1ca)]&&this['_threadCommentModel'][_0x2a4326(0x192)](_0x49e7b2,_0x48f14f,_0x3757a8[_0x2a4326(0x18b)]);break;}case v[_0x2a4326(0x1a9)]:{this['_threadCommentModel']['updateComment'](_0x49e7b2,_0x48f14f,{'commentId':_0x3757a8[_0x2a4326(0x18b)],'text':JSON[_0x2a4326(0x1c6)](_0x3757a8[_0x2a4326(0x1c4)])});break;}case v[_0x2a4326(0x1b5)]:{const _0x2cdfcc=(_0x1b41a4=this[_0x2a4326(0x185)]['getUnit'](_0x3757a8[_0x2a4326(0x1cf)])[_0x2a4326(0x177)](_0x2b702f=>_0x2b702f[_0x2a4326(0x18c)]===_0x3757a8['threadId']))==null?void 0x0:_0x1b41a4[_0x2a4326(0x182)];_0x2cdfcc&&this[_0x2a4326(0x185)][_0x2a4326(0x1a0)](_0x49e7b2,_0x48f14f,_0x2cdfcc['id'],_0x3757a8[_0x2a4326(0x1a6)]===I[_0x2a4326(0x1b9)]);break;}}}));}};S=V([p(0x0,_0x329691(_0x1c15ac)),p(0x1,_0x329691(_0x2ef6b5)),p(0x2,_0x329691(_0x28089d)),p(0x3,_0x329691(_0x516ead))],S);const z=_0x538291(0x184),M={};var k=Object[_0x538291(0x1b3)],Q=(_0x1f2b4f,_0xff8fc8,_0x5a0dc2,_0x53a9f5)=>{const _0x2b98ba=_0x538291;for(var _0x3cb3d4=_0x53a9f5>0x1?void 0x0:_0x53a9f5?k(_0xff8fc8,_0x5a0dc2):_0xff8fc8,_0x301514=_0x1f2b4f[_0x2b98ba(0x1ba)]-0x1,_0x358680;_0x301514>=0x0;_0x301514--)(_0x358680=_0x1f2b4f[_0x301514])&&(_0x3cb3d4=_0x358680(_0x3cb3d4)||_0x3cb3d4);return _0x3cb3d4;},_=(_0x119234,_0xcaf1f8)=>(_0x51066f,_0x1df5fc)=>_0xcaf1f8(_0x51066f,_0x1df5fc,_0x119234);function X(_0x520b7b,_0x2672bc){const _0x551ea5=_0x538291,_0x15cf3a=_0x520b7b[_0x551ea5(0x19e)][0x0];return{..._0x2672bc,'id':_0x15cf3a[_0x551ea5(0x18b)],'resolved':_0x520b7b[_0x551ea5(0x1a6)]===0x1,'dT':D(_0x15cf3a['createTimestamp']),'personId':_0x15cf3a['userId'],'threadId':_0x15cf3a['threadId']};}function ee(_0x8d6b51,_0x3cc82a,_0x3f9fb2){const _0x8fc40a=_0x538291;var _0x53dce2,_0x1d1ac1;if(((_0x1d1ac1=(_0x53dce2=_0x8d6b51==null?void 0x0:_0x8d6b51[_0x8fc40a(0x19e)])==null?void 0x0:_0x53dce2[_0x8fc40a(0x1ba)])!=null?_0x1d1ac1:0x0)>0x0){const _0x5c8fe1=(_0xeed7d0,_0x325a62)=>({'id':_0xeed7d0[_0x8fc40a(0x18b)],'threadId':_0xeed7d0[_0x8fc40a(0x18c)],'dT':D(_0xeed7d0['createTimestamp']),'personId':_0xeed7d0[_0x8fc40a(0x1d5)],'resolved':_0x8d6b51[_0x8fc40a(0x1a6)]===I[_0x8fc40a(0x1b9)],'unitId':_0x3cc82a,'subUnitId':_0x3f9fb2,'text':JSON[_0x8fc40a(0x1c6)](_0xeed7d0[_0x8fc40a(0x1c4)]),'parentId':_0x325a62}),_0x897949=_0x5c8fe1(_0x8d6b51['replies'][0x0]);return{..._0x897949,'children':_0x8d6b51[_0x8fc40a(0x19e)]['slice'](0x1)[_0x8fc40a(0x1c5)](_0x36de77=>_0x5c8fe1(_0x36de77,_0x897949['id']))};}return null;}let f=class{constructor(_0x36d7d3,_0x236f7c,_0x2729ce,_0x307b9b){const _0x16593c=_0x538291;this[_0x16593c(0x1a8)]=_0x36d7d3,this[_0x16593c(0x17e)]=_0x236f7c,this[_0x16593c(0x1a7)]=_0x2729ce,this[_0x16593c(0x1d8)]=_0x307b9b;}async[_0x538291(0x1ce)](_0x9d1832){const _0x45c7d8=_0x538291;var _0x4e0ed1,_0x99d1f2;const {parentId:_0x21c98f,unitId:_0x1ad9ab,text:_0x3ba24f,threadId:_0x10bea4}=_0x9d1832,_0x1aa727=(_0x99d1f2=(_0x4e0ed1=_0x3ba24f['customRanges'])==null?void 0x0:_0x4e0ed1[_0x45c7d8(0x1cd)](_0x5c4fe1=>_0x5c4fe1['rangeType']===_0x29ac7f[_0x45c7d8(0x1d7)])[_0x45c7d8(0x1c5)](_0x23631a=>_0x23631a[_0x45c7d8(0x173)]))!=null?_0x99d1f2:[],_0x2eaa3a=JSON[_0x45c7d8(0x175)](_0x3ba24f),_0x41fe6b=(await this[_0x45c7d8(0x1a7)][_0x45c7d8(0x18e)](_0x1ad9ab))[_0x45c7d8(0x19a)]();if(_0x21c98f){const _0x484fa8={'memberId':_0x41fe6b,'unitId':_0x1ad9ab,'content':_0x2eaa3a,'mention':_0x1aa727,'threadId':_0x10bea4},_0x35b2e2=(await this[_0x45c7d8(0x1a8)][_0x45c7d8(0x18f)](_0x45c7d8(0x1bd)+_0x1ad9ab+'/reply',{'body':_0x484fa8}))[_0x45c7d8(0x1d1)][_0x45c7d8(0x1b1)];return{..._0x9d1832,'id':_0x35b2e2[_0x45c7d8(0x18b)],'dT':_0x2fc50a(+_0x35b2e2[_0x45c7d8(0x1bf)])[_0x45c7d8(0x1d9)](_0x45c7d8(0x1a2)),'personId':_0x35b2e2[_0x45c7d8(0x1d5)]};}else{const _0x34bbfd={'memberId':_0x41fe6b,'unitId':_0x1ad9ab,'content':_0x2eaa3a,'mention':_0x1aa727},_0x565a61=await this[_0x45c7d8(0x1a8)][_0x45c7d8(0x18f)](_0x45c7d8(0x1bd)+_0x1ad9ab+_0x45c7d8(0x181),{'body':_0x34bbfd});return X(_0x565a61['body'][_0x45c7d8(0x1c7)],_0x9d1832);}}async[_0x538291(0x1c9)](_0x58d82b){const _0x4577ab=_0x538291;var _0x11da9a,_0x3dd819;const {text:_0x5f5a75,unitId:_0x8b3d30}=_0x58d82b,_0x24030d=(_0x3dd819=(_0x11da9a=_0x5f5a75[_0x4577ab(0x1c2)])==null?void 0x0:_0x11da9a[_0x4577ab(0x1cd)](_0x44a8dd=>_0x44a8dd[_0x4577ab(0x187)]===_0x29ac7f[_0x4577ab(0x1d7)])['map'](_0x328309=>_0x328309[_0x4577ab(0x173)]))!=null?_0x3dd819:[],_0x19cb58=JSON[_0x4577ab(0x175)](_0x5f5a75),_0xf76dbd=_0x58d82b['threadId'],_0x2cabc9=_0x58d82b['id'],_0x38828a={'memberId':(await this[_0x4577ab(0x1a7)][_0x4577ab(0x18e)](_0x8b3d30))[_0x4577ab(0x19a)](),'unitId':_0x8b3d30,'threadId':_0xf76dbd,'mention':_0x24030d,'content':_0x19cb58,'replyId':_0x2cabc9},_0x1b206c=await this[_0x4577ab(0x1a8)][_0x4577ab(0x18f)](_0x4577ab(0x1bd)+_0x8b3d30+_0x4577ab(0x19b),{'body':_0x38828a});return!_0x1b206c['body'][_0x4577ab(0x17f)]||_0x1b206c[_0x4577ab(0x1d1)][_0x4577ab(0x17f)]['code']===0x1;}async[_0x538291(0x1a0)](_0x11ce62){const _0x1d8a7b=_0x538291,{unitId:_0x345cac}=_0x11ce62,_0x1a5921=_0x11ce62['threadId'],_0x22bb61={'memberId':this[_0x1d8a7b(0x17e)][_0x1d8a7b(0x1a1)]()[_0x1d8a7b(0x1aa)],'unitId':_0x345cac,'threadId':_0x1a5921,'solved':_0x11ce62[_0x1d8a7b(0x1ab)]?I[_0x1d8a7b(0x1b9)]:I['OpenOrReOpen']},_0x4eea7f=await this['_httpService'][_0x1d8a7b(0x18f)]('/universer-api/comment/unit/'+_0x345cac+_0x1d8a7b(0x1d4),{'body':_0x22bb61});return!_0x4eea7f[_0x1d8a7b(0x1d1)][_0x1d8a7b(0x17f)]||_0x4eea7f['body'][_0x1d8a7b(0x17f)]['code']===0x1;}async[_0x538291(0x192)](_0x468974,_0x529428,_0x2624b8,_0xe6714){const _0x42526d=_0x538291,_0x3f4001={'memberId':(await this[_0x42526d(0x1a7)][_0x42526d(0x18e)](_0x468974))[_0x42526d(0x19a)](),'threadId':_0x2624b8,'replyId':_0xe6714,'unitId':_0x468974},_0x3cb96d=await this[_0x42526d(0x1a8)][_0x42526d(0x18f)](_0x42526d(0x1bd)+_0x468974+_0x42526d(0x1d2),{'body':_0x3f4001});return!_0x3cb96d['body'][_0x42526d(0x17f)]||_0x3cb96d['body']['error'][_0x42526d(0x198)]===0x1;}async['listComments'](_0x48c972,_0x14d79c,_0x5cbcc4){const _0x513782=_0x538291,_0x3e9161={'unitId':_0x48c972,'threadId':_0x5cbcc4},_0x155762=await this['_httpService'][_0x513782(0x18f)](_0x513782(0x1bd)+_0x48c972+'/list',{'body':_0x3e9161}),_0x5791ea=_0x5cbcc4[_0x513782(0x1c5)](_0x5d076c=>ee(_0x155762[_0x513782(0x1d1)][_0x513782(0x1c3)][_0x5d076c],_0x48c972,_0x14d79c))['filter'](Boolean);return Object[_0x513782(0x17a)](_0x155762[_0x513782(0x1d1)][_0x513782(0x19d)])[_0x513782(0x1a4)](_0x3d79ab=>{const _0x2b7ee8=_0x513782;this[_0x2b7ee8(0x17e)]['addUser'](_0x3d79ab);}),_0x5791ea;}[_0x538291(0x199)](_0x1e5a2d){const _0x44e406=_0x538291;return{'id':_0x1e5a2d['id'],'threadId':_0x1e5a2d[_0x44e406(0x18c)],'ref':_0x1e5a2d[_0x44e406(0x194)]};}};f=Q([_(0x0,_0x329691(_0x3ec942)),_(0x1,_0x329691(_0x28089d)),_(0x2,_0x329691(_0x190768)),_(0x3,_0x329691(_0x516ead))],f);var re=Object[_0x538291(0x1b3)],te=(_0x8041a6,_0xb50ba1,_0x1249f5,_0x27a16f)=>{const _0x180695=_0x538291;for(var _0x5c1b68=_0x27a16f>0x1?void 0x0:_0x27a16f?re(_0xb50ba1,_0x1249f5):_0xb50ba1,_0x52f524=_0x8041a6[_0x180695(0x1ba)]-0x1,_0x2c29e6;_0x52f524>=0x0;_0x52f524--)(_0x2c29e6=_0x8041a6[_0x52f524])&&(_0x5c1b68=_0x2c29e6(_0x5c1b68)||_0x5c1b68);return _0x5c1b68;},N=(_0x3ca649,_0x55dcb7)=>(_0x351829,_0x4ea4a2)=>_0x55dcb7(_0x351829,_0x4ea4a2,_0x3ca649);let g=class extends _0x3745f8{constructor(_0x54dfb6,_0x894be5){const _0x18d696=_0x538291;super(),this[_0x18d696(0x1ad)]=_0x54dfb6,this['_threadCommentDataSource']=_0x894be5,this[_0x18d696(0x1af)]();}[_0x538291(0x1af)](){const _0x4e5d2f=_0x538291;this['_threadCommentDataSourceService'][_0x4e5d2f(0x178)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x4e5d2f(0x1b8)]=!0x1;}};g=te([N(0x0,_0x3a072d),N(0x1,_0x329691(f))],g);var se=Object[_0x538291(0x17c)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1270e6,_0x9d2c40,_0x4ee5b5)=>_0x9d2c40 in _0x1270e6?se(_0x1270e6,_0x9d2c40,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4ee5b5}):_0x1270e6[_0x9d2c40]=_0x4ee5b5,ie=(_0x48c929,_0x408c92,_0x137a77,_0x291fdc)=>{const _0x3383cd=_0x538291;for(var _0x572b0a=_0x291fdc>0x1?void 0x0:_0x291fdc?oe(_0x408c92,_0x137a77):_0x408c92,_0x4d7c1c=_0x48c929[_0x3383cd(0x1ba)]-0x1,_0x406a04;_0x4d7c1c>=0x0;_0x4d7c1c--)(_0x406a04=_0x48c929[_0x4d7c1c])&&(_0x572b0a=_0x406a04(_0x572b0a)||_0x572b0a);return _0x572b0a;},w=(_0x5d543c,_0x40fa1b)=>(_0x3950f9,_0x1040ef)=>_0x40fa1b(_0x3950f9,_0x1040ef,_0x5d543c),$=(_0xc4b4f4,_0x2d6c68,_0xa676de)=>ne(_0xc4b4f4,typeof _0x2d6c68!=_0x538291(0x1be)?_0x2d6c68+'':_0x2d6c68,_0xa676de);let b=class extends _0x41684c{constructor(_0x3e48fc=M,_0x32d75d,_0x31acf9){const _0x192ce9=_0x538291;super(),this['_config']=_0x3e48fc,this[_0x192ce9(0x1d8)]=_0x32d75d,this[_0x192ce9(0x191)]=_0x31acf9;const {..._0x3a9ee7}=_0x4b727e({},M,this[_0x192ce9(0x19c)]);this[_0x192ce9(0x191)][_0x192ce9(0x196)](z,_0x3a9ee7);}['onStarting'](){const _0x5318cd=_0x538291;[[f],[g],[S]][_0x5318cd(0x1a4)](_0x38800f=>{const _0x14054d=_0x5318cd;this[_0x14054d(0x1d8)]['add'](_0x38800f);});}[_0x538291(0x1cb)](){const _0x586434=_0x538291;this[_0x586434(0x1d8)][_0x586434(0x174)](g),this[_0x586434(0x1d8)][_0x586434(0x174)](S);}};$(b,_0x538291(0x1d0),W),$(b,'type',_0x369264['UNIVER_UNKNOWN']),b=ie([_0x322c5e(_0x7ab6ad,_0x38e298,_0x15d46a),w(0x1,_0x329691(_0x516ead)),w(0x2,_0x387356)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x5ce6d6=_0x1597;(function(_0x2e273f,_0x45ce0b){const _0x4abcd9=_0x1597,_0x194beb=_0x2e273f();while(!![]){try{const _0x22d439=parseInt(_0x4abcd9(0x1f8))/0x1+parseInt(_0x4abcd9(0x1d4))/0x2*(-parseInt(_0x4abcd9(0x1e7))/0x3)+parseInt(_0x4abcd9(0x201))/0x4*(parseInt(_0x4abcd9(0x209))/0x5)+parseInt(_0x4abcd9(0x1d9))/0x6*(-parseInt(_0x4abcd9(0x1cf))/0x7)+-parseInt(_0x4abcd9(0x1e2))/0x8*(-parseInt(_0x4abcd9(0x22e))/0x9)+parseInt(_0x4abcd9(0x212))/0xa+parseInt(_0x4abcd9(0x1e4))/0xb*(-parseInt(_0x4abcd9(0x1d1))/0xc);if(_0x22d439===_0x45ce0b)break;else _0x194beb['push'](_0x194beb['shift']());}catch(_0xd76287){_0x194beb['push'](_0x194beb['shift']());}}}(_0x188f,0xebd49));import{CommentService as _0xba2742,CollaborationSessionService as _0xfa68d,UniverCollaborationClientPlugin as _0x554242}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x12a870}from'@univerjs-pro/license';import{dayjs as _0x1e305e,UserManagerService as _0xd8758c,Inject as _0x59ab9f,Injector as _0x10ffc5,Disposable as _0x1f4696,CustomRangeType as _0x4a1339,UniverInstanceType as _0x563e5b,DependentOn as _0x24198d,IConfigService as _0x143756,Plugin as _0x44f14f,merge as _0x842076}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x310ccb}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x40f162,IThreadCommentDataSourceService as _0x173173}from'@univerjs/thread-comment';import{bufferTime as _0x121ead}from'rxjs';import{HTTPService as _0x1c0427}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5a0705=>(_0x5a0705[_0x5a0705['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x5a0705[_0x5a0705['Solved']=0x1]=_0x5ce6d6(0x1f4),_0x5a0705[_0x5a0705[_0x5ce6d6(0x20c)]=-0x1]='UNRECOGNIZED',_0x5a0705))(I||{}),v=(_0x57ac5c=>(_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x1df)]=0x0]=_0x5ce6d6(0x1df),_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x20f)]=0x1]='Add',_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x21e)]=0x2]='Reply',_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x1f5)]=0x3]='Edit',_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x1d6)]=0x4]=_0x5ce6d6(0x1d6),_0x57ac5c[_0x57ac5c['Solve']=0x5]=_0x5ce6d6(0x214),_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x20c)]=-0x1]=_0x5ce6d6(0x20c),_0x57ac5c))(v||{});const D=_0x17ebd0=>_0x1e305e(new Date(+_0x17ebd0))[_0x5ce6d6(0x1cb)](_0x5ce6d6(0x1fc)),B=async(_0x33b4e9,_0x299153)=>{const _0x3fa37b=_0x5ce6d6,_0x5e2f94=_0x33b4e9[_0x3fa37b(0x223)](_0xd8758c),_0x4df365=_0x33b4e9[_0x3fa37b(0x223)](_0x1c0427);_0x299153[_0x3fa37b(0x1ce)](_0x572127=>{const _0x551729=_0x3fa37b;_0x5e2f94[_0x551729(0x21d)](_0x572127)&&_0x299153[_0x551729(0x1f7)](_0x572127);}),_0x299153[_0x3fa37b(0x1cc)]&&(await _0x4df365[_0x3fa37b(0x223)](_0x3fa37b(0x1e5),{'params':{'userIDs':[..._0x299153]}}))['body'][_0x3fa37b(0x204)][_0x3fa37b(0x1ce)](_0x3e55c7=>{const _0x83124d=_0x3fa37b;_0x3e55c7&&_0x5e2f94[_0x83124d(0x1ed)](_0x3e55c7);});};function _0x1597(_0x172810,_0x5a72d4){const _0x188fc8=_0x188f();return _0x1597=function(_0x15970e,_0x163375){_0x15970e=_0x15970e-0x1c9;let _0x585507=_0x188fc8[_0x15970e];return _0x585507;},_0x1597(_0x172810,_0x5a72d4);}function _0x188f(){const _0x4a5a23=['Delete','personId','onStarting','30mPToDC','unitId','resolved','requireSession','stringify','getMemberID','Unknown','pipe','root','8ibGjNr','userID','1672ociPiT','/universer-api/user/list','rangeType','201SUmZnQ','values','_commentService','reply','deleteComment','_threadCommentDataSourceService','addUser','symbol','/delete','_threadCommentModel','getCurrentUser','_configService','code','Solved','Edit','getUnit','delete','101731RdPckX','thread-comment-data-source.config','_httpService','post','YYYY/MM/DD\x20HH:mm','content','map','_initUserSync','parse','56JGoHxW','rangeId','_threadCommentDataSource','users','add','_init','/edit','replyId','661865RAfyzB','payload','_injector','UNRECOGNIZED','userId','onReady','Add','COMMENT','resolveComment','12805250aXJCaY','_initDataSource','Solve','/add','find','_userService','subscribe','solved','type','createTimestamp','customRanges','getUser','Reply','updateComment','ref','user','commentUpdate$','get','comments','disposeWithMe','body','/list','/universer-api/comment/unit/','OpenOrReOpen','threadId','addComment','replies','error','232209socOrE','slice','length','listComments','/solved','format','size','_sessionService','forEach','1276723mDqbyE','parentId','41556vmdDap','getOwnPropertyDescriptor','filter','25582ixdgQe','comment'];_0x188f=function(){return _0x4a5a23;};return _0x188f();}var K=Object[_0x5ce6d6(0x1d2)],V=(_0xab3062,_0x5ab8a6,_0x3ba0ef,_0x486938)=>{const _0x2d552a=_0x5ce6d6;for(var _0x366c17=_0x486938>0x1?void 0x0:_0x486938?K(_0x5ab8a6,_0x3ba0ef):_0x5ab8a6,_0x2a83ae=_0xab3062[_0x2d552a(0x230)]-0x1,_0x5c99b1;_0x2a83ae>=0x0;_0x2a83ae--)(_0x5c99b1=_0xab3062[_0x2a83ae])&&(_0x366c17=_0x5c99b1(_0x366c17)||_0x366c17);return _0x366c17;},p=(_0xf602d,_0x41dd73)=>(_0x108466,_0x30866f)=>_0x41dd73(_0x108466,_0x30866f,_0xf602d);let S=class extends _0x1f4696{constructor(_0x4eaa14,_0x1c29b0,_0x8dd5fa,_0x8e33be){const _0x1ff891=_0x5ce6d6;super(),this[_0x1ff891(0x1e9)]=_0x4eaa14,this[_0x1ff891(0x1f0)]=_0x1c29b0,this[_0x1ff891(0x217)]=_0x8dd5fa,this[_0x1ff891(0x20b)]=_0x8e33be,this[_0x1ff891(0x206)](),this[_0x1ff891(0x1ff)]();}['_initUserSync'](){const _0xe619d7=_0x5ce6d6;this[_0xe619d7(0x225)](this[_0xe619d7(0x1f0)][_0xe619d7(0x222)][_0xe619d7(0x1e0)](_0x121ead(0x10))[_0xe619d7(0x218)](_0x39986d=>{const _0x3879a7=new Set();_0x39986d['forEach'](_0x40c67c=>{const _0x201624=_0x1597;switch(_0x40c67c[_0x201624(0x21a)]){case _0x201624(0x205):{const _0x1b823e=_0x40c67c[_0x201624(0x20a)][_0x201624(0x1d7)];_0x3879a7['add'](_0x1b823e);break;}}}),B(this['_injector'],_0x3879a7);}));}[_0x5ce6d6(0x206)](){const _0x250aac=_0x5ce6d6;this[_0x250aac(0x225)](this['_commentService'][_0x250aac(0x222)][_0x250aac(0x218)](async _0x51e0d2=>{const _0x146159=_0x250aac;var _0x48265d,_0x3d3959,_0x4e8934,_0x3f9895;const _0x52297d=(_0x48265d=this[_0x146159(0x1f0)][_0x146159(0x1f6)](_0x51e0d2[_0x146159(0x1da)])[_0x146159(0x216)](_0x35a6d4=>_0x35a6d4[_0x146159(0x22a)]===_0x51e0d2[_0x146159(0x22a)]))==null?void 0x0:_0x48265d[_0x146159(0x1e1)];if(!_0x52297d)return;const {unitId:_0x5a96e6,subUnitId:_0x191a44}=_0x52297d;switch(_0x51e0d2['user']&&this['_userService'][_0x146159(0x1ed)](_0x51e0d2['user']),_0x51e0d2[_0x146159(0x21a)]){case v[_0x146159(0x20f)]:break;case v['Reply']:{this[_0x146159(0x1f0)][_0x146159(0x22b)](_0x5a96e6,_0x191a44,{'unitId':_0x5a96e6,'subUnitId':_0x191a44,'ref':'','id':_0x51e0d2[_0x146159(0x208)],'dT':D(+_0x51e0d2[_0x146159(0x21b)]),'threadId':_0x51e0d2[_0x146159(0x22a)],'personId':(_0x4e8934=(_0x3d3959=_0x51e0d2[_0x146159(0x221)])==null?void 0x0:_0x3d3959[_0x146159(0x1e3)])!=null?_0x4e8934:_0x51e0d2[_0x146159(0x20d)],'text':JSON[_0x146159(0x200)](_0x51e0d2[_0x146159(0x1fd)]),'parentId':_0x52297d['id']});break;}case v[_0x146159(0x1d6)]:{const _0x5bb6fe=this[_0x146159(0x1f0)]['getComment'](_0x5a96e6,_0x191a44,_0x51e0d2['replyId']);_0x5bb6fe&&_0x5bb6fe[_0x146159(0x1d0)]&&this[_0x146159(0x1f0)][_0x146159(0x1eb)](_0x5a96e6,_0x191a44,_0x51e0d2[_0x146159(0x208)]);break;}case v[_0x146159(0x1f5)]:{this['_threadCommentModel'][_0x146159(0x21f)](_0x5a96e6,_0x191a44,{'commentId':_0x51e0d2[_0x146159(0x208)],'text':JSON[_0x146159(0x200)](_0x51e0d2['content'])});break;}case v[_0x146159(0x214)]:{const _0xa2fd2a=(_0x3f9895=this[_0x146159(0x1f0)]['getUnit'](_0x51e0d2[_0x146159(0x1da)])[_0x146159(0x216)](_0x5cee72=>_0x5cee72[_0x146159(0x22a)]===_0x51e0d2[_0x146159(0x22a)]))==null?void 0x0:_0x3f9895[_0x146159(0x1e1)];_0xa2fd2a&&this['_threadCommentModel'][_0x146159(0x211)](_0x5a96e6,_0x191a44,_0xa2fd2a['id'],_0x51e0d2[_0x146159(0x219)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x59ab9f(_0xba2742)),p(0x1,_0x59ab9f(_0x40f162)),p(0x2,_0x59ab9f(_0xd8758c)),p(0x3,_0x59ab9f(_0x10ffc5))],S);const z=_0x5ce6d6(0x1f9),M={};var k=Object[_0x5ce6d6(0x1d2)],Q=(_0x3f239e,_0x435dab,_0x6f681b,_0x1c5651)=>{for(var _0x1d8197=_0x1c5651>0x1?void 0x0:_0x1c5651?k(_0x435dab,_0x6f681b):_0x435dab,_0x2a028b=_0x3f239e['length']-0x1,_0x382de1;_0x2a028b>=0x0;_0x2a028b--)(_0x382de1=_0x3f239e[_0x2a028b])&&(_0x1d8197=_0x382de1(_0x1d8197)||_0x1d8197);return _0x1d8197;},_=(_0x303e88,_0x32b15e)=>(_0x4939a1,_0x5edf7e)=>_0x32b15e(_0x4939a1,_0x5edf7e,_0x303e88);function X(_0x1d2313,_0xccca9f){const _0x197498=_0x5ce6d6,_0x161e8e=_0x1d2313[_0x197498(0x22c)][0x0];return{..._0xccca9f,'id':_0x161e8e[_0x197498(0x208)],'resolved':_0x1d2313[_0x197498(0x219)]===0x1,'dT':D(_0x161e8e[_0x197498(0x21b)]),'personId':_0x161e8e[_0x197498(0x20d)],'threadId':_0x161e8e[_0x197498(0x22a)]};}function ee(_0x4ff60d,_0x46620e,_0x18e14c){const _0x415989=_0x5ce6d6;var _0x155a32,_0x414cbd;if(((_0x414cbd=(_0x155a32=_0x4ff60d==null?void 0x0:_0x4ff60d[_0x415989(0x22c)])==null?void 0x0:_0x155a32[_0x415989(0x230)])!=null?_0x414cbd:0x0)>0x0){const _0x5e098d=(_0x30813b,_0x5f084d)=>({'id':_0x30813b[_0x415989(0x208)],'threadId':_0x30813b[_0x415989(0x22a)],'dT':D(_0x30813b[_0x415989(0x21b)]),'personId':_0x30813b[_0x415989(0x20d)],'resolved':_0x4ff60d[_0x415989(0x219)]===I[_0x415989(0x1f4)],'unitId':_0x46620e,'subUnitId':_0x18e14c,'text':JSON[_0x415989(0x200)](_0x30813b[_0x415989(0x1fd)]),'parentId':_0x5f084d}),_0x280fc0=_0x5e098d(_0x4ff60d[_0x415989(0x22c)][0x0]);return{..._0x280fc0,'children':_0x4ff60d[_0x415989(0x22c)][_0x415989(0x22f)](0x1)[_0x415989(0x1fe)](_0x351487=>_0x5e098d(_0x351487,_0x280fc0['id']))};}return null;}let f=class{constructor(_0x3c1497,_0x4b0308,_0x22e2d3,_0x47136c){const _0x2482a4=_0x5ce6d6;this['_httpService']=_0x3c1497,this[_0x2482a4(0x217)]=_0x4b0308,this['_sessionService']=_0x22e2d3,this[_0x2482a4(0x20b)]=_0x47136c;}async[_0x5ce6d6(0x22b)](_0x458b20){const _0x555017=_0x5ce6d6;var _0x1352ba,_0x42d966;const {parentId:_0x59b18c,unitId:_0x4cd18a,text:_0x49b408,threadId:_0x236e79}=_0x458b20,_0xf3bfe0=(_0x42d966=(_0x1352ba=_0x49b408[_0x555017(0x21c)])==null?void 0x0:_0x1352ba[_0x555017(0x1d3)](_0x151e2b=>_0x151e2b['rangeType']===_0x4a1339[_0x555017(0x210)])[_0x555017(0x1fe)](_0x567ac3=>_0x567ac3['rangeId']))!=null?_0x42d966:[],_0x37cd69=JSON[_0x555017(0x1dd)](_0x49b408),_0xe61618=(await this['_sessionService'][_0x555017(0x1dc)](_0x4cd18a))['getMemberID']();if(_0x59b18c){const _0x48b68f={'memberId':_0xe61618,'unitId':_0x4cd18a,'content':_0x37cd69,'mention':_0xf3bfe0,'threadId':_0x236e79},_0x332c07=(await this[_0x555017(0x1fa)][_0x555017(0x1fb)](_0x555017(0x228)+_0x4cd18a+'/reply',{'body':_0x48b68f}))[_0x555017(0x226)][_0x555017(0x1ea)];return{..._0x458b20,'id':_0x332c07[_0x555017(0x208)],'dT':_0x1e305e(+_0x332c07[_0x555017(0x21b)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x332c07[_0x555017(0x20d)]};}else{const _0x95a326={'memberId':_0xe61618,'unitId':_0x4cd18a,'content':_0x37cd69,'mention':_0xf3bfe0},_0x70eb65=await this['_httpService']['post'](_0x555017(0x228)+_0x4cd18a+_0x555017(0x215),{'body':_0x95a326});return X(_0x70eb65[_0x555017(0x226)][_0x555017(0x1d5)],_0x458b20);}}async[_0x5ce6d6(0x21f)](_0x4bd245){const _0x51ffda=_0x5ce6d6;var _0x5ae242,_0x22018a;const {text:_0x61b9bf,unitId:_0x2c71de}=_0x4bd245,_0x5ec4a5=(_0x22018a=(_0x5ae242=_0x61b9bf[_0x51ffda(0x21c)])==null?void 0x0:_0x5ae242[_0x51ffda(0x1d3)](_0x25e8bb=>_0x25e8bb[_0x51ffda(0x1e6)]===_0x4a1339[_0x51ffda(0x210)])[_0x51ffda(0x1fe)](_0xc415cf=>_0xc415cf[_0x51ffda(0x202)]))!=null?_0x22018a:[],_0x1f9643=JSON['stringify'](_0x61b9bf),_0x2ea379=_0x4bd245['threadId'],_0x4a46ba=_0x4bd245['id'],_0x5d3db7={'memberId':(await this[_0x51ffda(0x1cd)][_0x51ffda(0x1dc)](_0x2c71de))['getMemberID'](),'unitId':_0x2c71de,'threadId':_0x2ea379,'mention':_0x5ec4a5,'content':_0x1f9643,'replyId':_0x4a46ba},_0x3926d6=await this[_0x51ffda(0x1fa)][_0x51ffda(0x1fb)](_0x51ffda(0x228)+_0x2c71de+_0x51ffda(0x207),{'body':_0x5d3db7});return!_0x3926d6['body'][_0x51ffda(0x22d)]||_0x3926d6[_0x51ffda(0x226)][_0x51ffda(0x22d)][_0x51ffda(0x1f3)]===0x1;}async['resolveComment'](_0x1a7b5c){const _0x931ba7=_0x5ce6d6,{unitId:_0x46f6d1}=_0x1a7b5c,_0x38ec30=_0x1a7b5c['threadId'],_0x52f6d7={'memberId':this[_0x931ba7(0x217)][_0x931ba7(0x1f1)]()[_0x931ba7(0x1e3)],'unitId':_0x46f6d1,'threadId':_0x38ec30,'solved':_0x1a7b5c[_0x931ba7(0x1db)]?I[_0x931ba7(0x1f4)]:I[_0x931ba7(0x229)]},_0x57c4ed=await this[_0x931ba7(0x1fa)][_0x931ba7(0x1fb)](_0x931ba7(0x228)+_0x46f6d1+_0x931ba7(0x1ca),{'body':_0x52f6d7});return!_0x57c4ed[_0x931ba7(0x226)][_0x931ba7(0x22d)]||_0x57c4ed[_0x931ba7(0x226)][_0x931ba7(0x22d)][_0x931ba7(0x1f3)]===0x1;}async[_0x5ce6d6(0x1eb)](_0x448ed6,_0x5696ce,_0x2cdda3,_0x59d13a){const _0x5689de=_0x5ce6d6,_0x3d6456={'memberId':(await this[_0x5689de(0x1cd)]['requireSession'](_0x448ed6))[_0x5689de(0x1de)](),'threadId':_0x2cdda3,'replyId':_0x59d13a,'unitId':_0x448ed6},_0x40a87a=await this[_0x5689de(0x1fa)][_0x5689de(0x1fb)](_0x5689de(0x228)+_0x448ed6+_0x5689de(0x1ef),{'body':_0x3d6456});return!_0x40a87a[_0x5689de(0x226)]['error']||_0x40a87a[_0x5689de(0x226)][_0x5689de(0x22d)][_0x5689de(0x1f3)]===0x1;}async[_0x5ce6d6(0x1c9)](_0x1d0da3,_0x59b865,_0x2e187f){const _0x30c1f0=_0x5ce6d6,_0x3f21b5={'unitId':_0x1d0da3,'threadId':_0x2e187f},_0x3b27d9=await this[_0x30c1f0(0x1fa)]['post'](_0x30c1f0(0x228)+_0x1d0da3+_0x30c1f0(0x227),{'body':_0x3f21b5}),_0x4dc3bf=_0x2e187f[_0x30c1f0(0x1fe)](_0xfa5e04=>ee(_0x3b27d9['body'][_0x30c1f0(0x224)][_0xfa5e04],_0x1d0da3,_0x59b865))[_0x30c1f0(0x1d3)](Boolean);return Object[_0x30c1f0(0x1e8)](_0x3b27d9[_0x30c1f0(0x226)][_0x30c1f0(0x204)])[_0x30c1f0(0x1ce)](_0x3667f4=>{const _0x3b7980=_0x30c1f0;this[_0x3b7980(0x217)][_0x3b7980(0x1ed)](_0x3667f4);}),_0x4dc3bf;}['saveCommentToSnapshot'](_0x465833){const _0x2abb6e=_0x5ce6d6;return{'id':_0x465833['id'],'threadId':_0x465833['threadId'],'ref':_0x465833[_0x2abb6e(0x220)]};}};f=Q([_(0x0,_0x59ab9f(_0x1c0427)),_(0x1,_0x59ab9f(_0xd8758c)),_(0x2,_0x59ab9f(_0xfa68d)),_(0x3,_0x59ab9f(_0x10ffc5))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x35d5e4,_0x5bb460,_0x1a8912,_0x31fd9f)=>{const _0x24fbd8=_0x5ce6d6;for(var _0x474c3e=_0x31fd9f>0x1?void 0x0:_0x31fd9f?re(_0x5bb460,_0x1a8912):_0x5bb460,_0x42d8c9=_0x35d5e4[_0x24fbd8(0x230)]-0x1,_0x172e81;_0x42d8c9>=0x0;_0x42d8c9--)(_0x172e81=_0x35d5e4[_0x42d8c9])&&(_0x474c3e=_0x172e81(_0x474c3e)||_0x474c3e);return _0x474c3e;},N=(_0x17080e,_0x45ed40)=>(_0x1d4dc1,_0x10515e)=>_0x45ed40(_0x1d4dc1,_0x10515e,_0x17080e);let g=class extends _0x1f4696{constructor(_0x33b52a,_0x481875){const _0x4cb860=_0x5ce6d6;super(),this[_0x4cb860(0x1ec)]=_0x33b52a,this[_0x4cb860(0x203)]=_0x481875,this['_initDataSource']();}[_0x5ce6d6(0x213)](){const _0x655a87=_0x5ce6d6;this[_0x655a87(0x1ec)]['dataSource']=this['_threadCommentDataSource'],this[_0x655a87(0x1ec)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x173173),N(0x1,_0x59ab9f(f))],g);var se=Object['defineProperty'],oe=Object[_0x5ce6d6(0x1d2)],ne=(_0x52b464,_0xe3765,_0x16823e)=>_0xe3765 in _0x52b464?se(_0x52b464,_0xe3765,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x16823e}):_0x52b464[_0xe3765]=_0x16823e,ie=(_0x4e4a7b,_0x2b3292,_0x279b7e,_0x17da8b)=>{const _0x5033c9=_0x5ce6d6;for(var _0x462096=_0x17da8b>0x1?void 0x0:_0x17da8b?oe(_0x2b3292,_0x279b7e):_0x2b3292,_0x13038f=_0x4e4a7b[_0x5033c9(0x230)]-0x1,_0x210846;_0x13038f>=0x0;_0x13038f--)(_0x210846=_0x4e4a7b[_0x13038f])&&(_0x462096=_0x210846(_0x462096)||_0x462096);return _0x462096;},w=(_0x7dbc30,_0xe65d37)=>(_0x3c77ad,_0x4d0406)=>_0xe65d37(_0x3c77ad,_0x4d0406,_0x7dbc30),$=(_0x148cf4,_0x593ec9,_0x2f25ff)=>ne(_0x148cf4,typeof _0x593ec9!=_0x5ce6d6(0x1ee)?_0x593ec9+'':_0x593ec9,_0x2f25ff);let b=class extends _0x44f14f{constructor(_0x37c2fb=M,_0x3f9375,_0x4ee275){const _0x11c783=_0x5ce6d6;super(),this['_config']=_0x37c2fb,this['_injector']=_0x3f9375,this['_configService']=_0x4ee275;const {..._0x245f63}=_0x842076({},M,this['_config']);this[_0x11c783(0x1f2)]['setConfig'](z,_0x245f63);}[_0x5ce6d6(0x1d8)](){const _0x20db4d=_0x5ce6d6;[[f],[g],[S]][_0x20db4d(0x1ce)](_0x2a3874=>{const _0x6781a9=_0x20db4d;this[_0x6781a9(0x20b)][_0x6781a9(0x205)](_0x2a3874);});}[_0x5ce6d6(0x20e)](){const _0x3fd414=_0x5ce6d6;this[_0x3fd414(0x20b)][_0x3fd414(0x223)](g),this['_injector']['get'](S);}};$(b,'pluginName',W),$(b,'type',_0x563e5b['UNIVER_UNKNOWN']),b=ie([_0x24198d(_0x310ccb,_0x554242,_0x12a870),w(0x1,_0x59ab9f(_0x10ffc5)),w(0x2,_0x143756)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x538291=_0x2055;(function(_0x2199bb,_0x488327){const _0x30ccad=_0x2055,_0x1a1a7d=_0x2199bb();while(!![]){try{const _0x3304a7=-parseInt(_0x30ccad(0x17b))/0x1*(parseInt(_0x30ccad(0x1bc))/0x2)+-parseInt(_0x30ccad(0x1a3))/0x3*(parseInt(_0x30ccad(0x190))/0x4)+parseInt(_0x30ccad(0x193))/0x5*(-parseInt(_0x30ccad(0x1d3))/0x6)+parseInt(_0x30ccad(0x1b4))/0x7+parseInt(_0x30ccad(0x1ac))/0x8*(parseInt(_0x30ccad(0x18d))/0x9)+parseInt(_0x30ccad(0x1c8))/0xa+parseInt(_0x30ccad(0x1b7))/0xb;if(_0x3304a7===_0x488327)break;else _0x1a1a7d['push'](_0x1a1a7d['shift']());}catch(_0x2f3a6d){_0x1a1a7d['push'](_0x1a1a7d['shift']());}}}(_0x3bcc,0x3de09));function _0x3bcc(){const _0x12b173=['threadId','27NRirsB','requireSession','post','7244kReAcO','_configService','deleteComment','638545uszlaG','ref','_init','setConfig','Reply','code','saveCommentToSnapshot','getMemberID','/edit','_config','users','replies','pipe','resolveComment','getCurrentUser','YYYY/MM/DD\x20HH:mm','48nSlLuC','forEach','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','_sessionService','_httpService','Edit','userID','resolved','90776JnFdmT','_threadCommentDataSourceService','/universer-api/user/list','_initDataSource','user','reply','UNRECOGNIZED','getOwnPropertyDescriptor','423822idlzCi','Solve','getUser','1772353zQEwug','syncUpdateMutationToColla','Solved','length','OpenOrReOpen','2IFKSXl','/universer-api/comment/unit/','symbol','createTimestamp','subscribe','_initUserSync','customRanges','comments','content','map','parse','comment','1895180fDURGT','updateComment','parentId','onReady','type','filter','addComment','unitId','pluginName','body','/delete','6IFrCvt','/solved','userId','delete','COMMENT','_injector','format','rangeId','get','stringify','payload','find','dataSource','commentUpdate$','values','35094YIGGGH','defineProperty','disposeWithMe','_userService','error','add','/add','root','getComment','thread-comment-data-source.config','_threadCommentModel','_commentService','rangeType','Add','Unknown','Delete','replyId'];_0x3bcc=function(){return _0x12b173;};return _0x3bcc();}function _0x2055(_0x1eba7f,_0x2c9c60){const _0x3bcc10=_0x3bcc();return _0x2055=function(_0x2055bc,_0x262525){_0x2055bc=_0x2055bc-0x173;let _0x3d2650=_0x3bcc10[_0x2055bc];return _0x3d2650;},_0x2055(_0x1eba7f,_0x2c9c60);}import{CommentService as _0x1c15ac,CollaborationSessionService as _0x190768,UniverCollaborationClientPlugin as _0x38e298}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x15d46a}from'@univerjs-pro/license';import{dayjs as _0x2fc50a,UserManagerService as _0x28089d,Inject as _0x329691,Injector as _0x516ead,Disposable as _0x3745f8,CustomRangeType as _0x29ac7f,UniverInstanceType as _0x369264,DependentOn as _0x322c5e,IConfigService as _0x387356,Plugin as _0x41684c,merge as _0x4b727e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x7ab6ad}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2ef6b5,IThreadCommentDataSourceService as _0x3a072d}from'@univerjs/thread-comment';import{bufferTime as _0x309254}from'rxjs';import{HTTPService as _0x3ec942}from'@univerjs/network';const W=_0x538291(0x1a5);var I=(_0xa56933=>(_0xa56933[_0xa56933[_0x538291(0x1bb)]=0x0]=_0x538291(0x1bb),_0xa56933[_0xa56933[_0x538291(0x1b9)]=0x1]=_0x538291(0x1b9),_0xa56933[_0xa56933[_0x538291(0x1b2)]=-0x1]=_0x538291(0x1b2),_0xa56933))(I||{}),v=(_0x41679c=>(_0x41679c[_0x41679c[_0x538291(0x189)]=0x0]=_0x538291(0x189),_0x41679c[_0x41679c['Add']=0x1]=_0x538291(0x188),_0x41679c[_0x41679c[_0x538291(0x197)]=0x2]='Reply',_0x41679c[_0x41679c[_0x538291(0x1a9)]=0x3]=_0x538291(0x1a9),_0x41679c[_0x41679c[_0x538291(0x18a)]=0x4]=_0x538291(0x18a),_0x41679c[_0x41679c['Solve']=0x5]=_0x538291(0x1b5),_0x41679c[_0x41679c['UNRECOGNIZED']=-0x1]=_0x538291(0x1b2),_0x41679c))(v||{});const D=_0x8d4208=>_0x2fc50a(new Date(+_0x8d4208))[_0x538291(0x1d9)](_0x538291(0x1a2)),B=async(_0xccda61,_0x34c742)=>{const _0x4e13ff=_0x538291,_0xb877de=_0xccda61[_0x4e13ff(0x174)](_0x28089d),_0x25ed45=_0xccda61[_0x4e13ff(0x174)](_0x3ec942);_0x34c742[_0x4e13ff(0x1a4)](_0x32d03c=>{const _0x4123bd=_0x4e13ff;_0xb877de[_0x4123bd(0x1b6)](_0x32d03c)&&_0x34c742[_0x4123bd(0x1d6)](_0x32d03c);}),_0x34c742['size']&&(await _0x25ed45['get'](_0x4e13ff(0x1ae),{'params':{'userIDs':[..._0x34c742]}}))[_0x4e13ff(0x1d1)][_0x4e13ff(0x19d)][_0x4e13ff(0x1a4)](_0x119ea5=>{_0x119ea5&&_0xb877de['addUser'](_0x119ea5);});};var K=Object[_0x538291(0x1b3)],V=(_0x455b9c,_0x5a6467,_0x1bdf95,_0x444213)=>{for(var _0x35c436=_0x444213>0x1?void 0x0:_0x444213?K(_0x5a6467,_0x1bdf95):_0x5a6467,_0x1b5b54=_0x455b9c['length']-0x1,_0x2962e5;_0x1b5b54>=0x0;_0x1b5b54--)(_0x2962e5=_0x455b9c[_0x1b5b54])&&(_0x35c436=_0x2962e5(_0x35c436)||_0x35c436);return _0x35c436;},p=(_0x2168e9,_0x5f506e)=>(_0x1f3b7d,_0x7841a1)=>_0x5f506e(_0x1f3b7d,_0x7841a1,_0x2168e9);let S=class extends _0x3745f8{constructor(_0x38a8c5,_0xb3cdad,_0x5890df,_0x1c2049){const _0x3b61a0=_0x538291;super(),this[_0x3b61a0(0x186)]=_0x38a8c5,this[_0x3b61a0(0x185)]=_0xb3cdad,this[_0x3b61a0(0x17e)]=_0x5890df,this[_0x3b61a0(0x1d8)]=_0x1c2049,this[_0x3b61a0(0x195)](),this[_0x3b61a0(0x1c1)]();}[_0x538291(0x1c1)](){const _0x5b1783=_0x538291;this[_0x5b1783(0x17d)](this[_0x5b1783(0x185)][_0x5b1783(0x179)][_0x5b1783(0x19f)](_0x309254(0x10))[_0x5b1783(0x1c0)](_0x226f61=>{const _0x17e890=_0x5b1783,_0x5c8fd1=new Set();_0x226f61[_0x17e890(0x1a4)](_0x3bf874=>{const _0x3948b1=_0x17e890;switch(_0x3bf874[_0x3948b1(0x1cc)]){case _0x3948b1(0x180):{const _0x5cad9e=_0x3bf874[_0x3948b1(0x176)]['personId'];_0x5c8fd1[_0x3948b1(0x180)](_0x5cad9e);break;}}}),B(this[_0x17e890(0x1d8)],_0x5c8fd1);}));}[_0x538291(0x195)](){const _0x173566=_0x538291;this[_0x173566(0x17d)](this[_0x173566(0x186)][_0x173566(0x179)]['subscribe'](async _0x3757a8=>{const _0x2a4326=_0x173566;var _0x1079f0,_0x513fcb,_0x399fd0,_0x1b41a4;const _0x261fc5=(_0x1079f0=this[_0x2a4326(0x185)]['getUnit'](_0x3757a8[_0x2a4326(0x1cf)])[_0x2a4326(0x177)](_0x52efdf=>_0x52efdf[_0x2a4326(0x18c)]===_0x3757a8['threadId']))==null?void 0x0:_0x1079f0[_0x2a4326(0x182)];if(!_0x261fc5)return;const {unitId:_0x49e7b2,subUnitId:_0x48f14f}=_0x261fc5;switch(_0x3757a8[_0x2a4326(0x1b0)]&&this[_0x2a4326(0x17e)]['addUser'](_0x3757a8['user']),_0x3757a8[_0x2a4326(0x1cc)]){case v[_0x2a4326(0x188)]:break;case v['Reply']:{this[_0x2a4326(0x185)][_0x2a4326(0x1ce)](_0x49e7b2,_0x48f14f,{'unitId':_0x49e7b2,'subUnitId':_0x48f14f,'ref':'','id':_0x3757a8[_0x2a4326(0x18b)],'dT':D(+_0x3757a8[_0x2a4326(0x1bf)]),'threadId':_0x3757a8[_0x2a4326(0x18c)],'personId':(_0x399fd0=(_0x513fcb=_0x3757a8[_0x2a4326(0x1b0)])==null?void 0x0:_0x513fcb[_0x2a4326(0x1aa)])!=null?_0x399fd0:_0x3757a8['userId'],'text':JSON[_0x2a4326(0x1c6)](_0x3757a8[_0x2a4326(0x1c4)]),'parentId':_0x261fc5['id']});break;}case v[_0x2a4326(0x18a)]:{const _0x307deb=this[_0x2a4326(0x185)][_0x2a4326(0x183)](_0x49e7b2,_0x48f14f,_0x3757a8[_0x2a4326(0x18b)]);_0x307deb&&_0x307deb[_0x2a4326(0x1ca)]&&this['_threadCommentModel'][_0x2a4326(0x192)](_0x49e7b2,_0x48f14f,_0x3757a8[_0x2a4326(0x18b)]);break;}case v[_0x2a4326(0x1a9)]:{this['_threadCommentModel']['updateComment'](_0x49e7b2,_0x48f14f,{'commentId':_0x3757a8[_0x2a4326(0x18b)],'text':JSON[_0x2a4326(0x1c6)](_0x3757a8[_0x2a4326(0x1c4)])});break;}case v[_0x2a4326(0x1b5)]:{const _0x2cdfcc=(_0x1b41a4=this[_0x2a4326(0x185)]['getUnit'](_0x3757a8[_0x2a4326(0x1cf)])[_0x2a4326(0x177)](_0x2b702f=>_0x2b702f[_0x2a4326(0x18c)]===_0x3757a8['threadId']))==null?void 0x0:_0x1b41a4[_0x2a4326(0x182)];_0x2cdfcc&&this[_0x2a4326(0x185)][_0x2a4326(0x1a0)](_0x49e7b2,_0x48f14f,_0x2cdfcc['id'],_0x3757a8[_0x2a4326(0x1a6)]===I[_0x2a4326(0x1b9)]);break;}}}));}};S=V([p(0x0,_0x329691(_0x1c15ac)),p(0x1,_0x329691(_0x2ef6b5)),p(0x2,_0x329691(_0x28089d)),p(0x3,_0x329691(_0x516ead))],S);const z=_0x538291(0x184),M={};var k=Object[_0x538291(0x1b3)],Q=(_0x1f2b4f,_0xff8fc8,_0x5a0dc2,_0x53a9f5)=>{const _0x2b98ba=_0x538291;for(var _0x3cb3d4=_0x53a9f5>0x1?void 0x0:_0x53a9f5?k(_0xff8fc8,_0x5a0dc2):_0xff8fc8,_0x301514=_0x1f2b4f[_0x2b98ba(0x1ba)]-0x1,_0x358680;_0x301514>=0x0;_0x301514--)(_0x358680=_0x1f2b4f[_0x301514])&&(_0x3cb3d4=_0x358680(_0x3cb3d4)||_0x3cb3d4);return _0x3cb3d4;},_=(_0x119234,_0xcaf1f8)=>(_0x51066f,_0x1df5fc)=>_0xcaf1f8(_0x51066f,_0x1df5fc,_0x119234);function X(_0x520b7b,_0x2672bc){const _0x551ea5=_0x538291,_0x15cf3a=_0x520b7b[_0x551ea5(0x19e)][0x0];return{..._0x2672bc,'id':_0x15cf3a[_0x551ea5(0x18b)],'resolved':_0x520b7b[_0x551ea5(0x1a6)]===0x1,'dT':D(_0x15cf3a['createTimestamp']),'personId':_0x15cf3a['userId'],'threadId':_0x15cf3a['threadId']};}function ee(_0x8d6b51,_0x3cc82a,_0x3f9fb2){const _0x8fc40a=_0x538291;var _0x53dce2,_0x1d1ac1;if(((_0x1d1ac1=(_0x53dce2=_0x8d6b51==null?void 0x0:_0x8d6b51[_0x8fc40a(0x19e)])==null?void 0x0:_0x53dce2[_0x8fc40a(0x1ba)])!=null?_0x1d1ac1:0x0)>0x0){const _0x5c8fe1=(_0xeed7d0,_0x325a62)=>({'id':_0xeed7d0[_0x8fc40a(0x18b)],'threadId':_0xeed7d0[_0x8fc40a(0x18c)],'dT':D(_0xeed7d0['createTimestamp']),'personId':_0xeed7d0[_0x8fc40a(0x1d5)],'resolved':_0x8d6b51[_0x8fc40a(0x1a6)]===I[_0x8fc40a(0x1b9)],'unitId':_0x3cc82a,'subUnitId':_0x3f9fb2,'text':JSON[_0x8fc40a(0x1c6)](_0xeed7d0[_0x8fc40a(0x1c4)]),'parentId':_0x325a62}),_0x897949=_0x5c8fe1(_0x8d6b51['replies'][0x0]);return{..._0x897949,'children':_0x8d6b51[_0x8fc40a(0x19e)]['slice'](0x1)[_0x8fc40a(0x1c5)](_0x36de77=>_0x5c8fe1(_0x36de77,_0x897949['id']))};}return null;}let f=class{constructor(_0x36d7d3,_0x236f7c,_0x2729ce,_0x307b9b){const _0x16593c=_0x538291;this[_0x16593c(0x1a8)]=_0x36d7d3,this[_0x16593c(0x17e)]=_0x236f7c,this[_0x16593c(0x1a7)]=_0x2729ce,this[_0x16593c(0x1d8)]=_0x307b9b;}async[_0x538291(0x1ce)](_0x9d1832){const _0x45c7d8=_0x538291;var _0x4e0ed1,_0x99d1f2;const {parentId:_0x21c98f,unitId:_0x1ad9ab,text:_0x3ba24f,threadId:_0x10bea4}=_0x9d1832,_0x1aa727=(_0x99d1f2=(_0x4e0ed1=_0x3ba24f['customRanges'])==null?void 0x0:_0x4e0ed1[_0x45c7d8(0x1cd)](_0x5c4fe1=>_0x5c4fe1['rangeType']===_0x29ac7f[_0x45c7d8(0x1d7)])[_0x45c7d8(0x1c5)](_0x23631a=>_0x23631a[_0x45c7d8(0x173)]))!=null?_0x99d1f2:[],_0x2eaa3a=JSON[_0x45c7d8(0x175)](_0x3ba24f),_0x41fe6b=(await this[_0x45c7d8(0x1a7)][_0x45c7d8(0x18e)](_0x1ad9ab))[_0x45c7d8(0x19a)]();if(_0x21c98f){const _0x484fa8={'memberId':_0x41fe6b,'unitId':_0x1ad9ab,'content':_0x2eaa3a,'mention':_0x1aa727,'threadId':_0x10bea4},_0x35b2e2=(await this[_0x45c7d8(0x1a8)][_0x45c7d8(0x18f)](_0x45c7d8(0x1bd)+_0x1ad9ab+'/reply',{'body':_0x484fa8}))[_0x45c7d8(0x1d1)][_0x45c7d8(0x1b1)];return{..._0x9d1832,'id':_0x35b2e2[_0x45c7d8(0x18b)],'dT':_0x2fc50a(+_0x35b2e2[_0x45c7d8(0x1bf)])[_0x45c7d8(0x1d9)](_0x45c7d8(0x1a2)),'personId':_0x35b2e2[_0x45c7d8(0x1d5)]};}else{const _0x34bbfd={'memberId':_0x41fe6b,'unitId':_0x1ad9ab,'content':_0x2eaa3a,'mention':_0x1aa727},_0x565a61=await this[_0x45c7d8(0x1a8)][_0x45c7d8(0x18f)](_0x45c7d8(0x1bd)+_0x1ad9ab+_0x45c7d8(0x181),{'body':_0x34bbfd});return X(_0x565a61['body'][_0x45c7d8(0x1c7)],_0x9d1832);}}async[_0x538291(0x1c9)](_0x58d82b){const _0x4577ab=_0x538291;var _0x11da9a,_0x3dd819;const {text:_0x5f5a75,unitId:_0x8b3d30}=_0x58d82b,_0x24030d=(_0x3dd819=(_0x11da9a=_0x5f5a75[_0x4577ab(0x1c2)])==null?void 0x0:_0x11da9a[_0x4577ab(0x1cd)](_0x44a8dd=>_0x44a8dd[_0x4577ab(0x187)]===_0x29ac7f[_0x4577ab(0x1d7)])['map'](_0x328309=>_0x328309[_0x4577ab(0x173)]))!=null?_0x3dd819:[],_0x19cb58=JSON[_0x4577ab(0x175)](_0x5f5a75),_0xf76dbd=_0x58d82b['threadId'],_0x2cabc9=_0x58d82b['id'],_0x38828a={'memberId':(await this[_0x4577ab(0x1a7)][_0x4577ab(0x18e)](_0x8b3d30))[_0x4577ab(0x19a)](),'unitId':_0x8b3d30,'threadId':_0xf76dbd,'mention':_0x24030d,'content':_0x19cb58,'replyId':_0x2cabc9},_0x1b206c=await this[_0x4577ab(0x1a8)][_0x4577ab(0x18f)](_0x4577ab(0x1bd)+_0x8b3d30+_0x4577ab(0x19b),{'body':_0x38828a});return!_0x1b206c['body'][_0x4577ab(0x17f)]||_0x1b206c[_0x4577ab(0x1d1)][_0x4577ab(0x17f)]['code']===0x1;}async[_0x538291(0x1a0)](_0x11ce62){const _0x1d8a7b=_0x538291,{unitId:_0x345cac}=_0x11ce62,_0x1a5921=_0x11ce62['threadId'],_0x22bb61={'memberId':this[_0x1d8a7b(0x17e)][_0x1d8a7b(0x1a1)]()[_0x1d8a7b(0x1aa)],'unitId':_0x345cac,'threadId':_0x1a5921,'solved':_0x11ce62[_0x1d8a7b(0x1ab)]?I[_0x1d8a7b(0x1b9)]:I['OpenOrReOpen']},_0x4eea7f=await this['_httpService'][_0x1d8a7b(0x18f)]('/universer-api/comment/unit/'+_0x345cac+_0x1d8a7b(0x1d4),{'body':_0x22bb61});return!_0x4eea7f[_0x1d8a7b(0x1d1)][_0x1d8a7b(0x17f)]||_0x4eea7f['body'][_0x1d8a7b(0x17f)]['code']===0x1;}async[_0x538291(0x192)](_0x468974,_0x529428,_0x2624b8,_0xe6714){const _0x42526d=_0x538291,_0x3f4001={'memberId':(await this[_0x42526d(0x1a7)][_0x42526d(0x18e)](_0x468974))[_0x42526d(0x19a)](),'threadId':_0x2624b8,'replyId':_0xe6714,'unitId':_0x468974},_0x3cb96d=await this[_0x42526d(0x1a8)][_0x42526d(0x18f)](_0x42526d(0x1bd)+_0x468974+_0x42526d(0x1d2),{'body':_0x3f4001});return!_0x3cb96d['body'][_0x42526d(0x17f)]||_0x3cb96d['body']['error'][_0x42526d(0x198)]===0x1;}async['listComments'](_0x48c972,_0x14d79c,_0x5cbcc4){const _0x513782=_0x538291,_0x3e9161={'unitId':_0x48c972,'threadId':_0x5cbcc4},_0x155762=await this['_httpService'][_0x513782(0x18f)](_0x513782(0x1bd)+_0x48c972+'/list',{'body':_0x3e9161}),_0x5791ea=_0x5cbcc4[_0x513782(0x1c5)](_0x5d076c=>ee(_0x155762[_0x513782(0x1d1)][_0x513782(0x1c3)][_0x5d076c],_0x48c972,_0x14d79c))['filter'](Boolean);return Object[_0x513782(0x17a)](_0x155762[_0x513782(0x1d1)][_0x513782(0x19d)])[_0x513782(0x1a4)](_0x3d79ab=>{const _0x2b7ee8=_0x513782;this[_0x2b7ee8(0x17e)]['addUser'](_0x3d79ab);}),_0x5791ea;}[_0x538291(0x199)](_0x1e5a2d){const _0x44e406=_0x538291;return{'id':_0x1e5a2d['id'],'threadId':_0x1e5a2d[_0x44e406(0x18c)],'ref':_0x1e5a2d[_0x44e406(0x194)]};}};f=Q([_(0x0,_0x329691(_0x3ec942)),_(0x1,_0x329691(_0x28089d)),_(0x2,_0x329691(_0x190768)),_(0x3,_0x329691(_0x516ead))],f);var re=Object[_0x538291(0x1b3)],te=(_0x8041a6,_0xb50ba1,_0x1249f5,_0x27a16f)=>{const _0x180695=_0x538291;for(var _0x5c1b68=_0x27a16f>0x1?void 0x0:_0x27a16f?re(_0xb50ba1,_0x1249f5):_0xb50ba1,_0x52f524=_0x8041a6[_0x180695(0x1ba)]-0x1,_0x2c29e6;_0x52f524>=0x0;_0x52f524--)(_0x2c29e6=_0x8041a6[_0x52f524])&&(_0x5c1b68=_0x2c29e6(_0x5c1b68)||_0x5c1b68);return _0x5c1b68;},N=(_0x3ca649,_0x55dcb7)=>(_0x351829,_0x4ea4a2)=>_0x55dcb7(_0x351829,_0x4ea4a2,_0x3ca649);let g=class extends _0x3745f8{constructor(_0x54dfb6,_0x894be5){const _0x18d696=_0x538291;super(),this[_0x18d696(0x1ad)]=_0x54dfb6,this['_threadCommentDataSource']=_0x894be5,this[_0x18d696(0x1af)]();}[_0x538291(0x1af)](){const _0x4e5d2f=_0x538291;this['_threadCommentDataSourceService'][_0x4e5d2f(0x178)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x4e5d2f(0x1b8)]=!0x1;}};g=te([N(0x0,_0x3a072d),N(0x1,_0x329691(f))],g);var se=Object[_0x538291(0x17c)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1270e6,_0x9d2c40,_0x4ee5b5)=>_0x9d2c40 in _0x1270e6?se(_0x1270e6,_0x9d2c40,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4ee5b5}):_0x1270e6[_0x9d2c40]=_0x4ee5b5,ie=(_0x48c929,_0x408c92,_0x137a77,_0x291fdc)=>{const _0x3383cd=_0x538291;for(var _0x572b0a=_0x291fdc>0x1?void 0x0:_0x291fdc?oe(_0x408c92,_0x137a77):_0x408c92,_0x4d7c1c=_0x48c929[_0x3383cd(0x1ba)]-0x1,_0x406a04;_0x4d7c1c>=0x0;_0x4d7c1c--)(_0x406a04=_0x48c929[_0x4d7c1c])&&(_0x572b0a=_0x406a04(_0x572b0a)||_0x572b0a);return _0x572b0a;},w=(_0x5d543c,_0x40fa1b)=>(_0x3950f9,_0x1040ef)=>_0x40fa1b(_0x3950f9,_0x1040ef,_0x5d543c),$=(_0xc4b4f4,_0x2d6c68,_0xa676de)=>ne(_0xc4b4f4,typeof _0x2d6c68!=_0x538291(0x1be)?_0x2d6c68+'':_0x2d6c68,_0xa676de);let b=class extends _0x41684c{constructor(_0x3e48fc=M,_0x32d75d,_0x31acf9){const _0x192ce9=_0x538291;super(),this['_config']=_0x3e48fc,this[_0x192ce9(0x1d8)]=_0x32d75d,this[_0x192ce9(0x191)]=_0x31acf9;const {..._0x3a9ee7}=_0x4b727e({},M,this[_0x192ce9(0x19c)]);this[_0x192ce9(0x191)][_0x192ce9(0x196)](z,_0x3a9ee7);}['onStarting'](){const _0x5318cd=_0x538291;[[f],[g],[S]][_0x5318cd(0x1a4)](_0x38800f=>{const _0x14054d=_0x5318cd;this[_0x14054d(0x1d8)]['add'](_0x38800f);});}[_0x538291(0x1cb)](){const _0x586434=_0x538291;this[_0x586434(0x1d8)][_0x586434(0x174)](g),this[_0x586434(0x1d8)][_0x586434(0x174)](S);}};$(b,_0x538291(0x1d0),W),$(b,'type',_0x369264['UNIVER_UNKNOWN']),b=ie([_0x322c5e(_0x7ab6ad,_0x38e298,_0x15d46a),w(0x1,_0x329691(_0x516ead)),w(0x2,_0x387356)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0xe027(){const _0x138747=['subscribe','Injector','Edit','type','payload','69160NHmLBv','Disposable','parentId','getComment','filter','saveCommentToSnapshot','Solved','Add','3943926ZeYDZf','/list','disposeWithMe','_userService','ThreadCommentModel','21630sgBnnQ','object','merge','UniverThreadCommentDataSourcePlugin','895815rMfFma','UniverProCollaborationClient','format','_config','UniverCore','addUser','listComments','thread-comment-data-source.config','UniverInstanceType','@univerjs/thread-comment-ui','rxjs','CommentService','UserManagerService','defineProperty','stringify','find','Solve','getMemberID','3DGdyzg','slice','_init','2214vEaMjU','delete','Delete','_threadCommentModel','userID','content','pipe','function','customRanges','UniverNetwork','getUnit','size','users','_injector','_initUserSync','679mQdgZR','getUser','comments','rangeType','@univerjs-pro/license','_threadCommentDataSource','bufferTime','_threadCommentDataSourceService','pluginName','replyId','requireSession','map','forEach','userId','@univerjs-pro/collaboration-client','get','/delete','add','IThreadCommentDataSourceService','IConfigService','syncUpdateMutationToColla','Unknown','/add','replies','UniverProThreadCommentDatasource','addComment','UniverThreadCommentUIPlugin','ref','rangeId','UniverCollaborationClientPlugin','symbol','UniverProLicense','_configService','205FGjebG','values','Reply','UNRECOGNIZED','@univerjs/network','/universer-api/comment/unit/','getCurrentUser','updateComment','deleteComment','28083484ykCfQG','setConfig','getOwnPropertyDescriptor','_initDataSource','2182866ouYduq','onReady','unitId','_httpService','Plugin','solved','reply','onStarting','error','@univerjs/core','personId','resolveComment','code','createTimestamp','user','commentUpdate$','@univerjs/thread-comment','post','amd','UNIVER_UNKNOWN','dayjs','Inject','parse','length','CustomRangeType','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','OpenOrReOpen','body','threadId','102412TKWSgi','_sessionService','COMMENT','dataSource','HTTPService','YYYY/MM/DD\x20HH:mm'];_0xe027=function(){return _0x138747;};return _0xe027();}function _0x52f8(_0x4fb342,_0x3373af){const _0xe0271f=_0xe027();return _0x52f8=function(_0x52f810,_0x3a4965){_0x52f810=_0x52f810-0x193;let _0x1864c6=_0xe0271f[_0x52f810];return _0x1864c6;},_0x52f8(_0x4fb342,_0x3373af);}(function(_0x34023c,_0x5d7969){const _0x45813d=_0x52f8,_0x2b3c37=_0x34023c();while(!![]){try{const _0x19d742=parseInt(_0x45813d(0x1de))/0x1+-parseInt(_0x45813d(0x1a5))/0x2*(parseInt(_0x45813d(0x1f0))/0x3)+-parseInt(_0x45813d(0x1c2))/0x4*(parseInt(_0x45813d(0x198))/0x5)+parseInt(_0x45813d(0x1d5))/0x6+-parseInt(_0x45813d(0x202))/0x7*(parseInt(_0x45813d(0x1cd))/0x8)+parseInt(_0x45813d(0x1f3))/0x9*(-parseInt(_0x45813d(0x1da))/0xa)+parseInt(_0x45813d(0x1a1))/0xb;if(_0x19d742===_0x5d7969)break;else _0x2b3c37['push'](_0x2b3c37['shift']());}catch(_0x26457a){_0x2b3c37['push'](_0x2b3c37['shift']());}}}(_0xe027,0x911b9),function(_0x2201f2,_0xc7da50){const _0x3ad85e=_0x52f8;typeof exports==_0x3ad85e(0x1db)&&typeof module<'u'?_0xc7da50(exports,require(_0x3ad85e(0x210)),require(_0x3ad85e(0x206)),require(_0x3ad85e(0x1ae)),require(_0x3ad85e(0x1e7)),require(_0x3ad85e(0x1b5)),require(_0x3ad85e(0x1e8)),require('@univerjs/network')):typeof define==_0x3ad85e(0x1fa)&&define[_0x3ad85e(0x1b7)]?define(['exports',_0x3ad85e(0x210),'@univerjs-pro/license',_0x3ad85e(0x1ae),_0x3ad85e(0x1e7),_0x3ad85e(0x1b5),_0x3ad85e(0x1e8),_0x3ad85e(0x19c)],_0xc7da50):(_0x2201f2=typeof globalThis<'u'?globalThis:_0x2201f2||self,_0xc7da50(_0x2201f2[_0x3ad85e(0x21a)]={},_0x2201f2[_0x3ad85e(0x1df)],_0x2201f2[_0x3ad85e(0x196)],_0x2201f2[_0x3ad85e(0x1e2)],_0x2201f2['UniverThreadCommentUi'],_0x2201f2['UniverThreadComment'],_0x2201f2['rxjs'],_0x2201f2[_0x3ad85e(0x1fc)]));}(this,function(_0x548496,_0x426221,_0xc37522,_0x1c699f,_0x87d4ea,_0xcce1a5,_0x147dd4,_0x521ef0){'use strict';const _0x116d82=_0x52f8;const _0x456c38=_0x116d82(0x1be);var _0x16e3d0=(_0x1af785=>(_0x1af785[_0x1af785['OpenOrReOpen']=0x0]=_0x116d82(0x1bf),_0x1af785[_0x1af785[_0x116d82(0x1d3)]=0x1]=_0x116d82(0x1d3),_0x1af785[_0x1af785['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x1af785))(_0x16e3d0||{}),_0x348269=(_0x40fa4c=>(_0x40fa4c[_0x40fa4c[_0x116d82(0x217)]=0x0]=_0x116d82(0x217),_0x40fa4c[_0x40fa4c['Add']=0x1]='Add',_0x40fa4c[_0x40fa4c[_0x116d82(0x19a)]=0x2]=_0x116d82(0x19a),_0x40fa4c[_0x40fa4c[_0x116d82(0x1ca)]=0x3]=_0x116d82(0x1ca),_0x40fa4c[_0x40fa4c[_0x116d82(0x1f5)]=0x4]=_0x116d82(0x1f5),_0x40fa4c[_0x40fa4c[_0x116d82(0x1ee)]=0x5]=_0x116d82(0x1ee),_0x40fa4c[_0x40fa4c[_0x116d82(0x19b)]=-0x1]=_0x116d82(0x19b),_0x40fa4c))(_0x348269||{});const _0x408a58=_0xefb243=>_0x1c699f[_0x116d82(0x1b9)](new Date(+_0xefb243))[_0x116d82(0x1e0)](_0x116d82(0x1c7)),_0x5f3f61=async(_0x29757c,_0x51ac4f)=>{const _0x1fd6a9=_0x116d82,_0x1db48f=_0x29757c[_0x1fd6a9(0x211)](_0x1c699f[_0x1fd6a9(0x1ea)]),_0x44e7d9=_0x29757c[_0x1fd6a9(0x211)](_0x521ef0[_0x1fd6a9(0x1c6)]);_0x51ac4f[_0x1fd6a9(0x20e)](_0x13bcd1=>{const _0x3f6484=_0x1fd6a9;_0x1db48f[_0x3f6484(0x203)](_0x13bcd1)&&_0x51ac4f[_0x3f6484(0x1f4)](_0x13bcd1);}),_0x51ac4f[_0x1fd6a9(0x1fe)]&&(await _0x44e7d9[_0x1fd6a9(0x211)]('/universer-api/user/list',{'params':{'userIDs':[..._0x51ac4f]}}))[_0x1fd6a9(0x1c0)]['users'][_0x1fd6a9(0x20e)](_0x5995ac=>{const _0xac934b=_0x1fd6a9;_0x5995ac&&_0x1db48f[_0xac934b(0x1e3)](_0x5995ac);});};var _0x5a206a=Object[_0x116d82(0x1a3)],_0x263b60=(_0x1fbe0a,_0x20341b,_0x183666,_0x496ece)=>{const _0x215ec8=_0x116d82;for(var _0x5afa5c=_0x496ece>0x1?void 0x0:_0x496ece?_0x5a206a(_0x20341b,_0x183666):_0x20341b,_0x48930a=_0x1fbe0a[_0x215ec8(0x1bc)]-0x1,_0x7c05ae;_0x48930a>=0x0;_0x48930a--)(_0x7c05ae=_0x1fbe0a[_0x48930a])&&(_0x5afa5c=_0x7c05ae(_0x5afa5c)||_0x5afa5c);return _0x5afa5c;},_0x5ac075=(_0x4d4148,_0xe81b4f)=>(_0x3136a5,_0x402d2b)=>_0xe81b4f(_0x3136a5,_0x402d2b,_0x4d4148);let _0x102805=class extends _0x1c699f[_0x116d82(0x1ce)]{constructor(_0x2af3a4,_0x53477f,_0x43fccb,_0x1b79ec){const _0x2a5b53=_0x116d82;super(),this['_commentService']=_0x2af3a4,this['_threadCommentModel']=_0x53477f,this['_userService']=_0x43fccb,this['_injector']=_0x1b79ec,this['_init'](),this[_0x2a5b53(0x201)]();}[_0x116d82(0x201)](){const _0x23d098=_0x116d82;this[_0x23d098(0x1d7)](this[_0x23d098(0x1f6)][_0x23d098(0x1b4)][_0x23d098(0x1f9)](_0x147dd4[_0x23d098(0x208)](0x10))[_0x23d098(0x1c8)](_0x1a253c=>{const _0x478236=_0x23d098,_0x5a814b=new Set();_0x1a253c[_0x478236(0x20e)](_0x444204=>{const _0x506986=_0x478236;switch(_0x444204[_0x506986(0x1cb)]){case _0x506986(0x213):{const _0x1f411a=_0x444204[_0x506986(0x1cc)][_0x506986(0x1af)];_0x5a814b[_0x506986(0x213)](_0x1f411a);break;}}}),_0x5f3f61(this[_0x478236(0x200)],_0x5a814b);}));}[_0x116d82(0x1f2)](){const _0x391011=_0x116d82;this[_0x391011(0x1d7)](this['_commentService']['commentUpdate$'][_0x391011(0x1c8)](async _0x19c4ca=>{const _0x41dc1=_0x391011;var _0x346823,_0x4b0569,_0x1f78f3,_0x3998f8;const _0x44e72c=(_0x346823=this['_threadCommentModel']['getUnit'](_0x19c4ca[_0x41dc1(0x1a7)])[_0x41dc1(0x1ed)](_0x5ca515=>_0x5ca515['threadId']===_0x19c4ca['threadId']))==null?void 0x0:_0x346823['root'];if(!_0x44e72c)return;const {unitId:_0x2a8853,subUnitId:_0x6a997f}=_0x44e72c;switch(_0x19c4ca[_0x41dc1(0x1b3)]&&this[_0x41dc1(0x1d8)][_0x41dc1(0x1e3)](_0x19c4ca[_0x41dc1(0x1b3)]),_0x19c4ca['type']){case _0x348269[_0x41dc1(0x1d4)]:break;case _0x348269[_0x41dc1(0x19a)]:{this[_0x41dc1(0x1f6)][_0x41dc1(0x21b)](_0x2a8853,_0x6a997f,{'unitId':_0x2a8853,'subUnitId':_0x6a997f,'ref':'','id':_0x19c4ca['replyId'],'dT':_0x408a58(+_0x19c4ca['createTimestamp']),'threadId':_0x19c4ca['threadId'],'personId':(_0x1f78f3=(_0x4b0569=_0x19c4ca[_0x41dc1(0x1b3)])==null?void 0x0:_0x4b0569[_0x41dc1(0x1f7)])!=null?_0x1f78f3:_0x19c4ca[_0x41dc1(0x20f)],'text':JSON['parse'](_0x19c4ca[_0x41dc1(0x1f8)]),'parentId':_0x44e72c['id']});break;}case _0x348269[_0x41dc1(0x1f5)]:{const _0x190aac=this['_threadCommentModel'][_0x41dc1(0x1d0)](_0x2a8853,_0x6a997f,_0x19c4ca['replyId']);_0x190aac&&_0x190aac[_0x41dc1(0x1cf)]&&this[_0x41dc1(0x1f6)][_0x41dc1(0x1a0)](_0x2a8853,_0x6a997f,_0x19c4ca[_0x41dc1(0x20b)]);break;}case _0x348269[_0x41dc1(0x1ca)]:{this[_0x41dc1(0x1f6)][_0x41dc1(0x19f)](_0x2a8853,_0x6a997f,{'commentId':_0x19c4ca[_0x41dc1(0x20b)],'text':JSON[_0x41dc1(0x1bb)](_0x19c4ca[_0x41dc1(0x1f8)])});break;}case _0x348269[_0x41dc1(0x1ee)]:{const _0x159724=(_0x3998f8=this[_0x41dc1(0x1f6)][_0x41dc1(0x1fd)](_0x19c4ca[_0x41dc1(0x1a7)])[_0x41dc1(0x1ed)](_0x449aea=>_0x449aea['threadId']===_0x19c4ca[_0x41dc1(0x1c1)]))==null?void 0x0:_0x3998f8['root'];_0x159724&&this[_0x41dc1(0x1f6)][_0x41dc1(0x1b0)](_0x2a8853,_0x6a997f,_0x159724['id'],_0x19c4ca[_0x41dc1(0x1aa)]===_0x16e3d0[_0x41dc1(0x1d3)]);break;}}}));}};_0x102805=_0x263b60([_0x5ac075(0x0,_0x1c699f[_0x116d82(0x1ba)](_0x426221[_0x116d82(0x1e9)])),_0x5ac075(0x1,_0x1c699f[_0x116d82(0x1ba)](_0xcce1a5[_0x116d82(0x1d9)])),_0x5ac075(0x2,_0x1c699f[_0x116d82(0x1ba)](_0x1c699f['UserManagerService'])),_0x5ac075(0x3,_0x1c699f[_0x116d82(0x1ba)](_0x1c699f[_0x116d82(0x1c9)]))],_0x102805);const _0x1eab7f=_0x116d82(0x1e5),_0xabd489={};var _0x5efb10=Object[_0x116d82(0x1a3)],_0xfa0ff3=(_0x541205,_0xb650c7,_0x5217ee,_0x349ff1)=>{const _0x326edc=_0x116d82;for(var _0xd85ac8=_0x349ff1>0x1?void 0x0:_0x349ff1?_0x5efb10(_0xb650c7,_0x5217ee):_0xb650c7,_0x352ce5=_0x541205[_0x326edc(0x1bc)]-0x1,_0x41053f;_0x352ce5>=0x0;_0x352ce5--)(_0x41053f=_0x541205[_0x352ce5])&&(_0xd85ac8=_0x41053f(_0xd85ac8)||_0xd85ac8);return _0xd85ac8;},_0xbf8b5b=(_0x297a5a,_0x3d8234)=>(_0x220058,_0x20bdd1)=>_0x3d8234(_0x220058,_0x20bdd1,_0x297a5a);function _0x34bfe5(_0x397723,_0x2ca247){const _0x8af5c3=_0x116d82,_0x2f1581=_0x397723[_0x8af5c3(0x219)][0x0];return{..._0x2ca247,'id':_0x2f1581[_0x8af5c3(0x20b)],'resolved':_0x397723[_0x8af5c3(0x1aa)]===0x1,'dT':_0x408a58(_0x2f1581[_0x8af5c3(0x1b2)]),'personId':_0x2f1581[_0x8af5c3(0x20f)],'threadId':_0x2f1581[_0x8af5c3(0x1c1)]};}function _0x4959a2(_0x5e4d87,_0x667d5d,_0x347ea2){const _0x3833e5=_0x116d82;var _0x4fdeaa,_0x3bf4fd;if(((_0x3bf4fd=(_0x4fdeaa=_0x5e4d87==null?void 0x0:_0x5e4d87[_0x3833e5(0x219)])==null?void 0x0:_0x4fdeaa[_0x3833e5(0x1bc)])!=null?_0x3bf4fd:0x0)>0x0){const _0x135770=(_0x9a188f,_0x15afd1)=>({'id':_0x9a188f[_0x3833e5(0x20b)],'threadId':_0x9a188f[_0x3833e5(0x1c1)],'dT':_0x408a58(_0x9a188f[_0x3833e5(0x1b2)]),'personId':_0x9a188f[_0x3833e5(0x20f)],'resolved':_0x5e4d87[_0x3833e5(0x1aa)]===_0x16e3d0[_0x3833e5(0x1d3)],'unitId':_0x667d5d,'subUnitId':_0x347ea2,'text':JSON[_0x3833e5(0x1bb)](_0x9a188f[_0x3833e5(0x1f8)]),'parentId':_0x15afd1}),_0x18acc6=_0x135770(_0x5e4d87[_0x3833e5(0x219)][0x0]);return{..._0x18acc6,'children':_0x5e4d87[_0x3833e5(0x219)][_0x3833e5(0x1f1)](0x1)[_0x3833e5(0x20d)](_0x129fc7=>_0x135770(_0x129fc7,_0x18acc6['id']))};}return null;}let _0x54b91b=class{constructor(_0x39ca5e,_0x1b4b63,_0x3926d3,_0x270d69){const _0x563a4a=_0x116d82;this[_0x563a4a(0x1a8)]=_0x39ca5e,this['_userService']=_0x1b4b63,this['_sessionService']=_0x3926d3,this[_0x563a4a(0x200)]=_0x270d69;}async[_0x116d82(0x21b)](_0x1bb360){const _0x3335f9=_0x116d82;var _0x1c6047,_0x20e732;const {parentId:_0x815b70,unitId:_0x56d781,text:_0x430df3,threadId:_0x5c8fee}=_0x1bb360,_0x371683=(_0x20e732=(_0x1c6047=_0x430df3[_0x3335f9(0x1fb)])==null?void 0x0:_0x1c6047[_0x3335f9(0x1d1)](_0x52079e=>_0x52079e[_0x3335f9(0x205)]===_0x1c699f[_0x3335f9(0x1bd)][_0x3335f9(0x1c4)])['map'](_0x4e6abc=>_0x4e6abc[_0x3335f9(0x193)]))!=null?_0x20e732:[],_0x38020b=JSON[_0x3335f9(0x1ec)](_0x430df3),_0x38fdf9=(await this[_0x3335f9(0x1c3)][_0x3335f9(0x20c)](_0x56d781))[_0x3335f9(0x1ef)]();if(_0x815b70){const _0x27d942={'memberId':_0x38fdf9,'unitId':_0x56d781,'content':_0x38020b,'mention':_0x371683,'threadId':_0x5c8fee},_0x434cc8=(await this['_httpService'][_0x3335f9(0x1b6)](_0x3335f9(0x19d)+_0x56d781+'/reply',{'body':_0x27d942}))[_0x3335f9(0x1c0)][_0x3335f9(0x1ab)];return{..._0x1bb360,'id':_0x434cc8[_0x3335f9(0x20b)],'dT':_0x1c699f[_0x3335f9(0x1b9)](+_0x434cc8[_0x3335f9(0x1b2)])[_0x3335f9(0x1e0)](_0x3335f9(0x1c7)),'personId':_0x434cc8[_0x3335f9(0x20f)]};}else{const _0x59a8da={'memberId':_0x38fdf9,'unitId':_0x56d781,'content':_0x38020b,'mention':_0x371683},_0x115952=await this['_httpService']['post'](_0x3335f9(0x19d)+_0x56d781+_0x3335f9(0x218),{'body':_0x59a8da});return _0x34bfe5(_0x115952['body']['comment'],_0x1bb360);}}async[_0x116d82(0x19f)](_0x59a569){const _0xa48423=_0x116d82;var _0x4795e5,_0x52c03c;const {text:_0x5ee8d3,unitId:_0x501209}=_0x59a569,_0x57d47a=(_0x52c03c=(_0x4795e5=_0x5ee8d3[_0xa48423(0x1fb)])==null?void 0x0:_0x4795e5['filter'](_0x1f3a9e=>_0x1f3a9e['rangeType']===_0x1c699f[_0xa48423(0x1bd)][_0xa48423(0x1c4)])['map'](_0x4d951d=>_0x4d951d[_0xa48423(0x193)]))!=null?_0x52c03c:[],_0x218496=JSON[_0xa48423(0x1ec)](_0x5ee8d3),_0x3f1db1=_0x59a569[_0xa48423(0x1c1)],_0x51c8a6=_0x59a569['id'],_0xe17eb4={'memberId':(await this['_sessionService'][_0xa48423(0x20c)](_0x501209))['getMemberID'](),'unitId':_0x501209,'threadId':_0x3f1db1,'mention':_0x57d47a,'content':_0x218496,'replyId':_0x51c8a6},_0x12cdf2=await this[_0xa48423(0x1a8)]['post']('/universer-api/comment/unit/'+_0x501209+'/edit',{'body':_0xe17eb4});return!_0x12cdf2[_0xa48423(0x1c0)][_0xa48423(0x1ad)]||_0x12cdf2['body'][_0xa48423(0x1ad)][_0xa48423(0x1b1)]===0x1;}async[_0x116d82(0x1b0)](_0x5abe8c){const _0x421e78=_0x116d82,{unitId:_0x1b7e39}=_0x5abe8c,_0xdc4ff9=_0x5abe8c[_0x421e78(0x1c1)],_0x3e3335={'memberId':this[_0x421e78(0x1d8)][_0x421e78(0x19e)]()['userID'],'unitId':_0x1b7e39,'threadId':_0xdc4ff9,'solved':_0x5abe8c['resolved']?_0x16e3d0['Solved']:_0x16e3d0[_0x421e78(0x1bf)]},_0x10c454=await this['_httpService']['post'](_0x421e78(0x19d)+_0x1b7e39+'/solved',{'body':_0x3e3335});return!_0x10c454['body']['error']||_0x10c454[_0x421e78(0x1c0)][_0x421e78(0x1ad)][_0x421e78(0x1b1)]===0x1;}async[_0x116d82(0x1a0)](_0x33c73e,_0x568d76,_0x3ba347,_0x2be894){const _0x3b8567=_0x116d82,_0xf1e7d6={'memberId':(await this[_0x3b8567(0x1c3)][_0x3b8567(0x20c)](_0x33c73e))[_0x3b8567(0x1ef)](),'threadId':_0x3ba347,'replyId':_0x2be894,'unitId':_0x33c73e},_0x37b982=await this[_0x3b8567(0x1a8)][_0x3b8567(0x1b6)](_0x3b8567(0x19d)+_0x33c73e+_0x3b8567(0x212),{'body':_0xf1e7d6});return!_0x37b982[_0x3b8567(0x1c0)][_0x3b8567(0x1ad)]||_0x37b982[_0x3b8567(0x1c0)]['error'][_0x3b8567(0x1b1)]===0x1;}async[_0x116d82(0x1e4)](_0x5674b5,_0x5bf4f6,_0x4876f9){const _0x161065=_0x116d82,_0x369366={'unitId':_0x5674b5,'threadId':_0x4876f9},_0x9e8f68=await this['_httpService']['post'](_0x161065(0x19d)+_0x5674b5+_0x161065(0x1d6),{'body':_0x369366}),_0x16f77b=_0x4876f9['map'](_0x4e8962=>_0x4959a2(_0x9e8f68[_0x161065(0x1c0)][_0x161065(0x204)][_0x4e8962],_0x5674b5,_0x5bf4f6))[_0x161065(0x1d1)](Boolean);return Object[_0x161065(0x199)](_0x9e8f68[_0x161065(0x1c0)][_0x161065(0x1ff)])[_0x161065(0x20e)](_0x80d514=>{const _0x314f8c=_0x161065;this[_0x314f8c(0x1d8)][_0x314f8c(0x1e3)](_0x80d514);}),_0x16f77b;}[_0x116d82(0x1d2)](_0x5b7314){const _0x1de497=_0x116d82;return{'id':_0x5b7314['id'],'threadId':_0x5b7314[_0x1de497(0x1c1)],'ref':_0x5b7314[_0x1de497(0x21d)]};}};_0x54b91b=_0xfa0ff3([_0xbf8b5b(0x0,_0x1c699f[_0x116d82(0x1ba)](_0x521ef0[_0x116d82(0x1c6)])),_0xbf8b5b(0x1,_0x1c699f[_0x116d82(0x1ba)](_0x1c699f[_0x116d82(0x1ea)])),_0xbf8b5b(0x2,_0x1c699f['Inject'](_0x426221['CollaborationSessionService'])),_0xbf8b5b(0x3,_0x1c699f[_0x116d82(0x1ba)](_0x1c699f[_0x116d82(0x1c9)]))],_0x54b91b);var _0xd9f954=Object[_0x116d82(0x1a3)],_0x21f4e2=(_0xa6e4ec,_0x5291f7,_0x25411a,_0x450458)=>{const _0x37369d=_0x116d82;for(var _0x221026=_0x450458>0x1?void 0x0:_0x450458?_0xd9f954(_0x5291f7,_0x25411a):_0x5291f7,_0x510ae6=_0xa6e4ec[_0x37369d(0x1bc)]-0x1,_0x566447;_0x510ae6>=0x0;_0x510ae6--)(_0x566447=_0xa6e4ec[_0x510ae6])&&(_0x221026=_0x566447(_0x221026)||_0x221026);return _0x221026;},_0x4dc25a=(_0xcfdc0e,_0x17cc5f)=>(_0x312fd5,_0x4b2496)=>_0x17cc5f(_0x312fd5,_0x4b2496,_0xcfdc0e);let _0x161aae=class extends _0x1c699f['Disposable']{constructor(_0x24295c,_0x5c6753){const _0x12e491=_0x116d82;super(),this[_0x12e491(0x209)]=_0x24295c,this[_0x12e491(0x207)]=_0x5c6753,this[_0x12e491(0x1a4)]();}[_0x116d82(0x1a4)](){const _0x1866bc=_0x116d82;this[_0x1866bc(0x209)][_0x1866bc(0x1c5)]=this[_0x1866bc(0x207)],this['_threadCommentDataSourceService'][_0x1866bc(0x216)]=!0x1;}};_0x161aae=_0x21f4e2([_0x4dc25a(0x0,_0xcce1a5[_0x116d82(0x214)]),_0x4dc25a(0x1,_0x1c699f[_0x116d82(0x1ba)](_0x54b91b))],_0x161aae);var _0x100f6e=Object[_0x116d82(0x1eb)],_0x5ecccc=Object['getOwnPropertyDescriptor'],_0x32371c=(_0x402718,_0x4f0803,_0x24988d)=>_0x4f0803 in _0x402718?_0x100f6e(_0x402718,_0x4f0803,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x24988d}):_0x402718[_0x4f0803]=_0x24988d,_0x1434f9=(_0x274279,_0x414d9f,_0x50fe16,_0x4685d9)=>{const _0x17f876=_0x116d82;for(var _0x55c349=_0x4685d9>0x1?void 0x0:_0x4685d9?_0x5ecccc(_0x414d9f,_0x50fe16):_0x414d9f,_0x58e2b4=_0x274279[_0x17f876(0x1bc)]-0x1,_0x5406fb;_0x58e2b4>=0x0;_0x58e2b4--)(_0x5406fb=_0x274279[_0x58e2b4])&&(_0x55c349=_0x5406fb(_0x55c349)||_0x55c349);return _0x55c349;},_0x466e95=(_0x477af6,_0x5b002c)=>(_0x251b06,_0x4d247f)=>_0x5b002c(_0x251b06,_0x4d247f,_0x477af6),_0x3b8683=(_0x1cc1b5,_0x4a396d,_0x5395bb)=>_0x32371c(_0x1cc1b5,typeof _0x4a396d!=_0x116d82(0x195)?_0x4a396d+'':_0x4a396d,_0x5395bb);_0x548496[_0x116d82(0x1dd)]=class extends _0x1c699f[_0x116d82(0x1a9)]{constructor(_0xf5a0d3=_0xabd489,_0xd9fecd,_0x5137a5){const _0x13851d=_0x116d82;super(),this[_0x13851d(0x1e1)]=_0xf5a0d3,this[_0x13851d(0x200)]=_0xd9fecd,this[_0x13851d(0x197)]=_0x5137a5;const {..._0x20c592}=_0x1c699f[_0x13851d(0x1dc)]({},_0xabd489,this[_0x13851d(0x1e1)]);this['_configService'][_0x13851d(0x1a2)](_0x1eab7f,_0x20c592);}[_0x116d82(0x1ac)](){[[_0x54b91b],[_0x161aae],[_0x102805]]['forEach'](_0x3bf10f=>{const _0x3b6ba9=_0x52f8;this[_0x3b6ba9(0x200)]['add'](_0x3bf10f);});}[_0x116d82(0x1a6)](){const _0x4d73c6=_0x116d82;this[_0x4d73c6(0x200)][_0x4d73c6(0x211)](_0x161aae),this[_0x4d73c6(0x200)][_0x4d73c6(0x211)](_0x102805);}},_0x3b8683(_0x548496[_0x116d82(0x1dd)],_0x116d82(0x20a),_0x456c38),_0x3b8683(_0x548496[_0x116d82(0x1dd)],_0x116d82(0x1cb),_0x1c699f[_0x116d82(0x1e6)][_0x116d82(0x1b8)]),_0x548496['UniverThreadCommentDataSourcePlugin']=_0x1434f9([_0x1c699f['DependentOn'](_0x87d4ea[_0x116d82(0x21c)],_0x426221[_0x116d82(0x194)],_0xc37522['UniverLicensePlugin']),_0x466e95(0x1,_0x1c699f[_0x116d82(0x1ba)](_0x1c699f[_0x116d82(0x1c9)])),_0x466e95(0x2,_0x1c699f[_0x116d82(0x215)])],_0x548496[_0x116d82(0x1dd)]),Object['defineProperty'](_0x548496,Symbol['toStringTag'],{'value':'Module'});}));
1
+ function _0x511a(){const _0x2eba55=['pipe','type','HTTPService','949860XXOyLp','/add','UserManagerService','UniverNetwork','createTimestamp','UniverProLicense','subscribe','Unknown','filter','replyId','root','_init','personId','Injector','resolveComment','_initUserSync','customRanges','getMemberID','reply','addUser','object','_userService','map','UniverInstanceType','UniverLicensePlugin','@univerjs-pro/collaboration-client','65090xIopcw','_injector','_initDataSource','userId','user','/list','getOwnPropertyDescriptor','comments','error','_threadCommentDataSourceService','Add','24FwAfId','@univerjs/core','rangeId','Inject','parentId','rangeType','addComment','UniverThreadCommentUIPlugin','@univerjs/thread-comment-ui','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','comment','threadId','Disposable','dayjs','payload','220jMakYv','getCurrentUser','/delete','size','432452zbeWyL','rxjs','OpenOrReOpen','disposeWithMe','@univerjs/thread-comment','55786ZaqKdg','UniverCore','onReady','ThreadCommentModel','UniverProThreadCommentDatasource','bufferTime','replies','parse','pluginName','find','code','getUser','thread-comment-data-source.config','add','forEach','CollaborationSessionService','_httpService','Solve','content','UniverThreadComment','Solved','updateComment','toStringTag','YYYY/MM/DD\x20HH:mm','format','UniverProCollaborationClient','Reply','solved','post','CustomRangeType','get','_config','amd','6WLZLDw','24925JgrQxF','Edit','defineProperty','_threadCommentDataSource','requireSession','length','@univerjs/network','2677024HWWJfk','CommentService','deleteComment','resolved','unitId','88839KXsVVN','symbol','_configService','UNIVER_UNKNOWN','@univerjs-pro/license','saveCommentToSnapshot','commentUpdate$','4jsUhHz','/universer-api/comment/unit/','body','Plugin','values','UNRECOGNIZED','userID','UniverThreadCommentDataSourcePlugin','_threadCommentModel','getUnit','listComments','DependentOn','Delete','_sessionService'];_0x511a=function(){return _0x2eba55;};return _0x511a();}function _0x25fe(_0x20a59d,_0x5b0339){const _0x511aa1=_0x511a();return _0x25fe=function(_0x25fe7d,_0x4b795d){_0x25fe7d=_0x25fe7d-0xcf;let _0x348d34=_0x511aa1[_0x25fe7d];return _0x348d34;},_0x25fe(_0x20a59d,_0x5b0339);}(function(_0x4dfa07,_0x3536bc){const _0x5b59d7=_0x25fe,_0x417a86=_0x4dfa07();while(!![]){try{const _0x9b51e3=parseInt(_0x5b59d7(0x108))/0x1+parseInt(_0x5b59d7(0x103))/0x2+parseInt(_0x5b59d7(0x14e))/0x3*(-parseInt(_0x5b59d7(0x13d))/0x4)+-parseInt(_0x5b59d7(0x12a))/0x5*(-parseInt(_0x5b59d7(0x129))/0x6)+parseInt(_0x5b59d7(0x131))/0x7+parseInt(_0x5b59d7(0xef))/0x8*(parseInt(_0x5b59d7(0x136))/0x9)+parseInt(_0x5b59d7(0xe4))/0xa*(-parseInt(_0x5b59d7(0xff))/0xb);if(_0x9b51e3===_0x3536bc)break;else _0x417a86['push'](_0x417a86['shift']());}catch(_0x4da99a){_0x417a86['push'](_0x417a86['shift']());}}}(_0x511a,0x3b242),function(_0x4769a6,_0x3dbadd){const _0x2efb78=_0x25fe;typeof exports==_0x2efb78(0xde)&&typeof module<'u'?_0x3dbadd(exports,require(_0x2efb78(0xe3)),require(_0x2efb78(0x13a)),require(_0x2efb78(0xf0)),require('@univerjs/thread-comment-ui'),require(_0x2efb78(0x107)),require(_0x2efb78(0x104)),require(_0x2efb78(0x130))):typeof define=='function'&&define[_0x2efb78(0x128)]?define(['exports',_0x2efb78(0xe3),'@univerjs-pro/license',_0x2efb78(0xf0),_0x2efb78(0xf7),_0x2efb78(0x107),_0x2efb78(0x104),_0x2efb78(0x130)],_0x3dbadd):(_0x4769a6=typeof globalThis<'u'?globalThis:_0x4769a6||self,_0x3dbadd(_0x4769a6[_0x2efb78(0x10c)]={},_0x4769a6[_0x2efb78(0x121)],_0x4769a6[_0x2efb78(0xcf)],_0x4769a6[_0x2efb78(0x109)],_0x4769a6['UniverThreadCommentUi'],_0x4769a6[_0x2efb78(0x11b)],_0x4769a6[_0x2efb78(0x104)],_0x4769a6[_0x2efb78(0x151)]));}(this,function(_0x24f1da,_0x372d68,_0x538c50,_0x25b392,_0x584479,_0x55314c,_0x38d11b,_0x2c508c){'use strict';const _0x56ddbb=_0x25fe;const _0x2f69d9=_0x56ddbb(0xf9);var _0x3b34bb=(_0x5cfdd5=>(_0x5cfdd5[_0x5cfdd5[_0x56ddbb(0x105)]=0x0]=_0x56ddbb(0x105),_0x5cfdd5[_0x5cfdd5[_0x56ddbb(0x11c)]=0x1]='Solved',_0x5cfdd5[_0x5cfdd5[_0x56ddbb(0x142)]=-0x1]='UNRECOGNIZED',_0x5cfdd5))(_0x3b34bb||{}),_0x1cbc4d=(_0x531341=>(_0x531341[_0x531341['Unknown']=0x0]=_0x56ddbb(0xd1),_0x531341[_0x531341[_0x56ddbb(0xee)]=0x1]=_0x56ddbb(0xee),_0x531341[_0x531341['Reply']=0x2]=_0x56ddbb(0x122),_0x531341[_0x531341[_0x56ddbb(0x12b)]=0x3]='Edit',_0x531341[_0x531341[_0x56ddbb(0x149)]=0x4]=_0x56ddbb(0x149),_0x531341[_0x531341[_0x56ddbb(0x119)]=0x5]=_0x56ddbb(0x119),_0x531341[_0x531341[_0x56ddbb(0x142)]=-0x1]=_0x56ddbb(0x142),_0x531341))(_0x1cbc4d||{});const _0x57307f=_0x3b4753=>_0x25b392[_0x56ddbb(0xfd)](new Date(+_0x3b4753))[_0x56ddbb(0x120)](_0x56ddbb(0x11f)),_0x55fdee=async(_0x50cdd5,_0x57a998)=>{const _0x3e2144=_0x56ddbb,_0x11ad5b=_0x50cdd5[_0x3e2144(0x126)](_0x25b392[_0x3e2144(0x150)]),_0x5712a7=_0x50cdd5[_0x3e2144(0x126)](_0x2c508c[_0x3e2144(0x14d)]);_0x57a998[_0x3e2144(0x116)](_0x596c31=>{const _0x32b74c=_0x3e2144;_0x11ad5b[_0x32b74c(0x113)](_0x596c31)&&_0x57a998['delete'](_0x596c31);}),_0x57a998[_0x3e2144(0x102)]&&(await _0x5712a7[_0x3e2144(0x126)]('/universer-api/user/list',{'params':{'userIDs':[..._0x57a998]}}))[_0x3e2144(0x13f)][_0x3e2144(0xf8)][_0x3e2144(0x116)](_0x5e9be9=>{const _0x11a4cf=_0x3e2144;_0x5e9be9&&_0x11ad5b[_0x11a4cf(0xdd)](_0x5e9be9);});};var _0x4a3493=Object[_0x56ddbb(0xea)],_0x2a24ad=(_0x75b29c,_0x2b07e4,_0x19d179,_0x3b59b7)=>{const _0x1d07e5=_0x56ddbb;for(var _0x34b13f=_0x3b59b7>0x1?void 0x0:_0x3b59b7?_0x4a3493(_0x2b07e4,_0x19d179):_0x2b07e4,_0x40a5e3=_0x75b29c[_0x1d07e5(0x12f)]-0x1,_0x4ff5d5;_0x40a5e3>=0x0;_0x40a5e3--)(_0x4ff5d5=_0x75b29c[_0x40a5e3])&&(_0x34b13f=_0x4ff5d5(_0x34b13f)||_0x34b13f);return _0x34b13f;},_0x888b6e=(_0x2ef694,_0x3a8229)=>(_0x34a205,_0x5b1467)=>_0x3a8229(_0x34a205,_0x5b1467,_0x2ef694);let _0x523feb=class extends _0x25b392[_0x56ddbb(0xfc)]{constructor(_0x169549,_0x14a32e,_0x534b01,_0x5d3656){const _0x21c1d5=_0x56ddbb;super(),this['_commentService']=_0x169549,this[_0x21c1d5(0x145)]=_0x14a32e,this[_0x21c1d5(0xdf)]=_0x534b01,this['_injector']=_0x5d3656,this['_init'](),this['_initUserSync']();}[_0x56ddbb(0xd9)](){const _0x5648f4=_0x56ddbb;this[_0x5648f4(0x106)](this[_0x5648f4(0x145)][_0x5648f4(0x13c)][_0x5648f4(0x14b)](_0x38d11b[_0x5648f4(0x10d)](0x10))[_0x5648f4(0xd0)](_0x1a8d59=>{const _0x4db600=_0x5648f4,_0x2aa8cc=new Set();_0x1a8d59[_0x4db600(0x116)](_0x4c2ec6=>{const _0x2fe55f=_0x4db600;switch(_0x4c2ec6['type']){case _0x2fe55f(0x115):{const _0x45e685=_0x4c2ec6[_0x2fe55f(0xfe)][_0x2fe55f(0xd6)];_0x2aa8cc['add'](_0x45e685);break;}}}),_0x55fdee(this[_0x4db600(0xe5)],_0x2aa8cc);}));}[_0x56ddbb(0xd5)](){const _0x517243=_0x56ddbb;this[_0x517243(0x106)](this['_commentService'][_0x517243(0x13c)][_0x517243(0xd0)](async _0x1c57f9=>{const _0xf0b260=_0x517243;var _0x57dc73,_0x16bffd,_0x4106e9,_0x5a41b0;const _0x337c91=(_0x57dc73=this['_threadCommentModel'][_0xf0b260(0x146)](_0x1c57f9[_0xf0b260(0x135)])[_0xf0b260(0x111)](_0x425c52=>_0x425c52[_0xf0b260(0xfb)]===_0x1c57f9[_0xf0b260(0xfb)]))==null?void 0x0:_0x57dc73[_0xf0b260(0xd4)];if(!_0x337c91)return;const {unitId:_0x28ad31,subUnitId:_0xedaf5c}=_0x337c91;switch(_0x1c57f9[_0xf0b260(0xe8)]&&this[_0xf0b260(0xdf)][_0xf0b260(0xdd)](_0x1c57f9[_0xf0b260(0xe8)]),_0x1c57f9['type']){case _0x1cbc4d[_0xf0b260(0xee)]:break;case _0x1cbc4d[_0xf0b260(0x122)]:{this['_threadCommentModel'][_0xf0b260(0xf5)](_0x28ad31,_0xedaf5c,{'unitId':_0x28ad31,'subUnitId':_0xedaf5c,'ref':'','id':_0x1c57f9[_0xf0b260(0xd3)],'dT':_0x57307f(+_0x1c57f9[_0xf0b260(0x152)]),'threadId':_0x1c57f9[_0xf0b260(0xfb)],'personId':(_0x4106e9=(_0x16bffd=_0x1c57f9[_0xf0b260(0xe8)])==null?void 0x0:_0x16bffd[_0xf0b260(0x143)])!=null?_0x4106e9:_0x1c57f9['userId'],'text':JSON[_0xf0b260(0x10f)](_0x1c57f9['content']),'parentId':_0x337c91['id']});break;}case _0x1cbc4d[_0xf0b260(0x149)]:{const _0x498a8e=this[_0xf0b260(0x145)]['getComment'](_0x28ad31,_0xedaf5c,_0x1c57f9[_0xf0b260(0xd3)]);_0x498a8e&&_0x498a8e[_0xf0b260(0xf3)]&&this['_threadCommentModel'][_0xf0b260(0x133)](_0x28ad31,_0xedaf5c,_0x1c57f9[_0xf0b260(0xd3)]);break;}case _0x1cbc4d[_0xf0b260(0x12b)]:{this[_0xf0b260(0x145)][_0xf0b260(0x11d)](_0x28ad31,_0xedaf5c,{'commentId':_0x1c57f9['replyId'],'text':JSON[_0xf0b260(0x10f)](_0x1c57f9['content'])});break;}case _0x1cbc4d[_0xf0b260(0x119)]:{const _0x298bbf=(_0x5a41b0=this[_0xf0b260(0x145)][_0xf0b260(0x146)](_0x1c57f9['unitId'])[_0xf0b260(0x111)](_0x517e8f=>_0x517e8f['threadId']===_0x1c57f9[_0xf0b260(0xfb)]))==null?void 0x0:_0x5a41b0[_0xf0b260(0xd4)];_0x298bbf&&this[_0xf0b260(0x145)][_0xf0b260(0xd8)](_0x28ad31,_0xedaf5c,_0x298bbf['id'],_0x1c57f9['solved']===_0x3b34bb[_0xf0b260(0x11c)]);break;}}}));}};_0x523feb=_0x2a24ad([_0x888b6e(0x0,_0x25b392[_0x56ddbb(0xf2)](_0x372d68[_0x56ddbb(0x132)])),_0x888b6e(0x1,_0x25b392[_0x56ddbb(0xf2)](_0x55314c[_0x56ddbb(0x10b)])),_0x888b6e(0x2,_0x25b392[_0x56ddbb(0xf2)](_0x25b392[_0x56ddbb(0x150)])),_0x888b6e(0x3,_0x25b392['Inject'](_0x25b392[_0x56ddbb(0xd7)]))],_0x523feb);const _0x540751=_0x56ddbb(0x114),_0x5a9e16={};var _0x40ea32=Object[_0x56ddbb(0xea)],_0x5a21ec=(_0x5d39b4,_0x39afe8,_0x648e76,_0x52f972)=>{for(var _0x403c09=_0x52f972>0x1?void 0x0:_0x52f972?_0x40ea32(_0x39afe8,_0x648e76):_0x39afe8,_0x2dabeb=_0x5d39b4['length']-0x1,_0x34715b;_0x2dabeb>=0x0;_0x2dabeb--)(_0x34715b=_0x5d39b4[_0x2dabeb])&&(_0x403c09=_0x34715b(_0x403c09)||_0x403c09);return _0x403c09;},_0x380a4f=(_0x59822c,_0x5e270d)=>(_0x1895d7,_0x31c988)=>_0x5e270d(_0x1895d7,_0x31c988,_0x59822c);function _0x4a9c8f(_0x3fd72a,_0x14837c){const _0x67b6bc=_0x56ddbb,_0x285078=_0x3fd72a['replies'][0x0];return{..._0x14837c,'id':_0x285078['replyId'],'resolved':_0x3fd72a[_0x67b6bc(0x123)]===0x1,'dT':_0x57307f(_0x285078[_0x67b6bc(0x152)]),'personId':_0x285078['userId'],'threadId':_0x285078['threadId']};}function _0x1bf24b(_0x4b2b5b,_0x2ff0c8,_0xb6ca2f){const _0x1576d9=_0x56ddbb;var _0x56af50,_0xc5c06;if(((_0xc5c06=(_0x56af50=_0x4b2b5b==null?void 0x0:_0x4b2b5b[_0x1576d9(0x10e)])==null?void 0x0:_0x56af50[_0x1576d9(0x12f)])!=null?_0xc5c06:0x0)>0x0){const _0x597d35=(_0x24b955,_0x5ccd67)=>({'id':_0x24b955['replyId'],'threadId':_0x24b955[_0x1576d9(0xfb)],'dT':_0x57307f(_0x24b955[_0x1576d9(0x152)]),'personId':_0x24b955[_0x1576d9(0xe7)],'resolved':_0x4b2b5b['solved']===_0x3b34bb['Solved'],'unitId':_0x2ff0c8,'subUnitId':_0xb6ca2f,'text':JSON['parse'](_0x24b955[_0x1576d9(0x11a)]),'parentId':_0x5ccd67}),_0x385e7=_0x597d35(_0x4b2b5b[_0x1576d9(0x10e)][0x0]);return{..._0x385e7,'children':_0x4b2b5b[_0x1576d9(0x10e)]['slice'](0x1)[_0x1576d9(0xe0)](_0x2339ce=>_0x597d35(_0x2339ce,_0x385e7['id']))};}return null;}let _0x172675=class{constructor(_0x2ffed3,_0x4e17f8,_0x1647fb,_0x19dbe1){const _0x2407a7=_0x56ddbb;this['_httpService']=_0x2ffed3,this[_0x2407a7(0xdf)]=_0x4e17f8,this[_0x2407a7(0x14a)]=_0x1647fb,this[_0x2407a7(0xe5)]=_0x19dbe1;}async['addComment'](_0xbf7f76){const _0x4f6114=_0x56ddbb;var _0x741e17,_0x529af8;const {parentId:_0x40b7c1,unitId:_0x399dde,text:_0x2c9245,threadId:_0x1591f8}=_0xbf7f76,_0x5e97b3=(_0x529af8=(_0x741e17=_0x2c9245[_0x4f6114(0xda)])==null?void 0x0:_0x741e17[_0x4f6114(0xd2)](_0xf0a0b8=>_0xf0a0b8[_0x4f6114(0xf4)]===_0x25b392['CustomRangeType']['COMMENT'])[_0x4f6114(0xe0)](_0x4040b4=>_0x4040b4[_0x4f6114(0xf1)]))!=null?_0x529af8:[],_0x1ac260=JSON['stringify'](_0x2c9245),_0x11a18c=(await this[_0x4f6114(0x14a)][_0x4f6114(0x12e)](_0x399dde))['getMemberID']();if(_0x40b7c1){const _0x146ecc={'memberId':_0x11a18c,'unitId':_0x399dde,'content':_0x1ac260,'mention':_0x5e97b3,'threadId':_0x1591f8},_0x42f292=(await this[_0x4f6114(0x118)][_0x4f6114(0x124)](_0x4f6114(0x13e)+_0x399dde+'/reply',{'body':_0x146ecc}))[_0x4f6114(0x13f)][_0x4f6114(0xdc)];return{..._0xbf7f76,'id':_0x42f292[_0x4f6114(0xd3)],'dT':_0x25b392['dayjs'](+_0x42f292['createTimestamp'])['format'](_0x4f6114(0x11f)),'personId':_0x42f292[_0x4f6114(0xe7)]};}else{const _0x34b0c4={'memberId':_0x11a18c,'unitId':_0x399dde,'content':_0x1ac260,'mention':_0x5e97b3},_0x2008da=await this[_0x4f6114(0x118)][_0x4f6114(0x124)]('/universer-api/comment/unit/'+_0x399dde+_0x4f6114(0x14f),{'body':_0x34b0c4});return _0x4a9c8f(_0x2008da[_0x4f6114(0x13f)][_0x4f6114(0xfa)],_0xbf7f76);}}async[_0x56ddbb(0x11d)](_0x3bb57f){const _0x5acfa4=_0x56ddbb;var _0x2b7391,_0x243866;const {text:_0x4b18ae,unitId:_0x45659d}=_0x3bb57f,_0xa711b7=(_0x243866=(_0x2b7391=_0x4b18ae[_0x5acfa4(0xda)])==null?void 0x0:_0x2b7391[_0x5acfa4(0xd2)](_0x47ecbc=>_0x47ecbc[_0x5acfa4(0xf4)]===_0x25b392[_0x5acfa4(0x125)]['COMMENT'])['map'](_0x535f4e=>_0x535f4e[_0x5acfa4(0xf1)]))!=null?_0x243866:[],_0x575ffe=JSON['stringify'](_0x4b18ae),_0x1d1c6=_0x3bb57f[_0x5acfa4(0xfb)],_0x2a094b=_0x3bb57f['id'],_0x243e85={'memberId':(await this[_0x5acfa4(0x14a)][_0x5acfa4(0x12e)](_0x45659d))[_0x5acfa4(0xdb)](),'unitId':_0x45659d,'threadId':_0x1d1c6,'mention':_0xa711b7,'content':_0x575ffe,'replyId':_0x2a094b},_0x2abe19=await this[_0x5acfa4(0x118)][_0x5acfa4(0x124)](_0x5acfa4(0x13e)+_0x45659d+'/edit',{'body':_0x243e85});return!_0x2abe19['body'][_0x5acfa4(0xec)]||_0x2abe19['body'][_0x5acfa4(0xec)][_0x5acfa4(0x112)]===0x1;}async[_0x56ddbb(0xd8)](_0x2ead13){const _0x124507=_0x56ddbb,{unitId:_0x4acd03}=_0x2ead13,_0x57200d=_0x2ead13[_0x124507(0xfb)],_0x51c4cb={'memberId':this['_userService'][_0x124507(0x100)]()[_0x124507(0x143)],'unitId':_0x4acd03,'threadId':_0x57200d,'solved':_0x2ead13[_0x124507(0x134)]?_0x3b34bb[_0x124507(0x11c)]:_0x3b34bb[_0x124507(0x105)]},_0x513b14=await this[_0x124507(0x118)][_0x124507(0x124)](_0x124507(0x13e)+_0x4acd03+'/solved',{'body':_0x51c4cb});return!_0x513b14[_0x124507(0x13f)][_0x124507(0xec)]||_0x513b14[_0x124507(0x13f)][_0x124507(0xec)][_0x124507(0x112)]===0x1;}async[_0x56ddbb(0x133)](_0x226acd,_0xbc52aa,_0x15c374,_0x39064d){const _0x45df2b=_0x56ddbb,_0x321360={'memberId':(await this['_sessionService'][_0x45df2b(0x12e)](_0x226acd))[_0x45df2b(0xdb)](),'threadId':_0x15c374,'replyId':_0x39064d,'unitId':_0x226acd},_0x771905=await this[_0x45df2b(0x118)][_0x45df2b(0x124)](_0x45df2b(0x13e)+_0x226acd+_0x45df2b(0x101),{'body':_0x321360});return!_0x771905[_0x45df2b(0x13f)][_0x45df2b(0xec)]||_0x771905[_0x45df2b(0x13f)][_0x45df2b(0xec)]['code']===0x1;}async[_0x56ddbb(0x147)](_0x38acb4,_0x1492c2,_0x436540){const _0x421be3=_0x56ddbb,_0x283c1f={'unitId':_0x38acb4,'threadId':_0x436540},_0x2ec7c9=await this['_httpService'][_0x421be3(0x124)](_0x421be3(0x13e)+_0x38acb4+_0x421be3(0xe9),{'body':_0x283c1f}),_0x462037=_0x436540[_0x421be3(0xe0)](_0x3295c3=>_0x1bf24b(_0x2ec7c9[_0x421be3(0x13f)][_0x421be3(0xeb)][_0x3295c3],_0x38acb4,_0x1492c2))[_0x421be3(0xd2)](Boolean);return Object[_0x421be3(0x141)](_0x2ec7c9[_0x421be3(0x13f)]['users'])[_0x421be3(0x116)](_0x527363=>{const _0x1c3991=_0x421be3;this[_0x1c3991(0xdf)]['addUser'](_0x527363);}),_0x462037;}[_0x56ddbb(0x13b)](_0x56ae1d){const _0x350568=_0x56ddbb;return{'id':_0x56ae1d['id'],'threadId':_0x56ae1d[_0x350568(0xfb)],'ref':_0x56ae1d['ref']};}};_0x172675=_0x5a21ec([_0x380a4f(0x0,_0x25b392[_0x56ddbb(0xf2)](_0x2c508c[_0x56ddbb(0x14d)])),_0x380a4f(0x1,_0x25b392[_0x56ddbb(0xf2)](_0x25b392[_0x56ddbb(0x150)])),_0x380a4f(0x2,_0x25b392[_0x56ddbb(0xf2)](_0x372d68[_0x56ddbb(0x117)])),_0x380a4f(0x3,_0x25b392[_0x56ddbb(0xf2)](_0x25b392[_0x56ddbb(0xd7)]))],_0x172675);var _0x1d61a2=Object[_0x56ddbb(0xea)],_0x56e75b=(_0x43ffe3,_0x58cce2,_0x4b0b3f,_0x44846c)=>{const _0x2493d6=_0x56ddbb;for(var _0x263263=_0x44846c>0x1?void 0x0:_0x44846c?_0x1d61a2(_0x58cce2,_0x4b0b3f):_0x58cce2,_0x4c2576=_0x43ffe3[_0x2493d6(0x12f)]-0x1,_0x2ba90d;_0x4c2576>=0x0;_0x4c2576--)(_0x2ba90d=_0x43ffe3[_0x4c2576])&&(_0x263263=_0x2ba90d(_0x263263)||_0x263263);return _0x263263;},_0x47e928=(_0x5bf162,_0x1d72d1)=>(_0x52deb9,_0x2924d9)=>_0x1d72d1(_0x52deb9,_0x2924d9,_0x5bf162);let _0x22b563=class extends _0x25b392[_0x56ddbb(0xfc)]{constructor(_0x48e1ad,_0x10881c){const _0xc1e7a1=_0x56ddbb;super(),this['_threadCommentDataSourceService']=_0x48e1ad,this[_0xc1e7a1(0x12d)]=_0x10881c,this[_0xc1e7a1(0xe6)]();}[_0x56ddbb(0xe6)](){const _0x4c6623=_0x56ddbb;this[_0x4c6623(0xed)]['dataSource']=this[_0x4c6623(0x12d)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x22b563=_0x56e75b([_0x47e928(0x0,_0x55314c['IThreadCommentDataSourceService']),_0x47e928(0x1,_0x25b392[_0x56ddbb(0xf2)](_0x172675))],_0x22b563);var _0x64ab7d=Object['defineProperty'],_0x5946f9=Object['getOwnPropertyDescriptor'],_0x4d6bdd=(_0x14ae54,_0x127eb9,_0x220473)=>_0x127eb9 in _0x14ae54?_0x64ab7d(_0x14ae54,_0x127eb9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x220473}):_0x14ae54[_0x127eb9]=_0x220473,_0xd2b78c=(_0x176d91,_0x218061,_0x118a83,_0x1cec75)=>{for(var _0x2b150f=_0x1cec75>0x1?void 0x0:_0x1cec75?_0x5946f9(_0x218061,_0x118a83):_0x218061,_0x231cbd=_0x176d91['length']-0x1,_0xa465ae;_0x231cbd>=0x0;_0x231cbd--)(_0xa465ae=_0x176d91[_0x231cbd])&&(_0x2b150f=_0xa465ae(_0x2b150f)||_0x2b150f);return _0x2b150f;},_0x20436a=(_0x29970a,_0x2bdedc)=>(_0x5d4a71,_0x5f10bb)=>_0x2bdedc(_0x5d4a71,_0x5f10bb,_0x29970a),_0x223641=(_0xb038fc,_0x362881,_0x187b28)=>_0x4d6bdd(_0xb038fc,typeof _0x362881!=_0x56ddbb(0x137)?_0x362881+'':_0x362881,_0x187b28);_0x24f1da[_0x56ddbb(0x144)]=class extends _0x25b392[_0x56ddbb(0x140)]{constructor(_0x1d2d5a=_0x5a9e16,_0x2b5226,_0x4207e9){const _0x386b11=_0x56ddbb;super(),this[_0x386b11(0x127)]=_0x1d2d5a,this[_0x386b11(0xe5)]=_0x2b5226,this[_0x386b11(0x138)]=_0x4207e9;const {..._0x1a5112}=_0x25b392['merge']({},_0x5a9e16,this[_0x386b11(0x127)]);this[_0x386b11(0x138)]['setConfig'](_0x540751,_0x1a5112);}['onStarting'](){const _0x1b409c=_0x56ddbb;[[_0x172675],[_0x22b563],[_0x523feb]][_0x1b409c(0x116)](_0x4c0292=>{const _0x4b89dc=_0x1b409c;this[_0x4b89dc(0xe5)][_0x4b89dc(0x115)](_0x4c0292);});}[_0x56ddbb(0x10a)](){const _0x4a576e=_0x56ddbb;this['_injector']['get'](_0x22b563),this[_0x4a576e(0xe5)][_0x4a576e(0x126)](_0x523feb);}},_0x223641(_0x24f1da[_0x56ddbb(0x144)],_0x56ddbb(0x110),_0x2f69d9),_0x223641(_0x24f1da[_0x56ddbb(0x144)],_0x56ddbb(0x14c),_0x25b392[_0x56ddbb(0xe1)][_0x56ddbb(0x139)]),_0x24f1da[_0x56ddbb(0x144)]=_0xd2b78c([_0x25b392[_0x56ddbb(0x148)](_0x584479[_0x56ddbb(0xf6)],_0x372d68['UniverCollaborationClientPlugin'],_0x538c50[_0x56ddbb(0xe2)]),_0x20436a(0x1,_0x25b392[_0x56ddbb(0xf2)](_0x25b392[_0x56ddbb(0xd7)])),_0x20436a(0x2,_0x25b392['IConfigService'])],_0x24f1da[_0x56ddbb(0x144)]),Object[_0x56ddbb(0x12c)](_0x24f1da,Symbol[_0x56ddbb(0x11e)],{'value':'Module'});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.7.0-nightly.202505231607",
3
+ "version": "0.7.0-nightly.202505241606",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.7.0-nightly.202505231607",
49
- "@univerjs-pro/license": "0.7.0-nightly.202505231607",
50
- "@univerjs/core": "0.7.0-nightly.202505231607",
51
- "@univerjs/protocol": "0.1.46-alpha.3",
52
- "@univerjs/thread-comment": "0.7.0-nightly.202505231607",
53
- "@univerjs/thread-comment-ui": "0.7.0-nightly.202505231607",
54
- "@univerjs/network": "0.7.0-nightly.202505231607"
48
+ "@univerjs-pro/collaboration-client": "0.7.0-nightly.202505241606",
49
+ "@univerjs-pro/license": "0.7.0-nightly.202505241606",
50
+ "@univerjs/core": "0.7.0-nightly.202505241606",
51
+ "@univerjs/protocol": "0.1.47-alpha.0",
52
+ "@univerjs/thread-comment": "0.7.0-nightly.202505241606",
53
+ "@univerjs/thread-comment-ui": "0.7.0-nightly.202505241606",
54
+ "@univerjs/network": "0.7.0-nightly.202505241606"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",