@univerjs-pro/thread-comment-datasource 0.8.0-nightly.202506061607 → 0.8.0-nightly.202506081606
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 +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function _0x4d64(_0x5612df,_0x1548c3){const _0x545ae6=_0x545a();return _0x4d64=function(_0x4d640c,_0x2c78e8){_0x4d640c=_0x4d640c-0x78;let _0x190aed=_0x545ae6[_0x4d640c];return _0x190aed;},_0x4d64(_0x5612df,_0x1548c3);}const _0x1fee72=_0x4d64;(function(_0x372cff,_0x2cf33f){const _0x4e0952=_0x4d64,_0x52dade=_0x372cff();while(!![]){try{const _0x492590=-parseInt(_0x4e0952(0xaf))/0x1*(parseInt(_0x4e0952(0x87))/0x2)+-parseInt(_0x4e0952(0x96))/0x3+-parseInt(_0x4e0952(0xee))/0x4*(parseInt(_0x4e0952(0xa4))/0x5)+parseInt(_0x4e0952(0xdf))/0x6*(parseInt(_0x4e0952(0xe4))/0x7)+parseInt(_0x4e0952(0x99))/0x8+parseInt(_0x4e0952(0xb9))/0x9*(parseInt(_0x4e0952(0xdb))/0xa)+parseInt(_0x4e0952(0xd3))/0xb;if(_0x492590===_0x2cf33f)break;else _0x52dade['push'](_0x52dade['shift']());}catch(_0x4a0643){_0x52dade['push'](_0x52dade['shift']());}}}(_0x545a,0x3f350));Object['defineProperty'](exports,Symbol[_0x1fee72(0x7a)],{'value':'Module'});const b=require(_0x1fee72(0xef)),T=require(_0x1fee72(0xc9)),c=require(_0x1fee72(0x88)),j=require(_0x1fee72(0x7b)),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require(_0x1fee72(0xca)),U=_0x1fee72(0x9c);var I=(_0xb8f9ff=>(_0xb8f9ff[_0xb8f9ff['OpenOrReOpen']=0x0]=_0x1fee72(0xc6),_0xb8f9ff[_0xb8f9ff[_0x1fee72(0xf1)]=0x1]=_0x1fee72(0xf1),_0xb8f9ff[_0xb8f9ff[_0x1fee72(0xc7)]=-0x1]=_0x1fee72(0xc7),_0xb8f9ff))(I||{}),v=(_0x6cbab7=>(_0x6cbab7[_0x6cbab7['Unknown']=0x0]='Unknown',_0x6cbab7[_0x6cbab7[_0x1fee72(0xc8)]=0x1]=_0x1fee72(0xc8),_0x6cbab7[_0x6cbab7['Reply']=0x2]='Reply',_0x6cbab7[_0x6cbab7['Edit']=0x3]='Edit',_0x6cbab7[_0x6cbab7[_0x1fee72(0xec)]=0x4]=_0x1fee72(0xec),_0x6cbab7[_0x6cbab7['Solve']=0x5]=_0x1fee72(0x93),_0x6cbab7[_0x6cbab7['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x6cbab7))(v||{});const f=_0x14bc72=>c[_0x1fee72(0x9b)](new Date(+_0x14bc72))['format'](_0x1fee72(0xcb)),R=async(_0x20adf2,_0x2e4f43)=>{const _0x465355=_0x1fee72,_0x1838fd=_0x20adf2[_0x465355(0xf4)](c[_0x465355(0xc1)]),_0xbd3a86=_0x20adf2[_0x465355(0xf4)](P[_0x465355(0xc3)]);_0x2e4f43[_0x465355(0xde)](_0x34ec71=>{const _0x46d7f7=_0x465355;_0x1838fd[_0x46d7f7(0x7c)](_0x34ec71)&&_0x2e4f43[_0x46d7f7(0x94)](_0x34ec71);}),_0x2e4f43[_0x465355(0xa0)]&&(await _0xbd3a86[_0x465355(0xf4)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2e4f43]}}))[_0x465355(0xa7)][_0x465355(0xd5)][_0x465355(0xde)](_0x12dc6a=>{const _0xf16297=_0x465355;_0x12dc6a&&_0x1838fd[_0xf16297(0xbb)](_0x12dc6a);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x2a990b,_0x51e95d,_0x406fa7,_0x15f585)=>{const _0x4e4e19=_0x1fee72;for(var _0x93c94e=_0x15f585>0x1?void 0x0:_0x15f585?$(_0x51e95d,_0x406fa7):_0x51e95d,_0x5b2126=_0x2a990b[_0x4e4e19(0xc0)]-0x1,_0x539622;_0x5b2126>=0x0;_0x5b2126--)(_0x539622=_0x2a990b[_0x5b2126])&&(_0x93c94e=_0x539622(_0x93c94e)||_0x93c94e);return _0x93c94e;},S=(_0x1ff8e0,_0x533cb8)=>(_0x41a7ff,_0x5bf81b)=>_0x533cb8(_0x41a7ff,_0x5bf81b,_0x1ff8e0);let p=class extends c[_0x1fee72(0xac)]{constructor(_0x50e9b2,_0x59caeb,_0x12320c,_0x3cdcc3){const _0x155a10=_0x1fee72;super(),this[_0x155a10(0xed)]=_0x50e9b2,this[_0x155a10(0xce)]=_0x59caeb,this[_0x155a10(0xae)]=_0x12320c,this[_0x155a10(0xd6)]=_0x3cdcc3,this[_0x155a10(0x8e)](),this[_0x155a10(0xcc)]();}['_initUserSync'](){const _0x4c9ecc=_0x1fee72;this[_0x4c9ecc(0x9f)](this['_threadCommentModel'][_0x4c9ecc(0xcf)][_0x4c9ecc(0xe2)](w[_0x4c9ecc(0xa5)](0x10))['subscribe'](_0x1c8586=>{const _0x1914e1=_0x4c9ecc,_0x11f3e5=new Set();_0x1c8586[_0x1914e1(0xde)](_0x287cdc=>{const _0x51cd26=_0x1914e1;switch(_0x287cdc[_0x51cd26(0x91)]){case _0x51cd26(0x83):{const _0x4b1291=_0x287cdc['payload'][_0x51cd26(0x8c)];_0x11f3e5[_0x51cd26(0x83)](_0x4b1291);break;}}}),R(this[_0x1914e1(0xd6)],_0x11f3e5);}));}[_0x1fee72(0x8e)](){const _0x476632=_0x1fee72;this[_0x476632(0x9f)](this[_0x476632(0xed)][_0x476632(0xcf)]['subscribe'](async _0xa16c05=>{const _0x318884=_0x476632;var _0x4c7f43,_0x3cefbe,_0x55cf9c,_0x1c4d27;const _0x3b1879=(_0x4c7f43=this[_0x318884(0xce)][_0x318884(0xdc)](_0xa16c05[_0x318884(0xf3)])[_0x318884(0xf0)](_0x26b291=>_0x26b291[_0x318884(0xd0)]===_0xa16c05[_0x318884(0xd0)]))==null?void 0x0:_0x4c7f43['root'];if(!_0x3b1879)return;const {unitId:_0x56a05d,subUnitId:_0x13af28}=_0x3b1879;switch(_0xa16c05['user']&&this['_userService']['addUser'](_0xa16c05[_0x318884(0xc2)]),_0xa16c05[_0x318884(0x91)]){case v['Add']:break;case v[_0x318884(0xbd)]:{this[_0x318884(0xce)]['addComment'](_0x56a05d,_0x13af28,{'unitId':_0x56a05d,'subUnitId':_0x13af28,'ref':'','id':_0xa16c05[_0x318884(0x81)],'dT':f(+_0xa16c05[_0x318884(0xd1)]),'threadId':_0xa16c05['threadId'],'personId':(_0x55cf9c=(_0x3cefbe=_0xa16c05[_0x318884(0xc2)])==null?void 0x0:_0x3cefbe[_0x318884(0xb0)])!=null?_0x55cf9c:_0xa16c05[_0x318884(0xc5)],'text':JSON[_0x318884(0xe3)](_0xa16c05[_0x318884(0x7f)]),'parentId':_0x3b1879['id']});break;}case v[_0x318884(0xec)]:{const _0x25d160=this[_0x318884(0xce)]['getComment'](_0x56a05d,_0x13af28,_0xa16c05['replyId']);_0x25d160&&_0x25d160[_0x318884(0xf2)]&&this['_threadCommentModel'][_0x318884(0xe9)](_0x56a05d,_0x13af28,_0xa16c05[_0x318884(0x81)]);break;}case v['Edit']:{this[_0x318884(0xce)][_0x318884(0xe5)](_0x56a05d,_0x13af28,{'commentId':_0xa16c05['replyId'],'text':JSON[_0x318884(0xe3)](_0xa16c05[_0x318884(0x7f)])});break;}case v['Solve']:{const _0xe3550b=(_0x1c4d27=this[_0x318884(0xce)]['getUnit'](_0xa16c05[_0x318884(0xf3)])[_0x318884(0xf0)](_0x5e3d46=>_0x5e3d46[_0x318884(0xd0)]===_0xa16c05[_0x318884(0xd0)]))==null?void 0x0:_0x1c4d27[_0x318884(0xda)];_0xe3550b&&this['_threadCommentModel'][_0x318884(0xd2)](_0x56a05d,_0x13af28,_0xe3550b['id'],_0xa16c05[_0x318884(0xd4)]===I[_0x318884(0xf1)]);break;}}}));}};p=E([S(0x0,c[_0x1fee72(0xb8)](b[_0x1fee72(0x98)])),S(0x1,c[_0x1fee72(0xb8)](M[_0x1fee72(0xbc)])),S(0x2,c[_0x1fee72(0xb8)](c[_0x1fee72(0xc1)])),S(0x3,c['Inject'](c[_0x1fee72(0xea)]))],p);const q=_0x1fee72(0xbf),D={};var A=Object[_0x1fee72(0xb6)],x=(_0x443679,_0x25631f,_0x69580c,_0xa860fd)=>{for(var _0x463fbc=_0xa860fd>0x1?void 0x0:_0xa860fd?A(_0x25631f,_0x69580c):_0x25631f,_0x570a73=_0x443679['length']-0x1,_0xb6bc01;_0x570a73>=0x0;_0x570a73--)(_0xb6bc01=_0x443679[_0x570a73])&&(_0x463fbc=_0xb6bc01(_0x463fbc)||_0x463fbc);return _0x463fbc;},_=(_0x3221d4,_0x1d852e)=>(_0xf86f7b,_0x355424)=>_0x1d852e(_0xf86f7b,_0x355424,_0x3221d4);function _0x545a(){const _0x5a4f3c=['_userService','22bKLmQu','userID','_config','_sessionService','error','customRanges','_threadCommentDataSourceService','getOwnPropertyDescriptor','/universer-api/comment/unit/','Inject','18IGyozh','/list','addUser','ThreadCommentModel','Reply','requireSession','thread-comment-data-source.config','length','UserManagerService','user','HTTPService','comment','userId','OpenOrReOpen','UNRECOGNIZED','Add','@univerjs-pro/license','@univerjs/network','YYYY/MM/DD\x20HH:mm','_initUserSync','dataSource','_threadCommentModel','commentUpdate$','threadId','createTimestamp','resolveComment','4336156kaviAU','solved','users','_injector','UniverThreadCommentUIPlugin','_httpService','slice','root','851030SmCXbs','getUnit','symbol','forEach','6yadqyU','values','setConfig','pipe','parse','1666007xUIyIn','updateComment','getCurrentUser','reply','map','deleteComment','Injector','format','Delete','_commentService','900148kIteXV','@univerjs-pro/collaboration-client','find','Solved','parentId','unitId','get','/edit','rangeType','UniverThreadCommentDataSourcePlugin','toStringTag','@univerjs/thread-comment-ui','getUser','filter','DependentOn','content','IConfigService','replyId','/delete','add','resolved','post','COMMENT','26498pgXOtT','@univerjs/core','getMemberID','Plugin','_configService','personId','_initDataSource','_init','syncUpdateMutationToColla','_threadCommentDataSource','type','UNIVER_UNKNOWN','Solve','delete','defineProperty','282822dBTtEx','merge','CommentService','538256eKVXCs','saveCommentToSnapshot','dayjs','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','ref','code','disposeWithMe','size','stringify','UniverLicensePlugin','rangeId','5YjaWcz','bufferTime','listComments','body','CollaborationSessionService','pluginName','IThreadCommentDataSourceService','UniverInstanceType','Disposable','replies'];_0x545a=function(){return _0x5a4f3c;};return _0x545a();}function Y(_0x10fb7d,_0xe42f9e){const _0x47a1f1=_0x1fee72,_0x4fe8ac=_0x10fb7d['replies'][0x0];return{..._0xe42f9e,'id':_0x4fe8ac[_0x47a1f1(0x81)],'resolved':_0x10fb7d[_0x47a1f1(0xd4)]===0x1,'dT':f(_0x4fe8ac[_0x47a1f1(0xd1)]),'personId':_0x4fe8ac['userId'],'threadId':_0x4fe8ac[_0x47a1f1(0xd0)]};}function G(_0x2b9f62,_0x4a9ca0,_0x1950e0){const _0x27c734=_0x1fee72;var _0x5add47,_0x1ec1f9;if(((_0x1ec1f9=(_0x5add47=_0x2b9f62==null?void 0x0:_0x2b9f62[_0x27c734(0xad)])==null?void 0x0:_0x5add47[_0x27c734(0xc0)])!=null?_0x1ec1f9:0x0)>0x0){const _0x1763fe=(_0x3de04a,_0x5d912f)=>({'id':_0x3de04a[_0x27c734(0x81)],'threadId':_0x3de04a[_0x27c734(0xd0)],'dT':f(_0x3de04a[_0x27c734(0xd1)]),'personId':_0x3de04a[_0x27c734(0xc5)],'resolved':_0x2b9f62[_0x27c734(0xd4)]===I[_0x27c734(0xf1)],'unitId':_0x4a9ca0,'subUnitId':_0x1950e0,'text':JSON[_0x27c734(0xe3)](_0x3de04a[_0x27c734(0x7f)]),'parentId':_0x5d912f}),_0x1d2338=_0x1763fe(_0x2b9f62[_0x27c734(0xad)][0x0]);return{..._0x1d2338,'children':_0x2b9f62[_0x27c734(0xad)][_0x27c734(0xd9)](0x1)['map'](_0x63f852=>_0x1763fe(_0x63f852,_0x1d2338['id']))};}return null;}let g=class{constructor(_0x8fef9c,_0x5ceb17,_0x368e16,_0x54559c){const _0xdccd22=_0x1fee72;this['_httpService']=_0x8fef9c,this['_userService']=_0x5ceb17,this[_0xdccd22(0xb2)]=_0x368e16,this[_0xdccd22(0xd6)]=_0x54559c;}async['addComment'](_0x576d66){const _0x7ef470=_0x1fee72;var _0x1034ec,_0x3e409d;const {parentId:_0x5c5611,unitId:_0x35e64f,text:_0x235ce9,threadId:_0x4e6d53}=_0x576d66,_0x59d91e=(_0x3e409d=(_0x1034ec=_0x235ce9[_0x7ef470(0xb4)])==null?void 0x0:_0x1034ec['filter'](_0x4fd6f6=>_0x4fd6f6['rangeType']===c['CustomRangeType'][_0x7ef470(0x86)])['map'](_0x3c3b82=>_0x3c3b82[_0x7ef470(0xa3)]))!=null?_0x3e409d:[],_0x410d20=JSON[_0x7ef470(0xa1)](_0x235ce9),_0x3ee789=(await this[_0x7ef470(0xb2)][_0x7ef470(0xbe)](_0x35e64f))[_0x7ef470(0x89)]();if(_0x5c5611){const _0x467740={'memberId':_0x3ee789,'unitId':_0x35e64f,'content':_0x410d20,'mention':_0x59d91e,'threadId':_0x4e6d53},_0x12de3a=(await this['_httpService']['post'](_0x7ef470(0xb7)+_0x35e64f+'/reply',{'body':_0x467740}))[_0x7ef470(0xa7)][_0x7ef470(0xe7)];return{..._0x576d66,'id':_0x12de3a[_0x7ef470(0x81)],'dT':c['dayjs'](+_0x12de3a['createTimestamp'])[_0x7ef470(0xeb)](_0x7ef470(0xcb)),'personId':_0x12de3a[_0x7ef470(0xc5)]};}else{const _0x5d95b8={'memberId':_0x3ee789,'unitId':_0x35e64f,'content':_0x410d20,'mention':_0x59d91e},_0x32fd23=await this['_httpService'][_0x7ef470(0x85)](_0x7ef470(0xb7)+_0x35e64f+'/add',{'body':_0x5d95b8});return Y(_0x32fd23[_0x7ef470(0xa7)][_0x7ef470(0xc4)],_0x576d66);}}async[_0x1fee72(0xe5)](_0x4548b6){const _0x1e0c05=_0x1fee72;var _0x27200b,_0x15498f;const {text:_0x142ea3,unitId:_0xacea29}=_0x4548b6,_0x2e1eed=(_0x15498f=(_0x27200b=_0x142ea3[_0x1e0c05(0xb4)])==null?void 0x0:_0x27200b[_0x1e0c05(0x7d)](_0x512a9e=>_0x512a9e[_0x1e0c05(0x78)]===c['CustomRangeType'][_0x1e0c05(0x86)])['map'](_0x1fa72f=>_0x1fa72f['rangeId']))!=null?_0x15498f:[],_0x33b5cd=JSON[_0x1e0c05(0xa1)](_0x142ea3),_0x402242=_0x4548b6[_0x1e0c05(0xd0)],_0x3f5f35=_0x4548b6['id'],_0x3c1026={'memberId':(await this[_0x1e0c05(0xb2)][_0x1e0c05(0xbe)](_0xacea29))[_0x1e0c05(0x89)](),'unitId':_0xacea29,'threadId':_0x402242,'mention':_0x2e1eed,'content':_0x33b5cd,'replyId':_0x3f5f35},_0x598b60=await this['_httpService'][_0x1e0c05(0x85)](_0x1e0c05(0xb7)+_0xacea29+_0x1e0c05(0xf5),{'body':_0x3c1026});return!_0x598b60['body']['error']||_0x598b60[_0x1e0c05(0xa7)][_0x1e0c05(0xb3)]['code']===0x1;}async[_0x1fee72(0xd2)](_0x12ede5){const _0x42dc52=_0x1fee72,{unitId:_0x17ab2f}=_0x12ede5,_0x205e64=_0x12ede5[_0x42dc52(0xd0)],_0xca40f={'memberId':this[_0x42dc52(0xae)][_0x42dc52(0xe6)]()[_0x42dc52(0xb0)],'unitId':_0x17ab2f,'threadId':_0x205e64,'solved':_0x12ede5[_0x42dc52(0x84)]?I[_0x42dc52(0xf1)]:I[_0x42dc52(0xc6)]},_0x2aa7d0=await this[_0x42dc52(0xd8)][_0x42dc52(0x85)](_0x42dc52(0xb7)+_0x17ab2f+'/solved',{'body':_0xca40f});return!_0x2aa7d0[_0x42dc52(0xa7)]['error']||_0x2aa7d0['body'][_0x42dc52(0xb3)][_0x42dc52(0x9e)]===0x1;}async[_0x1fee72(0xe9)](_0x205b57,_0x18489e,_0x2ddc0b,_0x32eb63){const _0x1f386b=_0x1fee72,_0x3add72={'memberId':(await this[_0x1f386b(0xb2)][_0x1f386b(0xbe)](_0x205b57))['getMemberID'](),'threadId':_0x2ddc0b,'replyId':_0x32eb63,'unitId':_0x205b57},_0xc04490=await this[_0x1f386b(0xd8)]['post'](_0x1f386b(0xb7)+_0x205b57+_0x1f386b(0x82),{'body':_0x3add72});return!_0xc04490[_0x1f386b(0xa7)][_0x1f386b(0xb3)]||_0xc04490[_0x1f386b(0xa7)][_0x1f386b(0xb3)][_0x1f386b(0x9e)]===0x1;}async[_0x1fee72(0xa6)](_0x438ca8,_0x2b0261,_0x4b21c8){const _0x26e9bb=_0x1fee72,_0xa7c4ad={'unitId':_0x438ca8,'threadId':_0x4b21c8},_0x34cc72=await this[_0x26e9bb(0xd8)][_0x26e9bb(0x85)]('/universer-api/comment/unit/'+_0x438ca8+_0x26e9bb(0xba),{'body':_0xa7c4ad}),_0x2accf3=_0x4b21c8[_0x26e9bb(0xe8)](_0x59c2c4=>G(_0x34cc72[_0x26e9bb(0xa7)]['comments'][_0x59c2c4],_0x438ca8,_0x2b0261))[_0x26e9bb(0x7d)](Boolean);return Object[_0x26e9bb(0xe0)](_0x34cc72[_0x26e9bb(0xa7)][_0x26e9bb(0xd5)])[_0x26e9bb(0xde)](_0x4ba9d8=>{const _0x1448c5=_0x26e9bb;this[_0x1448c5(0xae)]['addUser'](_0x4ba9d8);}),_0x2accf3;}[_0x1fee72(0x9a)](_0x1e2b6d){const _0x41782b=_0x1fee72;return{'id':_0x1e2b6d['id'],'threadId':_0x1e2b6d['threadId'],'ref':_0x1e2b6d[_0x41782b(0x9d)]};}};g=x([_(0x0,c[_0x1fee72(0xb8)](P['HTTPService'])),_(0x1,c[_0x1fee72(0xb8)](c[_0x1fee72(0xc1)])),_(0x2,c['Inject'](b[_0x1fee72(0xa8)])),_(0x3,c['Inject'](c[_0x1fee72(0xea)]))],g);var H=Object[_0x1fee72(0xb6)],J=(_0x10d8c9,_0x3a55d9,_0x3844c5,_0x48bc73)=>{const _0x4f4e03=_0x1fee72;for(var _0xe9722=_0x48bc73>0x1?void 0x0:_0x48bc73?H(_0x3a55d9,_0x3844c5):_0x3a55d9,_0x35b6bb=_0x10d8c9[_0x4f4e03(0xc0)]-0x1,_0x4ce478;_0x35b6bb>=0x0;_0x35b6bb--)(_0x4ce478=_0x10d8c9[_0x35b6bb])&&(_0xe9722=_0x4ce478(_0xe9722)||_0xe9722);return _0xe9722;},y=(_0x3e09a3,_0x4eeea0)=>(_0x29477f,_0x2ca6c2)=>_0x4eeea0(_0x29477f,_0x2ca6c2,_0x3e09a3);let C=class extends c[_0x1fee72(0xac)]{constructor(_0x88a75d,_0x1c1332){const _0x5eedf5=_0x1fee72;super(),this[_0x5eedf5(0xb5)]=_0x88a75d,this[_0x5eedf5(0x90)]=_0x1c1332,this[_0x5eedf5(0x8d)]();}[_0x1fee72(0x8d)](){const _0x3e8d2d=_0x1fee72;this[_0x3e8d2d(0xb5)][_0x3e8d2d(0xcd)]=this[_0x3e8d2d(0x90)],this[_0x3e8d2d(0xb5)][_0x3e8d2d(0x8f)]=!0x1;}};C=J([y(0x0,M[_0x1fee72(0xaa)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x1fee72(0x95)],L=Object[_0x1fee72(0xb6)],Z=(_0x16dddf,_0x67aeaa,_0x3dfe7a)=>_0x67aeaa in _0x16dddf?F(_0x16dddf,_0x67aeaa,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3dfe7a}):_0x16dddf[_0x67aeaa]=_0x3dfe7a,W=(_0x553ce,_0x3ebfb8,_0x2f0173,_0x5558a0)=>{for(var _0x5f5206=_0x5558a0>0x1?void 0x0:_0x5558a0?L(_0x3ebfb8,_0x2f0173):_0x3ebfb8,_0x4280ac=_0x553ce['length']-0x1,_0x33f2c2;_0x4280ac>=0x0;_0x4280ac--)(_0x33f2c2=_0x553ce[_0x4280ac])&&(_0x5f5206=_0x33f2c2(_0x5f5206)||_0x5f5206);return _0x5f5206;},O=(_0x46f091,_0x1e36d7)=>(_0x310203,_0x426711)=>_0x1e36d7(_0x310203,_0x426711,_0x46f091),N=(_0x9e3d13,_0x52be39,_0x507673)=>Z(_0x9e3d13,typeof _0x52be39!=_0x1fee72(0xdd)?_0x52be39+'':_0x52be39,_0x507673);exports[_0x1fee72(0x79)]=class extends c[_0x1fee72(0x8a)]{constructor(_0x1f63a6=D,_0x2ecadb,_0x1c67f1){const _0x51535e=_0x1fee72;super(),this[_0x51535e(0xb1)]=_0x1f63a6,this[_0x51535e(0xd6)]=_0x2ecadb,this['_configService']=_0x1c67f1;const {..._0x2c11bf}=c[_0x51535e(0x97)]({},D,this[_0x51535e(0xb1)]);this[_0x51535e(0x8b)][_0x51535e(0xe1)](q,_0x2c11bf);}['onStarting'](){const _0x4fdbba=_0x1fee72;[[g],[C],[p]][_0x4fdbba(0xde)](_0x5da1d7=>{this['_injector']['add'](_0x5da1d7);});}['onReady'](){const _0x2aef12=_0x1fee72;this[_0x2aef12(0xd6)][_0x2aef12(0xf4)](C),this[_0x2aef12(0xd6)]['get'](p);}},N(exports[_0x1fee72(0x79)],_0x1fee72(0xa9),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x1fee72(0x91),c[_0x1fee72(0xab)][_0x1fee72(0x92)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x1fee72(0x7e)](j[_0x1fee72(0xd7)],b['UniverCollaborationClientPlugin'],T[_0x1fee72(0xa2)]),O(0x1,c['Inject'](c[_0x1fee72(0xea)])),O(0x2,c[_0x1fee72(0x80)])],exports[_0x1fee72(0x79)]);
|
|
1
|
+
'use strict';const _0x21325b=_0x46a9;(function(_0x2aeb16,_0x2f1503){const _0x36ae43=_0x46a9,_0x2672b6=_0x2aeb16();while(!![]){try{const _0x225948=parseInt(_0x36ae43(0xf3))/0x1*(-parseInt(_0x36ae43(0xf1))/0x2)+-parseInt(_0x36ae43(0x159))/0x3*(parseInt(_0x36ae43(0x161))/0x4)+-parseInt(_0x36ae43(0x13b))/0x5+-parseInt(_0x36ae43(0x14b))/0x6+parseInt(_0x36ae43(0x141))/0x7+parseInt(_0x36ae43(0xe7))/0x8*(-parseInt(_0x36ae43(0xea))/0x9)+parseInt(_0x36ae43(0x14d))/0xa;if(_0x225948===_0x2f1503)break;else _0x2672b6['push'](_0x2672b6['shift']());}catch(_0x2bcbd7){_0x2672b6['push'](_0x2672b6['shift']());}}}(_0x4f79,0x9327b));function _0x4f79(){const _0x335382=['pluginName','Module','userID','thread-comment-data-source.config','reply','UniverInstanceType','rxjs','resolveComment','_sessionService','requireSession','listComments','2616745xHiQZv','merge','error','Unknown','getMemberID','/add','6903617xGnvno','addComment','bufferTime','delete','getCurrentUser','_configService','UserManagerService','IThreadCommentDataSourceService','_commentService','_injector','4496202aoWWdE','replies','33274430SOKhvH','_userService','post','CustomRangeType','parentId','get','createTimestamp','forEach','disposeWithMe','/reply','format','parse','370338uOGoKl','_threadCommentDataSource','onStarting','_config','user','/solved','UNIVER_UNKNOWN','pipe','12ftLPBM','Injector','filter','rangeId','content','Reply','8iVyMbT','getOwnPropertyDescriptor','subscribe','8823537dyVyfG','Delete','UniverCollaborationClientPlugin','root','_init','payload','YYYY/MM/DD\x20HH:mm','8PUebRv','replyId','271870pmIyvw','@univerjs/network','defineProperty','userId','_initDataSource','threadId','toStringTag','users','_threadCommentModel','length','/universer-api/user/list','size','UNRECOGNIZED','@univerjs/thread-comment-ui','/list','getComment','addUser','ThreadCommentModel','customRanges','HTTPService','_threadCommentDataSourceService','UniverThreadCommentDataSourcePlugin','/universer-api/comment/unit/','code','OpenOrReOpen','@univerjs/core','IConfigService','Disposable','symbol','UniverLicensePlugin','Plugin','dayjs','UniverThreadCommentUIPlugin','CollaborationSessionService','Solved','stringify','@univerjs/thread-comment','_httpService','solved','deleteComment','COMMENT','body','Add','rangeType','unitId','ref','values','Inject','commentUpdate$','comment','_initUserSync','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','slice','getUnit','personId','map','Edit','find','add','Solve','type'];_0x4f79=function(){return _0x335382;};return _0x4f79();}Object[_0x21325b(0xf5)](exports,Symbol[_0x21325b(0xf9)],{'value':_0x21325b(0x131)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require(_0x21325b(0x10c)),j=require(_0x21325b(0x100)),M=require(_0x21325b(0x117)),w=require(_0x21325b(0x136)),P=require(_0x21325b(0xf4)),U=_0x21325b(0x126);var I=(_0x4e2ac=>(_0x4e2ac[_0x4e2ac[_0x21325b(0x10b)]=0x0]=_0x21325b(0x10b),_0x4e2ac[_0x4e2ac[_0x21325b(0x115)]=0x1]='Solved',_0x4e2ac[_0x4e2ac[_0x21325b(0xff)]=-0x1]=_0x21325b(0xff),_0x4e2ac))(I||{}),v=(_0x1abbec=>(_0x1abbec[_0x1abbec[_0x21325b(0x13e)]=0x0]=_0x21325b(0x13e),_0x1abbec[_0x1abbec['Add']=0x1]=_0x21325b(0x11d),_0x1abbec[_0x1abbec[_0x21325b(0xe6)]=0x2]=_0x21325b(0xe6),_0x1abbec[_0x1abbec[_0x21325b(0x12b)]=0x3]=_0x21325b(0x12b),_0x1abbec[_0x1abbec['Delete']=0x4]='Delete',_0x1abbec[_0x1abbec[_0x21325b(0x12e)]=0x5]=_0x21325b(0x12e),_0x1abbec[_0x1abbec[_0x21325b(0xff)]=-0x1]=_0x21325b(0xff),_0x1abbec))(v||{});const f=_0x252afa=>c['dayjs'](new Date(+_0x252afa))[_0x21325b(0x157)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x4905b5,_0x3207c3)=>{const _0x54b041=_0x21325b,_0x144cea=_0x4905b5['get'](c[_0x54b041(0x147)]),_0x479df8=_0x4905b5[_0x54b041(0x152)](P[_0x54b041(0x106)]);_0x3207c3[_0x54b041(0x154)](_0x803e65=>{const _0x5e33f6=_0x54b041;_0x144cea['getUser'](_0x803e65)&&_0x3207c3[_0x5e33f6(0x144)](_0x803e65);}),_0x3207c3[_0x54b041(0xfe)]&&(await _0x479df8[_0x54b041(0x152)](_0x54b041(0xfd),{'params':{'userIDs':[..._0x3207c3]}}))[_0x54b041(0x11c)][_0x54b041(0xfa)][_0x54b041(0x154)](_0x4baf69=>{const _0x51a572=_0x54b041;_0x4baf69&&_0x144cea[_0x51a572(0x103)](_0x4baf69);});};function _0x46a9(_0x55db11,_0x45e520){const _0x4f7938=_0x4f79();return _0x46a9=function(_0x46a9ae,_0x18998e){_0x46a9ae=_0x46a9ae-0xe4;let _0x2d6e04=_0x4f7938[_0x46a9ae];return _0x2d6e04;},_0x46a9(_0x55db11,_0x45e520);}var $=Object[_0x21325b(0xe8)],E=(_0x4d0469,_0x5ad803,_0x38006e,_0x5bbc6c)=>{const _0x429d04=_0x21325b;for(var _0x22aac3=_0x5bbc6c>0x1?void 0x0:_0x5bbc6c?$(_0x5ad803,_0x38006e):_0x5ad803,_0x3cadf6=_0x4d0469[_0x429d04(0xfc)]-0x1,_0x5190e9;_0x3cadf6>=0x0;_0x3cadf6--)(_0x5190e9=_0x4d0469[_0x3cadf6])&&(_0x22aac3=_0x5190e9(_0x22aac3)||_0x22aac3);return _0x22aac3;},S=(_0x596189,_0x2a103c)=>(_0x3f9362,_0x2a7b61)=>_0x2a103c(_0x3f9362,_0x2a7b61,_0x596189);let p=class extends c[_0x21325b(0x10e)]{constructor(_0x1342a6,_0x498522,_0x1589c8,_0x4c3b06){const _0x26f142=_0x21325b;super(),this[_0x26f142(0x149)]=_0x1342a6,this[_0x26f142(0xfb)]=_0x498522,this[_0x26f142(0x14e)]=_0x1589c8,this[_0x26f142(0x14a)]=_0x4c3b06,this[_0x26f142(0xee)](),this['_initUserSync']();}[_0x21325b(0x125)](){const _0x58bfe4=_0x21325b;this[_0x58bfe4(0x155)](this['_threadCommentModel'][_0x58bfe4(0x123)][_0x58bfe4(0x160)](w[_0x58bfe4(0x143)](0x10))['subscribe'](_0x114c04=>{const _0x5ce6d7=_0x58bfe4,_0x2e92f0=new Set();_0x114c04[_0x5ce6d7(0x154)](_0x28c10b=>{const _0x302a8d=_0x5ce6d7;switch(_0x28c10b['type']){case _0x302a8d(0x12d):{const _0x1ac7a8=_0x28c10b[_0x302a8d(0xef)][_0x302a8d(0x129)];_0x2e92f0[_0x302a8d(0x12d)](_0x1ac7a8);break;}}}),R(this[_0x5ce6d7(0x14a)],_0x2e92f0);}));}[_0x21325b(0xee)](){const _0x3c5e9b=_0x21325b;this['disposeWithMe'](this[_0x3c5e9b(0x149)][_0x3c5e9b(0x123)][_0x3c5e9b(0xe9)](async _0x50e4db=>{const _0x3c3319=_0x3c5e9b;var _0x14e0ab,_0x68a8ce,_0xf89c,_0x1e7009;const _0x345019=(_0x14e0ab=this[_0x3c3319(0xfb)][_0x3c3319(0x128)](_0x50e4db[_0x3c3319(0x11f)])[_0x3c3319(0x12c)](_0x129791=>_0x129791[_0x3c3319(0xf8)]===_0x50e4db[_0x3c3319(0xf8)]))==null?void 0x0:_0x14e0ab[_0x3c3319(0xed)];if(!_0x345019)return;const {unitId:_0x49b96b,subUnitId:_0x28c2b1}=_0x345019;switch(_0x50e4db[_0x3c3319(0x15d)]&&this['_userService'][_0x3c3319(0x103)](_0x50e4db[_0x3c3319(0x15d)]),_0x50e4db['type']){case v[_0x3c3319(0x11d)]:break;case v[_0x3c3319(0xe6)]:{this[_0x3c3319(0xfb)][_0x3c3319(0x142)](_0x49b96b,_0x28c2b1,{'unitId':_0x49b96b,'subUnitId':_0x28c2b1,'ref':'','id':_0x50e4db['replyId'],'dT':f(+_0x50e4db[_0x3c3319(0x153)]),'threadId':_0x50e4db['threadId'],'personId':(_0xf89c=(_0x68a8ce=_0x50e4db[_0x3c3319(0x15d)])==null?void 0x0:_0x68a8ce[_0x3c3319(0x132)])!=null?_0xf89c:_0x50e4db[_0x3c3319(0xf6)],'text':JSON['parse'](_0x50e4db[_0x3c3319(0xe5)]),'parentId':_0x345019['id']});break;}case v[_0x3c3319(0xeb)]:{const _0x4e84df=this['_threadCommentModel'][_0x3c3319(0x102)](_0x49b96b,_0x28c2b1,_0x50e4db[_0x3c3319(0xf2)]);_0x4e84df&&_0x4e84df[_0x3c3319(0x151)]&&this['_threadCommentModel'][_0x3c3319(0x11a)](_0x49b96b,_0x28c2b1,_0x50e4db[_0x3c3319(0xf2)]);break;}case v['Edit']:{this[_0x3c3319(0xfb)]['updateComment'](_0x49b96b,_0x28c2b1,{'commentId':_0x50e4db[_0x3c3319(0xf2)],'text':JSON['parse'](_0x50e4db[_0x3c3319(0xe5)])});break;}case v[_0x3c3319(0x12e)]:{const _0x4c53f9=(_0x1e7009=this[_0x3c3319(0xfb)]['getUnit'](_0x50e4db[_0x3c3319(0x11f)])['find'](_0x1e57b1=>_0x1e57b1[_0x3c3319(0xf8)]===_0x50e4db[_0x3c3319(0xf8)]))==null?void 0x0:_0x1e7009[_0x3c3319(0xed)];_0x4c53f9&&this['_threadCommentModel']['resolveComment'](_0x49b96b,_0x28c2b1,_0x4c53f9['id'],_0x50e4db[_0x3c3319(0x119)]===I[_0x3c3319(0x115)]);break;}}}));}};p=E([S(0x0,c[_0x21325b(0x122)](b['CommentService'])),S(0x1,c[_0x21325b(0x122)](M[_0x21325b(0x104)])),S(0x2,c[_0x21325b(0x122)](c[_0x21325b(0x147)])),S(0x3,c['Inject'](c[_0x21325b(0x162)]))],p);const q=_0x21325b(0x133),D={};var A=Object[_0x21325b(0xe8)],x=(_0x441b03,_0x5edd81,_0x4afd58,_0xed62a8)=>{for(var _0x36c987=_0xed62a8>0x1?void 0x0:_0xed62a8?A(_0x5edd81,_0x4afd58):_0x5edd81,_0x2c9aea=_0x441b03['length']-0x1,_0x5d265a;_0x2c9aea>=0x0;_0x2c9aea--)(_0x5d265a=_0x441b03[_0x2c9aea])&&(_0x36c987=_0x5d265a(_0x36c987)||_0x36c987);return _0x36c987;},_=(_0x1ea148,_0x72ad5e)=>(_0x4a30c9,_0x5d9588)=>_0x72ad5e(_0x4a30c9,_0x5d9588,_0x1ea148);function Y(_0x4e99c3,_0x19091f){const _0x30078b=_0x21325b,_0x29ce43=_0x4e99c3[_0x30078b(0x14c)][0x0];return{..._0x19091f,'id':_0x29ce43['replyId'],'resolved':_0x4e99c3[_0x30078b(0x119)]===0x1,'dT':f(_0x29ce43[_0x30078b(0x153)]),'personId':_0x29ce43[_0x30078b(0xf6)],'threadId':_0x29ce43['threadId']};}function G(_0x1363aa,_0x1e09b2,_0x4cfe0d){const _0x477480=_0x21325b;var _0x3c6b64,_0x1cca4e;if(((_0x1cca4e=(_0x3c6b64=_0x1363aa==null?void 0x0:_0x1363aa[_0x477480(0x14c)])==null?void 0x0:_0x3c6b64[_0x477480(0xfc)])!=null?_0x1cca4e:0x0)>0x0){const _0x11a92d=(_0x4cd4b9,_0x399fe0)=>({'id':_0x4cd4b9['replyId'],'threadId':_0x4cd4b9[_0x477480(0xf8)],'dT':f(_0x4cd4b9['createTimestamp']),'personId':_0x4cd4b9[_0x477480(0xf6)],'resolved':_0x1363aa[_0x477480(0x119)]===I[_0x477480(0x115)],'unitId':_0x1e09b2,'subUnitId':_0x4cfe0d,'text':JSON[_0x477480(0x158)](_0x4cd4b9[_0x477480(0xe5)]),'parentId':_0x399fe0}),_0x592814=_0x11a92d(_0x1363aa[_0x477480(0x14c)][0x0]);return{..._0x592814,'children':_0x1363aa[_0x477480(0x14c)][_0x477480(0x127)](0x1)['map'](_0x40069c=>_0x11a92d(_0x40069c,_0x592814['id']))};}return null;}let g=class{constructor(_0x3fa6b6,_0x38107c,_0x4d3000,_0x5931f1){const _0x223fc0=_0x21325b;this[_0x223fc0(0x118)]=_0x3fa6b6,this['_userService']=_0x38107c,this[_0x223fc0(0x138)]=_0x4d3000,this[_0x223fc0(0x14a)]=_0x5931f1;}async['addComment'](_0xc7a085){const _0x35fede=_0x21325b;var _0x18c24e,_0x99a67f;const {parentId:_0x35969b,unitId:_0x103b37,text:_0xf6d774,threadId:_0x28fd81}=_0xc7a085,_0x2e373d=(_0x99a67f=(_0x18c24e=_0xf6d774[_0x35fede(0x105)])==null?void 0x0:_0x18c24e['filter'](_0x432964=>_0x432964[_0x35fede(0x11e)]===c[_0x35fede(0x150)]['COMMENT'])[_0x35fede(0x12a)](_0x8f8577=>_0x8f8577[_0x35fede(0xe4)]))!=null?_0x99a67f:[],_0x5bcadb=JSON['stringify'](_0xf6d774),_0x3a9495=(await this[_0x35fede(0x138)][_0x35fede(0x139)](_0x103b37))[_0x35fede(0x13f)]();if(_0x35969b){const _0x532d6e={'memberId':_0x3a9495,'unitId':_0x103b37,'content':_0x5bcadb,'mention':_0x2e373d,'threadId':_0x28fd81},_0x5000e9=(await this[_0x35fede(0x118)][_0x35fede(0x14f)](_0x35fede(0x109)+_0x103b37+_0x35fede(0x156),{'body':_0x532d6e}))[_0x35fede(0x11c)][_0x35fede(0x134)];return{..._0xc7a085,'id':_0x5000e9[_0x35fede(0xf2)],'dT':c[_0x35fede(0x112)](+_0x5000e9[_0x35fede(0x153)])[_0x35fede(0x157)](_0x35fede(0xf0)),'personId':_0x5000e9[_0x35fede(0xf6)]};}else{const _0x1ca4c5={'memberId':_0x3a9495,'unitId':_0x103b37,'content':_0x5bcadb,'mention':_0x2e373d},_0x4bc4c8=await this[_0x35fede(0x118)]['post'](_0x35fede(0x109)+_0x103b37+_0x35fede(0x140),{'body':_0x1ca4c5});return Y(_0x4bc4c8[_0x35fede(0x11c)][_0x35fede(0x124)],_0xc7a085);}}async['updateComment'](_0x1e70d6){const _0x556b42=_0x21325b;var _0x5085e3,_0x279bf6;const {text:_0x14fc6b,unitId:_0x2e1c0b}=_0x1e70d6,_0x573b1a=(_0x279bf6=(_0x5085e3=_0x14fc6b[_0x556b42(0x105)])==null?void 0x0:_0x5085e3[_0x556b42(0x163)](_0x319de6=>_0x319de6[_0x556b42(0x11e)]===c[_0x556b42(0x150)][_0x556b42(0x11b)])[_0x556b42(0x12a)](_0x5c8459=>_0x5c8459[_0x556b42(0xe4)]))!=null?_0x279bf6:[],_0x355146=JSON[_0x556b42(0x116)](_0x14fc6b),_0x27a64b=_0x1e70d6[_0x556b42(0xf8)],_0x16af89=_0x1e70d6['id'],_0x4a932a={'memberId':(await this['_sessionService'][_0x556b42(0x139)](_0x2e1c0b))[_0x556b42(0x13f)](),'unitId':_0x2e1c0b,'threadId':_0x27a64b,'mention':_0x573b1a,'content':_0x355146,'replyId':_0x16af89},_0x2ac193=await this[_0x556b42(0x118)]['post'](_0x556b42(0x109)+_0x2e1c0b+'/edit',{'body':_0x4a932a});return!_0x2ac193[_0x556b42(0x11c)][_0x556b42(0x13d)]||_0x2ac193[_0x556b42(0x11c)][_0x556b42(0x13d)][_0x556b42(0x10a)]===0x1;}async[_0x21325b(0x137)](_0x5aab2f){const _0x91a5a1=_0x21325b,{unitId:_0x573e02}=_0x5aab2f,_0x7967dc=_0x5aab2f['threadId'],_0x43d23d={'memberId':this[_0x91a5a1(0x14e)][_0x91a5a1(0x145)]()[_0x91a5a1(0x132)],'unitId':_0x573e02,'threadId':_0x7967dc,'solved':_0x5aab2f['resolved']?I['Solved']:I[_0x91a5a1(0x10b)]},_0x376f94=await this[_0x91a5a1(0x118)][_0x91a5a1(0x14f)](_0x91a5a1(0x109)+_0x573e02+_0x91a5a1(0x15e),{'body':_0x43d23d});return!_0x376f94[_0x91a5a1(0x11c)][_0x91a5a1(0x13d)]||_0x376f94[_0x91a5a1(0x11c)]['error'][_0x91a5a1(0x10a)]===0x1;}async[_0x21325b(0x11a)](_0x3c8435,_0x17ee20,_0x5c4dac,_0x54d7f4){const _0xc81f88=_0x21325b,_0xaadcc={'memberId':(await this[_0xc81f88(0x138)][_0xc81f88(0x139)](_0x3c8435))[_0xc81f88(0x13f)](),'threadId':_0x5c4dac,'replyId':_0x54d7f4,'unitId':_0x3c8435},_0x59cedd=await this[_0xc81f88(0x118)][_0xc81f88(0x14f)](_0xc81f88(0x109)+_0x3c8435+'/delete',{'body':_0xaadcc});return!_0x59cedd[_0xc81f88(0x11c)][_0xc81f88(0x13d)]||_0x59cedd['body'][_0xc81f88(0x13d)][_0xc81f88(0x10a)]===0x1;}async[_0x21325b(0x13a)](_0x4214f0,_0xdd3913,_0x21bba4){const _0x472bac=_0x21325b,_0x10b300={'unitId':_0x4214f0,'threadId':_0x21bba4},_0x5739f2=await this[_0x472bac(0x118)][_0x472bac(0x14f)](_0x472bac(0x109)+_0x4214f0+_0x472bac(0x101),{'body':_0x10b300}),_0x139bf9=_0x21bba4[_0x472bac(0x12a)](_0x1a25b4=>G(_0x5739f2[_0x472bac(0x11c)]['comments'][_0x1a25b4],_0x4214f0,_0xdd3913))[_0x472bac(0x163)](Boolean);return Object[_0x472bac(0x121)](_0x5739f2['body'][_0x472bac(0xfa)])[_0x472bac(0x154)](_0x3031b4=>{const _0x47505d=_0x472bac;this[_0x47505d(0x14e)][_0x47505d(0x103)](_0x3031b4);}),_0x139bf9;}['saveCommentToSnapshot'](_0x34a0ae){const _0x36e751=_0x21325b;return{'id':_0x34a0ae['id'],'threadId':_0x34a0ae['threadId'],'ref':_0x34a0ae[_0x36e751(0x120)]};}};g=x([_(0x0,c[_0x21325b(0x122)](P[_0x21325b(0x106)])),_(0x1,c[_0x21325b(0x122)](c['UserManagerService'])),_(0x2,c[_0x21325b(0x122)](b[_0x21325b(0x114)])),_(0x3,c[_0x21325b(0x122)](c[_0x21325b(0x162)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x32f5d6,_0x4077cc,_0x179f8c,_0x59b948)=>{const _0x398eb4=_0x21325b;for(var _0x22879f=_0x59b948>0x1?void 0x0:_0x59b948?H(_0x4077cc,_0x179f8c):_0x4077cc,_0x25c3e0=_0x32f5d6[_0x398eb4(0xfc)]-0x1,_0x4c5ab7;_0x25c3e0>=0x0;_0x25c3e0--)(_0x4c5ab7=_0x32f5d6[_0x25c3e0])&&(_0x22879f=_0x4c5ab7(_0x22879f)||_0x22879f);return _0x22879f;},y=(_0x54b555,_0xbbd3fc)=>(_0x3d706c,_0x56415a)=>_0xbbd3fc(_0x3d706c,_0x56415a,_0x54b555);let C=class extends c[_0x21325b(0x10e)]{constructor(_0x39f347,_0x2e6910){const _0x4f2ce6=_0x21325b;super(),this['_threadCommentDataSourceService']=_0x39f347,this[_0x4f2ce6(0x15a)]=_0x2e6910,this[_0x4f2ce6(0xf7)]();}[_0x21325b(0xf7)](){const _0xda75b8=_0x21325b;this[_0xda75b8(0x107)]['dataSource']=this[_0xda75b8(0x15a)],this[_0xda75b8(0x107)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x21325b(0x148)]),y(0x1,c[_0x21325b(0x122)](g))],C);var F=Object[_0x21325b(0xf5)],L=Object[_0x21325b(0xe8)],Z=(_0x1da269,_0x10da19,_0x29adf9)=>_0x10da19 in _0x1da269?F(_0x1da269,_0x10da19,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x29adf9}):_0x1da269[_0x10da19]=_0x29adf9,W=(_0x5b09ab,_0x35c451,_0x1030c7,_0x27fea2)=>{const _0x49d702=_0x21325b;for(var _0x478d68=_0x27fea2>0x1?void 0x0:_0x27fea2?L(_0x35c451,_0x1030c7):_0x35c451,_0x45d431=_0x5b09ab[_0x49d702(0xfc)]-0x1,_0x1858d4;_0x45d431>=0x0;_0x45d431--)(_0x1858d4=_0x5b09ab[_0x45d431])&&(_0x478d68=_0x1858d4(_0x478d68)||_0x478d68);return _0x478d68;},O=(_0x31212d,_0x27426f)=>(_0x2e5695,_0x2d1c0a)=>_0x27426f(_0x2e5695,_0x2d1c0a,_0x31212d),N=(_0xd0aa7f,_0x49024d,_0x456771)=>Z(_0xd0aa7f,typeof _0x49024d!=_0x21325b(0x10f)?_0x49024d+'':_0x49024d,_0x456771);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x21325b(0x111)]{constructor(_0xe0722c=D,_0x351257,_0x21f43b){const _0x119606=_0x21325b;super(),this[_0x119606(0x15c)]=_0xe0722c,this[_0x119606(0x14a)]=_0x351257,this['_configService']=_0x21f43b;const {..._0x45c58e}=c[_0x119606(0x13c)]({},D,this[_0x119606(0x15c)]);this[_0x119606(0x146)]['setConfig'](q,_0x45c58e);}[_0x21325b(0x15b)](){const _0x13b2ad=_0x21325b;[[g],[C],[p]][_0x13b2ad(0x154)](_0x4468da=>{const _0x4a0306=_0x13b2ad;this[_0x4a0306(0x14a)][_0x4a0306(0x12d)](_0x4468da);});}['onReady'](){const _0x376b38=_0x21325b;this[_0x376b38(0x14a)][_0x376b38(0x152)](C),this[_0x376b38(0x14a)][_0x376b38(0x152)](p);}},N(exports[_0x21325b(0x108)],_0x21325b(0x130),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x21325b(0x12f),c[_0x21325b(0x135)][_0x21325b(0x15f)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](j[_0x21325b(0x113)],b[_0x21325b(0xec)],T[_0x21325b(0x110)]),O(0x1,c[_0x21325b(0x122)](c['Injector'])),O(0x2,c[_0x21325b(0x10d)])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2feed8=_0x2a60;(function(_0x7fdb15,_0x3526ac){const _0x2934c9=_0x2a60,_0xa0563f=_0x7fdb15();while(!![]){try{const _0x5160ec=parseInt(_0x2934c9(0xae))/0x1*(parseInt(_0x2934c9(0x85))/0x2)+-parseInt(_0x2934c9(0xb2))/0x3*(parseInt(_0x2934c9(0x88))/0x4)+parseInt(_0x2934c9(0xcd))/0x5+-parseInt(_0x2934c9(0xe5))/0x6*(-parseInt(_0x2934c9(0xe4))/0x7)+-parseInt(_0x2934c9(0xe7))/0x8+parseInt(_0x2934c9(0xa3))/0x9+parseInt(_0x2934c9(0x9a))/0xa*(parseInt(_0x2934c9(0xc7))/0xb);if(_0x5160ec===_0x3526ac)break;else _0xa0563f['push'](_0xa0563f['shift']());}catch(_0x3ce4ed){_0xa0563f['push'](_0xa0563f['shift']());}}}(_0x4351,0x30e15));import{CommentService as _0x5a2656,CollaborationSessionService as _0x2f0330,UniverCollaborationClientPlugin as _0x2dcecf}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4d02c6}from'@univerjs-pro/license';import{dayjs as _0x4e076,UserManagerService as _0x291cc2,Inject as _0x54b547,Injector as _0x384bd7,Disposable as _0x4047dc,CustomRangeType as _0x377b33,UniverInstanceType as _0x5accf4,DependentOn as _0x1d2fba,IConfigService as _0x1edf32,Plugin as _0x2b2314,merge as _0x22d1b9}from'@univerjs/core';function _0x2a60(_0x1b8a47,_0x32daa3){const _0x435106=_0x4351();return _0x2a60=function(_0x2a6039,_0x202f71){_0x2a6039=_0x2a6039-0x82;let _0x2fb238=_0x435106[_0x2a6039];return _0x2fb238;},_0x2a60(_0x1b8a47,_0x32daa3);}import{UniverThreadCommentUIPlugin as _0x45d87a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4b30f9,IThreadCommentDataSourceService as _0x565532}from'@univerjs/thread-comment';import{bufferTime as _0x552255}from'rxjs';import{HTTPService as _0x14f5c7}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xbea222=>(_0xbea222[_0xbea222['OpenOrReOpen']=0x0]=_0x2feed8(0xd1),_0xbea222[_0xbea222[_0x2feed8(0x9c)]=0x1]=_0x2feed8(0x9c),_0xbea222[_0xbea222[_0x2feed8(0xac)]=-0x1]=_0x2feed8(0xac),_0xbea222))(I||{}),v=(_0x598372=>(_0x598372[_0x598372['Unknown']=0x0]=_0x2feed8(0xc4),_0x598372[_0x598372[_0x2feed8(0xca)]=0x1]='Add',_0x598372[_0x598372[_0x2feed8(0xcb)]=0x2]=_0x2feed8(0xcb),_0x598372[_0x598372[_0x2feed8(0x8e)]=0x3]=_0x2feed8(0x8e),_0x598372[_0x598372[_0x2feed8(0xa6)]=0x4]=_0x2feed8(0xa6),_0x598372[_0x598372[_0x2feed8(0xc5)]=0x5]=_0x2feed8(0xc5),_0x598372[_0x598372[_0x2feed8(0xac)]=-0x1]=_0x2feed8(0xac),_0x598372))(v||{});const D=_0xb3e74f=>_0x4e076(new Date(+_0xb3e74f))[_0x2feed8(0x98)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x18046d,_0x376c60)=>{const _0x5ce614=_0x2feed8,_0x211240=_0x18046d[_0x5ce614(0x90)](_0x291cc2),_0x4bcdca=_0x18046d[_0x5ce614(0x90)](_0x14f5c7);_0x376c60['forEach'](_0x3260fd=>{const _0x24e318=_0x5ce614;_0x211240['getUser'](_0x3260fd)&&_0x376c60[_0x24e318(0xa5)](_0x3260fd);}),_0x376c60['size']&&(await _0x4bcdca[_0x5ce614(0x90)](_0x5ce614(0x89),{'params':{'userIDs':[..._0x376c60]}}))[_0x5ce614(0xbe)][_0x5ce614(0xde)][_0x5ce614(0xb3)](_0x4c8d00=>{const _0x10a24d=_0x5ce614;_0x4c8d00&&_0x211240[_0x10a24d(0x9f)](_0x4c8d00);});};var K=Object[_0x2feed8(0x86)],V=(_0x1a8a70,_0x31485f,_0x170fea,_0x38f566)=>{const _0x430e03=_0x2feed8;for(var _0x585e33=_0x38f566>0x1?void 0x0:_0x38f566?K(_0x31485f,_0x170fea):_0x31485f,_0x25315f=_0x1a8a70[_0x430e03(0xbd)]-0x1,_0x1680ba;_0x25315f>=0x0;_0x25315f--)(_0x1680ba=_0x1a8a70[_0x25315f])&&(_0x585e33=_0x1680ba(_0x585e33)||_0x585e33);return _0x585e33;},p=(_0x26b951,_0x2b41f4)=>(_0x4e2f93,_0x30f46)=>_0x2b41f4(_0x4e2f93,_0x30f46,_0x26b951);let S=class extends _0x4047dc{constructor(_0x588d53,_0x52babf,_0x1d6a0c,_0x4d62f7){const _0x5eac6c=_0x2feed8;super(),this[_0x5eac6c(0x8f)]=_0x588d53,this['_threadCommentModel']=_0x52babf,this['_userService']=_0x1d6a0c,this[_0x5eac6c(0xd2)]=_0x4d62f7,this[_0x5eac6c(0x96)](),this[_0x5eac6c(0xe6)]();}[_0x2feed8(0xe6)](){const _0x56cdfb=_0x2feed8;this['disposeWithMe'](this[_0x56cdfb(0x83)][_0x56cdfb(0xdd)][_0x56cdfb(0xb8)](_0x552255(0x10))[_0x56cdfb(0xb6)](_0xb16343=>{const _0x18c978=_0x56cdfb,_0x57743f=new Set();_0xb16343[_0x18c978(0xb3)](_0xa583b2=>{const _0x44d436=_0x18c978;switch(_0xa583b2[_0x44d436(0xc6)]){case _0x44d436(0xc8):{const _0x33ff68=_0xa583b2[_0x44d436(0x91)][_0x44d436(0xdb)];_0x57743f[_0x44d436(0xc8)](_0x33ff68);break;}}}),B(this[_0x18c978(0xd2)],_0x57743f);}));}['_init'](){const _0x2fd0b9=_0x2feed8;this[_0x2fd0b9(0xd0)](this[_0x2fd0b9(0x8f)]['commentUpdate$'][_0x2fd0b9(0xb6)](async _0x2aef85=>{const _0x8e06c4=_0x2fd0b9;var _0x216195,_0x421d70,_0x53c674,_0x220ea3;const _0x502cd0=(_0x216195=this[_0x8e06c4(0x83)][_0x8e06c4(0xad)](_0x2aef85[_0x8e06c4(0x8c)])[_0x8e06c4(0x8b)](_0x19ef31=>_0x19ef31['threadId']===_0x2aef85[_0x8e06c4(0x8d)]))==null?void 0x0:_0x216195[_0x8e06c4(0xcf)];if(!_0x502cd0)return;const {unitId:_0x2b3fd9,subUnitId:_0x2ff9ab}=_0x502cd0;switch(_0x2aef85[_0x8e06c4(0xc1)]&&this[_0x8e06c4(0xdf)]['addUser'](_0x2aef85['user']),_0x2aef85[_0x8e06c4(0xc6)]){case v[_0x8e06c4(0xca)]:break;case v['Reply']:{this[_0x8e06c4(0x83)][_0x8e06c4(0xa8)](_0x2b3fd9,_0x2ff9ab,{'unitId':_0x2b3fd9,'subUnitId':_0x2ff9ab,'ref':'','id':_0x2aef85[_0x8e06c4(0xd3)],'dT':D(+_0x2aef85[_0x8e06c4(0xb7)]),'threadId':_0x2aef85[_0x8e06c4(0x8d)],'personId':(_0x53c674=(_0x421d70=_0x2aef85[_0x8e06c4(0xc1)])==null?void 0x0:_0x421d70[_0x8e06c4(0xc2)])!=null?_0x53c674:_0x2aef85[_0x8e06c4(0xb1)],'text':JSON['parse'](_0x2aef85[_0x8e06c4(0xe3)]),'parentId':_0x502cd0['id']});break;}case v[_0x8e06c4(0xa6)]:{const _0x570b22=this['_threadCommentModel'][_0x8e06c4(0xa0)](_0x2b3fd9,_0x2ff9ab,_0x2aef85[_0x8e06c4(0xd3)]);_0x570b22&&_0x570b22[_0x8e06c4(0x87)]&&this['_threadCommentModel'][_0x8e06c4(0xba)](_0x2b3fd9,_0x2ff9ab,_0x2aef85[_0x8e06c4(0xd3)]);break;}case v[_0x8e06c4(0x8e)]:{this[_0x8e06c4(0x83)][_0x8e06c4(0xda)](_0x2b3fd9,_0x2ff9ab,{'commentId':_0x2aef85[_0x8e06c4(0xd3)],'text':JSON[_0x8e06c4(0xb5)](_0x2aef85['content'])});break;}case v[_0x8e06c4(0xc5)]:{const _0x45b97a=(_0x220ea3=this[_0x8e06c4(0x83)][_0x8e06c4(0xad)](_0x2aef85['unitId'])['find'](_0x2924f3=>_0x2924f3['threadId']===_0x2aef85[_0x8e06c4(0x8d)]))==null?void 0x0:_0x220ea3[_0x8e06c4(0xcf)];_0x45b97a&&this[_0x8e06c4(0x83)][_0x8e06c4(0xe0)](_0x2b3fd9,_0x2ff9ab,_0x45b97a['id'],_0x2aef85[_0x8e06c4(0x82)]===I[_0x8e06c4(0x9c)]);break;}}}));}};S=V([p(0x0,_0x54b547(_0x5a2656)),p(0x1,_0x54b547(_0x4b30f9)),p(0x2,_0x54b547(_0x291cc2)),p(0x3,_0x54b547(_0x384bd7))],S);const z=_0x2feed8(0xa1),M={};function _0x4351(){const _0x935751=['getMemberID','length','body','filter','/edit','user','userID','YYYY/MM/DD\x20HH:mm','Unknown','Solve','type','615252hQqndQ','add','error','Add','Reply','values','112150WmVQvt','reply','root','disposeWithMe','OpenOrReOpen','_injector','replyId','/reply','map','_configService','resolved','listComments','_initDataSource','updateComment','personId','requireSession','commentUpdate$','users','_userService','resolveComment','comments','rangeType','content','872165aSQcWN','6arjOGR','_initUserSync','2828224fsrsuh','solved','_threadCommentModel','symbol','3830qOWmTP','getOwnPropertyDescriptor','parentId','32PvrtbB','/universer-api/user/list','UNIVER_UNKNOWN','find','unitId','threadId','Edit','_commentService','get','payload','code','comment','saveCommentToSnapshot','rangeId','_init','_config','format','ref','40ScHZAm','post','Solved','_sessionService','syncUpdateMutationToColla','addUser','getComment','thread-comment-data-source.config','setConfig','2276586GRFUYV','replies','delete','Delete','_httpService','addComment','getCurrentUser','COMMENT','_threadCommentDataSourceService','UNRECOGNIZED','getUnit','110CtxiaH','stringify','onStarting','userId','105231RDyLJm','forEach','customRanges','parse','subscribe','createTimestamp','pipe','pluginName','deleteComment','/universer-api/comment/unit/'];_0x4351=function(){return _0x935751;};return _0x4351();}var k=Object['getOwnPropertyDescriptor'],Q=(_0x2aedc3,_0x59a3b9,_0x47527d,_0x4e3f07)=>{const _0x163bb6=_0x2feed8;for(var _0x2a9616=_0x4e3f07>0x1?void 0x0:_0x4e3f07?k(_0x59a3b9,_0x47527d):_0x59a3b9,_0x6b13a=_0x2aedc3[_0x163bb6(0xbd)]-0x1,_0x5cfccd;_0x6b13a>=0x0;_0x6b13a--)(_0x5cfccd=_0x2aedc3[_0x6b13a])&&(_0x2a9616=_0x5cfccd(_0x2a9616)||_0x2a9616);return _0x2a9616;},_=(_0x25e7d6,_0x34fcf4)=>(_0x23d8af,_0x4b5f41)=>_0x34fcf4(_0x23d8af,_0x4b5f41,_0x25e7d6);function X(_0x9c281f,_0x572910){const _0x59e95a=_0x2feed8,_0x867b4=_0x9c281f[_0x59e95a(0xa4)][0x0];return{..._0x572910,'id':_0x867b4[_0x59e95a(0xd3)],'resolved':_0x9c281f['solved']===0x1,'dT':D(_0x867b4[_0x59e95a(0xb7)]),'personId':_0x867b4['userId'],'threadId':_0x867b4[_0x59e95a(0x8d)]};}function ee(_0x575844,_0x398e93,_0x393516){const _0x2dfa51=_0x2feed8;var _0x16aa30,_0x4eb052;if(((_0x4eb052=(_0x16aa30=_0x575844==null?void 0x0:_0x575844['replies'])==null?void 0x0:_0x16aa30['length'])!=null?_0x4eb052:0x0)>0x0){const _0x52330b=(_0x529097,_0x5dae17)=>({'id':_0x529097[_0x2dfa51(0xd3)],'threadId':_0x529097[_0x2dfa51(0x8d)],'dT':D(_0x529097[_0x2dfa51(0xb7)]),'personId':_0x529097['userId'],'resolved':_0x575844['solved']===I['Solved'],'unitId':_0x398e93,'subUnitId':_0x393516,'text':JSON[_0x2dfa51(0xb5)](_0x529097['content']),'parentId':_0x5dae17}),_0xe699e8=_0x52330b(_0x575844[_0x2dfa51(0xa4)][0x0]);return{..._0xe699e8,'children':_0x575844[_0x2dfa51(0xa4)]['slice'](0x1)[_0x2dfa51(0xd5)](_0x5e75af=>_0x52330b(_0x5e75af,_0xe699e8['id']))};}return null;}let f=class{constructor(_0x303c09,_0x173239,_0x5a8dca,_0x1722e0){const _0x2f9b9c=_0x2feed8;this[_0x2f9b9c(0xa7)]=_0x303c09,this[_0x2f9b9c(0xdf)]=_0x173239,this[_0x2f9b9c(0x9d)]=_0x5a8dca,this[_0x2f9b9c(0xd2)]=_0x1722e0;}async[_0x2feed8(0xa8)](_0x401d60){const _0x3f0322=_0x2feed8;var _0x5e66b2,_0x37ff68;const {parentId:_0x48486b,unitId:_0x257766,text:_0xa4bcc1,threadId:_0x4bc5d1}=_0x401d60,_0x12a499=(_0x37ff68=(_0x5e66b2=_0xa4bcc1[_0x3f0322(0xb4)])==null?void 0x0:_0x5e66b2['filter'](_0x537a9f=>_0x537a9f['rangeType']===_0x377b33[_0x3f0322(0xaa)])[_0x3f0322(0xd5)](_0x168b62=>_0x168b62[_0x3f0322(0x95)]))!=null?_0x37ff68:[],_0x2ed0f3=JSON[_0x3f0322(0xaf)](_0xa4bcc1),_0x42a02a=(await this[_0x3f0322(0x9d)][_0x3f0322(0xdc)](_0x257766))[_0x3f0322(0xbc)]();if(_0x48486b){const _0xd8bc64={'memberId':_0x42a02a,'unitId':_0x257766,'content':_0x2ed0f3,'mention':_0x12a499,'threadId':_0x4bc5d1},_0x207a2e=(await this[_0x3f0322(0xa7)][_0x3f0322(0x9b)](_0x3f0322(0xbb)+_0x257766+_0x3f0322(0xd4),{'body':_0xd8bc64}))[_0x3f0322(0xbe)][_0x3f0322(0xce)];return{..._0x401d60,'id':_0x207a2e[_0x3f0322(0xd3)],'dT':_0x4e076(+_0x207a2e[_0x3f0322(0xb7)])[_0x3f0322(0x98)](_0x3f0322(0xc3)),'personId':_0x207a2e[_0x3f0322(0xb1)]};}else{const _0x17666c={'memberId':_0x42a02a,'unitId':_0x257766,'content':_0x2ed0f3,'mention':_0x12a499},_0x5205be=await this['_httpService'][_0x3f0322(0x9b)](_0x3f0322(0xbb)+_0x257766+'/add',{'body':_0x17666c});return X(_0x5205be[_0x3f0322(0xbe)][_0x3f0322(0x93)],_0x401d60);}}async[_0x2feed8(0xda)](_0x42f97f){const _0x8421f6=_0x2feed8;var _0x1bf642,_0x19522b;const {text:_0x1d9105,unitId:_0x493233}=_0x42f97f,_0x2d68ec=(_0x19522b=(_0x1bf642=_0x1d9105['customRanges'])==null?void 0x0:_0x1bf642[_0x8421f6(0xbf)](_0x5c28ff=>_0x5c28ff[_0x8421f6(0xe2)]===_0x377b33[_0x8421f6(0xaa)])[_0x8421f6(0xd5)](_0xb432d9=>_0xb432d9[_0x8421f6(0x95)]))!=null?_0x19522b:[],_0x2424f5=JSON[_0x8421f6(0xaf)](_0x1d9105),_0x4f1221=_0x42f97f[_0x8421f6(0x8d)],_0x8ec8f6=_0x42f97f['id'],_0x39c3f2={'memberId':(await this[_0x8421f6(0x9d)][_0x8421f6(0xdc)](_0x493233))['getMemberID'](),'unitId':_0x493233,'threadId':_0x4f1221,'mention':_0x2d68ec,'content':_0x2424f5,'replyId':_0x8ec8f6},_0x5a6932=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x493233+_0x8421f6(0xc0),{'body':_0x39c3f2});return!_0x5a6932[_0x8421f6(0xbe)][_0x8421f6(0xc9)]||_0x5a6932[_0x8421f6(0xbe)][_0x8421f6(0xc9)][_0x8421f6(0x92)]===0x1;}async[_0x2feed8(0xe0)](_0x1b21d7){const _0x5c8778=_0x2feed8,{unitId:_0x316769}=_0x1b21d7,_0x1129f8=_0x1b21d7[_0x5c8778(0x8d)],_0x534868={'memberId':this[_0x5c8778(0xdf)][_0x5c8778(0xa9)]()[_0x5c8778(0xc2)],'unitId':_0x316769,'threadId':_0x1129f8,'solved':_0x1b21d7[_0x5c8778(0xd7)]?I[_0x5c8778(0x9c)]:I[_0x5c8778(0xd1)]},_0x17147d=await this[_0x5c8778(0xa7)][_0x5c8778(0x9b)]('/universer-api/comment/unit/'+_0x316769+'/solved',{'body':_0x534868});return!_0x17147d['body'][_0x5c8778(0xc9)]||_0x17147d[_0x5c8778(0xbe)][_0x5c8778(0xc9)]['code']===0x1;}async[_0x2feed8(0xba)](_0x2d3247,_0x12bf58,_0x518f7f,_0x5750c5){const _0x5aaab1=_0x2feed8,_0x23f640={'memberId':(await this['_sessionService'][_0x5aaab1(0xdc)](_0x2d3247))[_0x5aaab1(0xbc)](),'threadId':_0x518f7f,'replyId':_0x5750c5,'unitId':_0x2d3247},_0x9dc52c=await this[_0x5aaab1(0xa7)][_0x5aaab1(0x9b)]('/universer-api/comment/unit/'+_0x2d3247+'/delete',{'body':_0x23f640});return!_0x9dc52c['body'][_0x5aaab1(0xc9)]||_0x9dc52c[_0x5aaab1(0xbe)][_0x5aaab1(0xc9)][_0x5aaab1(0x92)]===0x1;}async[_0x2feed8(0xd8)](_0x1affdc,_0x220a7a,_0x18918e){const _0xf68fba=_0x2feed8,_0x5f27a7={'unitId':_0x1affdc,'threadId':_0x18918e},_0x504561=await this[_0xf68fba(0xa7)]['post'](_0xf68fba(0xbb)+_0x1affdc+'/list',{'body':_0x5f27a7}),_0x541393=_0x18918e[_0xf68fba(0xd5)](_0x3150ce=>ee(_0x504561['body'][_0xf68fba(0xe1)][_0x3150ce],_0x1affdc,_0x220a7a))[_0xf68fba(0xbf)](Boolean);return Object[_0xf68fba(0xcc)](_0x504561[_0xf68fba(0xbe)][_0xf68fba(0xde)])[_0xf68fba(0xb3)](_0x231657=>{const _0x5557f1=_0xf68fba;this[_0x5557f1(0xdf)][_0x5557f1(0x9f)](_0x231657);}),_0x541393;}[_0x2feed8(0x94)](_0x1a9fa7){const _0x35532c=_0x2feed8;return{'id':_0x1a9fa7['id'],'threadId':_0x1a9fa7['threadId'],'ref':_0x1a9fa7[_0x35532c(0x99)]};}};f=Q([_(0x0,_0x54b547(_0x14f5c7)),_(0x1,_0x54b547(_0x291cc2)),_(0x2,_0x54b547(_0x2f0330)),_(0x3,_0x54b547(_0x384bd7))],f);var re=Object[_0x2feed8(0x86)],te=(_0x28c9ba,_0x12440a,_0x42355e,_0x278fcc)=>{const _0x3b62a3=_0x2feed8;for(var _0x4fc92a=_0x278fcc>0x1?void 0x0:_0x278fcc?re(_0x12440a,_0x42355e):_0x12440a,_0x3e6f29=_0x28c9ba[_0x3b62a3(0xbd)]-0x1,_0x2e5ca4;_0x3e6f29>=0x0;_0x3e6f29--)(_0x2e5ca4=_0x28c9ba[_0x3e6f29])&&(_0x4fc92a=_0x2e5ca4(_0x4fc92a)||_0x4fc92a);return _0x4fc92a;},N=(_0x5169db,_0x48cf87)=>(_0x376115,_0x1e8bfb)=>_0x48cf87(_0x376115,_0x1e8bfb,_0x5169db);let g=class extends _0x4047dc{constructor(_0x3c9d78,_0x17dcde){const _0x2fb7b6=_0x2feed8;super(),this[_0x2fb7b6(0xab)]=_0x3c9d78,this['_threadCommentDataSource']=_0x17dcde,this[_0x2fb7b6(0xd9)]();}[_0x2feed8(0xd9)](){const _0x31f800=_0x2feed8;this[_0x31f800(0xab)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x31f800(0x9e)]=!0x1;}};g=te([N(0x0,_0x565532),N(0x1,_0x54b547(f))],g);var se=Object['defineProperty'],oe=Object[_0x2feed8(0x86)],ne=(_0xab68f5,_0x4a1cf2,_0x40cd4e)=>_0x4a1cf2 in _0xab68f5?se(_0xab68f5,_0x4a1cf2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x40cd4e}):_0xab68f5[_0x4a1cf2]=_0x40cd4e,ie=(_0x552fbf,_0xcc4d30,_0x337a28,_0x3c4178)=>{const _0x510033=_0x2feed8;for(var _0x57ce91=_0x3c4178>0x1?void 0x0:_0x3c4178?oe(_0xcc4d30,_0x337a28):_0xcc4d30,_0x28ae3d=_0x552fbf[_0x510033(0xbd)]-0x1,_0x3dec37;_0x28ae3d>=0x0;_0x28ae3d--)(_0x3dec37=_0x552fbf[_0x28ae3d])&&(_0x57ce91=_0x3dec37(_0x57ce91)||_0x57ce91);return _0x57ce91;},w=(_0x501066,_0x7e3906)=>(_0x573cda,_0x501475)=>_0x7e3906(_0x573cda,_0x501475,_0x501066),$=(_0x1595a3,_0x50f633,_0x4cfd0d)=>ne(_0x1595a3,typeof _0x50f633!=_0x2feed8(0x84)?_0x50f633+'':_0x50f633,_0x4cfd0d);let b=class extends _0x2b2314{constructor(_0x536fc7=M,_0x370212,_0x1bbdc9){const _0x4c2fdd=_0x2feed8;super(),this[_0x4c2fdd(0x97)]=_0x536fc7,this[_0x4c2fdd(0xd2)]=_0x370212,this['_configService']=_0x1bbdc9;const {..._0x441adb}=_0x22d1b9({},M,this[_0x4c2fdd(0x97)]);this[_0x4c2fdd(0xd6)][_0x4c2fdd(0xa2)](z,_0x441adb);}[_0x2feed8(0xb0)](){const _0xefbef1=_0x2feed8;[[f],[g],[S]][_0xefbef1(0xb3)](_0x19177b=>{const _0x17c533=_0xefbef1;this['_injector'][_0x17c533(0xc8)](_0x19177b);});}['onReady'](){const _0x9990ff=_0x2feed8;this[_0x9990ff(0xd2)][_0x9990ff(0x90)](g),this[_0x9990ff(0xd2)][_0x9990ff(0x90)](S);}};$(b,_0x2feed8(0xb9),W),$(b,_0x2feed8(0xc6),_0x5accf4[_0x2feed8(0x8a)]),b=ie([_0x1d2fba(_0x45d87a,_0x2dcecf,_0x4d02c6),w(0x1,_0x54b547(_0x384bd7)),w(0x2,_0x1edf32)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0xd7710b=_0x1d47;function _0x1d47(_0x42c727,_0x5bfbe4){const _0x5b7d2a=_0x5b7d();return _0x1d47=function(_0x1d4756,_0x19f082){_0x1d4756=_0x1d4756-0xd7;let _0x2956af=_0x5b7d2a[_0x1d4756];return _0x2956af;},_0x1d47(_0x42c727,_0x5bfbe4);}(function(_0x438eff,_0x43a904){const _0x149fad=_0x1d47,_0x56e657=_0x438eff();while(!![]){try{const _0x45cd28=parseInt(_0x149fad(0xfa))/0x1+-parseInt(_0x149fad(0x120))/0x2*(-parseInt(_0x149fad(0x10e))/0x3)+parseInt(_0x149fad(0x128))/0x4*(-parseInt(_0x149fad(0x126))/0x5)+-parseInt(_0x149fad(0x134))/0x6+-parseInt(_0x149fad(0xe0))/0x7*(parseInt(_0x149fad(0xec))/0x8)+parseInt(_0x149fad(0x114))/0x9*(-parseInt(_0x149fad(0xd9))/0xa)+parseInt(_0x149fad(0xfe))/0xb;if(_0x45cd28===_0x43a904)break;else _0x56e657['push'](_0x56e657['shift']());}catch(_0x32d357){_0x56e657['push'](_0x56e657['shift']());}}}(_0x5b7d,0x65113));function _0x5b7d(){const _0x4b29e0=['forEach','YYYY/MM/DD\x20HH:mm','_httpService','user','585jbeixQ','getComment','onStarting','threadId','Solve','type','format','saveCommentToSnapshot','users','getUnit','resolveComment','updateComment','23468mMnySj','UNIVER_UNKNOWN','/universer-api/comment/unit/','_threadCommentDataSourceService','setConfig','map','5jyrQIZ','comments','2336444KLSkJH','requireSession','slice','getOwnPropertyDescriptor','replies','_injector','onReady','addUser','UNRECOGNIZED','error','_initUserSync','_sessionService','364824iVylat','post','/reply','Reply','find','rangeId','/delete','Add','_threadCommentDataSource','29570BRvUdm','get','rangeType','/add','Unknown','userID','_commentService','7BanChc','_config','code','Delete','root','getMemberID','userId','subscribe','length','Edit','_init','/edit','5753544WzaNCj','reply','OpenOrReOpen','createTimestamp','_configService','/solved','add','addComment','_userService','_threadCommentModel','size','deleteComment','unitId','replyId','559453mDbYvO','Solved','personId','comment','14744697uGXjLN','_initDataSource','content','body','parse','parentId','disposeWithMe','payload','COMMENT','dataSource','filter','customRanges','solved','getCurrentUser','delete','values','18qbnfNh','stringify'];_0x5b7d=function(){return _0x4b29e0;};return _0x5b7d();}import{CommentService as _0x16caf3,CollaborationSessionService as _0x457475,UniverCollaborationClientPlugin as _0x1937c0}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5d8b63}from'@univerjs-pro/license';import{dayjs as _0x2f02a1,UserManagerService as _0x464d0b,Inject as _0x1eb853,Injector as _0x47d469,Disposable as _0xad8c05,CustomRangeType as _0x4ee5e9,UniverInstanceType as _0x11d5ed,DependentOn as _0x836a12,IConfigService as _0x37892c,Plugin as _0x1a8cdb,merge as _0x3392b3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4818f8}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x31a474,IThreadCommentDataSourceService as _0x1f6f34}from'@univerjs/thread-comment';import{bufferTime as _0x59cf22}from'rxjs';import{HTTPService as _0xd74d41}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2c5ed3=>(_0x2c5ed3[_0x2c5ed3['OpenOrReOpen']=0x0]=_0xd7710b(0xee),_0x2c5ed3[_0x2c5ed3[_0xd7710b(0xfb)]=0x1]='Solved',_0x2c5ed3[_0x2c5ed3[_0xd7710b(0x130)]=-0x1]=_0xd7710b(0x130),_0x2c5ed3))(I||{}),v=(_0x5f4b1e=>(_0x5f4b1e[_0x5f4b1e[_0xd7710b(0xdd)]=0x0]=_0xd7710b(0xdd),_0x5f4b1e[_0x5f4b1e[_0xd7710b(0xd7)]=0x1]=_0xd7710b(0xd7),_0x5f4b1e[_0x5f4b1e['Reply']=0x2]='Reply',_0x5f4b1e[_0x5f4b1e[_0xd7710b(0xe9)]=0x3]=_0xd7710b(0xe9),_0x5f4b1e[_0x5f4b1e[_0xd7710b(0xe3)]=0x4]=_0xd7710b(0xe3),_0x5f4b1e[_0x5f4b1e[_0xd7710b(0x118)]=0x5]=_0xd7710b(0x118),_0x5f4b1e[_0x5f4b1e[_0xd7710b(0x130)]=-0x1]=_0xd7710b(0x130),_0x5f4b1e))(v||{});const D=_0x19b0b3=>_0x2f02a1(new Date(+_0x19b0b3))[_0xd7710b(0x11a)](_0xd7710b(0x111)),B=async(_0x424b12,_0x5a9223)=>{const _0x3ea08c=_0xd7710b,_0x4c325b=_0x424b12[_0x3ea08c(0xda)](_0x464d0b),_0x3cce24=_0x424b12[_0x3ea08c(0xda)](_0xd74d41);_0x5a9223['forEach'](_0x3eb237=>{const _0x46390a=_0x3ea08c;_0x4c325b['getUser'](_0x3eb237)&&_0x5a9223[_0x46390a(0x10c)](_0x3eb237);}),_0x5a9223[_0x3ea08c(0xf6)]&&(await _0x3cce24[_0x3ea08c(0xda)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5a9223]}}))[_0x3ea08c(0x101)][_0x3ea08c(0x11c)][_0x3ea08c(0x110)](_0x556b4c=>{_0x556b4c&&_0x4c325b['addUser'](_0x556b4c);});};var K=Object[_0xd7710b(0x12b)],V=(_0x49d2f3,_0x5a3556,_0x57b034,_0x1fa525)=>{for(var _0x14cab0=_0x1fa525>0x1?void 0x0:_0x1fa525?K(_0x5a3556,_0x57b034):_0x5a3556,_0x3fd46f=_0x49d2f3['length']-0x1,_0x14647d;_0x3fd46f>=0x0;_0x3fd46f--)(_0x14647d=_0x49d2f3[_0x3fd46f])&&(_0x14cab0=_0x14647d(_0x14cab0)||_0x14cab0);return _0x14cab0;},p=(_0x4aa503,_0x5c9c3c)=>(_0x39ca9f,_0x5446c1)=>_0x5c9c3c(_0x39ca9f,_0x5446c1,_0x4aa503);let S=class extends _0xad8c05{constructor(_0x347bfe,_0x46e80a,_0x337dc7,_0x41d25c){const _0x25b102=_0xd7710b;super(),this[_0x25b102(0xdf)]=_0x347bfe,this[_0x25b102(0xf5)]=_0x46e80a,this[_0x25b102(0xf4)]=_0x337dc7,this[_0x25b102(0x12d)]=_0x41d25c,this[_0x25b102(0xea)](),this[_0x25b102(0x132)]();}[_0xd7710b(0x132)](){const _0x589ad9=_0xd7710b;this[_0x589ad9(0x104)](this[_0x589ad9(0xf5)]['commentUpdate$']['pipe'](_0x59cf22(0x10))[_0x589ad9(0xe7)](_0x4c4e76=>{const _0x2a3a67=_0x589ad9,_0x538fd7=new Set();_0x4c4e76[_0x2a3a67(0x110)](_0x5a6288=>{const _0x5a3d76=_0x2a3a67;switch(_0x5a6288[_0x5a3d76(0x119)]){case'add':{const _0x2e9161=_0x5a6288[_0x5a3d76(0x105)][_0x5a3d76(0xfc)];_0x538fd7[_0x5a3d76(0xf2)](_0x2e9161);break;}}}),B(this[_0x2a3a67(0x12d)],_0x538fd7);}));}[_0xd7710b(0xea)](){const _0xb2c303=_0xd7710b;this['disposeWithMe'](this[_0xb2c303(0xdf)]['commentUpdate$'][_0xb2c303(0xe7)](async _0x16b2ab=>{const _0x4f1cd9=_0xb2c303;var _0x32b6ac,_0x11dbb8,_0x4728f3,_0x211002;const _0x2462e4=(_0x32b6ac=this[_0x4f1cd9(0xf5)][_0x4f1cd9(0x11d)](_0x16b2ab[_0x4f1cd9(0xf8)])[_0x4f1cd9(0x138)](_0x2ad9b7=>_0x2ad9b7[_0x4f1cd9(0x117)]===_0x16b2ab['threadId']))==null?void 0x0:_0x32b6ac[_0x4f1cd9(0xe4)];if(!_0x2462e4)return;const {unitId:_0x4e2219,subUnitId:_0xa856f1}=_0x2462e4;switch(_0x16b2ab['user']&&this[_0x4f1cd9(0xf4)][_0x4f1cd9(0x12f)](_0x16b2ab[_0x4f1cd9(0x113)]),_0x16b2ab[_0x4f1cd9(0x119)]){case v[_0x4f1cd9(0xd7)]:break;case v[_0x4f1cd9(0x137)]:{this[_0x4f1cd9(0xf5)][_0x4f1cd9(0xf3)](_0x4e2219,_0xa856f1,{'unitId':_0x4e2219,'subUnitId':_0xa856f1,'ref':'','id':_0x16b2ab[_0x4f1cd9(0xf9)],'dT':D(+_0x16b2ab[_0x4f1cd9(0xef)]),'threadId':_0x16b2ab['threadId'],'personId':(_0x4728f3=(_0x11dbb8=_0x16b2ab['user'])==null?void 0x0:_0x11dbb8['userID'])!=null?_0x4728f3:_0x16b2ab['userId'],'text':JSON['parse'](_0x16b2ab[_0x4f1cd9(0x100)]),'parentId':_0x2462e4['id']});break;}case v[_0x4f1cd9(0xe3)]:{const _0x103231=this['_threadCommentModel'][_0x4f1cd9(0x115)](_0x4e2219,_0xa856f1,_0x16b2ab['replyId']);_0x103231&&_0x103231[_0x4f1cd9(0x103)]&&this[_0x4f1cd9(0xf5)][_0x4f1cd9(0xf7)](_0x4e2219,_0xa856f1,_0x16b2ab['replyId']);break;}case v[_0x4f1cd9(0xe9)]:{this['_threadCommentModel'][_0x4f1cd9(0x11f)](_0x4e2219,_0xa856f1,{'commentId':_0x16b2ab[_0x4f1cd9(0xf9)],'text':JSON[_0x4f1cd9(0x102)](_0x16b2ab[_0x4f1cd9(0x100)])});break;}case v[_0x4f1cd9(0x118)]:{const _0x2512c3=(_0x211002=this[_0x4f1cd9(0xf5)][_0x4f1cd9(0x11d)](_0x16b2ab['unitId'])[_0x4f1cd9(0x138)](_0x466030=>_0x466030[_0x4f1cd9(0x117)]===_0x16b2ab[_0x4f1cd9(0x117)]))==null?void 0x0:_0x211002['root'];_0x2512c3&&this[_0x4f1cd9(0xf5)][_0x4f1cd9(0x11e)](_0x4e2219,_0xa856f1,_0x2512c3['id'],_0x16b2ab[_0x4f1cd9(0x10a)]===I[_0x4f1cd9(0xfb)]);break;}}}));}};S=V([p(0x0,_0x1eb853(_0x16caf3)),p(0x1,_0x1eb853(_0x31a474)),p(0x2,_0x1eb853(_0x464d0b)),p(0x3,_0x1eb853(_0x47d469))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x2ca295,_0x1d698b,_0x17c709,_0x5bd19f)=>{const _0x54f459=_0xd7710b;for(var _0x30752a=_0x5bd19f>0x1?void 0x0:_0x5bd19f?k(_0x1d698b,_0x17c709):_0x1d698b,_0x2d17a7=_0x2ca295[_0x54f459(0xe8)]-0x1,_0x49259e;_0x2d17a7>=0x0;_0x2d17a7--)(_0x49259e=_0x2ca295[_0x2d17a7])&&(_0x30752a=_0x49259e(_0x30752a)||_0x30752a);return _0x30752a;},_=(_0x4a285a,_0x4f5511)=>(_0x4a5bad,_0xbe27a3)=>_0x4f5511(_0x4a5bad,_0xbe27a3,_0x4a285a);function X(_0x3dbcd6,_0x2c83d5){const _0x52b9a0=_0xd7710b,_0x1d3100=_0x3dbcd6[_0x52b9a0(0x12c)][0x0];return{..._0x2c83d5,'id':_0x1d3100[_0x52b9a0(0xf9)],'resolved':_0x3dbcd6[_0x52b9a0(0x10a)]===0x1,'dT':D(_0x1d3100['createTimestamp']),'personId':_0x1d3100['userId'],'threadId':_0x1d3100[_0x52b9a0(0x117)]};}function ee(_0x34d1ed,_0x30a5ce,_0x41fbef){const _0x32f5e7=_0xd7710b;var _0x3fe4ec,_0x348b5a;if(((_0x348b5a=(_0x3fe4ec=_0x34d1ed==null?void 0x0:_0x34d1ed[_0x32f5e7(0x12c)])==null?void 0x0:_0x3fe4ec[_0x32f5e7(0xe8)])!=null?_0x348b5a:0x0)>0x0){const _0x36779e=(_0x9313bd,_0x479468)=>({'id':_0x9313bd[_0x32f5e7(0xf9)],'threadId':_0x9313bd[_0x32f5e7(0x117)],'dT':D(_0x9313bd['createTimestamp']),'personId':_0x9313bd[_0x32f5e7(0xe6)],'resolved':_0x34d1ed['solved']===I[_0x32f5e7(0xfb)],'unitId':_0x30a5ce,'subUnitId':_0x41fbef,'text':JSON[_0x32f5e7(0x102)](_0x9313bd['content']),'parentId':_0x479468}),_0xa46b0c=_0x36779e(_0x34d1ed[_0x32f5e7(0x12c)][0x0]);return{..._0xa46b0c,'children':_0x34d1ed[_0x32f5e7(0x12c)][_0x32f5e7(0x12a)](0x1)['map'](_0x3f1e85=>_0x36779e(_0x3f1e85,_0xa46b0c['id']))};}return null;}let f=class{constructor(_0x3bc38f,_0x28ef09,_0x366ffe,_0x44b4f0){const _0x188712=_0xd7710b;this[_0x188712(0x112)]=_0x3bc38f,this[_0x188712(0xf4)]=_0x28ef09,this[_0x188712(0x133)]=_0x366ffe,this[_0x188712(0x12d)]=_0x44b4f0;}async['addComment'](_0x4f79e6){const _0x53c2b7=_0xd7710b;var _0x7220b9,_0x2587f3;const {parentId:_0x5c30bb,unitId:_0x1a906e,text:_0x10c847,threadId:_0x3bfbc1}=_0x4f79e6,_0x1e5cbd=(_0x2587f3=(_0x7220b9=_0x10c847[_0x53c2b7(0x109)])==null?void 0x0:_0x7220b9[_0x53c2b7(0x108)](_0xed1617=>_0xed1617[_0x53c2b7(0xdb)]===_0x4ee5e9[_0x53c2b7(0x106)])[_0x53c2b7(0x125)](_0x51b76a=>_0x51b76a[_0x53c2b7(0x139)]))!=null?_0x2587f3:[],_0x27e53b=JSON['stringify'](_0x10c847),_0x488780=(await this[_0x53c2b7(0x133)][_0x53c2b7(0x129)](_0x1a906e))[_0x53c2b7(0xe5)]();if(_0x5c30bb){const _0x1d30a0={'memberId':_0x488780,'unitId':_0x1a906e,'content':_0x27e53b,'mention':_0x1e5cbd,'threadId':_0x3bfbc1},_0x43c0ea=(await this[_0x53c2b7(0x112)][_0x53c2b7(0x135)](_0x53c2b7(0x122)+_0x1a906e+_0x53c2b7(0x136),{'body':_0x1d30a0}))[_0x53c2b7(0x101)][_0x53c2b7(0xed)];return{..._0x4f79e6,'id':_0x43c0ea['replyId'],'dT':_0x2f02a1(+_0x43c0ea[_0x53c2b7(0xef)])['format'](_0x53c2b7(0x111)),'personId':_0x43c0ea['userId']};}else{const _0x36f390={'memberId':_0x488780,'unitId':_0x1a906e,'content':_0x27e53b,'mention':_0x1e5cbd},_0x484bcc=await this[_0x53c2b7(0x112)][_0x53c2b7(0x135)]('/universer-api/comment/unit/'+_0x1a906e+_0x53c2b7(0xdc),{'body':_0x36f390});return X(_0x484bcc[_0x53c2b7(0x101)][_0x53c2b7(0xfd)],_0x4f79e6);}}async[_0xd7710b(0x11f)](_0x1f8a5a){const _0x5e4f97=_0xd7710b;var _0x323766,_0x288817;const {text:_0x4bf748,unitId:_0x3b66a5}=_0x1f8a5a,_0x40dd43=(_0x288817=(_0x323766=_0x4bf748[_0x5e4f97(0x109)])==null?void 0x0:_0x323766[_0x5e4f97(0x108)](_0x88f52f=>_0x88f52f['rangeType']===_0x4ee5e9['COMMENT'])[_0x5e4f97(0x125)](_0x2de504=>_0x2de504['rangeId']))!=null?_0x288817:[],_0x37a1f6=JSON[_0x5e4f97(0x10f)](_0x4bf748),_0x426190=_0x1f8a5a[_0x5e4f97(0x117)],_0x5ecd9b=_0x1f8a5a['id'],_0x48fa59={'memberId':(await this['_sessionService'][_0x5e4f97(0x129)](_0x3b66a5))[_0x5e4f97(0xe5)](),'unitId':_0x3b66a5,'threadId':_0x426190,'mention':_0x40dd43,'content':_0x37a1f6,'replyId':_0x5ecd9b},_0x3836ad=await this[_0x5e4f97(0x112)][_0x5e4f97(0x135)](_0x5e4f97(0x122)+_0x3b66a5+_0x5e4f97(0xeb),{'body':_0x48fa59});return!_0x3836ad['body'][_0x5e4f97(0x131)]||_0x3836ad[_0x5e4f97(0x101)][_0x5e4f97(0x131)][_0x5e4f97(0xe2)]===0x1;}async['resolveComment'](_0x5a30b1){const _0x2e2cde=_0xd7710b,{unitId:_0x1d38c4}=_0x5a30b1,_0x38f42b=_0x5a30b1['threadId'],_0x3e12dc={'memberId':this[_0x2e2cde(0xf4)][_0x2e2cde(0x10b)]()[_0x2e2cde(0xde)],'unitId':_0x1d38c4,'threadId':_0x38f42b,'solved':_0x5a30b1['resolved']?I['Solved']:I[_0x2e2cde(0xee)]},_0x4cc3ff=await this['_httpService']['post'](_0x2e2cde(0x122)+_0x1d38c4+_0x2e2cde(0xf1),{'body':_0x3e12dc});return!_0x4cc3ff[_0x2e2cde(0x101)][_0x2e2cde(0x131)]||_0x4cc3ff[_0x2e2cde(0x101)][_0x2e2cde(0x131)]['code']===0x1;}async['deleteComment'](_0x3cc431,_0x1619c0,_0x48c0b3,_0x5b4297){const _0x4cb6a6=_0xd7710b,_0x3f27dc={'memberId':(await this[_0x4cb6a6(0x133)][_0x4cb6a6(0x129)](_0x3cc431))['getMemberID'](),'threadId':_0x48c0b3,'replyId':_0x5b4297,'unitId':_0x3cc431},_0x5a2009=await this[_0x4cb6a6(0x112)]['post'](_0x4cb6a6(0x122)+_0x3cc431+_0x4cb6a6(0x13a),{'body':_0x3f27dc});return!_0x5a2009[_0x4cb6a6(0x101)][_0x4cb6a6(0x131)]||_0x5a2009[_0x4cb6a6(0x101)][_0x4cb6a6(0x131)]['code']===0x1;}async['listComments'](_0x3b959e,_0x3db547,_0x215cc6){const _0x2a6c4b=_0xd7710b,_0x216491={'unitId':_0x3b959e,'threadId':_0x215cc6},_0x51eba8=await this[_0x2a6c4b(0x112)][_0x2a6c4b(0x135)]('/universer-api/comment/unit/'+_0x3b959e+'/list',{'body':_0x216491}),_0x552a57=_0x215cc6[_0x2a6c4b(0x125)](_0x1625f7=>ee(_0x51eba8[_0x2a6c4b(0x101)][_0x2a6c4b(0x127)][_0x1625f7],_0x3b959e,_0x3db547))['filter'](Boolean);return Object[_0x2a6c4b(0x10d)](_0x51eba8[_0x2a6c4b(0x101)][_0x2a6c4b(0x11c)])[_0x2a6c4b(0x110)](_0x491622=>{const _0x3ea6dd=_0x2a6c4b;this[_0x3ea6dd(0xf4)]['addUser'](_0x491622);}),_0x552a57;}[_0xd7710b(0x11b)](_0xb8f4d){const _0x195ed9=_0xd7710b;return{'id':_0xb8f4d['id'],'threadId':_0xb8f4d[_0x195ed9(0x117)],'ref':_0xb8f4d['ref']};}};f=Q([_(0x0,_0x1eb853(_0xd74d41)),_(0x1,_0x1eb853(_0x464d0b)),_(0x2,_0x1eb853(_0x457475)),_(0x3,_0x1eb853(_0x47d469))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x270747,_0x203b13,_0x177d9f,_0x345a49)=>{const _0x4a256b=_0xd7710b;for(var _0x2a5226=_0x345a49>0x1?void 0x0:_0x345a49?re(_0x203b13,_0x177d9f):_0x203b13,_0xd62d08=_0x270747[_0x4a256b(0xe8)]-0x1,_0x166336;_0xd62d08>=0x0;_0xd62d08--)(_0x166336=_0x270747[_0xd62d08])&&(_0x2a5226=_0x166336(_0x2a5226)||_0x2a5226);return _0x2a5226;},N=(_0x27cf96,_0x28a9e9)=>(_0x3f4182,_0x4e1379)=>_0x28a9e9(_0x3f4182,_0x4e1379,_0x27cf96);let g=class extends _0xad8c05{constructor(_0x4a0fbf,_0x3605c0){const _0x643c7a=_0xd7710b;super(),this['_threadCommentDataSourceService']=_0x4a0fbf,this['_threadCommentDataSource']=_0x3605c0,this[_0x643c7a(0xff)]();}['_initDataSource'](){const _0x8ef8d7=_0xd7710b;this[_0x8ef8d7(0x123)][_0x8ef8d7(0x107)]=this[_0x8ef8d7(0xd8)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x1f6f34),N(0x1,_0x1eb853(f))],g);var se=Object['defineProperty'],oe=Object[_0xd7710b(0x12b)],ne=(_0x4eb572,_0x5db4db,_0xa0053a)=>_0x5db4db in _0x4eb572?se(_0x4eb572,_0x5db4db,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xa0053a}):_0x4eb572[_0x5db4db]=_0xa0053a,ie=(_0x4606c9,_0x285985,_0x5f12c3,_0x3e4c41)=>{const _0x146fb5=_0xd7710b;for(var _0x279174=_0x3e4c41>0x1?void 0x0:_0x3e4c41?oe(_0x285985,_0x5f12c3):_0x285985,_0x2b574c=_0x4606c9[_0x146fb5(0xe8)]-0x1,_0x4b1dee;_0x2b574c>=0x0;_0x2b574c--)(_0x4b1dee=_0x4606c9[_0x2b574c])&&(_0x279174=_0x4b1dee(_0x279174)||_0x279174);return _0x279174;},w=(_0x3775cc,_0x21372)=>(_0x28b495,_0x41fd76)=>_0x21372(_0x28b495,_0x41fd76,_0x3775cc),$=(_0x381115,_0x5e3ba6,_0x53b04e)=>ne(_0x381115,typeof _0x5e3ba6!='symbol'?_0x5e3ba6+'':_0x5e3ba6,_0x53b04e);let b=class extends _0x1a8cdb{constructor(_0x582d38=M,_0x1484d7,_0x2431de){const _0x5a5f93=_0xd7710b;super(),this['_config']=_0x582d38,this[_0x5a5f93(0x12d)]=_0x1484d7,this[_0x5a5f93(0xf0)]=_0x2431de;const {..._0x17c7c5}=_0x3392b3({},M,this[_0x5a5f93(0xe1)]);this[_0x5a5f93(0xf0)][_0x5a5f93(0x124)](z,_0x17c7c5);}[_0xd7710b(0x116)](){const _0x5a42bf=_0xd7710b;[[f],[g],[S]][_0x5a42bf(0x110)](_0x1d372=>{const _0x57ca00=_0x5a42bf;this['_injector'][_0x57ca00(0xf2)](_0x1d372);});}[_0xd7710b(0x12e)](){const _0x571be7=_0xd7710b;this[_0x571be7(0x12d)][_0x571be7(0xda)](g),this[_0x571be7(0x12d)][_0x571be7(0xda)](S);}};$(b,'pluginName',W),$(b,'type',_0x11d5ed[_0xd7710b(0x121)]),b=ie([_0x836a12(_0x4818f8,_0x1937c0,_0x5d8b63),w(0x1,_0x1eb853(_0x47d469)),w(0x2,_0x37892c)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2feed8=_0x2a60;(function(_0x7fdb15,_0x3526ac){const _0x2934c9=_0x2a60,_0xa0563f=_0x7fdb15();while(!![]){try{const _0x5160ec=parseInt(_0x2934c9(0xae))/0x1*(parseInt(_0x2934c9(0x85))/0x2)+-parseInt(_0x2934c9(0xb2))/0x3*(parseInt(_0x2934c9(0x88))/0x4)+parseInt(_0x2934c9(0xcd))/0x5+-parseInt(_0x2934c9(0xe5))/0x6*(-parseInt(_0x2934c9(0xe4))/0x7)+-parseInt(_0x2934c9(0xe7))/0x8+parseInt(_0x2934c9(0xa3))/0x9+parseInt(_0x2934c9(0x9a))/0xa*(parseInt(_0x2934c9(0xc7))/0xb);if(_0x5160ec===_0x3526ac)break;else _0xa0563f['push'](_0xa0563f['shift']());}catch(_0x3ce4ed){_0xa0563f['push'](_0xa0563f['shift']());}}}(_0x4351,0x30e15));import{CommentService as _0x5a2656,CollaborationSessionService as _0x2f0330,UniverCollaborationClientPlugin as _0x2dcecf}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4d02c6}from'@univerjs-pro/license';import{dayjs as _0x4e076,UserManagerService as _0x291cc2,Inject as _0x54b547,Injector as _0x384bd7,Disposable as _0x4047dc,CustomRangeType as _0x377b33,UniverInstanceType as _0x5accf4,DependentOn as _0x1d2fba,IConfigService as _0x1edf32,Plugin as _0x2b2314,merge as _0x22d1b9}from'@univerjs/core';function _0x2a60(_0x1b8a47,_0x32daa3){const _0x435106=_0x4351();return _0x2a60=function(_0x2a6039,_0x202f71){_0x2a6039=_0x2a6039-0x82;let _0x2fb238=_0x435106[_0x2a6039];return _0x2fb238;},_0x2a60(_0x1b8a47,_0x32daa3);}import{UniverThreadCommentUIPlugin as _0x45d87a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4b30f9,IThreadCommentDataSourceService as _0x565532}from'@univerjs/thread-comment';import{bufferTime as _0x552255}from'rxjs';import{HTTPService as _0x14f5c7}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xbea222=>(_0xbea222[_0xbea222['OpenOrReOpen']=0x0]=_0x2feed8(0xd1),_0xbea222[_0xbea222[_0x2feed8(0x9c)]=0x1]=_0x2feed8(0x9c),_0xbea222[_0xbea222[_0x2feed8(0xac)]=-0x1]=_0x2feed8(0xac),_0xbea222))(I||{}),v=(_0x598372=>(_0x598372[_0x598372['Unknown']=0x0]=_0x2feed8(0xc4),_0x598372[_0x598372[_0x2feed8(0xca)]=0x1]='Add',_0x598372[_0x598372[_0x2feed8(0xcb)]=0x2]=_0x2feed8(0xcb),_0x598372[_0x598372[_0x2feed8(0x8e)]=0x3]=_0x2feed8(0x8e),_0x598372[_0x598372[_0x2feed8(0xa6)]=0x4]=_0x2feed8(0xa6),_0x598372[_0x598372[_0x2feed8(0xc5)]=0x5]=_0x2feed8(0xc5),_0x598372[_0x598372[_0x2feed8(0xac)]=-0x1]=_0x2feed8(0xac),_0x598372))(v||{});const D=_0xb3e74f=>_0x4e076(new Date(+_0xb3e74f))[_0x2feed8(0x98)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x18046d,_0x376c60)=>{const _0x5ce614=_0x2feed8,_0x211240=_0x18046d[_0x5ce614(0x90)](_0x291cc2),_0x4bcdca=_0x18046d[_0x5ce614(0x90)](_0x14f5c7);_0x376c60['forEach'](_0x3260fd=>{const _0x24e318=_0x5ce614;_0x211240['getUser'](_0x3260fd)&&_0x376c60[_0x24e318(0xa5)](_0x3260fd);}),_0x376c60['size']&&(await _0x4bcdca[_0x5ce614(0x90)](_0x5ce614(0x89),{'params':{'userIDs':[..._0x376c60]}}))[_0x5ce614(0xbe)][_0x5ce614(0xde)][_0x5ce614(0xb3)](_0x4c8d00=>{const _0x10a24d=_0x5ce614;_0x4c8d00&&_0x211240[_0x10a24d(0x9f)](_0x4c8d00);});};var K=Object[_0x2feed8(0x86)],V=(_0x1a8a70,_0x31485f,_0x170fea,_0x38f566)=>{const _0x430e03=_0x2feed8;for(var _0x585e33=_0x38f566>0x1?void 0x0:_0x38f566?K(_0x31485f,_0x170fea):_0x31485f,_0x25315f=_0x1a8a70[_0x430e03(0xbd)]-0x1,_0x1680ba;_0x25315f>=0x0;_0x25315f--)(_0x1680ba=_0x1a8a70[_0x25315f])&&(_0x585e33=_0x1680ba(_0x585e33)||_0x585e33);return _0x585e33;},p=(_0x26b951,_0x2b41f4)=>(_0x4e2f93,_0x30f46)=>_0x2b41f4(_0x4e2f93,_0x30f46,_0x26b951);let S=class extends _0x4047dc{constructor(_0x588d53,_0x52babf,_0x1d6a0c,_0x4d62f7){const _0x5eac6c=_0x2feed8;super(),this[_0x5eac6c(0x8f)]=_0x588d53,this['_threadCommentModel']=_0x52babf,this['_userService']=_0x1d6a0c,this[_0x5eac6c(0xd2)]=_0x4d62f7,this[_0x5eac6c(0x96)](),this[_0x5eac6c(0xe6)]();}[_0x2feed8(0xe6)](){const _0x56cdfb=_0x2feed8;this['disposeWithMe'](this[_0x56cdfb(0x83)][_0x56cdfb(0xdd)][_0x56cdfb(0xb8)](_0x552255(0x10))[_0x56cdfb(0xb6)](_0xb16343=>{const _0x18c978=_0x56cdfb,_0x57743f=new Set();_0xb16343[_0x18c978(0xb3)](_0xa583b2=>{const _0x44d436=_0x18c978;switch(_0xa583b2[_0x44d436(0xc6)]){case _0x44d436(0xc8):{const _0x33ff68=_0xa583b2[_0x44d436(0x91)][_0x44d436(0xdb)];_0x57743f[_0x44d436(0xc8)](_0x33ff68);break;}}}),B(this[_0x18c978(0xd2)],_0x57743f);}));}['_init'](){const _0x2fd0b9=_0x2feed8;this[_0x2fd0b9(0xd0)](this[_0x2fd0b9(0x8f)]['commentUpdate$'][_0x2fd0b9(0xb6)](async _0x2aef85=>{const _0x8e06c4=_0x2fd0b9;var _0x216195,_0x421d70,_0x53c674,_0x220ea3;const _0x502cd0=(_0x216195=this[_0x8e06c4(0x83)][_0x8e06c4(0xad)](_0x2aef85[_0x8e06c4(0x8c)])[_0x8e06c4(0x8b)](_0x19ef31=>_0x19ef31['threadId']===_0x2aef85[_0x8e06c4(0x8d)]))==null?void 0x0:_0x216195[_0x8e06c4(0xcf)];if(!_0x502cd0)return;const {unitId:_0x2b3fd9,subUnitId:_0x2ff9ab}=_0x502cd0;switch(_0x2aef85[_0x8e06c4(0xc1)]&&this[_0x8e06c4(0xdf)]['addUser'](_0x2aef85['user']),_0x2aef85[_0x8e06c4(0xc6)]){case v[_0x8e06c4(0xca)]:break;case v['Reply']:{this[_0x8e06c4(0x83)][_0x8e06c4(0xa8)](_0x2b3fd9,_0x2ff9ab,{'unitId':_0x2b3fd9,'subUnitId':_0x2ff9ab,'ref':'','id':_0x2aef85[_0x8e06c4(0xd3)],'dT':D(+_0x2aef85[_0x8e06c4(0xb7)]),'threadId':_0x2aef85[_0x8e06c4(0x8d)],'personId':(_0x53c674=(_0x421d70=_0x2aef85[_0x8e06c4(0xc1)])==null?void 0x0:_0x421d70[_0x8e06c4(0xc2)])!=null?_0x53c674:_0x2aef85[_0x8e06c4(0xb1)],'text':JSON['parse'](_0x2aef85[_0x8e06c4(0xe3)]),'parentId':_0x502cd0['id']});break;}case v[_0x8e06c4(0xa6)]:{const _0x570b22=this['_threadCommentModel'][_0x8e06c4(0xa0)](_0x2b3fd9,_0x2ff9ab,_0x2aef85[_0x8e06c4(0xd3)]);_0x570b22&&_0x570b22[_0x8e06c4(0x87)]&&this['_threadCommentModel'][_0x8e06c4(0xba)](_0x2b3fd9,_0x2ff9ab,_0x2aef85[_0x8e06c4(0xd3)]);break;}case v[_0x8e06c4(0x8e)]:{this[_0x8e06c4(0x83)][_0x8e06c4(0xda)](_0x2b3fd9,_0x2ff9ab,{'commentId':_0x2aef85[_0x8e06c4(0xd3)],'text':JSON[_0x8e06c4(0xb5)](_0x2aef85['content'])});break;}case v[_0x8e06c4(0xc5)]:{const _0x45b97a=(_0x220ea3=this[_0x8e06c4(0x83)][_0x8e06c4(0xad)](_0x2aef85['unitId'])['find'](_0x2924f3=>_0x2924f3['threadId']===_0x2aef85[_0x8e06c4(0x8d)]))==null?void 0x0:_0x220ea3[_0x8e06c4(0xcf)];_0x45b97a&&this[_0x8e06c4(0x83)][_0x8e06c4(0xe0)](_0x2b3fd9,_0x2ff9ab,_0x45b97a['id'],_0x2aef85[_0x8e06c4(0x82)]===I[_0x8e06c4(0x9c)]);break;}}}));}};S=V([p(0x0,_0x54b547(_0x5a2656)),p(0x1,_0x54b547(_0x4b30f9)),p(0x2,_0x54b547(_0x291cc2)),p(0x3,_0x54b547(_0x384bd7))],S);const z=_0x2feed8(0xa1),M={};function _0x4351(){const _0x935751=['getMemberID','length','body','filter','/edit','user','userID','YYYY/MM/DD\x20HH:mm','Unknown','Solve','type','615252hQqndQ','add','error','Add','Reply','values','112150WmVQvt','reply','root','disposeWithMe','OpenOrReOpen','_injector','replyId','/reply','map','_configService','resolved','listComments','_initDataSource','updateComment','personId','requireSession','commentUpdate$','users','_userService','resolveComment','comments','rangeType','content','872165aSQcWN','6arjOGR','_initUserSync','2828224fsrsuh','solved','_threadCommentModel','symbol','3830qOWmTP','getOwnPropertyDescriptor','parentId','32PvrtbB','/universer-api/user/list','UNIVER_UNKNOWN','find','unitId','threadId','Edit','_commentService','get','payload','code','comment','saveCommentToSnapshot','rangeId','_init','_config','format','ref','40ScHZAm','post','Solved','_sessionService','syncUpdateMutationToColla','addUser','getComment','thread-comment-data-source.config','setConfig','2276586GRFUYV','replies','delete','Delete','_httpService','addComment','getCurrentUser','COMMENT','_threadCommentDataSourceService','UNRECOGNIZED','getUnit','110CtxiaH','stringify','onStarting','userId','105231RDyLJm','forEach','customRanges','parse','subscribe','createTimestamp','pipe','pluginName','deleteComment','/universer-api/comment/unit/'];_0x4351=function(){return _0x935751;};return _0x4351();}var k=Object['getOwnPropertyDescriptor'],Q=(_0x2aedc3,_0x59a3b9,_0x47527d,_0x4e3f07)=>{const _0x163bb6=_0x2feed8;for(var _0x2a9616=_0x4e3f07>0x1?void 0x0:_0x4e3f07?k(_0x59a3b9,_0x47527d):_0x59a3b9,_0x6b13a=_0x2aedc3[_0x163bb6(0xbd)]-0x1,_0x5cfccd;_0x6b13a>=0x0;_0x6b13a--)(_0x5cfccd=_0x2aedc3[_0x6b13a])&&(_0x2a9616=_0x5cfccd(_0x2a9616)||_0x2a9616);return _0x2a9616;},_=(_0x25e7d6,_0x34fcf4)=>(_0x23d8af,_0x4b5f41)=>_0x34fcf4(_0x23d8af,_0x4b5f41,_0x25e7d6);function X(_0x9c281f,_0x572910){const _0x59e95a=_0x2feed8,_0x867b4=_0x9c281f[_0x59e95a(0xa4)][0x0];return{..._0x572910,'id':_0x867b4[_0x59e95a(0xd3)],'resolved':_0x9c281f['solved']===0x1,'dT':D(_0x867b4[_0x59e95a(0xb7)]),'personId':_0x867b4['userId'],'threadId':_0x867b4[_0x59e95a(0x8d)]};}function ee(_0x575844,_0x398e93,_0x393516){const _0x2dfa51=_0x2feed8;var _0x16aa30,_0x4eb052;if(((_0x4eb052=(_0x16aa30=_0x575844==null?void 0x0:_0x575844['replies'])==null?void 0x0:_0x16aa30['length'])!=null?_0x4eb052:0x0)>0x0){const _0x52330b=(_0x529097,_0x5dae17)=>({'id':_0x529097[_0x2dfa51(0xd3)],'threadId':_0x529097[_0x2dfa51(0x8d)],'dT':D(_0x529097[_0x2dfa51(0xb7)]),'personId':_0x529097['userId'],'resolved':_0x575844['solved']===I['Solved'],'unitId':_0x398e93,'subUnitId':_0x393516,'text':JSON[_0x2dfa51(0xb5)](_0x529097['content']),'parentId':_0x5dae17}),_0xe699e8=_0x52330b(_0x575844[_0x2dfa51(0xa4)][0x0]);return{..._0xe699e8,'children':_0x575844[_0x2dfa51(0xa4)]['slice'](0x1)[_0x2dfa51(0xd5)](_0x5e75af=>_0x52330b(_0x5e75af,_0xe699e8['id']))};}return null;}let f=class{constructor(_0x303c09,_0x173239,_0x5a8dca,_0x1722e0){const _0x2f9b9c=_0x2feed8;this[_0x2f9b9c(0xa7)]=_0x303c09,this[_0x2f9b9c(0xdf)]=_0x173239,this[_0x2f9b9c(0x9d)]=_0x5a8dca,this[_0x2f9b9c(0xd2)]=_0x1722e0;}async[_0x2feed8(0xa8)](_0x401d60){const _0x3f0322=_0x2feed8;var _0x5e66b2,_0x37ff68;const {parentId:_0x48486b,unitId:_0x257766,text:_0xa4bcc1,threadId:_0x4bc5d1}=_0x401d60,_0x12a499=(_0x37ff68=(_0x5e66b2=_0xa4bcc1[_0x3f0322(0xb4)])==null?void 0x0:_0x5e66b2['filter'](_0x537a9f=>_0x537a9f['rangeType']===_0x377b33[_0x3f0322(0xaa)])[_0x3f0322(0xd5)](_0x168b62=>_0x168b62[_0x3f0322(0x95)]))!=null?_0x37ff68:[],_0x2ed0f3=JSON[_0x3f0322(0xaf)](_0xa4bcc1),_0x42a02a=(await this[_0x3f0322(0x9d)][_0x3f0322(0xdc)](_0x257766))[_0x3f0322(0xbc)]();if(_0x48486b){const _0xd8bc64={'memberId':_0x42a02a,'unitId':_0x257766,'content':_0x2ed0f3,'mention':_0x12a499,'threadId':_0x4bc5d1},_0x207a2e=(await this[_0x3f0322(0xa7)][_0x3f0322(0x9b)](_0x3f0322(0xbb)+_0x257766+_0x3f0322(0xd4),{'body':_0xd8bc64}))[_0x3f0322(0xbe)][_0x3f0322(0xce)];return{..._0x401d60,'id':_0x207a2e[_0x3f0322(0xd3)],'dT':_0x4e076(+_0x207a2e[_0x3f0322(0xb7)])[_0x3f0322(0x98)](_0x3f0322(0xc3)),'personId':_0x207a2e[_0x3f0322(0xb1)]};}else{const _0x17666c={'memberId':_0x42a02a,'unitId':_0x257766,'content':_0x2ed0f3,'mention':_0x12a499},_0x5205be=await this['_httpService'][_0x3f0322(0x9b)](_0x3f0322(0xbb)+_0x257766+'/add',{'body':_0x17666c});return X(_0x5205be[_0x3f0322(0xbe)][_0x3f0322(0x93)],_0x401d60);}}async[_0x2feed8(0xda)](_0x42f97f){const _0x8421f6=_0x2feed8;var _0x1bf642,_0x19522b;const {text:_0x1d9105,unitId:_0x493233}=_0x42f97f,_0x2d68ec=(_0x19522b=(_0x1bf642=_0x1d9105['customRanges'])==null?void 0x0:_0x1bf642[_0x8421f6(0xbf)](_0x5c28ff=>_0x5c28ff[_0x8421f6(0xe2)]===_0x377b33[_0x8421f6(0xaa)])[_0x8421f6(0xd5)](_0xb432d9=>_0xb432d9[_0x8421f6(0x95)]))!=null?_0x19522b:[],_0x2424f5=JSON[_0x8421f6(0xaf)](_0x1d9105),_0x4f1221=_0x42f97f[_0x8421f6(0x8d)],_0x8ec8f6=_0x42f97f['id'],_0x39c3f2={'memberId':(await this[_0x8421f6(0x9d)][_0x8421f6(0xdc)](_0x493233))['getMemberID'](),'unitId':_0x493233,'threadId':_0x4f1221,'mention':_0x2d68ec,'content':_0x2424f5,'replyId':_0x8ec8f6},_0x5a6932=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x493233+_0x8421f6(0xc0),{'body':_0x39c3f2});return!_0x5a6932[_0x8421f6(0xbe)][_0x8421f6(0xc9)]||_0x5a6932[_0x8421f6(0xbe)][_0x8421f6(0xc9)][_0x8421f6(0x92)]===0x1;}async[_0x2feed8(0xe0)](_0x1b21d7){const _0x5c8778=_0x2feed8,{unitId:_0x316769}=_0x1b21d7,_0x1129f8=_0x1b21d7[_0x5c8778(0x8d)],_0x534868={'memberId':this[_0x5c8778(0xdf)][_0x5c8778(0xa9)]()[_0x5c8778(0xc2)],'unitId':_0x316769,'threadId':_0x1129f8,'solved':_0x1b21d7[_0x5c8778(0xd7)]?I[_0x5c8778(0x9c)]:I[_0x5c8778(0xd1)]},_0x17147d=await this[_0x5c8778(0xa7)][_0x5c8778(0x9b)]('/universer-api/comment/unit/'+_0x316769+'/solved',{'body':_0x534868});return!_0x17147d['body'][_0x5c8778(0xc9)]||_0x17147d[_0x5c8778(0xbe)][_0x5c8778(0xc9)]['code']===0x1;}async[_0x2feed8(0xba)](_0x2d3247,_0x12bf58,_0x518f7f,_0x5750c5){const _0x5aaab1=_0x2feed8,_0x23f640={'memberId':(await this['_sessionService'][_0x5aaab1(0xdc)](_0x2d3247))[_0x5aaab1(0xbc)](),'threadId':_0x518f7f,'replyId':_0x5750c5,'unitId':_0x2d3247},_0x9dc52c=await this[_0x5aaab1(0xa7)][_0x5aaab1(0x9b)]('/universer-api/comment/unit/'+_0x2d3247+'/delete',{'body':_0x23f640});return!_0x9dc52c['body'][_0x5aaab1(0xc9)]||_0x9dc52c[_0x5aaab1(0xbe)][_0x5aaab1(0xc9)][_0x5aaab1(0x92)]===0x1;}async[_0x2feed8(0xd8)](_0x1affdc,_0x220a7a,_0x18918e){const _0xf68fba=_0x2feed8,_0x5f27a7={'unitId':_0x1affdc,'threadId':_0x18918e},_0x504561=await this[_0xf68fba(0xa7)]['post'](_0xf68fba(0xbb)+_0x1affdc+'/list',{'body':_0x5f27a7}),_0x541393=_0x18918e[_0xf68fba(0xd5)](_0x3150ce=>ee(_0x504561['body'][_0xf68fba(0xe1)][_0x3150ce],_0x1affdc,_0x220a7a))[_0xf68fba(0xbf)](Boolean);return Object[_0xf68fba(0xcc)](_0x504561[_0xf68fba(0xbe)][_0xf68fba(0xde)])[_0xf68fba(0xb3)](_0x231657=>{const _0x5557f1=_0xf68fba;this[_0x5557f1(0xdf)][_0x5557f1(0x9f)](_0x231657);}),_0x541393;}[_0x2feed8(0x94)](_0x1a9fa7){const _0x35532c=_0x2feed8;return{'id':_0x1a9fa7['id'],'threadId':_0x1a9fa7['threadId'],'ref':_0x1a9fa7[_0x35532c(0x99)]};}};f=Q([_(0x0,_0x54b547(_0x14f5c7)),_(0x1,_0x54b547(_0x291cc2)),_(0x2,_0x54b547(_0x2f0330)),_(0x3,_0x54b547(_0x384bd7))],f);var re=Object[_0x2feed8(0x86)],te=(_0x28c9ba,_0x12440a,_0x42355e,_0x278fcc)=>{const _0x3b62a3=_0x2feed8;for(var _0x4fc92a=_0x278fcc>0x1?void 0x0:_0x278fcc?re(_0x12440a,_0x42355e):_0x12440a,_0x3e6f29=_0x28c9ba[_0x3b62a3(0xbd)]-0x1,_0x2e5ca4;_0x3e6f29>=0x0;_0x3e6f29--)(_0x2e5ca4=_0x28c9ba[_0x3e6f29])&&(_0x4fc92a=_0x2e5ca4(_0x4fc92a)||_0x4fc92a);return _0x4fc92a;},N=(_0x5169db,_0x48cf87)=>(_0x376115,_0x1e8bfb)=>_0x48cf87(_0x376115,_0x1e8bfb,_0x5169db);let g=class extends _0x4047dc{constructor(_0x3c9d78,_0x17dcde){const _0x2fb7b6=_0x2feed8;super(),this[_0x2fb7b6(0xab)]=_0x3c9d78,this['_threadCommentDataSource']=_0x17dcde,this[_0x2fb7b6(0xd9)]();}[_0x2feed8(0xd9)](){const _0x31f800=_0x2feed8;this[_0x31f800(0xab)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x31f800(0x9e)]=!0x1;}};g=te([N(0x0,_0x565532),N(0x1,_0x54b547(f))],g);var se=Object['defineProperty'],oe=Object[_0x2feed8(0x86)],ne=(_0xab68f5,_0x4a1cf2,_0x40cd4e)=>_0x4a1cf2 in _0xab68f5?se(_0xab68f5,_0x4a1cf2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x40cd4e}):_0xab68f5[_0x4a1cf2]=_0x40cd4e,ie=(_0x552fbf,_0xcc4d30,_0x337a28,_0x3c4178)=>{const _0x510033=_0x2feed8;for(var _0x57ce91=_0x3c4178>0x1?void 0x0:_0x3c4178?oe(_0xcc4d30,_0x337a28):_0xcc4d30,_0x28ae3d=_0x552fbf[_0x510033(0xbd)]-0x1,_0x3dec37;_0x28ae3d>=0x0;_0x28ae3d--)(_0x3dec37=_0x552fbf[_0x28ae3d])&&(_0x57ce91=_0x3dec37(_0x57ce91)||_0x57ce91);return _0x57ce91;},w=(_0x501066,_0x7e3906)=>(_0x573cda,_0x501475)=>_0x7e3906(_0x573cda,_0x501475,_0x501066),$=(_0x1595a3,_0x50f633,_0x4cfd0d)=>ne(_0x1595a3,typeof _0x50f633!=_0x2feed8(0x84)?_0x50f633+'':_0x50f633,_0x4cfd0d);let b=class extends _0x2b2314{constructor(_0x536fc7=M,_0x370212,_0x1bbdc9){const _0x4c2fdd=_0x2feed8;super(),this[_0x4c2fdd(0x97)]=_0x536fc7,this[_0x4c2fdd(0xd2)]=_0x370212,this['_configService']=_0x1bbdc9;const {..._0x441adb}=_0x22d1b9({},M,this[_0x4c2fdd(0x97)]);this[_0x4c2fdd(0xd6)][_0x4c2fdd(0xa2)](z,_0x441adb);}[_0x2feed8(0xb0)](){const _0xefbef1=_0x2feed8;[[f],[g],[S]][_0xefbef1(0xb3)](_0x19177b=>{const _0x17c533=_0xefbef1;this['_injector'][_0x17c533(0xc8)](_0x19177b);});}['onReady'](){const _0x9990ff=_0x2feed8;this[_0x9990ff(0xd2)][_0x9990ff(0x90)](g),this[_0x9990ff(0xd2)][_0x9990ff(0x90)](S);}};$(b,_0x2feed8(0xb9),W),$(b,_0x2feed8(0xc6),_0x5accf4[_0x2feed8(0x8a)]),b=ie([_0x1d2fba(_0x45d87a,_0x2dcecf,_0x4d02c6),w(0x1,_0x54b547(_0x384bd7)),w(0x2,_0x1edf32)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0xd7710b=_0x1d47;function _0x1d47(_0x42c727,_0x5bfbe4){const _0x5b7d2a=_0x5b7d();return _0x1d47=function(_0x1d4756,_0x19f082){_0x1d4756=_0x1d4756-0xd7;let _0x2956af=_0x5b7d2a[_0x1d4756];return _0x2956af;},_0x1d47(_0x42c727,_0x5bfbe4);}(function(_0x438eff,_0x43a904){const _0x149fad=_0x1d47,_0x56e657=_0x438eff();while(!![]){try{const _0x45cd28=parseInt(_0x149fad(0xfa))/0x1+-parseInt(_0x149fad(0x120))/0x2*(-parseInt(_0x149fad(0x10e))/0x3)+parseInt(_0x149fad(0x128))/0x4*(-parseInt(_0x149fad(0x126))/0x5)+-parseInt(_0x149fad(0x134))/0x6+-parseInt(_0x149fad(0xe0))/0x7*(parseInt(_0x149fad(0xec))/0x8)+parseInt(_0x149fad(0x114))/0x9*(-parseInt(_0x149fad(0xd9))/0xa)+parseInt(_0x149fad(0xfe))/0xb;if(_0x45cd28===_0x43a904)break;else _0x56e657['push'](_0x56e657['shift']());}catch(_0x32d357){_0x56e657['push'](_0x56e657['shift']());}}}(_0x5b7d,0x65113));function _0x5b7d(){const _0x4b29e0=['forEach','YYYY/MM/DD\x20HH:mm','_httpService','user','585jbeixQ','getComment','onStarting','threadId','Solve','type','format','saveCommentToSnapshot','users','getUnit','resolveComment','updateComment','23468mMnySj','UNIVER_UNKNOWN','/universer-api/comment/unit/','_threadCommentDataSourceService','setConfig','map','5jyrQIZ','comments','2336444KLSkJH','requireSession','slice','getOwnPropertyDescriptor','replies','_injector','onReady','addUser','UNRECOGNIZED','error','_initUserSync','_sessionService','364824iVylat','post','/reply','Reply','find','rangeId','/delete','Add','_threadCommentDataSource','29570BRvUdm','get','rangeType','/add','Unknown','userID','_commentService','7BanChc','_config','code','Delete','root','getMemberID','userId','subscribe','length','Edit','_init','/edit','5753544WzaNCj','reply','OpenOrReOpen','createTimestamp','_configService','/solved','add','addComment','_userService','_threadCommentModel','size','deleteComment','unitId','replyId','559453mDbYvO','Solved','personId','comment','14744697uGXjLN','_initDataSource','content','body','parse','parentId','disposeWithMe','payload','COMMENT','dataSource','filter','customRanges','solved','getCurrentUser','delete','values','18qbnfNh','stringify'];_0x5b7d=function(){return _0x4b29e0;};return _0x5b7d();}import{CommentService as _0x16caf3,CollaborationSessionService as _0x457475,UniverCollaborationClientPlugin as _0x1937c0}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5d8b63}from'@univerjs-pro/license';import{dayjs as _0x2f02a1,UserManagerService as _0x464d0b,Inject as _0x1eb853,Injector as _0x47d469,Disposable as _0xad8c05,CustomRangeType as _0x4ee5e9,UniverInstanceType as _0x11d5ed,DependentOn as _0x836a12,IConfigService as _0x37892c,Plugin as _0x1a8cdb,merge as _0x3392b3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4818f8}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x31a474,IThreadCommentDataSourceService as _0x1f6f34}from'@univerjs/thread-comment';import{bufferTime as _0x59cf22}from'rxjs';import{HTTPService as _0xd74d41}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2c5ed3=>(_0x2c5ed3[_0x2c5ed3['OpenOrReOpen']=0x0]=_0xd7710b(0xee),_0x2c5ed3[_0x2c5ed3[_0xd7710b(0xfb)]=0x1]='Solved',_0x2c5ed3[_0x2c5ed3[_0xd7710b(0x130)]=-0x1]=_0xd7710b(0x130),_0x2c5ed3))(I||{}),v=(_0x5f4b1e=>(_0x5f4b1e[_0x5f4b1e[_0xd7710b(0xdd)]=0x0]=_0xd7710b(0xdd),_0x5f4b1e[_0x5f4b1e[_0xd7710b(0xd7)]=0x1]=_0xd7710b(0xd7),_0x5f4b1e[_0x5f4b1e['Reply']=0x2]='Reply',_0x5f4b1e[_0x5f4b1e[_0xd7710b(0xe9)]=0x3]=_0xd7710b(0xe9),_0x5f4b1e[_0x5f4b1e[_0xd7710b(0xe3)]=0x4]=_0xd7710b(0xe3),_0x5f4b1e[_0x5f4b1e[_0xd7710b(0x118)]=0x5]=_0xd7710b(0x118),_0x5f4b1e[_0x5f4b1e[_0xd7710b(0x130)]=-0x1]=_0xd7710b(0x130),_0x5f4b1e))(v||{});const D=_0x19b0b3=>_0x2f02a1(new Date(+_0x19b0b3))[_0xd7710b(0x11a)](_0xd7710b(0x111)),B=async(_0x424b12,_0x5a9223)=>{const _0x3ea08c=_0xd7710b,_0x4c325b=_0x424b12[_0x3ea08c(0xda)](_0x464d0b),_0x3cce24=_0x424b12[_0x3ea08c(0xda)](_0xd74d41);_0x5a9223['forEach'](_0x3eb237=>{const _0x46390a=_0x3ea08c;_0x4c325b['getUser'](_0x3eb237)&&_0x5a9223[_0x46390a(0x10c)](_0x3eb237);}),_0x5a9223[_0x3ea08c(0xf6)]&&(await _0x3cce24[_0x3ea08c(0xda)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5a9223]}}))[_0x3ea08c(0x101)][_0x3ea08c(0x11c)][_0x3ea08c(0x110)](_0x556b4c=>{_0x556b4c&&_0x4c325b['addUser'](_0x556b4c);});};var K=Object[_0xd7710b(0x12b)],V=(_0x49d2f3,_0x5a3556,_0x57b034,_0x1fa525)=>{for(var _0x14cab0=_0x1fa525>0x1?void 0x0:_0x1fa525?K(_0x5a3556,_0x57b034):_0x5a3556,_0x3fd46f=_0x49d2f3['length']-0x1,_0x14647d;_0x3fd46f>=0x0;_0x3fd46f--)(_0x14647d=_0x49d2f3[_0x3fd46f])&&(_0x14cab0=_0x14647d(_0x14cab0)||_0x14cab0);return _0x14cab0;},p=(_0x4aa503,_0x5c9c3c)=>(_0x39ca9f,_0x5446c1)=>_0x5c9c3c(_0x39ca9f,_0x5446c1,_0x4aa503);let S=class extends _0xad8c05{constructor(_0x347bfe,_0x46e80a,_0x337dc7,_0x41d25c){const _0x25b102=_0xd7710b;super(),this[_0x25b102(0xdf)]=_0x347bfe,this[_0x25b102(0xf5)]=_0x46e80a,this[_0x25b102(0xf4)]=_0x337dc7,this[_0x25b102(0x12d)]=_0x41d25c,this[_0x25b102(0xea)](),this[_0x25b102(0x132)]();}[_0xd7710b(0x132)](){const _0x589ad9=_0xd7710b;this[_0x589ad9(0x104)](this[_0x589ad9(0xf5)]['commentUpdate$']['pipe'](_0x59cf22(0x10))[_0x589ad9(0xe7)](_0x4c4e76=>{const _0x2a3a67=_0x589ad9,_0x538fd7=new Set();_0x4c4e76[_0x2a3a67(0x110)](_0x5a6288=>{const _0x5a3d76=_0x2a3a67;switch(_0x5a6288[_0x5a3d76(0x119)]){case'add':{const _0x2e9161=_0x5a6288[_0x5a3d76(0x105)][_0x5a3d76(0xfc)];_0x538fd7[_0x5a3d76(0xf2)](_0x2e9161);break;}}}),B(this[_0x2a3a67(0x12d)],_0x538fd7);}));}[_0xd7710b(0xea)](){const _0xb2c303=_0xd7710b;this['disposeWithMe'](this[_0xb2c303(0xdf)]['commentUpdate$'][_0xb2c303(0xe7)](async _0x16b2ab=>{const _0x4f1cd9=_0xb2c303;var _0x32b6ac,_0x11dbb8,_0x4728f3,_0x211002;const _0x2462e4=(_0x32b6ac=this[_0x4f1cd9(0xf5)][_0x4f1cd9(0x11d)](_0x16b2ab[_0x4f1cd9(0xf8)])[_0x4f1cd9(0x138)](_0x2ad9b7=>_0x2ad9b7[_0x4f1cd9(0x117)]===_0x16b2ab['threadId']))==null?void 0x0:_0x32b6ac[_0x4f1cd9(0xe4)];if(!_0x2462e4)return;const {unitId:_0x4e2219,subUnitId:_0xa856f1}=_0x2462e4;switch(_0x16b2ab['user']&&this[_0x4f1cd9(0xf4)][_0x4f1cd9(0x12f)](_0x16b2ab[_0x4f1cd9(0x113)]),_0x16b2ab[_0x4f1cd9(0x119)]){case v[_0x4f1cd9(0xd7)]:break;case v[_0x4f1cd9(0x137)]:{this[_0x4f1cd9(0xf5)][_0x4f1cd9(0xf3)](_0x4e2219,_0xa856f1,{'unitId':_0x4e2219,'subUnitId':_0xa856f1,'ref':'','id':_0x16b2ab[_0x4f1cd9(0xf9)],'dT':D(+_0x16b2ab[_0x4f1cd9(0xef)]),'threadId':_0x16b2ab['threadId'],'personId':(_0x4728f3=(_0x11dbb8=_0x16b2ab['user'])==null?void 0x0:_0x11dbb8['userID'])!=null?_0x4728f3:_0x16b2ab['userId'],'text':JSON['parse'](_0x16b2ab[_0x4f1cd9(0x100)]),'parentId':_0x2462e4['id']});break;}case v[_0x4f1cd9(0xe3)]:{const _0x103231=this['_threadCommentModel'][_0x4f1cd9(0x115)](_0x4e2219,_0xa856f1,_0x16b2ab['replyId']);_0x103231&&_0x103231[_0x4f1cd9(0x103)]&&this[_0x4f1cd9(0xf5)][_0x4f1cd9(0xf7)](_0x4e2219,_0xa856f1,_0x16b2ab['replyId']);break;}case v[_0x4f1cd9(0xe9)]:{this['_threadCommentModel'][_0x4f1cd9(0x11f)](_0x4e2219,_0xa856f1,{'commentId':_0x16b2ab[_0x4f1cd9(0xf9)],'text':JSON[_0x4f1cd9(0x102)](_0x16b2ab[_0x4f1cd9(0x100)])});break;}case v[_0x4f1cd9(0x118)]:{const _0x2512c3=(_0x211002=this[_0x4f1cd9(0xf5)][_0x4f1cd9(0x11d)](_0x16b2ab['unitId'])[_0x4f1cd9(0x138)](_0x466030=>_0x466030[_0x4f1cd9(0x117)]===_0x16b2ab[_0x4f1cd9(0x117)]))==null?void 0x0:_0x211002['root'];_0x2512c3&&this[_0x4f1cd9(0xf5)][_0x4f1cd9(0x11e)](_0x4e2219,_0xa856f1,_0x2512c3['id'],_0x16b2ab[_0x4f1cd9(0x10a)]===I[_0x4f1cd9(0xfb)]);break;}}}));}};S=V([p(0x0,_0x1eb853(_0x16caf3)),p(0x1,_0x1eb853(_0x31a474)),p(0x2,_0x1eb853(_0x464d0b)),p(0x3,_0x1eb853(_0x47d469))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x2ca295,_0x1d698b,_0x17c709,_0x5bd19f)=>{const _0x54f459=_0xd7710b;for(var _0x30752a=_0x5bd19f>0x1?void 0x0:_0x5bd19f?k(_0x1d698b,_0x17c709):_0x1d698b,_0x2d17a7=_0x2ca295[_0x54f459(0xe8)]-0x1,_0x49259e;_0x2d17a7>=0x0;_0x2d17a7--)(_0x49259e=_0x2ca295[_0x2d17a7])&&(_0x30752a=_0x49259e(_0x30752a)||_0x30752a);return _0x30752a;},_=(_0x4a285a,_0x4f5511)=>(_0x4a5bad,_0xbe27a3)=>_0x4f5511(_0x4a5bad,_0xbe27a3,_0x4a285a);function X(_0x3dbcd6,_0x2c83d5){const _0x52b9a0=_0xd7710b,_0x1d3100=_0x3dbcd6[_0x52b9a0(0x12c)][0x0];return{..._0x2c83d5,'id':_0x1d3100[_0x52b9a0(0xf9)],'resolved':_0x3dbcd6[_0x52b9a0(0x10a)]===0x1,'dT':D(_0x1d3100['createTimestamp']),'personId':_0x1d3100['userId'],'threadId':_0x1d3100[_0x52b9a0(0x117)]};}function ee(_0x34d1ed,_0x30a5ce,_0x41fbef){const _0x32f5e7=_0xd7710b;var _0x3fe4ec,_0x348b5a;if(((_0x348b5a=(_0x3fe4ec=_0x34d1ed==null?void 0x0:_0x34d1ed[_0x32f5e7(0x12c)])==null?void 0x0:_0x3fe4ec[_0x32f5e7(0xe8)])!=null?_0x348b5a:0x0)>0x0){const _0x36779e=(_0x9313bd,_0x479468)=>({'id':_0x9313bd[_0x32f5e7(0xf9)],'threadId':_0x9313bd[_0x32f5e7(0x117)],'dT':D(_0x9313bd['createTimestamp']),'personId':_0x9313bd[_0x32f5e7(0xe6)],'resolved':_0x34d1ed['solved']===I[_0x32f5e7(0xfb)],'unitId':_0x30a5ce,'subUnitId':_0x41fbef,'text':JSON[_0x32f5e7(0x102)](_0x9313bd['content']),'parentId':_0x479468}),_0xa46b0c=_0x36779e(_0x34d1ed[_0x32f5e7(0x12c)][0x0]);return{..._0xa46b0c,'children':_0x34d1ed[_0x32f5e7(0x12c)][_0x32f5e7(0x12a)](0x1)['map'](_0x3f1e85=>_0x36779e(_0x3f1e85,_0xa46b0c['id']))};}return null;}let f=class{constructor(_0x3bc38f,_0x28ef09,_0x366ffe,_0x44b4f0){const _0x188712=_0xd7710b;this[_0x188712(0x112)]=_0x3bc38f,this[_0x188712(0xf4)]=_0x28ef09,this[_0x188712(0x133)]=_0x366ffe,this[_0x188712(0x12d)]=_0x44b4f0;}async['addComment'](_0x4f79e6){const _0x53c2b7=_0xd7710b;var _0x7220b9,_0x2587f3;const {parentId:_0x5c30bb,unitId:_0x1a906e,text:_0x10c847,threadId:_0x3bfbc1}=_0x4f79e6,_0x1e5cbd=(_0x2587f3=(_0x7220b9=_0x10c847[_0x53c2b7(0x109)])==null?void 0x0:_0x7220b9[_0x53c2b7(0x108)](_0xed1617=>_0xed1617[_0x53c2b7(0xdb)]===_0x4ee5e9[_0x53c2b7(0x106)])[_0x53c2b7(0x125)](_0x51b76a=>_0x51b76a[_0x53c2b7(0x139)]))!=null?_0x2587f3:[],_0x27e53b=JSON['stringify'](_0x10c847),_0x488780=(await this[_0x53c2b7(0x133)][_0x53c2b7(0x129)](_0x1a906e))[_0x53c2b7(0xe5)]();if(_0x5c30bb){const _0x1d30a0={'memberId':_0x488780,'unitId':_0x1a906e,'content':_0x27e53b,'mention':_0x1e5cbd,'threadId':_0x3bfbc1},_0x43c0ea=(await this[_0x53c2b7(0x112)][_0x53c2b7(0x135)](_0x53c2b7(0x122)+_0x1a906e+_0x53c2b7(0x136),{'body':_0x1d30a0}))[_0x53c2b7(0x101)][_0x53c2b7(0xed)];return{..._0x4f79e6,'id':_0x43c0ea['replyId'],'dT':_0x2f02a1(+_0x43c0ea[_0x53c2b7(0xef)])['format'](_0x53c2b7(0x111)),'personId':_0x43c0ea['userId']};}else{const _0x36f390={'memberId':_0x488780,'unitId':_0x1a906e,'content':_0x27e53b,'mention':_0x1e5cbd},_0x484bcc=await this[_0x53c2b7(0x112)][_0x53c2b7(0x135)]('/universer-api/comment/unit/'+_0x1a906e+_0x53c2b7(0xdc),{'body':_0x36f390});return X(_0x484bcc[_0x53c2b7(0x101)][_0x53c2b7(0xfd)],_0x4f79e6);}}async[_0xd7710b(0x11f)](_0x1f8a5a){const _0x5e4f97=_0xd7710b;var _0x323766,_0x288817;const {text:_0x4bf748,unitId:_0x3b66a5}=_0x1f8a5a,_0x40dd43=(_0x288817=(_0x323766=_0x4bf748[_0x5e4f97(0x109)])==null?void 0x0:_0x323766[_0x5e4f97(0x108)](_0x88f52f=>_0x88f52f['rangeType']===_0x4ee5e9['COMMENT'])[_0x5e4f97(0x125)](_0x2de504=>_0x2de504['rangeId']))!=null?_0x288817:[],_0x37a1f6=JSON[_0x5e4f97(0x10f)](_0x4bf748),_0x426190=_0x1f8a5a[_0x5e4f97(0x117)],_0x5ecd9b=_0x1f8a5a['id'],_0x48fa59={'memberId':(await this['_sessionService'][_0x5e4f97(0x129)](_0x3b66a5))[_0x5e4f97(0xe5)](),'unitId':_0x3b66a5,'threadId':_0x426190,'mention':_0x40dd43,'content':_0x37a1f6,'replyId':_0x5ecd9b},_0x3836ad=await this[_0x5e4f97(0x112)][_0x5e4f97(0x135)](_0x5e4f97(0x122)+_0x3b66a5+_0x5e4f97(0xeb),{'body':_0x48fa59});return!_0x3836ad['body'][_0x5e4f97(0x131)]||_0x3836ad[_0x5e4f97(0x101)][_0x5e4f97(0x131)][_0x5e4f97(0xe2)]===0x1;}async['resolveComment'](_0x5a30b1){const _0x2e2cde=_0xd7710b,{unitId:_0x1d38c4}=_0x5a30b1,_0x38f42b=_0x5a30b1['threadId'],_0x3e12dc={'memberId':this[_0x2e2cde(0xf4)][_0x2e2cde(0x10b)]()[_0x2e2cde(0xde)],'unitId':_0x1d38c4,'threadId':_0x38f42b,'solved':_0x5a30b1['resolved']?I['Solved']:I[_0x2e2cde(0xee)]},_0x4cc3ff=await this['_httpService']['post'](_0x2e2cde(0x122)+_0x1d38c4+_0x2e2cde(0xf1),{'body':_0x3e12dc});return!_0x4cc3ff[_0x2e2cde(0x101)][_0x2e2cde(0x131)]||_0x4cc3ff[_0x2e2cde(0x101)][_0x2e2cde(0x131)]['code']===0x1;}async['deleteComment'](_0x3cc431,_0x1619c0,_0x48c0b3,_0x5b4297){const _0x4cb6a6=_0xd7710b,_0x3f27dc={'memberId':(await this[_0x4cb6a6(0x133)][_0x4cb6a6(0x129)](_0x3cc431))['getMemberID'](),'threadId':_0x48c0b3,'replyId':_0x5b4297,'unitId':_0x3cc431},_0x5a2009=await this[_0x4cb6a6(0x112)]['post'](_0x4cb6a6(0x122)+_0x3cc431+_0x4cb6a6(0x13a),{'body':_0x3f27dc});return!_0x5a2009[_0x4cb6a6(0x101)][_0x4cb6a6(0x131)]||_0x5a2009[_0x4cb6a6(0x101)][_0x4cb6a6(0x131)]['code']===0x1;}async['listComments'](_0x3b959e,_0x3db547,_0x215cc6){const _0x2a6c4b=_0xd7710b,_0x216491={'unitId':_0x3b959e,'threadId':_0x215cc6},_0x51eba8=await this[_0x2a6c4b(0x112)][_0x2a6c4b(0x135)]('/universer-api/comment/unit/'+_0x3b959e+'/list',{'body':_0x216491}),_0x552a57=_0x215cc6[_0x2a6c4b(0x125)](_0x1625f7=>ee(_0x51eba8[_0x2a6c4b(0x101)][_0x2a6c4b(0x127)][_0x1625f7],_0x3b959e,_0x3db547))['filter'](Boolean);return Object[_0x2a6c4b(0x10d)](_0x51eba8[_0x2a6c4b(0x101)][_0x2a6c4b(0x11c)])[_0x2a6c4b(0x110)](_0x491622=>{const _0x3ea6dd=_0x2a6c4b;this[_0x3ea6dd(0xf4)]['addUser'](_0x491622);}),_0x552a57;}[_0xd7710b(0x11b)](_0xb8f4d){const _0x195ed9=_0xd7710b;return{'id':_0xb8f4d['id'],'threadId':_0xb8f4d[_0x195ed9(0x117)],'ref':_0xb8f4d['ref']};}};f=Q([_(0x0,_0x1eb853(_0xd74d41)),_(0x1,_0x1eb853(_0x464d0b)),_(0x2,_0x1eb853(_0x457475)),_(0x3,_0x1eb853(_0x47d469))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x270747,_0x203b13,_0x177d9f,_0x345a49)=>{const _0x4a256b=_0xd7710b;for(var _0x2a5226=_0x345a49>0x1?void 0x0:_0x345a49?re(_0x203b13,_0x177d9f):_0x203b13,_0xd62d08=_0x270747[_0x4a256b(0xe8)]-0x1,_0x166336;_0xd62d08>=0x0;_0xd62d08--)(_0x166336=_0x270747[_0xd62d08])&&(_0x2a5226=_0x166336(_0x2a5226)||_0x2a5226);return _0x2a5226;},N=(_0x27cf96,_0x28a9e9)=>(_0x3f4182,_0x4e1379)=>_0x28a9e9(_0x3f4182,_0x4e1379,_0x27cf96);let g=class extends _0xad8c05{constructor(_0x4a0fbf,_0x3605c0){const _0x643c7a=_0xd7710b;super(),this['_threadCommentDataSourceService']=_0x4a0fbf,this['_threadCommentDataSource']=_0x3605c0,this[_0x643c7a(0xff)]();}['_initDataSource'](){const _0x8ef8d7=_0xd7710b;this[_0x8ef8d7(0x123)][_0x8ef8d7(0x107)]=this[_0x8ef8d7(0xd8)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x1f6f34),N(0x1,_0x1eb853(f))],g);var se=Object['defineProperty'],oe=Object[_0xd7710b(0x12b)],ne=(_0x4eb572,_0x5db4db,_0xa0053a)=>_0x5db4db in _0x4eb572?se(_0x4eb572,_0x5db4db,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xa0053a}):_0x4eb572[_0x5db4db]=_0xa0053a,ie=(_0x4606c9,_0x285985,_0x5f12c3,_0x3e4c41)=>{const _0x146fb5=_0xd7710b;for(var _0x279174=_0x3e4c41>0x1?void 0x0:_0x3e4c41?oe(_0x285985,_0x5f12c3):_0x285985,_0x2b574c=_0x4606c9[_0x146fb5(0xe8)]-0x1,_0x4b1dee;_0x2b574c>=0x0;_0x2b574c--)(_0x4b1dee=_0x4606c9[_0x2b574c])&&(_0x279174=_0x4b1dee(_0x279174)||_0x279174);return _0x279174;},w=(_0x3775cc,_0x21372)=>(_0x28b495,_0x41fd76)=>_0x21372(_0x28b495,_0x41fd76,_0x3775cc),$=(_0x381115,_0x5e3ba6,_0x53b04e)=>ne(_0x381115,typeof _0x5e3ba6!='symbol'?_0x5e3ba6+'':_0x5e3ba6,_0x53b04e);let b=class extends _0x1a8cdb{constructor(_0x582d38=M,_0x1484d7,_0x2431de){const _0x5a5f93=_0xd7710b;super(),this['_config']=_0x582d38,this[_0x5a5f93(0x12d)]=_0x1484d7,this[_0x5a5f93(0xf0)]=_0x2431de;const {..._0x17c7c5}=_0x3392b3({},M,this[_0x5a5f93(0xe1)]);this[_0x5a5f93(0xf0)][_0x5a5f93(0x124)](z,_0x17c7c5);}[_0xd7710b(0x116)](){const _0x5a42bf=_0xd7710b;[[f],[g],[S]][_0x5a42bf(0x110)](_0x1d372=>{const _0x57ca00=_0x5a42bf;this['_injector'][_0x57ca00(0xf2)](_0x1d372);});}[_0xd7710b(0x12e)](){const _0x571be7=_0xd7710b;this[_0x571be7(0x12d)][_0x571be7(0xda)](g),this[_0x571be7(0x12d)][_0x571be7(0xda)](S);}};$(b,'pluginName',W),$(b,'type',_0x11d5ed[_0xd7710b(0x121)]),b=ie([_0x836a12(_0x4818f8,_0x1937c0,_0x5d8b63),w(0x1,_0x1eb853(_0x47d469)),w(0x2,_0x37892c)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x256a25,_0x139a5f){const _0x206764=_0x10b5,_0x39a8e0=_0x256a25();while(!![]){try{const _0x17b13e=-parseInt(_0x206764(0x80))/0x1+-parseInt(_0x206764(0xe3))/0x2*(-parseInt(_0x206764(0xc3))/0x3)+parseInt(_0x206764(0x93))/0x4*(-parseInt(_0x206764(0xc7))/0x5)+-parseInt(_0x206764(0xf2))/0x6*(-parseInt(_0x206764(0xba))/0x7)+-parseInt(_0x206764(0x7d))/0x8*(-parseInt(_0x206764(0x89))/0x9)+-parseInt(_0x206764(0xa2))/0xa+-parseInt(_0x206764(0x9c))/0xb*(-parseInt(_0x206764(0x84))/0xc);if(_0x17b13e===_0x139a5f)break;else _0x39a8e0['push'](_0x39a8e0['shift']());}catch(_0x39d1e8){_0x39a8e0['push'](_0x39a8e0['shift']());}}}(_0x358f,0x2e057),function(_0x1adeae,_0x3b98bf){const _0x124386=_0x10b5;typeof exports=='object'&&typeof module<'u'?_0x3b98bf(exports,require(_0x124386(0xd8)),require('@univerjs-pro/license'),require('@univerjs/core'),require(_0x124386(0xa7)),require('@univerjs/thread-comment'),require(_0x124386(0xf9)),require(_0x124386(0xf5))):typeof define==_0x124386(0x85)&&define[_0x124386(0xcc)]?define([_0x124386(0x9d),_0x124386(0xd8),'@univerjs-pro/license',_0x124386(0xe7),_0x124386(0xa7),_0x124386(0xea),_0x124386(0xf9),'@univerjs/network'],_0x3b98bf):(_0x1adeae=typeof globalThis<'u'?globalThis:_0x1adeae||self,_0x3b98bf(_0x1adeae[_0x124386(0xdf)]={},_0x1adeae['UniverProCollaborationClient'],_0x1adeae[_0x124386(0xc8)],_0x1adeae[_0x124386(0xb8)],_0x1adeae[_0x124386(0x98)],_0x1adeae[_0x124386(0xed)],_0x1adeae[_0x124386(0xf9)],_0x1adeae['UniverNetwork']));}(this,function(_0x482946,_0x1248a6,_0x1c8814,_0x161faf,_0x4a4d91,_0x2141f3,_0x56b6c7,_0x762715){'use strict';const _0x22c917=_0x10b5;const _0x2ddcb3='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x4d20a8=(_0xacef70=>(_0xacef70[_0xacef70[_0x22c917(0xf4)]=0x0]=_0x22c917(0xf4),_0xacef70[_0xacef70[_0x22c917(0xd4)]=0x1]=_0x22c917(0xd4),_0xacef70[_0xacef70[_0x22c917(0xbc)]=-0x1]=_0x22c917(0xbc),_0xacef70))(_0x4d20a8||{}),_0x2ca181=(_0x421d69=>(_0x421d69[_0x421d69[_0x22c917(0xc6)]=0x0]=_0x22c917(0xc6),_0x421d69[_0x421d69[_0x22c917(0xfa)]=0x1]='Add',_0x421d69[_0x421d69[_0x22c917(0xe5)]=0x2]=_0x22c917(0xe5),_0x421d69[_0x421d69['Edit']=0x3]=_0x22c917(0xd9),_0x421d69[_0x421d69[_0x22c917(0xa5)]=0x4]=_0x22c917(0xa5),_0x421d69[_0x421d69['Solve']=0x5]=_0x22c917(0x9f),_0x421d69[_0x421d69[_0x22c917(0xbc)]=-0x1]=_0x22c917(0xbc),_0x421d69))(_0x2ca181||{});const _0x10278d=_0x4bb8a3=>_0x161faf['dayjs'](new Date(+_0x4bb8a3))[_0x22c917(0xa9)](_0x22c917(0x7c)),_0x5bff71=async(_0xa5a2b2,_0x1a4518)=>{const _0x4442ac=_0x22c917,_0x51b24e=_0xa5a2b2['get'](_0x161faf[_0x4442ac(0xe0)]),_0x3af086=_0xa5a2b2[_0x4442ac(0xbf)](_0x762715['HTTPService']);_0x1a4518[_0x4442ac(0xfc)](_0x47668c=>{const _0x46bbf7=_0x4442ac;_0x51b24e[_0x46bbf7(0xa1)](_0x47668c)&&_0x1a4518[_0x46bbf7(0xbd)](_0x47668c);}),_0x1a4518[_0x4442ac(0xe1)]&&(await _0x3af086[_0x4442ac(0xbf)](_0x4442ac(0xee),{'params':{'userIDs':[..._0x1a4518]}}))[_0x4442ac(0xe8)]['users']['forEach'](_0x14dfd0=>{const _0xfa259=_0x4442ac;_0x14dfd0&&_0x51b24e[_0xfa259(0xc9)](_0x14dfd0);});};var _0x48f6fe=Object[_0x22c917(0xa8)],_0x3ba2e6=(_0x2829c3,_0x201378,_0x105684,_0x584708)=>{for(var _0x304eb0=_0x584708>0x1?void 0x0:_0x584708?_0x48f6fe(_0x201378,_0x105684):_0x201378,_0x27b02f=_0x2829c3['length']-0x1,_0x420857;_0x27b02f>=0x0;_0x27b02f--)(_0x420857=_0x2829c3[_0x27b02f])&&(_0x304eb0=_0x420857(_0x304eb0)||_0x304eb0);return _0x304eb0;},_0x3aa2b8=(_0x3e2943,_0x5cbd18)=>(_0x3d0046,_0x1280d2)=>_0x5cbd18(_0x3d0046,_0x1280d2,_0x3e2943);let _0x50f571=class extends _0x161faf[_0x22c917(0x82)]{constructor(_0x1f45da,_0xe84c94,_0x1cf11c,_0x5db679){const _0x4be104=_0x22c917;super(),this['_commentService']=_0x1f45da,this[_0x4be104(0x9a)]=_0xe84c94,this['_userService']=_0x1cf11c,this[_0x4be104(0x8f)]=_0x5db679,this[_0x4be104(0x9e)](),this[_0x4be104(0x7f)]();}[_0x22c917(0x7f)](){const _0x1fac08=_0x22c917;this[_0x1fac08(0xaa)](this[_0x1fac08(0x9a)][_0x1fac08(0xc0)][_0x1fac08(0x87)](_0x56b6c7['bufferTime'](0x10))['subscribe'](_0x3a2de1=>{const _0x5e417f=_0x1fac08,_0x16eb12=new Set();_0x3a2de1[_0x5e417f(0xfc)](_0xaca53=>{const _0x3fad0a=_0x5e417f;switch(_0xaca53[_0x3fad0a(0xf6)]){case _0x3fad0a(0xd1):{const _0x4a906b=_0xaca53[_0x3fad0a(0xca)]['personId'];_0x16eb12[_0x3fad0a(0xd1)](_0x4a906b);break;}}}),_0x5bff71(this[_0x5e417f(0x8f)],_0x16eb12);}));}[_0x22c917(0x9e)](){const _0xc2bd5a=_0x22c917;this[_0xc2bd5a(0xaa)](this[_0xc2bd5a(0xd5)][_0xc2bd5a(0xc0)][_0xc2bd5a(0xb5)](async _0x31d9ea=>{const _0x2737f1=_0xc2bd5a;var _0x1298d5,_0x324db3,_0x37c0d3,_0x2f639e;const _0x1c7f6a=(_0x1298d5=this['_threadCommentModel'][_0x2737f1(0xad)](_0x31d9ea['unitId'])[_0x2737f1(0xfd)](_0x5c8c02=>_0x5c8c02[_0x2737f1(0xbe)]===_0x31d9ea[_0x2737f1(0xbe)]))==null?void 0x0:_0x1298d5[_0x2737f1(0xcb)];if(!_0x1c7f6a)return;const {unitId:_0x2fa4c6,subUnitId:_0x4a741e}=_0x1c7f6a;switch(_0x31d9ea[_0x2737f1(0xe9)]&&this[_0x2737f1(0x8b)][_0x2737f1(0xc9)](_0x31d9ea[_0x2737f1(0xe9)]),_0x31d9ea['type']){case _0x2ca181[_0x2737f1(0xfa)]:break;case _0x2ca181[_0x2737f1(0xe5)]:{this[_0x2737f1(0x9a)][_0x2737f1(0xd2)](_0x2fa4c6,_0x4a741e,{'unitId':_0x2fa4c6,'subUnitId':_0x4a741e,'ref':'','id':_0x31d9ea[_0x2737f1(0x8d)],'dT':_0x10278d(+_0x31d9ea[_0x2737f1(0xc2)]),'threadId':_0x31d9ea[_0x2737f1(0xbe)],'personId':(_0x37c0d3=(_0x324db3=_0x31d9ea[_0x2737f1(0xe9)])==null?void 0x0:_0x324db3[_0x2737f1(0xae)])!=null?_0x37c0d3:_0x31d9ea['userId'],'text':JSON['parse'](_0x31d9ea['content']),'parentId':_0x1c7f6a['id']});break;}case _0x2ca181['Delete']:{const _0x1a3aa1=this[_0x2737f1(0x9a)][_0x2737f1(0xd3)](_0x2fa4c6,_0x4a741e,_0x31d9ea[_0x2737f1(0x8d)]);_0x1a3aa1&&_0x1a3aa1['parentId']&&this[_0x2737f1(0x9a)]['deleteComment'](_0x2fa4c6,_0x4a741e,_0x31d9ea[_0x2737f1(0x8d)]);break;}case _0x2ca181[_0x2737f1(0xd9)]:{this[_0x2737f1(0x9a)][_0x2737f1(0x91)](_0x2fa4c6,_0x4a741e,{'commentId':_0x31d9ea['replyId'],'text':JSON[_0x2737f1(0x90)](_0x31d9ea[_0x2737f1(0xa3)])});break;}case _0x2ca181['Solve']:{const _0x2967a7=(_0x2f639e=this[_0x2737f1(0x9a)]['getUnit'](_0x31d9ea[_0x2737f1(0xb7)])[_0x2737f1(0xfd)](_0x540631=>_0x540631[_0x2737f1(0xbe)]===_0x31d9ea[_0x2737f1(0xbe)]))==null?void 0x0:_0x2f639e[_0x2737f1(0xcb)];_0x2967a7&&this[_0x2737f1(0x9a)]['resolveComment'](_0x2fa4c6,_0x4a741e,_0x2967a7['id'],_0x31d9ea[_0x2737f1(0xbb)]===_0x4d20a8['Solved']);break;}}}));}};_0x50f571=_0x3ba2e6([_0x3aa2b8(0x0,_0x161faf[_0x22c917(0x92)](_0x1248a6[_0x22c917(0xef)])),_0x3aa2b8(0x1,_0x161faf[_0x22c917(0x92)](_0x2141f3[_0x22c917(0x88)])),_0x3aa2b8(0x2,_0x161faf[_0x22c917(0x92)](_0x161faf[_0x22c917(0xe0)])),_0x3aa2b8(0x3,_0x161faf[_0x22c917(0x92)](_0x161faf[_0x22c917(0x7e)]))],_0x50f571);const _0x185b74='thread-comment-data-source.config',_0x4c387e={};var _0x58e6ca=Object[_0x22c917(0xa8)],_0x9b199b=(_0x55f0b9,_0x4a7c5f,_0xf34dbc,_0x24b613)=>{const _0x23fd7e=_0x22c917;for(var _0x6453bf=_0x24b613>0x1?void 0x0:_0x24b613?_0x58e6ca(_0x4a7c5f,_0xf34dbc):_0x4a7c5f,_0x30f776=_0x55f0b9[_0x23fd7e(0xe4)]-0x1,_0x323fe8;_0x30f776>=0x0;_0x30f776--)(_0x323fe8=_0x55f0b9[_0x30f776])&&(_0x6453bf=_0x323fe8(_0x6453bf)||_0x6453bf);return _0x6453bf;},_0x1af560=(_0x1fdd61,_0x3ae31d)=>(_0x26d15d,_0x4aa72b)=>_0x3ae31d(_0x26d15d,_0x4aa72b,_0x1fdd61);function _0x213c9b(_0x222d92,_0x4e5ddb){const _0x182f63=_0x22c917,_0x3430e2=_0x222d92[_0x182f63(0xc5)][0x0];return{..._0x4e5ddb,'id':_0x3430e2[_0x182f63(0x8d)],'resolved':_0x222d92[_0x182f63(0xbb)]===0x1,'dT':_0x10278d(_0x3430e2[_0x182f63(0xc2)]),'personId':_0x3430e2[_0x182f63(0x96)],'threadId':_0x3430e2[_0x182f63(0xbe)]};}function _0x95384e(_0x2cbdde,_0x45a844,_0x4107a9){const _0x4bfe47=_0x22c917;var _0x5d2d73,_0x22322d;if(((_0x22322d=(_0x5d2d73=_0x2cbdde==null?void 0x0:_0x2cbdde['replies'])==null?void 0x0:_0x5d2d73['length'])!=null?_0x22322d:0x0)>0x0){const _0x589dda=(_0x253142,_0x141efd)=>({'id':_0x253142[_0x4bfe47(0x8d)],'threadId':_0x253142['threadId'],'dT':_0x10278d(_0x253142['createTimestamp']),'personId':_0x253142[_0x4bfe47(0x96)],'resolved':_0x2cbdde[_0x4bfe47(0xbb)]===_0x4d20a8[_0x4bfe47(0xd4)],'unitId':_0x45a844,'subUnitId':_0x4107a9,'text':JSON[_0x4bfe47(0x90)](_0x253142['content']),'parentId':_0x141efd}),_0x419428=_0x589dda(_0x2cbdde[_0x4bfe47(0xc5)][0x0]);return{..._0x419428,'children':_0x2cbdde[_0x4bfe47(0xc5)][_0x4bfe47(0x94)](0x1)[_0x4bfe47(0x7a)](_0x1ea8e3=>_0x589dda(_0x1ea8e3,_0x419428['id']))};}return null;}let _0x5074db=class{constructor(_0x185dbb,_0x5901b8,_0x5487ce,_0x1463c6){const _0xfe0576=_0x22c917;this[_0xfe0576(0xb6)]=_0x185dbb,this[_0xfe0576(0x8b)]=_0x5901b8,this['_sessionService']=_0x5487ce,this[_0xfe0576(0x8f)]=_0x1463c6;}async[_0x22c917(0xd2)](_0x23da96){const _0x321262=_0x22c917;var _0x3aadf0,_0xb1140f;const {parentId:_0x383e08,unitId:_0xeacd3f,text:_0x2188f7,threadId:_0x40dde2}=_0x23da96,_0x17f284=(_0xb1140f=(_0x3aadf0=_0x2188f7[_0x321262(0xdd)])==null?void 0x0:_0x3aadf0[_0x321262(0xec)](_0x5cec73=>_0x5cec73[_0x321262(0xc1)]===_0x161faf['CustomRangeType'][_0x321262(0xfb)])[_0x321262(0x7a)](_0x3cbc4a=>_0x3cbc4a[_0x321262(0xa4)]))!=null?_0xb1140f:[],_0x3bbad1=JSON[_0x321262(0xf8)](_0x2188f7),_0x1127b0=(await this[_0x321262(0x81)][_0x321262(0xcd)](_0xeacd3f))[_0x321262(0xab)]();if(_0x383e08){const _0xdf548={'memberId':_0x1127b0,'unitId':_0xeacd3f,'content':_0x3bbad1,'mention':_0x17f284,'threadId':_0x40dde2},_0xea1212=(await this['_httpService']['post'](_0x321262(0xaf)+_0xeacd3f+_0x321262(0xe2),{'body':_0xdf548}))[_0x321262(0xe8)][_0x321262(0x7b)];return{..._0x23da96,'id':_0xea1212[_0x321262(0x8d)],'dT':_0x161faf[_0x321262(0xd7)](+_0xea1212['createTimestamp'])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0xea1212[_0x321262(0x96)]};}else{const _0x8851b1={'memberId':_0x1127b0,'unitId':_0xeacd3f,'content':_0x3bbad1,'mention':_0x17f284},_0x495e76=await this[_0x321262(0xb6)][_0x321262(0x8a)]('/universer-api/comment/unit/'+_0xeacd3f+_0x321262(0x78),{'body':_0x8851b1});return _0x213c9b(_0x495e76['body']['comment'],_0x23da96);}}async[_0x22c917(0x91)](_0x15b171){const _0x4f533c=_0x22c917;var _0x2a02d6,_0x292c80;const {text:_0x12518c,unitId:_0x1502ba}=_0x15b171,_0x5c23d4=(_0x292c80=(_0x2a02d6=_0x12518c[_0x4f533c(0xdd)])==null?void 0x0:_0x2a02d6[_0x4f533c(0xec)](_0x5a915b=>_0x5a915b[_0x4f533c(0xc1)]===_0x161faf[_0x4f533c(0x9b)]['COMMENT'])[_0x4f533c(0x7a)](_0x2c3682=>_0x2c3682[_0x4f533c(0xa4)]))!=null?_0x292c80:[],_0x11a12f=JSON[_0x4f533c(0xf8)](_0x12518c),_0x1dc5e8=_0x15b171['threadId'],_0x1f9429=_0x15b171['id'],_0x404d82={'memberId':(await this[_0x4f533c(0x81)][_0x4f533c(0xcd)](_0x1502ba))[_0x4f533c(0xab)](),'unitId':_0x1502ba,'threadId':_0x1dc5e8,'mention':_0x5c23d4,'content':_0x11a12f,'replyId':_0x1f9429},_0xaca9b7=await this[_0x4f533c(0xb6)][_0x4f533c(0x8a)](_0x4f533c(0xaf)+_0x1502ba+'/edit',{'body':_0x404d82});return!_0xaca9b7['body'][_0x4f533c(0xeb)]||_0xaca9b7[_0x4f533c(0xe8)][_0x4f533c(0xeb)]['code']===0x1;}async['resolveComment'](_0x481dc7){const _0x143ba5=_0x22c917,{unitId:_0x33601f}=_0x481dc7,_0x4795a6=_0x481dc7['threadId'],_0x18871e={'memberId':this[_0x143ba5(0x8b)][_0x143ba5(0xf7)]()[_0x143ba5(0xae)],'unitId':_0x33601f,'threadId':_0x4795a6,'solved':_0x481dc7[_0x143ba5(0xcf)]?_0x4d20a8['Solved']:_0x4d20a8['OpenOrReOpen']},_0x50fad0=await this[_0x143ba5(0xb6)]['post']('/universer-api/comment/unit/'+_0x33601f+'/solved',{'body':_0x18871e});return!_0x50fad0['body']['error']||_0x50fad0[_0x143ba5(0xe8)]['error'][_0x143ba5(0xde)]===0x1;}async[_0x22c917(0x83)](_0x37603a,_0x52947e,_0x1f3009,_0x41925f){const _0x283b40=_0x22c917,_0x4ce237={'memberId':(await this[_0x283b40(0x81)]['requireSession'](_0x37603a))['getMemberID'](),'threadId':_0x1f3009,'replyId':_0x41925f,'unitId':_0x37603a},_0x329978=await this['_httpService']['post'](_0x283b40(0xaf)+_0x37603a+_0x283b40(0xc4),{'body':_0x4ce237});return!_0x329978[_0x283b40(0xe8)]['error']||_0x329978[_0x283b40(0xe8)][_0x283b40(0xeb)][_0x283b40(0xde)]===0x1;}async[_0x22c917(0xe6)](_0x3fab48,_0x39225f,_0x52b6c9){const _0x56f55d=_0x22c917,_0x21f3a9={'unitId':_0x3fab48,'threadId':_0x52b6c9},_0x2f636a=await this[_0x56f55d(0xb6)]['post'](_0x56f55d(0xaf)+_0x3fab48+'/list',{'body':_0x21f3a9}),_0x121195=_0x52b6c9['map'](_0x328088=>_0x95384e(_0x2f636a[_0x56f55d(0xe8)][_0x56f55d(0x97)][_0x328088],_0x3fab48,_0x39225f))[_0x56f55d(0xec)](Boolean);return Object['values'](_0x2f636a[_0x56f55d(0xe8)][_0x56f55d(0x8c)])['forEach'](_0x28fc38=>{const _0x30b9b3=_0x56f55d;this[_0x30b9b3(0x8b)][_0x30b9b3(0xc9)](_0x28fc38);}),_0x121195;}[_0x22c917(0xb2)](_0x29d534){const _0x2dff60=_0x22c917;return{'id':_0x29d534['id'],'threadId':_0x29d534[_0x2dff60(0xbe)],'ref':_0x29d534[_0x2dff60(0xa6)]};}};_0x5074db=_0x9b199b([_0x1af560(0x0,_0x161faf[_0x22c917(0x92)](_0x762715[_0x22c917(0x86)])),_0x1af560(0x1,_0x161faf[_0x22c917(0x92)](_0x161faf[_0x22c917(0xe0)])),_0x1af560(0x2,_0x161faf[_0x22c917(0x92)](_0x1248a6[_0x22c917(0xda)])),_0x1af560(0x3,_0x161faf[_0x22c917(0x92)](_0x161faf[_0x22c917(0x7e)]))],_0x5074db);var _0x402a70=Object[_0x22c917(0xa8)],_0x40de80=(_0x4c9d86,_0x16f4ab,_0x231b67,_0x1f0256)=>{for(var _0x1fbee5=_0x1f0256>0x1?void 0x0:_0x1f0256?_0x402a70(_0x16f4ab,_0x231b67):_0x16f4ab,_0x296f13=_0x4c9d86['length']-0x1,_0x162772;_0x296f13>=0x0;_0x296f13--)(_0x162772=_0x4c9d86[_0x296f13])&&(_0x1fbee5=_0x162772(_0x1fbee5)||_0x1fbee5);return _0x1fbee5;},_0x1cd730=(_0x4b2789,_0xf8f89e)=>(_0x7bd0d9,_0x4b038b)=>_0xf8f89e(_0x7bd0d9,_0x4b038b,_0x4b2789);let _0x5f5a13=class extends _0x161faf[_0x22c917(0x82)]{constructor(_0xfae5a3,_0x58d4ea){const _0x196cf9=_0x22c917;super(),this[_0x196cf9(0xb0)]=_0xfae5a3,this['_threadCommentDataSource']=_0x58d4ea,this[_0x196cf9(0x79)]();}[_0x22c917(0x79)](){const _0x4a2a42=_0x22c917;this[_0x4a2a42(0xb0)][_0x4a2a42(0xf3)]=this[_0x4a2a42(0xdc)],this['_threadCommentDataSourceService'][_0x4a2a42(0xb4)]=!0x1;}};_0x5f5a13=_0x40de80([_0x1cd730(0x0,_0x2141f3[_0x22c917(0xb1)]),_0x1cd730(0x1,_0x161faf[_0x22c917(0x92)](_0x5074db))],_0x5f5a13);var _0x381603=Object[_0x22c917(0xdb)],_0x43d464=Object['getOwnPropertyDescriptor'],_0x384e75=(_0x56224b,_0x2962bb,_0x492129)=>_0x2962bb in _0x56224b?_0x381603(_0x56224b,_0x2962bb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x492129}):_0x56224b[_0x2962bb]=_0x492129,_0x289dfe=(_0x1bc143,_0x7022d8,_0x483e77,_0x163d0f)=>{for(var _0x4651ea=_0x163d0f>0x1?void 0x0:_0x163d0f?_0x43d464(_0x7022d8,_0x483e77):_0x7022d8,_0x1a3b87=_0x1bc143['length']-0x1,_0x4af008;_0x1a3b87>=0x0;_0x1a3b87--)(_0x4af008=_0x1bc143[_0x1a3b87])&&(_0x4651ea=_0x4af008(_0x4651ea)||_0x4651ea);return _0x4651ea;},_0x234e02=(_0x214223,_0x18dff1)=>(_0x164101,_0xa24317)=>_0x18dff1(_0x164101,_0xa24317,_0x214223),_0x546cba=(_0x15ae8d,_0x5d7321,_0x27c96f)=>_0x384e75(_0x15ae8d,typeof _0x5d7321!=_0x22c917(0xac)?_0x5d7321+'':_0x5d7321,_0x27c96f);_0x482946['UniverThreadCommentDataSourcePlugin']=class extends _0x161faf[_0x22c917(0x99)]{constructor(_0x5c41b5=_0x4c387e,_0x2628ff,_0x4edc0d){const _0x533369=_0x22c917;super(),this['_config']=_0x5c41b5,this[_0x533369(0x8f)]=_0x2628ff,this['_configService']=_0x4edc0d;const {..._0x34b0d0}=_0x161faf['merge']({},_0x4c387e,this[_0x533369(0x8e)]);this[_0x533369(0xa0)][_0x533369(0xce)](_0x185b74,_0x34b0d0);}[_0x22c917(0xd6)](){const _0x44c08c=_0x22c917;[[_0x5074db],[_0x5f5a13],[_0x50f571]][_0x44c08c(0xfc)](_0xda19cd=>{const _0x5a5dae=_0x44c08c;this['_injector'][_0x5a5dae(0xd1)](_0xda19cd);});}[_0x22c917(0xf0)](){const _0x3ccc68=_0x22c917;this[_0x3ccc68(0x8f)][_0x3ccc68(0xbf)](_0x5f5a13),this[_0x3ccc68(0x8f)][_0x3ccc68(0xbf)](_0x50f571);}},_0x546cba(_0x482946['UniverThreadCommentDataSourcePlugin'],_0x22c917(0xf1),_0x2ddcb3),_0x546cba(_0x482946[_0x22c917(0x95)],_0x22c917(0xf6),_0x161faf[_0x22c917(0xd0)][_0x22c917(0xb3)]),_0x482946[_0x22c917(0x95)]=_0x289dfe([_0x161faf['DependentOn'](_0x4a4d91['UniverThreadCommentUIPlugin'],_0x1248a6['UniverCollaborationClientPlugin'],_0x1c8814['UniverLicensePlugin']),_0x234e02(0x1,_0x161faf[_0x22c917(0x92)](_0x161faf[_0x22c917(0x7e)])),_0x234e02(0x2,_0x161faf['IConfigService'])],_0x482946[_0x22c917(0x95)]),Object[_0x22c917(0xdb)](_0x482946,Symbol[_0x22c917(0xb9)],{'value':'Module'});}));function _0x10b5(_0x10be5,_0x53becf){const _0x358fc3=_0x358f();return _0x10b5=function(_0x10b5ff,_0x52822d){_0x10b5ff=_0x10b5ff-0x78;let _0x136288=_0x358fc3[_0x10b5ff];return _0x136288;},_0x10b5(_0x10be5,_0x53becf);}function _0x358f(){const _0x551816=['_userService','users','replyId','_config','_injector','parse','updateComment','Inject','4ljSmKg','slice','UniverThreadCommentDataSourcePlugin','userId','comments','UniverThreadCommentUi','Plugin','_threadCommentModel','CustomRangeType','41008piquJy','exports','_init','Solve','_configService','getUser','2209020vJqaVh','content','rangeId','Delete','ref','@univerjs/thread-comment-ui','getOwnPropertyDescriptor','format','disposeWithMe','getMemberID','symbol','getUnit','userID','/universer-api/comment/unit/','_threadCommentDataSourceService','IThreadCommentDataSourceService','saveCommentToSnapshot','UNIVER_UNKNOWN','syncUpdateMutationToColla','subscribe','_httpService','unitId','UniverCore','toStringTag','47831zGSUxW','solved','UNRECOGNIZED','delete','threadId','get','commentUpdate$','rangeType','createTimestamp','39864UhOtqu','/delete','replies','Unknown','649310tTfsfc','UniverProLicense','addUser','payload','root','amd','requireSession','setConfig','resolved','UniverInstanceType','add','addComment','getComment','Solved','_commentService','onStarting','dayjs','@univerjs-pro/collaboration-client','Edit','CollaborationSessionService','defineProperty','_threadCommentDataSource','customRanges','code','UniverProThreadCommentDatasource','UserManagerService','size','/reply','6jHDapc','length','Reply','listComments','@univerjs/core','body','user','@univerjs/thread-comment','error','filter','UniverThreadComment','/universer-api/user/list','CommentService','onReady','pluginName','90lXdksH','dataSource','OpenOrReOpen','@univerjs/network','type','getCurrentUser','stringify','rxjs','Add','COMMENT','forEach','find','/add','_initDataSource','map','reply','YYYY/MM/DD\x20HH:mm','110472MQhfMe','Injector','_initUserSync','317765IqzWga','_sessionService','Disposable','deleteComment','2256ArcXUK','function','HTTPService','pipe','ThreadCommentModel','9aJLctt','post'];_0x358f=function(){return _0x551816;};return _0x358f();}
|
|
1
|
+
(function(_0x4670e0,_0x158f0e){const _0x45bc9d=_0x15a3,_0x2d6c41=_0x4670e0();while(!![]){try{const _0xb96cdf=-parseInt(_0x45bc9d(0x254))/0x1*(parseInt(_0x45bc9d(0x25f))/0x2)+-parseInt(_0x45bc9d(0x21f))/0x3*(-parseInt(_0x45bc9d(0x217))/0x4)+parseInt(_0x45bc9d(0x1df))/0x5+parseInt(_0x45bc9d(0x1fb))/0x6*(parseInt(_0x45bc9d(0x214))/0x7)+-parseInt(_0x45bc9d(0x256))/0x8*(-parseInt(_0x45bc9d(0x233))/0x9)+-parseInt(_0x45bc9d(0x21e))/0xa+parseInt(_0x45bc9d(0x22a))/0xb*(parseInt(_0x45bc9d(0x212))/0xc);if(_0xb96cdf===_0x158f0e)break;else _0x2d6c41['push'](_0x2d6c41['shift']());}catch(_0xcf551f){_0x2d6c41['push'](_0x2d6c41['shift']());}}}(_0x20d6,0x1be5e),function(_0x34df6c,_0x4d28b8){const _0x43fbaa=_0x15a3;typeof exports==_0x43fbaa(0x21b)&&typeof module<'u'?_0x4d28b8(exports,require('@univerjs-pro/collaboration-client'),require(_0x43fbaa(0x257)),require(_0x43fbaa(0x24f)),require('@univerjs/thread-comment-ui'),require(_0x43fbaa(0x22e)),require(_0x43fbaa(0x1e4)),require(_0x43fbaa(0x230))):typeof define==_0x43fbaa(0x207)&&define[_0x43fbaa(0x252)]?define([_0x43fbaa(0x237),'@univerjs-pro/collaboration-client',_0x43fbaa(0x257),_0x43fbaa(0x24f),'@univerjs/thread-comment-ui',_0x43fbaa(0x22e),_0x43fbaa(0x1e4),_0x43fbaa(0x230)],_0x4d28b8):(_0x34df6c=typeof globalThis<'u'?globalThis:_0x34df6c||self,_0x4d28b8(_0x34df6c[_0x43fbaa(0x1e1)]={},_0x34df6c[_0x43fbaa(0x1eb)],_0x34df6c[_0x43fbaa(0x251)],_0x34df6c['UniverCore'],_0x34df6c[_0x43fbaa(0x23c)],_0x34df6c[_0x43fbaa(0x22b)],_0x34df6c[_0x43fbaa(0x1e4)],_0x34df6c[_0x43fbaa(0x236)]));}(this,function(_0x5e69b2,_0x3a27fd,_0x15130b,_0x1d3be7,_0x3741cb,_0x302edf,_0x4c1ac0,_0x133836){'use strict';const _0x4ae833=_0x15a3;const _0x298213=_0x4ae833(0x1ff);var _0x183da8=(_0x44a71d=>(_0x44a71d[_0x44a71d[_0x4ae833(0x224)]=0x0]=_0x4ae833(0x224),_0x44a71d[_0x44a71d[_0x4ae833(0x231)]=0x1]=_0x4ae833(0x231),_0x44a71d[_0x44a71d[_0x4ae833(0x1dd)]=-0x1]=_0x4ae833(0x1dd),_0x44a71d))(_0x183da8||{}),_0x36e997=(_0xb22c32=>(_0xb22c32[_0xb22c32[_0x4ae833(0x25a)]=0x0]=_0x4ae833(0x25a),_0xb22c32[_0xb22c32[_0x4ae833(0x1ea)]=0x1]=_0x4ae833(0x1ea),_0xb22c32[_0xb22c32[_0x4ae833(0x206)]=0x2]=_0x4ae833(0x206),_0xb22c32[_0xb22c32[_0x4ae833(0x1ef)]=0x3]=_0x4ae833(0x1ef),_0xb22c32[_0xb22c32[_0x4ae833(0x25b)]=0x4]=_0x4ae833(0x25b),_0xb22c32[_0xb22c32[_0x4ae833(0x208)]=0x5]=_0x4ae833(0x208),_0xb22c32[_0xb22c32[_0x4ae833(0x1dd)]=-0x1]=_0x4ae833(0x1dd),_0xb22c32))(_0x36e997||{});const _0x578bb4=_0x295b36=>_0x1d3be7['dayjs'](new Date(+_0x295b36))[_0x4ae833(0x201)](_0x4ae833(0x248)),_0x21e6ef=async(_0xfc7a42,_0x1b6f07)=>{const _0x567ac9=_0x4ae833,_0x35ab64=_0xfc7a42[_0x567ac9(0x259)](_0x1d3be7[_0x567ac9(0x218)]),_0x33dde5=_0xfc7a42[_0x567ac9(0x259)](_0x133836['HTTPService']);_0x1b6f07[_0x567ac9(0x24d)](_0x1d210f=>{const _0x14cc0c=_0x567ac9;_0x35ab64['getUser'](_0x1d210f)&&_0x1b6f07[_0x14cc0c(0x202)](_0x1d210f);}),_0x1b6f07[_0x567ac9(0x1f5)]&&(await _0x33dde5['get'](_0x567ac9(0x249),{'params':{'userIDs':[..._0x1b6f07]}}))['body']['users'][_0x567ac9(0x24d)](_0x5896f5=>{const _0x20ac15=_0x567ac9;_0x5896f5&&_0x35ab64[_0x20ac15(0x20e)](_0x5896f5);});};var _0x17c02b=Object[_0x4ae833(0x21d)],_0x3b2ab1=(_0x415553,_0xabf5be,_0x22cbc3,_0x31f1e4)=>{const _0x285188=_0x4ae833;for(var _0x222294=_0x31f1e4>0x1?void 0x0:_0x31f1e4?_0x17c02b(_0xabf5be,_0x22cbc3):_0xabf5be,_0x1680b5=_0x415553[_0x285188(0x23a)]-0x1,_0x395a29;_0x1680b5>=0x0;_0x1680b5--)(_0x395a29=_0x415553[_0x1680b5])&&(_0x222294=_0x395a29(_0x222294)||_0x222294);return _0x222294;},_0x1c19c8=(_0x496eb9,_0x170083)=>(_0x47c363,_0x4c0d08)=>_0x170083(_0x47c363,_0x4c0d08,_0x496eb9);let _0x999c5=class extends _0x1d3be7[_0x4ae833(0x23e)]{constructor(_0x42728f,_0x5e2384,_0x3b1c38,_0x195ed0){const _0x16135a=_0x4ae833;super(),this[_0x16135a(0x1fc)]=_0x42728f,this[_0x16135a(0x23d)]=_0x5e2384,this[_0x16135a(0x258)]=_0x3b1c38,this['_injector']=_0x195ed0,this[_0x16135a(0x247)](),this[_0x16135a(0x1e8)]();}['_initUserSync'](){const _0x77b237=_0x4ae833;this[_0x77b237(0x23b)](this[_0x77b237(0x23d)][_0x77b237(0x255)]['pipe'](_0x4c1ac0['bufferTime'](0x10))[_0x77b237(0x21c)](_0x2fa11d=>{const _0x54334a=_0x77b237,_0x208f59=new Set();_0x2fa11d['forEach'](_0x3b4357=>{const _0x4e1a55=_0x15a3;switch(_0x3b4357[_0x4e1a55(0x245)]){case'add':{const _0x55ac43=_0x3b4357[_0x4e1a55(0x24c)][_0x4e1a55(0x1de)];_0x208f59['add'](_0x55ac43);break;}}}),_0x21e6ef(this[_0x54334a(0x241)],_0x208f59);}));}[_0x4ae833(0x247)](){const _0x4f4d1a=_0x4ae833;this[_0x4f4d1a(0x23b)](this[_0x4f4d1a(0x1fc)]['commentUpdate$']['subscribe'](async _0x119759=>{const _0x22e9dc=_0x4f4d1a;var _0xcdaf04,_0x4f09a2,_0x4b43ed,_0x19a34c;const _0x3aabf0=(_0xcdaf04=this[_0x22e9dc(0x23d)][_0x22e9dc(0x1fe)](_0x119759[_0x22e9dc(0x226)])[_0x22e9dc(0x222)](_0x4624a8=>_0x4624a8[_0x22e9dc(0x229)]===_0x119759[_0x22e9dc(0x229)]))==null?void 0x0:_0xcdaf04[_0x22e9dc(0x26a)];if(!_0x3aabf0)return;const {unitId:_0x3e2383,subUnitId:_0x336f8a}=_0x3aabf0;switch(_0x119759[_0x22e9dc(0x1f8)]&&this[_0x22e9dc(0x258)][_0x22e9dc(0x20e)](_0x119759[_0x22e9dc(0x1f8)]),_0x119759[_0x22e9dc(0x245)]){case _0x36e997[_0x22e9dc(0x1ea)]:break;case _0x36e997[_0x22e9dc(0x206)]:{this['_threadCommentModel']['addComment'](_0x3e2383,_0x336f8a,{'unitId':_0x3e2383,'subUnitId':_0x336f8a,'ref':'','id':_0x119759['replyId'],'dT':_0x578bb4(+_0x119759[_0x22e9dc(0x240)]),'threadId':_0x119759[_0x22e9dc(0x229)],'personId':(_0x4b43ed=(_0x4f09a2=_0x119759[_0x22e9dc(0x1f8)])==null?void 0x0:_0x4f09a2[_0x22e9dc(0x22f)])!=null?_0x4b43ed:_0x119759[_0x22e9dc(0x1e2)],'text':JSON['parse'](_0x119759['content']),'parentId':_0x3aabf0['id']});break;}case _0x36e997[_0x22e9dc(0x25b)]:{const _0x206c77=this[_0x22e9dc(0x23d)][_0x22e9dc(0x23f)](_0x3e2383,_0x336f8a,_0x119759[_0x22e9dc(0x1f3)]);_0x206c77&&_0x206c77[_0x22e9dc(0x265)]&&this['_threadCommentModel'][_0x22e9dc(0x1e5)](_0x3e2383,_0x336f8a,_0x119759[_0x22e9dc(0x1f3)]);break;}case _0x36e997['Edit']:{this['_threadCommentModel'][_0x22e9dc(0x1ed)](_0x3e2383,_0x336f8a,{'commentId':_0x119759[_0x22e9dc(0x1f3)],'text':JSON[_0x22e9dc(0x263)](_0x119759['content'])});break;}case _0x36e997[_0x22e9dc(0x208)]:{const _0x3623ef=(_0x19a34c=this[_0x22e9dc(0x23d)][_0x22e9dc(0x1fe)](_0x119759['unitId'])['find'](_0x4a0886=>_0x4a0886[_0x22e9dc(0x229)]===_0x119759['threadId']))==null?void 0x0:_0x19a34c['root'];_0x3623ef&&this[_0x22e9dc(0x23d)][_0x22e9dc(0x1f4)](_0x3e2383,_0x336f8a,_0x3623ef['id'],_0x119759['solved']===_0x183da8[_0x22e9dc(0x231)]);break;}}}));}};_0x999c5=_0x3b2ab1([_0x1c19c8(0x0,_0x1d3be7[_0x4ae833(0x261)](_0x3a27fd[_0x4ae833(0x264)])),_0x1c19c8(0x1,_0x1d3be7[_0x4ae833(0x261)](_0x302edf[_0x4ae833(0x1e3)])),_0x1c19c8(0x2,_0x1d3be7[_0x4ae833(0x261)](_0x1d3be7[_0x4ae833(0x218)])),_0x1c19c8(0x3,_0x1d3be7['Inject'](_0x1d3be7[_0x4ae833(0x1ec)]))],_0x999c5);const _0x19325d=_0x4ae833(0x221),_0x4420f4={};var _0x5f381f=Object[_0x4ae833(0x21d)],_0x5e721b=(_0x21e780,_0xf71ff2,_0xc11aa5,_0x36c3e4)=>{const _0x5879ed=_0x4ae833;for(var _0x4cc147=_0x36c3e4>0x1?void 0x0:_0x36c3e4?_0x5f381f(_0xf71ff2,_0xc11aa5):_0xf71ff2,_0x1ed963=_0x21e780[_0x5879ed(0x23a)]-0x1,_0x47f79b;_0x1ed963>=0x0;_0x1ed963--)(_0x47f79b=_0x21e780[_0x1ed963])&&(_0x4cc147=_0x47f79b(_0x4cc147)||_0x4cc147);return _0x4cc147;},_0x438d20=(_0x2f06f7,_0x4f3af7)=>(_0xc0af89,_0x35eb6f)=>_0x4f3af7(_0xc0af89,_0x35eb6f,_0x2f06f7);function _0x59e28b(_0x454955,_0x26a893){const _0x4ba9f7=_0x4ae833,_0x28e832=_0x454955[_0x4ba9f7(0x269)][0x0];return{..._0x26a893,'id':_0x28e832[_0x4ba9f7(0x1f3)],'resolved':_0x454955['solved']===0x1,'dT':_0x578bb4(_0x28e832['createTimestamp']),'personId':_0x28e832[_0x4ba9f7(0x1e2)],'threadId':_0x28e832['threadId']};}function _0x2015e1(_0x2e4eb5,_0xb55f21,_0x10f234){const _0x3819f2=_0x4ae833;var _0x316b50,_0x1bb5e4;if(((_0x1bb5e4=(_0x316b50=_0x2e4eb5==null?void 0x0:_0x2e4eb5[_0x3819f2(0x269)])==null?void 0x0:_0x316b50[_0x3819f2(0x23a)])!=null?_0x1bb5e4:0x0)>0x0){const _0x581102=(_0x3fd19f,_0x563517)=>({'id':_0x3fd19f[_0x3819f2(0x1f3)],'threadId':_0x3fd19f[_0x3819f2(0x229)],'dT':_0x578bb4(_0x3fd19f['createTimestamp']),'personId':_0x3fd19f[_0x3819f2(0x1e2)],'resolved':_0x2e4eb5[_0x3819f2(0x213)]===_0x183da8['Solved'],'unitId':_0xb55f21,'subUnitId':_0x10f234,'text':JSON['parse'](_0x3fd19f[_0x3819f2(0x22c)]),'parentId':_0x563517}),_0x6ed6a8=_0x581102(_0x2e4eb5[_0x3819f2(0x269)][0x0]);return{..._0x6ed6a8,'children':_0x2e4eb5['replies'][_0x3819f2(0x24a)](0x1)[_0x3819f2(0x1e6)](_0x2a901f=>_0x581102(_0x2a901f,_0x6ed6a8['id']))};}return null;}let _0x506a75=class{constructor(_0xe333c2,_0x5cb154,_0x34f969,_0x1882f6){const _0x1d7064=_0x4ae833;this['_httpService']=_0xe333c2,this[_0x1d7064(0x258)]=_0x5cb154,this[_0x1d7064(0x239)]=_0x34f969,this[_0x1d7064(0x241)]=_0x1882f6;}async[_0x4ae833(0x20b)](_0x385c7d){const _0x26d027=_0x4ae833;var _0xb58262,_0x3a5fb7;const {parentId:_0x37c29f,unitId:_0x296e65,text:_0x755b9,threadId:_0x3bcf5e}=_0x385c7d,_0x1346fc=(_0x3a5fb7=(_0xb58262=_0x755b9[_0x26d027(0x1fa)])==null?void 0x0:_0xb58262[_0x26d027(0x238)](_0x928071=>_0x928071[_0x26d027(0x219)]===_0x1d3be7[_0x26d027(0x266)][_0x26d027(0x20f)])[_0x26d027(0x1e6)](_0x19c03=>_0x19c03[_0x26d027(0x260)]))!=null?_0x3a5fb7:[],_0x5af5a5=JSON[_0x26d027(0x1e0)](_0x755b9),_0x42f039=(await this[_0x26d027(0x239)][_0x26d027(0x26b)](_0x296e65))[_0x26d027(0x25c)]();if(_0x37c29f){const _0x4b95a3={'memberId':_0x42f039,'unitId':_0x296e65,'content':_0x5af5a5,'mention':_0x1346fc,'threadId':_0x3bcf5e},_0x8f66e8=(await this[_0x26d027(0x20a)][_0x26d027(0x204)](_0x26d027(0x20c)+_0x296e65+'/reply',{'body':_0x4b95a3}))[_0x26d027(0x1ee)][_0x26d027(0x20d)];return{..._0x385c7d,'id':_0x8f66e8[_0x26d027(0x1f3)],'dT':_0x1d3be7[_0x26d027(0x25d)](+_0x8f66e8[_0x26d027(0x240)])[_0x26d027(0x201)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x8f66e8['userId']};}else{const _0x378142={'memberId':_0x42f039,'unitId':_0x296e65,'content':_0x5af5a5,'mention':_0x1346fc},_0x432aa3=await this[_0x26d027(0x20a)][_0x26d027(0x204)](_0x26d027(0x20c)+_0x296e65+_0x26d027(0x26c),{'body':_0x378142});return _0x59e28b(_0x432aa3[_0x26d027(0x1ee)][_0x26d027(0x250)],_0x385c7d);}}async[_0x4ae833(0x1ed)](_0x3a3b93){const _0x13ebb7=_0x4ae833;var _0x5650bf,_0x1a0909;const {text:_0x1ed33e,unitId:_0x1735f4}=_0x3a3b93,_0x4030ea=(_0x1a0909=(_0x5650bf=_0x1ed33e[_0x13ebb7(0x1fa)])==null?void 0x0:_0x5650bf[_0x13ebb7(0x238)](_0x165994=>_0x165994[_0x13ebb7(0x219)]===_0x1d3be7[_0x13ebb7(0x266)][_0x13ebb7(0x20f)])[_0x13ebb7(0x1e6)](_0xcbc08a=>_0xcbc08a[_0x13ebb7(0x260)]))!=null?_0x1a0909:[],_0x347153=JSON[_0x13ebb7(0x1e0)](_0x1ed33e),_0x1f4d5b=_0x3a3b93[_0x13ebb7(0x229)],_0x5ac5f1=_0x3a3b93['id'],_0x2a30b3={'memberId':(await this[_0x13ebb7(0x239)][_0x13ebb7(0x26b)](_0x1735f4))[_0x13ebb7(0x25c)](),'unitId':_0x1735f4,'threadId':_0x1f4d5b,'mention':_0x4030ea,'content':_0x347153,'replyId':_0x5ac5f1},_0x5a69b8=await this[_0x13ebb7(0x20a)]['post'](_0x13ebb7(0x20c)+_0x1735f4+_0x13ebb7(0x268),{'body':_0x2a30b3});return!_0x5a69b8['body'][_0x13ebb7(0x243)]||_0x5a69b8['body'][_0x13ebb7(0x243)]['code']===0x1;}async[_0x4ae833(0x1f4)](_0x66b5a9){const _0x18524c=_0x4ae833,{unitId:_0xc72529}=_0x66b5a9,_0x293b76=_0x66b5a9['threadId'],_0x37685c={'memberId':this[_0x18524c(0x258)][_0x18524c(0x205)]()[_0x18524c(0x22f)],'unitId':_0xc72529,'threadId':_0x293b76,'solved':_0x66b5a9[_0x18524c(0x227)]?_0x183da8[_0x18524c(0x231)]:_0x183da8[_0x18524c(0x224)]},_0x34cded=await this['_httpService'][_0x18524c(0x204)](_0x18524c(0x20c)+_0xc72529+_0x18524c(0x262),{'body':_0x37685c});return!_0x34cded[_0x18524c(0x1ee)]['error']||_0x34cded[_0x18524c(0x1ee)][_0x18524c(0x243)][_0x18524c(0x1f9)]===0x1;}async[_0x4ae833(0x1e5)](_0x5eb849,_0x3b0a58,_0x54170a,_0x46de50){const _0x2caad2=_0x4ae833,_0x1084e7={'memberId':(await this[_0x2caad2(0x239)][_0x2caad2(0x26b)](_0x5eb849))['getMemberID'](),'threadId':_0x54170a,'replyId':_0x46de50,'unitId':_0x5eb849},_0x285f49=await this['_httpService'][_0x2caad2(0x204)]('/universer-api/comment/unit/'+_0x5eb849+'/delete',{'body':_0x1084e7});return!_0x285f49[_0x2caad2(0x1ee)][_0x2caad2(0x243)]||_0x285f49[_0x2caad2(0x1ee)]['error'][_0x2caad2(0x1f9)]===0x1;}async[_0x4ae833(0x267)](_0x199e0d,_0x450eed,_0x565e66){const _0x543f07=_0x4ae833,_0x1ffe2d={'unitId':_0x199e0d,'threadId':_0x565e66},_0x1bbcfe=await this[_0x543f07(0x20a)]['post'](_0x543f07(0x20c)+_0x199e0d+_0x543f07(0x223),{'body':_0x1ffe2d}),_0x294408=_0x565e66[_0x543f07(0x1e6)](_0x55c0c4=>_0x2015e1(_0x1bbcfe[_0x543f07(0x1ee)][_0x543f07(0x200)][_0x55c0c4],_0x199e0d,_0x450eed))[_0x543f07(0x238)](Boolean);return Object[_0x543f07(0x1e7)](_0x1bbcfe[_0x543f07(0x1ee)][_0x543f07(0x235)])[_0x543f07(0x24d)](_0x24ca1d=>{const _0x129146=_0x543f07;this[_0x129146(0x258)]['addUser'](_0x24ca1d);}),_0x294408;}[_0x4ae833(0x1fd)](_0x48d7d7){const _0x141dd4=_0x4ae833;return{'id':_0x48d7d7['id'],'threadId':_0x48d7d7[_0x141dd4(0x229)],'ref':_0x48d7d7[_0x141dd4(0x244)]};}};_0x506a75=_0x5e721b([_0x438d20(0x0,_0x1d3be7[_0x4ae833(0x261)](_0x133836[_0x4ae833(0x22d)])),_0x438d20(0x1,_0x1d3be7[_0x4ae833(0x261)](_0x1d3be7[_0x4ae833(0x218)])),_0x438d20(0x2,_0x1d3be7['Inject'](_0x3a27fd[_0x4ae833(0x1f0)])),_0x438d20(0x3,_0x1d3be7[_0x4ae833(0x261)](_0x1d3be7['Injector']))],_0x506a75);var _0x103519=Object['getOwnPropertyDescriptor'],_0x6c21f5=(_0x5aae94,_0x3667b6,_0x31a57c,_0x32bd)=>{const _0x2a4e06=_0x4ae833;for(var _0x2310eb=_0x32bd>0x1?void 0x0:_0x32bd?_0x103519(_0x3667b6,_0x31a57c):_0x3667b6,_0x6c93d0=_0x5aae94[_0x2a4e06(0x23a)]-0x1,_0x154e6d;_0x6c93d0>=0x0;_0x6c93d0--)(_0x154e6d=_0x5aae94[_0x6c93d0])&&(_0x2310eb=_0x154e6d(_0x2310eb)||_0x2310eb);return _0x2310eb;},_0x38253f=(_0x37da73,_0x32b752)=>(_0x243a3e,_0x3f4cf1)=>_0x32b752(_0x243a3e,_0x3f4cf1,_0x37da73);let _0x540cbc=class extends _0x1d3be7['Disposable']{constructor(_0x2d2468,_0x4a5802){const _0x2b9012=_0x4ae833;super(),this[_0x2b9012(0x209)]=_0x2d2468,this[_0x2b9012(0x1e9)]=_0x4a5802,this[_0x2b9012(0x215)]();}[_0x4ae833(0x215)](){const _0x409bb9=_0x4ae833;this[_0x409bb9(0x209)][_0x409bb9(0x24e)]=this[_0x409bb9(0x1e9)],this[_0x409bb9(0x209)][_0x409bb9(0x232)]=!0x1;}};_0x540cbc=_0x6c21f5([_0x38253f(0x0,_0x302edf[_0x4ae833(0x25e)]),_0x38253f(0x1,_0x1d3be7['Inject'](_0x506a75))],_0x540cbc);var _0x2227e3=Object[_0x4ae833(0x228)],_0x3f5d22=Object[_0x4ae833(0x21d)],_0x35fe5a=(_0x19eaad,_0x467ac5,_0x3fad11)=>_0x467ac5 in _0x19eaad?_0x2227e3(_0x19eaad,_0x467ac5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3fad11}):_0x19eaad[_0x467ac5]=_0x3fad11,_0x3ab630=(_0x3d8f52,_0xbb2860,_0x23bb7a,_0x618658)=>{for(var _0xbebbcd=_0x618658>0x1?void 0x0:_0x618658?_0x3f5d22(_0xbb2860,_0x23bb7a):_0xbb2860,_0x1f44cb=_0x3d8f52['length']-0x1,_0xf6fe9f;_0x1f44cb>=0x0;_0x1f44cb--)(_0xf6fe9f=_0x3d8f52[_0x1f44cb])&&(_0xbebbcd=_0xf6fe9f(_0xbebbcd)||_0xbebbcd);return _0xbebbcd;},_0x1173d9=(_0x1a07d4,_0x157b52)=>(_0x56012a,_0xe3581)=>_0x157b52(_0x56012a,_0xe3581,_0x1a07d4),_0x3f14db=(_0x4f5325,_0x1e0ccc,_0x5d3b9c)=>_0x35fe5a(_0x4f5325,typeof _0x1e0ccc!=_0x4ae833(0x216)?_0x1e0ccc+'':_0x1e0ccc,_0x5d3b9c);_0x5e69b2['UniverThreadCommentDataSourcePlugin']=class extends _0x1d3be7[_0x4ae833(0x203)]{constructor(_0x1cd846=_0x4420f4,_0x5a27a7,_0x41d251){const _0x21eec0=_0x4ae833;super(),this[_0x21eec0(0x225)]=_0x1cd846,this[_0x21eec0(0x241)]=_0x5a27a7,this[_0x21eec0(0x211)]=_0x41d251;const {..._0x43ff68}=_0x1d3be7[_0x21eec0(0x21a)]({},_0x4420f4,this[_0x21eec0(0x225)]);this[_0x21eec0(0x211)][_0x21eec0(0x253)](_0x19325d,_0x43ff68);}[_0x4ae833(0x234)](){const _0x4227b2=_0x4ae833;[[_0x506a75],[_0x540cbc],[_0x999c5]][_0x4227b2(0x24d)](_0xdcd20b=>{const _0x1ac5f4=_0x4227b2;this[_0x1ac5f4(0x241)]['add'](_0xdcd20b);});}[_0x4ae833(0x220)](){const _0x39ae2c=_0x4ae833;this[_0x39ae2c(0x241)][_0x39ae2c(0x259)](_0x540cbc),this['_injector'][_0x39ae2c(0x259)](_0x999c5);}},_0x3f14db(_0x5e69b2[_0x4ae833(0x1f6)],_0x4ae833(0x210),_0x298213),_0x3f14db(_0x5e69b2[_0x4ae833(0x1f6)],_0x4ae833(0x245),_0x1d3be7[_0x4ae833(0x1f7)]['UNIVER_UNKNOWN']),_0x5e69b2[_0x4ae833(0x1f6)]=_0x3ab630([_0x1d3be7[_0x4ae833(0x246)](_0x3741cb[_0x4ae833(0x242)],_0x3a27fd[_0x4ae833(0x1f2)],_0x15130b[_0x4ae833(0x1f1)]),_0x1173d9(0x1,_0x1d3be7[_0x4ae833(0x261)](_0x1d3be7[_0x4ae833(0x1ec)])),_0x1173d9(0x2,_0x1d3be7['IConfigService'])],_0x5e69b2[_0x4ae833(0x1f6)]),Object[_0x4ae833(0x228)](_0x5e69b2,Symbol[_0x4ae833(0x24b)],{'value':'Module'});}));function _0x15a3(_0x375057,_0x5e13ec){const _0x20d6d3=_0x20d6();return _0x15a3=function(_0x15a3fb,_0xe009ba){_0x15a3fb=_0x15a3fb-0x1dd;let _0x3b8ee0=_0x20d6d3[_0x15a3fb];return _0x3b8ee0;},_0x15a3(_0x375057,_0x5e13ec);}function _0x20d6(){const _0x1c30ae=['UniverInstanceType','user','code','customRanges','948eVUvqS','_commentService','saveCommentToSnapshot','getUnit','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','comments','format','delete','Plugin','post','getCurrentUser','Reply','function','Solve','_threadCommentDataSourceService','_httpService','addComment','/universer-api/comment/unit/','reply','addUser','COMMENT','pluginName','_configService','801576wBKbWZ','solved','5572advDKO','_initDataSource','symbol','224860qyNWmt','UserManagerService','rangeType','merge','object','subscribe','getOwnPropertyDescriptor','2007100EcPwaL','6WngzaH','onReady','thread-comment-data-source.config','find','/list','OpenOrReOpen','_config','unitId','resolved','defineProperty','threadId','22veHTne','UniverThreadComment','content','HTTPService','@univerjs/thread-comment','userID','@univerjs/network','Solved','syncUpdateMutationToColla','9GNkVtK','onStarting','users','UniverNetwork','exports','filter','_sessionService','length','disposeWithMe','UniverThreadCommentUi','_threadCommentModel','Disposable','getComment','createTimestamp','_injector','UniverThreadCommentUIPlugin','error','ref','type','DependentOn','_init','YYYY/MM/DD\x20HH:mm','/universer-api/user/list','slice','toStringTag','payload','forEach','dataSource','@univerjs/core','comment','UniverProLicense','amd','setConfig','74883bggImY','commentUpdate$','1074704mysuzN','@univerjs-pro/license','_userService','get','Unknown','Delete','getMemberID','dayjs','IThreadCommentDataSourceService','6WzoMmQ','rangeId','Inject','/solved','parse','CommentService','parentId','CustomRangeType','listComments','/edit','replies','root','requireSession','/add','UNRECOGNIZED','personId','167485BVugSt','stringify','UniverProThreadCommentDatasource','userId','ThreadCommentModel','rxjs','deleteComment','map','values','_initUserSync','_threadCommentDataSource','Add','UniverProCollaborationClient','Injector','updateComment','body','Edit','CollaborationSessionService','UniverLicensePlugin','UniverCollaborationClientPlugin','replyId','resolveComment','size','UniverThreadCommentDataSourcePlugin'];_0x20d6=function(){return _0x1c30ae;};return _0x20d6();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.8.0-nightly.
|
|
3
|
+
"version": "0.8.0-nightly.202506081606",
|
|
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.8.0-nightly.
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs
|
|
51
|
-
"@univerjs/network": "0.8.0-nightly.
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.8.0-nightly.202506081606",
|
|
49
|
+
"@univerjs-pro/license": "0.8.0-nightly.202506081606",
|
|
50
|
+
"@univerjs/core": "0.8.0-nightly.202506081606",
|
|
51
|
+
"@univerjs/network": "0.8.0-nightly.202506081606",
|
|
52
|
+
"@univerjs/thread-comment-ui": "0.8.0-nightly.202506081606",
|
|
52
53
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
53
|
-
"@univerjs/thread-comment": "0.8.0-nightly.
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.8.0-nightly.202506061607"
|
|
54
|
+
"@univerjs/thread-comment": "0.8.0-nightly.202506081606"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|