@univerjs-pro/thread-comment-datasource 0.10.7-nightly.202509090319 → 0.10.7-nightly.202509130618
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';const _0x4f6f57=_0x2eab;(function(_0x51c0de,_0x1a41db){const _0x8db6f4=_0x2eab,_0x6b2e9b=_0x51c0de();while(!![]){try{const _0x34febb=-parseInt(_0x8db6f4(0x1c0))/0x1+parseInt(_0x8db6f4(0x226))/0x2+-parseInt(_0x8db6f4(0x215))/0x3*(-parseInt(_0x8db6f4(0x1ca))/0x4)+-parseInt(_0x8db6f4(0x1d3))/0x5*(parseInt(_0x8db6f4(0x1fa))/0x6)+parseInt(_0x8db6f4(0x22a))/0x7*(-parseInt(_0x8db6f4(0x1cf))/0x8)+parseInt(_0x8db6f4(0x1ef))/0x9+parseInt(_0x8db6f4(0x1d2))/0xa;if(_0x34febb===_0x1a41db)break;else _0x6b2e9b['push'](_0x6b2e9b['shift']());}catch(_0x36ce06){_0x6b2e9b['push'](_0x6b2e9b['shift']());}}}(_0x1eae,0x35c0f));Object[_0x4f6f57(0x205)](exports,Symbol[_0x4f6f57(0x227)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x4f6f57(0x1f9);var I=(_0x29e28a=>(_0x29e28a[_0x29e28a[_0x4f6f57(0x1e3)]=0x0]=_0x4f6f57(0x1e3),_0x29e28a[_0x29e28a[_0x4f6f57(0x1cb)]=0x1]=_0x4f6f57(0x1cb),_0x29e28a[_0x29e28a[_0x4f6f57(0x22d)]=-0x1]=_0x4f6f57(0x22d),_0x29e28a))(I||{}),v=(_0x25a15c=>(_0x25a15c[_0x25a15c[_0x4f6f57(0x20b)]=0x0]='Unknown',_0x25a15c[_0x25a15c[_0x4f6f57(0x1fd)]=0x1]=_0x4f6f57(0x1fd),_0x25a15c[_0x25a15c[_0x4f6f57(0x201)]=0x2]=_0x4f6f57(0x201),_0x25a15c[_0x25a15c[_0x4f6f57(0x1c6)]=0x3]='Edit',_0x25a15c[_0x25a15c[_0x4f6f57(0x1c8)]=0x4]=_0x4f6f57(0x1c8),_0x25a15c[_0x25a15c[_0x4f6f57(0x1d5)]=0x5]=_0x4f6f57(0x1d5),_0x25a15c[_0x25a15c[_0x4f6f57(0x22d)]=-0x1]=_0x4f6f57(0x22d),_0x25a15c))(v||{});const f=_0x292d6c=>c[_0x4f6f57(0x20f)](new Date(+_0x292d6c))['format'](_0x4f6f57(0x1be)),R=async(_0x2de1bd,_0x2046f3)=>{const _0x343033=_0x4f6f57,_0x38d160=_0x2de1bd['get'](c[_0x343033(0x1fe)]),_0x24905b=_0x2de1bd[_0x343033(0x1fc)](P[_0x343033(0x1f5)]);_0x2046f3[_0x343033(0x1da)](_0x52f53c=>{const _0x12043c=_0x343033;_0x38d160[_0x12043c(0x1c5)](_0x52f53c)&&_0x2046f3[_0x12043c(0x1ea)](_0x52f53c);}),_0x2046f3['size']&&(await _0x24905b[_0x343033(0x1fc)](_0x343033(0x1c4),{'params':{'userIDs':[..._0x2046f3]}}))[_0x343033(0x1e8)][_0x343033(0x1fb)][_0x343033(0x1da)](_0x54f0c9=>{const _0xd456ee=_0x343033;_0x54f0c9&&_0x38d160[_0xd456ee(0x213)](_0x54f0c9);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x10bd8e,_0x475a67,_0x14941c,_0x36ee28)=>{for(var _0x2b5b03=_0x36ee28>0x1?void 0x0:_0x36ee28?$(_0x475a67,_0x14941c):_0x475a67,_0x180982=_0x10bd8e['length']-0x1,_0x4f0cfe;_0x180982>=0x0;_0x180982--)(_0x4f0cfe=_0x10bd8e[_0x180982])&&(_0x2b5b03=_0x4f0cfe(_0x2b5b03)||_0x2b5b03);return _0x2b5b03;},S=(_0x4d23b1,_0x1a1732)=>(_0x554db4,_0x471422)=>_0x1a1732(_0x554db4,_0x471422,_0x4d23b1);function _0x2eab(_0x4b6f0e,_0x47281c){const _0x1eaea3=_0x1eae();return _0x2eab=function(_0x2eab48,_0x585f6b){_0x2eab48=_0x2eab48-0x1bb;let _0x2c2bf7=_0x1eaea3[_0x2eab48];return _0x2c2bf7;},_0x2eab(_0x4b6f0e,_0x47281c);}let _=class extends c[_0x4f6f57(0x223)]{constructor(_0x360d3b,_0x965bad,_0x19172d,_0x40835c){const _0x3ffb97=_0x4f6f57;super(),this[_0x3ffb97(0x1d7)]=_0x360d3b,this[_0x3ffb97(0x1db)]=_0x965bad,this[_0x3ffb97(0x1c3)]=_0x19172d,this['_injector']=_0x40835c,this['_init'](),this[_0x3ffb97(0x224)]();}[_0x4f6f57(0x224)](){const _0x2dc334=_0x4f6f57;this['disposeWithMe'](this[_0x2dc334(0x1db)][_0x2dc334(0x22e)]['pipe'](j[_0x2dc334(0x1ee)](0x10))[_0x2dc334(0x206)](_0x44ef08=>{const _0x581598=_0x2dc334,_0x5eb03a=new Set();_0x44ef08[_0x581598(0x1da)](_0x3f3dae=>{const _0x7900b=_0x581598;switch(_0x3f3dae[_0x7900b(0x20c)]){case _0x7900b(0x20a):{const _0x3eb4bf=_0x3f3dae[_0x7900b(0x1d6)]['personId'];_0x5eb03a[_0x7900b(0x20a)](_0x3eb4bf);break;}}}),R(this[_0x581598(0x1e0)],_0x5eb03a);}));}[_0x4f6f57(0x1ed)](){const _0x5ac597=_0x4f6f57;this['disposeWithMe'](this[_0x5ac597(0x1d7)]['commentUpdate$']['subscribe'](async _0xf8829f=>{const _0x421f8e=_0x5ac597;var _0x4e97d7,_0x1c61e0,_0x62b20b,_0x58d9b6;const _0x17a2a7=(_0x4e97d7=this['_threadCommentModel'][_0x421f8e(0x1c2)](_0xf8829f['unitId'])[_0x421f8e(0x1d8)](_0x53fd15=>_0x53fd15[_0x421f8e(0x1d1)]===_0xf8829f[_0x421f8e(0x1d1)]))==null?void 0x0:_0x4e97d7['root'];if(!_0x17a2a7)return;const {unitId:_0xd3ba0f,subUnitId:_0x5bc435}=_0x17a2a7;switch(_0xf8829f[_0x421f8e(0x1e5)]&&this['_userService'][_0x421f8e(0x213)](_0xf8829f[_0x421f8e(0x1e5)]),_0xf8829f[_0x421f8e(0x20c)]){case v['Add']:break;case v[_0x421f8e(0x201)]:{this[_0x421f8e(0x1db)][_0x421f8e(0x1dd)](_0xd3ba0f,_0x5bc435,{'unitId':_0xd3ba0f,'subUnitId':_0x5bc435,'ref':'','id':_0xf8829f[_0x421f8e(0x1cd)],'dT':f(+_0xf8829f[_0x421f8e(0x209)]),'threadId':_0xf8829f['threadId'],'personId':(_0x62b20b=(_0x1c61e0=_0xf8829f[_0x421f8e(0x1e5)])==null?void 0x0:_0x1c61e0['userID'])!=null?_0x62b20b:_0xf8829f[_0x421f8e(0x1bc)],'text':JSON['parse'](_0xf8829f[_0x421f8e(0x1dc)]),'parentId':_0x17a2a7['id']});break;}case v['Delete']:{const _0x1dc361=this[_0x421f8e(0x1db)][_0x421f8e(0x211)](_0xd3ba0f,_0x5bc435,_0xf8829f[_0x421f8e(0x1cd)]);_0x1dc361&&_0x1dc361[_0x421f8e(0x210)]&&this['_threadCommentModel']['deleteComment'](_0xd3ba0f,_0x5bc435,_0xf8829f[_0x421f8e(0x1cd)]);break;}case v[_0x421f8e(0x1c6)]:{this[_0x421f8e(0x1db)][_0x421f8e(0x222)](_0xd3ba0f,_0x5bc435,{'commentId':_0xf8829f[_0x421f8e(0x1cd)],'text':JSON[_0x421f8e(0x1f6)](_0xf8829f[_0x421f8e(0x1dc)])});break;}case v[_0x421f8e(0x1d5)]:{const _0x58afd3=(_0x58d9b6=this[_0x421f8e(0x1db)][_0x421f8e(0x1c2)](_0xf8829f['unitId'])[_0x421f8e(0x1d8)](_0x1aac8a=>_0x1aac8a[_0x421f8e(0x1d1)]===_0xf8829f[_0x421f8e(0x1d1)]))==null?void 0x0:_0x58d9b6['root'];_0x58afd3&&this['_threadCommentModel'][_0x421f8e(0x1ec)](_0xd3ba0f,_0x5bc435,_0x58afd3['id'],_0xf8829f[_0x421f8e(0x1cc)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x4f6f57(0x1c7)](b[_0x4f6f57(0x1d0)])),S(0x1,c[_0x4f6f57(0x1c7)](M[_0x4f6f57(0x1f1)])),S(0x2,c[_0x4f6f57(0x1c7)](c[_0x4f6f57(0x1fe)])),S(0x3,c[_0x4f6f57(0x1c7)](c[_0x4f6f57(0x1bb)]))],_);const q=_0x4f6f57(0x1f2),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x517ffb,_0xd01c6d,_0x4b6f6a,_0x3841b9)=>{for(var _0x372bf2=_0x3841b9>0x1?void 0x0:_0x3841b9?A(_0xd01c6d,_0x4b6f6a):_0xd01c6d,_0x4f0510=_0x517ffb['length']-0x1,_0x4c2d90;_0x4f0510>=0x0;_0x4f0510--)(_0x4c2d90=_0x517ffb[_0x4f0510])&&(_0x372bf2=_0x4c2d90(_0x372bf2)||_0x372bf2);return _0x372bf2;},C=(_0x3d9c02,_0x5190b0)=>(_0x232de7,_0xeec352)=>_0x5190b0(_0x232de7,_0xeec352,_0x3d9c02);function Y(_0x2cc733,_0x4292cc){const _0x48470b=_0x4f6f57,_0x1dabab=_0x2cc733[_0x48470b(0x1df)][0x0];return{..._0x4292cc,'id':_0x1dabab[_0x48470b(0x1cd)],'resolved':_0x2cc733['solved']===0x1,'dT':f(_0x1dabab[_0x48470b(0x209)]),'personId':_0x1dabab[_0x48470b(0x1bc)],'threadId':_0x1dabab[_0x48470b(0x1d1)]};}function G(_0x10566f,_0x4fb45d,_0x34f4ad){const _0x371b9b=_0x4f6f57;var _0x6426b4,_0x36aa96;if(((_0x36aa96=(_0x6426b4=_0x10566f==null?void 0x0:_0x10566f[_0x371b9b(0x1df)])==null?void 0x0:_0x6426b4[_0x371b9b(0x1f8)])!=null?_0x36aa96:0x0)>0x0){const _0x45df45=(_0x3fdcc3,_0x23458f)=>({'id':_0x3fdcc3[_0x371b9b(0x1cd)],'threadId':_0x3fdcc3['threadId'],'dT':f(_0x3fdcc3[_0x371b9b(0x209)]),'personId':_0x3fdcc3['userId'],'resolved':_0x10566f[_0x371b9b(0x1cc)]===I[_0x371b9b(0x1cb)],'unitId':_0x4fb45d,'subUnitId':_0x34f4ad,'text':JSON[_0x371b9b(0x1f6)](_0x3fdcc3[_0x371b9b(0x1dc)]),'parentId':_0x23458f}),_0x38a1b0=_0x45df45(_0x10566f['replies'][0x0]);return{..._0x38a1b0,'children':_0x10566f[_0x371b9b(0x1df)]['slice'](0x1)[_0x371b9b(0x1bd)](_0x1d7cd9=>_0x45df45(_0x1d7cd9,_0x38a1b0['id']))};}return null;}function _0x1eae(){const _0x282d38=['syncUpdateMutationToColla','_threadCommentDataSource','UniverInstanceType','defineProperty','subscribe','/add','rangeType','createTimestamp','add','Unknown','type','filter','/reply','dayjs','parentId','getComment','deleteComment','addUser','error','368601gLXAqf','CustomRangeType','DependentOn','post','/delete','_initDataSource','reply','comments','/solved','UniverThreadCommentDataSourcePlugin','code','getOwnPropertyDescriptor','_sessionService','updateComment','Disposable','_initUserSync','/universer-api/comment/unit/','456826IXPZKq','toStringTag','_configService','_httpService','231245QkkahV','dataSource','Plugin','UNRECOGNIZED','commentUpdate$','format','Injector','userId','map','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','285681okCKtb','UniverCollaborationClientPlugin','getUnit','_userService','/universer-api/user/list','getUser','Edit','Inject','Delete','rangeId','4XHVXCH','Solved','solved','replyId','getMemberID','40SxrEzV','CommentService','threadId','4389480HllmJU','505095utkdSX','stringify','Solve','payload','_commentService','find','ref','forEach','_threadCommentModel','content','addComment','getCurrentUser','replies','_injector','IConfigService','onReady','OpenOrReOpen','IThreadCommentDataSourceService','user','_config','setConfig','body','resolved','delete','/list','resolveComment','_init','bufferTime','745569KdQTHS','values','ThreadCommentModel','thread-comment-data-source.config','customRanges','requireSession','HTTPService','parse','UniverLicensePlugin','length','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','12LiAeRU','users','get','Add','UserManagerService','COMMENT','onStarting','Reply'];_0x1eae=function(){return _0x282d38;};return _0x1eae();}let p=class{constructor(_0x30c87b,_0x2a8f13,_0x2efd21){const _0x8e37e5=_0x4f6f57;this[_0x8e37e5(0x229)]=_0x30c87b,this[_0x8e37e5(0x1c3)]=_0x2a8f13,this[_0x8e37e5(0x221)]=_0x2efd21;}async[_0x4f6f57(0x1dd)](_0x1ea538){const _0x4b81e2=_0x4f6f57;var _0x197053,_0x2542bb;const {parentId:_0x3e7d9c,unitId:_0x4eb871,text:_0x5f242e,threadId:_0x39df6c}=_0x1ea538,_0x5757f6=(_0x2542bb=(_0x197053=_0x5f242e[_0x4b81e2(0x1f3)])==null?void 0x0:_0x197053[_0x4b81e2(0x20d)](_0x5c82fc=>_0x5c82fc['rangeType']===c[_0x4b81e2(0x216)]['COMMENT'])['map'](_0x4c3f39=>_0x4c3f39[_0x4b81e2(0x1c9)]))!=null?_0x2542bb:[],_0x43bd38=JSON[_0x4b81e2(0x1d4)](_0x5f242e),_0x5c0036=(await this[_0x4b81e2(0x221)][_0x4b81e2(0x1f4)](_0x4eb871))[_0x4b81e2(0x1ce)]();if(_0x3e7d9c){const _0x52d50c={'memberId':_0x5c0036,'unitId':_0x4eb871,'content':_0x43bd38,'mention':_0x5757f6,'threadId':_0x39df6c},_0x1099ba=(await this[_0x4b81e2(0x229)]['post'](_0x4b81e2(0x225)+_0x4eb871+_0x4b81e2(0x20e),{'body':_0x52d50c}))[_0x4b81e2(0x1e8)][_0x4b81e2(0x21b)];return{..._0x1ea538,'id':_0x1099ba[_0x4b81e2(0x1cd)],'dT':c[_0x4b81e2(0x20f)](+_0x1099ba['createTimestamp'])[_0x4b81e2(0x22f)](_0x4b81e2(0x1be)),'personId':_0x1099ba[_0x4b81e2(0x1bc)]};}else{const _0x26f2ae={'memberId':_0x5c0036,'unitId':_0x4eb871,'content':_0x43bd38,'mention':_0x5757f6},_0x4cefed=await this[_0x4b81e2(0x229)][_0x4b81e2(0x218)](_0x4b81e2(0x225)+_0x4eb871+_0x4b81e2(0x207),{'body':_0x26f2ae});return Y(_0x4cefed[_0x4b81e2(0x1e8)]['comment'],_0x1ea538);}}async[_0x4f6f57(0x222)](_0x21045f){const _0x162b96=_0x4f6f57;var _0x202227,_0x3303b1;const {text:_0xd508fb,unitId:_0x2f9d75}=_0x21045f,_0x5ade6d=(_0x3303b1=(_0x202227=_0xd508fb[_0x162b96(0x1f3)])==null?void 0x0:_0x202227[_0x162b96(0x20d)](_0x3977f7=>_0x3977f7[_0x162b96(0x208)]===c[_0x162b96(0x216)][_0x162b96(0x1ff)])[_0x162b96(0x1bd)](_0x34351c=>_0x34351c[_0x162b96(0x1c9)]))!=null?_0x3303b1:[],_0x347659=JSON['stringify'](_0xd508fb),_0x547a35=_0x21045f['threadId'],_0x41833d=_0x21045f['id'],_0x44a058={'memberId':(await this[_0x162b96(0x221)][_0x162b96(0x1f4)](_0x2f9d75))['getMemberID'](),'unitId':_0x2f9d75,'threadId':_0x547a35,'mention':_0x5ade6d,'content':_0x347659,'replyId':_0x41833d},_0x577064=await this[_0x162b96(0x229)][_0x162b96(0x218)](_0x162b96(0x225)+_0x2f9d75+'/edit',{'body':_0x44a058});return!_0x577064[_0x162b96(0x1e8)][_0x162b96(0x214)]||_0x577064[_0x162b96(0x1e8)]['error'][_0x162b96(0x21f)]===0x1;}async[_0x4f6f57(0x1ec)](_0x245fbd){const _0x4c615c=_0x4f6f57,{unitId:_0x67709}=_0x245fbd,_0x27cc3b=_0x245fbd['threadId'],_0x18e31a={'memberId':this['_userService'][_0x4c615c(0x1de)]()['userID'],'unitId':_0x67709,'threadId':_0x27cc3b,'solved':_0x245fbd[_0x4c615c(0x1e9)]?I[_0x4c615c(0x1cb)]:I['OpenOrReOpen']},_0x3aa034=await this['_httpService'][_0x4c615c(0x218)](_0x4c615c(0x225)+_0x67709+_0x4c615c(0x21d),{'body':_0x18e31a});return!_0x3aa034[_0x4c615c(0x1e8)][_0x4c615c(0x214)]||_0x3aa034['body'][_0x4c615c(0x214)][_0x4c615c(0x21f)]===0x1;}async[_0x4f6f57(0x212)](_0x1954d7,_0x53615a,_0x5bf174,_0x4c5658){const _0x5c2a91=_0x4f6f57,_0x3d5062={'memberId':(await this[_0x5c2a91(0x221)]['requireSession'](_0x1954d7))[_0x5c2a91(0x1ce)](),'threadId':_0x5bf174,'replyId':_0x4c5658,'unitId':_0x1954d7},_0x14a116=await this['_httpService'][_0x5c2a91(0x218)](_0x5c2a91(0x225)+_0x1954d7+_0x5c2a91(0x219),{'body':_0x3d5062});return!_0x14a116['body'][_0x5c2a91(0x214)]||_0x14a116[_0x5c2a91(0x1e8)]['error'][_0x5c2a91(0x21f)]===0x1;}async['listComments'](_0x2d8f52,_0x1a764b,_0x3edd4b){const _0x183b5b=_0x4f6f57,_0x2f02c0={'unitId':_0x2d8f52,'threadId':_0x3edd4b},_0x440e14=await this[_0x183b5b(0x229)][_0x183b5b(0x218)](_0x183b5b(0x225)+_0x2d8f52+_0x183b5b(0x1eb),{'body':_0x2f02c0}),_0x3f6d60=_0x3edd4b[_0x183b5b(0x1bd)](_0x5e682f=>G(_0x440e14['body'][_0x183b5b(0x21c)][_0x5e682f],_0x2d8f52,_0x1a764b))[_0x183b5b(0x20d)](Boolean);return Object[_0x183b5b(0x1f0)](_0x440e14[_0x183b5b(0x1e8)][_0x183b5b(0x1fb)])[_0x183b5b(0x1da)](_0x36d31a=>{const _0x6ec7c=_0x183b5b;this[_0x6ec7c(0x1c3)][_0x6ec7c(0x213)](_0x36d31a);}),_0x3f6d60;}['saveCommentToSnapshot'](_0x1df18c){const _0x5641e4=_0x4f6f57;return{'id':_0x1df18c['id'],'threadId':_0x1df18c[_0x5641e4(0x1d1)],'ref':_0x1df18c[_0x5641e4(0x1d9)]};}};p=x([C(0x0,c[_0x4f6f57(0x1c7)](P['HTTPService'])),C(0x1,c[_0x4f6f57(0x1c7)](c[_0x4f6f57(0x1fe)])),C(0x2,c[_0x4f6f57(0x1c7)](b['CollaborationSessionService']))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x6ae5de,_0x1e1c53,_0x5db7f7,_0x55d6f8)=>{for(var _0x329fe0=_0x55d6f8>0x1?void 0x0:_0x55d6f8?H(_0x1e1c53,_0x5db7f7):_0x1e1c53,_0x453845=_0x6ae5de['length']-0x1,_0x1448ca;_0x453845>=0x0;_0x453845--)(_0x1448ca=_0x6ae5de[_0x453845])&&(_0x329fe0=_0x1448ca(_0x329fe0)||_0x329fe0);return _0x329fe0;},y=(_0x2ae971,_0x4da78b)=>(_0x259592,_0x44c020)=>_0x4da78b(_0x259592,_0x44c020,_0x2ae971);let g=class extends c['Disposable']{constructor(_0x39677d,_0x547f4f){const _0x56b84b=_0x4f6f57;super(),this[_0x56b84b(0x1bf)]=_0x39677d,this[_0x56b84b(0x203)]=_0x547f4f,this[_0x56b84b(0x21a)]();}['_initDataSource'](){const _0x2a56a3=_0x4f6f57;this[_0x2a56a3(0x1bf)][_0x2a56a3(0x22b)]=this[_0x2a56a3(0x203)],this[_0x2a56a3(0x1bf)][_0x2a56a3(0x202)]=!0x1;}};g=J([y(0x0,M[_0x4f6f57(0x1e4)]),y(0x1,c[_0x4f6f57(0x1c7)](p))],g);var F=Object[_0x4f6f57(0x205)],L=Object[_0x4f6f57(0x220)],Z=(_0x1ef1e0,_0x354972,_0x5aa832)=>_0x354972 in _0x1ef1e0?F(_0x1ef1e0,_0x354972,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5aa832}):_0x1ef1e0[_0x354972]=_0x5aa832,W=(_0x579d66,_0x5dccc9,_0x1bb98e,_0x497cd4)=>{for(var _0x4d89c1=_0x497cd4>0x1?void 0x0:_0x497cd4?L(_0x5dccc9,_0x1bb98e):_0x5dccc9,_0x5c5fb9=_0x579d66['length']-0x1,_0x502ce6;_0x5c5fb9>=0x0;_0x5c5fb9--)(_0x502ce6=_0x579d66[_0x5c5fb9])&&(_0x4d89c1=_0x502ce6(_0x4d89c1)||_0x4d89c1);return _0x4d89c1;},O=(_0x59de2e,_0x28ef79)=>(_0x36a74b,_0x2d4628)=>_0x28ef79(_0x36a74b,_0x2d4628,_0x59de2e),N=(_0x382537,_0x3193d,_0x1728f4)=>Z(_0x382537,typeof _0x3193d!='symbol'?_0x3193d+'':_0x3193d,_0x1728f4);exports[_0x4f6f57(0x21e)]=class extends c[_0x4f6f57(0x22c)]{constructor(_0x1dfaa6=D,_0x512baa,_0x3c3a33){const _0x3a9b6a=_0x4f6f57;super(),this[_0x3a9b6a(0x1e6)]=_0x1dfaa6,this['_injector']=_0x512baa,this['_configService']=_0x3c3a33;const {..._0x5a18a7}=c['merge']({},D,this[_0x3a9b6a(0x1e6)]);this[_0x3a9b6a(0x228)][_0x3a9b6a(0x1e7)](q,_0x5a18a7);}[_0x4f6f57(0x200)](){const _0x33c298=_0x4f6f57;[[p],[g],[_]][_0x33c298(0x1da)](_0xc6d789=>{const _0xefd48=_0x33c298;this[_0xefd48(0x1e0)][_0xefd48(0x20a)](_0xc6d789);});}[_0x4f6f57(0x1e2)](){const _0x3b4fff=_0x4f6f57;this[_0x3b4fff(0x1e0)][_0x3b4fff(0x1fc)](g),this[_0x3b4fff(0x1e0)]['get'](_);}},N(exports[_0x4f6f57(0x21e)],'pluginName',U),N(exports[_0x4f6f57(0x21e)],'type',c[_0x4f6f57(0x204)]['UNIVER_UNKNOWN']),exports[_0x4f6f57(0x21e)]=W([c[_0x4f6f57(0x217)](w['UniverThreadCommentUIPlugin'],b[_0x4f6f57(0x1c1)],T[_0x4f6f57(0x1f7)]),O(0x1,c['Inject'](c[_0x4f6f57(0x1bb)])),O(0x2,c[_0x4f6f57(0x1e1)])],exports[_0x4f6f57(0x21e)]);
|
|
1
|
+
'use strict';const _0x22b0fc=_0x2e9b;(function(_0x1bfecf,_0x1f000c){const _0x5e8af1=_0x2e9b,_0x444723=_0x1bfecf();while(!![]){try{const _0x115f45=parseInt(_0x5e8af1(0x9d))/0x1*(-parseInt(_0x5e8af1(0x71))/0x2)+parseInt(_0x5e8af1(0xab))/0x3+-parseInt(_0x5e8af1(0x76))/0x4*(-parseInt(_0x5e8af1(0x8b))/0x5)+parseInt(_0x5e8af1(0xa1))/0x6*(parseInt(_0x5e8af1(0xe2))/0x7)+-parseInt(_0x5e8af1(0xe1))/0x8+parseInt(_0x5e8af1(0x89))/0x9*(-parseInt(_0x5e8af1(0xb1))/0xa)+parseInt(_0x5e8af1(0xda))/0xb;if(_0x115f45===_0x1f000c)break;else _0x444723['push'](_0x444723['shift']());}catch(_0x187edc){_0x444723['push'](_0x444723['shift']());}}}(_0x21d3,0xac78e));Object[_0x22b0fc(0x6f)](exports,Symbol['toStringTag'],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x13566e=>(_0x13566e[_0x13566e[_0x22b0fc(0x8e)]=0x0]=_0x22b0fc(0x8e),_0x13566e[_0x13566e['Solved']=0x1]=_0x22b0fc(0x7a),_0x13566e[_0x13566e[_0x22b0fc(0xdb)]=-0x1]='UNRECOGNIZED',_0x13566e))(I||{}),v=(_0x41c27d=>(_0x41c27d[_0x41c27d['Unknown']=0x0]=_0x22b0fc(0x7c),_0x41c27d[_0x41c27d[_0x22b0fc(0x78)]=0x1]=_0x22b0fc(0x78),_0x41c27d[_0x41c27d[_0x22b0fc(0xb6)]=0x2]='Reply',_0x41c27d[_0x41c27d[_0x22b0fc(0xa2)]=0x3]=_0x22b0fc(0xa2),_0x41c27d[_0x41c27d[_0x22b0fc(0x70)]=0x4]=_0x22b0fc(0x70),_0x41c27d[_0x41c27d[_0x22b0fc(0x91)]=0x5]=_0x22b0fc(0x91),_0x41c27d[_0x41c27d[_0x22b0fc(0xdb)]=-0x1]=_0x22b0fc(0xdb),_0x41c27d))(v||{});const f=_0x1662c4=>c[_0x22b0fc(0x9b)](new Date(+_0x1662c4))[_0x22b0fc(0xa5)](_0x22b0fc(0xc9)),R=async(_0xf1341d,_0x3abd40)=>{const _0x22536a=_0x22b0fc,_0x53b1b6=_0xf1341d[_0x22536a(0xc3)](c[_0x22536a(0x9f)]),_0x191aeb=_0xf1341d[_0x22536a(0xc3)](P[_0x22536a(0x73)]);_0x3abd40[_0x22536a(0xdd)](_0x495087=>{const _0x13da5c=_0x22536a;_0x53b1b6[_0x13da5c(0xd9)](_0x495087)&&_0x3abd40[_0x13da5c(0x7f)](_0x495087);}),_0x3abd40[_0x22536a(0x8a)]&&(await _0x191aeb['get'](_0x22536a(0x7e),{'params':{'userIDs':[..._0x3abd40]}}))['body'][_0x22536a(0xb8)][_0x22536a(0xdd)](_0x2573c1=>{_0x2573c1&&_0x53b1b6['addUser'](_0x2573c1);});};function _0x2e9b(_0x2ecc66,_0x53c78d){const _0x21d3f7=_0x21d3();return _0x2e9b=function(_0x2e9bc1,_0x14f065){_0x2e9bc1=_0x2e9bc1-0x6a;let _0x4e0a89=_0x21d3f7[_0x2e9bc1];return _0x4e0a89;},_0x2e9b(_0x2ecc66,_0x53c78d);}var $=Object[_0x22b0fc(0x94)],E=(_0x28efad,_0x57d508,_0x5a28e0,_0x49d627)=>{const _0x3ee7dd=_0x22b0fc;for(var _0x57f96f=_0x49d627>0x1?void 0x0:_0x49d627?$(_0x57d508,_0x5a28e0):_0x57d508,_0x11ec4f=_0x28efad[_0x3ee7dd(0xa0)]-0x1,_0x466e89;_0x11ec4f>=0x0;_0x11ec4f--)(_0x466e89=_0x28efad[_0x11ec4f])&&(_0x57f96f=_0x466e89(_0x57f96f)||_0x57f96f);return _0x57f96f;},S=(_0x4e463b,_0x3deff3)=>(_0x3c9bc8,_0x1f3ffa)=>_0x3deff3(_0x3c9bc8,_0x1f3ffa,_0x4e463b);let _=class extends c['Disposable']{constructor(_0x676dd5,_0x44718c,_0x44c84b,_0x4aad3b){const _0x26bd3b=_0x22b0fc;super(),this[_0x26bd3b(0x6b)]=_0x676dd5,this[_0x26bd3b(0xca)]=_0x44718c,this[_0x26bd3b(0xa6)]=_0x44c84b,this[_0x26bd3b(0xa9)]=_0x4aad3b,this[_0x26bd3b(0xba)](),this[_0x26bd3b(0xaa)]();}['_initUserSync'](){const _0x4dd5ae=_0x22b0fc;this['disposeWithMe'](this['_threadCommentModel'][_0x4dd5ae(0xd6)][_0x4dd5ae(0xdc)](j[_0x4dd5ae(0xc0)](0x10))[_0x4dd5ae(0xd7)](_0x1b7526=>{const _0x4ea2a2=_0x4dd5ae,_0x3b152d=new Set();_0x1b7526[_0x4ea2a2(0xdd)](_0x1dd5e1=>{const _0x4ffb5d=_0x4ea2a2;switch(_0x1dd5e1[_0x4ffb5d(0x81)]){case _0x4ffb5d(0xb7):{const _0xe8703b=_0x1dd5e1[_0x4ffb5d(0x99)]['personId'];_0x3b152d[_0x4ffb5d(0xb7)](_0xe8703b);break;}}}),R(this[_0x4ea2a2(0xa9)],_0x3b152d);}));}[_0x22b0fc(0xba)](){const _0x4d8492=_0x22b0fc;this['disposeWithMe'](this[_0x4d8492(0x6b)][_0x4d8492(0xd6)][_0x4d8492(0xd7)](async _0x351f51=>{const _0x4dee7c=_0x4d8492;var _0x20dbe7,_0x15b0f3,_0x16ceb6,_0x159a6c;const _0x32a2f3=(_0x20dbe7=this[_0x4dee7c(0xca)][_0x4dee7c(0x92)](_0x351f51[_0x4dee7c(0xd1)])[_0x4dee7c(0xe0)](_0x4daa34=>_0x4daa34[_0x4dee7c(0xac)]===_0x351f51[_0x4dee7c(0xac)]))==null?void 0x0:_0x20dbe7[_0x4dee7c(0xc5)];if(!_0x32a2f3)return;const {unitId:_0x4f6a98,subUnitId:_0x58b07c}=_0x32a2f3;switch(_0x351f51[_0x4dee7c(0xde)]&&this['_userService'][_0x4dee7c(0xd0)](_0x351f51['user']),_0x351f51[_0x4dee7c(0x81)]){case v['Add']:break;case v[_0x4dee7c(0xb6)]:{this['_threadCommentModel'][_0x4dee7c(0x85)](_0x4f6a98,_0x58b07c,{'unitId':_0x4f6a98,'subUnitId':_0x58b07c,'ref':'','id':_0x351f51[_0x4dee7c(0x82)],'dT':f(+_0x351f51[_0x4dee7c(0xaf)]),'threadId':_0x351f51['threadId'],'personId':(_0x16ceb6=(_0x15b0f3=_0x351f51[_0x4dee7c(0xde)])==null?void 0x0:_0x15b0f3[_0x4dee7c(0xb2)])!=null?_0x16ceb6:_0x351f51['userId'],'text':JSON[_0x4dee7c(0xa7)](_0x351f51[_0x4dee7c(0x6d)]),'parentId':_0x32a2f3['id']});break;}case v[_0x4dee7c(0x70)]:{const _0x23384c=this['_threadCommentModel'][_0x4dee7c(0xd3)](_0x4f6a98,_0x58b07c,_0x351f51[_0x4dee7c(0x82)]);_0x23384c&&_0x23384c[_0x4dee7c(0xae)]&&this[_0x4dee7c(0xca)]['deleteComment'](_0x4f6a98,_0x58b07c,_0x351f51['replyId']);break;}case v[_0x4dee7c(0xa2)]:{this[_0x4dee7c(0xca)][_0x4dee7c(0x90)](_0x4f6a98,_0x58b07c,{'commentId':_0x351f51['replyId'],'text':JSON[_0x4dee7c(0xa7)](_0x351f51[_0x4dee7c(0x6d)])});break;}case v[_0x4dee7c(0x91)]:{const _0xa3fb9a=(_0x159a6c=this[_0x4dee7c(0xca)]['getUnit'](_0x351f51[_0x4dee7c(0xd1)])[_0x4dee7c(0xe0)](_0x14839e=>_0x14839e[_0x4dee7c(0xac)]===_0x351f51['threadId']))==null?void 0x0:_0x159a6c['root'];_0xa3fb9a&&this[_0x4dee7c(0xca)]['resolveComment'](_0x4f6a98,_0x58b07c,_0xa3fb9a['id'],_0x351f51[_0x4dee7c(0x7b)]===I[_0x4dee7c(0x7a)]);break;}}}));}};_=E([S(0x0,c[_0x22b0fc(0xd2)](b[_0x22b0fc(0x72)])),S(0x1,c[_0x22b0fc(0xd2)](M[_0x22b0fc(0x98)])),S(0x2,c['Inject'](c[_0x22b0fc(0x9f)])),S(0x3,c['Inject'](c[_0x22b0fc(0x7d)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x22b0fc(0x94)],x=(_0x2eb70e,_0x12b6ce,_0x534eeb,_0x671dc0)=>{for(var _0x509b4a=_0x671dc0>0x1?void 0x0:_0x671dc0?A(_0x12b6ce,_0x534eeb):_0x12b6ce,_0x1bbb0d=_0x2eb70e['length']-0x1,_0x367757;_0x1bbb0d>=0x0;_0x1bbb0d--)(_0x367757=_0x2eb70e[_0x1bbb0d])&&(_0x509b4a=_0x367757(_0x509b4a)||_0x509b4a);return _0x509b4a;},C=(_0x2cd3d3,_0xeb3e20)=>(_0x26e704,_0x3f4787)=>_0xeb3e20(_0x26e704,_0x3f4787,_0x2cd3d3);function Y(_0x445138,_0x504f4b){const _0x5b60c8=_0x22b0fc,_0x5a547e=_0x445138[_0x5b60c8(0x87)][0x0];return{..._0x504f4b,'id':_0x5a547e['replyId'],'resolved':_0x445138[_0x5b60c8(0x7b)]===0x1,'dT':f(_0x5a547e[_0x5b60c8(0xaf)]),'personId':_0x5a547e[_0x5b60c8(0xbe)],'threadId':_0x5a547e[_0x5b60c8(0xac)]};}function _0x21d3(){const _0x2e58d7=['users','saveCommentToSnapshot','_init','COMMENT','code','deleteComment','userId','/reply','bufferTime','comments','filter','get','stringify','root','UniverThreadCommentDataSourcePlugin','customRanges','syncUpdateMutationToColla','YYYY/MM/DD\x20HH:mm','_threadCommentModel','onReady','error','reply','_sessionService','rangeId','addUser','unitId','Inject','getComment','Plugin','/list','commentUpdate$','subscribe','UniverLicensePlugin','getUser','3767786FmFmtf','UNRECOGNIZED','pipe','forEach','user','/delete','find','4466976ogxkbu','486829JddnUg','getMemberID','requireSession','_commentService','_initDataSource','content','symbol','defineProperty','Delete','3238syNWwN','CommentService','HTTPService','_httpService','IThreadCommentDataSourceService','668uiEmmR','/universer-api/comment/unit/','Add','_threadCommentDataSource','Solved','solved','Unknown','Injector','/universer-api/user/list','delete','values','type','replyId','/add','ref','addComment','pluginName','replies','_threadCommentDataSourceService','56529lHPpFy','size','13045kgUrNd','/edit','map','OpenOrReOpen','CustomRangeType','updateComment','Solve','getUnit','_configService','getOwnPropertyDescriptor','UNIVER_UNKNOWN','rangeType','listComments','ThreadCommentModel','payload','body','dayjs','onStarting','245citjGS','resolveComment','UserManagerService','length','6PDcpoN','Edit','merge','UniverInstanceType','format','_userService','parse','Disposable','_injector','_initUserSync','4005060YgKKKE','threadId','post','parentId','createTimestamp','IConfigService','830HCJnFI','userID','setConfig','_config','DependentOn','Reply','add'];_0x21d3=function(){return _0x2e58d7;};return _0x21d3();}function G(_0x213e12,_0x2f33e2,_0x2b48b4){const _0x211bf2=_0x22b0fc;var _0x30cfe8,_0x18acee;if(((_0x18acee=(_0x30cfe8=_0x213e12==null?void 0x0:_0x213e12[_0x211bf2(0x87)])==null?void 0x0:_0x30cfe8['length'])!=null?_0x18acee:0x0)>0x0){const _0x439be5=(_0x44e1c8,_0x2e0d72)=>({'id':_0x44e1c8[_0x211bf2(0x82)],'threadId':_0x44e1c8[_0x211bf2(0xac)],'dT':f(_0x44e1c8[_0x211bf2(0xaf)]),'personId':_0x44e1c8[_0x211bf2(0xbe)],'resolved':_0x213e12[_0x211bf2(0x7b)]===I[_0x211bf2(0x7a)],'unitId':_0x2f33e2,'subUnitId':_0x2b48b4,'text':JSON[_0x211bf2(0xa7)](_0x44e1c8[_0x211bf2(0x6d)]),'parentId':_0x2e0d72}),_0x857a73=_0x439be5(_0x213e12[_0x211bf2(0x87)][0x0]);return{..._0x857a73,'children':_0x213e12[_0x211bf2(0x87)]['slice'](0x1)['map'](_0x149ff9=>_0x439be5(_0x149ff9,_0x857a73['id']))};}return null;}let p=class{constructor(_0x173f9b,_0x10773b,_0x5288ea){const _0x1e3ad3=_0x22b0fc;this[_0x1e3ad3(0x74)]=_0x173f9b,this['_userService']=_0x10773b,this[_0x1e3ad3(0xce)]=_0x5288ea;}async[_0x22b0fc(0x85)](_0x204b40){const _0xe8a276=_0x22b0fc;var _0x545ba6,_0x20b72a;const {parentId:_0x55330b,unitId:_0xddb54f,text:_0x53e1f0,threadId:_0x26a76e}=_0x204b40,_0x1f14fe=(_0x20b72a=(_0x545ba6=_0x53e1f0[_0xe8a276(0xc7)])==null?void 0x0:_0x545ba6[_0xe8a276(0xc2)](_0x399ebd=>_0x399ebd[_0xe8a276(0x96)]===c[_0xe8a276(0x8f)]['COMMENT'])[_0xe8a276(0x8d)](_0x16ef26=>_0x16ef26[_0xe8a276(0xcf)]))!=null?_0x20b72a:[],_0x4de280=JSON[_0xe8a276(0xc4)](_0x53e1f0),_0x36141f=(await this['_sessionService'][_0xe8a276(0x6a)](_0xddb54f))[_0xe8a276(0xe3)]();if(_0x55330b){const _0x1385c7={'memberId':_0x36141f,'unitId':_0xddb54f,'content':_0x4de280,'mention':_0x1f14fe,'threadId':_0x26a76e},_0x3a8ce1=(await this[_0xe8a276(0x74)][_0xe8a276(0xad)]('/universer-api/comment/unit/'+_0xddb54f+_0xe8a276(0xbf),{'body':_0x1385c7}))[_0xe8a276(0x9a)][_0xe8a276(0xcd)];return{..._0x204b40,'id':_0x3a8ce1[_0xe8a276(0x82)],'dT':c['dayjs'](+_0x3a8ce1[_0xe8a276(0xaf)])[_0xe8a276(0xa5)](_0xe8a276(0xc9)),'personId':_0x3a8ce1[_0xe8a276(0xbe)]};}else{const _0xae6467={'memberId':_0x36141f,'unitId':_0xddb54f,'content':_0x4de280,'mention':_0x1f14fe},_0x295ca2=await this[_0xe8a276(0x74)][_0xe8a276(0xad)](_0xe8a276(0x77)+_0xddb54f+_0xe8a276(0x83),{'body':_0xae6467});return Y(_0x295ca2[_0xe8a276(0x9a)]['comment'],_0x204b40);}}async[_0x22b0fc(0x90)](_0x1310b3){const _0x375aa5=_0x22b0fc;var _0x276180,_0x20c638;const {text:_0x5e8e8d,unitId:_0x17d11f}=_0x1310b3,_0x32b86a=(_0x20c638=(_0x276180=_0x5e8e8d[_0x375aa5(0xc7)])==null?void 0x0:_0x276180[_0x375aa5(0xc2)](_0x1d01bc=>_0x1d01bc[_0x375aa5(0x96)]===c['CustomRangeType'][_0x375aa5(0xbb)])[_0x375aa5(0x8d)](_0xfdd556=>_0xfdd556[_0x375aa5(0xcf)]))!=null?_0x20c638:[],_0x2442b0=JSON[_0x375aa5(0xc4)](_0x5e8e8d),_0x13b700=_0x1310b3[_0x375aa5(0xac)],_0xca9d08=_0x1310b3['id'],_0x43ddc5={'memberId':(await this[_0x375aa5(0xce)][_0x375aa5(0x6a)](_0x17d11f))[_0x375aa5(0xe3)](),'unitId':_0x17d11f,'threadId':_0x13b700,'mention':_0x32b86a,'content':_0x2442b0,'replyId':_0xca9d08},_0x4f88d4=await this['_httpService'][_0x375aa5(0xad)](_0x375aa5(0x77)+_0x17d11f+_0x375aa5(0x8c),{'body':_0x43ddc5});return!_0x4f88d4[_0x375aa5(0x9a)][_0x375aa5(0xcc)]||_0x4f88d4['body']['error'][_0x375aa5(0xbc)]===0x1;}async[_0x22b0fc(0x9e)](_0x53193f){const _0xfd830b=_0x22b0fc,{unitId:_0x5bc07e}=_0x53193f,_0x42e7a3=_0x53193f[_0xfd830b(0xac)],_0x2123df={'memberId':this[_0xfd830b(0xa6)]['getCurrentUser']()[_0xfd830b(0xb2)],'unitId':_0x5bc07e,'threadId':_0x42e7a3,'solved':_0x53193f['resolved']?I[_0xfd830b(0x7a)]:I[_0xfd830b(0x8e)]},_0x178b47=await this[_0xfd830b(0x74)][_0xfd830b(0xad)]('/universer-api/comment/unit/'+_0x5bc07e+'/solved',{'body':_0x2123df});return!_0x178b47['body']['error']||_0x178b47[_0xfd830b(0x9a)][_0xfd830b(0xcc)][_0xfd830b(0xbc)]===0x1;}async[_0x22b0fc(0xbd)](_0x49eae1,_0xd2950c,_0x3bd6bb,_0x3a7cd1){const _0x336a44=_0x22b0fc,_0x27a6bc={'memberId':(await this[_0x336a44(0xce)][_0x336a44(0x6a)](_0x49eae1))['getMemberID'](),'threadId':_0x3bd6bb,'replyId':_0x3a7cd1,'unitId':_0x49eae1},_0x45a4be=await this[_0x336a44(0x74)]['post'](_0x336a44(0x77)+_0x49eae1+_0x336a44(0xdf),{'body':_0x27a6bc});return!_0x45a4be[_0x336a44(0x9a)]['error']||_0x45a4be[_0x336a44(0x9a)][_0x336a44(0xcc)]['code']===0x1;}async[_0x22b0fc(0x97)](_0x258cb9,_0x4dc32a,_0x465a04){const _0x496cb4=_0x22b0fc,_0x39a3a2={'unitId':_0x258cb9,'threadId':_0x465a04},_0x527010=await this[_0x496cb4(0x74)][_0x496cb4(0xad)](_0x496cb4(0x77)+_0x258cb9+_0x496cb4(0xd5),{'body':_0x39a3a2}),_0x213c3d=_0x465a04[_0x496cb4(0x8d)](_0x268422=>G(_0x527010[_0x496cb4(0x9a)][_0x496cb4(0xc1)][_0x268422],_0x258cb9,_0x4dc32a))[_0x496cb4(0xc2)](Boolean);return Object[_0x496cb4(0x80)](_0x527010['body'][_0x496cb4(0xb8)])[_0x496cb4(0xdd)](_0x5e0b50=>{this['_userService']['addUser'](_0x5e0b50);}),_0x213c3d;}[_0x22b0fc(0xb9)](_0x463578){const _0x3f5eee=_0x22b0fc;return{'id':_0x463578['id'],'threadId':_0x463578[_0x3f5eee(0xac)],'ref':_0x463578[_0x3f5eee(0x84)]};}};p=x([C(0x0,c['Inject'](P['HTTPService'])),C(0x1,c[_0x22b0fc(0xd2)](c[_0x22b0fc(0x9f)])),C(0x2,c[_0x22b0fc(0xd2)](b['CollaborationSessionService']))],p);var H=Object[_0x22b0fc(0x94)],J=(_0x3cb001,_0x5e3420,_0x1bbf30,_0x1e3c0b)=>{for(var _0x126550=_0x1e3c0b>0x1?void 0x0:_0x1e3c0b?H(_0x5e3420,_0x1bbf30):_0x5e3420,_0x37f2d4=_0x3cb001['length']-0x1,_0x9bee4a;_0x37f2d4>=0x0;_0x37f2d4--)(_0x9bee4a=_0x3cb001[_0x37f2d4])&&(_0x126550=_0x9bee4a(_0x126550)||_0x126550);return _0x126550;},y=(_0x5c2892,_0x1d9976)=>(_0x1dd07c,_0x56fe89)=>_0x1d9976(_0x1dd07c,_0x56fe89,_0x5c2892);let g=class extends c[_0x22b0fc(0xa8)]{constructor(_0x1951ad,_0x45256c){const _0x44a84c=_0x22b0fc;super(),this[_0x44a84c(0x88)]=_0x1951ad,this[_0x44a84c(0x79)]=_0x45256c,this[_0x44a84c(0x6c)]();}[_0x22b0fc(0x6c)](){const _0x49715d=_0x22b0fc;this[_0x49715d(0x88)]['dataSource']=this['_threadCommentDataSource'],this[_0x49715d(0x88)][_0x49715d(0xc8)]=!0x1;}};g=J([y(0x0,M[_0x22b0fc(0x75)]),y(0x1,c[_0x22b0fc(0xd2)](p))],g);var F=Object[_0x22b0fc(0x6f)],L=Object[_0x22b0fc(0x94)],Z=(_0x28b540,_0x6d818a,_0x5f3256)=>_0x6d818a in _0x28b540?F(_0x28b540,_0x6d818a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5f3256}):_0x28b540[_0x6d818a]=_0x5f3256,W=(_0x12f8f4,_0x2daa4f,_0x2ee54e,_0x202a07)=>{const _0x1becb9=_0x22b0fc;for(var _0x2c2626=_0x202a07>0x1?void 0x0:_0x202a07?L(_0x2daa4f,_0x2ee54e):_0x2daa4f,_0x43ee2a=_0x12f8f4[_0x1becb9(0xa0)]-0x1,_0x383167;_0x43ee2a>=0x0;_0x43ee2a--)(_0x383167=_0x12f8f4[_0x43ee2a])&&(_0x2c2626=_0x383167(_0x2c2626)||_0x2c2626);return _0x2c2626;},O=(_0x40b431,_0x1dcaeb)=>(_0x434a8e,_0x4d9101)=>_0x1dcaeb(_0x434a8e,_0x4d9101,_0x40b431),N=(_0x57ca8b,_0x392674,_0x29e06c)=>Z(_0x57ca8b,typeof _0x392674!=_0x22b0fc(0x6e)?_0x392674+'':_0x392674,_0x29e06c);exports[_0x22b0fc(0xc6)]=class extends c[_0x22b0fc(0xd4)]{constructor(_0x2db676=D,_0x125fb4,_0x495fd3){const _0x5160ea=_0x22b0fc;super(),this[_0x5160ea(0xb4)]=_0x2db676,this[_0x5160ea(0xa9)]=_0x125fb4,this[_0x5160ea(0x93)]=_0x495fd3;const {..._0xd0b2a7}=c[_0x5160ea(0xa3)]({},D,this['_config']);this['_configService'][_0x5160ea(0xb3)](q,_0xd0b2a7);}[_0x22b0fc(0x9c)](){const _0x71e3bc=_0x22b0fc;[[p],[g],[_]][_0x71e3bc(0xdd)](_0x36ea8=>{const _0x124393=_0x71e3bc;this[_0x124393(0xa9)][_0x124393(0xb7)](_0x36ea8);});}[_0x22b0fc(0xcb)](){const _0x274e1f=_0x22b0fc;this[_0x274e1f(0xa9)]['get'](g),this[_0x274e1f(0xa9)][_0x274e1f(0xc3)](_);}},N(exports[_0x22b0fc(0xc6)],_0x22b0fc(0x86),U),N(exports[_0x22b0fc(0xc6)],'type',c[_0x22b0fc(0xa4)][_0x22b0fc(0x95)]),exports[_0x22b0fc(0xc6)]=W([c[_0x22b0fc(0xb5)](w['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T[_0x22b0fc(0xd8)]),O(0x1,c[_0x22b0fc(0xd2)](c['Injector'])),O(0x2,c[_0x22b0fc(0xb0)])],exports[_0x22b0fc(0xc6)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x51d6ee=_0xcce0;(function(_0x20a5b8,_0xe2fa2a){const _0x4aa656=_0xcce0,_0x51e3f4=_0x20a5b8();while(!![]){try{const _0x575fa8=parseInt(_0x4aa656(0x9b))/0x1*(parseInt(_0x4aa656(0x80))/0x2)+-parseInt(_0x4aa656(0xbd))/0x3+-parseInt(_0x4aa656(0x79))/0x4+-parseInt(_0x4aa656(0xc0))/0x5*(parseInt(_0x4aa656(0x68))/0x6)+parseInt(_0x4aa656(0x8c))/0x7+parseInt(_0x4aa656(0xa1))/0x8*(parseInt(_0x4aa656(0xbf))/0x9)+parseInt(_0x4aa656(0x92))/0xa*(parseInt(_0x4aa656(0x75))/0xb);if(_0x575fa8===_0xe2fa2a)break;else _0x51e3f4['push'](_0x51e3f4['shift']());}catch(_0xf92ea9){_0x51e3f4['push'](_0x51e3f4['shift']());}}}(_0x10e6,0xe4408));import{CommentService as _0x3e89ca,CollaborationSessionService as _0x434488,UniverCollaborationClientPlugin as _0x46428b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2d9af7}from'@univerjs-pro/license';import{dayjs as _0x20fc5c,UserManagerService as _0x222ae4,Inject as _0x454f13,Injector as _0x5ce71f,Disposable as _0x1acb77,CustomRangeType as _0x3274b3,UniverInstanceType as _0x1f9c28,DependentOn as _0x52b2c3,IConfigService as _0x6a194c,Plugin as _0x59eae2,merge as _0x1c6e7b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x23dfb8}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x81c630,IThreadCommentDataSourceService as _0xb1d392}from'@univerjs/thread-comment';import{bufferTime as _0x52c83e}from'rxjs';import{HTTPService as _0x1768e5}from'@univerjs/network';const W=_0x51d6ee(0x6e);var I=(_0x2e10d6=>(_0x2e10d6[_0x2e10d6[_0x51d6ee(0x88)]=0x0]=_0x51d6ee(0x88),_0x2e10d6[_0x2e10d6[_0x51d6ee(0xb4)]=0x1]=_0x51d6ee(0xb4),_0x2e10d6[_0x2e10d6['UNRECOGNIZED']=-0x1]=_0x51d6ee(0x6c),_0x2e10d6))(I||{}),v=(_0x49ae95=>(_0x49ae95[_0x49ae95['Unknown']=0x0]=_0x51d6ee(0xb7),_0x49ae95[_0x49ae95[_0x51d6ee(0x67)]=0x1]=_0x51d6ee(0x67),_0x49ae95[_0x49ae95['Reply']=0x2]=_0x51d6ee(0x93),_0x49ae95[_0x49ae95[_0x51d6ee(0xb9)]=0x3]=_0x51d6ee(0xb9),_0x49ae95[_0x49ae95[_0x51d6ee(0x6a)]=0x4]=_0x51d6ee(0x6a),_0x49ae95[_0x49ae95['Solve']=0x5]=_0x51d6ee(0x73),_0x49ae95[_0x49ae95[_0x51d6ee(0x6c)]=-0x1]=_0x51d6ee(0x6c),_0x49ae95))(v||{});const y=_0x31d5d0=>_0x20fc5c(new Date(+_0x31d5d0))[_0x51d6ee(0xad)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x171eb3,_0x2f9404)=>{const _0x4cca58=_0x51d6ee,_0x217328=_0x171eb3[_0x4cca58(0x9f)](_0x222ae4),_0x92237a=_0x171eb3['get'](_0x1768e5);_0x2f9404[_0x4cca58(0x7c)](_0x3c7726=>{const _0x38b01a=_0x4cca58;_0x217328['getUser'](_0x3c7726)&&_0x2f9404[_0x38b01a(0xab)](_0x3c7726);}),_0x2f9404[_0x4cca58(0xa4)]&&(await _0x92237a['get'](_0x4cca58(0xac),{'params':{'userIDs':[..._0x2f9404]}}))[_0x4cca58(0x78)]['users']['forEach'](_0x46046d=>{const _0x5e6baf=_0x4cca58;_0x46046d&&_0x217328[_0x5e6baf(0x8d)](_0x46046d);});};var K=Object[_0x51d6ee(0xa8)],V=(_0x5e6ed8,_0x3d5a66,_0xffa6e3,_0x325f25)=>{const _0x2b44d3=_0x51d6ee;for(var _0x26bc4a=_0x325f25>0x1?void 0x0:_0x325f25?K(_0x3d5a66,_0xffa6e3):_0x3d5a66,_0x418897=_0x5e6ed8[_0x2b44d3(0x94)]-0x1,_0x4d7aff;_0x418897>=0x0;_0x418897--)(_0x4d7aff=_0x5e6ed8[_0x418897])&&(_0x26bc4a=_0x4d7aff(_0x26bc4a)||_0x26bc4a);return _0x26bc4a;},p=(_0x418894,_0x38ab13)=>(_0x3c2bd5,_0x1596e0)=>_0x38ab13(_0x3c2bd5,_0x1596e0,_0x418894);let _=class extends _0x1acb77{constructor(_0x54bf5e,_0xe39f26,_0x3708ba,_0x324723){const _0x378f0f=_0x51d6ee;super(),this['_commentService']=_0x54bf5e,this[_0x378f0f(0xa3)]=_0xe39f26,this[_0x378f0f(0x9c)]=_0x3708ba,this[_0x378f0f(0x6d)]=_0x324723,this[_0x378f0f(0x87)](),this[_0x378f0f(0xc7)]();}[_0x51d6ee(0xc7)](){const _0x32d170=_0x51d6ee;this[_0x32d170(0xa9)](this['_threadCommentModel'][_0x32d170(0x76)][_0x32d170(0x96)](_0x52c83e(0x10))[_0x32d170(0xc8)](_0x4a8ab0=>{const _0x50ed0d=_0x32d170,_0x2265a0=new Set();_0x4a8ab0[_0x50ed0d(0x7c)](_0x186f8f=>{const _0xe4fa42=_0x50ed0d;switch(_0x186f8f[_0xe4fa42(0x85)]){case _0xe4fa42(0xa5):{const _0x55dac0=_0x186f8f[_0xe4fa42(0x9e)][_0xe4fa42(0x65)];_0x2265a0[_0xe4fa42(0xa5)](_0x55dac0);break;}}}),B(this[_0x50ed0d(0x6d)],_0x2265a0);}));}[_0x51d6ee(0x87)](){const _0x373076=_0x51d6ee;this[_0x373076(0xa9)](this[_0x373076(0x7a)][_0x373076(0x76)][_0x373076(0xc8)](async _0x7a7fd1=>{const _0x16346e=_0x373076;var _0x5636be,_0xeca34d,_0x549415,_0x2bd0b1;const _0x304ce5=(_0x5636be=this[_0x16346e(0xa3)][_0x16346e(0xc5)](_0x7a7fd1[_0x16346e(0x69)])[_0x16346e(0x89)](_0x1c922e=>_0x1c922e[_0x16346e(0x86)]===_0x7a7fd1['threadId']))==null?void 0x0:_0x5636be[_0x16346e(0xbc)];if(!_0x304ce5)return;const {unitId:_0x566330,subUnitId:_0x26068a}=_0x304ce5;switch(_0x7a7fd1[_0x16346e(0xb6)]&&this[_0x16346e(0x9c)]['addUser'](_0x7a7fd1[_0x16346e(0xb6)]),_0x7a7fd1['type']){case v['Add']:break;case v[_0x16346e(0x93)]:{this['_threadCommentModel']['addComment'](_0x566330,_0x26068a,{'unitId':_0x566330,'subUnitId':_0x26068a,'ref':'','id':_0x7a7fd1[_0x16346e(0xbe)],'dT':y(+_0x7a7fd1['createTimestamp']),'threadId':_0x7a7fd1['threadId'],'personId':(_0x549415=(_0xeca34d=_0x7a7fd1['user'])==null?void 0x0:_0xeca34d[_0x16346e(0xcb)])!=null?_0x549415:_0x7a7fd1['userId'],'text':JSON['parse'](_0x7a7fd1[_0x16346e(0xca)]),'parentId':_0x304ce5['id']});break;}case v[_0x16346e(0x6a)]:{const _0x3255e8=this[_0x16346e(0xa3)]['getComment'](_0x566330,_0x26068a,_0x7a7fd1[_0x16346e(0xbe)]);_0x3255e8&&_0x3255e8['parentId']&&this[_0x16346e(0xa3)]['deleteComment'](_0x566330,_0x26068a,_0x7a7fd1[_0x16346e(0xbe)]);break;}case v[_0x16346e(0xb9)]:{this[_0x16346e(0xa3)][_0x16346e(0x91)](_0x566330,_0x26068a,{'commentId':_0x7a7fd1[_0x16346e(0xbe)],'text':JSON[_0x16346e(0xb1)](_0x7a7fd1[_0x16346e(0xca)])});break;}case v[_0x16346e(0x73)]:{const _0x258002=(_0x2bd0b1=this[_0x16346e(0xa3)][_0x16346e(0xc5)](_0x7a7fd1[_0x16346e(0x69)])[_0x16346e(0x89)](_0x168ada=>_0x168ada[_0x16346e(0x86)]===_0x7a7fd1['threadId']))==null?void 0x0:_0x2bd0b1['root'];_0x258002&&this[_0x16346e(0xa3)]['resolveComment'](_0x566330,_0x26068a,_0x258002['id'],_0x7a7fd1[_0x16346e(0xb0)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x454f13(_0x3e89ca)),p(0x1,_0x454f13(_0x81c630)),p(0x2,_0x454f13(_0x222ae4)),p(0x3,_0x454f13(_0x5ce71f))],_);const z=_0x51d6ee(0x8f),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x469a54,_0x157df9,_0x1706c7,_0x57b21f)=>{for(var _0x3a01e3=_0x57b21f>0x1?void 0x0:_0x57b21f?k(_0x157df9,_0x1706c7):_0x157df9,_0x3fb191=_0x469a54['length']-0x1,_0x411d4a;_0x3fb191>=0x0;_0x3fb191--)(_0x411d4a=_0x469a54[_0x3fb191])&&(_0x3a01e3=_0x411d4a(_0x3a01e3)||_0x3a01e3);return _0x3a01e3;},b=(_0x174a3e,_0xb50247)=>(_0x5d21c5,_0x212e44)=>_0xb50247(_0x5d21c5,_0x212e44,_0x174a3e);function X(_0x1b441d,_0x247add){const _0x11bb1d=_0x51d6ee,_0x70da45=_0x1b441d[_0x11bb1d(0xaa)][0x0];return{..._0x247add,'id':_0x70da45[_0x11bb1d(0xbe)],'resolved':_0x1b441d[_0x11bb1d(0xb0)]===0x1,'dT':y(_0x70da45[_0x11bb1d(0xaf)]),'personId':_0x70da45[_0x11bb1d(0x82)],'threadId':_0x70da45[_0x11bb1d(0x86)]};}function ee(_0x29e18b,_0x528ef4,_0x389ddf){const _0x419b03=_0x51d6ee;var _0x29f614,_0x514c9a;if(((_0x514c9a=(_0x29f614=_0x29e18b==null?void 0x0:_0x29e18b[_0x419b03(0xaa)])==null?void 0x0:_0x29f614['length'])!=null?_0x514c9a:0x0)>0x0){const _0x29575c=(_0x21be44,_0x1d1e4f)=>({'id':_0x21be44[_0x419b03(0xbe)],'threadId':_0x21be44['threadId'],'dT':y(_0x21be44[_0x419b03(0xaf)]),'personId':_0x21be44[_0x419b03(0x82)],'resolved':_0x29e18b[_0x419b03(0xb0)]===I[_0x419b03(0xb4)],'unitId':_0x528ef4,'subUnitId':_0x389ddf,'text':JSON[_0x419b03(0xb1)](_0x21be44[_0x419b03(0xca)]),'parentId':_0x1d1e4f}),_0x21c442=_0x29575c(_0x29e18b[_0x419b03(0xaa)][0x0]);return{..._0x21c442,'children':_0x29e18b[_0x419b03(0xaa)][_0x419b03(0x66)](0x1)[_0x419b03(0x6b)](_0x40e9bb=>_0x29575c(_0x40e9bb,_0x21c442['id']))};}return null;}let S=class{constructor(_0x25c12e,_0x5bc843,_0x49aa9c){const _0xcee460=_0x51d6ee;this[_0xcee460(0xc1)]=_0x25c12e,this[_0xcee460(0x9c)]=_0x5bc843,this[_0xcee460(0x98)]=_0x49aa9c;}async['addComment'](_0x1f5e6f){const _0x498202=_0x51d6ee;var _0x34e307,_0x3d50d1;const {parentId:_0x1a3138,unitId:_0x43b2de,text:_0x9dab7b,threadId:_0x2ec661}=_0x1f5e6f,_0x45002c=(_0x3d50d1=(_0x34e307=_0x9dab7b[_0x498202(0xc3)])==null?void 0x0:_0x34e307[_0x498202(0x70)](_0x2905df=>_0x2905df[_0x498202(0x72)]===_0x3274b3[_0x498202(0xb5)])[_0x498202(0x6b)](_0x44578b=>_0x44578b['rangeId']))!=null?_0x3d50d1:[],_0x2857ea=JSON['stringify'](_0x9dab7b),_0x58f953=(await this['_sessionService'][_0x498202(0x95)](_0x43b2de))[_0x498202(0xa7)]();if(_0x1a3138){const _0xe93156={'memberId':_0x58f953,'unitId':_0x43b2de,'content':_0x2857ea,'mention':_0x45002c,'threadId':_0x2ec661},_0x28970f=(await this[_0x498202(0xc1)][_0x498202(0x84)](_0x498202(0x99)+_0x43b2de+_0x498202(0xba),{'body':_0xe93156}))['body'][_0x498202(0x90)];return{..._0x1f5e6f,'id':_0x28970f[_0x498202(0xbe)],'dT':_0x20fc5c(+_0x28970f[_0x498202(0xaf)])[_0x498202(0xad)](_0x498202(0xc6)),'personId':_0x28970f[_0x498202(0x82)]};}else{const _0x1ce77e={'memberId':_0x58f953,'unitId':_0x43b2de,'content':_0x2857ea,'mention':_0x45002c},_0x38a993=await this[_0x498202(0xc1)]['post']('/universer-api/comment/unit/'+_0x43b2de+_0x498202(0xc4),{'body':_0x1ce77e});return X(_0x38a993[_0x498202(0x78)]['comment'],_0x1f5e6f);}}async[_0x51d6ee(0x91)](_0x7453f4){const _0x2d557e=_0x51d6ee;var _0x4a1b2f,_0x1fd33a;const {text:_0x44d91a,unitId:_0x754bc}=_0x7453f4,_0x594220=(_0x1fd33a=(_0x4a1b2f=_0x44d91a[_0x2d557e(0xc3)])==null?void 0x0:_0x4a1b2f[_0x2d557e(0x70)](_0xb8ef72=>_0xb8ef72[_0x2d557e(0x72)]===_0x3274b3[_0x2d557e(0xb5)])['map'](_0x2ea3bb=>_0x2ea3bb['rangeId']))!=null?_0x1fd33a:[],_0x49d97b=JSON[_0x2d557e(0x71)](_0x44d91a),_0x1b8223=_0x7453f4[_0x2d557e(0x86)],_0x15ea9c=_0x7453f4['id'],_0x46cda1={'memberId':(await this[_0x2d557e(0x98)][_0x2d557e(0x95)](_0x754bc))[_0x2d557e(0xa7)](),'unitId':_0x754bc,'threadId':_0x1b8223,'mention':_0x594220,'content':_0x49d97b,'replyId':_0x15ea9c},_0x115eab=await this[_0x2d557e(0xc1)][_0x2d557e(0x84)]('/universer-api/comment/unit/'+_0x754bc+_0x2d557e(0xbb),{'body':_0x46cda1});return!_0x115eab[_0x2d557e(0x78)][_0x2d557e(0x81)]||_0x115eab[_0x2d557e(0x78)]['error'][_0x2d557e(0xae)]===0x1;}async['resolveComment'](_0x27d98e){const _0x23936d=_0x51d6ee,{unitId:_0x37e78f}=_0x27d98e,_0x24b97a=_0x27d98e['threadId'],_0x4629f3={'memberId':this[_0x23936d(0x9c)][_0x23936d(0x74)]()['userID'],'unitId':_0x37e78f,'threadId':_0x24b97a,'solved':_0x27d98e['resolved']?I[_0x23936d(0xb4)]:I[_0x23936d(0x88)]},_0x1debd5=await this['_httpService'][_0x23936d(0x84)]('/universer-api/comment/unit/'+_0x37e78f+_0x23936d(0x9a),{'body':_0x4629f3});return!_0x1debd5[_0x23936d(0x78)][_0x23936d(0x81)]||_0x1debd5[_0x23936d(0x78)]['error'][_0x23936d(0xae)]===0x1;}async[_0x51d6ee(0xc9)](_0x24f79b,_0xc6744,_0x153112,_0x29470b){const _0x5889e3=_0x51d6ee,_0x3b0f08={'memberId':(await this[_0x5889e3(0x98)][_0x5889e3(0x95)](_0x24f79b))['getMemberID'](),'threadId':_0x153112,'replyId':_0x29470b,'unitId':_0x24f79b},_0x383d42=await this[_0x5889e3(0xc1)]['post'](_0x5889e3(0x99)+_0x24f79b+_0x5889e3(0xc2),{'body':_0x3b0f08});return!_0x383d42[_0x5889e3(0x78)][_0x5889e3(0x81)]||_0x383d42['body'][_0x5889e3(0x81)][_0x5889e3(0xae)]===0x1;}async['listComments'](_0x24cf93,_0x47cc6b,_0x452b88){const _0x40a582=_0x51d6ee,_0x33ac72={'unitId':_0x24cf93,'threadId':_0x452b88},_0x32452f=await this[_0x40a582(0xc1)][_0x40a582(0x84)](_0x40a582(0x99)+_0x24cf93+_0x40a582(0x97),{'body':_0x33ac72}),_0x262db5=_0x452b88['map'](_0x51659c=>ee(_0x32452f['body'][_0x40a582(0x8b)][_0x51659c],_0x24cf93,_0x47cc6b))[_0x40a582(0x70)](Boolean);return Object['values'](_0x32452f[_0x40a582(0x78)][_0x40a582(0xa2)])[_0x40a582(0x7c)](_0x549af6=>{const _0xb709ca=_0x40a582;this[_0xb709ca(0x9c)]['addUser'](_0x549af6);}),_0x262db5;}['saveCommentToSnapshot'](_0x12055d){const _0xca4d7=_0x51d6ee;return{'id':_0x12055d['id'],'threadId':_0x12055d[_0xca4d7(0x86)],'ref':_0x12055d[_0xca4d7(0xa0)]};}};S=Q([b(0x0,_0x454f13(_0x1768e5)),b(0x1,_0x454f13(_0x222ae4)),b(0x2,_0x454f13(_0x434488))],S);var re=Object[_0x51d6ee(0xa8)],te=(_0x444c2d,_0x2a310f,_0x574678,_0x10458e)=>{const _0x485f0c=_0x51d6ee;for(var _0x5b85ff=_0x10458e>0x1?void 0x0:_0x10458e?re(_0x2a310f,_0x574678):_0x2a310f,_0x3614c8=_0x444c2d[_0x485f0c(0x94)]-0x1,_0x228f12;_0x3614c8>=0x0;_0x3614c8--)(_0x228f12=_0x444c2d[_0x3614c8])&&(_0x5b85ff=_0x228f12(_0x5b85ff)||_0x5b85ff);return _0x5b85ff;},M=(_0x5a6d1c,_0x31fb4b)=>(_0x411238,_0x3a275d)=>_0x31fb4b(_0x411238,_0x3a275d,_0x5a6d1c);function _0xcce0(_0x412d16,_0x1b1663){const _0x10e650=_0x10e6();return _0xcce0=function(_0xcce061,_0x20e2e2){_0xcce061=_0xcce061-0x65;let _0x4d95b9=_0x10e650[_0xcce061];return _0x4d95b9;},_0xcce0(_0x412d16,_0x1b1663);}let f=class extends _0x1acb77{constructor(_0x570238,_0x471dcd){const _0x5b5ebf=_0x51d6ee;super(),this[_0x5b5ebf(0x8a)]=_0x570238,this['_threadCommentDataSource']=_0x471dcd,this[_0x5b5ebf(0x7d)]();}[_0x51d6ee(0x7d)](){const _0x8855a3=_0x51d6ee;this['_threadCommentDataSourceService'][_0x8855a3(0x83)]=this[_0x8855a3(0xb2)],this[_0x8855a3(0x8a)][_0x8855a3(0x7e)]=!0x1;}};f=te([M(0x0,_0xb1d392),M(0x1,_0x454f13(S))],f);var se=Object[_0x51d6ee(0x7f)],oe=Object[_0x51d6ee(0xa8)],ne=(_0x8d4074,_0x2d63bc,_0x5492cc)=>_0x2d63bc in _0x8d4074?se(_0x8d4074,_0x2d63bc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5492cc}):_0x8d4074[_0x2d63bc]=_0x5492cc,ie=(_0x49a7da,_0x1e0110,_0x3e3bc7,_0x359a18)=>{const _0xa128bc=_0x51d6ee;for(var _0x1e5c5c=_0x359a18>0x1?void 0x0:_0x359a18?oe(_0x1e0110,_0x3e3bc7):_0x1e0110,_0x1b5327=_0x49a7da[_0xa128bc(0x94)]-0x1,_0x1e3882;_0x1b5327>=0x0;_0x1b5327--)(_0x1e3882=_0x49a7da[_0x1b5327])&&(_0x1e5c5c=_0x1e3882(_0x1e5c5c)||_0x1e5c5c);return _0x1e5c5c;},N=(_0x546c6b,_0x42889d)=>(_0x4b04f1,_0x1b502a)=>_0x42889d(_0x4b04f1,_0x1b502a,_0x546c6b),$=(_0xa96a01,_0x5af488,_0xcff0eb)=>ne(_0xa96a01,typeof _0x5af488!=_0x51d6ee(0x9d)?_0x5af488+'':_0x5af488,_0xcff0eb);let g=class extends _0x59eae2{constructor(_0x53936f=O,_0x459f58,_0x3ffa18){const _0x18d5f6=_0x51d6ee;super(),this[_0x18d5f6(0xa6)]=_0x53936f,this['_injector']=_0x459f58,this[_0x18d5f6(0x6f)]=_0x3ffa18;const {..._0x2d95be}=_0x1c6e7b({},O,this[_0x18d5f6(0xa6)]);this['_configService'][_0x18d5f6(0xb3)](z,_0x2d95be);}[_0x51d6ee(0x7b)](){const _0x23b729=_0x51d6ee;[[S],[f],[_]][_0x23b729(0x7c)](_0xc54ba4=>{const _0x90c1ea=_0x23b729;this[_0x90c1ea(0x6d)][_0x90c1ea(0xa5)](_0xc54ba4);});}[_0x51d6ee(0x8e)](){const _0x56ee66=_0x51d6ee;this[_0x56ee66(0x6d)][_0x56ee66(0x9f)](f),this[_0x56ee66(0x6d)][_0x56ee66(0x9f)](_);}};function _0x10e6(){const _0x1b2877=['threadId','_init','OpenOrReOpen','find','_threadCommentDataSourceService','comments','5814830wikXUt','addUser','onReady','thread-comment-data-source.config','reply','updateComment','66230GoAyvd','Reply','length','requireSession','pipe','/list','_sessionService','/universer-api/comment/unit/','/solved','3gTQMhO','_userService','symbol','payload','get','ref','54952nxEavL','users','_threadCommentModel','size','add','_config','getMemberID','getOwnPropertyDescriptor','disposeWithMe','replies','delete','/universer-api/user/list','format','code','createTimestamp','solved','parse','_threadCommentDataSource','setConfig','Solved','COMMENT','user','Unknown','UNIVER_UNKNOWN','Edit','/reply','/edit','root','4422450BhOvuV','replyId','117sMYJEs','1050ETFdIG','_httpService','/delete','customRanges','/add','getUnit','YYYY/MM/DD\x20HH:mm','_initUserSync','subscribe','deleteComment','content','userID','personId','slice','Add','52956eDdONb','unitId','Delete','map','UNRECOGNIZED','_injector','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_configService','filter','stringify','rangeType','Solve','getCurrentUser','5423hvOOsX','commentUpdate$','pluginName','body','932768lvYkJB','_commentService','onStarting','forEach','_initDataSource','syncUpdateMutationToColla','defineProperty','207064jGFRJb','error','userId','dataSource','post','type'];_0x10e6=function(){return _0x1b2877;};return _0x10e6();}$(g,_0x51d6ee(0x77),W),$(g,_0x51d6ee(0x85),_0x1f9c28[_0x51d6ee(0xb8)]),g=ie([_0x52b2c3(_0x23dfb8,_0x46428b,_0x2d9af7),N(0x1,_0x454f13(_0x5ce71f)),N(0x2,_0x6a194c)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x1d05bf=_0x1614;(function(_0x468413,_0x3d6942){const _0x4e9982=_0x1614,_0xb5c747=_0x468413();while(!![]){try{const _0x50621b=parseInt(_0x4e9982(0xb3))/0x1+parseInt(_0x4e9982(0x93))/0x2+parseInt(_0x4e9982(0xea))/0x3+parseInt(_0x4e9982(0xee))/0x4*(parseInt(_0x4e9982(0xd6))/0x5)+-parseInt(_0x4e9982(0xa6))/0x6*(parseInt(_0x4e9982(0xbe))/0x7)+-parseInt(_0x4e9982(0x9d))/0x8*(-parseInt(_0x4e9982(0xd2))/0x9)+-parseInt(_0x4e9982(0x91))/0xa*(parseInt(_0x4e9982(0xae))/0xb);if(_0x50621b===_0x3d6942)break;else _0xb5c747['push'](_0xb5c747['shift']());}catch(_0x453d69){_0xb5c747['push'](_0xb5c747['shift']());}}}(_0x3060,0x2b2f9));import{CommentService as _0xc41ade,CollaborationSessionService as _0x5c2147,UniverCollaborationClientPlugin as _0x2f4ea6}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5d88f5}from'@univerjs-pro/license';import{dayjs as _0x4cfb05,UserManagerService as _0xb203b6,Inject as _0x3b9053,Injector as _0x4549a3,Disposable as _0x32b8e3,CustomRangeType as _0x1261ad,UniverInstanceType as _0x7f2fa9,DependentOn as _0x339bdc,IConfigService as _0x50a798,Plugin as _0x761510,merge as _0x543ebe}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x272b59}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1d8efc,IThreadCommentDataSourceService as _0x475030}from'@univerjs/thread-comment';import{bufferTime as _0x5d647c}from'rxjs';function _0x3060(){const _0x3e01f8=['comments','replyId','parentId','6jskLda','replies','format','subscribe','/add','deleteComment','_threadCommentDataSource','updateComment','4051993vRwCdP','syncUpdateMutationToColla','_httpService','Edit','Solve','222690GyNWrq','userID','slice','_configService','resolveComment','map','body','requireSession','_initUserSync','/universer-api/comment/unit/','Unknown','2278073ThaHyO','onStarting','getUser','rangeType','thread-comment-data-source.config','rangeId','user','_injector','getCurrentUser','content','UNRECOGNIZED','addComment','getComment','customRanges','OpenOrReOpen','code','size','COMMENT','pipe','_config','18wmfYTi','Solved','users','onReady','955ZEOBRj','find','userId','getOwnPropertyDescriptor','disposeWithMe','dataSource','commentUpdate$','symbol','reply','comment','/reply','_commentService','stringify','_sessionService','ref','filter','YYYY/MM/DD\x20HH:mm','_init','add','listComments','425169cewfbg','_userService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolved','6672GHnHcr','post','error','personId','solved','Reply','get','payload','type','delete','Delete','_threadCommentModel','/edit','length','/solved','20wIAcdZ','createTimestamp','437214QTAmXA','_threadCommentDataSourceService','_initDataSource','setConfig','getMemberID','addUser','UNIVER_UNKNOWN','unitId','Add','root','1349784WoytNb','getUnit','forEach','parse','saveCommentToSnapshot','threadId'];_0x3060=function(){return _0x3e01f8;};return _0x3060();}import{HTTPService as _0x5340ca}from'@univerjs/network';const W=_0x1d05bf(0xec);var I=(_0x47c7b3=>(_0x47c7b3[_0x47c7b3[_0x1d05bf(0xcc)]=0x0]='OpenOrReOpen',_0x47c7b3[_0x47c7b3[_0x1d05bf(0xd3)]=0x1]=_0x1d05bf(0xd3),_0x47c7b3[_0x47c7b3['UNRECOGNIZED']=-0x1]=_0x1d05bf(0xc8),_0x47c7b3))(I||{}),v=(_0x1de5ba=>(_0x1de5ba[_0x1de5ba[_0x1d05bf(0xbd)]=0x0]=_0x1d05bf(0xbd),_0x1de5ba[_0x1de5ba['Add']=0x1]=_0x1d05bf(0x9b),_0x1de5ba[_0x1de5ba[_0x1d05bf(0x87)]=0x2]=_0x1d05bf(0x87),_0x1de5ba[_0x1de5ba[_0x1d05bf(0xb1)]=0x3]=_0x1d05bf(0xb1),_0x1de5ba[_0x1de5ba[_0x1d05bf(0x8c)]=0x4]='Delete',_0x1de5ba[_0x1de5ba[_0x1d05bf(0xb2)]=0x5]=_0x1d05bf(0xb2),_0x1de5ba[_0x1de5ba[_0x1d05bf(0xc8)]=-0x1]=_0x1d05bf(0xc8),_0x1de5ba))(v||{});const y=_0x2925b2=>_0x4cfb05(new Date(+_0x2925b2))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x43d4ee,_0x47fb2a)=>{const _0x13b4b0=_0x1d05bf,_0x145c7f=_0x43d4ee[_0x13b4b0(0x88)](_0xb203b6),_0x146d31=_0x43d4ee[_0x13b4b0(0x88)](_0x5340ca);_0x47fb2a[_0x13b4b0(0x9f)](_0x51042a=>{const _0x2aac36=_0x13b4b0;_0x145c7f[_0x2aac36(0xc0)](_0x51042a)&&_0x47fb2a[_0x2aac36(0x8b)](_0x51042a);}),_0x47fb2a[_0x13b4b0(0xce)]&&(await _0x146d31[_0x13b4b0(0x88)]('/universer-api/user/list',{'params':{'userIDs':[..._0x47fb2a]}}))[_0x13b4b0(0xb9)]['users'][_0x13b4b0(0x9f)](_0x1681cf=>{const _0x47352c=_0x13b4b0;_0x1681cf&&_0x145c7f[_0x47352c(0x98)](_0x1681cf);});};var K=Object[_0x1d05bf(0xd9)],V=(_0x4ffec8,_0x2afed1,_0xb8b63a,_0x2d28ee)=>{const _0x36c5c1=_0x1d05bf;for(var _0x531233=_0x2d28ee>0x1?void 0x0:_0x2d28ee?K(_0x2afed1,_0xb8b63a):_0x2afed1,_0x8142fd=_0x4ffec8[_0x36c5c1(0x8f)]-0x1,_0x4a42f4;_0x8142fd>=0x0;_0x8142fd--)(_0x4a42f4=_0x4ffec8[_0x8142fd])&&(_0x531233=_0x4a42f4(_0x531233)||_0x531233);return _0x531233;},p=(_0x706be9,_0x3c18e5)=>(_0x500355,_0x590d3f)=>_0x3c18e5(_0x500355,_0x590d3f,_0x706be9);let _=class extends _0x32b8e3{constructor(_0x4df39a,_0x56c8b8,_0x5d1126,_0x39f5cb){const _0x49e8c2=_0x1d05bf;super(),this[_0x49e8c2(0xe1)]=_0x4df39a,this[_0x49e8c2(0x8d)]=_0x56c8b8,this['_userService']=_0x5d1126,this[_0x49e8c2(0xc5)]=_0x39f5cb,this[_0x49e8c2(0xe7)](),this['_initUserSync']();}[_0x1d05bf(0xbb)](){const _0x479467=_0x1d05bf;this[_0x479467(0xda)](this[_0x479467(0x8d)][_0x479467(0xdc)][_0x479467(0xd0)](_0x5d647c(0x10))[_0x479467(0xa9)](_0x2ef42a=>{const _0x36113d=_0x479467,_0x3ba742=new Set();_0x2ef42a[_0x36113d(0x9f)](_0x27c8da=>{const _0x20f412=_0x36113d;switch(_0x27c8da['type']){case _0x20f412(0xe8):{const _0x28cd09=_0x27c8da[_0x20f412(0x89)][_0x20f412(0x85)];_0x3ba742[_0x20f412(0xe8)](_0x28cd09);break;}}}),B(this['_injector'],_0x3ba742);}));}[_0x1d05bf(0xe7)](){const _0x36e8a6=_0x1d05bf;this['disposeWithMe'](this[_0x36e8a6(0xe1)][_0x36e8a6(0xdc)][_0x36e8a6(0xa9)](async _0x13612f=>{const _0x463596=_0x36e8a6;var _0x4e005d,_0x5a4114,_0x5bd525,_0x2f784b;const _0x20a774=(_0x4e005d=this[_0x463596(0x8d)][_0x463596(0x9e)](_0x13612f['unitId'])[_0x463596(0xd7)](_0x41cbbb=>_0x41cbbb['threadId']===_0x13612f[_0x463596(0xa2)]))==null?void 0x0:_0x4e005d['root'];if(!_0x20a774)return;const {unitId:_0x2e532b,subUnitId:_0x430e89}=_0x20a774;switch(_0x13612f[_0x463596(0xc4)]&&this[_0x463596(0xeb)][_0x463596(0x98)](_0x13612f[_0x463596(0xc4)]),_0x13612f[_0x463596(0x8a)]){case v['Add']:break;case v[_0x463596(0x87)]:{this[_0x463596(0x8d)][_0x463596(0xc9)](_0x2e532b,_0x430e89,{'unitId':_0x2e532b,'subUnitId':_0x430e89,'ref':'','id':_0x13612f['replyId'],'dT':y(+_0x13612f[_0x463596(0x92)]),'threadId':_0x13612f['threadId'],'personId':(_0x5bd525=(_0x5a4114=_0x13612f[_0x463596(0xc4)])==null?void 0x0:_0x5a4114[_0x463596(0xb4)])!=null?_0x5bd525:_0x13612f['userId'],'text':JSON[_0x463596(0xa0)](_0x13612f['content']),'parentId':_0x20a774['id']});break;}case v[_0x463596(0x8c)]:{const _0x14c9cb=this[_0x463596(0x8d)][_0x463596(0xca)](_0x2e532b,_0x430e89,_0x13612f['replyId']);_0x14c9cb&&_0x14c9cb[_0x463596(0xa5)]&&this[_0x463596(0x8d)][_0x463596(0xab)](_0x2e532b,_0x430e89,_0x13612f['replyId']);break;}case v[_0x463596(0xb1)]:{this[_0x463596(0x8d)][_0x463596(0xad)](_0x2e532b,_0x430e89,{'commentId':_0x13612f[_0x463596(0xa4)],'text':JSON[_0x463596(0xa0)](_0x13612f['content'])});break;}case v[_0x463596(0xb2)]:{const _0x25f141=(_0x2f784b=this[_0x463596(0x8d)][_0x463596(0x9e)](_0x13612f[_0x463596(0x9a)])[_0x463596(0xd7)](_0x58ff72=>_0x58ff72[_0x463596(0xa2)]===_0x13612f[_0x463596(0xa2)]))==null?void 0x0:_0x2f784b[_0x463596(0x9c)];_0x25f141&&this['_threadCommentModel'][_0x463596(0xb7)](_0x2e532b,_0x430e89,_0x25f141['id'],_0x13612f['solved']===I[_0x463596(0xd3)]);break;}}}));}};_=V([p(0x0,_0x3b9053(_0xc41ade)),p(0x1,_0x3b9053(_0x1d8efc)),p(0x2,_0x3b9053(_0xb203b6)),p(0x3,_0x3b9053(_0x4549a3))],_);const z=_0x1d05bf(0xc2),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1b2c33,_0x291cef,_0x31cb1b,_0x1d4640)=>{const _0x36bb4b=_0x1d05bf;for(var _0x2121ce=_0x1d4640>0x1?void 0x0:_0x1d4640?k(_0x291cef,_0x31cb1b):_0x291cef,_0x28d029=_0x1b2c33[_0x36bb4b(0x8f)]-0x1,_0x24eeaf;_0x28d029>=0x0;_0x28d029--)(_0x24eeaf=_0x1b2c33[_0x28d029])&&(_0x2121ce=_0x24eeaf(_0x2121ce)||_0x2121ce);return _0x2121ce;},b=(_0x337f7b,_0x2e5471)=>(_0x1729cf,_0x581d0a)=>_0x2e5471(_0x1729cf,_0x581d0a,_0x337f7b);function X(_0x158da1,_0x171913){const _0x36b8bf=_0x1d05bf,_0x3ad962=_0x158da1[_0x36b8bf(0xa7)][0x0];return{..._0x171913,'id':_0x3ad962[_0x36b8bf(0xa4)],'resolved':_0x158da1[_0x36b8bf(0x86)]===0x1,'dT':y(_0x3ad962[_0x36b8bf(0x92)]),'personId':_0x3ad962[_0x36b8bf(0xd8)],'threadId':_0x3ad962[_0x36b8bf(0xa2)]};}function ee(_0x3f4517,_0x12368f,_0x11aae5){const _0xea2705=_0x1d05bf;var _0x3d11ed,_0xc7c0be;if(((_0xc7c0be=(_0x3d11ed=_0x3f4517==null?void 0x0:_0x3f4517['replies'])==null?void 0x0:_0x3d11ed[_0xea2705(0x8f)])!=null?_0xc7c0be:0x0)>0x0){const _0x3ca1af=(_0x419f24,_0x39e44d)=>({'id':_0x419f24[_0xea2705(0xa4)],'threadId':_0x419f24['threadId'],'dT':y(_0x419f24[_0xea2705(0x92)]),'personId':_0x419f24[_0xea2705(0xd8)],'resolved':_0x3f4517['solved']===I[_0xea2705(0xd3)],'unitId':_0x12368f,'subUnitId':_0x11aae5,'text':JSON[_0xea2705(0xa0)](_0x419f24[_0xea2705(0xc7)]),'parentId':_0x39e44d}),_0x2c2e01=_0x3ca1af(_0x3f4517[_0xea2705(0xa7)][0x0]);return{..._0x2c2e01,'children':_0x3f4517[_0xea2705(0xa7)][_0xea2705(0xb5)](0x1)[_0xea2705(0xb8)](_0x31892a=>_0x3ca1af(_0x31892a,_0x2c2e01['id']))};}return null;}let S=class{constructor(_0x3e765b,_0x8ccd56,_0x4b77ad){const _0xdf602e=_0x1d05bf;this['_httpService']=_0x3e765b,this[_0xdf602e(0xeb)]=_0x8ccd56,this['_sessionService']=_0x4b77ad;}async['addComment'](_0x3bee76){const _0x1be0ae=_0x1d05bf;var _0x11747e,_0x3dce07;const {parentId:_0x3e833a,unitId:_0x53d1a2,text:_0xf64010,threadId:_0x23862b}=_0x3bee76,_0x1ea204=(_0x3dce07=(_0x11747e=_0xf64010[_0x1be0ae(0xcb)])==null?void 0x0:_0x11747e[_0x1be0ae(0xe5)](_0x2a9eb4=>_0x2a9eb4[_0x1be0ae(0xc1)]===_0x1261ad[_0x1be0ae(0xcf)])[_0x1be0ae(0xb8)](_0x255f2f=>_0x255f2f[_0x1be0ae(0xc3)]))!=null?_0x3dce07:[],_0x1d777b=JSON[_0x1be0ae(0xe2)](_0xf64010),_0x28265c=(await this[_0x1be0ae(0xe3)][_0x1be0ae(0xba)](_0x53d1a2))['getMemberID']();if(_0x3e833a){const _0x1ee11a={'memberId':_0x28265c,'unitId':_0x53d1a2,'content':_0x1d777b,'mention':_0x1ea204,'threadId':_0x23862b},_0x84b2a9=(await this['_httpService'][_0x1be0ae(0xef)](_0x1be0ae(0xbc)+_0x53d1a2+_0x1be0ae(0xe0),{'body':_0x1ee11a}))[_0x1be0ae(0xb9)][_0x1be0ae(0xde)];return{..._0x3bee76,'id':_0x84b2a9[_0x1be0ae(0xa4)],'dT':_0x4cfb05(+_0x84b2a9[_0x1be0ae(0x92)])[_0x1be0ae(0xa8)](_0x1be0ae(0xe6)),'personId':_0x84b2a9[_0x1be0ae(0xd8)]};}else{const _0x51088d={'memberId':_0x28265c,'unitId':_0x53d1a2,'content':_0x1d777b,'mention':_0x1ea204},_0x4cedb0=await this[_0x1be0ae(0xb0)][_0x1be0ae(0xef)]('/universer-api/comment/unit/'+_0x53d1a2+_0x1be0ae(0xaa),{'body':_0x51088d});return X(_0x4cedb0[_0x1be0ae(0xb9)][_0x1be0ae(0xdf)],_0x3bee76);}}async['updateComment'](_0x1e586c){const _0x41853e=_0x1d05bf;var _0x14bb53,_0x78657f;const {text:_0x1bb852,unitId:_0x35928a}=_0x1e586c,_0x497da7=(_0x78657f=(_0x14bb53=_0x1bb852[_0x41853e(0xcb)])==null?void 0x0:_0x14bb53['filter'](_0x3b10b0=>_0x3b10b0['rangeType']===_0x1261ad['COMMENT'])[_0x41853e(0xb8)](_0x1cd22b=>_0x1cd22b[_0x41853e(0xc3)]))!=null?_0x78657f:[],_0x4a1d15=JSON['stringify'](_0x1bb852),_0x4d1d04=_0x1e586c[_0x41853e(0xa2)],_0x58dd89=_0x1e586c['id'],_0x1eb283={'memberId':(await this['_sessionService']['requireSession'](_0x35928a))['getMemberID'](),'unitId':_0x35928a,'threadId':_0x4d1d04,'mention':_0x497da7,'content':_0x4a1d15,'replyId':_0x58dd89},_0x36fc1f=await this['_httpService'][_0x41853e(0xef)](_0x41853e(0xbc)+_0x35928a+_0x41853e(0x8e),{'body':_0x1eb283});return!_0x36fc1f[_0x41853e(0xb9)][_0x41853e(0xf0)]||_0x36fc1f[_0x41853e(0xb9)][_0x41853e(0xf0)][_0x41853e(0xcd)]===0x1;}async[_0x1d05bf(0xb7)](_0x5c7e00){const _0x520e6e=_0x1d05bf,{unitId:_0x557e5d}=_0x5c7e00,_0x5bd458=_0x5c7e00['threadId'],_0x25bd74={'memberId':this[_0x520e6e(0xeb)][_0x520e6e(0xc6)]()[_0x520e6e(0xb4)],'unitId':_0x557e5d,'threadId':_0x5bd458,'solved':_0x5c7e00[_0x520e6e(0xed)]?I[_0x520e6e(0xd3)]:I[_0x520e6e(0xcc)]},_0x4dc98f=await this[_0x520e6e(0xb0)][_0x520e6e(0xef)](_0x520e6e(0xbc)+_0x557e5d+_0x520e6e(0x90),{'body':_0x25bd74});return!_0x4dc98f[_0x520e6e(0xb9)][_0x520e6e(0xf0)]||_0x4dc98f['body']['error'][_0x520e6e(0xcd)]===0x1;}async[_0x1d05bf(0xab)](_0x46df38,_0x4d353c,_0x484bda,_0x54a0a7){const _0x3bb1ba=_0x1d05bf,_0x213741={'memberId':(await this[_0x3bb1ba(0xe3)][_0x3bb1ba(0xba)](_0x46df38))[_0x3bb1ba(0x97)](),'threadId':_0x484bda,'replyId':_0x54a0a7,'unitId':_0x46df38},_0x1f9673=await this[_0x3bb1ba(0xb0)][_0x3bb1ba(0xef)](_0x3bb1ba(0xbc)+_0x46df38+'/delete',{'body':_0x213741});return!_0x1f9673['body']['error']||_0x1f9673[_0x3bb1ba(0xb9)]['error'][_0x3bb1ba(0xcd)]===0x1;}async[_0x1d05bf(0xe9)](_0x3ff60a,_0x4650fe,_0x1f84df){const _0x463748=_0x1d05bf,_0x41b776={'unitId':_0x3ff60a,'threadId':_0x1f84df},_0x3eee08=await this['_httpService'][_0x463748(0xef)](_0x463748(0xbc)+_0x3ff60a+'/list',{'body':_0x41b776}),_0x23cddc=_0x1f84df[_0x463748(0xb8)](_0xdfc450=>ee(_0x3eee08[_0x463748(0xb9)][_0x463748(0xa3)][_0xdfc450],_0x3ff60a,_0x4650fe))[_0x463748(0xe5)](Boolean);return Object['values'](_0x3eee08[_0x463748(0xb9)][_0x463748(0xd4)])['forEach'](_0x30e281=>{const _0x4128d5=_0x463748;this[_0x4128d5(0xeb)][_0x4128d5(0x98)](_0x30e281);}),_0x23cddc;}[_0x1d05bf(0xa1)](_0x2d238f){const _0x545ded=_0x1d05bf;return{'id':_0x2d238f['id'],'threadId':_0x2d238f['threadId'],'ref':_0x2d238f[_0x545ded(0xe4)]};}};S=Q([b(0x0,_0x3b9053(_0x5340ca)),b(0x1,_0x3b9053(_0xb203b6)),b(0x2,_0x3b9053(_0x5c2147))],S);var re=Object[_0x1d05bf(0xd9)],te=(_0x19ae1f,_0x54ecdb,_0x418547,_0x1af9d3)=>{const _0x58e1ae=_0x1d05bf;for(var _0x49187f=_0x1af9d3>0x1?void 0x0:_0x1af9d3?re(_0x54ecdb,_0x418547):_0x54ecdb,_0x23662e=_0x19ae1f[_0x58e1ae(0x8f)]-0x1,_0x2d8c94;_0x23662e>=0x0;_0x23662e--)(_0x2d8c94=_0x19ae1f[_0x23662e])&&(_0x49187f=_0x2d8c94(_0x49187f)||_0x49187f);return _0x49187f;},M=(_0x20867b,_0x453886)=>(_0x13aeff,_0xaedf7c)=>_0x453886(_0x13aeff,_0xaedf7c,_0x20867b);let f=class extends _0x32b8e3{constructor(_0x467a1c,_0x4f55b3){const _0x294d00=_0x1d05bf;super(),this[_0x294d00(0x94)]=_0x467a1c,this[_0x294d00(0xac)]=_0x4f55b3,this['_initDataSource']();}[_0x1d05bf(0x95)](){const _0x258a41=_0x1d05bf;this[_0x258a41(0x94)][_0x258a41(0xdb)]=this[_0x258a41(0xac)],this[_0x258a41(0x94)][_0x258a41(0xaf)]=!0x1;}};function _0x1614(_0x560cc3,_0x36bcbe){const _0x306061=_0x3060();return _0x1614=function(_0x1614e5,_0x213d5c){_0x1614e5=_0x1614e5-0x85;let _0x3a4b59=_0x306061[_0x1614e5];return _0x3a4b59;},_0x1614(_0x560cc3,_0x36bcbe);}f=te([M(0x0,_0x475030),M(0x1,_0x3b9053(S))],f);var se=Object['defineProperty'],oe=Object[_0x1d05bf(0xd9)],ne=(_0x53ed3f,_0x26f62b,_0x37cbce)=>_0x26f62b in _0x53ed3f?se(_0x53ed3f,_0x26f62b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x37cbce}):_0x53ed3f[_0x26f62b]=_0x37cbce,ie=(_0x4e74a3,_0xcc66af,_0x4497fb,_0x2457b0)=>{const _0x3bb833=_0x1d05bf;for(var _0x5eb94e=_0x2457b0>0x1?void 0x0:_0x2457b0?oe(_0xcc66af,_0x4497fb):_0xcc66af,_0x6c53c=_0x4e74a3[_0x3bb833(0x8f)]-0x1,_0x57ad1b;_0x6c53c>=0x0;_0x6c53c--)(_0x57ad1b=_0x4e74a3[_0x6c53c])&&(_0x5eb94e=_0x57ad1b(_0x5eb94e)||_0x5eb94e);return _0x5eb94e;},N=(_0x274db6,_0xe865a)=>(_0x3c7f22,_0x2162d7)=>_0xe865a(_0x3c7f22,_0x2162d7,_0x274db6),$=(_0x5dfb6a,_0x5357ae,_0xda1b01)=>ne(_0x5dfb6a,typeof _0x5357ae!=_0x1d05bf(0xdd)?_0x5357ae+'':_0x5357ae,_0xda1b01);let g=class extends _0x761510{constructor(_0x4cbcbc=O,_0x258eb8,_0x30a2ba){const _0x1eb225=_0x1d05bf;super(),this[_0x1eb225(0xd1)]=_0x4cbcbc,this[_0x1eb225(0xc5)]=_0x258eb8,this[_0x1eb225(0xb6)]=_0x30a2ba;const {..._0x63e336}=_0x543ebe({},O,this[_0x1eb225(0xd1)]);this[_0x1eb225(0xb6)][_0x1eb225(0x96)](z,_0x63e336);}[_0x1d05bf(0xbf)](){const _0x506780=_0x1d05bf;[[S],[f],[_]][_0x506780(0x9f)](_0x5f452e=>{const _0x1efee8=_0x506780;this[_0x1efee8(0xc5)][_0x1efee8(0xe8)](_0x5f452e);});}[_0x1d05bf(0xd5)](){const _0x419e4f=_0x1d05bf;this[_0x419e4f(0xc5)][_0x419e4f(0x88)](f),this[_0x419e4f(0xc5)]['get'](_);}};$(g,'pluginName',W),$(g,_0x1d05bf(0x8a),_0x7f2fa9[_0x1d05bf(0x99)]),g=ie([_0x339bdc(_0x272b59,_0x2f4ea6,_0x5d88f5),N(0x1,_0x3b9053(_0x4549a3)),N(0x2,_0x50a798)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x51d6ee=_0xcce0;(function(_0x20a5b8,_0xe2fa2a){const _0x4aa656=_0xcce0,_0x51e3f4=_0x20a5b8();while(!![]){try{const _0x575fa8=parseInt(_0x4aa656(0x9b))/0x1*(parseInt(_0x4aa656(0x80))/0x2)+-parseInt(_0x4aa656(0xbd))/0x3+-parseInt(_0x4aa656(0x79))/0x4+-parseInt(_0x4aa656(0xc0))/0x5*(parseInt(_0x4aa656(0x68))/0x6)+parseInt(_0x4aa656(0x8c))/0x7+parseInt(_0x4aa656(0xa1))/0x8*(parseInt(_0x4aa656(0xbf))/0x9)+parseInt(_0x4aa656(0x92))/0xa*(parseInt(_0x4aa656(0x75))/0xb);if(_0x575fa8===_0xe2fa2a)break;else _0x51e3f4['push'](_0x51e3f4['shift']());}catch(_0xf92ea9){_0x51e3f4['push'](_0x51e3f4['shift']());}}}(_0x10e6,0xe4408));import{CommentService as _0x3e89ca,CollaborationSessionService as _0x434488,UniverCollaborationClientPlugin as _0x46428b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2d9af7}from'@univerjs-pro/license';import{dayjs as _0x20fc5c,UserManagerService as _0x222ae4,Inject as _0x454f13,Injector as _0x5ce71f,Disposable as _0x1acb77,CustomRangeType as _0x3274b3,UniverInstanceType as _0x1f9c28,DependentOn as _0x52b2c3,IConfigService as _0x6a194c,Plugin as _0x59eae2,merge as _0x1c6e7b}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x23dfb8}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x81c630,IThreadCommentDataSourceService as _0xb1d392}from'@univerjs/thread-comment';import{bufferTime as _0x52c83e}from'rxjs';import{HTTPService as _0x1768e5}from'@univerjs/network';const W=_0x51d6ee(0x6e);var I=(_0x2e10d6=>(_0x2e10d6[_0x2e10d6[_0x51d6ee(0x88)]=0x0]=_0x51d6ee(0x88),_0x2e10d6[_0x2e10d6[_0x51d6ee(0xb4)]=0x1]=_0x51d6ee(0xb4),_0x2e10d6[_0x2e10d6['UNRECOGNIZED']=-0x1]=_0x51d6ee(0x6c),_0x2e10d6))(I||{}),v=(_0x49ae95=>(_0x49ae95[_0x49ae95['Unknown']=0x0]=_0x51d6ee(0xb7),_0x49ae95[_0x49ae95[_0x51d6ee(0x67)]=0x1]=_0x51d6ee(0x67),_0x49ae95[_0x49ae95['Reply']=0x2]=_0x51d6ee(0x93),_0x49ae95[_0x49ae95[_0x51d6ee(0xb9)]=0x3]=_0x51d6ee(0xb9),_0x49ae95[_0x49ae95[_0x51d6ee(0x6a)]=0x4]=_0x51d6ee(0x6a),_0x49ae95[_0x49ae95['Solve']=0x5]=_0x51d6ee(0x73),_0x49ae95[_0x49ae95[_0x51d6ee(0x6c)]=-0x1]=_0x51d6ee(0x6c),_0x49ae95))(v||{});const y=_0x31d5d0=>_0x20fc5c(new Date(+_0x31d5d0))[_0x51d6ee(0xad)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x171eb3,_0x2f9404)=>{const _0x4cca58=_0x51d6ee,_0x217328=_0x171eb3[_0x4cca58(0x9f)](_0x222ae4),_0x92237a=_0x171eb3['get'](_0x1768e5);_0x2f9404[_0x4cca58(0x7c)](_0x3c7726=>{const _0x38b01a=_0x4cca58;_0x217328['getUser'](_0x3c7726)&&_0x2f9404[_0x38b01a(0xab)](_0x3c7726);}),_0x2f9404[_0x4cca58(0xa4)]&&(await _0x92237a['get'](_0x4cca58(0xac),{'params':{'userIDs':[..._0x2f9404]}}))[_0x4cca58(0x78)]['users']['forEach'](_0x46046d=>{const _0x5e6baf=_0x4cca58;_0x46046d&&_0x217328[_0x5e6baf(0x8d)](_0x46046d);});};var K=Object[_0x51d6ee(0xa8)],V=(_0x5e6ed8,_0x3d5a66,_0xffa6e3,_0x325f25)=>{const _0x2b44d3=_0x51d6ee;for(var _0x26bc4a=_0x325f25>0x1?void 0x0:_0x325f25?K(_0x3d5a66,_0xffa6e3):_0x3d5a66,_0x418897=_0x5e6ed8[_0x2b44d3(0x94)]-0x1,_0x4d7aff;_0x418897>=0x0;_0x418897--)(_0x4d7aff=_0x5e6ed8[_0x418897])&&(_0x26bc4a=_0x4d7aff(_0x26bc4a)||_0x26bc4a);return _0x26bc4a;},p=(_0x418894,_0x38ab13)=>(_0x3c2bd5,_0x1596e0)=>_0x38ab13(_0x3c2bd5,_0x1596e0,_0x418894);let _=class extends _0x1acb77{constructor(_0x54bf5e,_0xe39f26,_0x3708ba,_0x324723){const _0x378f0f=_0x51d6ee;super(),this['_commentService']=_0x54bf5e,this[_0x378f0f(0xa3)]=_0xe39f26,this[_0x378f0f(0x9c)]=_0x3708ba,this[_0x378f0f(0x6d)]=_0x324723,this[_0x378f0f(0x87)](),this[_0x378f0f(0xc7)]();}[_0x51d6ee(0xc7)](){const _0x32d170=_0x51d6ee;this[_0x32d170(0xa9)](this['_threadCommentModel'][_0x32d170(0x76)][_0x32d170(0x96)](_0x52c83e(0x10))[_0x32d170(0xc8)](_0x4a8ab0=>{const _0x50ed0d=_0x32d170,_0x2265a0=new Set();_0x4a8ab0[_0x50ed0d(0x7c)](_0x186f8f=>{const _0xe4fa42=_0x50ed0d;switch(_0x186f8f[_0xe4fa42(0x85)]){case _0xe4fa42(0xa5):{const _0x55dac0=_0x186f8f[_0xe4fa42(0x9e)][_0xe4fa42(0x65)];_0x2265a0[_0xe4fa42(0xa5)](_0x55dac0);break;}}}),B(this[_0x50ed0d(0x6d)],_0x2265a0);}));}[_0x51d6ee(0x87)](){const _0x373076=_0x51d6ee;this[_0x373076(0xa9)](this[_0x373076(0x7a)][_0x373076(0x76)][_0x373076(0xc8)](async _0x7a7fd1=>{const _0x16346e=_0x373076;var _0x5636be,_0xeca34d,_0x549415,_0x2bd0b1;const _0x304ce5=(_0x5636be=this[_0x16346e(0xa3)][_0x16346e(0xc5)](_0x7a7fd1[_0x16346e(0x69)])[_0x16346e(0x89)](_0x1c922e=>_0x1c922e[_0x16346e(0x86)]===_0x7a7fd1['threadId']))==null?void 0x0:_0x5636be[_0x16346e(0xbc)];if(!_0x304ce5)return;const {unitId:_0x566330,subUnitId:_0x26068a}=_0x304ce5;switch(_0x7a7fd1[_0x16346e(0xb6)]&&this[_0x16346e(0x9c)]['addUser'](_0x7a7fd1[_0x16346e(0xb6)]),_0x7a7fd1['type']){case v['Add']:break;case v[_0x16346e(0x93)]:{this['_threadCommentModel']['addComment'](_0x566330,_0x26068a,{'unitId':_0x566330,'subUnitId':_0x26068a,'ref':'','id':_0x7a7fd1[_0x16346e(0xbe)],'dT':y(+_0x7a7fd1['createTimestamp']),'threadId':_0x7a7fd1['threadId'],'personId':(_0x549415=(_0xeca34d=_0x7a7fd1['user'])==null?void 0x0:_0xeca34d[_0x16346e(0xcb)])!=null?_0x549415:_0x7a7fd1['userId'],'text':JSON['parse'](_0x7a7fd1[_0x16346e(0xca)]),'parentId':_0x304ce5['id']});break;}case v[_0x16346e(0x6a)]:{const _0x3255e8=this[_0x16346e(0xa3)]['getComment'](_0x566330,_0x26068a,_0x7a7fd1[_0x16346e(0xbe)]);_0x3255e8&&_0x3255e8['parentId']&&this[_0x16346e(0xa3)]['deleteComment'](_0x566330,_0x26068a,_0x7a7fd1[_0x16346e(0xbe)]);break;}case v[_0x16346e(0xb9)]:{this[_0x16346e(0xa3)][_0x16346e(0x91)](_0x566330,_0x26068a,{'commentId':_0x7a7fd1[_0x16346e(0xbe)],'text':JSON[_0x16346e(0xb1)](_0x7a7fd1[_0x16346e(0xca)])});break;}case v[_0x16346e(0x73)]:{const _0x258002=(_0x2bd0b1=this[_0x16346e(0xa3)][_0x16346e(0xc5)](_0x7a7fd1[_0x16346e(0x69)])[_0x16346e(0x89)](_0x168ada=>_0x168ada[_0x16346e(0x86)]===_0x7a7fd1['threadId']))==null?void 0x0:_0x2bd0b1['root'];_0x258002&&this[_0x16346e(0xa3)]['resolveComment'](_0x566330,_0x26068a,_0x258002['id'],_0x7a7fd1[_0x16346e(0xb0)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x454f13(_0x3e89ca)),p(0x1,_0x454f13(_0x81c630)),p(0x2,_0x454f13(_0x222ae4)),p(0x3,_0x454f13(_0x5ce71f))],_);const z=_0x51d6ee(0x8f),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x469a54,_0x157df9,_0x1706c7,_0x57b21f)=>{for(var _0x3a01e3=_0x57b21f>0x1?void 0x0:_0x57b21f?k(_0x157df9,_0x1706c7):_0x157df9,_0x3fb191=_0x469a54['length']-0x1,_0x411d4a;_0x3fb191>=0x0;_0x3fb191--)(_0x411d4a=_0x469a54[_0x3fb191])&&(_0x3a01e3=_0x411d4a(_0x3a01e3)||_0x3a01e3);return _0x3a01e3;},b=(_0x174a3e,_0xb50247)=>(_0x5d21c5,_0x212e44)=>_0xb50247(_0x5d21c5,_0x212e44,_0x174a3e);function X(_0x1b441d,_0x247add){const _0x11bb1d=_0x51d6ee,_0x70da45=_0x1b441d[_0x11bb1d(0xaa)][0x0];return{..._0x247add,'id':_0x70da45[_0x11bb1d(0xbe)],'resolved':_0x1b441d[_0x11bb1d(0xb0)]===0x1,'dT':y(_0x70da45[_0x11bb1d(0xaf)]),'personId':_0x70da45[_0x11bb1d(0x82)],'threadId':_0x70da45[_0x11bb1d(0x86)]};}function ee(_0x29e18b,_0x528ef4,_0x389ddf){const _0x419b03=_0x51d6ee;var _0x29f614,_0x514c9a;if(((_0x514c9a=(_0x29f614=_0x29e18b==null?void 0x0:_0x29e18b[_0x419b03(0xaa)])==null?void 0x0:_0x29f614['length'])!=null?_0x514c9a:0x0)>0x0){const _0x29575c=(_0x21be44,_0x1d1e4f)=>({'id':_0x21be44[_0x419b03(0xbe)],'threadId':_0x21be44['threadId'],'dT':y(_0x21be44[_0x419b03(0xaf)]),'personId':_0x21be44[_0x419b03(0x82)],'resolved':_0x29e18b[_0x419b03(0xb0)]===I[_0x419b03(0xb4)],'unitId':_0x528ef4,'subUnitId':_0x389ddf,'text':JSON[_0x419b03(0xb1)](_0x21be44[_0x419b03(0xca)]),'parentId':_0x1d1e4f}),_0x21c442=_0x29575c(_0x29e18b[_0x419b03(0xaa)][0x0]);return{..._0x21c442,'children':_0x29e18b[_0x419b03(0xaa)][_0x419b03(0x66)](0x1)[_0x419b03(0x6b)](_0x40e9bb=>_0x29575c(_0x40e9bb,_0x21c442['id']))};}return null;}let S=class{constructor(_0x25c12e,_0x5bc843,_0x49aa9c){const _0xcee460=_0x51d6ee;this[_0xcee460(0xc1)]=_0x25c12e,this[_0xcee460(0x9c)]=_0x5bc843,this[_0xcee460(0x98)]=_0x49aa9c;}async['addComment'](_0x1f5e6f){const _0x498202=_0x51d6ee;var _0x34e307,_0x3d50d1;const {parentId:_0x1a3138,unitId:_0x43b2de,text:_0x9dab7b,threadId:_0x2ec661}=_0x1f5e6f,_0x45002c=(_0x3d50d1=(_0x34e307=_0x9dab7b[_0x498202(0xc3)])==null?void 0x0:_0x34e307[_0x498202(0x70)](_0x2905df=>_0x2905df[_0x498202(0x72)]===_0x3274b3[_0x498202(0xb5)])[_0x498202(0x6b)](_0x44578b=>_0x44578b['rangeId']))!=null?_0x3d50d1:[],_0x2857ea=JSON['stringify'](_0x9dab7b),_0x58f953=(await this['_sessionService'][_0x498202(0x95)](_0x43b2de))[_0x498202(0xa7)]();if(_0x1a3138){const _0xe93156={'memberId':_0x58f953,'unitId':_0x43b2de,'content':_0x2857ea,'mention':_0x45002c,'threadId':_0x2ec661},_0x28970f=(await this[_0x498202(0xc1)][_0x498202(0x84)](_0x498202(0x99)+_0x43b2de+_0x498202(0xba),{'body':_0xe93156}))['body'][_0x498202(0x90)];return{..._0x1f5e6f,'id':_0x28970f[_0x498202(0xbe)],'dT':_0x20fc5c(+_0x28970f[_0x498202(0xaf)])[_0x498202(0xad)](_0x498202(0xc6)),'personId':_0x28970f[_0x498202(0x82)]};}else{const _0x1ce77e={'memberId':_0x58f953,'unitId':_0x43b2de,'content':_0x2857ea,'mention':_0x45002c},_0x38a993=await this[_0x498202(0xc1)]['post']('/universer-api/comment/unit/'+_0x43b2de+_0x498202(0xc4),{'body':_0x1ce77e});return X(_0x38a993[_0x498202(0x78)]['comment'],_0x1f5e6f);}}async[_0x51d6ee(0x91)](_0x7453f4){const _0x2d557e=_0x51d6ee;var _0x4a1b2f,_0x1fd33a;const {text:_0x44d91a,unitId:_0x754bc}=_0x7453f4,_0x594220=(_0x1fd33a=(_0x4a1b2f=_0x44d91a[_0x2d557e(0xc3)])==null?void 0x0:_0x4a1b2f[_0x2d557e(0x70)](_0xb8ef72=>_0xb8ef72[_0x2d557e(0x72)]===_0x3274b3[_0x2d557e(0xb5)])['map'](_0x2ea3bb=>_0x2ea3bb['rangeId']))!=null?_0x1fd33a:[],_0x49d97b=JSON[_0x2d557e(0x71)](_0x44d91a),_0x1b8223=_0x7453f4[_0x2d557e(0x86)],_0x15ea9c=_0x7453f4['id'],_0x46cda1={'memberId':(await this[_0x2d557e(0x98)][_0x2d557e(0x95)](_0x754bc))[_0x2d557e(0xa7)](),'unitId':_0x754bc,'threadId':_0x1b8223,'mention':_0x594220,'content':_0x49d97b,'replyId':_0x15ea9c},_0x115eab=await this[_0x2d557e(0xc1)][_0x2d557e(0x84)]('/universer-api/comment/unit/'+_0x754bc+_0x2d557e(0xbb),{'body':_0x46cda1});return!_0x115eab[_0x2d557e(0x78)][_0x2d557e(0x81)]||_0x115eab[_0x2d557e(0x78)]['error'][_0x2d557e(0xae)]===0x1;}async['resolveComment'](_0x27d98e){const _0x23936d=_0x51d6ee,{unitId:_0x37e78f}=_0x27d98e,_0x24b97a=_0x27d98e['threadId'],_0x4629f3={'memberId':this[_0x23936d(0x9c)][_0x23936d(0x74)]()['userID'],'unitId':_0x37e78f,'threadId':_0x24b97a,'solved':_0x27d98e['resolved']?I[_0x23936d(0xb4)]:I[_0x23936d(0x88)]},_0x1debd5=await this['_httpService'][_0x23936d(0x84)]('/universer-api/comment/unit/'+_0x37e78f+_0x23936d(0x9a),{'body':_0x4629f3});return!_0x1debd5[_0x23936d(0x78)][_0x23936d(0x81)]||_0x1debd5[_0x23936d(0x78)]['error'][_0x23936d(0xae)]===0x1;}async[_0x51d6ee(0xc9)](_0x24f79b,_0xc6744,_0x153112,_0x29470b){const _0x5889e3=_0x51d6ee,_0x3b0f08={'memberId':(await this[_0x5889e3(0x98)][_0x5889e3(0x95)](_0x24f79b))['getMemberID'](),'threadId':_0x153112,'replyId':_0x29470b,'unitId':_0x24f79b},_0x383d42=await this[_0x5889e3(0xc1)]['post'](_0x5889e3(0x99)+_0x24f79b+_0x5889e3(0xc2),{'body':_0x3b0f08});return!_0x383d42[_0x5889e3(0x78)][_0x5889e3(0x81)]||_0x383d42['body'][_0x5889e3(0x81)][_0x5889e3(0xae)]===0x1;}async['listComments'](_0x24cf93,_0x47cc6b,_0x452b88){const _0x40a582=_0x51d6ee,_0x33ac72={'unitId':_0x24cf93,'threadId':_0x452b88},_0x32452f=await this[_0x40a582(0xc1)][_0x40a582(0x84)](_0x40a582(0x99)+_0x24cf93+_0x40a582(0x97),{'body':_0x33ac72}),_0x262db5=_0x452b88['map'](_0x51659c=>ee(_0x32452f['body'][_0x40a582(0x8b)][_0x51659c],_0x24cf93,_0x47cc6b))[_0x40a582(0x70)](Boolean);return Object['values'](_0x32452f[_0x40a582(0x78)][_0x40a582(0xa2)])[_0x40a582(0x7c)](_0x549af6=>{const _0xb709ca=_0x40a582;this[_0xb709ca(0x9c)]['addUser'](_0x549af6);}),_0x262db5;}['saveCommentToSnapshot'](_0x12055d){const _0xca4d7=_0x51d6ee;return{'id':_0x12055d['id'],'threadId':_0x12055d[_0xca4d7(0x86)],'ref':_0x12055d[_0xca4d7(0xa0)]};}};S=Q([b(0x0,_0x454f13(_0x1768e5)),b(0x1,_0x454f13(_0x222ae4)),b(0x2,_0x454f13(_0x434488))],S);var re=Object[_0x51d6ee(0xa8)],te=(_0x444c2d,_0x2a310f,_0x574678,_0x10458e)=>{const _0x485f0c=_0x51d6ee;for(var _0x5b85ff=_0x10458e>0x1?void 0x0:_0x10458e?re(_0x2a310f,_0x574678):_0x2a310f,_0x3614c8=_0x444c2d[_0x485f0c(0x94)]-0x1,_0x228f12;_0x3614c8>=0x0;_0x3614c8--)(_0x228f12=_0x444c2d[_0x3614c8])&&(_0x5b85ff=_0x228f12(_0x5b85ff)||_0x5b85ff);return _0x5b85ff;},M=(_0x5a6d1c,_0x31fb4b)=>(_0x411238,_0x3a275d)=>_0x31fb4b(_0x411238,_0x3a275d,_0x5a6d1c);function _0xcce0(_0x412d16,_0x1b1663){const _0x10e650=_0x10e6();return _0xcce0=function(_0xcce061,_0x20e2e2){_0xcce061=_0xcce061-0x65;let _0x4d95b9=_0x10e650[_0xcce061];return _0x4d95b9;},_0xcce0(_0x412d16,_0x1b1663);}let f=class extends _0x1acb77{constructor(_0x570238,_0x471dcd){const _0x5b5ebf=_0x51d6ee;super(),this[_0x5b5ebf(0x8a)]=_0x570238,this['_threadCommentDataSource']=_0x471dcd,this[_0x5b5ebf(0x7d)]();}[_0x51d6ee(0x7d)](){const _0x8855a3=_0x51d6ee;this['_threadCommentDataSourceService'][_0x8855a3(0x83)]=this[_0x8855a3(0xb2)],this[_0x8855a3(0x8a)][_0x8855a3(0x7e)]=!0x1;}};f=te([M(0x0,_0xb1d392),M(0x1,_0x454f13(S))],f);var se=Object[_0x51d6ee(0x7f)],oe=Object[_0x51d6ee(0xa8)],ne=(_0x8d4074,_0x2d63bc,_0x5492cc)=>_0x2d63bc in _0x8d4074?se(_0x8d4074,_0x2d63bc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5492cc}):_0x8d4074[_0x2d63bc]=_0x5492cc,ie=(_0x49a7da,_0x1e0110,_0x3e3bc7,_0x359a18)=>{const _0xa128bc=_0x51d6ee;for(var _0x1e5c5c=_0x359a18>0x1?void 0x0:_0x359a18?oe(_0x1e0110,_0x3e3bc7):_0x1e0110,_0x1b5327=_0x49a7da[_0xa128bc(0x94)]-0x1,_0x1e3882;_0x1b5327>=0x0;_0x1b5327--)(_0x1e3882=_0x49a7da[_0x1b5327])&&(_0x1e5c5c=_0x1e3882(_0x1e5c5c)||_0x1e5c5c);return _0x1e5c5c;},N=(_0x546c6b,_0x42889d)=>(_0x4b04f1,_0x1b502a)=>_0x42889d(_0x4b04f1,_0x1b502a,_0x546c6b),$=(_0xa96a01,_0x5af488,_0xcff0eb)=>ne(_0xa96a01,typeof _0x5af488!=_0x51d6ee(0x9d)?_0x5af488+'':_0x5af488,_0xcff0eb);let g=class extends _0x59eae2{constructor(_0x53936f=O,_0x459f58,_0x3ffa18){const _0x18d5f6=_0x51d6ee;super(),this[_0x18d5f6(0xa6)]=_0x53936f,this['_injector']=_0x459f58,this[_0x18d5f6(0x6f)]=_0x3ffa18;const {..._0x2d95be}=_0x1c6e7b({},O,this[_0x18d5f6(0xa6)]);this['_configService'][_0x18d5f6(0xb3)](z,_0x2d95be);}[_0x51d6ee(0x7b)](){const _0x23b729=_0x51d6ee;[[S],[f],[_]][_0x23b729(0x7c)](_0xc54ba4=>{const _0x90c1ea=_0x23b729;this[_0x90c1ea(0x6d)][_0x90c1ea(0xa5)](_0xc54ba4);});}[_0x51d6ee(0x8e)](){const _0x56ee66=_0x51d6ee;this[_0x56ee66(0x6d)][_0x56ee66(0x9f)](f),this[_0x56ee66(0x6d)][_0x56ee66(0x9f)](_);}};function _0x10e6(){const _0x1b2877=['threadId','_init','OpenOrReOpen','find','_threadCommentDataSourceService','comments','5814830wikXUt','addUser','onReady','thread-comment-data-source.config','reply','updateComment','66230GoAyvd','Reply','length','requireSession','pipe','/list','_sessionService','/universer-api/comment/unit/','/solved','3gTQMhO','_userService','symbol','payload','get','ref','54952nxEavL','users','_threadCommentModel','size','add','_config','getMemberID','getOwnPropertyDescriptor','disposeWithMe','replies','delete','/universer-api/user/list','format','code','createTimestamp','solved','parse','_threadCommentDataSource','setConfig','Solved','COMMENT','user','Unknown','UNIVER_UNKNOWN','Edit','/reply','/edit','root','4422450BhOvuV','replyId','117sMYJEs','1050ETFdIG','_httpService','/delete','customRanges','/add','getUnit','YYYY/MM/DD\x20HH:mm','_initUserSync','subscribe','deleteComment','content','userID','personId','slice','Add','52956eDdONb','unitId','Delete','map','UNRECOGNIZED','_injector','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_configService','filter','stringify','rangeType','Solve','getCurrentUser','5423hvOOsX','commentUpdate$','pluginName','body','932768lvYkJB','_commentService','onStarting','forEach','_initDataSource','syncUpdateMutationToColla','defineProperty','207064jGFRJb','error','userId','dataSource','post','type'];_0x10e6=function(){return _0x1b2877;};return _0x10e6();}$(g,_0x51d6ee(0x77),W),$(g,_0x51d6ee(0x85),_0x1f9c28[_0x51d6ee(0xb8)]),g=ie([_0x52b2c3(_0x23dfb8,_0x46428b,_0x2d9af7),N(0x1,_0x454f13(_0x5ce71f)),N(0x2,_0x6a194c)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x1d05bf=_0x1614;(function(_0x468413,_0x3d6942){const _0x4e9982=_0x1614,_0xb5c747=_0x468413();while(!![]){try{const _0x50621b=parseInt(_0x4e9982(0xb3))/0x1+parseInt(_0x4e9982(0x93))/0x2+parseInt(_0x4e9982(0xea))/0x3+parseInt(_0x4e9982(0xee))/0x4*(parseInt(_0x4e9982(0xd6))/0x5)+-parseInt(_0x4e9982(0xa6))/0x6*(parseInt(_0x4e9982(0xbe))/0x7)+-parseInt(_0x4e9982(0x9d))/0x8*(-parseInt(_0x4e9982(0xd2))/0x9)+-parseInt(_0x4e9982(0x91))/0xa*(parseInt(_0x4e9982(0xae))/0xb);if(_0x50621b===_0x3d6942)break;else _0xb5c747['push'](_0xb5c747['shift']());}catch(_0x453d69){_0xb5c747['push'](_0xb5c747['shift']());}}}(_0x3060,0x2b2f9));import{CommentService as _0xc41ade,CollaborationSessionService as _0x5c2147,UniverCollaborationClientPlugin as _0x2f4ea6}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5d88f5}from'@univerjs-pro/license';import{dayjs as _0x4cfb05,UserManagerService as _0xb203b6,Inject as _0x3b9053,Injector as _0x4549a3,Disposable as _0x32b8e3,CustomRangeType as _0x1261ad,UniverInstanceType as _0x7f2fa9,DependentOn as _0x339bdc,IConfigService as _0x50a798,Plugin as _0x761510,merge as _0x543ebe}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x272b59}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1d8efc,IThreadCommentDataSourceService as _0x475030}from'@univerjs/thread-comment';import{bufferTime as _0x5d647c}from'rxjs';function _0x3060(){const _0x3e01f8=['comments','replyId','parentId','6jskLda','replies','format','subscribe','/add','deleteComment','_threadCommentDataSource','updateComment','4051993vRwCdP','syncUpdateMutationToColla','_httpService','Edit','Solve','222690GyNWrq','userID','slice','_configService','resolveComment','map','body','requireSession','_initUserSync','/universer-api/comment/unit/','Unknown','2278073ThaHyO','onStarting','getUser','rangeType','thread-comment-data-source.config','rangeId','user','_injector','getCurrentUser','content','UNRECOGNIZED','addComment','getComment','customRanges','OpenOrReOpen','code','size','COMMENT','pipe','_config','18wmfYTi','Solved','users','onReady','955ZEOBRj','find','userId','getOwnPropertyDescriptor','disposeWithMe','dataSource','commentUpdate$','symbol','reply','comment','/reply','_commentService','stringify','_sessionService','ref','filter','YYYY/MM/DD\x20HH:mm','_init','add','listComments','425169cewfbg','_userService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolved','6672GHnHcr','post','error','personId','solved','Reply','get','payload','type','delete','Delete','_threadCommentModel','/edit','length','/solved','20wIAcdZ','createTimestamp','437214QTAmXA','_threadCommentDataSourceService','_initDataSource','setConfig','getMemberID','addUser','UNIVER_UNKNOWN','unitId','Add','root','1349784WoytNb','getUnit','forEach','parse','saveCommentToSnapshot','threadId'];_0x3060=function(){return _0x3e01f8;};return _0x3060();}import{HTTPService as _0x5340ca}from'@univerjs/network';const W=_0x1d05bf(0xec);var I=(_0x47c7b3=>(_0x47c7b3[_0x47c7b3[_0x1d05bf(0xcc)]=0x0]='OpenOrReOpen',_0x47c7b3[_0x47c7b3[_0x1d05bf(0xd3)]=0x1]=_0x1d05bf(0xd3),_0x47c7b3[_0x47c7b3['UNRECOGNIZED']=-0x1]=_0x1d05bf(0xc8),_0x47c7b3))(I||{}),v=(_0x1de5ba=>(_0x1de5ba[_0x1de5ba[_0x1d05bf(0xbd)]=0x0]=_0x1d05bf(0xbd),_0x1de5ba[_0x1de5ba['Add']=0x1]=_0x1d05bf(0x9b),_0x1de5ba[_0x1de5ba[_0x1d05bf(0x87)]=0x2]=_0x1d05bf(0x87),_0x1de5ba[_0x1de5ba[_0x1d05bf(0xb1)]=0x3]=_0x1d05bf(0xb1),_0x1de5ba[_0x1de5ba[_0x1d05bf(0x8c)]=0x4]='Delete',_0x1de5ba[_0x1de5ba[_0x1d05bf(0xb2)]=0x5]=_0x1d05bf(0xb2),_0x1de5ba[_0x1de5ba[_0x1d05bf(0xc8)]=-0x1]=_0x1d05bf(0xc8),_0x1de5ba))(v||{});const y=_0x2925b2=>_0x4cfb05(new Date(+_0x2925b2))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x43d4ee,_0x47fb2a)=>{const _0x13b4b0=_0x1d05bf,_0x145c7f=_0x43d4ee[_0x13b4b0(0x88)](_0xb203b6),_0x146d31=_0x43d4ee[_0x13b4b0(0x88)](_0x5340ca);_0x47fb2a[_0x13b4b0(0x9f)](_0x51042a=>{const _0x2aac36=_0x13b4b0;_0x145c7f[_0x2aac36(0xc0)](_0x51042a)&&_0x47fb2a[_0x2aac36(0x8b)](_0x51042a);}),_0x47fb2a[_0x13b4b0(0xce)]&&(await _0x146d31[_0x13b4b0(0x88)]('/universer-api/user/list',{'params':{'userIDs':[..._0x47fb2a]}}))[_0x13b4b0(0xb9)]['users'][_0x13b4b0(0x9f)](_0x1681cf=>{const _0x47352c=_0x13b4b0;_0x1681cf&&_0x145c7f[_0x47352c(0x98)](_0x1681cf);});};var K=Object[_0x1d05bf(0xd9)],V=(_0x4ffec8,_0x2afed1,_0xb8b63a,_0x2d28ee)=>{const _0x36c5c1=_0x1d05bf;for(var _0x531233=_0x2d28ee>0x1?void 0x0:_0x2d28ee?K(_0x2afed1,_0xb8b63a):_0x2afed1,_0x8142fd=_0x4ffec8[_0x36c5c1(0x8f)]-0x1,_0x4a42f4;_0x8142fd>=0x0;_0x8142fd--)(_0x4a42f4=_0x4ffec8[_0x8142fd])&&(_0x531233=_0x4a42f4(_0x531233)||_0x531233);return _0x531233;},p=(_0x706be9,_0x3c18e5)=>(_0x500355,_0x590d3f)=>_0x3c18e5(_0x500355,_0x590d3f,_0x706be9);let _=class extends _0x32b8e3{constructor(_0x4df39a,_0x56c8b8,_0x5d1126,_0x39f5cb){const _0x49e8c2=_0x1d05bf;super(),this[_0x49e8c2(0xe1)]=_0x4df39a,this[_0x49e8c2(0x8d)]=_0x56c8b8,this['_userService']=_0x5d1126,this[_0x49e8c2(0xc5)]=_0x39f5cb,this[_0x49e8c2(0xe7)](),this['_initUserSync']();}[_0x1d05bf(0xbb)](){const _0x479467=_0x1d05bf;this[_0x479467(0xda)](this[_0x479467(0x8d)][_0x479467(0xdc)][_0x479467(0xd0)](_0x5d647c(0x10))[_0x479467(0xa9)](_0x2ef42a=>{const _0x36113d=_0x479467,_0x3ba742=new Set();_0x2ef42a[_0x36113d(0x9f)](_0x27c8da=>{const _0x20f412=_0x36113d;switch(_0x27c8da['type']){case _0x20f412(0xe8):{const _0x28cd09=_0x27c8da[_0x20f412(0x89)][_0x20f412(0x85)];_0x3ba742[_0x20f412(0xe8)](_0x28cd09);break;}}}),B(this['_injector'],_0x3ba742);}));}[_0x1d05bf(0xe7)](){const _0x36e8a6=_0x1d05bf;this['disposeWithMe'](this[_0x36e8a6(0xe1)][_0x36e8a6(0xdc)][_0x36e8a6(0xa9)](async _0x13612f=>{const _0x463596=_0x36e8a6;var _0x4e005d,_0x5a4114,_0x5bd525,_0x2f784b;const _0x20a774=(_0x4e005d=this[_0x463596(0x8d)][_0x463596(0x9e)](_0x13612f['unitId'])[_0x463596(0xd7)](_0x41cbbb=>_0x41cbbb['threadId']===_0x13612f[_0x463596(0xa2)]))==null?void 0x0:_0x4e005d['root'];if(!_0x20a774)return;const {unitId:_0x2e532b,subUnitId:_0x430e89}=_0x20a774;switch(_0x13612f[_0x463596(0xc4)]&&this[_0x463596(0xeb)][_0x463596(0x98)](_0x13612f[_0x463596(0xc4)]),_0x13612f[_0x463596(0x8a)]){case v['Add']:break;case v[_0x463596(0x87)]:{this[_0x463596(0x8d)][_0x463596(0xc9)](_0x2e532b,_0x430e89,{'unitId':_0x2e532b,'subUnitId':_0x430e89,'ref':'','id':_0x13612f['replyId'],'dT':y(+_0x13612f[_0x463596(0x92)]),'threadId':_0x13612f['threadId'],'personId':(_0x5bd525=(_0x5a4114=_0x13612f[_0x463596(0xc4)])==null?void 0x0:_0x5a4114[_0x463596(0xb4)])!=null?_0x5bd525:_0x13612f['userId'],'text':JSON[_0x463596(0xa0)](_0x13612f['content']),'parentId':_0x20a774['id']});break;}case v[_0x463596(0x8c)]:{const _0x14c9cb=this[_0x463596(0x8d)][_0x463596(0xca)](_0x2e532b,_0x430e89,_0x13612f['replyId']);_0x14c9cb&&_0x14c9cb[_0x463596(0xa5)]&&this[_0x463596(0x8d)][_0x463596(0xab)](_0x2e532b,_0x430e89,_0x13612f['replyId']);break;}case v[_0x463596(0xb1)]:{this[_0x463596(0x8d)][_0x463596(0xad)](_0x2e532b,_0x430e89,{'commentId':_0x13612f[_0x463596(0xa4)],'text':JSON[_0x463596(0xa0)](_0x13612f['content'])});break;}case v[_0x463596(0xb2)]:{const _0x25f141=(_0x2f784b=this[_0x463596(0x8d)][_0x463596(0x9e)](_0x13612f[_0x463596(0x9a)])[_0x463596(0xd7)](_0x58ff72=>_0x58ff72[_0x463596(0xa2)]===_0x13612f[_0x463596(0xa2)]))==null?void 0x0:_0x2f784b[_0x463596(0x9c)];_0x25f141&&this['_threadCommentModel'][_0x463596(0xb7)](_0x2e532b,_0x430e89,_0x25f141['id'],_0x13612f['solved']===I[_0x463596(0xd3)]);break;}}}));}};_=V([p(0x0,_0x3b9053(_0xc41ade)),p(0x1,_0x3b9053(_0x1d8efc)),p(0x2,_0x3b9053(_0xb203b6)),p(0x3,_0x3b9053(_0x4549a3))],_);const z=_0x1d05bf(0xc2),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1b2c33,_0x291cef,_0x31cb1b,_0x1d4640)=>{const _0x36bb4b=_0x1d05bf;for(var _0x2121ce=_0x1d4640>0x1?void 0x0:_0x1d4640?k(_0x291cef,_0x31cb1b):_0x291cef,_0x28d029=_0x1b2c33[_0x36bb4b(0x8f)]-0x1,_0x24eeaf;_0x28d029>=0x0;_0x28d029--)(_0x24eeaf=_0x1b2c33[_0x28d029])&&(_0x2121ce=_0x24eeaf(_0x2121ce)||_0x2121ce);return _0x2121ce;},b=(_0x337f7b,_0x2e5471)=>(_0x1729cf,_0x581d0a)=>_0x2e5471(_0x1729cf,_0x581d0a,_0x337f7b);function X(_0x158da1,_0x171913){const _0x36b8bf=_0x1d05bf,_0x3ad962=_0x158da1[_0x36b8bf(0xa7)][0x0];return{..._0x171913,'id':_0x3ad962[_0x36b8bf(0xa4)],'resolved':_0x158da1[_0x36b8bf(0x86)]===0x1,'dT':y(_0x3ad962[_0x36b8bf(0x92)]),'personId':_0x3ad962[_0x36b8bf(0xd8)],'threadId':_0x3ad962[_0x36b8bf(0xa2)]};}function ee(_0x3f4517,_0x12368f,_0x11aae5){const _0xea2705=_0x1d05bf;var _0x3d11ed,_0xc7c0be;if(((_0xc7c0be=(_0x3d11ed=_0x3f4517==null?void 0x0:_0x3f4517['replies'])==null?void 0x0:_0x3d11ed[_0xea2705(0x8f)])!=null?_0xc7c0be:0x0)>0x0){const _0x3ca1af=(_0x419f24,_0x39e44d)=>({'id':_0x419f24[_0xea2705(0xa4)],'threadId':_0x419f24['threadId'],'dT':y(_0x419f24[_0xea2705(0x92)]),'personId':_0x419f24[_0xea2705(0xd8)],'resolved':_0x3f4517['solved']===I[_0xea2705(0xd3)],'unitId':_0x12368f,'subUnitId':_0x11aae5,'text':JSON[_0xea2705(0xa0)](_0x419f24[_0xea2705(0xc7)]),'parentId':_0x39e44d}),_0x2c2e01=_0x3ca1af(_0x3f4517[_0xea2705(0xa7)][0x0]);return{..._0x2c2e01,'children':_0x3f4517[_0xea2705(0xa7)][_0xea2705(0xb5)](0x1)[_0xea2705(0xb8)](_0x31892a=>_0x3ca1af(_0x31892a,_0x2c2e01['id']))};}return null;}let S=class{constructor(_0x3e765b,_0x8ccd56,_0x4b77ad){const _0xdf602e=_0x1d05bf;this['_httpService']=_0x3e765b,this[_0xdf602e(0xeb)]=_0x8ccd56,this['_sessionService']=_0x4b77ad;}async['addComment'](_0x3bee76){const _0x1be0ae=_0x1d05bf;var _0x11747e,_0x3dce07;const {parentId:_0x3e833a,unitId:_0x53d1a2,text:_0xf64010,threadId:_0x23862b}=_0x3bee76,_0x1ea204=(_0x3dce07=(_0x11747e=_0xf64010[_0x1be0ae(0xcb)])==null?void 0x0:_0x11747e[_0x1be0ae(0xe5)](_0x2a9eb4=>_0x2a9eb4[_0x1be0ae(0xc1)]===_0x1261ad[_0x1be0ae(0xcf)])[_0x1be0ae(0xb8)](_0x255f2f=>_0x255f2f[_0x1be0ae(0xc3)]))!=null?_0x3dce07:[],_0x1d777b=JSON[_0x1be0ae(0xe2)](_0xf64010),_0x28265c=(await this[_0x1be0ae(0xe3)][_0x1be0ae(0xba)](_0x53d1a2))['getMemberID']();if(_0x3e833a){const _0x1ee11a={'memberId':_0x28265c,'unitId':_0x53d1a2,'content':_0x1d777b,'mention':_0x1ea204,'threadId':_0x23862b},_0x84b2a9=(await this['_httpService'][_0x1be0ae(0xef)](_0x1be0ae(0xbc)+_0x53d1a2+_0x1be0ae(0xe0),{'body':_0x1ee11a}))[_0x1be0ae(0xb9)][_0x1be0ae(0xde)];return{..._0x3bee76,'id':_0x84b2a9[_0x1be0ae(0xa4)],'dT':_0x4cfb05(+_0x84b2a9[_0x1be0ae(0x92)])[_0x1be0ae(0xa8)](_0x1be0ae(0xe6)),'personId':_0x84b2a9[_0x1be0ae(0xd8)]};}else{const _0x51088d={'memberId':_0x28265c,'unitId':_0x53d1a2,'content':_0x1d777b,'mention':_0x1ea204},_0x4cedb0=await this[_0x1be0ae(0xb0)][_0x1be0ae(0xef)]('/universer-api/comment/unit/'+_0x53d1a2+_0x1be0ae(0xaa),{'body':_0x51088d});return X(_0x4cedb0[_0x1be0ae(0xb9)][_0x1be0ae(0xdf)],_0x3bee76);}}async['updateComment'](_0x1e586c){const _0x41853e=_0x1d05bf;var _0x14bb53,_0x78657f;const {text:_0x1bb852,unitId:_0x35928a}=_0x1e586c,_0x497da7=(_0x78657f=(_0x14bb53=_0x1bb852[_0x41853e(0xcb)])==null?void 0x0:_0x14bb53['filter'](_0x3b10b0=>_0x3b10b0['rangeType']===_0x1261ad['COMMENT'])[_0x41853e(0xb8)](_0x1cd22b=>_0x1cd22b[_0x41853e(0xc3)]))!=null?_0x78657f:[],_0x4a1d15=JSON['stringify'](_0x1bb852),_0x4d1d04=_0x1e586c[_0x41853e(0xa2)],_0x58dd89=_0x1e586c['id'],_0x1eb283={'memberId':(await this['_sessionService']['requireSession'](_0x35928a))['getMemberID'](),'unitId':_0x35928a,'threadId':_0x4d1d04,'mention':_0x497da7,'content':_0x4a1d15,'replyId':_0x58dd89},_0x36fc1f=await this['_httpService'][_0x41853e(0xef)](_0x41853e(0xbc)+_0x35928a+_0x41853e(0x8e),{'body':_0x1eb283});return!_0x36fc1f[_0x41853e(0xb9)][_0x41853e(0xf0)]||_0x36fc1f[_0x41853e(0xb9)][_0x41853e(0xf0)][_0x41853e(0xcd)]===0x1;}async[_0x1d05bf(0xb7)](_0x5c7e00){const _0x520e6e=_0x1d05bf,{unitId:_0x557e5d}=_0x5c7e00,_0x5bd458=_0x5c7e00['threadId'],_0x25bd74={'memberId':this[_0x520e6e(0xeb)][_0x520e6e(0xc6)]()[_0x520e6e(0xb4)],'unitId':_0x557e5d,'threadId':_0x5bd458,'solved':_0x5c7e00[_0x520e6e(0xed)]?I[_0x520e6e(0xd3)]:I[_0x520e6e(0xcc)]},_0x4dc98f=await this[_0x520e6e(0xb0)][_0x520e6e(0xef)](_0x520e6e(0xbc)+_0x557e5d+_0x520e6e(0x90),{'body':_0x25bd74});return!_0x4dc98f[_0x520e6e(0xb9)][_0x520e6e(0xf0)]||_0x4dc98f['body']['error'][_0x520e6e(0xcd)]===0x1;}async[_0x1d05bf(0xab)](_0x46df38,_0x4d353c,_0x484bda,_0x54a0a7){const _0x3bb1ba=_0x1d05bf,_0x213741={'memberId':(await this[_0x3bb1ba(0xe3)][_0x3bb1ba(0xba)](_0x46df38))[_0x3bb1ba(0x97)](),'threadId':_0x484bda,'replyId':_0x54a0a7,'unitId':_0x46df38},_0x1f9673=await this[_0x3bb1ba(0xb0)][_0x3bb1ba(0xef)](_0x3bb1ba(0xbc)+_0x46df38+'/delete',{'body':_0x213741});return!_0x1f9673['body']['error']||_0x1f9673[_0x3bb1ba(0xb9)]['error'][_0x3bb1ba(0xcd)]===0x1;}async[_0x1d05bf(0xe9)](_0x3ff60a,_0x4650fe,_0x1f84df){const _0x463748=_0x1d05bf,_0x41b776={'unitId':_0x3ff60a,'threadId':_0x1f84df},_0x3eee08=await this['_httpService'][_0x463748(0xef)](_0x463748(0xbc)+_0x3ff60a+'/list',{'body':_0x41b776}),_0x23cddc=_0x1f84df[_0x463748(0xb8)](_0xdfc450=>ee(_0x3eee08[_0x463748(0xb9)][_0x463748(0xa3)][_0xdfc450],_0x3ff60a,_0x4650fe))[_0x463748(0xe5)](Boolean);return Object['values'](_0x3eee08[_0x463748(0xb9)][_0x463748(0xd4)])['forEach'](_0x30e281=>{const _0x4128d5=_0x463748;this[_0x4128d5(0xeb)][_0x4128d5(0x98)](_0x30e281);}),_0x23cddc;}[_0x1d05bf(0xa1)](_0x2d238f){const _0x545ded=_0x1d05bf;return{'id':_0x2d238f['id'],'threadId':_0x2d238f['threadId'],'ref':_0x2d238f[_0x545ded(0xe4)]};}};S=Q([b(0x0,_0x3b9053(_0x5340ca)),b(0x1,_0x3b9053(_0xb203b6)),b(0x2,_0x3b9053(_0x5c2147))],S);var re=Object[_0x1d05bf(0xd9)],te=(_0x19ae1f,_0x54ecdb,_0x418547,_0x1af9d3)=>{const _0x58e1ae=_0x1d05bf;for(var _0x49187f=_0x1af9d3>0x1?void 0x0:_0x1af9d3?re(_0x54ecdb,_0x418547):_0x54ecdb,_0x23662e=_0x19ae1f[_0x58e1ae(0x8f)]-0x1,_0x2d8c94;_0x23662e>=0x0;_0x23662e--)(_0x2d8c94=_0x19ae1f[_0x23662e])&&(_0x49187f=_0x2d8c94(_0x49187f)||_0x49187f);return _0x49187f;},M=(_0x20867b,_0x453886)=>(_0x13aeff,_0xaedf7c)=>_0x453886(_0x13aeff,_0xaedf7c,_0x20867b);let f=class extends _0x32b8e3{constructor(_0x467a1c,_0x4f55b3){const _0x294d00=_0x1d05bf;super(),this[_0x294d00(0x94)]=_0x467a1c,this[_0x294d00(0xac)]=_0x4f55b3,this['_initDataSource']();}[_0x1d05bf(0x95)](){const _0x258a41=_0x1d05bf;this[_0x258a41(0x94)][_0x258a41(0xdb)]=this[_0x258a41(0xac)],this[_0x258a41(0x94)][_0x258a41(0xaf)]=!0x1;}};function _0x1614(_0x560cc3,_0x36bcbe){const _0x306061=_0x3060();return _0x1614=function(_0x1614e5,_0x213d5c){_0x1614e5=_0x1614e5-0x85;let _0x3a4b59=_0x306061[_0x1614e5];return _0x3a4b59;},_0x1614(_0x560cc3,_0x36bcbe);}f=te([M(0x0,_0x475030),M(0x1,_0x3b9053(S))],f);var se=Object['defineProperty'],oe=Object[_0x1d05bf(0xd9)],ne=(_0x53ed3f,_0x26f62b,_0x37cbce)=>_0x26f62b in _0x53ed3f?se(_0x53ed3f,_0x26f62b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x37cbce}):_0x53ed3f[_0x26f62b]=_0x37cbce,ie=(_0x4e74a3,_0xcc66af,_0x4497fb,_0x2457b0)=>{const _0x3bb833=_0x1d05bf;for(var _0x5eb94e=_0x2457b0>0x1?void 0x0:_0x2457b0?oe(_0xcc66af,_0x4497fb):_0xcc66af,_0x6c53c=_0x4e74a3[_0x3bb833(0x8f)]-0x1,_0x57ad1b;_0x6c53c>=0x0;_0x6c53c--)(_0x57ad1b=_0x4e74a3[_0x6c53c])&&(_0x5eb94e=_0x57ad1b(_0x5eb94e)||_0x5eb94e);return _0x5eb94e;},N=(_0x274db6,_0xe865a)=>(_0x3c7f22,_0x2162d7)=>_0xe865a(_0x3c7f22,_0x2162d7,_0x274db6),$=(_0x5dfb6a,_0x5357ae,_0xda1b01)=>ne(_0x5dfb6a,typeof _0x5357ae!=_0x1d05bf(0xdd)?_0x5357ae+'':_0x5357ae,_0xda1b01);let g=class extends _0x761510{constructor(_0x4cbcbc=O,_0x258eb8,_0x30a2ba){const _0x1eb225=_0x1d05bf;super(),this[_0x1eb225(0xd1)]=_0x4cbcbc,this[_0x1eb225(0xc5)]=_0x258eb8,this[_0x1eb225(0xb6)]=_0x30a2ba;const {..._0x63e336}=_0x543ebe({},O,this[_0x1eb225(0xd1)]);this[_0x1eb225(0xb6)][_0x1eb225(0x96)](z,_0x63e336);}[_0x1d05bf(0xbf)](){const _0x506780=_0x1d05bf;[[S],[f],[_]][_0x506780(0x9f)](_0x5f452e=>{const _0x1efee8=_0x506780;this[_0x1efee8(0xc5)][_0x1efee8(0xe8)](_0x5f452e);});}[_0x1d05bf(0xd5)](){const _0x419e4f=_0x1d05bf;this[_0x419e4f(0xc5)][_0x419e4f(0x88)](f),this[_0x419e4f(0xc5)]['get'](_);}};$(g,'pluginName',W),$(g,_0x1d05bf(0x8a),_0x7f2fa9[_0x1d05bf(0x99)]),g=ie([_0x339bdc(_0x272b59,_0x2f4ea6,_0x5d88f5),N(0x1,_0x3b9053(_0x4549a3)),N(0x2,_0x50a798)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x2767(){const _0x331b22=['_commentService','bufferTime','UniverCore','amd','user','users','updateComment','filter','12AfwRFl','26485WNeNCs','@univerjs/network','/list','_sessionService','getUnit','Delete','format','get','148bELcKK','UniverThreadCommentDataSourcePlugin','Injector','root','userID','UniverThreadCommentUIPlugin','createTimestamp','rxjs','find','pipe','HTTPService','body','UniverProThreadCommentDatasource','defineProperty','_threadCommentDataSourceService','customRanges','UniverThreadComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','replyId','payload','comments','/edit','_configService','reply','1918847EnJDYa','15955093EgRpEq','Disposable','/add','_initUserSync','Module','COMMENT','getOwnPropertyDescriptor','rangeType','UniverProLicense','addUser','/solved','@univerjs/thread-comment-ui','replies','resolveComment','_injector','type','deleteComment','stringify','Unknown','code','Inject','CollaborationSessionService','8DOHyec','comment','userId','commentUpdate$','_threadCommentModel','post','Edit','unitId','exports','onStarting','CommentService','4948850DTMprs','map','error','UNRECOGNIZED','UniverCollaborationClientPlugin','IThreadCommentDataSourceService','resolved','YYYY/MM/DD\x20HH:mm','/universer-api/comment/unit/','syncUpdateMutationToColla','@univerjs-pro/license','disposeWithMe','Plugin','length','parse','dataSource','Add','333veUwTC','UniverLicensePlugin','_threadCommentDataSource','rangeId','content','_init','add','merge','4788369OVQpIy','@univerjs/core','_config','solved','threadId','size','getMemberID','listComments','dayjs','CustomRangeType','forEach','DependentOn','2450onZrNI','@univerjs/thread-comment','getUser','function','ThreadCommentModel','saveCommentToSnapshot','requireSession','/delete','OpenOrReOpen','_httpService','getCurrentUser','ref','delete','_userService','UniverProCollaborationClient','1314891wUmllD','@univerjs-pro/collaboration-client','IConfigService','Solved','UserManagerService','object','subscribe','addComment','getComment'];_0x2767=function(){return _0x331b22;};return _0x2767();}function _0x72ca(_0x3d2d20,_0x185fe0){const _0x276719=_0x2767();return _0x72ca=function(_0x72ca22,_0x101aa1){_0x72ca22=_0x72ca22-0x1e5;let _0x3d2738=_0x276719[_0x72ca22];return _0x3d2738;},_0x72ca(_0x3d2d20,_0x185fe0);}(function(_0x185e75,_0x300caf){const _0x1eab25=_0x72ca,_0xb0049f=_0x185e75();while(!![]){try{const _0x157ad0=-parseInt(_0x1eab25(0x243))/0x1*(parseInt(_0x1eab25(0x257))/0x2)+parseInt(_0x1eab25(0x266))/0x3+parseInt(_0x1eab25(0x1f8))/0x4*(parseInt(_0x1eab25(0x1f0))/0x5)+-parseInt(_0x1eab25(0x1ef))/0x6*(-parseInt(_0x1eab25(0x210))/0x7)+-parseInt(_0x1eab25(0x227))/0x8*(-parseInt(_0x1eab25(0x24b))/0x9)+parseInt(_0x1eab25(0x232))/0xa+-parseInt(_0x1eab25(0x211))/0xb;if(_0x157ad0===_0x300caf)break;else _0xb0049f['push'](_0xb0049f['shift']());}catch(_0x2884bc){_0xb0049f['push'](_0xb0049f['shift']());}}}(_0x2767,0x55b5a),function(_0x47d833,_0x3579a4){const _0x4b990e=_0x72ca;typeof exports==_0x4b990e(0x26b)&&typeof module<'u'?_0x3579a4(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x4b990e(0x25a)&&define[_0x4b990e(0x1ea)]?define([_0x4b990e(0x22f),_0x4b990e(0x267),_0x4b990e(0x23c),_0x4b990e(0x24c),_0x4b990e(0x21c),_0x4b990e(0x258),'rxjs',_0x4b990e(0x1f1)],_0x3579a4):(_0x47d833=typeof globalThis<'u'?globalThis:_0x47d833||self,_0x3579a4(_0x47d833[_0x4b990e(0x204)]={},_0x47d833[_0x4b990e(0x265)],_0x47d833[_0x4b990e(0x219)],_0x47d833[_0x4b990e(0x1e9)],_0x47d833['UniverThreadCommentUi'],_0x47d833[_0x4b990e(0x208)],_0x47d833[_0x4b990e(0x1ff)],_0x47d833['UniverNetwork']));}(this,function(_0x542128,_0x11ff7d,_0x4e769e,_0x3be0b2,_0x57a4fa,_0x3662a9,_0x6d7e6b,_0x2266af){'use strict';const _0x5cb4cf=_0x72ca;const _0x1aec9b=_0x5cb4cf(0x209);var _0x38b960=(_0x40eb11=>(_0x40eb11[_0x40eb11[_0x5cb4cf(0x25f)]=0x0]=_0x5cb4cf(0x25f),_0x40eb11[_0x40eb11[_0x5cb4cf(0x269)]=0x1]=_0x5cb4cf(0x269),_0x40eb11[_0x40eb11[_0x5cb4cf(0x235)]=-0x1]=_0x5cb4cf(0x235),_0x40eb11))(_0x38b960||{}),_0x6a09e5=(_0x15b096=>(_0x15b096[_0x15b096[_0x5cb4cf(0x223)]=0x0]='Unknown',_0x15b096[_0x15b096[_0x5cb4cf(0x242)]=0x1]=_0x5cb4cf(0x242),_0x15b096[_0x15b096['Reply']=0x2]='Reply',_0x15b096[_0x15b096[_0x5cb4cf(0x22d)]=0x3]=_0x5cb4cf(0x22d),_0x15b096[_0x15b096[_0x5cb4cf(0x1f5)]=0x4]=_0x5cb4cf(0x1f5),_0x15b096[_0x15b096['Solve']=0x5]='Solve',_0x15b096[_0x15b096[_0x5cb4cf(0x235)]=-0x1]=_0x5cb4cf(0x235),_0x15b096))(_0x6a09e5||{});const _0x1e8e1e=_0x46d9db=>_0x3be0b2[_0x5cb4cf(0x253)](new Date(+_0x46d9db))[_0x5cb4cf(0x1f6)](_0x5cb4cf(0x239)),_0xdad704=async(_0x425bd0,_0x44fe55)=>{const _0x3b5dba=_0x5cb4cf,_0x399801=_0x425bd0[_0x3b5dba(0x1f7)](_0x3be0b2[_0x3b5dba(0x26a)]),_0x5065dd=_0x425bd0[_0x3b5dba(0x1f7)](_0x2266af[_0x3b5dba(0x202)]);_0x44fe55['forEach'](_0x48a28d=>{const _0xdbbde6=_0x3b5dba;_0x399801[_0xdbbde6(0x259)](_0x48a28d)&&_0x44fe55[_0xdbbde6(0x263)](_0x48a28d);}),_0x44fe55[_0x3b5dba(0x250)]&&(await _0x5065dd[_0x3b5dba(0x1f7)]('/universer-api/user/list',{'params':{'userIDs':[..._0x44fe55]}}))['body'][_0x3b5dba(0x1ec)][_0x3b5dba(0x255)](_0x11af92=>{const _0x2fdbd7=_0x3b5dba;_0x11af92&&_0x399801[_0x2fdbd7(0x21a)](_0x11af92);});};var _0x338547=Object[_0x5cb4cf(0x217)],_0x5124eb=(_0x3950e6,_0x455fdd,_0x32e65d,_0x2f3407)=>{const _0x472906=_0x5cb4cf;for(var _0x9d9359=_0x2f3407>0x1?void 0x0:_0x2f3407?_0x338547(_0x455fdd,_0x32e65d):_0x455fdd,_0x3c4c2d=_0x3950e6[_0x472906(0x23f)]-0x1,_0x1a1860;_0x3c4c2d>=0x0;_0x3c4c2d--)(_0x1a1860=_0x3950e6[_0x3c4c2d])&&(_0x9d9359=_0x1a1860(_0x9d9359)||_0x9d9359);return _0x9d9359;},_0x65afd1=(_0x169412,_0x3ad55f)=>(_0x38c08d,_0x3bc807)=>_0x3ad55f(_0x38c08d,_0x3bc807,_0x169412);let _0x31466a=class extends _0x3be0b2['Disposable']{constructor(_0xdd646e,_0x5bd79d,_0x560f57,_0x5ced12){const _0x34384f=_0x5cb4cf;super(),this[_0x34384f(0x1e7)]=_0xdd646e,this[_0x34384f(0x22b)]=_0x5bd79d,this['_userService']=_0x560f57,this[_0x34384f(0x21f)]=_0x5ced12,this['_init'](),this[_0x34384f(0x214)]();}['_initUserSync'](){const _0x5a871b=_0x5cb4cf;this[_0x5a871b(0x23d)](this[_0x5a871b(0x22b)][_0x5a871b(0x22a)][_0x5a871b(0x201)](_0x6d7e6b[_0x5a871b(0x1e8)](0x10))['subscribe'](_0x4855d0=>{const _0x2091bd=new Set();_0x4855d0['forEach'](_0xb0d6c6=>{const _0x3eb4a7=_0x72ca;switch(_0xb0d6c6[_0x3eb4a7(0x220)]){case _0x3eb4a7(0x249):{const _0xaf36eb=_0xb0d6c6[_0x3eb4a7(0x20b)]['personId'];_0x2091bd[_0x3eb4a7(0x249)](_0xaf36eb);break;}}}),_0xdad704(this['_injector'],_0x2091bd);}));}[_0x5cb4cf(0x248)](){const _0x453d97=_0x5cb4cf;this[_0x453d97(0x23d)](this[_0x453d97(0x1e7)][_0x453d97(0x22a)][_0x453d97(0x26c)](async _0x3e84b2=>{const _0x3a551d=_0x453d97;var _0x406a91,_0x4bb339,_0x3d5134,_0x29bf27;const _0x219208=(_0x406a91=this[_0x3a551d(0x22b)][_0x3a551d(0x1f4)](_0x3e84b2[_0x3a551d(0x22e)])[_0x3a551d(0x200)](_0x45d668=>_0x45d668['threadId']===_0x3e84b2[_0x3a551d(0x24f)]))==null?void 0x0:_0x406a91[_0x3a551d(0x1fb)];if(!_0x219208)return;const {unitId:_0x485e78,subUnitId:_0xd3ba3}=_0x219208;switch(_0x3e84b2['user']&&this[_0x3a551d(0x264)][_0x3a551d(0x21a)](_0x3e84b2[_0x3a551d(0x1eb)]),_0x3e84b2['type']){case _0x6a09e5[_0x3a551d(0x242)]:break;case _0x6a09e5['Reply']:{this[_0x3a551d(0x22b)][_0x3a551d(0x1e5)](_0x485e78,_0xd3ba3,{'unitId':_0x485e78,'subUnitId':_0xd3ba3,'ref':'','id':_0x3e84b2[_0x3a551d(0x20a)],'dT':_0x1e8e1e(+_0x3e84b2[_0x3a551d(0x1fe)]),'threadId':_0x3e84b2['threadId'],'personId':(_0x3d5134=(_0x4bb339=_0x3e84b2[_0x3a551d(0x1eb)])==null?void 0x0:_0x4bb339[_0x3a551d(0x1fc)])!=null?_0x3d5134:_0x3e84b2[_0x3a551d(0x229)],'text':JSON[_0x3a551d(0x240)](_0x3e84b2['content']),'parentId':_0x219208['id']});break;}case _0x6a09e5[_0x3a551d(0x1f5)]:{const _0x364c06=this[_0x3a551d(0x22b)][_0x3a551d(0x1e6)](_0x485e78,_0xd3ba3,_0x3e84b2['replyId']);_0x364c06&&_0x364c06['parentId']&&this[_0x3a551d(0x22b)][_0x3a551d(0x221)](_0x485e78,_0xd3ba3,_0x3e84b2[_0x3a551d(0x20a)]);break;}case _0x6a09e5[_0x3a551d(0x22d)]:{this[_0x3a551d(0x22b)][_0x3a551d(0x1ed)](_0x485e78,_0xd3ba3,{'commentId':_0x3e84b2[_0x3a551d(0x20a)],'text':JSON[_0x3a551d(0x240)](_0x3e84b2[_0x3a551d(0x247)])});break;}case _0x6a09e5['Solve']:{const _0x1c5449=(_0x29bf27=this['_threadCommentModel'][_0x3a551d(0x1f4)](_0x3e84b2[_0x3a551d(0x22e)])[_0x3a551d(0x200)](_0x592ed2=>_0x592ed2[_0x3a551d(0x24f)]===_0x3e84b2[_0x3a551d(0x24f)]))==null?void 0x0:_0x29bf27['root'];_0x1c5449&&this[_0x3a551d(0x22b)][_0x3a551d(0x21e)](_0x485e78,_0xd3ba3,_0x1c5449['id'],_0x3e84b2[_0x3a551d(0x24e)]===_0x38b960[_0x3a551d(0x269)]);break;}}}));}};_0x31466a=_0x5124eb([_0x65afd1(0x0,_0x3be0b2[_0x5cb4cf(0x225)](_0x11ff7d[_0x5cb4cf(0x231)])),_0x65afd1(0x1,_0x3be0b2[_0x5cb4cf(0x225)](_0x3662a9[_0x5cb4cf(0x25b)])),_0x65afd1(0x2,_0x3be0b2[_0x5cb4cf(0x225)](_0x3be0b2['UserManagerService'])),_0x65afd1(0x3,_0x3be0b2[_0x5cb4cf(0x225)](_0x3be0b2[_0x5cb4cf(0x1fa)]))],_0x31466a);const _0x14ce47='thread-comment-data-source.config',_0x1b934c={};var _0x7b7e2c=Object['getOwnPropertyDescriptor'],_0x577fc4=(_0xddbfb6,_0x48f68e,_0x3187c9,_0x4b20e3)=>{const _0x5b338b=_0x5cb4cf;for(var _0x2002b4=_0x4b20e3>0x1?void 0x0:_0x4b20e3?_0x7b7e2c(_0x48f68e,_0x3187c9):_0x48f68e,_0x964122=_0xddbfb6[_0x5b338b(0x23f)]-0x1,_0x18c180;_0x964122>=0x0;_0x964122--)(_0x18c180=_0xddbfb6[_0x964122])&&(_0x2002b4=_0x18c180(_0x2002b4)||_0x2002b4);return _0x2002b4;},_0x303178=(_0x10af89,_0x414c37)=>(_0x4c30dd,_0x38ce67)=>_0x414c37(_0x4c30dd,_0x38ce67,_0x10af89);function _0x2588e9(_0x528214,_0x3973d6){const _0x489633=_0x5cb4cf,_0x2a8921=_0x528214['replies'][0x0];return{..._0x3973d6,'id':_0x2a8921[_0x489633(0x20a)],'resolved':_0x528214[_0x489633(0x24e)]===0x1,'dT':_0x1e8e1e(_0x2a8921[_0x489633(0x1fe)]),'personId':_0x2a8921[_0x489633(0x229)],'threadId':_0x2a8921[_0x489633(0x24f)]};}function _0x5e6034(_0x4694cf,_0x36b647,_0x538bd0){const _0x1e4692=_0x5cb4cf;var _0x4eb90f,_0x4c8b2f;if(((_0x4c8b2f=(_0x4eb90f=_0x4694cf==null?void 0x0:_0x4694cf[_0x1e4692(0x21d)])==null?void 0x0:_0x4eb90f['length'])!=null?_0x4c8b2f:0x0)>0x0){const _0x2697ca=(_0x1a1d9c,_0x34c1f5)=>({'id':_0x1a1d9c['replyId'],'threadId':_0x1a1d9c[_0x1e4692(0x24f)],'dT':_0x1e8e1e(_0x1a1d9c['createTimestamp']),'personId':_0x1a1d9c['userId'],'resolved':_0x4694cf[_0x1e4692(0x24e)]===_0x38b960['Solved'],'unitId':_0x36b647,'subUnitId':_0x538bd0,'text':JSON['parse'](_0x1a1d9c['content']),'parentId':_0x34c1f5}),_0x33e2bd=_0x2697ca(_0x4694cf[_0x1e4692(0x21d)][0x0]);return{..._0x33e2bd,'children':_0x4694cf['replies']['slice'](0x1)[_0x1e4692(0x233)](_0x1e47de=>_0x2697ca(_0x1e47de,_0x33e2bd['id']))};}return null;}let _0x1ce46e=class{constructor(_0x519f50,_0x30b406,_0x118430){const _0x256502=_0x5cb4cf;this[_0x256502(0x260)]=_0x519f50,this[_0x256502(0x264)]=_0x30b406,this[_0x256502(0x1f3)]=_0x118430;}async[_0x5cb4cf(0x1e5)](_0xddc751){const _0x54973b=_0x5cb4cf;var _0x44a831,_0x307cd4;const {parentId:_0x497d71,unitId:_0x126bfc,text:_0x14b9e1,threadId:_0x276750}=_0xddc751,_0x5a8408=(_0x307cd4=(_0x44a831=_0x14b9e1[_0x54973b(0x207)])==null?void 0x0:_0x44a831['filter'](_0xe3647f=>_0xe3647f[_0x54973b(0x218)]===_0x3be0b2[_0x54973b(0x254)][_0x54973b(0x216)])['map'](_0x6cc6eb=>_0x6cc6eb[_0x54973b(0x246)]))!=null?_0x307cd4:[],_0x585aab=JSON[_0x54973b(0x222)](_0x14b9e1),_0x4a873f=(await this['_sessionService'][_0x54973b(0x25d)](_0x126bfc))[_0x54973b(0x251)]();if(_0x497d71){const _0x3a1314={'memberId':_0x4a873f,'unitId':_0x126bfc,'content':_0x585aab,'mention':_0x5a8408,'threadId':_0x276750},_0x32ca5a=(await this[_0x54973b(0x260)][_0x54973b(0x22c)](_0x54973b(0x23a)+_0x126bfc+'/reply',{'body':_0x3a1314}))[_0x54973b(0x203)][_0x54973b(0x20f)];return{..._0xddc751,'id':_0x32ca5a[_0x54973b(0x20a)],'dT':_0x3be0b2[_0x54973b(0x253)](+_0x32ca5a['createTimestamp'])[_0x54973b(0x1f6)](_0x54973b(0x239)),'personId':_0x32ca5a[_0x54973b(0x229)]};}else{const _0x4ce111={'memberId':_0x4a873f,'unitId':_0x126bfc,'content':_0x585aab,'mention':_0x5a8408},_0x211eb5=await this[_0x54973b(0x260)][_0x54973b(0x22c)](_0x54973b(0x23a)+_0x126bfc+_0x54973b(0x213),{'body':_0x4ce111});return _0x2588e9(_0x211eb5[_0x54973b(0x203)][_0x54973b(0x228)],_0xddc751);}}async['updateComment'](_0xe192e8){const _0x5a85d5=_0x5cb4cf;var _0x12bab0,_0x2ef986;const {text:_0x36b87f,unitId:_0x5a84db}=_0xe192e8,_0x42d546=(_0x2ef986=(_0x12bab0=_0x36b87f[_0x5a85d5(0x207)])==null?void 0x0:_0x12bab0['filter'](_0x19fee4=>_0x19fee4[_0x5a85d5(0x218)]===_0x3be0b2[_0x5a85d5(0x254)]['COMMENT'])[_0x5a85d5(0x233)](_0x115971=>_0x115971['rangeId']))!=null?_0x2ef986:[],_0x5f15c0=JSON[_0x5a85d5(0x222)](_0x36b87f),_0x3c2d41=_0xe192e8[_0x5a85d5(0x24f)],_0x584339=_0xe192e8['id'],_0x70b3a5={'memberId':(await this[_0x5a85d5(0x1f3)][_0x5a85d5(0x25d)](_0x5a84db))['getMemberID'](),'unitId':_0x5a84db,'threadId':_0x3c2d41,'mention':_0x42d546,'content':_0x5f15c0,'replyId':_0x584339},_0x54fe61=await this[_0x5a85d5(0x260)][_0x5a85d5(0x22c)]('/universer-api/comment/unit/'+_0x5a84db+_0x5a85d5(0x20d),{'body':_0x70b3a5});return!_0x54fe61[_0x5a85d5(0x203)][_0x5a85d5(0x234)]||_0x54fe61[_0x5a85d5(0x203)][_0x5a85d5(0x234)]['code']===0x1;}async[_0x5cb4cf(0x21e)](_0x587ce5){const _0x1ebebb=_0x5cb4cf,{unitId:_0x31ddf5}=_0x587ce5,_0x19cd2b=_0x587ce5[_0x1ebebb(0x24f)],_0x22009a={'memberId':this[_0x1ebebb(0x264)][_0x1ebebb(0x261)]()[_0x1ebebb(0x1fc)],'unitId':_0x31ddf5,'threadId':_0x19cd2b,'solved':_0x587ce5[_0x1ebebb(0x238)]?_0x38b960[_0x1ebebb(0x269)]:_0x38b960[_0x1ebebb(0x25f)]},_0x4141c2=await this[_0x1ebebb(0x260)]['post'](_0x1ebebb(0x23a)+_0x31ddf5+_0x1ebebb(0x21b),{'body':_0x22009a});return!_0x4141c2['body'][_0x1ebebb(0x234)]||_0x4141c2[_0x1ebebb(0x203)][_0x1ebebb(0x234)][_0x1ebebb(0x224)]===0x1;}async[_0x5cb4cf(0x221)](_0x4dde4c,_0x5c6f37,_0x5f30f9,_0x5839e1){const _0x1cc21a=_0x5cb4cf,_0x40d3d={'memberId':(await this[_0x1cc21a(0x1f3)][_0x1cc21a(0x25d)](_0x4dde4c))[_0x1cc21a(0x251)](),'threadId':_0x5f30f9,'replyId':_0x5839e1,'unitId':_0x4dde4c},_0x457a53=await this['_httpService'][_0x1cc21a(0x22c)](_0x1cc21a(0x23a)+_0x4dde4c+_0x1cc21a(0x25e),{'body':_0x40d3d});return!_0x457a53['body']['error']||_0x457a53['body'][_0x1cc21a(0x234)][_0x1cc21a(0x224)]===0x1;}async[_0x5cb4cf(0x252)](_0x5d2c53,_0x3b0178,_0x27fce8){const _0xef559d=_0x5cb4cf,_0x28f8a7={'unitId':_0x5d2c53,'threadId':_0x27fce8},_0x791986=await this['_httpService'][_0xef559d(0x22c)](_0xef559d(0x23a)+_0x5d2c53+_0xef559d(0x1f2),{'body':_0x28f8a7}),_0x2cc70a=_0x27fce8[_0xef559d(0x233)](_0xbbb383=>_0x5e6034(_0x791986[_0xef559d(0x203)][_0xef559d(0x20c)][_0xbbb383],_0x5d2c53,_0x3b0178))[_0xef559d(0x1ee)](Boolean);return Object['values'](_0x791986['body'][_0xef559d(0x1ec)])[_0xef559d(0x255)](_0x631be5=>{const _0x426230=_0xef559d;this[_0x426230(0x264)]['addUser'](_0x631be5);}),_0x2cc70a;}[_0x5cb4cf(0x25c)](_0xf91394){const _0x18dee3=_0x5cb4cf;return{'id':_0xf91394['id'],'threadId':_0xf91394[_0x18dee3(0x24f)],'ref':_0xf91394[_0x18dee3(0x262)]};}};_0x1ce46e=_0x577fc4([_0x303178(0x0,_0x3be0b2['Inject'](_0x2266af[_0x5cb4cf(0x202)])),_0x303178(0x1,_0x3be0b2[_0x5cb4cf(0x225)](_0x3be0b2[_0x5cb4cf(0x26a)])),_0x303178(0x2,_0x3be0b2[_0x5cb4cf(0x225)](_0x11ff7d[_0x5cb4cf(0x226)]))],_0x1ce46e);var _0x3cef0e=Object[_0x5cb4cf(0x217)],_0x67db37=(_0x1ee67a,_0x3e1224,_0x238bb5,_0x295300)=>{const _0x129f84=_0x5cb4cf;for(var _0x12fc82=_0x295300>0x1?void 0x0:_0x295300?_0x3cef0e(_0x3e1224,_0x238bb5):_0x3e1224,_0x3a48a2=_0x1ee67a[_0x129f84(0x23f)]-0x1,_0x11a808;_0x3a48a2>=0x0;_0x3a48a2--)(_0x11a808=_0x1ee67a[_0x3a48a2])&&(_0x12fc82=_0x11a808(_0x12fc82)||_0x12fc82);return _0x12fc82;},_0x963a30=(_0x3a0910,_0xc51b8f)=>(_0x1bbb7f,_0x1ab3c6)=>_0xc51b8f(_0x1bbb7f,_0x1ab3c6,_0x3a0910);let _0x4a9f6b=class extends _0x3be0b2[_0x5cb4cf(0x212)]{constructor(_0x28072d,_0x150d3e){const _0x419323=_0x5cb4cf;super(),this[_0x419323(0x206)]=_0x28072d,this['_threadCommentDataSource']=_0x150d3e,this['_initDataSource']();}['_initDataSource'](){const _0x54272b=_0x5cb4cf;this['_threadCommentDataSourceService'][_0x54272b(0x241)]=this[_0x54272b(0x245)],this[_0x54272b(0x206)][_0x54272b(0x23b)]=!0x1;}};_0x4a9f6b=_0x67db37([_0x963a30(0x0,_0x3662a9[_0x5cb4cf(0x237)]),_0x963a30(0x1,_0x3be0b2[_0x5cb4cf(0x225)](_0x1ce46e))],_0x4a9f6b);var _0x1be782=Object[_0x5cb4cf(0x205)],_0x53ad6e=Object['getOwnPropertyDescriptor'],_0x876af9=(_0x258796,_0xf6cb0c,_0x350906)=>_0xf6cb0c in _0x258796?_0x1be782(_0x258796,_0xf6cb0c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x350906}):_0x258796[_0xf6cb0c]=_0x350906,_0x4304b9=(_0x45a92e,_0x1a107e,_0xba9443,_0x1c863c)=>{for(var _0x29a4a5=_0x1c863c>0x1?void 0x0:_0x1c863c?_0x53ad6e(_0x1a107e,_0xba9443):_0x1a107e,_0x1ac6fa=_0x45a92e['length']-0x1,_0x3cb529;_0x1ac6fa>=0x0;_0x1ac6fa--)(_0x3cb529=_0x45a92e[_0x1ac6fa])&&(_0x29a4a5=_0x3cb529(_0x29a4a5)||_0x29a4a5);return _0x29a4a5;},_0x18619d=(_0x172a95,_0x573c12)=>(_0x255bca,_0x4a79cf)=>_0x573c12(_0x255bca,_0x4a79cf,_0x172a95),_0x37248b=(_0x598bcd,_0x3d4de5,_0x4e9c68)=>_0x876af9(_0x598bcd,typeof _0x3d4de5!='symbol'?_0x3d4de5+'':_0x3d4de5,_0x4e9c68);_0x542128[_0x5cb4cf(0x1f9)]=class extends _0x3be0b2[_0x5cb4cf(0x23e)]{constructor(_0x1fbdb7=_0x1b934c,_0x344813,_0x35b20e){const _0x386100=_0x5cb4cf;super(),this[_0x386100(0x24d)]=_0x1fbdb7,this[_0x386100(0x21f)]=_0x344813,this['_configService']=_0x35b20e;const {..._0x30d377}=_0x3be0b2[_0x386100(0x24a)]({},_0x1b934c,this[_0x386100(0x24d)]);this[_0x386100(0x20e)]['setConfig'](_0x14ce47,_0x30d377);}[_0x5cb4cf(0x230)](){const _0x230bf8=_0x5cb4cf;[[_0x1ce46e],[_0x4a9f6b],[_0x31466a]][_0x230bf8(0x255)](_0x554b4a=>{const _0x12ee52=_0x230bf8;this[_0x12ee52(0x21f)][_0x12ee52(0x249)](_0x554b4a);});}['onReady'](){const _0x5af577=_0x5cb4cf;this[_0x5af577(0x21f)][_0x5af577(0x1f7)](_0x4a9f6b),this[_0x5af577(0x21f)][_0x5af577(0x1f7)](_0x31466a);}},_0x37248b(_0x542128[_0x5cb4cf(0x1f9)],'pluginName',_0x1aec9b),_0x37248b(_0x542128['UniverThreadCommentDataSourcePlugin'],_0x5cb4cf(0x220),_0x3be0b2['UniverInstanceType']['UNIVER_UNKNOWN']),_0x542128['UniverThreadCommentDataSourcePlugin']=_0x4304b9([_0x3be0b2[_0x5cb4cf(0x256)](_0x57a4fa[_0x5cb4cf(0x1fd)],_0x11ff7d[_0x5cb4cf(0x236)],_0x4e769e[_0x5cb4cf(0x244)]),_0x18619d(0x1,_0x3be0b2[_0x5cb4cf(0x225)](_0x3be0b2['Injector'])),_0x18619d(0x2,_0x3be0b2[_0x5cb4cf(0x268)])],_0x542128['UniverThreadCommentDataSourcePlugin']),Object[_0x5cb4cf(0x205)](_0x542128,Symbol['toStringTag'],{'value':_0x5cb4cf(0x215)});}));
|
|
1
|
+
(function(_0x221015,_0x274dc2){const _0x2a0dc0=_0x39d9,_0x4e0a51=_0x221015();while(!![]){try{const _0x36d4ec=-parseInt(_0x2a0dc0(0x117))/0x1*(-parseInt(_0x2a0dc0(0x112))/0x2)+-parseInt(_0x2a0dc0(0xa4))/0x3+parseInt(_0x2a0dc0(0x113))/0x4+-parseInt(_0x2a0dc0(0x94))/0x5+-parseInt(_0x2a0dc0(0x115))/0x6*(-parseInt(_0x2a0dc0(0xcf))/0x7)+parseInt(_0x2a0dc0(0xea))/0x8+-parseInt(_0x2a0dc0(0xf9))/0x9;if(_0x36d4ec===_0x274dc2)break;else _0x4e0a51['push'](_0x4e0a51['shift']());}catch(_0xa1c719){_0x4e0a51['push'](_0x4e0a51['shift']());}}}(_0x33b0,0xdf1b3),function(_0x1e41ce,_0x356193){const _0xfde7d=_0x39d9;typeof exports==_0xfde7d(0xa8)&&typeof module<'u'?_0x356193(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0xfde7d(0xb7)&&define[_0xfde7d(0xfc)]?define([_0xfde7d(0xf1),_0xfde7d(0x10d),_0xfde7d(0xa9),_0xfde7d(0xfd),_0xfde7d(0xab),_0xfde7d(0x9c),_0xfde7d(0xe5),_0xfde7d(0xee)],_0x356193):(_0x1e41ce=typeof globalThis<'u'?globalThis:_0x1e41ce||self,_0x356193(_0x1e41ce[_0xfde7d(0xc2)]={},_0x1e41ce[_0xfde7d(0x10f)],_0x1e41ce[_0xfde7d(0xcd)],_0x1e41ce[_0xfde7d(0x106)],_0x1e41ce[_0xfde7d(0xa6)],_0x1e41ce[_0xfde7d(0x114)],_0x1e41ce[_0xfde7d(0xe5)],_0x1e41ce['UniverNetwork']));}(this,function(_0x50a725,_0x1800eb,_0x234c9c,_0x385f71,_0x408d76,_0x5ea113,_0x42a611,_0x27fdcc){'use strict';const _0x2f43e9=_0x39d9;const _0x487e4a=_0x2f43e9(0x101);var _0x4670dc=(_0x1e87ac=>(_0x1e87ac[_0x1e87ac[_0x2f43e9(0x107)]=0x0]='OpenOrReOpen',_0x1e87ac[_0x1e87ac[_0x2f43e9(0xe8)]=0x1]='Solved',_0x1e87ac[_0x1e87ac['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x1e87ac))(_0x4670dc||{}),_0x225ca4=(_0x4d34c7=>(_0x4d34c7[_0x4d34c7['Unknown']=0x0]=_0x2f43e9(0xbb),_0x4d34c7[_0x4d34c7[_0x2f43e9(0xa1)]=0x1]=_0x2f43e9(0xa1),_0x4d34c7[_0x4d34c7[_0x2f43e9(0xc4)]=0x2]=_0x2f43e9(0xc4),_0x4d34c7[_0x4d34c7['Edit']=0x3]=_0x2f43e9(0xc8),_0x4d34c7[_0x4d34c7[_0x2f43e9(0xdb)]=0x4]=_0x2f43e9(0xdb),_0x4d34c7[_0x4d34c7[_0x2f43e9(0xa0)]=0x5]='Solve',_0x4d34c7[_0x4d34c7['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x4d34c7))(_0x225ca4||{});const _0x1bfd26=_0x23997b=>_0x385f71[_0x2f43e9(0xe4)](new Date(+_0x23997b))[_0x2f43e9(0xbf)](_0x2f43e9(0xac)),_0x454b7b=async(_0x3b6732,_0x7af99e)=>{const _0x2d5e9a=_0x2f43e9,_0x428c27=_0x3b6732[_0x2d5e9a(0xe2)](_0x385f71[_0x2d5e9a(0x98)]),_0x4dc65d=_0x3b6732[_0x2d5e9a(0xe2)](_0x27fdcc['HTTPService']);_0x7af99e[_0x2d5e9a(0xc1)](_0x355706=>{const _0x441c83=_0x2d5e9a;_0x428c27['getUser'](_0x355706)&&_0x7af99e[_0x441c83(0xd0)](_0x355706);}),_0x7af99e['size']&&(await _0x4dc65d['get'](_0x2d5e9a(0xb8),{'params':{'userIDs':[..._0x7af99e]}}))[_0x2d5e9a(0xb0)]['users'][_0x2d5e9a(0xc1)](_0x359fef=>{_0x359fef&&_0x428c27['addUser'](_0x359fef);});};var _0x27ad4a=Object[_0x2f43e9(0xdc)],_0x54597d=(_0x3e5ff2,_0x140ebf,_0xa4db3,_0x370ece)=>{const _0x378323=_0x2f43e9;for(var _0xc09479=_0x370ece>0x1?void 0x0:_0x370ece?_0x27ad4a(_0x140ebf,_0xa4db3):_0x140ebf,_0x2b862b=_0x3e5ff2[_0x378323(0xe6)]-0x1,_0x434e49;_0x2b862b>=0x0;_0x2b862b--)(_0x434e49=_0x3e5ff2[_0x2b862b])&&(_0xc09479=_0x434e49(_0xc09479)||_0xc09479);return _0xc09479;},_0x84d6f=(_0x54d136,_0xb669ed)=>(_0x52866f,_0x2690d3)=>_0xb669ed(_0x52866f,_0x2690d3,_0x54d136);let _0x2917f5=class extends _0x385f71['Disposable']{constructor(_0x48ce46,_0x73a341,_0x259841,_0x58278b){const _0x16889d=_0x2f43e9;super(),this[_0x16889d(0x10a)]=_0x48ce46,this[_0x16889d(0x9b)]=_0x73a341,this[_0x16889d(0xbd)]=_0x259841,this[_0x16889d(0xd2)]=_0x58278b,this['_init'](),this[_0x16889d(0xa2)]();}[_0x2f43e9(0xa2)](){const _0x1c7c17=_0x2f43e9;this[_0x1c7c17(0xd6)](this[_0x1c7c17(0x9b)][_0x1c7c17(0xa3)][_0x1c7c17(0x93)](_0x42a611[_0x1c7c17(0xfa)](0x10))[_0x1c7c17(0xd5)](_0x343491=>{const _0x58a054=_0x1c7c17,_0x269eba=new Set();_0x343491[_0x58a054(0xc1)](_0x201c9b=>{const _0x348b37=_0x58a054;switch(_0x201c9b[_0x348b37(0xbc)]){case _0x348b37(0xdf):{const _0x31c504=_0x201c9b[_0x348b37(0x104)][_0x348b37(0xe0)];_0x269eba[_0x348b37(0xdf)](_0x31c504);break;}}}),_0x454b7b(this['_injector'],_0x269eba);}));}[_0x2f43e9(0xf5)](){const _0x1053c4=_0x2f43e9;this['disposeWithMe'](this['_commentService'][_0x1053c4(0xa3)][_0x1053c4(0xd5)](async _0x492d4b=>{const _0x554c34=_0x1053c4;var _0x8307e7,_0xbe2b7b,_0x39c307,_0x19c1f6;const _0x198f3d=(_0x8307e7=this[_0x554c34(0x9b)][_0x554c34(0xcc)](_0x492d4b[_0x554c34(0x103)])[_0x554c34(0xf8)](_0x518afc=>_0x518afc[_0x554c34(0xa5)]===_0x492d4b[_0x554c34(0xa5)]))==null?void 0x0:_0x8307e7[_0x554c34(0x97)];if(!_0x198f3d)return;const {unitId:_0x56a1bf,subUnitId:_0x2c8f50}=_0x198f3d;switch(_0x492d4b[_0x554c34(0xb2)]&&this[_0x554c34(0xbd)]['addUser'](_0x492d4b[_0x554c34(0xb2)]),_0x492d4b[_0x554c34(0xbc)]){case _0x225ca4['Add']:break;case _0x225ca4['Reply']:{this['_threadCommentModel']['addComment'](_0x56a1bf,_0x2c8f50,{'unitId':_0x56a1bf,'subUnitId':_0x2c8f50,'ref':'','id':_0x492d4b[_0x554c34(0xec)],'dT':_0x1bfd26(+_0x492d4b['createTimestamp']),'threadId':_0x492d4b['threadId'],'personId':(_0x39c307=(_0xbe2b7b=_0x492d4b[_0x554c34(0xb2)])==null?void 0x0:_0xbe2b7b[_0x554c34(0xcb)])!=null?_0x39c307:_0x492d4b[_0x554c34(0xc6)],'text':JSON['parse'](_0x492d4b[_0x554c34(0x119)]),'parentId':_0x198f3d['id']});break;}case _0x225ca4['Delete']:{const _0x3387a1=this['_threadCommentModel'][_0x554c34(0xb1)](_0x56a1bf,_0x2c8f50,_0x492d4b[_0x554c34(0xec)]);_0x3387a1&&_0x3387a1[_0x554c34(0xc9)]&&this[_0x554c34(0x9b)][_0x554c34(0x96)](_0x56a1bf,_0x2c8f50,_0x492d4b[_0x554c34(0xec)]);break;}case _0x225ca4[_0x554c34(0xc8)]:{this[_0x554c34(0x9b)][_0x554c34(0xaa)](_0x56a1bf,_0x2c8f50,{'commentId':_0x492d4b[_0x554c34(0xec)],'text':JSON[_0x554c34(0x10c)](_0x492d4b['content'])});break;}case _0x225ca4[_0x554c34(0xa0)]:{const _0xd35ea0=(_0x19c1f6=this[_0x554c34(0x9b)][_0x554c34(0xcc)](_0x492d4b[_0x554c34(0x103)])[_0x554c34(0xf8)](_0x5a5389=>_0x5a5389[_0x554c34(0xa5)]===_0x492d4b[_0x554c34(0xa5)]))==null?void 0x0:_0x19c1f6[_0x554c34(0x97)];_0xd35ea0&&this[_0x554c34(0x9b)]['resolveComment'](_0x56a1bf,_0x2c8f50,_0xd35ea0['id'],_0x492d4b[_0x554c34(0xf4)]===_0x4670dc['Solved']);break;}}}));}};_0x2917f5=_0x54597d([_0x84d6f(0x0,_0x385f71[_0x2f43e9(0xeb)](_0x1800eb['CommentService'])),_0x84d6f(0x1,_0x385f71[_0x2f43e9(0xeb)](_0x5ea113[_0x2f43e9(0x100)])),_0x84d6f(0x2,_0x385f71[_0x2f43e9(0xeb)](_0x385f71['UserManagerService'])),_0x84d6f(0x3,_0x385f71[_0x2f43e9(0xeb)](_0x385f71[_0x2f43e9(0xd1)]))],_0x2917f5);const _0x2b72e3=_0x2f43e9(0xba),_0x15c51c={};var _0x5e02fd=Object[_0x2f43e9(0xdc)],_0x36444b=(_0x36935c,_0x5cc7fe,_0x478ce3,_0x48cbed)=>{for(var _0x3cefa1=_0x48cbed>0x1?void 0x0:_0x48cbed?_0x5e02fd(_0x5cc7fe,_0x478ce3):_0x5cc7fe,_0x369300=_0x36935c['length']-0x1,_0x916936;_0x369300>=0x0;_0x369300--)(_0x916936=_0x36935c[_0x369300])&&(_0x3cefa1=_0x916936(_0x3cefa1)||_0x3cefa1);return _0x3cefa1;},_0x4d20f3=(_0x164f51,_0x667ade)=>(_0x5a6688,_0x2ea8eb)=>_0x667ade(_0x5a6688,_0x2ea8eb,_0x164f51);function _0x27eaa5(_0x1cb6b2,_0xad2d87){const _0x18fd34=_0x2f43e9,_0x5e5ca4=_0x1cb6b2['replies'][0x0];return{..._0xad2d87,'id':_0x5e5ca4[_0x18fd34(0xec)],'resolved':_0x1cb6b2[_0x18fd34(0xf4)]===0x1,'dT':_0x1bfd26(_0x5e5ca4[_0x18fd34(0xed)]),'personId':_0x5e5ca4[_0x18fd34(0xc6)],'threadId':_0x5e5ca4[_0x18fd34(0xa5)]};}function _0x3b5816(_0xf387b4,_0xb5d2d,_0x48f463){const _0x38c825=_0x2f43e9;var _0x4a051e,_0x535659;if(((_0x535659=(_0x4a051e=_0xf387b4==null?void 0x0:_0xf387b4[_0x38c825(0x108)])==null?void 0x0:_0x4a051e[_0x38c825(0xe6)])!=null?_0x535659:0x0)>0x0){const _0x295d69=(_0x360558,_0x17ac82)=>({'id':_0x360558[_0x38c825(0xec)],'threadId':_0x360558[_0x38c825(0xa5)],'dT':_0x1bfd26(_0x360558[_0x38c825(0xed)]),'personId':_0x360558['userId'],'resolved':_0xf387b4[_0x38c825(0xf4)]===_0x4670dc[_0x38c825(0xe8)],'unitId':_0xb5d2d,'subUnitId':_0x48f463,'text':JSON[_0x38c825(0x10c)](_0x360558[_0x38c825(0x119)]),'parentId':_0x17ac82}),_0x59cfe7=_0x295d69(_0xf387b4['replies'][0x0]);return{..._0x59cfe7,'children':_0xf387b4[_0x38c825(0x108)][_0x38c825(0x92)](0x1)[_0x38c825(0xce)](_0x1dfbc2=>_0x295d69(_0x1dfbc2,_0x59cfe7['id']))};}return null;}let _0x3398d1=class{constructor(_0x4f1414,_0x9066b8,_0x3f2789){const _0x26910c=_0x2f43e9;this['_httpService']=_0x4f1414,this[_0x26910c(0xbd)]=_0x9066b8,this[_0x26910c(0x9d)]=_0x3f2789;}async['addComment'](_0x1599d2){const _0x2c179e=_0x2f43e9;var _0x322001,_0x327411;const {parentId:_0x151eb7,unitId:_0x40e3c6,text:_0x211764,threadId:_0x29d074}=_0x1599d2,_0x1b25f1=(_0x327411=(_0x322001=_0x211764[_0x2c179e(0xa7)])==null?void 0x0:_0x322001[_0x2c179e(0xae)](_0x2b071c=>_0x2b071c[_0x2c179e(0xff)]===_0x385f71[_0x2c179e(0xb6)]['COMMENT'])['map'](_0x255cb=>_0x255cb[_0x2c179e(0xb4)]))!=null?_0x327411:[],_0x32596d=JSON['stringify'](_0x211764),_0x4c67bc=(await this[_0x2c179e(0x9d)][_0x2c179e(0xc7)](_0x40e3c6))[_0x2c179e(0xf6)]();if(_0x151eb7){const _0x30fff3={'memberId':_0x4c67bc,'unitId':_0x40e3c6,'content':_0x32596d,'mention':_0x1b25f1,'threadId':_0x29d074},_0x31e117=(await this[_0x2c179e(0xda)][_0x2c179e(0xf2)](_0x2c179e(0x109)+_0x40e3c6+_0x2c179e(0xf3),{'body':_0x30fff3}))[_0x2c179e(0xb0)][_0x2c179e(0xbe)];return{..._0x1599d2,'id':_0x31e117[_0x2c179e(0xec)],'dT':_0x385f71[_0x2c179e(0xe4)](+_0x31e117[_0x2c179e(0xed)])[_0x2c179e(0xbf)](_0x2c179e(0xac)),'personId':_0x31e117[_0x2c179e(0xc6)]};}else{const _0x5a4778={'memberId':_0x4c67bc,'unitId':_0x40e3c6,'content':_0x32596d,'mention':_0x1b25f1},_0xae0121=await this[_0x2c179e(0xda)]['post'](_0x2c179e(0x109)+_0x40e3c6+'/add',{'body':_0x5a4778});return _0x27eaa5(_0xae0121[_0x2c179e(0xb0)]['comment'],_0x1599d2);}}async[_0x2f43e9(0xaa)](_0x496248){const _0x4b94c9=_0x2f43e9;var _0x39092f,_0x2fe993;const {text:_0x2902bc,unitId:_0x2e9896}=_0x496248,_0x5c822e=(_0x2fe993=(_0x39092f=_0x2902bc[_0x4b94c9(0xa7)])==null?void 0x0:_0x39092f[_0x4b94c9(0xae)](_0x1e0996=>_0x1e0996[_0x4b94c9(0xff)]===_0x385f71[_0x4b94c9(0xb6)]['COMMENT'])['map'](_0x252301=>_0x252301[_0x4b94c9(0xb4)]))!=null?_0x2fe993:[],_0x49645e=JSON['stringify'](_0x2902bc),_0x2b387c=_0x496248['threadId'],_0x2bd5cb=_0x496248['id'],_0x35f1f8={'memberId':(await this[_0x4b94c9(0x9d)][_0x4b94c9(0xc7)](_0x2e9896))[_0x4b94c9(0xf6)](),'unitId':_0x2e9896,'threadId':_0x2b387c,'mention':_0x5c822e,'content':_0x49645e,'replyId':_0x2bd5cb},_0x5aec7b=await this[_0x4b94c9(0xda)][_0x4b94c9(0xf2)]('/universer-api/comment/unit/'+_0x2e9896+'/edit',{'body':_0x35f1f8});return!_0x5aec7b['body'][_0x4b94c9(0x102)]||_0x5aec7b['body']['error'][_0x4b94c9(0xad)]===0x1;}async[_0x2f43e9(0x9f)](_0xdb741e){const _0x3e66c3=_0x2f43e9,{unitId:_0x2c09ae}=_0xdb741e,_0x5945ac=_0xdb741e[_0x3e66c3(0xa5)],_0x5e5e43={'memberId':this[_0x3e66c3(0xbd)][_0x3e66c3(0x95)]()[_0x3e66c3(0xcb)],'unitId':_0x2c09ae,'threadId':_0x5945ac,'solved':_0xdb741e[_0x3e66c3(0x99)]?_0x4670dc['Solved']:_0x4670dc[_0x3e66c3(0x107)]},_0x6b75bc=await this[_0x3e66c3(0xda)][_0x3e66c3(0xf2)](_0x3e66c3(0x109)+_0x2c09ae+_0x3e66c3(0xb5),{'body':_0x5e5e43});return!_0x6b75bc['body']['error']||_0x6b75bc[_0x3e66c3(0xb0)][_0x3e66c3(0x102)][_0x3e66c3(0xad)]===0x1;}async[_0x2f43e9(0x96)](_0x3d0f0b,_0x588a71,_0x1dfb7c,_0x3aafcc){const _0x53e1d2=_0x2f43e9,_0x3a6420={'memberId':(await this[_0x53e1d2(0x9d)][_0x53e1d2(0xc7)](_0x3d0f0b))['getMemberID'](),'threadId':_0x1dfb7c,'replyId':_0x3aafcc,'unitId':_0x3d0f0b},_0x277167=await this[_0x53e1d2(0xda)][_0x53e1d2(0xf2)]('/universer-api/comment/unit/'+_0x3d0f0b+_0x53e1d2(0x111),{'body':_0x3a6420});return!_0x277167[_0x53e1d2(0xb0)][_0x53e1d2(0x102)]||_0x277167[_0x53e1d2(0xb0)][_0x53e1d2(0x102)]['code']===0x1;}async[_0x2f43e9(0xc5)](_0x3ce481,_0x50d0ca,_0x207dec){const _0x2de14a=_0x2f43e9,_0x16ed75={'unitId':_0x3ce481,'threadId':_0x207dec},_0x5d52f3=await this[_0x2de14a(0xda)]['post'](_0x2de14a(0x109)+_0x3ce481+_0x2de14a(0xd7),{'body':_0x16ed75}),_0x16fac9=_0x207dec['map'](_0x24b9cf=>_0x3b5816(_0x5d52f3[_0x2de14a(0xb0)][_0x2de14a(0x110)][_0x24b9cf],_0x3ce481,_0x50d0ca))['filter'](Boolean);return Object[_0x2de14a(0xd3)](_0x5d52f3[_0x2de14a(0xb0)][_0x2de14a(0xdd)])[_0x2de14a(0xc1)](_0x2e29f0=>{const _0x497282=_0x2de14a;this['_userService'][_0x497282(0xb9)](_0x2e29f0);}),_0x16fac9;}['saveCommentToSnapshot'](_0x5a3545){const _0x4aa04e=_0x2f43e9;return{'id':_0x5a3545['id'],'threadId':_0x5a3545[_0x4aa04e(0xa5)],'ref':_0x5a3545[_0x4aa04e(0xd9)]};}};_0x3398d1=_0x36444b([_0x4d20f3(0x0,_0x385f71['Inject'](_0x27fdcc['HTTPService'])),_0x4d20f3(0x1,_0x385f71[_0x2f43e9(0xeb)](_0x385f71[_0x2f43e9(0x98)])),_0x4d20f3(0x2,_0x385f71[_0x2f43e9(0xeb)](_0x1800eb[_0x2f43e9(0x10e)]))],_0x3398d1);var _0x9c63b2=Object[_0x2f43e9(0xdc)],_0x1daee5=(_0x36e8e6,_0x382c28,_0x38951c,_0x1c390b)=>{const _0x4f1d11=_0x2f43e9;for(var _0x3c8250=_0x1c390b>0x1?void 0x0:_0x1c390b?_0x9c63b2(_0x382c28,_0x38951c):_0x382c28,_0x33ccff=_0x36e8e6[_0x4f1d11(0xe6)]-0x1,_0x5a394d;_0x33ccff>=0x0;_0x33ccff--)(_0x5a394d=_0x36e8e6[_0x33ccff])&&(_0x3c8250=_0x5a394d(_0x3c8250)||_0x3c8250);return _0x3c8250;},_0x2e1e91=(_0x520705,_0x35ba7c)=>(_0x54ce0d,_0x53c73a)=>_0x35ba7c(_0x54ce0d,_0x53c73a,_0x520705);let _0x4ed1ef=class extends _0x385f71[_0x2f43e9(0xde)]{constructor(_0x183ac6,_0x44c444){const _0x23020f=_0x2f43e9;super(),this[_0x23020f(0xfe)]=_0x183ac6,this[_0x23020f(0xf7)]=_0x44c444,this[_0x23020f(0xe9)]();}[_0x2f43e9(0xe9)](){const _0x5d4dfb=_0x2f43e9;this[_0x5d4dfb(0xfe)][_0x5d4dfb(0x10b)]=this[_0x5d4dfb(0xf7)],this['_threadCommentDataSourceService'][_0x5d4dfb(0xe1)]=!0x1;}};_0x4ed1ef=_0x1daee5([_0x2e1e91(0x0,_0x5ea113[_0x2f43e9(0xe3)]),_0x2e1e91(0x1,_0x385f71[_0x2f43e9(0xeb)](_0x3398d1))],_0x4ed1ef);var _0x48fed5=Object[_0x2f43e9(0x105)],_0x96e566=Object[_0x2f43e9(0xdc)],_0x67f825=(_0x5a3492,_0x19461b,_0x5b1330)=>_0x19461b in _0x5a3492?_0x48fed5(_0x5a3492,_0x19461b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5b1330}):_0x5a3492[_0x19461b]=_0x5b1330,_0x5a5b65=(_0x1bc3ca,_0x4310c4,_0x135bf7,_0x1983fa)=>{for(var _0xc735ec=_0x1983fa>0x1?void 0x0:_0x1983fa?_0x96e566(_0x4310c4,_0x135bf7):_0x4310c4,_0x335300=_0x1bc3ca['length']-0x1,_0x926c5c;_0x335300>=0x0;_0x335300--)(_0x926c5c=_0x1bc3ca[_0x335300])&&(_0xc735ec=_0x926c5c(_0xc735ec)||_0xc735ec);return _0xc735ec;},_0x166177=(_0x580e90,_0x596dca)=>(_0x30bc59,_0x3ae5a7)=>_0x596dca(_0x30bc59,_0x3ae5a7,_0x580e90),_0x12972f=(_0x22d24c,_0x1ac218,_0x2af2b3)=>_0x67f825(_0x22d24c,typeof _0x1ac218!=_0x2f43e9(0xfb)?_0x1ac218+'':_0x1ac218,_0x2af2b3);_0x50a725[_0x2f43e9(0x9a)]=class extends _0x385f71[_0x2f43e9(0xd4)]{constructor(_0xfaa410=_0x15c51c,_0xcbbd78,_0x114020){const _0x2c6337=_0x2f43e9;super(),this['_config']=_0xfaa410,this[_0x2c6337(0xd2)]=_0xcbbd78,this[_0x2c6337(0xaf)]=_0x114020;const {..._0x42f5c5}=_0x385f71['merge']({},_0x15c51c,this[_0x2c6337(0xd8)]);this[_0x2c6337(0xaf)][_0x2c6337(0x9e)](_0x2b72e3,_0x42f5c5);}['onStarting'](){[[_0x3398d1],[_0x4ed1ef],[_0x2917f5]]['forEach'](_0x28a94c=>{this['_injector']['add'](_0x28a94c);});}[_0x2f43e9(0xf0)](){const _0x8d1490=_0x2f43e9;this[_0x8d1490(0xd2)][_0x8d1490(0xe2)](_0x4ed1ef),this['_injector'][_0x8d1490(0xe2)](_0x2917f5);}},_0x12972f(_0x50a725[_0x2f43e9(0x9a)],_0x2f43e9(0xe7),_0x487e4a),_0x12972f(_0x50a725[_0x2f43e9(0x9a)],_0x2f43e9(0xbc),_0x385f71[_0x2f43e9(0xef)]['UNIVER_UNKNOWN']),_0x50a725[_0x2f43e9(0x9a)]=_0x5a5b65([_0x385f71[_0x2f43e9(0xca)](_0x408d76[_0x2f43e9(0x116)],_0x1800eb[_0x2f43e9(0xc3)],_0x234c9c['UniverLicensePlugin']),_0x166177(0x1,_0x385f71['Inject'](_0x385f71[_0x2f43e9(0xd1)])),_0x166177(0x2,_0x385f71[_0x2f43e9(0xb3)])],_0x50a725[_0x2f43e9(0x9a)]),Object[_0x2f43e9(0x105)](_0x50a725,Symbol[_0x2f43e9(0x118)],{'value':_0x2f43e9(0xc0)});}));function _0x39d9(_0x537991,_0x1645eb){const _0x33b081=_0x33b0();return _0x39d9=function(_0x39d98e,_0x384786){_0x39d98e=_0x39d98e-0x92;let _0x38172c=_0x33b081[_0x39d98e];return _0x38172c;},_0x39d9(_0x537991,_0x1645eb);}function _0x33b0(){const _0x189583=['UniverProLicense','map','707XZrTfU','delete','Injector','_injector','values','Plugin','subscribe','disposeWithMe','/list','_config','ref','_httpService','Delete','getOwnPropertyDescriptor','users','Disposable','add','personId','syncUpdateMutationToColla','get','IThreadCommentDataSourceService','dayjs','rxjs','length','pluginName','Solved','_initDataSource','8211712fWHJBK','Inject','replyId','createTimestamp','@univerjs/network','UniverInstanceType','onReady','exports','post','/reply','solved','_init','getMemberID','_threadCommentDataSource','find','6234615CeeCpf','bufferTime','symbol','amd','@univerjs/core','_threadCommentDataSourceService','rangeType','ThreadCommentModel','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','error','unitId','payload','defineProperty','UniverCore','OpenOrReOpen','replies','/universer-api/comment/unit/','_commentService','dataSource','parse','@univerjs-pro/collaboration-client','CollaborationSessionService','UniverProCollaborationClient','comments','/delete','1492vdjJxt','5845712OMkSFE','UniverThreadComment','31602uFLrmp','UniverThreadCommentUIPlugin','1735EBncaO','toStringTag','content','slice','pipe','7008700JKKdCA','getCurrentUser','deleteComment','root','UserManagerService','resolved','UniverThreadCommentDataSourcePlugin','_threadCommentModel','@univerjs/thread-comment','_sessionService','setConfig','resolveComment','Solve','Add','_initUserSync','commentUpdate$','3917553zmzYDd','threadId','UniverThreadCommentUi','customRanges','object','@univerjs-pro/license','updateComment','@univerjs/thread-comment-ui','YYYY/MM/DD\x20HH:mm','code','filter','_configService','body','getComment','user','IConfigService','rangeId','/solved','CustomRangeType','function','/universer-api/user/list','addUser','thread-comment-data-source.config','Unknown','type','_userService','reply','format','Module','forEach','UniverProThreadCommentDatasource','UniverCollaborationClientPlugin','Reply','listComments','userId','requireSession','Edit','parentId','DependentOn','userID','getUnit'];_0x33b0=function(){return _0x189583;};return _0x33b0();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.10.7-nightly.
|
|
3
|
+
"version": "0.10.7-nightly.202509130618",
|
|
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.10.7-nightly.
|
|
49
|
-
"@univerjs-pro/license": "0.10.7-nightly.
|
|
50
|
-
"@univerjs/network": "0.10.7-nightly.
|
|
51
|
-
"@univerjs/core": "0.10.7-nightly.
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.10.7-nightly.202509130618",
|
|
49
|
+
"@univerjs-pro/license": "0.10.7-nightly.202509130618",
|
|
50
|
+
"@univerjs/network": "0.10.7-nightly.202509130618",
|
|
51
|
+
"@univerjs/core": "0.10.7-nightly.202509130618",
|
|
52
52
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
53
|
-
"@univerjs/thread-comment": "0.10.7-nightly.
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.10.7-nightly.
|
|
53
|
+
"@univerjs/thread-comment": "0.10.7-nightly.202509130618",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.10.7-nightly.202509130618"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|