@univerjs-pro/thread-comment-datasource 0.8.2-nightly.202506231607 → 0.8.2-nightly.202506251607

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x2d1a7d=_0x395b;(function(_0x2f46ca,_0xb8a413){const _0x44fe5c=_0x395b,_0x4f8c59=_0x2f46ca();while(!![]){try{const _0x12a0b9=parseInt(_0x44fe5c(0x215))/0x1+parseInt(_0x44fe5c(0x214))/0x2*(-parseInt(_0x44fe5c(0x20f))/0x3)+parseInt(_0x44fe5c(0x1b4))/0x4*(-parseInt(_0x44fe5c(0x1f1))/0x5)+parseInt(_0x44fe5c(0x1ed))/0x6*(-parseInt(_0x44fe5c(0x1ce))/0x7)+parseInt(_0x44fe5c(0x220))/0x8+-parseInt(_0x44fe5c(0x1b9))/0x9*(-parseInt(_0x44fe5c(0x1ca))/0xa)+-parseInt(_0x44fe5c(0x21e))/0xb*(parseInt(_0x44fe5c(0x1c7))/0xc);if(_0x12a0b9===_0xb8a413)break;else _0x4f8c59['push'](_0x4f8c59['shift']());}catch(_0x5f1316){_0x4f8c59['push'](_0x4f8c59['shift']());}}}(_0x1987,0x775c6));Object[_0x2d1a7d(0x227)](exports,Symbol[_0x2d1a7d(0x1cf)],{'value':_0x2d1a7d(0x1d4)});const b=require(_0x2d1a7d(0x1d1)),T=require(_0x2d1a7d(0x1fa)),c=require(_0x2d1a7d(0x1bc)),j=require(_0x2d1a7d(0x1b0)),M=require(_0x2d1a7d(0x1c5)),w=require('rxjs'),P=require(_0x2d1a7d(0x223)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xd9adce=>(_0xd9adce[_0xd9adce['OpenOrReOpen']=0x0]='OpenOrReOpen',_0xd9adce[_0xd9adce['Solved']=0x1]=_0x2d1a7d(0x1f2),_0xd9adce[_0xd9adce['UNRECOGNIZED']=-0x1]=_0x2d1a7d(0x1d3),_0xd9adce))(I||{}),v=(_0x4ac216=>(_0x4ac216[_0x4ac216['Unknown']=0x0]=_0x2d1a7d(0x207),_0x4ac216[_0x4ac216['Add']=0x1]=_0x2d1a7d(0x1d2),_0x4ac216[_0x4ac216[_0x2d1a7d(0x1ea)]=0x2]=_0x2d1a7d(0x1ea),_0x4ac216[_0x4ac216[_0x2d1a7d(0x200)]=0x3]=_0x2d1a7d(0x200),_0x4ac216[_0x4ac216[_0x2d1a7d(0x20e)]=0x4]=_0x2d1a7d(0x20e),_0x4ac216[_0x4ac216[_0x2d1a7d(0x1f3)]=0x5]=_0x2d1a7d(0x1f3),_0x4ac216[_0x4ac216[_0x2d1a7d(0x1d3)]=-0x1]=_0x2d1a7d(0x1d3),_0x4ac216))(v||{});function _0x395b(_0x27797a,_0x4eb4dc){const _0x198794=_0x1987();return _0x395b=function(_0x395b96,_0xa46777){_0x395b96=_0x395b96-0x1ad;let _0x71f17b=_0x198794[_0x395b96];return _0x71f17b;},_0x395b(_0x27797a,_0x4eb4dc);}const f=_0x3c8b77=>c[_0x2d1a7d(0x1e4)](new Date(+_0x3c8b77))[_0x2d1a7d(0x1da)](_0x2d1a7d(0x1ff)),R=async(_0x5443e4,_0x35b2cd)=>{const _0x25363b=_0x2d1a7d,_0x5e455a=_0x5443e4[_0x25363b(0x212)](c['UserManagerService']),_0xa862f2=_0x5443e4[_0x25363b(0x212)](P['HTTPService']);_0x35b2cd[_0x25363b(0x1f6)](_0x5438f0=>{const _0x337072=_0x25363b;_0x5e455a[_0x337072(0x1d5)](_0x5438f0)&&_0x35b2cd['delete'](_0x5438f0);}),_0x35b2cd[_0x25363b(0x1c3)]&&(await _0xa862f2[_0x25363b(0x212)]('/universer-api/user/list',{'params':{'userIDs':[..._0x35b2cd]}}))['body']['users'][_0x25363b(0x1f6)](_0x2b3065=>{const _0x5eb5b9=_0x25363b;_0x2b3065&&_0x5e455a[_0x5eb5b9(0x1bd)](_0x2b3065);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x1da798,_0x409c11,_0x201f4b,_0x4db47f)=>{const _0x45b756=_0x2d1a7d;for(var _0x50cadc=_0x4db47f>0x1?void 0x0:_0x4db47f?$(_0x409c11,_0x201f4b):_0x409c11,_0x19ec6c=_0x1da798[_0x45b756(0x1c1)]-0x1,_0x2d2355;_0x19ec6c>=0x0;_0x19ec6c--)(_0x2d2355=_0x1da798[_0x19ec6c])&&(_0x50cadc=_0x2d2355(_0x50cadc)||_0x50cadc);return _0x50cadc;},S=(_0x4b6625,_0x42dc85)=>(_0xffa3c7,_0x117a94)=>_0x42dc85(_0xffa3c7,_0x117a94,_0x4b6625);let p=class extends c[_0x2d1a7d(0x21c)]{constructor(_0x295fe7,_0x5cb031,_0x317eb7,_0x3695fc){const _0x282bbe=_0x2d1a7d;super(),this['_commentService']=_0x295fe7,this[_0x282bbe(0x1cb)]=_0x5cb031,this[_0x282bbe(0x1c9)]=_0x317eb7,this[_0x282bbe(0x1e3)]=_0x3695fc,this[_0x282bbe(0x1f5)](),this['_initUserSync']();}['_initUserSync'](){const _0x2324a8=_0x2d1a7d;this[_0x2324a8(0x1b3)](this[_0x2324a8(0x1cb)][_0x2324a8(0x226)][_0x2324a8(0x1e8)](w['bufferTime'](0x10))[_0x2324a8(0x1b7)](_0x57a2bb=>{const _0x206a6c=_0x2324a8,_0x1e1c32=new Set();_0x57a2bb['forEach'](_0x32d302=>{const _0x5c15c8=_0x395b;switch(_0x32d302[_0x5c15c8(0x1e1)]){case _0x5c15c8(0x1f4):{const _0x3149d7=_0x32d302['payload'][_0x5c15c8(0x21d)];_0x1e1c32[_0x5c15c8(0x1f4)](_0x3149d7);break;}}}),R(this[_0x206a6c(0x1e3)],_0x1e1c32);}));}[_0x2d1a7d(0x1f5)](){const _0x285e81=_0x2d1a7d;this[_0x285e81(0x1b3)](this[_0x285e81(0x1cd)]['commentUpdate$']['subscribe'](async _0x4042d2=>{const _0x553942=_0x285e81;var _0x51842,_0x596b87,_0x5f24e7,_0x48e5a5;const _0x39f44b=(_0x51842=this['_threadCommentModel'][_0x553942(0x1f9)](_0x4042d2[_0x553942(0x1c8)])[_0x553942(0x1eb)](_0x1b42f2=>_0x1b42f2[_0x553942(0x1cc)]===_0x4042d2[_0x553942(0x1cc)]))==null?void 0x0:_0x51842[_0x553942(0x218)];if(!_0x39f44b)return;const {unitId:_0x29f5cd,subUnitId:_0x447c39}=_0x39f44b;switch(_0x4042d2['user']&&this[_0x553942(0x1c9)][_0x553942(0x1bd)](_0x4042d2['user']),_0x4042d2[_0x553942(0x1e1)]){case v[_0x553942(0x1d2)]:break;case v[_0x553942(0x1ea)]:{this[_0x553942(0x1cb)][_0x553942(0x1c2)](_0x29f5cd,_0x447c39,{'unitId':_0x29f5cd,'subUnitId':_0x447c39,'ref':'','id':_0x4042d2[_0x553942(0x1c4)],'dT':f(+_0x4042d2[_0x553942(0x1f7)]),'threadId':_0x4042d2[_0x553942(0x1cc)],'personId':(_0x5f24e7=(_0x596b87=_0x4042d2[_0x553942(0x21a)])==null?void 0x0:_0x596b87[_0x553942(0x210)])!=null?_0x5f24e7:_0x4042d2[_0x553942(0x1d7)],'text':JSON[_0x553942(0x1ad)](_0x4042d2[_0x553942(0x1b8)]),'parentId':_0x39f44b['id']});break;}case v[_0x553942(0x20e)]:{const _0x4445eb=this[_0x553942(0x1cb)][_0x553942(0x1e2)](_0x29f5cd,_0x447c39,_0x4042d2['replyId']);_0x4445eb&&_0x4445eb['parentId']&&this[_0x553942(0x1cb)][_0x553942(0x1e0)](_0x29f5cd,_0x447c39,_0x4042d2[_0x553942(0x1c4)]);break;}case v[_0x553942(0x200)]:{this['_threadCommentModel']['updateComment'](_0x29f5cd,_0x447c39,{'commentId':_0x4042d2['replyId'],'text':JSON[_0x553942(0x1ad)](_0x4042d2[_0x553942(0x1b8)])});break;}case v[_0x553942(0x1f3)]:{const _0xcfe781=(_0x48e5a5=this[_0x553942(0x1cb)][_0x553942(0x1f9)](_0x4042d2[_0x553942(0x1c8)])['find'](_0x695e92=>_0x695e92['threadId']===_0x4042d2[_0x553942(0x1cc)]))==null?void 0x0:_0x48e5a5[_0x553942(0x218)];_0xcfe781&&this[_0x553942(0x1cb)][_0x553942(0x1f0)](_0x29f5cd,_0x447c39,_0xcfe781['id'],_0x4042d2[_0x553942(0x217)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x2d1a7d(0x1fb)](b[_0x2d1a7d(0x20a)])),S(0x1,c[_0x2d1a7d(0x1fb)](M[_0x2d1a7d(0x20c)])),S(0x2,c[_0x2d1a7d(0x1fb)](c[_0x2d1a7d(0x229)])),S(0x3,c[_0x2d1a7d(0x1fb)](c[_0x2d1a7d(0x1df)]))],p);function _0x1987(){const _0x3d4bd6=['IConfigService','UniverLicensePlugin','replies','UniverThreadCommentUIPlugin','DependentOn','rangeType','Unknown','dataSource','OpenOrReOpen','CommentService','body','ThreadCommentModel','reply','Delete','9PpxWOW','userID','_threadCommentDataSourceService','get','CustomRangeType','354638uUuuiZ','734761fOnqKz','pluginName','solved','root','ref','user','/solved','Disposable','personId','11wSpvpR','UNIVER_UNKNOWN','2397080jHLAto','_httpService','setConfig','@univerjs/network','/universer-api/comment/unit/','/edit','commentUpdate$','defineProperty','saveCommentToSnapshot','UserManagerService','listComments','code','parse','_threadCommentDataSource','error','@univerjs/thread-comment-ui','_configService','map','disposeWithMe','140yPEKIh','rangeId','getOwnPropertyDescriptor','subscribe','content','9cUvITL','UniverCollaborationClientPlugin','HTTPService','@univerjs/core','addUser','IThreadCommentDataSourceService','slice','Plugin','length','addComment','size','replyId','@univerjs/thread-comment','_initDataSource','1016700NmpoZx','unitId','_userService','9186990KpVapT','_threadCommentModel','threadId','_commentService','49jtOyrg','toStringTag','getCurrentUser','@univerjs-pro/collaboration-client','Add','UNRECOGNIZED','Module','getUser','COMMENT','userId','users','updateComment','format','_config','values','requireSession','thread-comment-data-source.config','Injector','deleteComment','type','getComment','_injector','dayjs','stringify','onReady','_sessionService','pipe','syncUpdateMutationToColla','Reply','find','post','689358GeEnll','getMemberID','UniverInstanceType','resolveComment','6180UURTTb','Solved','Solve','add','_init','forEach','createTimestamp','symbol','getUnit','@univerjs-pro/license','Inject','UniverThreadCommentDataSourcePlugin','filter','/add','YYYY/MM/DD\x20HH:mm','Edit'];_0x1987=function(){return _0x3d4bd6;};return _0x1987();}const q=_0x2d1a7d(0x1de),D={};var A=Object[_0x2d1a7d(0x1b6)],x=(_0x333dc9,_0x1533dd,_0x4d62b9,_0x3aa077)=>{const _0x378b7e=_0x2d1a7d;for(var _0x36aa2b=_0x3aa077>0x1?void 0x0:_0x3aa077?A(_0x1533dd,_0x4d62b9):_0x1533dd,_0x3c557e=_0x333dc9[_0x378b7e(0x1c1)]-0x1,_0x2e8f1b;_0x3c557e>=0x0;_0x3c557e--)(_0x2e8f1b=_0x333dc9[_0x3c557e])&&(_0x36aa2b=_0x2e8f1b(_0x36aa2b)||_0x36aa2b);return _0x36aa2b;},_=(_0x351a5c,_0x1907b0)=>(_0x5110cb,_0x2827b2)=>_0x1907b0(_0x5110cb,_0x2827b2,_0x351a5c);function Y(_0x20092c,_0x1cc4a4){const _0x6ede17=_0x2d1a7d,_0x3b72ca=_0x20092c['replies'][0x0];return{..._0x1cc4a4,'id':_0x3b72ca[_0x6ede17(0x1c4)],'resolved':_0x20092c[_0x6ede17(0x217)]===0x1,'dT':f(_0x3b72ca['createTimestamp']),'personId':_0x3b72ca[_0x6ede17(0x1d7)],'threadId':_0x3b72ca[_0x6ede17(0x1cc)]};}function G(_0x37cf27,_0x951fab,_0x2a1f17){const _0x2563e7=_0x2d1a7d;var _0x1bf6b4,_0x1c7998;if(((_0x1c7998=(_0x1bf6b4=_0x37cf27==null?void 0x0:_0x37cf27[_0x2563e7(0x203)])==null?void 0x0:_0x1bf6b4[_0x2563e7(0x1c1)])!=null?_0x1c7998:0x0)>0x0){const _0x30d0a2=(_0x67ab01,_0x6dd411)=>({'id':_0x67ab01[_0x2563e7(0x1c4)],'threadId':_0x67ab01[_0x2563e7(0x1cc)],'dT':f(_0x67ab01[_0x2563e7(0x1f7)]),'personId':_0x67ab01[_0x2563e7(0x1d7)],'resolved':_0x37cf27[_0x2563e7(0x217)]===I['Solved'],'unitId':_0x951fab,'subUnitId':_0x2a1f17,'text':JSON[_0x2563e7(0x1ad)](_0x67ab01[_0x2563e7(0x1b8)]),'parentId':_0x6dd411}),_0x37a05a=_0x30d0a2(_0x37cf27[_0x2563e7(0x203)][0x0]);return{..._0x37a05a,'children':_0x37cf27[_0x2563e7(0x203)][_0x2563e7(0x1bf)](0x1)[_0x2563e7(0x1b2)](_0x59c9ea=>_0x30d0a2(_0x59c9ea,_0x37a05a['id']))};}return null;}let g=class{constructor(_0x591f30,_0x22e768,_0x1c706b,_0x45e3db){const _0x11cb20=_0x2d1a7d;this[_0x11cb20(0x221)]=_0x591f30,this['_userService']=_0x22e768,this[_0x11cb20(0x1e7)]=_0x1c706b,this[_0x11cb20(0x1e3)]=_0x45e3db;}async['addComment'](_0xfa86e0){const _0x1e4ce6=_0x2d1a7d;var _0x24c045,_0x5dad89;const {parentId:_0x11f2c6,unitId:_0xc56f50,text:_0xf79741,threadId:_0x5ff5c0}=_0xfa86e0,_0x519dae=(_0x5dad89=(_0x24c045=_0xf79741['customRanges'])==null?void 0x0:_0x24c045[_0x1e4ce6(0x1fd)](_0x340c91=>_0x340c91[_0x1e4ce6(0x206)]===c[_0x1e4ce6(0x213)][_0x1e4ce6(0x1d6)])[_0x1e4ce6(0x1b2)](_0x44140f=>_0x44140f['rangeId']))!=null?_0x5dad89:[],_0x47aaba=JSON[_0x1e4ce6(0x1e5)](_0xf79741),_0x1aee77=(await this[_0x1e4ce6(0x1e7)]['requireSession'](_0xc56f50))[_0x1e4ce6(0x1ee)]();if(_0x11f2c6){const _0x19e8f9={'memberId':_0x1aee77,'unitId':_0xc56f50,'content':_0x47aaba,'mention':_0x519dae,'threadId':_0x5ff5c0},_0x1cbe43=(await this['_httpService'][_0x1e4ce6(0x1ec)](_0x1e4ce6(0x224)+_0xc56f50+'/reply',{'body':_0x19e8f9}))[_0x1e4ce6(0x20b)][_0x1e4ce6(0x20d)];return{..._0xfa86e0,'id':_0x1cbe43[_0x1e4ce6(0x1c4)],'dT':c[_0x1e4ce6(0x1e4)](+_0x1cbe43[_0x1e4ce6(0x1f7)])['format'](_0x1e4ce6(0x1ff)),'personId':_0x1cbe43['userId']};}else{const _0x239060={'memberId':_0x1aee77,'unitId':_0xc56f50,'content':_0x47aaba,'mention':_0x519dae},_0x4b7af8=await this[_0x1e4ce6(0x221)][_0x1e4ce6(0x1ec)](_0x1e4ce6(0x224)+_0xc56f50+_0x1e4ce6(0x1fe),{'body':_0x239060});return Y(_0x4b7af8[_0x1e4ce6(0x20b)]['comment'],_0xfa86e0);}}async[_0x2d1a7d(0x1d9)](_0x51a3ed){const _0x1fcb62=_0x2d1a7d;var _0x3c560a,_0x36fb19;const {text:_0x2555bb,unitId:_0x46bd4d}=_0x51a3ed,_0x4e037c=(_0x36fb19=(_0x3c560a=_0x2555bb['customRanges'])==null?void 0x0:_0x3c560a[_0x1fcb62(0x1fd)](_0x4eebcd=>_0x4eebcd[_0x1fcb62(0x206)]===c['CustomRangeType'][_0x1fcb62(0x1d6)])[_0x1fcb62(0x1b2)](_0x47dc93=>_0x47dc93[_0x1fcb62(0x1b5)]))!=null?_0x36fb19:[],_0x18bc85=JSON[_0x1fcb62(0x1e5)](_0x2555bb),_0x58efba=_0x51a3ed[_0x1fcb62(0x1cc)],_0x380d9f=_0x51a3ed['id'],_0x408882={'memberId':(await this[_0x1fcb62(0x1e7)][_0x1fcb62(0x1dd)](_0x46bd4d))['getMemberID'](),'unitId':_0x46bd4d,'threadId':_0x58efba,'mention':_0x4e037c,'content':_0x18bc85,'replyId':_0x380d9f},_0x573915=await this[_0x1fcb62(0x221)][_0x1fcb62(0x1ec)]('/universer-api/comment/unit/'+_0x46bd4d+_0x1fcb62(0x225),{'body':_0x408882});return!_0x573915['body'][_0x1fcb62(0x1af)]||_0x573915[_0x1fcb62(0x20b)][_0x1fcb62(0x1af)][_0x1fcb62(0x22b)]===0x1;}async[_0x2d1a7d(0x1f0)](_0x11c70){const _0x43d181=_0x2d1a7d,{unitId:_0x3bfbf2}=_0x11c70,_0x993c4=_0x11c70[_0x43d181(0x1cc)],_0x12a50c={'memberId':this[_0x43d181(0x1c9)][_0x43d181(0x1d0)]()[_0x43d181(0x210)],'unitId':_0x3bfbf2,'threadId':_0x993c4,'solved':_0x11c70['resolved']?I[_0x43d181(0x1f2)]:I[_0x43d181(0x209)]},_0x3b26f8=await this[_0x43d181(0x221)]['post'](_0x43d181(0x224)+_0x3bfbf2+_0x43d181(0x21b),{'body':_0x12a50c});return!_0x3b26f8[_0x43d181(0x20b)][_0x43d181(0x1af)]||_0x3b26f8[_0x43d181(0x20b)][_0x43d181(0x1af)]['code']===0x1;}async[_0x2d1a7d(0x1e0)](_0x3d91a7,_0x5714d2,_0x1507a0,_0x3f8d9a){const _0x30059d=_0x2d1a7d,_0x50e592={'memberId':(await this[_0x30059d(0x1e7)][_0x30059d(0x1dd)](_0x3d91a7))['getMemberID'](),'threadId':_0x1507a0,'replyId':_0x3f8d9a,'unitId':_0x3d91a7},_0x2d9844=await this[_0x30059d(0x221)][_0x30059d(0x1ec)](_0x30059d(0x224)+_0x3d91a7+'/delete',{'body':_0x50e592});return!_0x2d9844[_0x30059d(0x20b)][_0x30059d(0x1af)]||_0x2d9844[_0x30059d(0x20b)]['error']['code']===0x1;}async[_0x2d1a7d(0x22a)](_0x4144c9,_0x5d81bc,_0x51d1a7){const _0x3ef3b9=_0x2d1a7d,_0x1093a8={'unitId':_0x4144c9,'threadId':_0x51d1a7},_0x15749c=await this['_httpService'][_0x3ef3b9(0x1ec)](_0x3ef3b9(0x224)+_0x4144c9+'/list',{'body':_0x1093a8}),_0x14fdb8=_0x51d1a7['map'](_0x4c132c=>G(_0x15749c[_0x3ef3b9(0x20b)]['comments'][_0x4c132c],_0x4144c9,_0x5d81bc))[_0x3ef3b9(0x1fd)](Boolean);return Object[_0x3ef3b9(0x1dc)](_0x15749c[_0x3ef3b9(0x20b)][_0x3ef3b9(0x1d8)])['forEach'](_0x433d8b=>{const _0x1fc365=_0x3ef3b9;this[_0x1fc365(0x1c9)][_0x1fc365(0x1bd)](_0x433d8b);}),_0x14fdb8;}[_0x2d1a7d(0x228)](_0x1475f8){const _0x371f51=_0x2d1a7d;return{'id':_0x1475f8['id'],'threadId':_0x1475f8['threadId'],'ref':_0x1475f8[_0x371f51(0x219)]};}};g=x([_(0x0,c['Inject'](P[_0x2d1a7d(0x1bb)])),_(0x1,c[_0x2d1a7d(0x1fb)](c[_0x2d1a7d(0x229)])),_(0x2,c['Inject'](b['CollaborationSessionService'])),_(0x3,c[_0x2d1a7d(0x1fb)](c[_0x2d1a7d(0x1df)]))],g);var H=Object[_0x2d1a7d(0x1b6)],J=(_0x16c0de,_0x562a08,_0x56c75e,_0x1f4e43)=>{const _0x5b056a=_0x2d1a7d;for(var _0x4be837=_0x1f4e43>0x1?void 0x0:_0x1f4e43?H(_0x562a08,_0x56c75e):_0x562a08,_0x186262=_0x16c0de[_0x5b056a(0x1c1)]-0x1,_0x242706;_0x186262>=0x0;_0x186262--)(_0x242706=_0x16c0de[_0x186262])&&(_0x4be837=_0x242706(_0x4be837)||_0x4be837);return _0x4be837;},y=(_0x368103,_0x52ea4a)=>(_0x3a4de3,_0x1bfb73)=>_0x52ea4a(_0x3a4de3,_0x1bfb73,_0x368103);let C=class extends c[_0x2d1a7d(0x21c)]{constructor(_0x35d41b,_0x17f89c){const _0xc8fc70=_0x2d1a7d;super(),this[_0xc8fc70(0x211)]=_0x35d41b,this['_threadCommentDataSource']=_0x17f89c,this[_0xc8fc70(0x1c6)]();}[_0x2d1a7d(0x1c6)](){const _0x3b16c4=_0x2d1a7d;this[_0x3b16c4(0x211)][_0x3b16c4(0x208)]=this[_0x3b16c4(0x1ae)],this[_0x3b16c4(0x211)][_0x3b16c4(0x1e9)]=!0x1;}};C=J([y(0x0,M[_0x2d1a7d(0x1be)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x2d1a7d(0x227)],L=Object[_0x2d1a7d(0x1b6)],Z=(_0x5766e5,_0x14ea90,_0x3735a5)=>_0x14ea90 in _0x5766e5?F(_0x5766e5,_0x14ea90,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3735a5}):_0x5766e5[_0x14ea90]=_0x3735a5,W=(_0x55a7b5,_0x19697a,_0x420b5d,_0x17de18)=>{const _0x4c8cfd=_0x2d1a7d;for(var _0x41541f=_0x17de18>0x1?void 0x0:_0x17de18?L(_0x19697a,_0x420b5d):_0x19697a,_0x160181=_0x55a7b5[_0x4c8cfd(0x1c1)]-0x1,_0x4fbf6e;_0x160181>=0x0;_0x160181--)(_0x4fbf6e=_0x55a7b5[_0x160181])&&(_0x41541f=_0x4fbf6e(_0x41541f)||_0x41541f);return _0x41541f;},O=(_0x20dc06,_0x21f56b)=>(_0x1abb6f,_0x32eb52)=>_0x21f56b(_0x1abb6f,_0x32eb52,_0x20dc06),N=(_0x12b34f,_0x5a0b04,_0x6f4be7)=>Z(_0x12b34f,typeof _0x5a0b04!=_0x2d1a7d(0x1f8)?_0x5a0b04+'':_0x5a0b04,_0x6f4be7);exports[_0x2d1a7d(0x1fc)]=class extends c[_0x2d1a7d(0x1c0)]{constructor(_0x49bb0b=D,_0xea1dd8,_0x40ef94){const _0x46aaff=_0x2d1a7d;super(),this[_0x46aaff(0x1db)]=_0x49bb0b,this['_injector']=_0xea1dd8,this['_configService']=_0x40ef94;const {..._0x254951}=c['merge']({},D,this[_0x46aaff(0x1db)]);this[_0x46aaff(0x1b1)][_0x46aaff(0x222)](q,_0x254951);}['onStarting'](){const _0x1b9e2a=_0x2d1a7d;[[g],[C],[p]][_0x1b9e2a(0x1f6)](_0x22e1aa=>{const _0x17ffce=_0x1b9e2a;this[_0x17ffce(0x1e3)]['add'](_0x22e1aa);});}[_0x2d1a7d(0x1e6)](){const _0x18e3a3=_0x2d1a7d;this[_0x18e3a3(0x1e3)][_0x18e3a3(0x212)](C),this[_0x18e3a3(0x1e3)][_0x18e3a3(0x212)](p);}},N(exports[_0x2d1a7d(0x1fc)],_0x2d1a7d(0x216),U),N(exports[_0x2d1a7d(0x1fc)],_0x2d1a7d(0x1e1),c[_0x2d1a7d(0x1ef)][_0x2d1a7d(0x21f)]),exports[_0x2d1a7d(0x1fc)]=W([c[_0x2d1a7d(0x205)](j[_0x2d1a7d(0x204)],b[_0x2d1a7d(0x1ba)],T[_0x2d1a7d(0x202)]),O(0x1,c[_0x2d1a7d(0x1fb)](c[_0x2d1a7d(0x1df)])),O(0x2,c[_0x2d1a7d(0x201)])],exports[_0x2d1a7d(0x1fc)]);
1
+ 'use strict';const _0x158931=_0x28f2;(function(_0x146e4c,_0x16ca2b){const _0x4ebdf9=_0x28f2,_0x100225=_0x146e4c();while(!![]){try{const _0x1334e6=parseInt(_0x4ebdf9(0x22f))/0x1+parseInt(_0x4ebdf9(0x1ee))/0x2*(parseInt(_0x4ebdf9(0x223))/0x3)+parseInt(_0x4ebdf9(0x228))/0x4*(-parseInt(_0x4ebdf9(0x1cd))/0x5)+parseInt(_0x4ebdf9(0x202))/0x6*(-parseInt(_0x4ebdf9(0x1fe))/0x7)+parseInt(_0x4ebdf9(0x1dd))/0x8*(parseInt(_0x4ebdf9(0x1ce))/0x9)+parseInt(_0x4ebdf9(0x1e4))/0xa+-parseInt(_0x4ebdf9(0x1bf))/0xb;if(_0x1334e6===_0x16ca2b)break;else _0x100225['push'](_0x100225['shift']());}catch(_0x20a37f){_0x100225['push'](_0x100225['shift']());}}}(_0x5eac,0x94a98));Object[_0x158931(0x207)](exports,Symbol[_0x158931(0x1d1)],{'value':_0x158931(0x212)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x158931(0x211)),c=require(_0x158931(0x203)),j=require('@univerjs/thread-comment-ui'),M=require(_0x158931(0x1ec)),w=require(_0x158931(0x20b)),P=require(_0x158931(0x1e9)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x48ac9=>(_0x48ac9[_0x48ac9['OpenOrReOpen']=0x0]=_0x158931(0x1ca),_0x48ac9[_0x48ac9['Solved']=0x1]=_0x158931(0x206),_0x48ac9[_0x48ac9[_0x158931(0x1ea)]=-0x1]='UNRECOGNIZED',_0x48ac9))(I||{}),v=(_0x192042=>(_0x192042[_0x192042['Unknown']=0x0]=_0x158931(0x230),_0x192042[_0x192042[_0x158931(0x226)]=0x1]=_0x158931(0x226),_0x192042[_0x192042['Reply']=0x2]=_0x158931(0x1f6),_0x192042[_0x192042[_0x158931(0x1bb)]=0x3]=_0x158931(0x1bb),_0x192042[_0x192042[_0x158931(0x208)]=0x4]=_0x158931(0x208),_0x192042[_0x192042[_0x158931(0x1de)]=0x5]=_0x158931(0x1de),_0x192042[_0x192042['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x192042))(v||{});const f=_0x5a18ff=>c[_0x158931(0x22e)](new Date(+_0x5a18ff))['format'](_0x158931(0x200)),R=async(_0x385a2a,_0x530b85)=>{const _0x5a5526=_0x158931,_0x148e37=_0x385a2a[_0x5a5526(0x20e)](c['UserManagerService']),_0x7b086=_0x385a2a[_0x5a5526(0x20e)](P[_0x5a5526(0x1d7)]);_0x530b85[_0x5a5526(0x1f4)](_0x1753e7=>{const _0x241ec8=_0x5a5526;_0x148e37['getUser'](_0x1753e7)&&_0x530b85[_0x241ec8(0x20c)](_0x1753e7);}),_0x530b85['size']&&(await _0x7b086[_0x5a5526(0x20e)](_0x5a5526(0x22d),{'params':{'userIDs':[..._0x530b85]}}))[_0x5a5526(0x1cc)][_0x5a5526(0x225)][_0x5a5526(0x1f4)](_0x270629=>{const _0x46ff0e=_0x5a5526;_0x270629&&_0x148e37[_0x46ff0e(0x227)](_0x270629);});};var $=Object[_0x158931(0x1f1)],E=(_0x4d70aa,_0x39a52e,_0x341b2a,_0x5e0fb6)=>{const _0x1b42e3=_0x158931;for(var _0xc3ee4f=_0x5e0fb6>0x1?void 0x0:_0x5e0fb6?$(_0x39a52e,_0x341b2a):_0x39a52e,_0x5a6c40=_0x4d70aa[_0x1b42e3(0x1da)]-0x1,_0x19e564;_0x5a6c40>=0x0;_0x5a6c40--)(_0x19e564=_0x4d70aa[_0x5a6c40])&&(_0xc3ee4f=_0x19e564(_0xc3ee4f)||_0xc3ee4f);return _0xc3ee4f;},S=(_0x28e9b9,_0x572796)=>(_0x42f913,_0x52df6a)=>_0x572796(_0x42f913,_0x52df6a,_0x28e9b9);function _0x5eac(){const _0x17d47a=['4010770BGXyJl','27CNSPdn','symbol','CustomRangeType','toStringTag','CommentService','_config','/reply','slice','UniverThreadCommentDataSourcePlugin','HTTPService','ref','userId','length','_initUserSync','replyId','2833672vGvzsS','Solve','COMMENT','UniverThreadCommentUIPlugin','getUnit','payload','UniverCollaborationClientPlugin','2623760nLNOBV','getCurrentUser','merge','UserManagerService','resolved','@univerjs/network','UNRECOGNIZED','parse','@univerjs/thread-comment','customRanges','5378lzEwZG','_threadCommentDataSourceService','requireSession','getOwnPropertyDescriptor','_threadCommentModel','code','forEach','setConfig','Reply','threadId','pipe','disposeWithMe','_initDataSource','root','saveCommentToSnapshot','resolveComment','21287iVnxeF','UniverInstanceType','YYYY/MM/DD\x20HH:mm','format','894aBoMCg','@univerjs/core','rangeId','CollaborationSessionService','Solved','defineProperty','Delete','_threadCommentDataSource','_userService','rxjs','delete','pluginName','get','Injector','type','@univerjs-pro/license','Module','listComments','_sessionService','/list','/universer-api/comment/unit/','reply','stringify','post','replies','_commentService','rangeType','getMemberID','dataSource','UNIVER_UNKNOWN','addComment','unitId','filter','831mXjbpp','_configService','users','Add','addUser','4XcgsUb','userID','map','deleteComment','updateComment','/universer-api/user/list','dayjs','880880IcNkAH','Unknown','_injector','solved','commentUpdate$','user','values','/solved','UniverLicensePlugin','thread-comment-data-source.config','syncUpdateMutationToColla','Edit','content','Disposable','onStarting','11952083NmFcTX','Inject','createTimestamp','/edit','error','ThreadCommentModel','add','_httpService','comments','personId','_init','OpenOrReOpen','subscribe','body'];_0x5eac=function(){return _0x17d47a;};return _0x5eac();}let p=class extends c[_0x158931(0x1bd)]{constructor(_0x340a89,_0x5b2988,_0xe0f02,_0x1c5668){const _0x13f81b=_0x158931;super(),this[_0x13f81b(0x21b)]=_0x340a89,this['_threadCommentModel']=_0x5b2988,this['_userService']=_0xe0f02,this[_0x13f81b(0x231)]=_0x1c5668,this[_0x13f81b(0x1c9)](),this['_initUserSync']();}[_0x158931(0x1db)](){const _0x5263fb=_0x158931;this[_0x5263fb(0x1f9)](this[_0x5263fb(0x1f2)][_0x5263fb(0x1b4)][_0x5263fb(0x1f8)](w['bufferTime'](0x10))[_0x5263fb(0x1cb)](_0x23d91a=>{const _0x1f676c=_0x5263fb,_0x47cb6a=new Set();_0x23d91a[_0x1f676c(0x1f4)](_0x542242=>{const _0x1a58d4=_0x1f676c;switch(_0x542242[_0x1a58d4(0x210)]){case'add':{const _0x569471=_0x542242[_0x1a58d4(0x1e2)][_0x1a58d4(0x1c8)];_0x47cb6a[_0x1a58d4(0x1c5)](_0x569471);break;}}}),R(this['_injector'],_0x47cb6a);}));}[_0x158931(0x1c9)](){const _0x6cadbd=_0x158931;this['disposeWithMe'](this[_0x6cadbd(0x21b)]['commentUpdate$'][_0x6cadbd(0x1cb)](async _0x4aac9e=>{const _0x10c3da=_0x6cadbd;var _0x19d279,_0x4de46a,_0xa3c30b,_0x2d1e5c;const _0x3ba44e=(_0x19d279=this[_0x10c3da(0x1f2)][_0x10c3da(0x1e1)](_0x4aac9e[_0x10c3da(0x221)])['find'](_0x359ab5=>_0x359ab5[_0x10c3da(0x1f7)]===_0x4aac9e[_0x10c3da(0x1f7)]))==null?void 0x0:_0x19d279[_0x10c3da(0x1fb)];if(!_0x3ba44e)return;const {unitId:_0x9c7b7f,subUnitId:_0x62f4fe}=_0x3ba44e;switch(_0x4aac9e['user']&&this[_0x10c3da(0x20a)][_0x10c3da(0x227)](_0x4aac9e[_0x10c3da(0x1b5)]),_0x4aac9e[_0x10c3da(0x210)]){case v['Add']:break;case v['Reply']:{this[_0x10c3da(0x1f2)]['addComment'](_0x9c7b7f,_0x62f4fe,{'unitId':_0x9c7b7f,'subUnitId':_0x62f4fe,'ref':'','id':_0x4aac9e['replyId'],'dT':f(+_0x4aac9e[_0x10c3da(0x1c1)]),'threadId':_0x4aac9e[_0x10c3da(0x1f7)],'personId':(_0xa3c30b=(_0x4de46a=_0x4aac9e[_0x10c3da(0x1b5)])==null?void 0x0:_0x4de46a['userID'])!=null?_0xa3c30b:_0x4aac9e[_0x10c3da(0x1d9)],'text':JSON[_0x10c3da(0x1eb)](_0x4aac9e[_0x10c3da(0x1bc)]),'parentId':_0x3ba44e['id']});break;}case v[_0x10c3da(0x208)]:{const _0xe3d3f5=this[_0x10c3da(0x1f2)]['getComment'](_0x9c7b7f,_0x62f4fe,_0x4aac9e['replyId']);_0xe3d3f5&&_0xe3d3f5['parentId']&&this['_threadCommentModel'][_0x10c3da(0x22b)](_0x9c7b7f,_0x62f4fe,_0x4aac9e[_0x10c3da(0x1dc)]);break;}case v[_0x10c3da(0x1bb)]:{this['_threadCommentModel']['updateComment'](_0x9c7b7f,_0x62f4fe,{'commentId':_0x4aac9e[_0x10c3da(0x1dc)],'text':JSON[_0x10c3da(0x1eb)](_0x4aac9e[_0x10c3da(0x1bc)])});break;}case v[_0x10c3da(0x1de)]:{const _0x30c956=(_0x2d1e5c=this[_0x10c3da(0x1f2)]['getUnit'](_0x4aac9e[_0x10c3da(0x221)])['find'](_0x248813=>_0x248813[_0x10c3da(0x1f7)]===_0x4aac9e[_0x10c3da(0x1f7)]))==null?void 0x0:_0x2d1e5c[_0x10c3da(0x1fb)];_0x30c956&&this[_0x10c3da(0x1f2)]['resolveComment'](_0x9c7b7f,_0x62f4fe,_0x30c956['id'],_0x4aac9e[_0x10c3da(0x1b3)]===I[_0x10c3da(0x206)]);break;}}}));}};p=E([S(0x0,c[_0x158931(0x1c0)](b[_0x158931(0x1d2)])),S(0x1,c[_0x158931(0x1c0)](M[_0x158931(0x1c4)])),S(0x2,c[_0x158931(0x1c0)](c[_0x158931(0x1e7)])),S(0x3,c[_0x158931(0x1c0)](c['Injector']))],p);const q=_0x158931(0x1b9),D={};var A=Object[_0x158931(0x1f1)],x=(_0x90c38d,_0x39bbd3,_0x3b0582,_0x125c05)=>{const _0x2cdedc=_0x158931;for(var _0x2320f6=_0x125c05>0x1?void 0x0:_0x125c05?A(_0x39bbd3,_0x3b0582):_0x39bbd3,_0x25b688=_0x90c38d[_0x2cdedc(0x1da)]-0x1,_0xe1caa7;_0x25b688>=0x0;_0x25b688--)(_0xe1caa7=_0x90c38d[_0x25b688])&&(_0x2320f6=_0xe1caa7(_0x2320f6)||_0x2320f6);return _0x2320f6;},_=(_0x271df0,_0x4569a9)=>(_0x30eafc,_0x392d6a)=>_0x4569a9(_0x30eafc,_0x392d6a,_0x271df0);function Y(_0x16cbf5,_0x1d0aa6){const _0x53d53a=_0x158931,_0x16e58b=_0x16cbf5[_0x53d53a(0x21a)][0x0];return{..._0x1d0aa6,'id':_0x16e58b[_0x53d53a(0x1dc)],'resolved':_0x16cbf5[_0x53d53a(0x1b3)]===0x1,'dT':f(_0x16e58b[_0x53d53a(0x1c1)]),'personId':_0x16e58b['userId'],'threadId':_0x16e58b['threadId']};}function G(_0x5f297d,_0x48d27a,_0x5c5414){const _0x4037e3=_0x158931;var _0x31a287,_0x57f4c4;if(((_0x57f4c4=(_0x31a287=_0x5f297d==null?void 0x0:_0x5f297d[_0x4037e3(0x21a)])==null?void 0x0:_0x31a287[_0x4037e3(0x1da)])!=null?_0x57f4c4:0x0)>0x0){const _0x123463=(_0x3e013d,_0x25640b)=>({'id':_0x3e013d[_0x4037e3(0x1dc)],'threadId':_0x3e013d[_0x4037e3(0x1f7)],'dT':f(_0x3e013d['createTimestamp']),'personId':_0x3e013d[_0x4037e3(0x1d9)],'resolved':_0x5f297d[_0x4037e3(0x1b3)]===I[_0x4037e3(0x206)],'unitId':_0x48d27a,'subUnitId':_0x5c5414,'text':JSON[_0x4037e3(0x1eb)](_0x3e013d[_0x4037e3(0x1bc)]),'parentId':_0x25640b}),_0x5754f2=_0x123463(_0x5f297d[_0x4037e3(0x21a)][0x0]);return{..._0x5754f2,'children':_0x5f297d[_0x4037e3(0x21a)][_0x4037e3(0x1d5)](0x1)[_0x4037e3(0x22a)](_0x3044e8=>_0x123463(_0x3044e8,_0x5754f2['id']))};}return null;}let g=class{constructor(_0x3ee451,_0x542e5e,_0x1f69e9,_0x3ef7){const _0x32da29=_0x158931;this[_0x32da29(0x1c6)]=_0x3ee451,this[_0x32da29(0x20a)]=_0x542e5e,this['_sessionService']=_0x1f69e9,this[_0x32da29(0x231)]=_0x3ef7;}async[_0x158931(0x220)](_0x279f17){const _0x2c93fe=_0x158931;var _0x2196af,_0x3042df;const {parentId:_0x4b19ac,unitId:_0x4a4f58,text:_0x5bc48f,threadId:_0x21f34a}=_0x279f17,_0x3235cc=(_0x3042df=(_0x2196af=_0x5bc48f[_0x2c93fe(0x1ed)])==null?void 0x0:_0x2196af[_0x2c93fe(0x222)](_0x4e6037=>_0x4e6037[_0x2c93fe(0x21c)]===c[_0x2c93fe(0x1d0)]['COMMENT'])[_0x2c93fe(0x22a)](_0x57973f=>_0x57973f[_0x2c93fe(0x204)]))!=null?_0x3042df:[],_0x2f7b9c=JSON[_0x2c93fe(0x218)](_0x5bc48f),_0x8cd3e8=(await this[_0x2c93fe(0x214)]['requireSession'](_0x4a4f58))[_0x2c93fe(0x21d)]();if(_0x4b19ac){const _0x3022fb={'memberId':_0x8cd3e8,'unitId':_0x4a4f58,'content':_0x2f7b9c,'mention':_0x3235cc,'threadId':_0x21f34a},_0x1228f5=(await this[_0x2c93fe(0x1c6)]['post'](_0x2c93fe(0x216)+_0x4a4f58+_0x2c93fe(0x1d4),{'body':_0x3022fb}))[_0x2c93fe(0x1cc)][_0x2c93fe(0x217)];return{..._0x279f17,'id':_0x1228f5[_0x2c93fe(0x1dc)],'dT':c[_0x2c93fe(0x22e)](+_0x1228f5[_0x2c93fe(0x1c1)])[_0x2c93fe(0x201)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1228f5[_0x2c93fe(0x1d9)]};}else{const _0x4a6cf1={'memberId':_0x8cd3e8,'unitId':_0x4a4f58,'content':_0x2f7b9c,'mention':_0x3235cc},_0x3675cd=await this['_httpService'][_0x2c93fe(0x219)](_0x2c93fe(0x216)+_0x4a4f58+'/add',{'body':_0x4a6cf1});return Y(_0x3675cd[_0x2c93fe(0x1cc)]['comment'],_0x279f17);}}async[_0x158931(0x22c)](_0x38cdb0){const _0x1df6d9=_0x158931;var _0x32b87f,_0x1ab023;const {text:_0x2ca191,unitId:_0x4dff63}=_0x38cdb0,_0x312220=(_0x1ab023=(_0x32b87f=_0x2ca191[_0x1df6d9(0x1ed)])==null?void 0x0:_0x32b87f['filter'](_0x20032f=>_0x20032f['rangeType']===c[_0x1df6d9(0x1d0)][_0x1df6d9(0x1df)])[_0x1df6d9(0x22a)](_0xecc09d=>_0xecc09d[_0x1df6d9(0x204)]))!=null?_0x1ab023:[],_0x46bccc=JSON['stringify'](_0x2ca191),_0x97af81=_0x38cdb0[_0x1df6d9(0x1f7)],_0x43752f=_0x38cdb0['id'],_0x32a7c3={'memberId':(await this[_0x1df6d9(0x214)][_0x1df6d9(0x1f0)](_0x4dff63))[_0x1df6d9(0x21d)](),'unitId':_0x4dff63,'threadId':_0x97af81,'mention':_0x312220,'content':_0x46bccc,'replyId':_0x43752f},_0x41b31c=await this[_0x1df6d9(0x1c6)][_0x1df6d9(0x219)](_0x1df6d9(0x216)+_0x4dff63+_0x1df6d9(0x1c2),{'body':_0x32a7c3});return!_0x41b31c[_0x1df6d9(0x1cc)][_0x1df6d9(0x1c3)]||_0x41b31c[_0x1df6d9(0x1cc)]['error'][_0x1df6d9(0x1f3)]===0x1;}async[_0x158931(0x1fd)](_0x552a0c){const _0x1d393a=_0x158931,{unitId:_0x548338}=_0x552a0c,_0x2cfe85=_0x552a0c[_0x1d393a(0x1f7)],_0x38bfd1={'memberId':this[_0x1d393a(0x20a)][_0x1d393a(0x1e5)]()[_0x1d393a(0x229)],'unitId':_0x548338,'threadId':_0x2cfe85,'solved':_0x552a0c[_0x1d393a(0x1e8)]?I[_0x1d393a(0x206)]:I[_0x1d393a(0x1ca)]},_0xe2fc40=await this[_0x1d393a(0x1c6)]['post'](_0x1d393a(0x216)+_0x548338+_0x1d393a(0x1b7),{'body':_0x38bfd1});return!_0xe2fc40[_0x1d393a(0x1cc)]['error']||_0xe2fc40[_0x1d393a(0x1cc)][_0x1d393a(0x1c3)]['code']===0x1;}async['deleteComment'](_0x52c44a,_0x1d61e9,_0x2e5193,_0x5685bd){const _0x32868c=_0x158931,_0x2d6d4d={'memberId':(await this['_sessionService']['requireSession'](_0x52c44a))['getMemberID'](),'threadId':_0x2e5193,'replyId':_0x5685bd,'unitId':_0x52c44a},_0x294596=await this[_0x32868c(0x1c6)]['post'](_0x32868c(0x216)+_0x52c44a+'/delete',{'body':_0x2d6d4d});return!_0x294596[_0x32868c(0x1cc)][_0x32868c(0x1c3)]||_0x294596[_0x32868c(0x1cc)][_0x32868c(0x1c3)][_0x32868c(0x1f3)]===0x1;}async[_0x158931(0x213)](_0x3e973f,_0x55b0e8,_0x204538){const _0x3360ad=_0x158931,_0x5120d5={'unitId':_0x3e973f,'threadId':_0x204538},_0x32b1e4=await this[_0x3360ad(0x1c6)][_0x3360ad(0x219)](_0x3360ad(0x216)+_0x3e973f+_0x3360ad(0x215),{'body':_0x5120d5}),_0x1ffab3=_0x204538[_0x3360ad(0x22a)](_0x64e86d=>G(_0x32b1e4[_0x3360ad(0x1cc)][_0x3360ad(0x1c7)][_0x64e86d],_0x3e973f,_0x55b0e8))[_0x3360ad(0x222)](Boolean);return Object[_0x3360ad(0x1b6)](_0x32b1e4[_0x3360ad(0x1cc)]['users'])[_0x3360ad(0x1f4)](_0x33d752=>{const _0xe47e6c=_0x3360ad;this[_0xe47e6c(0x20a)]['addUser'](_0x33d752);}),_0x1ffab3;}[_0x158931(0x1fc)](_0x2aa3ac){const _0x804706=_0x158931;return{'id':_0x2aa3ac['id'],'threadId':_0x2aa3ac[_0x804706(0x1f7)],'ref':_0x2aa3ac[_0x804706(0x1d8)]};}};g=x([_(0x0,c[_0x158931(0x1c0)](P[_0x158931(0x1d7)])),_(0x1,c[_0x158931(0x1c0)](c[_0x158931(0x1e7)])),_(0x2,c[_0x158931(0x1c0)](b[_0x158931(0x205)])),_(0x3,c[_0x158931(0x1c0)](c['Injector']))],g);var H=Object[_0x158931(0x1f1)],J=(_0x513be3,_0x4223ca,_0x4d2eec,_0x3a9b44)=>{for(var _0x5dfafe=_0x3a9b44>0x1?void 0x0:_0x3a9b44?H(_0x4223ca,_0x4d2eec):_0x4223ca,_0x1fc26e=_0x513be3['length']-0x1,_0x46141f;_0x1fc26e>=0x0;_0x1fc26e--)(_0x46141f=_0x513be3[_0x1fc26e])&&(_0x5dfafe=_0x46141f(_0x5dfafe)||_0x5dfafe);return _0x5dfafe;},y=(_0x5c64f2,_0x3fa192)=>(_0x33b06c,_0x29c5e9)=>_0x3fa192(_0x33b06c,_0x29c5e9,_0x5c64f2);let C=class extends c[_0x158931(0x1bd)]{constructor(_0x56b5fb,_0x294926){const _0x17c7d8=_0x158931;super(),this[_0x17c7d8(0x1ef)]=_0x56b5fb,this[_0x17c7d8(0x209)]=_0x294926,this[_0x17c7d8(0x1fa)]();}['_initDataSource'](){const _0x41cdde=_0x158931;this[_0x41cdde(0x1ef)][_0x41cdde(0x21e)]=this['_threadCommentDataSource'],this[_0x41cdde(0x1ef)][_0x41cdde(0x1ba)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x158931(0x1c0)](g))],C);function _0x28f2(_0x23d46a,_0x4f6001){const _0x5eac43=_0x5eac();return _0x28f2=function(_0x28f244,_0x2ba7ac){_0x28f244=_0x28f244-0x1b3;let _0x1d6f0f=_0x5eac43[_0x28f244];return _0x1d6f0f;},_0x28f2(_0x23d46a,_0x4f6001);}var F=Object[_0x158931(0x207)],L=Object[_0x158931(0x1f1)],Z=(_0x1b338a,_0x45bef5,_0x35310c)=>_0x45bef5 in _0x1b338a?F(_0x1b338a,_0x45bef5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x35310c}):_0x1b338a[_0x45bef5]=_0x35310c,W=(_0x593acc,_0x3bb8bd,_0x3a7a70,_0x4f026d)=>{const _0x4cb1ec=_0x158931;for(var _0x51c1a6=_0x4f026d>0x1?void 0x0:_0x4f026d?L(_0x3bb8bd,_0x3a7a70):_0x3bb8bd,_0x1f7862=_0x593acc[_0x4cb1ec(0x1da)]-0x1,_0x554758;_0x1f7862>=0x0;_0x1f7862--)(_0x554758=_0x593acc[_0x1f7862])&&(_0x51c1a6=_0x554758(_0x51c1a6)||_0x51c1a6);return _0x51c1a6;},O=(_0x36d558,_0x1ef2fd)=>(_0x4247a8,_0x2da1b2)=>_0x1ef2fd(_0x4247a8,_0x2da1b2,_0x36d558),N=(_0x338eeb,_0x29b9f3,_0x4ce28a)=>Z(_0x338eeb,typeof _0x29b9f3!=_0x158931(0x1cf)?_0x29b9f3+'':_0x29b9f3,_0x4ce28a);exports[_0x158931(0x1d6)]=class extends c['Plugin']{constructor(_0x50616f=D,_0x53dba1,_0x590c2c){const _0x102fd6=_0x158931;super(),this['_config']=_0x50616f,this[_0x102fd6(0x231)]=_0x53dba1,this['_configService']=_0x590c2c;const {..._0x51f745}=c[_0x102fd6(0x1e6)]({},D,this[_0x102fd6(0x1d3)]);this[_0x102fd6(0x224)][_0x102fd6(0x1f5)](q,_0x51f745);}[_0x158931(0x1be)](){const _0x194f6b=_0x158931;[[g],[C],[p]][_0x194f6b(0x1f4)](_0x57a134=>{const _0x1d3779=_0x194f6b;this[_0x1d3779(0x231)][_0x1d3779(0x1c5)](_0x57a134);});}['onReady'](){const _0x2bf1ff=_0x158931;this[_0x2bf1ff(0x231)][_0x2bf1ff(0x20e)](C),this['_injector']['get'](p);}},N(exports[_0x158931(0x1d6)],_0x158931(0x20d),U),N(exports[_0x158931(0x1d6)],_0x158931(0x210),c[_0x158931(0x1ff)][_0x158931(0x21f)]),exports[_0x158931(0x1d6)]=W([c['DependentOn'](j[_0x158931(0x1e0)],b[_0x158931(0x1e3)],T[_0x158931(0x1b8)]),O(0x1,c['Inject'](c[_0x158931(0x20f)])),O(0x2,c['IConfigService'])],exports[_0x158931(0x1d6)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x1ab695=_0x5c8a;(function(_0x5a823a,_0x5e761d){const _0xc27562=_0x5c8a,_0x28e648=_0x5a823a();while(!![]){try{const _0x2cf62d=-parseInt(_0xc27562(0x167))/0x1+-parseInt(_0xc27562(0x19c))/0x2+parseInt(_0xc27562(0x1a6))/0x3*(-parseInt(_0xc27562(0x1a2))/0x4)+parseInt(_0xc27562(0x155))/0x5+parseInt(_0xc27562(0x1b6))/0x6*(-parseInt(_0xc27562(0x19a))/0x7)+-parseInt(_0xc27562(0x18b))/0x8*(parseInt(_0xc27562(0x171))/0x9)+-parseInt(_0xc27562(0x16b))/0xa*(-parseInt(_0xc27562(0x1b1))/0xb);if(_0x2cf62d===_0x5e761d)break;else _0x28e648['push'](_0x28e648['shift']());}catch(_0x91ef88){_0x28e648['push'](_0x28e648['shift']());}}}(_0x1577,0x52941));import{CommentService as _0x2f1b6,CollaborationSessionService as _0x296507,UniverCollaborationClientPlugin as _0x215a50}from'@univerjs-pro/collaboration-client';function _0x5c8a(_0x213d84,_0xc1e0aa){const _0x1577ff=_0x1577();return _0x5c8a=function(_0x5c8a70,_0x38170c){_0x5c8a70=_0x5c8a70-0x151;let _0x2c9b54=_0x1577ff[_0x5c8a70];return _0x2c9b54;},_0x5c8a(_0x213d84,_0xc1e0aa);}import{UniverLicensePlugin as _0x59e42c}from'@univerjs-pro/license';import{dayjs as _0x2ee0ce,UserManagerService as _0x491dce,Inject as _0x14d5a2,Injector as _0x153703,Disposable as _0x403f07,CustomRangeType as _0x55c7fc,UniverInstanceType as _0x185fb6,DependentOn as _0x4ec335,IConfigService as _0x30003c,Plugin as _0xd075a6,merge as _0xcec0b5}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x51046f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x54638b,IThreadCommentDataSourceService as _0x39aa21}from'@univerjs/thread-comment';import{bufferTime as _0xade764}from'rxjs';import{HTTPService as _0x5c6d2d}from'@univerjs/network';const W=_0x1ab695(0x1a1);var I=(_0x10ded5=>(_0x10ded5[_0x10ded5[_0x1ab695(0x196)]=0x0]=_0x1ab695(0x196),_0x10ded5[_0x10ded5[_0x1ab695(0x177)]=0x1]='Solved',_0x10ded5[_0x10ded5[_0x1ab695(0x154)]=-0x1]='UNRECOGNIZED',_0x10ded5))(I||{}),v=(_0x5d8504=>(_0x5d8504[_0x5d8504[_0x1ab695(0x165)]=0x0]=_0x1ab695(0x165),_0x5d8504[_0x5d8504[_0x1ab695(0x169)]=0x1]=_0x1ab695(0x169),_0x5d8504[_0x5d8504[_0x1ab695(0x1b0)]=0x2]=_0x1ab695(0x1b0),_0x5d8504[_0x5d8504[_0x1ab695(0x1a7)]=0x3]=_0x1ab695(0x1a7),_0x5d8504[_0x5d8504[_0x1ab695(0x18f)]=0x4]='Delete',_0x5d8504[_0x5d8504['Solve']=0x5]=_0x1ab695(0x176),_0x5d8504[_0x5d8504['UNRECOGNIZED']=-0x1]=_0x1ab695(0x154),_0x5d8504))(v||{});const D=_0x735ab=>_0x2ee0ce(new Date(+_0x735ab))[_0x1ab695(0x17f)](_0x1ab695(0x194)),B=async(_0x45720d,_0x4f5406)=>{const _0x58ba0f=_0x1ab695,_0x21c5fb=_0x45720d[_0x58ba0f(0x192)](_0x491dce),_0x40c6cd=_0x45720d[_0x58ba0f(0x192)](_0x5c6d2d);_0x4f5406['forEach'](_0x282b27=>{const _0x180f4a=_0x58ba0f;_0x21c5fb['getUser'](_0x282b27)&&_0x4f5406[_0x180f4a(0x198)](_0x282b27);}),_0x4f5406[_0x58ba0f(0x1a4)]&&(await _0x40c6cd[_0x58ba0f(0x192)](_0x58ba0f(0x189),{'params':{'userIDs':[..._0x4f5406]}}))['body']['users'][_0x58ba0f(0x15b)](_0x224ff=>{const _0x1cedac=_0x58ba0f;_0x224ff&&_0x21c5fb[_0x1cedac(0x19f)](_0x224ff);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2e162b,_0x31db1f,_0x22c426,_0x28245c)=>{const _0x24adbc=_0x1ab695;for(var _0x4c8bd5=_0x28245c>0x1?void 0x0:_0x28245c?K(_0x31db1f,_0x22c426):_0x31db1f,_0x1dd158=_0x2e162b[_0x24adbc(0x1b2)]-0x1,_0x4a3921;_0x1dd158>=0x0;_0x1dd158--)(_0x4a3921=_0x2e162b[_0x1dd158])&&(_0x4c8bd5=_0x4a3921(_0x4c8bd5)||_0x4c8bd5);return _0x4c8bd5;},p=(_0x42fbc7,_0x349b84)=>(_0x627dd2,_0x425f42)=>_0x349b84(_0x627dd2,_0x425f42,_0x42fbc7);let S=class extends _0x403f07{constructor(_0x4aea70,_0x135039,_0x43e4c8,_0x37040e){const _0x51a8fd=_0x1ab695;super(),this[_0x51a8fd(0x1ab)]=_0x4aea70,this['_threadCommentModel']=_0x135039,this['_userService']=_0x43e4c8,this[_0x51a8fd(0x158)]=_0x37040e,this['_init'](),this[_0x51a8fd(0x15e)]();}['_initUserSync'](){const _0x4c3178=_0x1ab695;this[_0x4c3178(0x1ac)](this[_0x4c3178(0x1a0)][_0x4c3178(0x1b4)][_0x4c3178(0x173)](_0xade764(0x10))[_0x4c3178(0x187)](_0x4e6960=>{const _0x311b25=_0x4c3178,_0x36162e=new Set();_0x4e6960[_0x311b25(0x15b)](_0x3fb22d=>{const _0x2459d0=_0x311b25;switch(_0x3fb22d[_0x2459d0(0x186)]){case _0x2459d0(0x195):{const _0x2f4173=_0x3fb22d['payload'][_0x2459d0(0x19e)];_0x36162e[_0x2459d0(0x195)](_0x2f4173);break;}}}),B(this['_injector'],_0x36162e);}));}[_0x1ab695(0x164)](){const _0x3a97eb=_0x1ab695;this[_0x3a97eb(0x1ac)](this[_0x3a97eb(0x1ab)]['commentUpdate$']['subscribe'](async _0x388598=>{const _0x57f2d8=_0x3a97eb;var _0x450fef,_0x289362,_0x37d568,_0x41ef2a;const _0x5b60cd=(_0x450fef=this[_0x57f2d8(0x1a0)]['getUnit'](_0x388598['unitId'])['find'](_0x51502c=>_0x51502c[_0x57f2d8(0x1a5)]===_0x388598[_0x57f2d8(0x1a5)]))==null?void 0x0:_0x450fef['root'];if(!_0x5b60cd)return;const {unitId:_0x2bbc7a,subUnitId:_0x235d58}=_0x5b60cd;switch(_0x388598[_0x57f2d8(0x161)]&&this[_0x57f2d8(0x163)][_0x57f2d8(0x19f)](_0x388598[_0x57f2d8(0x161)]),_0x388598[_0x57f2d8(0x186)]){case v['Add']:break;case v['Reply']:{this[_0x57f2d8(0x1a0)][_0x57f2d8(0x172)](_0x2bbc7a,_0x235d58,{'unitId':_0x2bbc7a,'subUnitId':_0x235d58,'ref':'','id':_0x388598[_0x57f2d8(0x16d)],'dT':D(+_0x388598[_0x57f2d8(0x182)]),'threadId':_0x388598[_0x57f2d8(0x1a5)],'personId':(_0x37d568=(_0x289362=_0x388598[_0x57f2d8(0x161)])==null?void 0x0:_0x289362['userID'])!=null?_0x37d568:_0x388598[_0x57f2d8(0x181)],'text':JSON[_0x57f2d8(0x179)](_0x388598['content']),'parentId':_0x5b60cd['id']});break;}case v[_0x57f2d8(0x18f)]:{const _0x169d36=this[_0x57f2d8(0x1a0)][_0x57f2d8(0x17c)](_0x2bbc7a,_0x235d58,_0x388598[_0x57f2d8(0x16d)]);_0x169d36&&_0x169d36['parentId']&&this[_0x57f2d8(0x1a0)][_0x57f2d8(0x16a)](_0x2bbc7a,_0x235d58,_0x388598[_0x57f2d8(0x16d)]);break;}case v[_0x57f2d8(0x1a7)]:{this[_0x57f2d8(0x1a0)][_0x57f2d8(0x193)](_0x2bbc7a,_0x235d58,{'commentId':_0x388598[_0x57f2d8(0x16d)],'text':JSON[_0x57f2d8(0x179)](_0x388598['content'])});break;}case v[_0x57f2d8(0x176)]:{const _0x4ba43d=(_0x41ef2a=this[_0x57f2d8(0x1a0)][_0x57f2d8(0x19d)](_0x388598[_0x57f2d8(0x16f)])[_0x57f2d8(0x184)](_0x53d067=>_0x53d067['threadId']===_0x388598[_0x57f2d8(0x1a5)]))==null?void 0x0:_0x41ef2a['root'];_0x4ba43d&&this[_0x57f2d8(0x1a0)][_0x57f2d8(0x188)](_0x2bbc7a,_0x235d58,_0x4ba43d['id'],_0x388598['solved']===I[_0x57f2d8(0x177)]);break;}}}));}};S=V([p(0x0,_0x14d5a2(_0x2f1b6)),p(0x1,_0x14d5a2(_0x54638b)),p(0x2,_0x14d5a2(_0x491dce)),p(0x3,_0x14d5a2(_0x153703))],S);const z=_0x1ab695(0x162),M={};var k=Object[_0x1ab695(0x17a)],Q=(_0x4ff8df,_0x3b9800,_0x2db718,_0x3b9b2f)=>{const _0xf9c1bc=_0x1ab695;for(var _0x2698c9=_0x3b9b2f>0x1?void 0x0:_0x3b9b2f?k(_0x3b9800,_0x2db718):_0x3b9800,_0x3b21dd=_0x4ff8df[_0xf9c1bc(0x1b2)]-0x1,_0x103f85;_0x3b21dd>=0x0;_0x3b21dd--)(_0x103f85=_0x4ff8df[_0x3b21dd])&&(_0x2698c9=_0x103f85(_0x2698c9)||_0x2698c9);return _0x2698c9;},_=(_0x3eb845,_0x1f066e)=>(_0x3b8104,_0x5519b3)=>_0x1f066e(_0x3b8104,_0x5519b3,_0x3eb845);function X(_0x107474,_0x4de781){const _0x4016ff=_0x1ab695,_0x2474fb=_0x107474[_0x4016ff(0x1aa)][0x0];return{..._0x4de781,'id':_0x2474fb[_0x4016ff(0x16d)],'resolved':_0x107474[_0x4016ff(0x1b5)]===0x1,'dT':D(_0x2474fb[_0x4016ff(0x182)]),'personId':_0x2474fb['userId'],'threadId':_0x2474fb[_0x4016ff(0x1a5)]};}function _0x1577(){const _0x37f951=['body','Add','deleteComment','30phFFPC','/solved','replyId','_threadCommentDataSourceService','unitId','/delete','1755ZyqmvX','addComment','pipe','_httpService','content','Solve','Solved','requireSession','parse','getOwnPropertyDescriptor','/reply','getComment','pluginName','dataSource','format','COMMENT','userId','createTimestamp','customRanges','find','map','type','subscribe','resolveComment','/universer-api/user/list','symbol','9448IarCwX','stringify','_config','rangeType','Delete','defineProperty','post','get','updateComment','YYYY/MM/DD\x20HH:mm','add','OpenOrReOpen','getCurrentUser','delete','_sessionService','28AGMubT','_configService','895870vUegaF','getUnit','personId','addUser','_threadCommentModel','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','16EWFoLJ','/universer-api/comment/unit/','size','threadId','403134NChdRu','Edit','filter','users','replies','_commentService','disposeWithMe','rangeId','_initDataSource','error','Reply','6822761xcQhzz','length','/add','commentUpdate$','solved','269100reJCWZ','values','syncUpdateMutationToColla','onReady','UNRECOGNIZED','1960225FSRNPR','reply','code','_injector','getMemberID','setConfig','forEach','onStarting','comments','_initUserSync','comment','_threadCommentDataSource','user','thread-comment-data-source.config','_userService','_init','Unknown','slice','519415rwGyiA'];_0x1577=function(){return _0x37f951;};return _0x1577();}function ee(_0x138eab,_0x122584,_0x4d758b){const _0x1afbdc=_0x1ab695;var _0x3160ea,_0x544f5b;if(((_0x544f5b=(_0x3160ea=_0x138eab==null?void 0x0:_0x138eab[_0x1afbdc(0x1aa)])==null?void 0x0:_0x3160ea[_0x1afbdc(0x1b2)])!=null?_0x544f5b:0x0)>0x0){const _0x5a887e=(_0x2595c8,_0x4cb673)=>({'id':_0x2595c8[_0x1afbdc(0x16d)],'threadId':_0x2595c8[_0x1afbdc(0x1a5)],'dT':D(_0x2595c8[_0x1afbdc(0x182)]),'personId':_0x2595c8[_0x1afbdc(0x181)],'resolved':_0x138eab['solved']===I[_0x1afbdc(0x177)],'unitId':_0x122584,'subUnitId':_0x4d758b,'text':JSON[_0x1afbdc(0x179)](_0x2595c8[_0x1afbdc(0x175)]),'parentId':_0x4cb673}),_0x19300a=_0x5a887e(_0x138eab[_0x1afbdc(0x1aa)][0x0]);return{..._0x19300a,'children':_0x138eab['replies'][_0x1afbdc(0x166)](0x1)['map'](_0x304013=>_0x5a887e(_0x304013,_0x19300a['id']))};}return null;}let f=class{constructor(_0x3d12c2,_0x28ac34,_0xf4cd7a,_0x285dd1){const _0x209268=_0x1ab695;this[_0x209268(0x174)]=_0x3d12c2,this['_userService']=_0x28ac34,this[_0x209268(0x199)]=_0xf4cd7a,this['_injector']=_0x285dd1;}async[_0x1ab695(0x172)](_0x45b6a3){const _0x5373cd=_0x1ab695;var _0x1e8862,_0x2e0855;const {parentId:_0x38d4a5,unitId:_0x112310,text:_0x413995,threadId:_0x4ba364}=_0x45b6a3,_0x7cd92b=(_0x2e0855=(_0x1e8862=_0x413995[_0x5373cd(0x183)])==null?void 0x0:_0x1e8862[_0x5373cd(0x1a8)](_0x25bf04=>_0x25bf04[_0x5373cd(0x18e)]===_0x55c7fc[_0x5373cd(0x180)])[_0x5373cd(0x185)](_0x3b4d77=>_0x3b4d77[_0x5373cd(0x1ad)]))!=null?_0x2e0855:[],_0x33383b=JSON['stringify'](_0x413995),_0x19b24a=(await this[_0x5373cd(0x199)]['requireSession'](_0x112310))[_0x5373cd(0x159)]();if(_0x38d4a5){const _0x588734={'memberId':_0x19b24a,'unitId':_0x112310,'content':_0x33383b,'mention':_0x7cd92b,'threadId':_0x4ba364},_0x50fe6f=(await this[_0x5373cd(0x174)][_0x5373cd(0x191)]('/universer-api/comment/unit/'+_0x112310+_0x5373cd(0x17b),{'body':_0x588734}))['body'][_0x5373cd(0x156)];return{..._0x45b6a3,'id':_0x50fe6f[_0x5373cd(0x16d)],'dT':_0x2ee0ce(+_0x50fe6f['createTimestamp'])[_0x5373cd(0x17f)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x50fe6f[_0x5373cd(0x181)]};}else{const _0x585d18={'memberId':_0x19b24a,'unitId':_0x112310,'content':_0x33383b,'mention':_0x7cd92b},_0x576093=await this[_0x5373cd(0x174)][_0x5373cd(0x191)](_0x5373cd(0x1a3)+_0x112310+_0x5373cd(0x1b3),{'body':_0x585d18});return X(_0x576093[_0x5373cd(0x168)][_0x5373cd(0x15f)],_0x45b6a3);}}async['updateComment'](_0x43a065){const _0x3081b1=_0x1ab695;var _0x1237fd,_0x5411ae;const {text:_0x230e80,unitId:_0x4848a9}=_0x43a065,_0x2f50e1=(_0x5411ae=(_0x1237fd=_0x230e80[_0x3081b1(0x183)])==null?void 0x0:_0x1237fd[_0x3081b1(0x1a8)](_0x34223f=>_0x34223f[_0x3081b1(0x18e)]===_0x55c7fc[_0x3081b1(0x180)])[_0x3081b1(0x185)](_0x3cbf00=>_0x3cbf00[_0x3081b1(0x1ad)]))!=null?_0x5411ae:[],_0x46fe81=JSON[_0x3081b1(0x18c)](_0x230e80),_0x4c384c=_0x43a065['threadId'],_0x4d0bcb=_0x43a065['id'],_0x537004={'memberId':(await this[_0x3081b1(0x199)][_0x3081b1(0x178)](_0x4848a9))[_0x3081b1(0x159)](),'unitId':_0x4848a9,'threadId':_0x4c384c,'mention':_0x2f50e1,'content':_0x46fe81,'replyId':_0x4d0bcb},_0x48c915=await this[_0x3081b1(0x174)][_0x3081b1(0x191)]('/universer-api/comment/unit/'+_0x4848a9+'/edit',{'body':_0x537004});return!_0x48c915[_0x3081b1(0x168)][_0x3081b1(0x1af)]||_0x48c915[_0x3081b1(0x168)][_0x3081b1(0x1af)][_0x3081b1(0x157)]===0x1;}async['resolveComment'](_0x3c8ede){const _0x4c7644=_0x1ab695,{unitId:_0x4cc7ab}=_0x3c8ede,_0x2a11e1=_0x3c8ede[_0x4c7644(0x1a5)],_0x1923c2={'memberId':this[_0x4c7644(0x163)][_0x4c7644(0x197)]()['userID'],'unitId':_0x4cc7ab,'threadId':_0x2a11e1,'solved':_0x3c8ede['resolved']?I[_0x4c7644(0x177)]:I['OpenOrReOpen']},_0xd6e238=await this[_0x4c7644(0x174)]['post'](_0x4c7644(0x1a3)+_0x4cc7ab+_0x4c7644(0x16c),{'body':_0x1923c2});return!_0xd6e238[_0x4c7644(0x168)][_0x4c7644(0x1af)]||_0xd6e238[_0x4c7644(0x168)]['error'][_0x4c7644(0x157)]===0x1;}async['deleteComment'](_0x2ba062,_0x2a40c3,_0xb4a3e4,_0x24da83){const _0x47468f=_0x1ab695,_0x499a1c={'memberId':(await this[_0x47468f(0x199)]['requireSession'](_0x2ba062))[_0x47468f(0x159)](),'threadId':_0xb4a3e4,'replyId':_0x24da83,'unitId':_0x2ba062},_0x5e74f1=await this['_httpService'][_0x47468f(0x191)](_0x47468f(0x1a3)+_0x2ba062+_0x47468f(0x170),{'body':_0x499a1c});return!_0x5e74f1[_0x47468f(0x168)][_0x47468f(0x1af)]||_0x5e74f1[_0x47468f(0x168)][_0x47468f(0x1af)]['code']===0x1;}async['listComments'](_0x459d45,_0x159614,_0x53bef4){const _0x525291=_0x1ab695,_0x48c014={'unitId':_0x459d45,'threadId':_0x53bef4},_0x2b49f7=await this['_httpService'][_0x525291(0x191)](_0x525291(0x1a3)+_0x459d45+'/list',{'body':_0x48c014}),_0x214cfb=_0x53bef4[_0x525291(0x185)](_0x1bcdb0=>ee(_0x2b49f7['body'][_0x525291(0x15d)][_0x1bcdb0],_0x459d45,_0x159614))[_0x525291(0x1a8)](Boolean);return Object[_0x525291(0x151)](_0x2b49f7[_0x525291(0x168)][_0x525291(0x1a9)])[_0x525291(0x15b)](_0x30cff2=>{const _0x5bc31b=_0x525291;this[_0x5bc31b(0x163)]['addUser'](_0x30cff2);}),_0x214cfb;}['saveCommentToSnapshot'](_0x487af0){const _0x2ac8ad=_0x1ab695;return{'id':_0x487af0['id'],'threadId':_0x487af0[_0x2ac8ad(0x1a5)],'ref':_0x487af0['ref']};}};f=Q([_(0x0,_0x14d5a2(_0x5c6d2d)),_(0x1,_0x14d5a2(_0x491dce)),_(0x2,_0x14d5a2(_0x296507)),_(0x3,_0x14d5a2(_0x153703))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x1c2fa3,_0x4927be,_0x4ef321,_0x44c339)=>{const _0x5ce6c7=_0x1ab695;for(var _0x40c9cd=_0x44c339>0x1?void 0x0:_0x44c339?re(_0x4927be,_0x4ef321):_0x4927be,_0x56953f=_0x1c2fa3[_0x5ce6c7(0x1b2)]-0x1,_0x2b99ae;_0x56953f>=0x0;_0x56953f--)(_0x2b99ae=_0x1c2fa3[_0x56953f])&&(_0x40c9cd=_0x2b99ae(_0x40c9cd)||_0x40c9cd);return _0x40c9cd;},N=(_0x1fc20e,_0x1bacde)=>(_0x3de11b,_0x187ab8)=>_0x1bacde(_0x3de11b,_0x187ab8,_0x1fc20e);let g=class extends _0x403f07{constructor(_0x5a2b3a,_0x5c6ed9){const _0x3dfca6=_0x1ab695;super(),this[_0x3dfca6(0x16e)]=_0x5a2b3a,this[_0x3dfca6(0x160)]=_0x5c6ed9,this[_0x3dfca6(0x1ae)]();}[_0x1ab695(0x1ae)](){const _0x2fb5f0=_0x1ab695;this[_0x2fb5f0(0x16e)][_0x2fb5f0(0x17e)]=this[_0x2fb5f0(0x160)],this[_0x2fb5f0(0x16e)][_0x2fb5f0(0x152)]=!0x1;}};g=te([N(0x0,_0x39aa21),N(0x1,_0x14d5a2(f))],g);var se=Object[_0x1ab695(0x190)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1b5a5e,_0x5eb963,_0x24fe2e)=>_0x5eb963 in _0x1b5a5e?se(_0x1b5a5e,_0x5eb963,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x24fe2e}):_0x1b5a5e[_0x5eb963]=_0x24fe2e,ie=(_0xaf5e83,_0x5b198a,_0x51eac5,_0x1fc84b)=>{const _0x1dbb22=_0x1ab695;for(var _0x3ae77e=_0x1fc84b>0x1?void 0x0:_0x1fc84b?oe(_0x5b198a,_0x51eac5):_0x5b198a,_0x2691cd=_0xaf5e83[_0x1dbb22(0x1b2)]-0x1,_0x240b95;_0x2691cd>=0x0;_0x2691cd--)(_0x240b95=_0xaf5e83[_0x2691cd])&&(_0x3ae77e=_0x240b95(_0x3ae77e)||_0x3ae77e);return _0x3ae77e;},w=(_0x36f444,_0x4f30f4)=>(_0x50d765,_0x578233)=>_0x4f30f4(_0x50d765,_0x578233,_0x36f444),$=(_0x5a6225,_0x154102,_0x537b3e)=>ne(_0x5a6225,typeof _0x154102!=_0x1ab695(0x18a)?_0x154102+'':_0x154102,_0x537b3e);let b=class extends _0xd075a6{constructor(_0x1aedbe=M,_0x1d9862,_0x5e0767){const _0x318f68=_0x1ab695;super(),this[_0x318f68(0x18d)]=_0x1aedbe,this['_injector']=_0x1d9862,this[_0x318f68(0x19b)]=_0x5e0767;const {..._0x3b0bb4}=_0xcec0b5({},M,this[_0x318f68(0x18d)]);this[_0x318f68(0x19b)][_0x318f68(0x15a)](z,_0x3b0bb4);}[_0x1ab695(0x15c)](){const _0x2195e4=_0x1ab695;[[f],[g],[S]][_0x2195e4(0x15b)](_0x319202=>{const _0x129a45=_0x2195e4;this[_0x129a45(0x158)]['add'](_0x319202);});}[_0x1ab695(0x153)](){const _0x103445=_0x1ab695;this['_injector'][_0x103445(0x192)](g),this['_injector'][_0x103445(0x192)](S);}};$(b,_0x1ab695(0x17d),W),$(b,_0x1ab695(0x186),_0x185fb6['UNIVER_UNKNOWN']),b=ie([_0x4ec335(_0x51046f,_0x215a50,_0x59e42c),w(0x1,_0x14d5a2(_0x153703)),w(0x2,_0x30003c)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ function _0x1735(_0x778d9a,_0x1c306c){const _0x23e795=_0x23e7();return _0x1735=function(_0x173590,_0x359c10){_0x173590=_0x173590-0x14e;let _0xa0a074=_0x23e795[_0x173590];return _0xa0a074;},_0x1735(_0x778d9a,_0x1c306c);}const _0x116374=_0x1735;(function(_0x26eb43,_0x3f69dd){const _0x5b2552=_0x1735,_0x515c47=_0x26eb43();while(!![]){try{const _0x148429=-parseInt(_0x5b2552(0x1a9))/0x1*(parseInt(_0x5b2552(0x15b))/0x2)+parseInt(_0x5b2552(0x180))/0x3+-parseInt(_0x5b2552(0x1a4))/0x4+-parseInt(_0x5b2552(0x190))/0x5*(parseInt(_0x5b2552(0x162))/0x6)+-parseInt(_0x5b2552(0x1a3))/0x7+parseInt(_0x5b2552(0x174))/0x8*(parseInt(_0x5b2552(0x150))/0x9)+parseInt(_0x5b2552(0x19d))/0xa;if(_0x148429===_0x3f69dd)break;else _0x515c47['push'](_0x515c47['shift']());}catch(_0x11ab6b){_0x515c47['push'](_0x515c47['shift']());}}}(_0x23e7,0x76571));import{CommentService as _0x2aeaf0,CollaborationSessionService as _0x3affa4,UniverCollaborationClientPlugin as _0x30e333}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x187856}from'@univerjs-pro/license';import{dayjs as _0x35302d,UserManagerService as _0x3dd59f,Inject as _0x2edfc9,Injector as _0x348e3e,Disposable as _0x5700d0,CustomRangeType as _0x56b39f,UniverInstanceType as _0x2b4fac,DependentOn as _0x50dc84,IConfigService as _0x136480,Plugin as _0x11dac9,merge as _0x150f9d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x19c732}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xf188f2,IThreadCommentDataSourceService as _0x6d41c1}from'@univerjs/thread-comment';import{bufferTime as _0x175c95}from'rxjs';import{HTTPService as _0x53d244}from'@univerjs/network';const W=_0x116374(0x179);var I=(_0x48e472=>(_0x48e472[_0x48e472[_0x116374(0x18a)]=0x0]=_0x116374(0x18a),_0x48e472[_0x48e472[_0x116374(0x175)]=0x1]=_0x116374(0x175),_0x48e472[_0x48e472[_0x116374(0x193)]=-0x1]=_0x116374(0x193),_0x48e472))(I||{}),v=(_0x50b41f=>(_0x50b41f[_0x50b41f['Unknown']=0x0]='Unknown',_0x50b41f[_0x50b41f[_0x116374(0x187)]=0x1]='Add',_0x50b41f[_0x50b41f['Reply']=0x2]=_0x116374(0x195),_0x50b41f[_0x50b41f[_0x116374(0x160)]=0x3]=_0x116374(0x160),_0x50b41f[_0x50b41f[_0x116374(0x18d)]=0x4]='Delete',_0x50b41f[_0x50b41f[_0x116374(0x1a0)]=0x5]=_0x116374(0x1a0),_0x50b41f[_0x50b41f['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x50b41f))(v||{});const D=_0x34c161=>_0x35302d(new Date(+_0x34c161))[_0x116374(0x199)](_0x116374(0x14e)),B=async(_0x40db99,_0x475f0b)=>{const _0xf8b387=_0x116374,_0x270f7a=_0x40db99[_0xf8b387(0x15c)](_0x3dd59f),_0x2f80de=_0x40db99[_0xf8b387(0x15c)](_0x53d244);_0x475f0b[_0xf8b387(0x1ac)](_0x3e35ee=>{const _0x439cec=_0xf8b387;_0x270f7a[_0x439cec(0x1a5)](_0x3e35ee)&&_0x475f0b[_0x439cec(0x1ae)](_0x3e35ee);}),_0x475f0b[_0xf8b387(0x18c)]&&(await _0x2f80de[_0xf8b387(0x15c)](_0xf8b387(0x194),{'params':{'userIDs':[..._0x475f0b]}}))['body']['users'][_0xf8b387(0x1ac)](_0x4a69a5=>{const _0xa2bc8=_0xf8b387;_0x4a69a5&&_0x270f7a[_0xa2bc8(0x17b)](_0x4a69a5);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x13929a,_0x506617,_0x412337,_0x231677)=>{const _0x1bd7d2=_0x116374;for(var _0x46b080=_0x231677>0x1?void 0x0:_0x231677?K(_0x506617,_0x412337):_0x506617,_0x32c7ca=_0x13929a[_0x1bd7d2(0x197)]-0x1,_0x4e0438;_0x32c7ca>=0x0;_0x32c7ca--)(_0x4e0438=_0x13929a[_0x32c7ca])&&(_0x46b080=_0x4e0438(_0x46b080)||_0x46b080);return _0x46b080;},p=(_0x1b22dc,_0x519dff)=>(_0xde4d01,_0x5b223b)=>_0x519dff(_0xde4d01,_0x5b223b,_0x1b22dc);let S=class extends _0x5700d0{constructor(_0x1c00a7,_0x2b10ec,_0x145751,_0x3d6de2){const _0x2754fa=_0x116374;super(),this['_commentService']=_0x1c00a7,this[_0x2754fa(0x188)]=_0x2b10ec,this[_0x2754fa(0x17f)]=_0x145751,this[_0x2754fa(0x17e)]=_0x3d6de2,this[_0x2754fa(0x1ad)](),this[_0x2754fa(0x171)]();}[_0x116374(0x171)](){const _0x5c2dce=_0x116374;this[_0x5c2dce(0x14f)](this[_0x5c2dce(0x188)][_0x5c2dce(0x17c)][_0x5c2dce(0x17a)](_0x175c95(0x10))[_0x5c2dce(0x177)](_0x3d117b=>{const _0x2fb3fe=_0x5c2dce,_0xdbd7db=new Set();_0x3d117b[_0x2fb3fe(0x1ac)](_0x1f1c71=>{const _0x3afc58=_0x2fb3fe;switch(_0x1f1c71[_0x3afc58(0x19f)]){case _0x3afc58(0x17d):{const _0x381b08=_0x1f1c71[_0x3afc58(0x15f)]['personId'];_0xdbd7db[_0x3afc58(0x17d)](_0x381b08);break;}}}),B(this[_0x2fb3fe(0x17e)],_0xdbd7db);}));}[_0x116374(0x1ad)](){const _0x103284=_0x116374;this[_0x103284(0x14f)](this['_commentService']['commentUpdate$'][_0x103284(0x177)](async _0x8cd26f=>{const _0x1bdeac=_0x103284;var _0x572d65,_0x200475,_0x3bf3b8,_0x81f1d4;const _0x5e8e58=(_0x572d65=this[_0x1bdeac(0x188)][_0x1bdeac(0x1a7)](_0x8cd26f[_0x1bdeac(0x1a1)])[_0x1bdeac(0x196)](_0x34a130=>_0x34a130[_0x1bdeac(0x15e)]===_0x8cd26f[_0x1bdeac(0x15e)]))==null?void 0x0:_0x572d65[_0x1bdeac(0x198)];if(!_0x5e8e58)return;const {unitId:_0x15f5f1,subUnitId:_0x2745ed}=_0x5e8e58;switch(_0x8cd26f['user']&&this['_userService'][_0x1bdeac(0x17b)](_0x8cd26f[_0x1bdeac(0x15d)]),_0x8cd26f['type']){case v['Add']:break;case v[_0x1bdeac(0x195)]:{this[_0x1bdeac(0x188)][_0x1bdeac(0x1aa)](_0x15f5f1,_0x2745ed,{'unitId':_0x15f5f1,'subUnitId':_0x2745ed,'ref':'','id':_0x8cd26f[_0x1bdeac(0x16b)],'dT':D(+_0x8cd26f[_0x1bdeac(0x181)]),'threadId':_0x8cd26f[_0x1bdeac(0x15e)],'personId':(_0x3bf3b8=(_0x200475=_0x8cd26f[_0x1bdeac(0x15d)])==null?void 0x0:_0x200475[_0x1bdeac(0x155)])!=null?_0x3bf3b8:_0x8cd26f[_0x1bdeac(0x1a8)],'text':JSON[_0x1bdeac(0x166)](_0x8cd26f[_0x1bdeac(0x186)]),'parentId':_0x5e8e58['id']});break;}case v[_0x1bdeac(0x18d)]:{const _0x4e6d88=this['_threadCommentModel'][_0x1bdeac(0x1af)](_0x15f5f1,_0x2745ed,_0x8cd26f[_0x1bdeac(0x16b)]);_0x4e6d88&&_0x4e6d88[_0x1bdeac(0x16e)]&&this[_0x1bdeac(0x188)][_0x1bdeac(0x18b)](_0x15f5f1,_0x2745ed,_0x8cd26f['replyId']);break;}case v[_0x1bdeac(0x160)]:{this['_threadCommentModel'][_0x1bdeac(0x151)](_0x15f5f1,_0x2745ed,{'commentId':_0x8cd26f['replyId'],'text':JSON[_0x1bdeac(0x166)](_0x8cd26f['content'])});break;}case v[_0x1bdeac(0x1a0)]:{const _0x201a48=(_0x81f1d4=this[_0x1bdeac(0x188)]['getUnit'](_0x8cd26f[_0x1bdeac(0x1a1)])['find'](_0x8af8ef=>_0x8af8ef[_0x1bdeac(0x15e)]===_0x8cd26f[_0x1bdeac(0x15e)]))==null?void 0x0:_0x81f1d4[_0x1bdeac(0x198)];_0x201a48&&this[_0x1bdeac(0x188)][_0x1bdeac(0x169)](_0x15f5f1,_0x2745ed,_0x201a48['id'],_0x8cd26f[_0x1bdeac(0x167)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x2edfc9(_0x2aeaf0)),p(0x1,_0x2edfc9(_0xf188f2)),p(0x2,_0x2edfc9(_0x3dd59f)),p(0x3,_0x2edfc9(_0x348e3e))],S);const z=_0x116374(0x1a6),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x2cad97,_0x6f6385,_0x150dce,_0x23857a)=>{for(var _0x1dbb96=_0x23857a>0x1?void 0x0:_0x23857a?k(_0x6f6385,_0x150dce):_0x6f6385,_0x17df6d=_0x2cad97['length']-0x1,_0xa4edc2;_0x17df6d>=0x0;_0x17df6d--)(_0xa4edc2=_0x2cad97[_0x17df6d])&&(_0x1dbb96=_0xa4edc2(_0x1dbb96)||_0x1dbb96);return _0x1dbb96;},_=(_0x5c6a68,_0x1d25d1)=>(_0x81adca,_0x3f0690)=>_0x1d25d1(_0x81adca,_0x3f0690,_0x5c6a68);function X(_0x707c11,_0x16def3){const _0x488570=_0x116374,_0x4f717f=_0x707c11[_0x488570(0x19e)][0x0];return{..._0x16def3,'id':_0x4f717f[_0x488570(0x16b)],'resolved':_0x707c11[_0x488570(0x167)]===0x1,'dT':D(_0x4f717f[_0x488570(0x181)]),'personId':_0x4f717f[_0x488570(0x1a8)],'threadId':_0x4f717f[_0x488570(0x15e)]};}function ee(_0x4bfacf,_0x203f22,_0x49d656){const _0x23943a=_0x116374;var _0x3927f5,_0x4e01bf;if(((_0x4e01bf=(_0x3927f5=_0x4bfacf==null?void 0x0:_0x4bfacf[_0x23943a(0x19e)])==null?void 0x0:_0x3927f5[_0x23943a(0x197)])!=null?_0x4e01bf:0x0)>0x0){const _0x1355d0=(_0x320949,_0x501c56)=>({'id':_0x320949[_0x23943a(0x16b)],'threadId':_0x320949[_0x23943a(0x15e)],'dT':D(_0x320949[_0x23943a(0x181)]),'personId':_0x320949[_0x23943a(0x1a8)],'resolved':_0x4bfacf[_0x23943a(0x167)]===I['Solved'],'unitId':_0x203f22,'subUnitId':_0x49d656,'text':JSON[_0x23943a(0x166)](_0x320949[_0x23943a(0x186)]),'parentId':_0x501c56}),_0x5ad73a=_0x1355d0(_0x4bfacf['replies'][0x0]);return{..._0x5ad73a,'children':_0x4bfacf['replies']['slice'](0x1)[_0x23943a(0x159)](_0x5c24d1=>_0x1355d0(_0x5c24d1,_0x5ad73a['id']))};}return null;}let f=class{constructor(_0x20d50f,_0x21b918,_0x469c96,_0x1347cd){const _0x14282a=_0x116374;this[_0x14282a(0x1b0)]=_0x20d50f,this['_userService']=_0x21b918,this[_0x14282a(0x176)]=_0x469c96,this[_0x14282a(0x17e)]=_0x1347cd;}async[_0x116374(0x1aa)](_0x1739a1){const _0x324369=_0x116374;var _0x1434cd,_0x3ba30b;const {parentId:_0x283db9,unitId:_0x422fb3,text:_0x448c94,threadId:_0x3c0bae}=_0x1739a1,_0x30f165=(_0x3ba30b=(_0x1434cd=_0x448c94[_0x324369(0x16d)])==null?void 0x0:_0x1434cd['filter'](_0x5e21d4=>_0x5e21d4[_0x324369(0x172)]===_0x56b39f[_0x324369(0x16c)])[_0x324369(0x159)](_0x271869=>_0x271869[_0x324369(0x1ab)]))!=null?_0x3ba30b:[],_0xa817c3=JSON[_0x324369(0x170)](_0x448c94),_0x57a03d=(await this[_0x324369(0x176)][_0x324369(0x158)](_0x422fb3))[_0x324369(0x189)]();if(_0x283db9){const _0x365756={'memberId':_0x57a03d,'unitId':_0x422fb3,'content':_0xa817c3,'mention':_0x30f165,'threadId':_0x3c0bae},_0x6257be=(await this[_0x324369(0x1b0)][_0x324369(0x183)](_0x324369(0x182)+_0x422fb3+'/reply',{'body':_0x365756}))[_0x324369(0x154)][_0x324369(0x18f)];return{..._0x1739a1,'id':_0x6257be[_0x324369(0x16b)],'dT':_0x35302d(+_0x6257be[_0x324369(0x181)])[_0x324369(0x199)](_0x324369(0x14e)),'personId':_0x6257be[_0x324369(0x1a8)]};}else{const _0x4d8812={'memberId':_0x57a03d,'unitId':_0x422fb3,'content':_0xa817c3,'mention':_0x30f165},_0x2cdfed=await this[_0x324369(0x1b0)][_0x324369(0x183)](_0x324369(0x182)+_0x422fb3+'/add',{'body':_0x4d8812});return X(_0x2cdfed['body'][_0x324369(0x15a)],_0x1739a1);}}async[_0x116374(0x151)](_0x23ac2e){const _0x30f721=_0x116374;var _0x509e8d,_0x471e59;const {text:_0x468c62,unitId:_0x3650dd}=_0x23ac2e,_0xe4063d=(_0x471e59=(_0x509e8d=_0x468c62['customRanges'])==null?void 0x0:_0x509e8d['filter'](_0x2111af=>_0x2111af['rangeType']===_0x56b39f[_0x30f721(0x16c)])['map'](_0x54583a=>_0x54583a[_0x30f721(0x1ab)]))!=null?_0x471e59:[],_0x2b6678=JSON[_0x30f721(0x170)](_0x468c62),_0x5342b8=_0x23ac2e['threadId'],_0x2bb4f1=_0x23ac2e['id'],_0x2cc32c={'memberId':(await this['_sessionService']['requireSession'](_0x3650dd))[_0x30f721(0x189)](),'unitId':_0x3650dd,'threadId':_0x5342b8,'mention':_0xe4063d,'content':_0x2b6678,'replyId':_0x2bb4f1},_0x45e27a=await this[_0x30f721(0x1b0)][_0x30f721(0x183)](_0x30f721(0x182)+_0x3650dd+_0x30f721(0x185),{'body':_0x2cc32c});return!_0x45e27a[_0x30f721(0x154)]['error']||_0x45e27a[_0x30f721(0x154)][_0x30f721(0x157)][_0x30f721(0x16f)]===0x1;}async[_0x116374(0x169)](_0x122aef){const _0x135b1f=_0x116374,{unitId:_0x5f274b}=_0x122aef,_0x1a9a1b=_0x122aef[_0x135b1f(0x15e)],_0x3d4bee={'memberId':this['_userService'][_0x135b1f(0x1a2)]()['userID'],'unitId':_0x5f274b,'threadId':_0x1a9a1b,'solved':_0x122aef[_0x135b1f(0x153)]?I[_0x135b1f(0x175)]:I[_0x135b1f(0x18a)]},_0xe08d89=await this['_httpService'][_0x135b1f(0x183)](_0x135b1f(0x182)+_0x5f274b+_0x135b1f(0x19a),{'body':_0x3d4bee});return!_0xe08d89[_0x135b1f(0x154)][_0x135b1f(0x157)]||_0xe08d89[_0x135b1f(0x154)][_0x135b1f(0x157)][_0x135b1f(0x16f)]===0x1;}async[_0x116374(0x18b)](_0x4c52d9,_0x593095,_0x7a0b28,_0x25c531){const _0x146f79=_0x116374,_0x1a18e9={'memberId':(await this[_0x146f79(0x176)][_0x146f79(0x158)](_0x4c52d9))[_0x146f79(0x189)](),'threadId':_0x7a0b28,'replyId':_0x25c531,'unitId':_0x4c52d9},_0x3bc7ee=await this['_httpService'][_0x146f79(0x183)](_0x146f79(0x182)+_0x4c52d9+_0x146f79(0x19b),{'body':_0x1a18e9});return!_0x3bc7ee[_0x146f79(0x154)][_0x146f79(0x157)]||_0x3bc7ee[_0x146f79(0x154)][_0x146f79(0x157)][_0x146f79(0x16f)]===0x1;}async['listComments'](_0x32b5ff,_0xca5af3,_0x5318a4){const _0x2379e5=_0x116374,_0x4be2ef={'unitId':_0x32b5ff,'threadId':_0x5318a4},_0x106ecf=await this[_0x2379e5(0x1b0)][_0x2379e5(0x183)]('/universer-api/comment/unit/'+_0x32b5ff+_0x2379e5(0x152),{'body':_0x4be2ef}),_0x16bb9a=_0x5318a4['map'](_0x1014a3=>ee(_0x106ecf[_0x2379e5(0x154)][_0x2379e5(0x173)][_0x1014a3],_0x32b5ff,_0xca5af3))['filter'](Boolean);return Object['values'](_0x106ecf[_0x2379e5(0x154)][_0x2379e5(0x16a)])[_0x2379e5(0x1ac)](_0x5b09d5=>{const _0x443159=_0x2379e5;this[_0x443159(0x17f)]['addUser'](_0x5b09d5);}),_0x16bb9a;}[_0x116374(0x19c)](_0x215c21){const _0x179729=_0x116374;return{'id':_0x215c21['id'],'threadId':_0x215c21[_0x179729(0x15e)],'ref':_0x215c21[_0x179729(0x164)]};}};f=Q([_(0x0,_0x2edfc9(_0x53d244)),_(0x1,_0x2edfc9(_0x3dd59f)),_(0x2,_0x2edfc9(_0x3affa4)),_(0x3,_0x2edfc9(_0x348e3e))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x12cf35,_0x3d7be7,_0x53eab4,_0x2a0d30)=>{for(var _0x34a019=_0x2a0d30>0x1?void 0x0:_0x2a0d30?re(_0x3d7be7,_0x53eab4):_0x3d7be7,_0x583e10=_0x12cf35['length']-0x1,_0xdba7c3;_0x583e10>=0x0;_0x583e10--)(_0xdba7c3=_0x12cf35[_0x583e10])&&(_0x34a019=_0xdba7c3(_0x34a019)||_0x34a019);return _0x34a019;},N=(_0x4242ae,_0xa0f25)=>(_0x56bdc7,_0x4ae986)=>_0xa0f25(_0x56bdc7,_0x4ae986,_0x4242ae);let g=class extends _0x5700d0{constructor(_0x1efbad,_0x3f4476){const _0x7959cd=_0x116374;super(),this[_0x7959cd(0x165)]=_0x1efbad,this[_0x7959cd(0x191)]=_0x3f4476,this['_initDataSource']();}['_initDataSource'](){const _0x4fdb0c=_0x116374;this['_threadCommentDataSourceService']['dataSource']=this[_0x4fdb0c(0x191)],this[_0x4fdb0c(0x165)][_0x4fdb0c(0x168)]=!0x1;}};g=te([N(0x0,_0x6d41c1),N(0x1,_0x2edfc9(f))],g);var se=Object['defineProperty'],oe=Object[_0x116374(0x184)],ne=(_0x1b4eb1,_0x2595c4,_0xeb91c0)=>_0x2595c4 in _0x1b4eb1?se(_0x1b4eb1,_0x2595c4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xeb91c0}):_0x1b4eb1[_0x2595c4]=_0xeb91c0,ie=(_0x57dd14,_0x61d335,_0xe3efff,_0xa2f0e2)=>{const _0x326a4d=_0x116374;for(var _0x1a7e36=_0xa2f0e2>0x1?void 0x0:_0xa2f0e2?oe(_0x61d335,_0xe3efff):_0x61d335,_0xc93381=_0x57dd14[_0x326a4d(0x197)]-0x1,_0x389a49;_0xc93381>=0x0;_0xc93381--)(_0x389a49=_0x57dd14[_0xc93381])&&(_0x1a7e36=_0x389a49(_0x1a7e36)||_0x1a7e36);return _0x1a7e36;},w=(_0x226709,_0x103323)=>(_0x4b2a49,_0x2380af)=>_0x103323(_0x4b2a49,_0x2380af,_0x226709),$=(_0x258fd7,_0x47eb50,_0x343202)=>ne(_0x258fd7,typeof _0x47eb50!=_0x116374(0x178)?_0x47eb50+'':_0x47eb50,_0x343202);let b=class extends _0x11dac9{constructor(_0x2816b6=M,_0xe0c638,_0x1c6c1d){const _0x5373d2=_0x116374;super(),this[_0x5373d2(0x161)]=_0x2816b6,this['_injector']=_0xe0c638,this[_0x5373d2(0x163)]=_0x1c6c1d;const {..._0xefe40e}=_0x150f9d({},M,this[_0x5373d2(0x161)]);this['_configService'][_0x5373d2(0x192)](z,_0xefe40e);}['onStarting'](){const _0x49448a=_0x116374;[[f],[g],[S]][_0x49448a(0x1ac)](_0x33aa6b=>{const _0x6e829f=_0x49448a;this[_0x6e829f(0x17e)][_0x6e829f(0x17d)](_0x33aa6b);});}[_0x116374(0x156)](){const _0x11aadd=_0x116374;this[_0x11aadd(0x17e)][_0x11aadd(0x15c)](g),this[_0x11aadd(0x17e)][_0x11aadd(0x15c)](S);}};$(b,'pluginName',W),$(b,_0x116374(0x19f),_0x2b4fac[_0x116374(0x18e)]),b=ie([_0x50dc84(_0x19c732,_0x30e333,_0x187856),w(0x1,_0x2edfc9(_0x348e3e)),w(0x2,_0x136480)],b);export{b as UniverThreadCommentDataSourcePlugin};function _0x23e7(){const _0xc3551=['size','Delete','UNIVER_UNKNOWN','reply','95uEDwRV','_threadCommentDataSource','setConfig','UNRECOGNIZED','/universer-api/user/list','Reply','find','length','root','format','/solved','/delete','saveCommentToSnapshot','15259900gvRydS','replies','type','Solve','unitId','getCurrentUser','6271867PuqDmH','1772416YhzFes','getUser','thread-comment-data-source.config','getUnit','userId','994JXGTuA','addComment','rangeId','forEach','_init','delete','getComment','_httpService','YYYY/MM/DD\x20HH:mm','disposeWithMe','101844VRVIQV','updateComment','/list','resolved','body','userID','onReady','error','requireSession','map','comment','538SWsdiY','get','user','threadId','payload','Edit','_config','27738rcTfNH','_configService','ref','_threadCommentDataSourceService','parse','solved','syncUpdateMutationToColla','resolveComment','users','replyId','COMMENT','customRanges','parentId','code','stringify','_initUserSync','rangeType','comments','24GZLJFy','Solved','_sessionService','subscribe','symbol','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','pipe','addUser','commentUpdate$','add','_injector','_userService','1857273JsZHbq','createTimestamp','/universer-api/comment/unit/','post','getOwnPropertyDescriptor','/edit','content','Add','_threadCommentModel','getMemberID','OpenOrReOpen','deleteComment'];_0x23e7=function(){return _0xc3551;};return _0x23e7();}
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x1ab695=_0x5c8a;(function(_0x5a823a,_0x5e761d){const _0xc27562=_0x5c8a,_0x28e648=_0x5a823a();while(!![]){try{const _0x2cf62d=-parseInt(_0xc27562(0x167))/0x1+-parseInt(_0xc27562(0x19c))/0x2+parseInt(_0xc27562(0x1a6))/0x3*(-parseInt(_0xc27562(0x1a2))/0x4)+parseInt(_0xc27562(0x155))/0x5+parseInt(_0xc27562(0x1b6))/0x6*(-parseInt(_0xc27562(0x19a))/0x7)+-parseInt(_0xc27562(0x18b))/0x8*(parseInt(_0xc27562(0x171))/0x9)+-parseInt(_0xc27562(0x16b))/0xa*(-parseInt(_0xc27562(0x1b1))/0xb);if(_0x2cf62d===_0x5e761d)break;else _0x28e648['push'](_0x28e648['shift']());}catch(_0x91ef88){_0x28e648['push'](_0x28e648['shift']());}}}(_0x1577,0x52941));import{CommentService as _0x2f1b6,CollaborationSessionService as _0x296507,UniverCollaborationClientPlugin as _0x215a50}from'@univerjs-pro/collaboration-client';function _0x5c8a(_0x213d84,_0xc1e0aa){const _0x1577ff=_0x1577();return _0x5c8a=function(_0x5c8a70,_0x38170c){_0x5c8a70=_0x5c8a70-0x151;let _0x2c9b54=_0x1577ff[_0x5c8a70];return _0x2c9b54;},_0x5c8a(_0x213d84,_0xc1e0aa);}import{UniverLicensePlugin as _0x59e42c}from'@univerjs-pro/license';import{dayjs as _0x2ee0ce,UserManagerService as _0x491dce,Inject as _0x14d5a2,Injector as _0x153703,Disposable as _0x403f07,CustomRangeType as _0x55c7fc,UniverInstanceType as _0x185fb6,DependentOn as _0x4ec335,IConfigService as _0x30003c,Plugin as _0xd075a6,merge as _0xcec0b5}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x51046f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x54638b,IThreadCommentDataSourceService as _0x39aa21}from'@univerjs/thread-comment';import{bufferTime as _0xade764}from'rxjs';import{HTTPService as _0x5c6d2d}from'@univerjs/network';const W=_0x1ab695(0x1a1);var I=(_0x10ded5=>(_0x10ded5[_0x10ded5[_0x1ab695(0x196)]=0x0]=_0x1ab695(0x196),_0x10ded5[_0x10ded5[_0x1ab695(0x177)]=0x1]='Solved',_0x10ded5[_0x10ded5[_0x1ab695(0x154)]=-0x1]='UNRECOGNIZED',_0x10ded5))(I||{}),v=(_0x5d8504=>(_0x5d8504[_0x5d8504[_0x1ab695(0x165)]=0x0]=_0x1ab695(0x165),_0x5d8504[_0x5d8504[_0x1ab695(0x169)]=0x1]=_0x1ab695(0x169),_0x5d8504[_0x5d8504[_0x1ab695(0x1b0)]=0x2]=_0x1ab695(0x1b0),_0x5d8504[_0x5d8504[_0x1ab695(0x1a7)]=0x3]=_0x1ab695(0x1a7),_0x5d8504[_0x5d8504[_0x1ab695(0x18f)]=0x4]='Delete',_0x5d8504[_0x5d8504['Solve']=0x5]=_0x1ab695(0x176),_0x5d8504[_0x5d8504['UNRECOGNIZED']=-0x1]=_0x1ab695(0x154),_0x5d8504))(v||{});const D=_0x735ab=>_0x2ee0ce(new Date(+_0x735ab))[_0x1ab695(0x17f)](_0x1ab695(0x194)),B=async(_0x45720d,_0x4f5406)=>{const _0x58ba0f=_0x1ab695,_0x21c5fb=_0x45720d[_0x58ba0f(0x192)](_0x491dce),_0x40c6cd=_0x45720d[_0x58ba0f(0x192)](_0x5c6d2d);_0x4f5406['forEach'](_0x282b27=>{const _0x180f4a=_0x58ba0f;_0x21c5fb['getUser'](_0x282b27)&&_0x4f5406[_0x180f4a(0x198)](_0x282b27);}),_0x4f5406[_0x58ba0f(0x1a4)]&&(await _0x40c6cd[_0x58ba0f(0x192)](_0x58ba0f(0x189),{'params':{'userIDs':[..._0x4f5406]}}))['body']['users'][_0x58ba0f(0x15b)](_0x224ff=>{const _0x1cedac=_0x58ba0f;_0x224ff&&_0x21c5fb[_0x1cedac(0x19f)](_0x224ff);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2e162b,_0x31db1f,_0x22c426,_0x28245c)=>{const _0x24adbc=_0x1ab695;for(var _0x4c8bd5=_0x28245c>0x1?void 0x0:_0x28245c?K(_0x31db1f,_0x22c426):_0x31db1f,_0x1dd158=_0x2e162b[_0x24adbc(0x1b2)]-0x1,_0x4a3921;_0x1dd158>=0x0;_0x1dd158--)(_0x4a3921=_0x2e162b[_0x1dd158])&&(_0x4c8bd5=_0x4a3921(_0x4c8bd5)||_0x4c8bd5);return _0x4c8bd5;},p=(_0x42fbc7,_0x349b84)=>(_0x627dd2,_0x425f42)=>_0x349b84(_0x627dd2,_0x425f42,_0x42fbc7);let S=class extends _0x403f07{constructor(_0x4aea70,_0x135039,_0x43e4c8,_0x37040e){const _0x51a8fd=_0x1ab695;super(),this[_0x51a8fd(0x1ab)]=_0x4aea70,this['_threadCommentModel']=_0x135039,this['_userService']=_0x43e4c8,this[_0x51a8fd(0x158)]=_0x37040e,this['_init'](),this[_0x51a8fd(0x15e)]();}['_initUserSync'](){const _0x4c3178=_0x1ab695;this[_0x4c3178(0x1ac)](this[_0x4c3178(0x1a0)][_0x4c3178(0x1b4)][_0x4c3178(0x173)](_0xade764(0x10))[_0x4c3178(0x187)](_0x4e6960=>{const _0x311b25=_0x4c3178,_0x36162e=new Set();_0x4e6960[_0x311b25(0x15b)](_0x3fb22d=>{const _0x2459d0=_0x311b25;switch(_0x3fb22d[_0x2459d0(0x186)]){case _0x2459d0(0x195):{const _0x2f4173=_0x3fb22d['payload'][_0x2459d0(0x19e)];_0x36162e[_0x2459d0(0x195)](_0x2f4173);break;}}}),B(this['_injector'],_0x36162e);}));}[_0x1ab695(0x164)](){const _0x3a97eb=_0x1ab695;this[_0x3a97eb(0x1ac)](this[_0x3a97eb(0x1ab)]['commentUpdate$']['subscribe'](async _0x388598=>{const _0x57f2d8=_0x3a97eb;var _0x450fef,_0x289362,_0x37d568,_0x41ef2a;const _0x5b60cd=(_0x450fef=this[_0x57f2d8(0x1a0)]['getUnit'](_0x388598['unitId'])['find'](_0x51502c=>_0x51502c[_0x57f2d8(0x1a5)]===_0x388598[_0x57f2d8(0x1a5)]))==null?void 0x0:_0x450fef['root'];if(!_0x5b60cd)return;const {unitId:_0x2bbc7a,subUnitId:_0x235d58}=_0x5b60cd;switch(_0x388598[_0x57f2d8(0x161)]&&this[_0x57f2d8(0x163)][_0x57f2d8(0x19f)](_0x388598[_0x57f2d8(0x161)]),_0x388598[_0x57f2d8(0x186)]){case v['Add']:break;case v['Reply']:{this[_0x57f2d8(0x1a0)][_0x57f2d8(0x172)](_0x2bbc7a,_0x235d58,{'unitId':_0x2bbc7a,'subUnitId':_0x235d58,'ref':'','id':_0x388598[_0x57f2d8(0x16d)],'dT':D(+_0x388598[_0x57f2d8(0x182)]),'threadId':_0x388598[_0x57f2d8(0x1a5)],'personId':(_0x37d568=(_0x289362=_0x388598[_0x57f2d8(0x161)])==null?void 0x0:_0x289362['userID'])!=null?_0x37d568:_0x388598[_0x57f2d8(0x181)],'text':JSON[_0x57f2d8(0x179)](_0x388598['content']),'parentId':_0x5b60cd['id']});break;}case v[_0x57f2d8(0x18f)]:{const _0x169d36=this[_0x57f2d8(0x1a0)][_0x57f2d8(0x17c)](_0x2bbc7a,_0x235d58,_0x388598[_0x57f2d8(0x16d)]);_0x169d36&&_0x169d36['parentId']&&this[_0x57f2d8(0x1a0)][_0x57f2d8(0x16a)](_0x2bbc7a,_0x235d58,_0x388598[_0x57f2d8(0x16d)]);break;}case v[_0x57f2d8(0x1a7)]:{this[_0x57f2d8(0x1a0)][_0x57f2d8(0x193)](_0x2bbc7a,_0x235d58,{'commentId':_0x388598[_0x57f2d8(0x16d)],'text':JSON[_0x57f2d8(0x179)](_0x388598['content'])});break;}case v[_0x57f2d8(0x176)]:{const _0x4ba43d=(_0x41ef2a=this[_0x57f2d8(0x1a0)][_0x57f2d8(0x19d)](_0x388598[_0x57f2d8(0x16f)])[_0x57f2d8(0x184)](_0x53d067=>_0x53d067['threadId']===_0x388598[_0x57f2d8(0x1a5)]))==null?void 0x0:_0x41ef2a['root'];_0x4ba43d&&this[_0x57f2d8(0x1a0)][_0x57f2d8(0x188)](_0x2bbc7a,_0x235d58,_0x4ba43d['id'],_0x388598['solved']===I[_0x57f2d8(0x177)]);break;}}}));}};S=V([p(0x0,_0x14d5a2(_0x2f1b6)),p(0x1,_0x14d5a2(_0x54638b)),p(0x2,_0x14d5a2(_0x491dce)),p(0x3,_0x14d5a2(_0x153703))],S);const z=_0x1ab695(0x162),M={};var k=Object[_0x1ab695(0x17a)],Q=(_0x4ff8df,_0x3b9800,_0x2db718,_0x3b9b2f)=>{const _0xf9c1bc=_0x1ab695;for(var _0x2698c9=_0x3b9b2f>0x1?void 0x0:_0x3b9b2f?k(_0x3b9800,_0x2db718):_0x3b9800,_0x3b21dd=_0x4ff8df[_0xf9c1bc(0x1b2)]-0x1,_0x103f85;_0x3b21dd>=0x0;_0x3b21dd--)(_0x103f85=_0x4ff8df[_0x3b21dd])&&(_0x2698c9=_0x103f85(_0x2698c9)||_0x2698c9);return _0x2698c9;},_=(_0x3eb845,_0x1f066e)=>(_0x3b8104,_0x5519b3)=>_0x1f066e(_0x3b8104,_0x5519b3,_0x3eb845);function X(_0x107474,_0x4de781){const _0x4016ff=_0x1ab695,_0x2474fb=_0x107474[_0x4016ff(0x1aa)][0x0];return{..._0x4de781,'id':_0x2474fb[_0x4016ff(0x16d)],'resolved':_0x107474[_0x4016ff(0x1b5)]===0x1,'dT':D(_0x2474fb[_0x4016ff(0x182)]),'personId':_0x2474fb['userId'],'threadId':_0x2474fb[_0x4016ff(0x1a5)]};}function _0x1577(){const _0x37f951=['body','Add','deleteComment','30phFFPC','/solved','replyId','_threadCommentDataSourceService','unitId','/delete','1755ZyqmvX','addComment','pipe','_httpService','content','Solve','Solved','requireSession','parse','getOwnPropertyDescriptor','/reply','getComment','pluginName','dataSource','format','COMMENT','userId','createTimestamp','customRanges','find','map','type','subscribe','resolveComment','/universer-api/user/list','symbol','9448IarCwX','stringify','_config','rangeType','Delete','defineProperty','post','get','updateComment','YYYY/MM/DD\x20HH:mm','add','OpenOrReOpen','getCurrentUser','delete','_sessionService','28AGMubT','_configService','895870vUegaF','getUnit','personId','addUser','_threadCommentModel','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','16EWFoLJ','/universer-api/comment/unit/','size','threadId','403134NChdRu','Edit','filter','users','replies','_commentService','disposeWithMe','rangeId','_initDataSource','error','Reply','6822761xcQhzz','length','/add','commentUpdate$','solved','269100reJCWZ','values','syncUpdateMutationToColla','onReady','UNRECOGNIZED','1960225FSRNPR','reply','code','_injector','getMemberID','setConfig','forEach','onStarting','comments','_initUserSync','comment','_threadCommentDataSource','user','thread-comment-data-source.config','_userService','_init','Unknown','slice','519415rwGyiA'];_0x1577=function(){return _0x37f951;};return _0x1577();}function ee(_0x138eab,_0x122584,_0x4d758b){const _0x1afbdc=_0x1ab695;var _0x3160ea,_0x544f5b;if(((_0x544f5b=(_0x3160ea=_0x138eab==null?void 0x0:_0x138eab[_0x1afbdc(0x1aa)])==null?void 0x0:_0x3160ea[_0x1afbdc(0x1b2)])!=null?_0x544f5b:0x0)>0x0){const _0x5a887e=(_0x2595c8,_0x4cb673)=>({'id':_0x2595c8[_0x1afbdc(0x16d)],'threadId':_0x2595c8[_0x1afbdc(0x1a5)],'dT':D(_0x2595c8[_0x1afbdc(0x182)]),'personId':_0x2595c8[_0x1afbdc(0x181)],'resolved':_0x138eab['solved']===I[_0x1afbdc(0x177)],'unitId':_0x122584,'subUnitId':_0x4d758b,'text':JSON[_0x1afbdc(0x179)](_0x2595c8[_0x1afbdc(0x175)]),'parentId':_0x4cb673}),_0x19300a=_0x5a887e(_0x138eab[_0x1afbdc(0x1aa)][0x0]);return{..._0x19300a,'children':_0x138eab['replies'][_0x1afbdc(0x166)](0x1)['map'](_0x304013=>_0x5a887e(_0x304013,_0x19300a['id']))};}return null;}let f=class{constructor(_0x3d12c2,_0x28ac34,_0xf4cd7a,_0x285dd1){const _0x209268=_0x1ab695;this[_0x209268(0x174)]=_0x3d12c2,this['_userService']=_0x28ac34,this[_0x209268(0x199)]=_0xf4cd7a,this['_injector']=_0x285dd1;}async[_0x1ab695(0x172)](_0x45b6a3){const _0x5373cd=_0x1ab695;var _0x1e8862,_0x2e0855;const {parentId:_0x38d4a5,unitId:_0x112310,text:_0x413995,threadId:_0x4ba364}=_0x45b6a3,_0x7cd92b=(_0x2e0855=(_0x1e8862=_0x413995[_0x5373cd(0x183)])==null?void 0x0:_0x1e8862[_0x5373cd(0x1a8)](_0x25bf04=>_0x25bf04[_0x5373cd(0x18e)]===_0x55c7fc[_0x5373cd(0x180)])[_0x5373cd(0x185)](_0x3b4d77=>_0x3b4d77[_0x5373cd(0x1ad)]))!=null?_0x2e0855:[],_0x33383b=JSON['stringify'](_0x413995),_0x19b24a=(await this[_0x5373cd(0x199)]['requireSession'](_0x112310))[_0x5373cd(0x159)]();if(_0x38d4a5){const _0x588734={'memberId':_0x19b24a,'unitId':_0x112310,'content':_0x33383b,'mention':_0x7cd92b,'threadId':_0x4ba364},_0x50fe6f=(await this[_0x5373cd(0x174)][_0x5373cd(0x191)]('/universer-api/comment/unit/'+_0x112310+_0x5373cd(0x17b),{'body':_0x588734}))['body'][_0x5373cd(0x156)];return{..._0x45b6a3,'id':_0x50fe6f[_0x5373cd(0x16d)],'dT':_0x2ee0ce(+_0x50fe6f['createTimestamp'])[_0x5373cd(0x17f)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x50fe6f[_0x5373cd(0x181)]};}else{const _0x585d18={'memberId':_0x19b24a,'unitId':_0x112310,'content':_0x33383b,'mention':_0x7cd92b},_0x576093=await this[_0x5373cd(0x174)][_0x5373cd(0x191)](_0x5373cd(0x1a3)+_0x112310+_0x5373cd(0x1b3),{'body':_0x585d18});return X(_0x576093[_0x5373cd(0x168)][_0x5373cd(0x15f)],_0x45b6a3);}}async['updateComment'](_0x43a065){const _0x3081b1=_0x1ab695;var _0x1237fd,_0x5411ae;const {text:_0x230e80,unitId:_0x4848a9}=_0x43a065,_0x2f50e1=(_0x5411ae=(_0x1237fd=_0x230e80[_0x3081b1(0x183)])==null?void 0x0:_0x1237fd[_0x3081b1(0x1a8)](_0x34223f=>_0x34223f[_0x3081b1(0x18e)]===_0x55c7fc[_0x3081b1(0x180)])[_0x3081b1(0x185)](_0x3cbf00=>_0x3cbf00[_0x3081b1(0x1ad)]))!=null?_0x5411ae:[],_0x46fe81=JSON[_0x3081b1(0x18c)](_0x230e80),_0x4c384c=_0x43a065['threadId'],_0x4d0bcb=_0x43a065['id'],_0x537004={'memberId':(await this[_0x3081b1(0x199)][_0x3081b1(0x178)](_0x4848a9))[_0x3081b1(0x159)](),'unitId':_0x4848a9,'threadId':_0x4c384c,'mention':_0x2f50e1,'content':_0x46fe81,'replyId':_0x4d0bcb},_0x48c915=await this[_0x3081b1(0x174)][_0x3081b1(0x191)]('/universer-api/comment/unit/'+_0x4848a9+'/edit',{'body':_0x537004});return!_0x48c915[_0x3081b1(0x168)][_0x3081b1(0x1af)]||_0x48c915[_0x3081b1(0x168)][_0x3081b1(0x1af)][_0x3081b1(0x157)]===0x1;}async['resolveComment'](_0x3c8ede){const _0x4c7644=_0x1ab695,{unitId:_0x4cc7ab}=_0x3c8ede,_0x2a11e1=_0x3c8ede[_0x4c7644(0x1a5)],_0x1923c2={'memberId':this[_0x4c7644(0x163)][_0x4c7644(0x197)]()['userID'],'unitId':_0x4cc7ab,'threadId':_0x2a11e1,'solved':_0x3c8ede['resolved']?I[_0x4c7644(0x177)]:I['OpenOrReOpen']},_0xd6e238=await this[_0x4c7644(0x174)]['post'](_0x4c7644(0x1a3)+_0x4cc7ab+_0x4c7644(0x16c),{'body':_0x1923c2});return!_0xd6e238[_0x4c7644(0x168)][_0x4c7644(0x1af)]||_0xd6e238[_0x4c7644(0x168)]['error'][_0x4c7644(0x157)]===0x1;}async['deleteComment'](_0x2ba062,_0x2a40c3,_0xb4a3e4,_0x24da83){const _0x47468f=_0x1ab695,_0x499a1c={'memberId':(await this[_0x47468f(0x199)]['requireSession'](_0x2ba062))[_0x47468f(0x159)](),'threadId':_0xb4a3e4,'replyId':_0x24da83,'unitId':_0x2ba062},_0x5e74f1=await this['_httpService'][_0x47468f(0x191)](_0x47468f(0x1a3)+_0x2ba062+_0x47468f(0x170),{'body':_0x499a1c});return!_0x5e74f1[_0x47468f(0x168)][_0x47468f(0x1af)]||_0x5e74f1[_0x47468f(0x168)][_0x47468f(0x1af)]['code']===0x1;}async['listComments'](_0x459d45,_0x159614,_0x53bef4){const _0x525291=_0x1ab695,_0x48c014={'unitId':_0x459d45,'threadId':_0x53bef4},_0x2b49f7=await this['_httpService'][_0x525291(0x191)](_0x525291(0x1a3)+_0x459d45+'/list',{'body':_0x48c014}),_0x214cfb=_0x53bef4[_0x525291(0x185)](_0x1bcdb0=>ee(_0x2b49f7['body'][_0x525291(0x15d)][_0x1bcdb0],_0x459d45,_0x159614))[_0x525291(0x1a8)](Boolean);return Object[_0x525291(0x151)](_0x2b49f7[_0x525291(0x168)][_0x525291(0x1a9)])[_0x525291(0x15b)](_0x30cff2=>{const _0x5bc31b=_0x525291;this[_0x5bc31b(0x163)]['addUser'](_0x30cff2);}),_0x214cfb;}['saveCommentToSnapshot'](_0x487af0){const _0x2ac8ad=_0x1ab695;return{'id':_0x487af0['id'],'threadId':_0x487af0[_0x2ac8ad(0x1a5)],'ref':_0x487af0['ref']};}};f=Q([_(0x0,_0x14d5a2(_0x5c6d2d)),_(0x1,_0x14d5a2(_0x491dce)),_(0x2,_0x14d5a2(_0x296507)),_(0x3,_0x14d5a2(_0x153703))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x1c2fa3,_0x4927be,_0x4ef321,_0x44c339)=>{const _0x5ce6c7=_0x1ab695;for(var _0x40c9cd=_0x44c339>0x1?void 0x0:_0x44c339?re(_0x4927be,_0x4ef321):_0x4927be,_0x56953f=_0x1c2fa3[_0x5ce6c7(0x1b2)]-0x1,_0x2b99ae;_0x56953f>=0x0;_0x56953f--)(_0x2b99ae=_0x1c2fa3[_0x56953f])&&(_0x40c9cd=_0x2b99ae(_0x40c9cd)||_0x40c9cd);return _0x40c9cd;},N=(_0x1fc20e,_0x1bacde)=>(_0x3de11b,_0x187ab8)=>_0x1bacde(_0x3de11b,_0x187ab8,_0x1fc20e);let g=class extends _0x403f07{constructor(_0x5a2b3a,_0x5c6ed9){const _0x3dfca6=_0x1ab695;super(),this[_0x3dfca6(0x16e)]=_0x5a2b3a,this[_0x3dfca6(0x160)]=_0x5c6ed9,this[_0x3dfca6(0x1ae)]();}[_0x1ab695(0x1ae)](){const _0x2fb5f0=_0x1ab695;this[_0x2fb5f0(0x16e)][_0x2fb5f0(0x17e)]=this[_0x2fb5f0(0x160)],this[_0x2fb5f0(0x16e)][_0x2fb5f0(0x152)]=!0x1;}};g=te([N(0x0,_0x39aa21),N(0x1,_0x14d5a2(f))],g);var se=Object[_0x1ab695(0x190)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1b5a5e,_0x5eb963,_0x24fe2e)=>_0x5eb963 in _0x1b5a5e?se(_0x1b5a5e,_0x5eb963,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x24fe2e}):_0x1b5a5e[_0x5eb963]=_0x24fe2e,ie=(_0xaf5e83,_0x5b198a,_0x51eac5,_0x1fc84b)=>{const _0x1dbb22=_0x1ab695;for(var _0x3ae77e=_0x1fc84b>0x1?void 0x0:_0x1fc84b?oe(_0x5b198a,_0x51eac5):_0x5b198a,_0x2691cd=_0xaf5e83[_0x1dbb22(0x1b2)]-0x1,_0x240b95;_0x2691cd>=0x0;_0x2691cd--)(_0x240b95=_0xaf5e83[_0x2691cd])&&(_0x3ae77e=_0x240b95(_0x3ae77e)||_0x3ae77e);return _0x3ae77e;},w=(_0x36f444,_0x4f30f4)=>(_0x50d765,_0x578233)=>_0x4f30f4(_0x50d765,_0x578233,_0x36f444),$=(_0x5a6225,_0x154102,_0x537b3e)=>ne(_0x5a6225,typeof _0x154102!=_0x1ab695(0x18a)?_0x154102+'':_0x154102,_0x537b3e);let b=class extends _0xd075a6{constructor(_0x1aedbe=M,_0x1d9862,_0x5e0767){const _0x318f68=_0x1ab695;super(),this[_0x318f68(0x18d)]=_0x1aedbe,this['_injector']=_0x1d9862,this[_0x318f68(0x19b)]=_0x5e0767;const {..._0x3b0bb4}=_0xcec0b5({},M,this[_0x318f68(0x18d)]);this[_0x318f68(0x19b)][_0x318f68(0x15a)](z,_0x3b0bb4);}[_0x1ab695(0x15c)](){const _0x2195e4=_0x1ab695;[[f],[g],[S]][_0x2195e4(0x15b)](_0x319202=>{const _0x129a45=_0x2195e4;this[_0x129a45(0x158)]['add'](_0x319202);});}[_0x1ab695(0x153)](){const _0x103445=_0x1ab695;this['_injector'][_0x103445(0x192)](g),this['_injector'][_0x103445(0x192)](S);}};$(b,_0x1ab695(0x17d),W),$(b,_0x1ab695(0x186),_0x185fb6['UNIVER_UNKNOWN']),b=ie([_0x4ec335(_0x51046f,_0x215a50,_0x59e42c),w(0x1,_0x14d5a2(_0x153703)),w(0x2,_0x30003c)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ function _0x1735(_0x778d9a,_0x1c306c){const _0x23e795=_0x23e7();return _0x1735=function(_0x173590,_0x359c10){_0x173590=_0x173590-0x14e;let _0xa0a074=_0x23e795[_0x173590];return _0xa0a074;},_0x1735(_0x778d9a,_0x1c306c);}const _0x116374=_0x1735;(function(_0x26eb43,_0x3f69dd){const _0x5b2552=_0x1735,_0x515c47=_0x26eb43();while(!![]){try{const _0x148429=-parseInt(_0x5b2552(0x1a9))/0x1*(parseInt(_0x5b2552(0x15b))/0x2)+parseInt(_0x5b2552(0x180))/0x3+-parseInt(_0x5b2552(0x1a4))/0x4+-parseInt(_0x5b2552(0x190))/0x5*(parseInt(_0x5b2552(0x162))/0x6)+-parseInt(_0x5b2552(0x1a3))/0x7+parseInt(_0x5b2552(0x174))/0x8*(parseInt(_0x5b2552(0x150))/0x9)+parseInt(_0x5b2552(0x19d))/0xa;if(_0x148429===_0x3f69dd)break;else _0x515c47['push'](_0x515c47['shift']());}catch(_0x11ab6b){_0x515c47['push'](_0x515c47['shift']());}}}(_0x23e7,0x76571));import{CommentService as _0x2aeaf0,CollaborationSessionService as _0x3affa4,UniverCollaborationClientPlugin as _0x30e333}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x187856}from'@univerjs-pro/license';import{dayjs as _0x35302d,UserManagerService as _0x3dd59f,Inject as _0x2edfc9,Injector as _0x348e3e,Disposable as _0x5700d0,CustomRangeType as _0x56b39f,UniverInstanceType as _0x2b4fac,DependentOn as _0x50dc84,IConfigService as _0x136480,Plugin as _0x11dac9,merge as _0x150f9d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x19c732}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xf188f2,IThreadCommentDataSourceService as _0x6d41c1}from'@univerjs/thread-comment';import{bufferTime as _0x175c95}from'rxjs';import{HTTPService as _0x53d244}from'@univerjs/network';const W=_0x116374(0x179);var I=(_0x48e472=>(_0x48e472[_0x48e472[_0x116374(0x18a)]=0x0]=_0x116374(0x18a),_0x48e472[_0x48e472[_0x116374(0x175)]=0x1]=_0x116374(0x175),_0x48e472[_0x48e472[_0x116374(0x193)]=-0x1]=_0x116374(0x193),_0x48e472))(I||{}),v=(_0x50b41f=>(_0x50b41f[_0x50b41f['Unknown']=0x0]='Unknown',_0x50b41f[_0x50b41f[_0x116374(0x187)]=0x1]='Add',_0x50b41f[_0x50b41f['Reply']=0x2]=_0x116374(0x195),_0x50b41f[_0x50b41f[_0x116374(0x160)]=0x3]=_0x116374(0x160),_0x50b41f[_0x50b41f[_0x116374(0x18d)]=0x4]='Delete',_0x50b41f[_0x50b41f[_0x116374(0x1a0)]=0x5]=_0x116374(0x1a0),_0x50b41f[_0x50b41f['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x50b41f))(v||{});const D=_0x34c161=>_0x35302d(new Date(+_0x34c161))[_0x116374(0x199)](_0x116374(0x14e)),B=async(_0x40db99,_0x475f0b)=>{const _0xf8b387=_0x116374,_0x270f7a=_0x40db99[_0xf8b387(0x15c)](_0x3dd59f),_0x2f80de=_0x40db99[_0xf8b387(0x15c)](_0x53d244);_0x475f0b[_0xf8b387(0x1ac)](_0x3e35ee=>{const _0x439cec=_0xf8b387;_0x270f7a[_0x439cec(0x1a5)](_0x3e35ee)&&_0x475f0b[_0x439cec(0x1ae)](_0x3e35ee);}),_0x475f0b[_0xf8b387(0x18c)]&&(await _0x2f80de[_0xf8b387(0x15c)](_0xf8b387(0x194),{'params':{'userIDs':[..._0x475f0b]}}))['body']['users'][_0xf8b387(0x1ac)](_0x4a69a5=>{const _0xa2bc8=_0xf8b387;_0x4a69a5&&_0x270f7a[_0xa2bc8(0x17b)](_0x4a69a5);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x13929a,_0x506617,_0x412337,_0x231677)=>{const _0x1bd7d2=_0x116374;for(var _0x46b080=_0x231677>0x1?void 0x0:_0x231677?K(_0x506617,_0x412337):_0x506617,_0x32c7ca=_0x13929a[_0x1bd7d2(0x197)]-0x1,_0x4e0438;_0x32c7ca>=0x0;_0x32c7ca--)(_0x4e0438=_0x13929a[_0x32c7ca])&&(_0x46b080=_0x4e0438(_0x46b080)||_0x46b080);return _0x46b080;},p=(_0x1b22dc,_0x519dff)=>(_0xde4d01,_0x5b223b)=>_0x519dff(_0xde4d01,_0x5b223b,_0x1b22dc);let S=class extends _0x5700d0{constructor(_0x1c00a7,_0x2b10ec,_0x145751,_0x3d6de2){const _0x2754fa=_0x116374;super(),this['_commentService']=_0x1c00a7,this[_0x2754fa(0x188)]=_0x2b10ec,this[_0x2754fa(0x17f)]=_0x145751,this[_0x2754fa(0x17e)]=_0x3d6de2,this[_0x2754fa(0x1ad)](),this[_0x2754fa(0x171)]();}[_0x116374(0x171)](){const _0x5c2dce=_0x116374;this[_0x5c2dce(0x14f)](this[_0x5c2dce(0x188)][_0x5c2dce(0x17c)][_0x5c2dce(0x17a)](_0x175c95(0x10))[_0x5c2dce(0x177)](_0x3d117b=>{const _0x2fb3fe=_0x5c2dce,_0xdbd7db=new Set();_0x3d117b[_0x2fb3fe(0x1ac)](_0x1f1c71=>{const _0x3afc58=_0x2fb3fe;switch(_0x1f1c71[_0x3afc58(0x19f)]){case _0x3afc58(0x17d):{const _0x381b08=_0x1f1c71[_0x3afc58(0x15f)]['personId'];_0xdbd7db[_0x3afc58(0x17d)](_0x381b08);break;}}}),B(this[_0x2fb3fe(0x17e)],_0xdbd7db);}));}[_0x116374(0x1ad)](){const _0x103284=_0x116374;this[_0x103284(0x14f)](this['_commentService']['commentUpdate$'][_0x103284(0x177)](async _0x8cd26f=>{const _0x1bdeac=_0x103284;var _0x572d65,_0x200475,_0x3bf3b8,_0x81f1d4;const _0x5e8e58=(_0x572d65=this[_0x1bdeac(0x188)][_0x1bdeac(0x1a7)](_0x8cd26f[_0x1bdeac(0x1a1)])[_0x1bdeac(0x196)](_0x34a130=>_0x34a130[_0x1bdeac(0x15e)]===_0x8cd26f[_0x1bdeac(0x15e)]))==null?void 0x0:_0x572d65[_0x1bdeac(0x198)];if(!_0x5e8e58)return;const {unitId:_0x15f5f1,subUnitId:_0x2745ed}=_0x5e8e58;switch(_0x8cd26f['user']&&this['_userService'][_0x1bdeac(0x17b)](_0x8cd26f[_0x1bdeac(0x15d)]),_0x8cd26f['type']){case v['Add']:break;case v[_0x1bdeac(0x195)]:{this[_0x1bdeac(0x188)][_0x1bdeac(0x1aa)](_0x15f5f1,_0x2745ed,{'unitId':_0x15f5f1,'subUnitId':_0x2745ed,'ref':'','id':_0x8cd26f[_0x1bdeac(0x16b)],'dT':D(+_0x8cd26f[_0x1bdeac(0x181)]),'threadId':_0x8cd26f[_0x1bdeac(0x15e)],'personId':(_0x3bf3b8=(_0x200475=_0x8cd26f[_0x1bdeac(0x15d)])==null?void 0x0:_0x200475[_0x1bdeac(0x155)])!=null?_0x3bf3b8:_0x8cd26f[_0x1bdeac(0x1a8)],'text':JSON[_0x1bdeac(0x166)](_0x8cd26f[_0x1bdeac(0x186)]),'parentId':_0x5e8e58['id']});break;}case v[_0x1bdeac(0x18d)]:{const _0x4e6d88=this['_threadCommentModel'][_0x1bdeac(0x1af)](_0x15f5f1,_0x2745ed,_0x8cd26f[_0x1bdeac(0x16b)]);_0x4e6d88&&_0x4e6d88[_0x1bdeac(0x16e)]&&this[_0x1bdeac(0x188)][_0x1bdeac(0x18b)](_0x15f5f1,_0x2745ed,_0x8cd26f['replyId']);break;}case v[_0x1bdeac(0x160)]:{this['_threadCommentModel'][_0x1bdeac(0x151)](_0x15f5f1,_0x2745ed,{'commentId':_0x8cd26f['replyId'],'text':JSON[_0x1bdeac(0x166)](_0x8cd26f['content'])});break;}case v[_0x1bdeac(0x1a0)]:{const _0x201a48=(_0x81f1d4=this[_0x1bdeac(0x188)]['getUnit'](_0x8cd26f[_0x1bdeac(0x1a1)])['find'](_0x8af8ef=>_0x8af8ef[_0x1bdeac(0x15e)]===_0x8cd26f[_0x1bdeac(0x15e)]))==null?void 0x0:_0x81f1d4[_0x1bdeac(0x198)];_0x201a48&&this[_0x1bdeac(0x188)][_0x1bdeac(0x169)](_0x15f5f1,_0x2745ed,_0x201a48['id'],_0x8cd26f[_0x1bdeac(0x167)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x2edfc9(_0x2aeaf0)),p(0x1,_0x2edfc9(_0xf188f2)),p(0x2,_0x2edfc9(_0x3dd59f)),p(0x3,_0x2edfc9(_0x348e3e))],S);const z=_0x116374(0x1a6),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x2cad97,_0x6f6385,_0x150dce,_0x23857a)=>{for(var _0x1dbb96=_0x23857a>0x1?void 0x0:_0x23857a?k(_0x6f6385,_0x150dce):_0x6f6385,_0x17df6d=_0x2cad97['length']-0x1,_0xa4edc2;_0x17df6d>=0x0;_0x17df6d--)(_0xa4edc2=_0x2cad97[_0x17df6d])&&(_0x1dbb96=_0xa4edc2(_0x1dbb96)||_0x1dbb96);return _0x1dbb96;},_=(_0x5c6a68,_0x1d25d1)=>(_0x81adca,_0x3f0690)=>_0x1d25d1(_0x81adca,_0x3f0690,_0x5c6a68);function X(_0x707c11,_0x16def3){const _0x488570=_0x116374,_0x4f717f=_0x707c11[_0x488570(0x19e)][0x0];return{..._0x16def3,'id':_0x4f717f[_0x488570(0x16b)],'resolved':_0x707c11[_0x488570(0x167)]===0x1,'dT':D(_0x4f717f[_0x488570(0x181)]),'personId':_0x4f717f[_0x488570(0x1a8)],'threadId':_0x4f717f[_0x488570(0x15e)]};}function ee(_0x4bfacf,_0x203f22,_0x49d656){const _0x23943a=_0x116374;var _0x3927f5,_0x4e01bf;if(((_0x4e01bf=(_0x3927f5=_0x4bfacf==null?void 0x0:_0x4bfacf[_0x23943a(0x19e)])==null?void 0x0:_0x3927f5[_0x23943a(0x197)])!=null?_0x4e01bf:0x0)>0x0){const _0x1355d0=(_0x320949,_0x501c56)=>({'id':_0x320949[_0x23943a(0x16b)],'threadId':_0x320949[_0x23943a(0x15e)],'dT':D(_0x320949[_0x23943a(0x181)]),'personId':_0x320949[_0x23943a(0x1a8)],'resolved':_0x4bfacf[_0x23943a(0x167)]===I['Solved'],'unitId':_0x203f22,'subUnitId':_0x49d656,'text':JSON[_0x23943a(0x166)](_0x320949[_0x23943a(0x186)]),'parentId':_0x501c56}),_0x5ad73a=_0x1355d0(_0x4bfacf['replies'][0x0]);return{..._0x5ad73a,'children':_0x4bfacf['replies']['slice'](0x1)[_0x23943a(0x159)](_0x5c24d1=>_0x1355d0(_0x5c24d1,_0x5ad73a['id']))};}return null;}let f=class{constructor(_0x20d50f,_0x21b918,_0x469c96,_0x1347cd){const _0x14282a=_0x116374;this[_0x14282a(0x1b0)]=_0x20d50f,this['_userService']=_0x21b918,this[_0x14282a(0x176)]=_0x469c96,this[_0x14282a(0x17e)]=_0x1347cd;}async[_0x116374(0x1aa)](_0x1739a1){const _0x324369=_0x116374;var _0x1434cd,_0x3ba30b;const {parentId:_0x283db9,unitId:_0x422fb3,text:_0x448c94,threadId:_0x3c0bae}=_0x1739a1,_0x30f165=(_0x3ba30b=(_0x1434cd=_0x448c94[_0x324369(0x16d)])==null?void 0x0:_0x1434cd['filter'](_0x5e21d4=>_0x5e21d4[_0x324369(0x172)]===_0x56b39f[_0x324369(0x16c)])[_0x324369(0x159)](_0x271869=>_0x271869[_0x324369(0x1ab)]))!=null?_0x3ba30b:[],_0xa817c3=JSON[_0x324369(0x170)](_0x448c94),_0x57a03d=(await this[_0x324369(0x176)][_0x324369(0x158)](_0x422fb3))[_0x324369(0x189)]();if(_0x283db9){const _0x365756={'memberId':_0x57a03d,'unitId':_0x422fb3,'content':_0xa817c3,'mention':_0x30f165,'threadId':_0x3c0bae},_0x6257be=(await this[_0x324369(0x1b0)][_0x324369(0x183)](_0x324369(0x182)+_0x422fb3+'/reply',{'body':_0x365756}))[_0x324369(0x154)][_0x324369(0x18f)];return{..._0x1739a1,'id':_0x6257be[_0x324369(0x16b)],'dT':_0x35302d(+_0x6257be[_0x324369(0x181)])[_0x324369(0x199)](_0x324369(0x14e)),'personId':_0x6257be[_0x324369(0x1a8)]};}else{const _0x4d8812={'memberId':_0x57a03d,'unitId':_0x422fb3,'content':_0xa817c3,'mention':_0x30f165},_0x2cdfed=await this[_0x324369(0x1b0)][_0x324369(0x183)](_0x324369(0x182)+_0x422fb3+'/add',{'body':_0x4d8812});return X(_0x2cdfed['body'][_0x324369(0x15a)],_0x1739a1);}}async[_0x116374(0x151)](_0x23ac2e){const _0x30f721=_0x116374;var _0x509e8d,_0x471e59;const {text:_0x468c62,unitId:_0x3650dd}=_0x23ac2e,_0xe4063d=(_0x471e59=(_0x509e8d=_0x468c62['customRanges'])==null?void 0x0:_0x509e8d['filter'](_0x2111af=>_0x2111af['rangeType']===_0x56b39f[_0x30f721(0x16c)])['map'](_0x54583a=>_0x54583a[_0x30f721(0x1ab)]))!=null?_0x471e59:[],_0x2b6678=JSON[_0x30f721(0x170)](_0x468c62),_0x5342b8=_0x23ac2e['threadId'],_0x2bb4f1=_0x23ac2e['id'],_0x2cc32c={'memberId':(await this['_sessionService']['requireSession'](_0x3650dd))[_0x30f721(0x189)](),'unitId':_0x3650dd,'threadId':_0x5342b8,'mention':_0xe4063d,'content':_0x2b6678,'replyId':_0x2bb4f1},_0x45e27a=await this[_0x30f721(0x1b0)][_0x30f721(0x183)](_0x30f721(0x182)+_0x3650dd+_0x30f721(0x185),{'body':_0x2cc32c});return!_0x45e27a[_0x30f721(0x154)]['error']||_0x45e27a[_0x30f721(0x154)][_0x30f721(0x157)][_0x30f721(0x16f)]===0x1;}async[_0x116374(0x169)](_0x122aef){const _0x135b1f=_0x116374,{unitId:_0x5f274b}=_0x122aef,_0x1a9a1b=_0x122aef[_0x135b1f(0x15e)],_0x3d4bee={'memberId':this['_userService'][_0x135b1f(0x1a2)]()['userID'],'unitId':_0x5f274b,'threadId':_0x1a9a1b,'solved':_0x122aef[_0x135b1f(0x153)]?I[_0x135b1f(0x175)]:I[_0x135b1f(0x18a)]},_0xe08d89=await this['_httpService'][_0x135b1f(0x183)](_0x135b1f(0x182)+_0x5f274b+_0x135b1f(0x19a),{'body':_0x3d4bee});return!_0xe08d89[_0x135b1f(0x154)][_0x135b1f(0x157)]||_0xe08d89[_0x135b1f(0x154)][_0x135b1f(0x157)][_0x135b1f(0x16f)]===0x1;}async[_0x116374(0x18b)](_0x4c52d9,_0x593095,_0x7a0b28,_0x25c531){const _0x146f79=_0x116374,_0x1a18e9={'memberId':(await this[_0x146f79(0x176)][_0x146f79(0x158)](_0x4c52d9))[_0x146f79(0x189)](),'threadId':_0x7a0b28,'replyId':_0x25c531,'unitId':_0x4c52d9},_0x3bc7ee=await this['_httpService'][_0x146f79(0x183)](_0x146f79(0x182)+_0x4c52d9+_0x146f79(0x19b),{'body':_0x1a18e9});return!_0x3bc7ee[_0x146f79(0x154)][_0x146f79(0x157)]||_0x3bc7ee[_0x146f79(0x154)][_0x146f79(0x157)][_0x146f79(0x16f)]===0x1;}async['listComments'](_0x32b5ff,_0xca5af3,_0x5318a4){const _0x2379e5=_0x116374,_0x4be2ef={'unitId':_0x32b5ff,'threadId':_0x5318a4},_0x106ecf=await this[_0x2379e5(0x1b0)][_0x2379e5(0x183)]('/universer-api/comment/unit/'+_0x32b5ff+_0x2379e5(0x152),{'body':_0x4be2ef}),_0x16bb9a=_0x5318a4['map'](_0x1014a3=>ee(_0x106ecf[_0x2379e5(0x154)][_0x2379e5(0x173)][_0x1014a3],_0x32b5ff,_0xca5af3))['filter'](Boolean);return Object['values'](_0x106ecf[_0x2379e5(0x154)][_0x2379e5(0x16a)])[_0x2379e5(0x1ac)](_0x5b09d5=>{const _0x443159=_0x2379e5;this[_0x443159(0x17f)]['addUser'](_0x5b09d5);}),_0x16bb9a;}[_0x116374(0x19c)](_0x215c21){const _0x179729=_0x116374;return{'id':_0x215c21['id'],'threadId':_0x215c21[_0x179729(0x15e)],'ref':_0x215c21[_0x179729(0x164)]};}};f=Q([_(0x0,_0x2edfc9(_0x53d244)),_(0x1,_0x2edfc9(_0x3dd59f)),_(0x2,_0x2edfc9(_0x3affa4)),_(0x3,_0x2edfc9(_0x348e3e))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x12cf35,_0x3d7be7,_0x53eab4,_0x2a0d30)=>{for(var _0x34a019=_0x2a0d30>0x1?void 0x0:_0x2a0d30?re(_0x3d7be7,_0x53eab4):_0x3d7be7,_0x583e10=_0x12cf35['length']-0x1,_0xdba7c3;_0x583e10>=0x0;_0x583e10--)(_0xdba7c3=_0x12cf35[_0x583e10])&&(_0x34a019=_0xdba7c3(_0x34a019)||_0x34a019);return _0x34a019;},N=(_0x4242ae,_0xa0f25)=>(_0x56bdc7,_0x4ae986)=>_0xa0f25(_0x56bdc7,_0x4ae986,_0x4242ae);let g=class extends _0x5700d0{constructor(_0x1efbad,_0x3f4476){const _0x7959cd=_0x116374;super(),this[_0x7959cd(0x165)]=_0x1efbad,this[_0x7959cd(0x191)]=_0x3f4476,this['_initDataSource']();}['_initDataSource'](){const _0x4fdb0c=_0x116374;this['_threadCommentDataSourceService']['dataSource']=this[_0x4fdb0c(0x191)],this[_0x4fdb0c(0x165)][_0x4fdb0c(0x168)]=!0x1;}};g=te([N(0x0,_0x6d41c1),N(0x1,_0x2edfc9(f))],g);var se=Object['defineProperty'],oe=Object[_0x116374(0x184)],ne=(_0x1b4eb1,_0x2595c4,_0xeb91c0)=>_0x2595c4 in _0x1b4eb1?se(_0x1b4eb1,_0x2595c4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xeb91c0}):_0x1b4eb1[_0x2595c4]=_0xeb91c0,ie=(_0x57dd14,_0x61d335,_0xe3efff,_0xa2f0e2)=>{const _0x326a4d=_0x116374;for(var _0x1a7e36=_0xa2f0e2>0x1?void 0x0:_0xa2f0e2?oe(_0x61d335,_0xe3efff):_0x61d335,_0xc93381=_0x57dd14[_0x326a4d(0x197)]-0x1,_0x389a49;_0xc93381>=0x0;_0xc93381--)(_0x389a49=_0x57dd14[_0xc93381])&&(_0x1a7e36=_0x389a49(_0x1a7e36)||_0x1a7e36);return _0x1a7e36;},w=(_0x226709,_0x103323)=>(_0x4b2a49,_0x2380af)=>_0x103323(_0x4b2a49,_0x2380af,_0x226709),$=(_0x258fd7,_0x47eb50,_0x343202)=>ne(_0x258fd7,typeof _0x47eb50!=_0x116374(0x178)?_0x47eb50+'':_0x47eb50,_0x343202);let b=class extends _0x11dac9{constructor(_0x2816b6=M,_0xe0c638,_0x1c6c1d){const _0x5373d2=_0x116374;super(),this[_0x5373d2(0x161)]=_0x2816b6,this['_injector']=_0xe0c638,this[_0x5373d2(0x163)]=_0x1c6c1d;const {..._0xefe40e}=_0x150f9d({},M,this[_0x5373d2(0x161)]);this['_configService'][_0x5373d2(0x192)](z,_0xefe40e);}['onStarting'](){const _0x49448a=_0x116374;[[f],[g],[S]][_0x49448a(0x1ac)](_0x33aa6b=>{const _0x6e829f=_0x49448a;this[_0x6e829f(0x17e)][_0x6e829f(0x17d)](_0x33aa6b);});}[_0x116374(0x156)](){const _0x11aadd=_0x116374;this[_0x11aadd(0x17e)][_0x11aadd(0x15c)](g),this[_0x11aadd(0x17e)][_0x11aadd(0x15c)](S);}};$(b,'pluginName',W),$(b,_0x116374(0x19f),_0x2b4fac[_0x116374(0x18e)]),b=ie([_0x50dc84(_0x19c732,_0x30e333,_0x187856),w(0x1,_0x2edfc9(_0x348e3e)),w(0x2,_0x136480)],b);export{b as UniverThreadCommentDataSourcePlugin};function _0x23e7(){const _0xc3551=['size','Delete','UNIVER_UNKNOWN','reply','95uEDwRV','_threadCommentDataSource','setConfig','UNRECOGNIZED','/universer-api/user/list','Reply','find','length','root','format','/solved','/delete','saveCommentToSnapshot','15259900gvRydS','replies','type','Solve','unitId','getCurrentUser','6271867PuqDmH','1772416YhzFes','getUser','thread-comment-data-source.config','getUnit','userId','994JXGTuA','addComment','rangeId','forEach','_init','delete','getComment','_httpService','YYYY/MM/DD\x20HH:mm','disposeWithMe','101844VRVIQV','updateComment','/list','resolved','body','userID','onReady','error','requireSession','map','comment','538SWsdiY','get','user','threadId','payload','Edit','_config','27738rcTfNH','_configService','ref','_threadCommentDataSourceService','parse','solved','syncUpdateMutationToColla','resolveComment','users','replyId','COMMENT','customRanges','parentId','code','stringify','_initUserSync','rangeType','comments','24GZLJFy','Solved','_sessionService','subscribe','symbol','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','pipe','addUser','commentUpdate$','add','_injector','_userService','1857273JsZHbq','createTimestamp','/universer-api/comment/unit/','post','getOwnPropertyDescriptor','/edit','content','Add','_threadCommentModel','getMemberID','OpenOrReOpen','deleteComment'];_0x23e7=function(){return _0xc3551;};return _0x23e7();}
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x17cb(){const _0xdbdc0=['parse','symbol','commentUpdate$','content','users','Unknown','threadId','Solve','4jiwOSb','values','pipe','/add','updateComment','solved','_httpService','Plugin','onStarting','@univerjs/thread-comment-ui','dayjs','Reply','/reply','_configService','type','UniverThreadComment','getUnit','resolveComment','listComments','_injector','slice','requireSession','getOwnPropertyDescriptor','_initDataSource','unitId','reply','_initUserSync','Injector','_config','stringify','_userService','UniverThreadCommentUi','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Delete','rangeId','getMemberID','_init','@univerjs/network','CommentService','/edit','exports','comment','filter','UNRECOGNIZED','_sessionService','dataSource','ref','root','/universer-api/comment/unit/','payload','UNIVER_UNKNOWN','rangeType','UniverThreadCommentUIPlugin','setConfig','resolved','/delete','3012373FbJQoC','ThreadCommentModel','_commentService','createTimestamp','COMMENT','UniverProThreadCommentDatasource','get','_threadCommentDataSource','deleteComment','find','userId','Add','size','comments','error','replyId','code','format','defineProperty','length','post','Edit','CollaborationSessionService','DependentOn','UniverLicensePlugin','Inject','disposeWithMe','forEach','1901265aKUHMt','@univerjs-pro/license','IConfigService','userID','user','_threadCommentDataSourceService','UniverProLicense','map','parentId','object','573846vCLwWO','103991AwxtLF','11169423cCbHrU','OpenOrReOpen','@univerjs/core','UniverCollaborationClientPlugin','UniverInstanceType','Disposable','985656dKjNEh','rxjs','amd','UserManagerService','merge','_threadCommentModel','add','getCurrentUser','1043619VDzPtJ','@univerjs-pro/collaboration-client','replies','/universer-api/user/list','UniverProCollaborationClient','syncUpdateMutationToColla','@univerjs/thread-comment','addUser','Solved','10CTGPDY','UniverThreadCommentDataSourcePlugin','UniverNetwork','body','personId','toStringTag','HTTPService','delete','getComment','/solved','UniverCore','8APHEbn','customRanges'];_0x17cb=function(){return _0xdbdc0;};return _0x17cb();}function _0x5495(_0x80804,_0x2e5ca2){const _0x17cbe5=_0x17cb();return _0x5495=function(_0x5495b7,_0x2bdf76){_0x5495b7=_0x5495b7-0xdb;let _0x3135c7=_0x17cbe5[_0x5495b7];return _0x3135c7;},_0x5495(_0x80804,_0x2e5ca2);}(function(_0x6a1975,_0x52c37d){const _0x505d75=_0x5495,_0x319f38=_0x6a1975();while(!![]){try{const _0x36f25e=-parseInt(_0x505d75(0x111))/0x1*(-parseInt(_0x505d75(0x134))/0x2)+parseInt(_0x505d75(0x120))/0x3*(parseInt(_0x505d75(0x13e))/0x4)+parseInt(_0x505d75(0x106))/0x5+parseInt(_0x505d75(0x110))/0x6+parseInt(_0x505d75(0xea))/0x7+-parseInt(_0x505d75(0x118))/0x8+-parseInt(_0x505d75(0x112))/0x9*(parseInt(_0x505d75(0x129))/0xa);if(_0x36f25e===_0x52c37d)break;else _0x319f38['push'](_0x319f38['shift']());}catch(_0x216a04){_0x319f38['push'](_0x319f38['shift']());}}}(_0x17cb,0x4aa98),function(_0xe43bf5,_0x87b175){const _0x1b4da2=_0x5495;typeof exports==_0x1b4da2(0x10f)&&typeof module<'u'?_0x87b175(exports,require(_0x1b4da2(0x121)),require(_0x1b4da2(0x107)),require(_0x1b4da2(0x114)),require(_0x1b4da2(0x147)),require('@univerjs/thread-comment'),require(_0x1b4da2(0x119)),require(_0x1b4da2(0x163))):typeof define=='function'&&define[_0x1b4da2(0x11a)]?define([_0x1b4da2(0x166),'@univerjs-pro/collaboration-client',_0x1b4da2(0x107),_0x1b4da2(0x114),'@univerjs/thread-comment-ui',_0x1b4da2(0x126),_0x1b4da2(0x119),_0x1b4da2(0x163)],_0x87b175):(_0xe43bf5=typeof globalThis<'u'?globalThis:_0xe43bf5||self,_0x87b175(_0xe43bf5[_0x1b4da2(0xef)]={},_0xe43bf5[_0x1b4da2(0x124)],_0xe43bf5[_0x1b4da2(0x10c)],_0xe43bf5[_0x1b4da2(0x133)],_0xe43bf5[_0x1b4da2(0x15d)],_0xe43bf5[_0x1b4da2(0x14d)],_0xe43bf5['rxjs'],_0xe43bf5[_0x1b4da2(0x12b)]));}(this,function(_0x33dd2a,_0x43c44a,_0x50550f,_0x53e35a,_0x253f3b,_0x108f97,_0x2b80ca,_0x5a57f0){'use strict';const _0x1f0129=_0x5495;const _0x4fe270=_0x1f0129(0x15e);var _0xf2765d=(_0x3fa501=>(_0x3fa501[_0x3fa501[_0x1f0129(0x113)]=0x0]=_0x1f0129(0x113),_0x3fa501[_0x3fa501[_0x1f0129(0x128)]=0x1]=_0x1f0129(0x128),_0x3fa501[_0x3fa501[_0x1f0129(0xdd)]=-0x1]='UNRECOGNIZED',_0x3fa501))(_0xf2765d||{}),_0x1a90aa=(_0x5cd0a7=>(_0x5cd0a7[_0x5cd0a7['Unknown']=0x0]=_0x1f0129(0x13b),_0x5cd0a7[_0x5cd0a7[_0x1f0129(0xf5)]=0x1]=_0x1f0129(0xf5),_0x5cd0a7[_0x5cd0a7[_0x1f0129(0x149)]=0x2]=_0x1f0129(0x149),_0x5cd0a7[_0x5cd0a7[_0x1f0129(0xff)]=0x3]='Edit',_0x5cd0a7[_0x5cd0a7[_0x1f0129(0x15f)]=0x4]=_0x1f0129(0x15f),_0x5cd0a7[_0x5cd0a7[_0x1f0129(0x13d)]=0x5]=_0x1f0129(0x13d),_0x5cd0a7[_0x5cd0a7['UNRECOGNIZED']=-0x1]=_0x1f0129(0xdd),_0x5cd0a7))(_0x1a90aa||{});const _0x8d5e55=_0x55a3d6=>_0x53e35a[_0x1f0129(0x148)](new Date(+_0x55a3d6))[_0x1f0129(0xfb)]('YYYY/MM/DD\x20HH:mm'),_0x3f692b=async(_0x529823,_0x3e7fef)=>{const _0x13b284=_0x1f0129,_0x5084c9=_0x529823[_0x13b284(0xf0)](_0x53e35a['UserManagerService']),_0x19e65a=_0x529823['get'](_0x5a57f0['HTTPService']);_0x3e7fef[_0x13b284(0x105)](_0x22c844=>{const _0x18b3ba=_0x13b284;_0x5084c9['getUser'](_0x22c844)&&_0x3e7fef[_0x18b3ba(0x130)](_0x22c844);}),_0x3e7fef[_0x13b284(0xf6)]&&(await _0x19e65a[_0x13b284(0xf0)](_0x13b284(0x123),{'params':{'userIDs':[..._0x3e7fef]}}))[_0x13b284(0x12c)][_0x13b284(0x13a)][_0x13b284(0x105)](_0x361a63=>{const _0x41187f=_0x13b284;_0x361a63&&_0x5084c9[_0x41187f(0x127)](_0x361a63);});};var _0x3a180c=Object[_0x1f0129(0x154)],_0x36642a=(_0x44a556,_0x4a20bd,_0x77804c,_0x15d847)=>{const _0x4038c7=_0x1f0129;for(var _0x20aa31=_0x15d847>0x1?void 0x0:_0x15d847?_0x3a180c(_0x4a20bd,_0x77804c):_0x4a20bd,_0x4e6fb6=_0x44a556[_0x4038c7(0xfd)]-0x1,_0x45ee2f;_0x4e6fb6>=0x0;_0x4e6fb6--)(_0x45ee2f=_0x44a556[_0x4e6fb6])&&(_0x20aa31=_0x45ee2f(_0x20aa31)||_0x20aa31);return _0x20aa31;},_0x51482d=(_0x3eb8c4,_0x3803f0)=>(_0x21baf3,_0x1ad64c)=>_0x3803f0(_0x21baf3,_0x1ad64c,_0x3eb8c4);let _0x202359=class extends _0x53e35a[_0x1f0129(0x117)]{constructor(_0x5a7d26,_0x479b75,_0x8fc586,_0x382dc1){const _0x321215=_0x1f0129;super(),this[_0x321215(0xec)]=_0x5a7d26,this[_0x321215(0x11d)]=_0x479b75,this[_0x321215(0x15c)]=_0x8fc586,this[_0x321215(0x151)]=_0x382dc1,this['_init'](),this[_0x321215(0x158)]();}[_0x1f0129(0x158)](){const _0x1e5999=_0x1f0129;this[_0x1e5999(0x104)](this['_threadCommentModel'][_0x1e5999(0x138)][_0x1e5999(0x140)](_0x2b80ca['bufferTime'](0x10))['subscribe'](_0x2a3e04=>{const _0x26fa3f=_0x1e5999,_0x443f3f=new Set();_0x2a3e04['forEach'](_0x4f838f=>{const _0x622a6a=_0x5495;switch(_0x4f838f[_0x622a6a(0x14c)]){case'add':{const _0xe79803=_0x4f838f[_0x622a6a(0xe3)][_0x622a6a(0x12d)];_0x443f3f[_0x622a6a(0x11e)](_0xe79803);break;}}}),_0x3f692b(this[_0x26fa3f(0x151)],_0x443f3f);}));}[_0x1f0129(0x162)](){const _0x33ddae=_0x1f0129;this[_0x33ddae(0x104)](this['_commentService']['commentUpdate$']['subscribe'](async _0x3e8a5e=>{const _0x450d9d=_0x33ddae;var _0x23cde9,_0x320c47,_0x288c52,_0x3d5f9e;const _0x19b033=(_0x23cde9=this[_0x450d9d(0x11d)]['getUnit'](_0x3e8a5e[_0x450d9d(0x156)])['find'](_0x447d12=>_0x447d12[_0x450d9d(0x13c)]===_0x3e8a5e[_0x450d9d(0x13c)]))==null?void 0x0:_0x23cde9['root'];if(!_0x19b033)return;const {unitId:_0x510bac,subUnitId:_0x41112f}=_0x19b033;switch(_0x3e8a5e[_0x450d9d(0x10a)]&&this['_userService']['addUser'](_0x3e8a5e[_0x450d9d(0x10a)]),_0x3e8a5e[_0x450d9d(0x14c)]){case _0x1a90aa[_0x450d9d(0xf5)]:break;case _0x1a90aa[_0x450d9d(0x149)]:{this[_0x450d9d(0x11d)]['addComment'](_0x510bac,_0x41112f,{'unitId':_0x510bac,'subUnitId':_0x41112f,'ref':'','id':_0x3e8a5e[_0x450d9d(0xf9)],'dT':_0x8d5e55(+_0x3e8a5e[_0x450d9d(0xed)]),'threadId':_0x3e8a5e[_0x450d9d(0x13c)],'personId':(_0x288c52=(_0x320c47=_0x3e8a5e['user'])==null?void 0x0:_0x320c47[_0x450d9d(0x109)])!=null?_0x288c52:_0x3e8a5e[_0x450d9d(0xf4)],'text':JSON[_0x450d9d(0x136)](_0x3e8a5e[_0x450d9d(0x139)]),'parentId':_0x19b033['id']});break;}case _0x1a90aa[_0x450d9d(0x15f)]:{const _0x54d378=this['_threadCommentModel'][_0x450d9d(0x131)](_0x510bac,_0x41112f,_0x3e8a5e[_0x450d9d(0xf9)]);_0x54d378&&_0x54d378[_0x450d9d(0x10e)]&&this[_0x450d9d(0x11d)][_0x450d9d(0xf2)](_0x510bac,_0x41112f,_0x3e8a5e[_0x450d9d(0xf9)]);break;}case _0x1a90aa[_0x450d9d(0xff)]:{this[_0x450d9d(0x11d)][_0x450d9d(0x142)](_0x510bac,_0x41112f,{'commentId':_0x3e8a5e['replyId'],'text':JSON[_0x450d9d(0x136)](_0x3e8a5e[_0x450d9d(0x139)])});break;}case _0x1a90aa[_0x450d9d(0x13d)]:{const _0x216967=(_0x3d5f9e=this[_0x450d9d(0x11d)][_0x450d9d(0x14e)](_0x3e8a5e[_0x450d9d(0x156)])[_0x450d9d(0xf3)](_0x26c967=>_0x26c967[_0x450d9d(0x13c)]===_0x3e8a5e['threadId']))==null?void 0x0:_0x3d5f9e[_0x450d9d(0xe1)];_0x216967&&this[_0x450d9d(0x11d)][_0x450d9d(0x14f)](_0x510bac,_0x41112f,_0x216967['id'],_0x3e8a5e[_0x450d9d(0x143)]===_0xf2765d[_0x450d9d(0x128)]);break;}}}));}};_0x202359=_0x36642a([_0x51482d(0x0,_0x53e35a[_0x1f0129(0x103)](_0x43c44a[_0x1f0129(0x164)])),_0x51482d(0x1,_0x53e35a['Inject'](_0x108f97[_0x1f0129(0xeb)])),_0x51482d(0x2,_0x53e35a['Inject'](_0x53e35a[_0x1f0129(0x11b)])),_0x51482d(0x3,_0x53e35a['Inject'](_0x53e35a[_0x1f0129(0x159)]))],_0x202359);const _0x565501='thread-comment-data-source.config',_0x49a68f={};var _0x325857=Object[_0x1f0129(0x154)],_0x44ab7a=(_0x5cf9d7,_0x571812,_0x218469,_0x450593)=>{for(var _0x294c47=_0x450593>0x1?void 0x0:_0x450593?_0x325857(_0x571812,_0x218469):_0x571812,_0x281666=_0x5cf9d7['length']-0x1,_0x22d1e0;_0x281666>=0x0;_0x281666--)(_0x22d1e0=_0x5cf9d7[_0x281666])&&(_0x294c47=_0x22d1e0(_0x294c47)||_0x294c47);return _0x294c47;},_0x1c4e6f=(_0x1a7601,_0x285e74)=>(_0x5781b2,_0x13914d)=>_0x285e74(_0x5781b2,_0x13914d,_0x1a7601);function _0x8f83dd(_0x1959bb,_0x5d38d3){const _0x249b37=_0x1f0129,_0x4689de=_0x1959bb[_0x249b37(0x122)][0x0];return{..._0x5d38d3,'id':_0x4689de['replyId'],'resolved':_0x1959bb[_0x249b37(0x143)]===0x1,'dT':_0x8d5e55(_0x4689de[_0x249b37(0xed)]),'personId':_0x4689de[_0x249b37(0xf4)],'threadId':_0x4689de['threadId']};}function _0x1894e5(_0x6465cf,_0x387a51,_0x3aecf5){const _0x21440d=_0x1f0129;var _0x27d153,_0x20fa87;if(((_0x20fa87=(_0x27d153=_0x6465cf==null?void 0x0:_0x6465cf[_0x21440d(0x122)])==null?void 0x0:_0x27d153[_0x21440d(0xfd)])!=null?_0x20fa87:0x0)>0x0){const _0x3f296a=(_0x481cd6,_0x5e1c47)=>({'id':_0x481cd6['replyId'],'threadId':_0x481cd6[_0x21440d(0x13c)],'dT':_0x8d5e55(_0x481cd6[_0x21440d(0xed)]),'personId':_0x481cd6[_0x21440d(0xf4)],'resolved':_0x6465cf[_0x21440d(0x143)]===_0xf2765d['Solved'],'unitId':_0x387a51,'subUnitId':_0x3aecf5,'text':JSON[_0x21440d(0x136)](_0x481cd6['content']),'parentId':_0x5e1c47}),_0x4aa9c4=_0x3f296a(_0x6465cf['replies'][0x0]);return{..._0x4aa9c4,'children':_0x6465cf[_0x21440d(0x122)][_0x21440d(0x152)](0x1)[_0x21440d(0x10d)](_0x100d93=>_0x3f296a(_0x100d93,_0x4aa9c4['id']))};}return null;}let _0x4cf574=class{constructor(_0x187057,_0x5775e3,_0x507cb2,_0x1acfa1){const _0xa3f6ab=_0x1f0129;this[_0xa3f6ab(0x144)]=_0x187057,this[_0xa3f6ab(0x15c)]=_0x5775e3,this[_0xa3f6ab(0xde)]=_0x507cb2,this[_0xa3f6ab(0x151)]=_0x1acfa1;}async['addComment'](_0x15692b){const _0x10870a=_0x1f0129;var _0x237f35,_0x4bf77d;const {parentId:_0x3ad8fb,unitId:_0x2a48e4,text:_0x1733d6,threadId:_0x1a9900}=_0x15692b,_0x260492=(_0x4bf77d=(_0x237f35=_0x1733d6['customRanges'])==null?void 0x0:_0x237f35[_0x10870a(0xdc)](_0x2ad657=>_0x2ad657[_0x10870a(0xe5)]===_0x53e35a['CustomRangeType'][_0x10870a(0xee)])[_0x10870a(0x10d)](_0x384f4=>_0x384f4[_0x10870a(0x160)]))!=null?_0x4bf77d:[],_0xfe47ec=JSON[_0x10870a(0x15b)](_0x1733d6),_0x191c0d=(await this[_0x10870a(0xde)][_0x10870a(0x153)](_0x2a48e4))[_0x10870a(0x161)]();if(_0x3ad8fb){const _0x5b10b3={'memberId':_0x191c0d,'unitId':_0x2a48e4,'content':_0xfe47ec,'mention':_0x260492,'threadId':_0x1a9900},_0x759c3d=(await this[_0x10870a(0x144)][_0x10870a(0xfe)](_0x10870a(0xe2)+_0x2a48e4+_0x10870a(0x14a),{'body':_0x5b10b3}))['body'][_0x10870a(0x157)];return{..._0x15692b,'id':_0x759c3d[_0x10870a(0xf9)],'dT':_0x53e35a[_0x10870a(0x148)](+_0x759c3d[_0x10870a(0xed)])[_0x10870a(0xfb)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x759c3d[_0x10870a(0xf4)]};}else{const _0x4e9519={'memberId':_0x191c0d,'unitId':_0x2a48e4,'content':_0xfe47ec,'mention':_0x260492},_0x172377=await this[_0x10870a(0x144)]['post'](_0x10870a(0xe2)+_0x2a48e4+_0x10870a(0x141),{'body':_0x4e9519});return _0x8f83dd(_0x172377[_0x10870a(0x12c)][_0x10870a(0xdb)],_0x15692b);}}async[_0x1f0129(0x142)](_0x3e3023){const _0x30004f=_0x1f0129;var _0x148cc3,_0x315006;const {text:_0x12e8f5,unitId:_0x456ae4}=_0x3e3023,_0x497393=(_0x315006=(_0x148cc3=_0x12e8f5[_0x30004f(0x135)])==null?void 0x0:_0x148cc3['filter'](_0xb9f492=>_0xb9f492[_0x30004f(0xe5)]===_0x53e35a['CustomRangeType'][_0x30004f(0xee)])[_0x30004f(0x10d)](_0x35fc75=>_0x35fc75[_0x30004f(0x160)]))!=null?_0x315006:[],_0x51f974=JSON[_0x30004f(0x15b)](_0x12e8f5),_0x832e89=_0x3e3023[_0x30004f(0x13c)],_0x48d89d=_0x3e3023['id'],_0x5d0576={'memberId':(await this[_0x30004f(0xde)][_0x30004f(0x153)](_0x456ae4))[_0x30004f(0x161)](),'unitId':_0x456ae4,'threadId':_0x832e89,'mention':_0x497393,'content':_0x51f974,'replyId':_0x48d89d},_0x5b23dd=await this['_httpService'][_0x30004f(0xfe)](_0x30004f(0xe2)+_0x456ae4+_0x30004f(0x165),{'body':_0x5d0576});return!_0x5b23dd[_0x30004f(0x12c)][_0x30004f(0xf8)]||_0x5b23dd[_0x30004f(0x12c)][_0x30004f(0xf8)][_0x30004f(0xfa)]===0x1;}async[_0x1f0129(0x14f)](_0x2c4a32){const _0x15eb58=_0x1f0129,{unitId:_0x1e0410}=_0x2c4a32,_0x1ff306=_0x2c4a32[_0x15eb58(0x13c)],_0x4f9207={'memberId':this[_0x15eb58(0x15c)][_0x15eb58(0x11f)]()['userID'],'unitId':_0x1e0410,'threadId':_0x1ff306,'solved':_0x2c4a32[_0x15eb58(0xe8)]?_0xf2765d[_0x15eb58(0x128)]:_0xf2765d['OpenOrReOpen']},_0x3bcfaa=await this[_0x15eb58(0x144)][_0x15eb58(0xfe)]('/universer-api/comment/unit/'+_0x1e0410+_0x15eb58(0x132),{'body':_0x4f9207});return!_0x3bcfaa['body'][_0x15eb58(0xf8)]||_0x3bcfaa[_0x15eb58(0x12c)][_0x15eb58(0xf8)][_0x15eb58(0xfa)]===0x1;}async[_0x1f0129(0xf2)](_0x50b165,_0x96d935,_0x221499,_0x189ab3){const _0x198b22=_0x1f0129,_0x44eb0c={'memberId':(await this[_0x198b22(0xde)][_0x198b22(0x153)](_0x50b165))[_0x198b22(0x161)](),'threadId':_0x221499,'replyId':_0x189ab3,'unitId':_0x50b165},_0x20d1f4=await this[_0x198b22(0x144)][_0x198b22(0xfe)](_0x198b22(0xe2)+_0x50b165+_0x198b22(0xe9),{'body':_0x44eb0c});return!_0x20d1f4['body'][_0x198b22(0xf8)]||_0x20d1f4[_0x198b22(0x12c)][_0x198b22(0xf8)][_0x198b22(0xfa)]===0x1;}async[_0x1f0129(0x150)](_0x3052af,_0x5ad8f8,_0x22670b){const _0x5ad9d5=_0x1f0129,_0x347855={'unitId':_0x3052af,'threadId':_0x22670b},_0x4cd1ea=await this[_0x5ad9d5(0x144)]['post'](_0x5ad9d5(0xe2)+_0x3052af+'/list',{'body':_0x347855}),_0xa4ccdd=_0x22670b[_0x5ad9d5(0x10d)](_0x497fd3=>_0x1894e5(_0x4cd1ea[_0x5ad9d5(0x12c)][_0x5ad9d5(0xf7)][_0x497fd3],_0x3052af,_0x5ad8f8))[_0x5ad9d5(0xdc)](Boolean);return Object[_0x5ad9d5(0x13f)](_0x4cd1ea[_0x5ad9d5(0x12c)][_0x5ad9d5(0x13a)])['forEach'](_0x4ca081=>{const _0x25de8a=_0x5ad9d5;this[_0x25de8a(0x15c)]['addUser'](_0x4ca081);}),_0xa4ccdd;}['saveCommentToSnapshot'](_0x50c700){const _0x334b66=_0x1f0129;return{'id':_0x50c700['id'],'threadId':_0x50c700[_0x334b66(0x13c)],'ref':_0x50c700[_0x334b66(0xe0)]};}};_0x4cf574=_0x44ab7a([_0x1c4e6f(0x0,_0x53e35a[_0x1f0129(0x103)](_0x5a57f0[_0x1f0129(0x12f)])),_0x1c4e6f(0x1,_0x53e35a['Inject'](_0x53e35a[_0x1f0129(0x11b)])),_0x1c4e6f(0x2,_0x53e35a['Inject'](_0x43c44a[_0x1f0129(0x100)])),_0x1c4e6f(0x3,_0x53e35a['Inject'](_0x53e35a[_0x1f0129(0x159)]))],_0x4cf574);var _0x53d67a=Object[_0x1f0129(0x154)],_0x3a60f4=(_0x188fef,_0x32ab99,_0x5b48b6,_0x4244ca)=>{const _0x24ddc1=_0x1f0129;for(var _0x57b01e=_0x4244ca>0x1?void 0x0:_0x4244ca?_0x53d67a(_0x32ab99,_0x5b48b6):_0x32ab99,_0x214adf=_0x188fef[_0x24ddc1(0xfd)]-0x1,_0x26148b;_0x214adf>=0x0;_0x214adf--)(_0x26148b=_0x188fef[_0x214adf])&&(_0x57b01e=_0x26148b(_0x57b01e)||_0x57b01e);return _0x57b01e;},_0x1d8a42=(_0x289463,_0x5c6c86)=>(_0x1fa82b,_0x507d25)=>_0x5c6c86(_0x1fa82b,_0x507d25,_0x289463);let _0xe01c05=class extends _0x53e35a['Disposable']{constructor(_0x4b9768,_0x51fdb6){const _0x52877e=_0x1f0129;super(),this['_threadCommentDataSourceService']=_0x4b9768,this[_0x52877e(0xf1)]=_0x51fdb6,this[_0x52877e(0x155)]();}[_0x1f0129(0x155)](){const _0x3b1451=_0x1f0129;this[_0x3b1451(0x10b)][_0x3b1451(0xdf)]=this['_threadCommentDataSource'],this[_0x3b1451(0x10b)][_0x3b1451(0x125)]=!0x1;}};_0xe01c05=_0x3a60f4([_0x1d8a42(0x0,_0x108f97['IThreadCommentDataSourceService']),_0x1d8a42(0x1,_0x53e35a[_0x1f0129(0x103)](_0x4cf574))],_0xe01c05);var _0x3fad60=Object[_0x1f0129(0xfc)],_0x122880=Object['getOwnPropertyDescriptor'],_0x60a5c6=(_0x542168,_0x5d7baf,_0x403db7)=>_0x5d7baf in _0x542168?_0x3fad60(_0x542168,_0x5d7baf,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x403db7}):_0x542168[_0x5d7baf]=_0x403db7,_0x2a65e2=(_0x4651fb,_0x131de8,_0x2daabd,_0x57d3b9)=>{for(var _0x2a5770=_0x57d3b9>0x1?void 0x0:_0x57d3b9?_0x122880(_0x131de8,_0x2daabd):_0x131de8,_0x5e790b=_0x4651fb['length']-0x1,_0x592432;_0x5e790b>=0x0;_0x5e790b--)(_0x592432=_0x4651fb[_0x5e790b])&&(_0x2a5770=_0x592432(_0x2a5770)||_0x2a5770);return _0x2a5770;},_0x5ad332=(_0x6864bf,_0x3ba13f)=>(_0x4c0bff,_0x16b70f)=>_0x3ba13f(_0x4c0bff,_0x16b70f,_0x6864bf),_0x4feaf5=(_0x5ed73b,_0x71685b,_0x4f2cad)=>_0x60a5c6(_0x5ed73b,typeof _0x71685b!=_0x1f0129(0x137)?_0x71685b+'':_0x71685b,_0x4f2cad);_0x33dd2a[_0x1f0129(0x12a)]=class extends _0x53e35a[_0x1f0129(0x145)]{constructor(_0x2f225c=_0x49a68f,_0x119ee3,_0x184642){const _0x1759da=_0x1f0129;super(),this[_0x1759da(0x15a)]=_0x2f225c,this[_0x1759da(0x151)]=_0x119ee3,this[_0x1759da(0x14b)]=_0x184642;const {..._0xc49d71}=_0x53e35a[_0x1759da(0x11c)]({},_0x49a68f,this[_0x1759da(0x15a)]);this[_0x1759da(0x14b)][_0x1759da(0xe7)](_0x565501,_0xc49d71);}[_0x1f0129(0x146)](){const _0x175d3f=_0x1f0129;[[_0x4cf574],[_0xe01c05],[_0x202359]][_0x175d3f(0x105)](_0x16112e=>{const _0xb2ca3f=_0x175d3f;this[_0xb2ca3f(0x151)][_0xb2ca3f(0x11e)](_0x16112e);});}['onReady'](){const _0x33f9b9=_0x1f0129;this['_injector'][_0x33f9b9(0xf0)](_0xe01c05),this[_0x33f9b9(0x151)][_0x33f9b9(0xf0)](_0x202359);}},_0x4feaf5(_0x33dd2a['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x4fe270),_0x4feaf5(_0x33dd2a[_0x1f0129(0x12a)],_0x1f0129(0x14c),_0x53e35a[_0x1f0129(0x116)][_0x1f0129(0xe4)]),_0x33dd2a['UniverThreadCommentDataSourcePlugin']=_0x2a65e2([_0x53e35a[_0x1f0129(0x101)](_0x253f3b[_0x1f0129(0xe6)],_0x43c44a[_0x1f0129(0x115)],_0x50550f[_0x1f0129(0x102)]),_0x5ad332(0x1,_0x53e35a[_0x1f0129(0x103)](_0x53e35a[_0x1f0129(0x159)])),_0x5ad332(0x2,_0x53e35a[_0x1f0129(0x108)])],_0x33dd2a['UniverThreadCommentDataSourcePlugin']),Object[_0x1f0129(0xfc)](_0x33dd2a,Symbol[_0x1f0129(0x12e)],{'value':'Module'});}));
1
+ function _0xb4ca(_0x5931e0,_0x56b725){const _0x168aa0=_0x168a();return _0xb4ca=function(_0xb4ca5a,_0x5b5926){_0xb4ca5a=_0xb4ca5a-0x10e;let _0xb28201=_0x168aa0[_0xb4ca5a];return _0xb28201;},_0xb4ca(_0x5931e0,_0x56b725);}(function(_0x3c8361,_0x420479){const _0x363ce6=_0xb4ca,_0x2960ca=_0x3c8361();while(!![]){try{const _0x5f29fb=-parseInt(_0x363ce6(0x18e))/0x1*(-parseInt(_0x363ce6(0x150))/0x2)+parseInt(_0x363ce6(0x18c))/0x3+-parseInt(_0x363ce6(0x186))/0x4*(-parseInt(_0x363ce6(0x11a))/0x5)+-parseInt(_0x363ce6(0x112))/0x6*(-parseInt(_0x363ce6(0x17b))/0x7)+parseInt(_0x363ce6(0x18d))/0x8*(-parseInt(_0x363ce6(0x17a))/0x9)+-parseInt(_0x363ce6(0x187))/0xa*(-parseInt(_0x363ce6(0x118))/0xb)+-parseInt(_0x363ce6(0x117))/0xc;if(_0x5f29fb===_0x420479)break;else _0x2960ca['push'](_0x2960ca['shift']());}catch(_0x5a2198){_0x2960ca['push'](_0x2960ca['shift']());}}}(_0x168a,0xc0620),function(_0x36ca40,_0x446d05){const _0x22b554=_0xb4ca;typeof exports=='object'&&typeof module<'u'?_0x446d05(exports,require(_0x22b554(0x16c)),require(_0x22b554(0x12d)),require(_0x22b554(0x12e)),require(_0x22b554(0x153)),require('@univerjs/thread-comment'),require(_0x22b554(0x176)),require(_0x22b554(0x13a))):typeof define==_0x22b554(0x12f)&&define[_0x22b554(0x160)]?define([_0x22b554(0x189),_0x22b554(0x16c),'@univerjs-pro/license',_0x22b554(0x12e),_0x22b554(0x153),_0x22b554(0x175),'rxjs',_0x22b554(0x13a)],_0x446d05):(_0x36ca40=typeof globalThis<'u'?globalThis:_0x36ca40||self,_0x446d05(_0x36ca40['UniverProThreadCommentDatasource']={},_0x36ca40[_0x22b554(0x147)],_0x36ca40[_0x22b554(0x11f)],_0x36ca40['UniverCore'],_0x36ca40[_0x22b554(0x15c)],_0x36ca40[_0x22b554(0x180)],_0x36ca40[_0x22b554(0x176)],_0x36ca40['UniverNetwork']));}(this,function(_0x56f02d,_0x1873ef,_0x43a539,_0x3b2c84,_0x2a5c4f,_0x53df5c,_0x5f7765,_0x1ae3fe){'use strict';const _0x368673=_0xb4ca;const _0x553b42=_0x368673(0x152);var _0xf2a2bd=(_0x1cc6d5=>(_0x1cc6d5[_0x1cc6d5[_0x368673(0x183)]=0x0]=_0x368673(0x183),_0x1cc6d5[_0x1cc6d5[_0x368673(0x173)]=0x1]=_0x368673(0x173),_0x1cc6d5[_0x1cc6d5[_0x368673(0x11b)]=-0x1]=_0x368673(0x11b),_0x1cc6d5))(_0xf2a2bd||{}),_0x433cbe=(_0x186b1f=>(_0x186b1f[_0x186b1f[_0x368673(0x13d)]=0x0]=_0x368673(0x13d),_0x186b1f[_0x186b1f[_0x368673(0x10f)]=0x1]=_0x368673(0x10f),_0x186b1f[_0x186b1f[_0x368673(0x139)]=0x2]=_0x368673(0x139),_0x186b1f[_0x186b1f[_0x368673(0x14f)]=0x3]='Edit',_0x186b1f[_0x186b1f[_0x368673(0x113)]=0x4]=_0x368673(0x113),_0x186b1f[_0x186b1f[_0x368673(0x179)]=0x5]=_0x368673(0x179),_0x186b1f[_0x186b1f['UNRECOGNIZED']=-0x1]=_0x368673(0x11b),_0x186b1f))(_0x433cbe||{});const _0xcbe2b0=_0x23426c=>_0x3b2c84[_0x368673(0x163)](new Date(+_0x23426c))[_0x368673(0x162)](_0x368673(0x18a)),_0x388cc5=async(_0x517255,_0x170c46)=>{const _0x32acad=_0x368673,_0x1f607b=_0x517255['get'](_0x3b2c84['UserManagerService']),_0x502854=_0x517255[_0x32acad(0x13f)](_0x1ae3fe['HTTPService']);_0x170c46[_0x32acad(0x116)](_0x3f2375=>{const _0x1057f3=_0x32acad;_0x1f607b[_0x1057f3(0x178)](_0x3f2375)&&_0x170c46[_0x1057f3(0x161)](_0x3f2375);}),_0x170c46[_0x32acad(0x171)]&&(await _0x502854[_0x32acad(0x13f)](_0x32acad(0x190),{'params':{'userIDs':[..._0x170c46]}}))[_0x32acad(0x125)][_0x32acad(0x136)][_0x32acad(0x116)](_0x40999d=>{const _0x40302b=_0x32acad;_0x40999d&&_0x1f607b[_0x40302b(0x143)](_0x40999d);});};var _0x2b7223=Object[_0x368673(0x184)],_0x567497=(_0x11f149,_0x159dd7,_0x2c6eaa,_0x370c4b)=>{const _0xdfb3ec=_0x368673;for(var _0x435d40=_0x370c4b>0x1?void 0x0:_0x370c4b?_0x2b7223(_0x159dd7,_0x2c6eaa):_0x159dd7,_0x76ede=_0x11f149[_0xdfb3ec(0x169)]-0x1,_0x1d49ed;_0x76ede>=0x0;_0x76ede--)(_0x1d49ed=_0x11f149[_0x76ede])&&(_0x435d40=_0x1d49ed(_0x435d40)||_0x435d40);return _0x435d40;},_0x47a0c9=(_0x56c960,_0x3d01a5)=>(_0x18b6cc,_0x2b7be9)=>_0x3d01a5(_0x18b6cc,_0x2b7be9,_0x56c960);let _0xc0a2db=class extends _0x3b2c84[_0x368673(0x172)]{constructor(_0x4c20b5,_0x2dd7ff,_0x1b08bf,_0x586ed0){const _0x227f74=_0x368673;super(),this[_0x227f74(0x124)]=_0x4c20b5,this[_0x227f74(0x111)]=_0x2dd7ff,this['_userService']=_0x1b08bf,this['_injector']=_0x586ed0,this[_0x227f74(0x13b)](),this[_0x227f74(0x182)]();}[_0x368673(0x182)](){const _0x38aff7=_0x368673;this[_0x38aff7(0x154)](this['_threadCommentModel'][_0x38aff7(0x138)]['pipe'](_0x5f7765[_0x38aff7(0x194)](0x10))[_0x38aff7(0x181)](_0x21611d=>{const _0xb631fa=_0x38aff7,_0xd2f476=new Set();_0x21611d[_0xb631fa(0x116)](_0x94bd27=>{const _0x922520=_0xb631fa;switch(_0x94bd27[_0x922520(0x192)]){case _0x922520(0x17f):{const _0x1c8662=_0x94bd27['payload'][_0x922520(0x146)];_0xd2f476[_0x922520(0x17f)](_0x1c8662);break;}}}),_0x388cc5(this[_0xb631fa(0x15f)],_0xd2f476);}));}['_init'](){const _0x315fbc=_0x368673;this['disposeWithMe'](this['_commentService'][_0x315fbc(0x138)][_0x315fbc(0x181)](async _0x5a51be=>{const _0x3d9d6e=_0x315fbc;var _0xb23201,_0x56faf2,_0x1d5458,_0xab6039;const _0x2f6683=(_0xb23201=this[_0x3d9d6e(0x111)]['getUnit'](_0x5a51be[_0x3d9d6e(0x141)])['find'](_0x13ff33=>_0x13ff33[_0x3d9d6e(0x114)]===_0x5a51be[_0x3d9d6e(0x114)]))==null?void 0x0:_0xb23201[_0x3d9d6e(0x16f)];if(!_0x2f6683)return;const {unitId:_0x28bd6d,subUnitId:_0x2c7933}=_0x2f6683;switch(_0x5a51be['user']&&this[_0x3d9d6e(0x115)][_0x3d9d6e(0x143)](_0x5a51be[_0x3d9d6e(0x193)]),_0x5a51be[_0x3d9d6e(0x192)]){case _0x433cbe['Add']:break;case _0x433cbe[_0x3d9d6e(0x139)]:{this[_0x3d9d6e(0x111)]['addComment'](_0x28bd6d,_0x2c7933,{'unitId':_0x28bd6d,'subUnitId':_0x2c7933,'ref':'','id':_0x5a51be['replyId'],'dT':_0xcbe2b0(+_0x5a51be[_0x3d9d6e(0x15a)]),'threadId':_0x5a51be[_0x3d9d6e(0x114)],'personId':(_0x1d5458=(_0x56faf2=_0x5a51be[_0x3d9d6e(0x193)])==null?void 0x0:_0x56faf2[_0x3d9d6e(0x12b)])!=null?_0x1d5458:_0x5a51be[_0x3d9d6e(0x131)],'text':JSON[_0x3d9d6e(0x122)](_0x5a51be['content']),'parentId':_0x2f6683['id']});break;}case _0x433cbe[_0x3d9d6e(0x113)]:{const _0x300f95=this[_0x3d9d6e(0x111)]['getComment'](_0x28bd6d,_0x2c7933,_0x5a51be[_0x3d9d6e(0x155)]);_0x300f95&&_0x300f95[_0x3d9d6e(0x145)]&&this[_0x3d9d6e(0x111)][_0x3d9d6e(0x151)](_0x28bd6d,_0x2c7933,_0x5a51be[_0x3d9d6e(0x155)]);break;}case _0x433cbe[_0x3d9d6e(0x14f)]:{this[_0x3d9d6e(0x111)]['updateComment'](_0x28bd6d,_0x2c7933,{'commentId':_0x5a51be[_0x3d9d6e(0x155)],'text':JSON['parse'](_0x5a51be[_0x3d9d6e(0x188)])});break;}case _0x433cbe['Solve']:{const _0x29fee6=(_0xab6039=this[_0x3d9d6e(0x111)][_0x3d9d6e(0x142)](_0x5a51be['unitId'])['find'](_0x4688f0=>_0x4688f0[_0x3d9d6e(0x114)]===_0x5a51be['threadId']))==null?void 0x0:_0xab6039[_0x3d9d6e(0x16f)];_0x29fee6&&this[_0x3d9d6e(0x111)][_0x3d9d6e(0x11c)](_0x28bd6d,_0x2c7933,_0x29fee6['id'],_0x5a51be[_0x3d9d6e(0x110)]===_0xf2a2bd[_0x3d9d6e(0x173)]);break;}}}));}};_0xc0a2db=_0x567497([_0x47a0c9(0x0,_0x3b2c84[_0x368673(0x185)](_0x1873ef[_0x368673(0x148)])),_0x47a0c9(0x1,_0x3b2c84[_0x368673(0x185)](_0x53df5c[_0x368673(0x167)])),_0x47a0c9(0x2,_0x3b2c84[_0x368673(0x185)](_0x3b2c84[_0x368673(0x123)])),_0x47a0c9(0x3,_0x3b2c84[_0x368673(0x185)](_0x3b2c84[_0x368673(0x140)]))],_0xc0a2db);const _0x10b7de=_0x368673(0x14b),_0x193a60={};var _0xdc7f21=Object[_0x368673(0x184)],_0x193a00=(_0x195621,_0x2efa50,_0x4b5fa0,_0x53c234)=>{const _0x5b7cba=_0x368673;for(var _0x351a05=_0x53c234>0x1?void 0x0:_0x53c234?_0xdc7f21(_0x2efa50,_0x4b5fa0):_0x2efa50,_0x2d9b3e=_0x195621[_0x5b7cba(0x169)]-0x1,_0x1c3a7d;_0x2d9b3e>=0x0;_0x2d9b3e--)(_0x1c3a7d=_0x195621[_0x2d9b3e])&&(_0x351a05=_0x1c3a7d(_0x351a05)||_0x351a05);return _0x351a05;},_0x3af144=(_0x140cfb,_0x51f7da)=>(_0x2b6d61,_0x5f5709)=>_0x51f7da(_0x2b6d61,_0x5f5709,_0x140cfb);function _0x3dd44b(_0x298629,_0x5cb8d4){const _0x5a1ea0=_0x368673,_0x5d25fb=_0x298629[_0x5a1ea0(0x15d)][0x0];return{..._0x5cb8d4,'id':_0x5d25fb['replyId'],'resolved':_0x298629[_0x5a1ea0(0x110)]===0x1,'dT':_0xcbe2b0(_0x5d25fb[_0x5a1ea0(0x15a)]),'personId':_0x5d25fb[_0x5a1ea0(0x131)],'threadId':_0x5d25fb['threadId']};}function _0x1ea0b9(_0x347916,_0x3722d3,_0x38e6df){const _0x1cbbde=_0x368673;var _0x21ee09,_0x5f34f6;if(((_0x5f34f6=(_0x21ee09=_0x347916==null?void 0x0:_0x347916[_0x1cbbde(0x15d)])==null?void 0x0:_0x21ee09[_0x1cbbde(0x169)])!=null?_0x5f34f6:0x0)>0x0){const _0x52c4d0=(_0x2473e1,_0x4bea88)=>({'id':_0x2473e1[_0x1cbbde(0x155)],'threadId':_0x2473e1['threadId'],'dT':_0xcbe2b0(_0x2473e1['createTimestamp']),'personId':_0x2473e1[_0x1cbbde(0x131)],'resolved':_0x347916['solved']===_0xf2a2bd[_0x1cbbde(0x173)],'unitId':_0x3722d3,'subUnitId':_0x38e6df,'text':JSON[_0x1cbbde(0x122)](_0x2473e1[_0x1cbbde(0x188)]),'parentId':_0x4bea88}),_0x245828=_0x52c4d0(_0x347916[_0x1cbbde(0x15d)][0x0]);return{..._0x245828,'children':_0x347916[_0x1cbbde(0x15d)][_0x1cbbde(0x166)](0x1)[_0x1cbbde(0x191)](_0x3a4ab4=>_0x52c4d0(_0x3a4ab4,_0x245828['id']))};}return null;}let _0x46d64f=class{constructor(_0x57fbe6,_0x4ebd6d,_0x117eae,_0x5c4df1){const _0x313d1f=_0x368673;this['_httpService']=_0x57fbe6,this[_0x313d1f(0x115)]=_0x4ebd6d,this['_sessionService']=_0x117eae,this[_0x313d1f(0x15f)]=_0x5c4df1;}async[_0x368673(0x159)](_0x30d2d9){const _0x3c639d=_0x368673;var _0x24386c,_0x5242f8;const {parentId:_0x35d12a,unitId:_0x1d48b9,text:_0xca704a,threadId:_0x2e3df3}=_0x30d2d9,_0xee59ee=(_0x5242f8=(_0x24386c=_0xca704a[_0x3c639d(0x128)])==null?void 0x0:_0x24386c[_0x3c639d(0x13e)](_0x416bbe=>_0x416bbe['rangeType']===_0x3b2c84['CustomRangeType'][_0x3c639d(0x13c)])[_0x3c639d(0x191)](_0x38042d=>_0x38042d[_0x3c639d(0x126)]))!=null?_0x5242f8:[],_0x471970=JSON[_0x3c639d(0x165)](_0xca704a),_0x3cc2c7=(await this[_0x3c639d(0x129)]['requireSession'](_0x1d48b9))[_0x3c639d(0x132)]();if(_0x35d12a){const _0x13dd98={'memberId':_0x3cc2c7,'unitId':_0x1d48b9,'content':_0x471970,'mention':_0xee59ee,'threadId':_0x2e3df3},_0x307542=(await this[_0x3c639d(0x12c)][_0x3c639d(0x177)](_0x3c639d(0x16a)+_0x1d48b9+_0x3c639d(0x174),{'body':_0x13dd98}))['body'][_0x3c639d(0x14d)];return{..._0x30d2d9,'id':_0x307542[_0x3c639d(0x155)],'dT':_0x3b2c84['dayjs'](+_0x307542[_0x3c639d(0x15a)])[_0x3c639d(0x162)](_0x3c639d(0x18a)),'personId':_0x307542[_0x3c639d(0x131)]};}else{const _0x19583d={'memberId':_0x3cc2c7,'unitId':_0x1d48b9,'content':_0x471970,'mention':_0xee59ee},_0x52b977=await this[_0x3c639d(0x12c)][_0x3c639d(0x177)]('/universer-api/comment/unit/'+_0x1d48b9+_0x3c639d(0x17e),{'body':_0x19583d});return _0x3dd44b(_0x52b977[_0x3c639d(0x125)][_0x3c639d(0x156)],_0x30d2d9);}}async[_0x368673(0x149)](_0x5f1917){const _0x2a61f5=_0x368673;var _0x254e2a,_0x26bf21;const {text:_0x7d7a4f,unitId:_0x3efb73}=_0x5f1917,_0x28d157=(_0x26bf21=(_0x254e2a=_0x7d7a4f['customRanges'])==null?void 0x0:_0x254e2a[_0x2a61f5(0x13e)](_0x21ba12=>_0x21ba12[_0x2a61f5(0x164)]===_0x3b2c84['CustomRangeType'][_0x2a61f5(0x13c)])[_0x2a61f5(0x191)](_0x79e5b9=>_0x79e5b9[_0x2a61f5(0x126)]))!=null?_0x26bf21:[],_0x359b3d=JSON[_0x2a61f5(0x165)](_0x7d7a4f),_0x1b6f08=_0x5f1917[_0x2a61f5(0x114)],_0x1617f2=_0x5f1917['id'],_0x198110={'memberId':(await this[_0x2a61f5(0x129)][_0x2a61f5(0x196)](_0x3efb73))[_0x2a61f5(0x132)](),'unitId':_0x3efb73,'threadId':_0x1b6f08,'mention':_0x28d157,'content':_0x359b3d,'replyId':_0x1617f2},_0x7a6cc3=await this['_httpService'][_0x2a61f5(0x177)](_0x2a61f5(0x16a)+_0x3efb73+_0x2a61f5(0x157),{'body':_0x198110});return!_0x7a6cc3['body'][_0x2a61f5(0x121)]||_0x7a6cc3['body'][_0x2a61f5(0x121)][_0x2a61f5(0x133)]===0x1;}async[_0x368673(0x11c)](_0x4e7b7b){const _0x4cee4a=_0x368673,{unitId:_0x1d3ea5}=_0x4e7b7b,_0x13b150=_0x4e7b7b['threadId'],_0x16418d={'memberId':this['_userService'][_0x4cee4a(0x11e)]()[_0x4cee4a(0x12b)],'unitId':_0x1d3ea5,'threadId':_0x13b150,'solved':_0x4e7b7b[_0x4cee4a(0x137)]?_0xf2a2bd['Solved']:_0xf2a2bd[_0x4cee4a(0x183)]},_0x11be10=await this[_0x4cee4a(0x12c)][_0x4cee4a(0x177)]('/universer-api/comment/unit/'+_0x1d3ea5+_0x4cee4a(0x170),{'body':_0x16418d});return!_0x11be10[_0x4cee4a(0x125)]['error']||_0x11be10[_0x4cee4a(0x125)][_0x4cee4a(0x121)][_0x4cee4a(0x133)]===0x1;}async[_0x368673(0x151)](_0x17dff8,_0x288389,_0xe24ce1,_0x525bb0){const _0x43db66=_0x368673,_0xd4a246={'memberId':(await this[_0x43db66(0x129)]['requireSession'](_0x17dff8))[_0x43db66(0x132)](),'threadId':_0xe24ce1,'replyId':_0x525bb0,'unitId':_0x17dff8},_0x1e6898=await this[_0x43db66(0x12c)][_0x43db66(0x177)](_0x43db66(0x16a)+_0x17dff8+_0x43db66(0x14a),{'body':_0xd4a246});return!_0x1e6898[_0x43db66(0x125)]['error']||_0x1e6898[_0x43db66(0x125)][_0x43db66(0x121)][_0x43db66(0x133)]===0x1;}async[_0x368673(0x16d)](_0x40be38,_0x3cd6d7,_0x4a2ac3){const _0x584136=_0x368673,_0x22e86e={'unitId':_0x40be38,'threadId':_0x4a2ac3},_0xd5dccb=await this[_0x584136(0x12c)][_0x584136(0x177)]('/universer-api/comment/unit/'+_0x40be38+_0x584136(0x16e),{'body':_0x22e86e}),_0x423773=_0x4a2ac3[_0x584136(0x191)](_0x1e9171=>_0x1ea0b9(_0xd5dccb['body'][_0x584136(0x195)][_0x1e9171],_0x40be38,_0x3cd6d7))[_0x584136(0x13e)](Boolean);return Object['values'](_0xd5dccb[_0x584136(0x125)][_0x584136(0x136)])[_0x584136(0x116)](_0x43d556=>{const _0x1c738e=_0x584136;this[_0x1c738e(0x115)][_0x1c738e(0x143)](_0x43d556);}),_0x423773;}['saveCommentToSnapshot'](_0x3cb05d){const _0x44c6f9=_0x368673;return{'id':_0x3cb05d['id'],'threadId':_0x3cb05d[_0x44c6f9(0x114)],'ref':_0x3cb05d['ref']};}};_0x46d64f=_0x193a00([_0x3af144(0x0,_0x3b2c84['Inject'](_0x1ae3fe[_0x368673(0x17d)])),_0x3af144(0x1,_0x3b2c84[_0x368673(0x185)](_0x3b2c84[_0x368673(0x123)])),_0x3af144(0x2,_0x3b2c84[_0x368673(0x185)](_0x1873ef['CollaborationSessionService'])),_0x3af144(0x3,_0x3b2c84[_0x368673(0x185)](_0x3b2c84[_0x368673(0x140)]))],_0x46d64f);var _0x1606f3=Object[_0x368673(0x184)],_0x26d1c2=(_0x34a763,_0x25b76c,_0x2f9f9f,_0x56ee3c)=>{for(var _0x355188=_0x56ee3c>0x1?void 0x0:_0x56ee3c?_0x1606f3(_0x25b76c,_0x2f9f9f):_0x25b76c,_0x4909e6=_0x34a763['length']-0x1,_0x351f94;_0x4909e6>=0x0;_0x4909e6--)(_0x351f94=_0x34a763[_0x4909e6])&&(_0x355188=_0x351f94(_0x355188)||_0x355188);return _0x355188;},_0x7bc66e=(_0xdd1840,_0x4f90f2)=>(_0x1acd9b,_0x18c45c)=>_0x4f90f2(_0x1acd9b,_0x18c45c,_0xdd1840);let _0x3016cd=class extends _0x3b2c84['Disposable']{constructor(_0x4b3fb6,_0x4b6bfd){const _0x41eb26=_0x368673;super(),this['_threadCommentDataSourceService']=_0x4b3fb6,this[_0x41eb26(0x15e)]=_0x4b6bfd,this[_0x41eb26(0x135)]();}[_0x368673(0x135)](){const _0xa72b89=_0x368673;this[_0xa72b89(0x16b)][_0xa72b89(0x10e)]=this['_threadCommentDataSource'],this[_0xa72b89(0x16b)][_0xa72b89(0x144)]=!0x1;}};_0x3016cd=_0x26d1c2([_0x7bc66e(0x0,_0x53df5c[_0x368673(0x18b)]),_0x7bc66e(0x1,_0x3b2c84[_0x368673(0x185)](_0x46d64f))],_0x3016cd);var _0x306ac7=Object['defineProperty'],_0x4f73d6=Object[_0x368673(0x184)],_0x56c5f0=(_0x52aa70,_0x333987,_0x2be60c)=>_0x333987 in _0x52aa70?_0x306ac7(_0x52aa70,_0x333987,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2be60c}):_0x52aa70[_0x333987]=_0x2be60c,_0x98813c=(_0x27809e,_0x2495de,_0x1b4711,_0x38d9f5)=>{const _0xaa72f7=_0x368673;for(var _0x46d254=_0x38d9f5>0x1?void 0x0:_0x38d9f5?_0x4f73d6(_0x2495de,_0x1b4711):_0x2495de,_0x198417=_0x27809e[_0xaa72f7(0x169)]-0x1,_0x44ecef;_0x198417>=0x0;_0x198417--)(_0x44ecef=_0x27809e[_0x198417])&&(_0x46d254=_0x44ecef(_0x46d254)||_0x46d254);return _0x46d254;},_0x56cd4d=(_0x29aaa0,_0x48c6f3)=>(_0xa195af,_0x4df427)=>_0x48c6f3(_0xa195af,_0x4df427,_0x29aaa0),_0x4d1af6=(_0x2bfc80,_0x1ab7fa,_0x58ac70)=>_0x56c5f0(_0x2bfc80,typeof _0x1ab7fa!=_0x368673(0x168)?_0x1ab7fa+'':_0x1ab7fa,_0x58ac70);_0x56f02d[_0x368673(0x127)]=class extends _0x3b2c84[_0x368673(0x158)]{constructor(_0x3d5a09=_0x193a60,_0x4e532a,_0x2a2b0b){const _0x544cec=_0x368673;super(),this[_0x544cec(0x119)]=_0x3d5a09,this[_0x544cec(0x15f)]=_0x4e532a,this['_configService']=_0x2a2b0b;const {..._0xf10b90}=_0x3b2c84[_0x544cec(0x11d)]({},_0x193a60,this[_0x544cec(0x119)]);this[_0x544cec(0x120)][_0x544cec(0x14e)](_0x10b7de,_0xf10b90);}[_0x368673(0x15b)](){[[_0x46d64f],[_0x3016cd],[_0xc0a2db]]['forEach'](_0x15b9cb=>{const _0x54b533=_0xb4ca;this[_0x54b533(0x15f)][_0x54b533(0x17f)](_0x15b9cb);});}[_0x368673(0x14c)](){const _0xec41ce=_0x368673;this[_0xec41ce(0x15f)][_0xec41ce(0x13f)](_0x3016cd),this['_injector']['get'](_0xc0a2db);}},_0x4d1af6(_0x56f02d[_0x368673(0x127)],'pluginName',_0x553b42),_0x4d1af6(_0x56f02d[_0x368673(0x127)],_0x368673(0x192),_0x3b2c84['UniverInstanceType']['UNIVER_UNKNOWN']),_0x56f02d[_0x368673(0x127)]=_0x98813c([_0x3b2c84[_0x368673(0x12a)](_0x2a5c4f['UniverThreadCommentUIPlugin'],_0x1873ef[_0x368673(0x18f)],_0x43a539[_0x368673(0x17c)]),_0x56cd4d(0x1,_0x3b2c84[_0x368673(0x185)](_0x3b2c84[_0x368673(0x140)])),_0x56cd4d(0x2,_0x3b2c84[_0x368673(0x130)])],_0x56f02d[_0x368673(0x127)]),Object['defineProperty'](_0x56f02d,Symbol[_0x368673(0x134)],{'value':'Module'});}));function _0x168a(){const _0x5112b5=['_initUserSync','OpenOrReOpen','getOwnPropertyDescriptor','Inject','251156ulfJDd','130eIBNuO','content','exports','YYYY/MM/DD\x20HH:mm','IThreadCommentDataSourceService','3734334jVgckT','8ljCFSw','3rwylBu','UniverCollaborationClientPlugin','/universer-api/user/list','map','type','user','bufferTime','comments','requireSession','dataSource','Add','solved','_threadCommentModel','3993156jQYtez','Delete','threadId','_userService','forEach','31036848hSNmjr','802395OVFusu','_config','5Eoidkj','UNRECOGNIZED','resolveComment','merge','getCurrentUser','UniverProLicense','_configService','error','parse','UserManagerService','_commentService','body','rangeId','UniverThreadCommentDataSourcePlugin','customRanges','_sessionService','DependentOn','userID','_httpService','@univerjs-pro/license','@univerjs/core','function','IConfigService','userId','getMemberID','code','toStringTag','_initDataSource','users','resolved','commentUpdate$','Reply','@univerjs/network','_init','COMMENT','Unknown','filter','get','Injector','unitId','getUnit','addUser','syncUpdateMutationToColla','parentId','personId','UniverProCollaborationClient','CommentService','updateComment','/delete','thread-comment-data-source.config','onReady','reply','setConfig','Edit','889530wLXrFx','deleteComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','@univerjs/thread-comment-ui','disposeWithMe','replyId','comment','/edit','Plugin','addComment','createTimestamp','onStarting','UniverThreadCommentUi','replies','_threadCommentDataSource','_injector','amd','delete','format','dayjs','rangeType','stringify','slice','ThreadCommentModel','symbol','length','/universer-api/comment/unit/','_threadCommentDataSourceService','@univerjs-pro/collaboration-client','listComments','/list','root','/solved','size','Disposable','Solved','/reply','@univerjs/thread-comment','rxjs','post','getUser','Solve','7931421EvFydO','7bNQAFg','UniverLicensePlugin','HTTPService','/add','add','UniverThreadComment','subscribe'];_0x168a=function(){return _0x5112b5;};return _0x168a();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.8.2-nightly.202506231607",
3
+ "version": "0.8.2-nightly.202506251607",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.8.2-nightly.202506231607",
49
- "@univerjs/core": "0.8.2-nightly.202506231607",
50
- "@univerjs-pro/license": "0.8.2-nightly.202506231607",
48
+ "@univerjs-pro/license": "0.8.2-nightly.202506251607",
49
+ "@univerjs/core": "0.8.2-nightly.202506251607",
50
+ "@univerjs/network": "0.8.2-nightly.202506251607",
51
51
  "@univerjs/protocol": "0.1.47-alpha.0",
52
- "@univerjs/thread-comment": "0.8.2-nightly.202506231607",
53
- "@univerjs/network": "0.8.2-nightly.202506231607",
54
- "@univerjs/thread-comment-ui": "0.8.2-nightly.202506231607"
52
+ "@univerjs-pro/collaboration-client": "0.8.2-nightly.202506251607",
53
+ "@univerjs/thread-comment": "0.8.2-nightly.202506251607",
54
+ "@univerjs/thread-comment-ui": "0.8.2-nightly.202506251607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",