@univerjs-pro/thread-comment-datasource 0.7.0-beta.0 → 0.7.0-nightly.202504301607

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 _0x41db1f=_0x4cea;function _0x57df(){const _0x8e83fa=['_sessionService','format','@univerjs/core','unitId','OpenOrReOpen','customRanges','Inject','content','updateComment','UniverInstanceType','post','ThreadCommentModel','delete','error','_initUserSync','819oeDrhX','getOwnPropertyDescriptor','YYYY/MM/DD\x20HH:mm','UNIVER_UNKNOWN','_initDataSource','commentUpdate$','symbol','dayjs','Unknown','/add','Reply','filter','_threadCommentModel','parse','type','HTTPService','code','saveCommentToSnapshot','CollaborationSessionService','@univerjs/thread-comment','Solve','Delete','setConfig','518490hYPgSk','addComment','replyId','CustomRangeType','UniverThreadCommentDataSourcePlugin','onStarting','addUser','_userService','UniverCollaborationClientPlugin','8648ldDBAe','root','userId','thread-comment-data-source.config','requireSession','stringify','comments','rangeType','onReady','Solved','size','payload','getUnit','UserManagerService','_threadCommentDataSourceService','/universer-api/user/list','4137576jLnary','bufferTime','Add','Disposable','_injector','DependentOn','/edit','4609026sxOexh','ref','forEach','toStringTag','762772ZeIqNI','getUser','length','defineProperty','_threadCommentDataSource','map','body','_config','Injector','deleteComment','UNRECOGNIZED','rangeId','/universer-api/comment/unit/','replies','COMMENT','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_configService','_init','@univerjs-pro/license','@univerjs/network','rxjs','_commentService','threadId','createTimestamp','find','1040000YUNkZO','_httpService','subscribe','get','user','pipe','add','users','@univerjs/thread-comment-ui','165372SSbqYn','merge','personId','Module','solved','Plugin','userID','Edit','180zPGQhc','getMemberID','getCurrentUser','IConfigService','listComments','resolveComment'];_0x57df=function(){return _0x8e83fa;};return _0x57df();}(function(_0x44152f,_0x47096e){const _0x12005b=_0x4cea,_0x5abe77=_0x44152f();while(!![]){try{const _0x2be710=-parseInt(_0x12005b(0xad))/0x1+parseInt(_0x12005b(0x10e))/0x2+-parseInt(_0x12005b(0xea))/0x3+parseInt(_0x12005b(0x103))/0x4+parseInt(_0x12005b(0xbe))/0x5*(parseInt(_0x12005b(0xb6))/0x6)+-parseInt(_0x12005b(0xd3))/0x7*(parseInt(_0x12005b(0xf3))/0x8)+-parseInt(_0x12005b(0x10a))/0x9;if(_0x2be710===_0x47096e)break;else _0x5abe77['push'](_0x5abe77['shift']());}catch(_0x42e42e){_0x5abe77['push'](_0x5abe77['shift']());}}}(_0x57df,0x87e2f));Object[_0x41db1f(0x97)](exports,Symbol[_0x41db1f(0x10d)],{'value':_0x41db1f(0xb9)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x41db1f(0xa6)),c=require(_0x41db1f(0xc6)),j=require(_0x41db1f(0xb5)),M=require(_0x41db1f(0xe6)),w=require(_0x41db1f(0xa8)),P=require(_0x41db1f(0xa7)),U=_0x41db1f(0xa3);var I=(_0x47ea19=>(_0x47ea19[_0x47ea19[_0x41db1f(0xc8)]=0x0]=_0x41db1f(0xc8),_0x47ea19[_0x47ea19[_0x41db1f(0xfc)]=0x1]=_0x41db1f(0xfc),_0x47ea19[_0x47ea19[_0x41db1f(0x9e)]=-0x1]=_0x41db1f(0x9e),_0x47ea19))(I||{}),v=(_0x37989e=>(_0x37989e[_0x37989e[_0x41db1f(0xdb)]=0x0]=_0x41db1f(0xdb),_0x37989e[_0x37989e[_0x41db1f(0x105)]=0x1]=_0x41db1f(0x105),_0x37989e[_0x37989e[_0x41db1f(0xdd)]=0x2]='Reply',_0x37989e[_0x37989e['Edit']=0x3]=_0x41db1f(0xbd),_0x37989e[_0x37989e[_0x41db1f(0xe8)]=0x4]='Delete',_0x37989e[_0x37989e[_0x41db1f(0xe7)]=0x5]=_0x41db1f(0xe7),_0x37989e[_0x37989e[_0x41db1f(0x9e)]=-0x1]='UNRECOGNIZED',_0x37989e))(v||{});function _0x4cea(_0xe28412,_0x23a8a9){const _0x57df90=_0x57df();return _0x4cea=function(_0x4cea6b,_0x273331){_0x4cea6b=_0x4cea6b-0x97;let _0x2e8e30=_0x57df90[_0x4cea6b];return _0x2e8e30;},_0x4cea(_0xe28412,_0x23a8a9);}const f=_0x480da2=>c[_0x41db1f(0xda)](new Date(+_0x480da2))[_0x41db1f(0xc5)](_0x41db1f(0xd5)),R=async(_0x49cf2a,_0x29c760)=>{const _0x29c7dc=_0x41db1f,_0x1c3f0d=_0x49cf2a[_0x29c7dc(0xb0)](c[_0x29c7dc(0x100)]),_0x4e2ed1=_0x49cf2a[_0x29c7dc(0xb0)](P['HTTPService']);_0x29c760[_0x29c7dc(0x10c)](_0x54bb38=>{const _0x1ba777=_0x29c7dc;_0x1c3f0d[_0x1ba777(0x10f)](_0x54bb38)&&_0x29c760[_0x1ba777(0xd0)](_0x54bb38);}),_0x29c760[_0x29c7dc(0xfd)]&&(await _0x4e2ed1[_0x29c7dc(0xb0)](_0x29c7dc(0x102),{'params':{'userIDs':[..._0x29c760]}}))[_0x29c7dc(0x9a)][_0x29c7dc(0xb4)][_0x29c7dc(0x10c)](_0x5a7699=>{const _0xeb7433=_0x29c7dc;_0x5a7699&&_0x1c3f0d[_0xeb7433(0xf0)](_0x5a7699);});};var $=Object[_0x41db1f(0xd4)],E=(_0x35494b,_0x118fce,_0x44b33c,_0x226c64)=>{const _0x223faa=_0x41db1f;for(var _0x330f80=_0x226c64>0x1?void 0x0:_0x226c64?$(_0x118fce,_0x44b33c):_0x118fce,_0x35f43b=_0x35494b[_0x223faa(0x110)]-0x1,_0x26521f;_0x35f43b>=0x0;_0x35f43b--)(_0x26521f=_0x35494b[_0x35f43b])&&(_0x330f80=_0x26521f(_0x330f80)||_0x330f80);return _0x330f80;},S=(_0x5635f2,_0x5a704d)=>(_0x4877c5,_0x2bca34)=>_0x5a704d(_0x4877c5,_0x2bca34,_0x5635f2);let p=class extends c[_0x41db1f(0x106)]{constructor(_0x55283a,_0x27475d,_0x1940ae,_0x595849){const _0x3d0519=_0x41db1f;super(),this[_0x3d0519(0xa9)]=_0x55283a,this[_0x3d0519(0xdf)]=_0x27475d,this[_0x3d0519(0xf1)]=_0x1940ae,this[_0x3d0519(0x107)]=_0x595849,this[_0x3d0519(0xa5)](),this[_0x3d0519(0xd2)]();}['_initUserSync'](){const _0x15d9bc=_0x41db1f;this['disposeWithMe'](this[_0x15d9bc(0xdf)][_0x15d9bc(0xd8)][_0x15d9bc(0xb2)](w[_0x15d9bc(0x104)](0x10))[_0x15d9bc(0xaf)](_0x3289b6=>{const _0x43003f=_0x15d9bc,_0x508298=new Set();_0x3289b6[_0x43003f(0x10c)](_0xc44d1b=>{const _0xa70f97=_0x43003f;switch(_0xc44d1b['type']){case _0xa70f97(0xb3):{const _0x2ff598=_0xc44d1b[_0xa70f97(0xfe)][_0xa70f97(0xb8)];_0x508298[_0xa70f97(0xb3)](_0x2ff598);break;}}}),R(this[_0x43003f(0x107)],_0x508298);}));}[_0x41db1f(0xa5)](){const _0x4e5626=_0x41db1f;this['disposeWithMe'](this[_0x4e5626(0xa9)][_0x4e5626(0xd8)][_0x4e5626(0xaf)](async _0x1c5de5=>{const _0x3cd13a=_0x4e5626;var _0x5c4da3,_0x5ccea3,_0x2e3e5c,_0x589b21;const _0xdb26fd=(_0x5c4da3=this[_0x3cd13a(0xdf)][_0x3cd13a(0xff)](_0x1c5de5[_0x3cd13a(0xc7)])[_0x3cd13a(0xac)](_0x4bba39=>_0x4bba39[_0x3cd13a(0xaa)]===_0x1c5de5[_0x3cd13a(0xaa)]))==null?void 0x0:_0x5c4da3['root'];if(!_0xdb26fd)return;const {unitId:_0x3f36b0,subUnitId:_0x5dcb26}=_0xdb26fd;switch(_0x1c5de5[_0x3cd13a(0xb1)]&&this[_0x3cd13a(0xf1)][_0x3cd13a(0xf0)](_0x1c5de5[_0x3cd13a(0xb1)]),_0x1c5de5[_0x3cd13a(0xe1)]){case v[_0x3cd13a(0x105)]:break;case v['Reply']:{this[_0x3cd13a(0xdf)][_0x3cd13a(0xeb)](_0x3f36b0,_0x5dcb26,{'unitId':_0x3f36b0,'subUnitId':_0x5dcb26,'ref':'','id':_0x1c5de5['replyId'],'dT':f(+_0x1c5de5[_0x3cd13a(0xab)]),'threadId':_0x1c5de5[_0x3cd13a(0xaa)],'personId':(_0x2e3e5c=(_0x5ccea3=_0x1c5de5['user'])==null?void 0x0:_0x5ccea3[_0x3cd13a(0xbc)])!=null?_0x2e3e5c:_0x1c5de5[_0x3cd13a(0xf5)],'text':JSON[_0x3cd13a(0xe0)](_0x1c5de5['content']),'parentId':_0xdb26fd['id']});break;}case v['Delete']:{const _0x19afbb=this['_threadCommentModel']['getComment'](_0x3f36b0,_0x5dcb26,_0x1c5de5[_0x3cd13a(0xec)]);_0x19afbb&&_0x19afbb['parentId']&&this[_0x3cd13a(0xdf)][_0x3cd13a(0x9d)](_0x3f36b0,_0x5dcb26,_0x1c5de5['replyId']);break;}case v['Edit']:{this['_threadCommentModel'][_0x3cd13a(0xcc)](_0x3f36b0,_0x5dcb26,{'commentId':_0x1c5de5['replyId'],'text':JSON[_0x3cd13a(0xe0)](_0x1c5de5['content'])});break;}case v[_0x3cd13a(0xe7)]:{const _0x3e8991=(_0x589b21=this['_threadCommentModel'][_0x3cd13a(0xff)](_0x1c5de5[_0x3cd13a(0xc7)])[_0x3cd13a(0xac)](_0x43afe0=>_0x43afe0[_0x3cd13a(0xaa)]===_0x1c5de5['threadId']))==null?void 0x0:_0x589b21[_0x3cd13a(0xf4)];_0x3e8991&&this[_0x3cd13a(0xdf)][_0x3cd13a(0xc3)](_0x3f36b0,_0x5dcb26,_0x3e8991['id'],_0x1c5de5[_0x3cd13a(0xba)]===I[_0x3cd13a(0xfc)]);break;}}}));}};p=E([S(0x0,c[_0x41db1f(0xca)](b['CommentService'])),S(0x1,c['Inject'](M[_0x41db1f(0xcf)])),S(0x2,c[_0x41db1f(0xca)](c['UserManagerService'])),S(0x3,c[_0x41db1f(0xca)](c[_0x41db1f(0x9c)]))],p);const q=_0x41db1f(0xf6),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0xd4af63,_0x592955,_0x311e34,_0x322f68)=>{const _0x4fb828=_0x41db1f;for(var _0x37ee9a=_0x322f68>0x1?void 0x0:_0x322f68?A(_0x592955,_0x311e34):_0x592955,_0x595540=_0xd4af63[_0x4fb828(0x110)]-0x1,_0x202252;_0x595540>=0x0;_0x595540--)(_0x202252=_0xd4af63[_0x595540])&&(_0x37ee9a=_0x202252(_0x37ee9a)||_0x37ee9a);return _0x37ee9a;},_=(_0x390c3b,_0x19d26d)=>(_0x1d8794,_0x4484ce)=>_0x19d26d(_0x1d8794,_0x4484ce,_0x390c3b);function Y(_0x4d28e3,_0x283d73){const _0x105374=_0x41db1f,_0x428eeb=_0x4d28e3[_0x105374(0xa1)][0x0];return{..._0x283d73,'id':_0x428eeb['replyId'],'resolved':_0x4d28e3[_0x105374(0xba)]===0x1,'dT':f(_0x428eeb[_0x105374(0xab)]),'personId':_0x428eeb[_0x105374(0xf5)],'threadId':_0x428eeb[_0x105374(0xaa)]};}function G(_0x1a640a,_0x4da8aa,_0x132402){const _0x3932e3=_0x41db1f;var _0x3c0dc7,_0x16734b;if(((_0x16734b=(_0x3c0dc7=_0x1a640a==null?void 0x0:_0x1a640a[_0x3932e3(0xa1)])==null?void 0x0:_0x3c0dc7[_0x3932e3(0x110)])!=null?_0x16734b:0x0)>0x0){const _0x45cf90=(_0x58ab2d,_0x176fd0)=>({'id':_0x58ab2d[_0x3932e3(0xec)],'threadId':_0x58ab2d[_0x3932e3(0xaa)],'dT':f(_0x58ab2d['createTimestamp']),'personId':_0x58ab2d[_0x3932e3(0xf5)],'resolved':_0x1a640a[_0x3932e3(0xba)]===I['Solved'],'unitId':_0x4da8aa,'subUnitId':_0x132402,'text':JSON[_0x3932e3(0xe0)](_0x58ab2d[_0x3932e3(0xcb)]),'parentId':_0x176fd0}),_0xdaedb6=_0x45cf90(_0x1a640a[_0x3932e3(0xa1)][0x0]);return{..._0xdaedb6,'children':_0x1a640a[_0x3932e3(0xa1)]['slice'](0x1)[_0x3932e3(0x99)](_0x5b3425=>_0x45cf90(_0x5b3425,_0xdaedb6['id']))};}return null;}let g=class{constructor(_0x2478e6,_0x31db45,_0x52f017,_0x1dec99){const _0x349373=_0x41db1f;this[_0x349373(0xae)]=_0x2478e6,this[_0x349373(0xf1)]=_0x31db45,this[_0x349373(0xc4)]=_0x52f017,this['_injector']=_0x1dec99;}async[_0x41db1f(0xeb)](_0x5aa5a6){const _0x4be2cf=_0x41db1f;var _0x5ab8c5,_0x336681;const {parentId:_0x264148,unitId:_0x5259b6,text:_0xec7f03,threadId:_0x27eca2}=_0x5aa5a6,_0x294c8d=(_0x336681=(_0x5ab8c5=_0xec7f03[_0x4be2cf(0xc9)])==null?void 0x0:_0x5ab8c5[_0x4be2cf(0xde)](_0x4c7d39=>_0x4c7d39[_0x4be2cf(0xfa)]===c[_0x4be2cf(0xed)][_0x4be2cf(0xa2)])[_0x4be2cf(0x99)](_0x67aae0=>_0x67aae0['rangeId']))!=null?_0x336681:[],_0xb16f61=JSON[_0x4be2cf(0xf8)](_0xec7f03),_0x1df3e2=(await this[_0x4be2cf(0xc4)]['requireSession'](_0x5259b6))[_0x4be2cf(0xbf)]();if(_0x264148){const _0x9c23a={'memberId':_0x1df3e2,'unitId':_0x5259b6,'content':_0xb16f61,'mention':_0x294c8d,'threadId':_0x27eca2},_0x572298=(await this[_0x4be2cf(0xae)][_0x4be2cf(0xce)](_0x4be2cf(0xa0)+_0x5259b6+'/reply',{'body':_0x9c23a}))[_0x4be2cf(0x9a)]['reply'];return{..._0x5aa5a6,'id':_0x572298[_0x4be2cf(0xec)],'dT':c['dayjs'](+_0x572298[_0x4be2cf(0xab)])[_0x4be2cf(0xc5)](_0x4be2cf(0xd5)),'personId':_0x572298[_0x4be2cf(0xf5)]};}else{const _0x751e90={'memberId':_0x1df3e2,'unitId':_0x5259b6,'content':_0xb16f61,'mention':_0x294c8d},_0x4991fd=await this[_0x4be2cf(0xae)][_0x4be2cf(0xce)](_0x4be2cf(0xa0)+_0x5259b6+_0x4be2cf(0xdc),{'body':_0x751e90});return Y(_0x4991fd[_0x4be2cf(0x9a)]['comment'],_0x5aa5a6);}}async['updateComment'](_0x1558a6){const _0x561a09=_0x41db1f;var _0x2d94c5,_0x1396bb;const {text:_0x4bb600,unitId:_0xe4290c}=_0x1558a6,_0x3a8bf1=(_0x1396bb=(_0x2d94c5=_0x4bb600[_0x561a09(0xc9)])==null?void 0x0:_0x2d94c5['filter'](_0x5c2cdd=>_0x5c2cdd['rangeType']===c[_0x561a09(0xed)]['COMMENT'])['map'](_0x5817ce=>_0x5817ce[_0x561a09(0x9f)]))!=null?_0x1396bb:[],_0x317c3c=JSON[_0x561a09(0xf8)](_0x4bb600),_0x21eb94=_0x1558a6[_0x561a09(0xaa)],_0x18cd57=_0x1558a6['id'],_0x25d1b2={'memberId':(await this[_0x561a09(0xc4)][_0x561a09(0xf7)](_0xe4290c))[_0x561a09(0xbf)](),'unitId':_0xe4290c,'threadId':_0x21eb94,'mention':_0x3a8bf1,'content':_0x317c3c,'replyId':_0x18cd57},_0x142904=await this[_0x561a09(0xae)]['post'](_0x561a09(0xa0)+_0xe4290c+_0x561a09(0x109),{'body':_0x25d1b2});return!_0x142904[_0x561a09(0x9a)][_0x561a09(0xd1)]||_0x142904[_0x561a09(0x9a)][_0x561a09(0xd1)][_0x561a09(0xe3)]===0x1;}async[_0x41db1f(0xc3)](_0x348062){const _0x365e83=_0x41db1f,{unitId:_0x4ac8c5}=_0x348062,_0x334c4e=_0x348062[_0x365e83(0xaa)],_0x2c1df4={'memberId':this[_0x365e83(0xf1)][_0x365e83(0xc0)]()[_0x365e83(0xbc)],'unitId':_0x4ac8c5,'threadId':_0x334c4e,'solved':_0x348062['resolved']?I[_0x365e83(0xfc)]:I[_0x365e83(0xc8)]},_0xefb99f=await this[_0x365e83(0xae)][_0x365e83(0xce)](_0x365e83(0xa0)+_0x4ac8c5+'/solved',{'body':_0x2c1df4});return!_0xefb99f['body'][_0x365e83(0xd1)]||_0xefb99f[_0x365e83(0x9a)][_0x365e83(0xd1)]['code']===0x1;}async[_0x41db1f(0x9d)](_0x2ccae5,_0x3af31f,_0x27b458,_0x264b90){const _0x32ba34=_0x41db1f,_0x5fe687={'memberId':(await this[_0x32ba34(0xc4)]['requireSession'](_0x2ccae5))[_0x32ba34(0xbf)](),'threadId':_0x27b458,'replyId':_0x264b90,'unitId':_0x2ccae5},_0x479cba=await this[_0x32ba34(0xae)]['post'](_0x32ba34(0xa0)+_0x2ccae5+'/delete',{'body':_0x5fe687});return!_0x479cba[_0x32ba34(0x9a)][_0x32ba34(0xd1)]||_0x479cba[_0x32ba34(0x9a)]['error']['code']===0x1;}async[_0x41db1f(0xc2)](_0x21ab54,_0x2dd98a,_0x5a0b6a){const _0x44e127=_0x41db1f,_0xa8fe86={'unitId':_0x21ab54,'threadId':_0x5a0b6a},_0x365e5d=await this['_httpService'][_0x44e127(0xce)]('/universer-api/comment/unit/'+_0x21ab54+'/list',{'body':_0xa8fe86}),_0x31210c=_0x5a0b6a[_0x44e127(0x99)](_0x2b0e38=>G(_0x365e5d[_0x44e127(0x9a)][_0x44e127(0xf9)][_0x2b0e38],_0x21ab54,_0x2dd98a))[_0x44e127(0xde)](Boolean);return Object['values'](_0x365e5d[_0x44e127(0x9a)]['users'])[_0x44e127(0x10c)](_0x2a8891=>{this['_userService']['addUser'](_0x2a8891);}),_0x31210c;}[_0x41db1f(0xe4)](_0x15fd9b){const _0x15b49a=_0x41db1f;return{'id':_0x15fd9b['id'],'threadId':_0x15fd9b[_0x15b49a(0xaa)],'ref':_0x15fd9b[_0x15b49a(0x10b)]};}};g=x([_(0x0,c[_0x41db1f(0xca)](P[_0x41db1f(0xe2)])),_(0x1,c[_0x41db1f(0xca)](c[_0x41db1f(0x100)])),_(0x2,c[_0x41db1f(0xca)](b[_0x41db1f(0xe5)])),_(0x3,c[_0x41db1f(0xca)](c[_0x41db1f(0x9c)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x23eb32,_0xee7f,_0x43826f,_0xb9ec34)=>{const _0x3e691a=_0x41db1f;for(var _0x458b07=_0xb9ec34>0x1?void 0x0:_0xb9ec34?H(_0xee7f,_0x43826f):_0xee7f,_0x2156bc=_0x23eb32[_0x3e691a(0x110)]-0x1,_0x54df22;_0x2156bc>=0x0;_0x2156bc--)(_0x54df22=_0x23eb32[_0x2156bc])&&(_0x458b07=_0x54df22(_0x458b07)||_0x458b07);return _0x458b07;},y=(_0x17916c,_0x7d7a4b)=>(_0x34178a,_0x3dc03b)=>_0x7d7a4b(_0x34178a,_0x3dc03b,_0x17916c);let C=class extends c[_0x41db1f(0x106)]{constructor(_0x22937c,_0x4370c4){const _0x403c8d=_0x41db1f;super(),this[_0x403c8d(0x101)]=_0x22937c,this[_0x403c8d(0x98)]=_0x4370c4,this['_initDataSource']();}[_0x41db1f(0xd7)](){const _0x316d33=_0x41db1f;this['_threadCommentDataSourceService']['dataSource']=this[_0x316d33(0x98)],this[_0x316d33(0x101)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](g))],C);var F=Object[_0x41db1f(0x97)],L=Object['getOwnPropertyDescriptor'],Z=(_0x1e766f,_0x37dbec,_0x4c022f)=>_0x37dbec in _0x1e766f?F(_0x1e766f,_0x37dbec,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4c022f}):_0x1e766f[_0x37dbec]=_0x4c022f,W=(_0x4a963a,_0x2bedd7,_0x22753d,_0x28eade)=>{for(var _0x4e42c3=_0x28eade>0x1?void 0x0:_0x28eade?L(_0x2bedd7,_0x22753d):_0x2bedd7,_0x591fb3=_0x4a963a['length']-0x1,_0x192d46;_0x591fb3>=0x0;_0x591fb3--)(_0x192d46=_0x4a963a[_0x591fb3])&&(_0x4e42c3=_0x192d46(_0x4e42c3)||_0x4e42c3);return _0x4e42c3;},O=(_0x508c24,_0x2dc29d)=>(_0x8579d1,_0x3183c2)=>_0x2dc29d(_0x8579d1,_0x3183c2,_0x508c24),N=(_0x464c65,_0x53bd76,_0x2a2fcb)=>Z(_0x464c65,typeof _0x53bd76!=_0x41db1f(0xd9)?_0x53bd76+'':_0x53bd76,_0x2a2fcb);exports[_0x41db1f(0xee)]=class extends c[_0x41db1f(0xbb)]{constructor(_0x314855=D,_0x2eb1bb,_0x5ee599){const _0x14f34c=_0x41db1f;super(),this[_0x14f34c(0x9b)]=_0x314855,this[_0x14f34c(0x107)]=_0x2eb1bb,this[_0x14f34c(0xa4)]=_0x5ee599;const {..._0x5d3a77}=c[_0x14f34c(0xb7)]({},D,this[_0x14f34c(0x9b)]);this['_configService'][_0x14f34c(0xe9)](q,_0x5d3a77);}[_0x41db1f(0xef)](){[[g],[C],[p]]['forEach'](_0x3d70b1=>{const _0x2e5dff=_0x4cea;this['_injector'][_0x2e5dff(0xb3)](_0x3d70b1);});}[_0x41db1f(0xfb)](){const _0x1a46ea=_0x41db1f;this[_0x1a46ea(0x107)][_0x1a46ea(0xb0)](C),this[_0x1a46ea(0x107)][_0x1a46ea(0xb0)](p);}},N(exports[_0x41db1f(0xee)],'pluginName',U),N(exports[_0x41db1f(0xee)],_0x41db1f(0xe1),c[_0x41db1f(0xcd)][_0x41db1f(0xd6)]),exports[_0x41db1f(0xee)]=W([c[_0x41db1f(0x108)](j['UniverThreadCommentUIPlugin'],b[_0x41db1f(0xf2)],T['UniverLicensePlugin']),O(0x1,c[_0x41db1f(0xca)](c[_0x41db1f(0x9c)])),O(0x2,c[_0x41db1f(0xc1)])],exports[_0x41db1f(0xee)]);
1
+ 'use strict';const _0x14cdcb=_0x8c22;(function(_0x45f6b5,_0x2d1f20){const _0xf35e4a=_0x8c22,_0x102d0d=_0x45f6b5();while(!![]){try{const _0x5baac1=-parseInt(_0xf35e4a(0xd7))/0x1+-parseInt(_0xf35e4a(0xf9))/0x2+-parseInt(_0xf35e4a(0xee))/0x3*(parseInt(_0xf35e4a(0xca))/0x4)+-parseInt(_0xf35e4a(0xc2))/0x5*(parseInt(_0xf35e4a(0x111))/0x6)+parseInt(_0xf35e4a(0xac))/0x7*(-parseInt(_0xf35e4a(0xb6))/0x8)+parseInt(_0xf35e4a(0xfa))/0x9+parseInt(_0xf35e4a(0x103))/0xa*(parseInt(_0xf35e4a(0xad))/0xb);if(_0x5baac1===_0x2d1f20)break;else _0x102d0d['push'](_0x102d0d['shift']());}catch(_0x2039c8){_0x102d0d['push'](_0x102d0d['shift']());}}}(_0x510f,0x19e32));Object['defineProperty'](exports,Symbol[_0x14cdcb(0xff)],{'value':'Module'});const b=require(_0x14cdcb(0x117)),T=require('@univerjs-pro/license'),c=require(_0x14cdcb(0xeb)),j=require('@univerjs/thread-comment-ui'),M=require(_0x14cdcb(0xec)),w=require(_0x14cdcb(0xd6)),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x18845a=>(_0x18845a[_0x18845a[_0x14cdcb(0xb4)]=0x0]='OpenOrReOpen',_0x18845a[_0x18845a['Solved']=0x1]=_0x14cdcb(0xf1),_0x18845a[_0x18845a['UNRECOGNIZED']=-0x1]=_0x14cdcb(0x11b),_0x18845a))(I||{}),v=(_0x2f5119=>(_0x2f5119[_0x2f5119[_0x14cdcb(0xba)]=0x0]=_0x14cdcb(0xba),_0x2f5119[_0x2f5119[_0x14cdcb(0xfd)]=0x1]='Add',_0x2f5119[_0x2f5119[_0x14cdcb(0xbe)]=0x2]=_0x14cdcb(0xbe),_0x2f5119[_0x2f5119[_0x14cdcb(0xe9)]=0x3]='Edit',_0x2f5119[_0x2f5119[_0x14cdcb(0xdd)]=0x4]=_0x14cdcb(0xdd),_0x2f5119[_0x2f5119[_0x14cdcb(0xe3)]=0x5]=_0x14cdcb(0xe3),_0x2f5119[_0x2f5119[_0x14cdcb(0x11b)]=-0x1]=_0x14cdcb(0x11b),_0x2f5119))(v||{});const f=_0x5c7893=>c[_0x14cdcb(0xe4)](new Date(+_0x5c7893))[_0x14cdcb(0x10f)](_0x14cdcb(0xc7)),R=async(_0x20b5a4,_0xa4b4e8)=>{const _0x477649=_0x14cdcb,_0x4c32b4=_0x20b5a4['get'](c[_0x477649(0x11e)]),_0x455f51=_0x20b5a4['get'](P[_0x477649(0xe2)]);_0xa4b4e8[_0x477649(0x10d)](_0x1a79c2=>{_0x4c32b4['getUser'](_0x1a79c2)&&_0xa4b4e8['delete'](_0x1a79c2);}),_0xa4b4e8[_0x477649(0xd5)]&&(await _0x455f51[_0x477649(0xd9)](_0x477649(0xc1),{'params':{'userIDs':[..._0xa4b4e8]}}))[_0x477649(0xbf)][_0x477649(0xda)][_0x477649(0x10d)](_0x2f5674=>{const _0xd5507=_0x477649;_0x2f5674&&_0x4c32b4[_0xd5507(0xde)](_0x2f5674);});};var $=Object[_0x14cdcb(0xcf)],E=(_0x535e8b,_0x142be2,_0x8b40ed,_0x96ff8a)=>{for(var _0x30cecc=_0x96ff8a>0x1?void 0x0:_0x96ff8a?$(_0x142be2,_0x8b40ed):_0x142be2,_0x5869aa=_0x535e8b['length']-0x1,_0x38b34f;_0x5869aa>=0x0;_0x5869aa--)(_0x38b34f=_0x535e8b[_0x5869aa])&&(_0x30cecc=_0x38b34f(_0x30cecc)||_0x30cecc);return _0x30cecc;},S=(_0x28035f,_0x302a0e)=>(_0x2a59e6,_0x1f0f18)=>_0x302a0e(_0x2a59e6,_0x1f0f18,_0x28035f);let p=class extends c[_0x14cdcb(0x10e)]{constructor(_0x4a581a,_0x5360bb,_0x592e6a,_0xa73410){const _0x178730=_0x14cdcb;super(),this[_0x178730(0xef)]=_0x4a581a,this[_0x178730(0xc4)]=_0x5360bb,this['_userService']=_0x592e6a,this[_0x178730(0xf8)]=_0xa73410,this['_init'](),this['_initUserSync']();}[_0x14cdcb(0xd8)](){const _0x5d962b=_0x14cdcb;this['disposeWithMe'](this['_threadCommentModel'][_0x5d962b(0x115)][_0x5d962b(0xc5)](w[_0x5d962b(0xd3)](0x10))[_0x5d962b(0xdf)](_0xd651e6=>{const _0x21b267=_0x5d962b,_0x3f527a=new Set();_0xd651e6[_0x21b267(0x10d)](_0x19331f=>{const _0x50df88=_0x21b267;switch(_0x19331f[_0x50df88(0xcb)]){case'add':{const _0x3a5064=_0x19331f[_0x50df88(0x11d)][_0x50df88(0xa9)];_0x3f527a['add'](_0x3a5064);break;}}}),R(this[_0x21b267(0xf8)],_0x3f527a);}));}[_0x14cdcb(0xdc)](){const _0x51d11e=_0x14cdcb;this[_0x51d11e(0x10c)](this[_0x51d11e(0xef)][_0x51d11e(0x115)][_0x51d11e(0xdf)](async _0x45bf84=>{const _0x2a57d9=_0x51d11e;var _0x2b9722,_0x5a5068,_0x91a644,_0xa60206;const _0x5c1114=(_0x2b9722=this[_0x2a57d9(0xc4)]['getUnit'](_0x45bf84[_0x2a57d9(0xc0)])[_0x2a57d9(0x113)](_0x47026c=>_0x47026c[_0x2a57d9(0xf6)]===_0x45bf84[_0x2a57d9(0xf6)]))==null?void 0x0:_0x2b9722[_0x2a57d9(0xc9)];if(!_0x5c1114)return;const {unitId:_0x564e50,subUnitId:_0x123978}=_0x5c1114;switch(_0x45bf84[_0x2a57d9(0xa8)]&&this[_0x2a57d9(0xbb)][_0x2a57d9(0xde)](_0x45bf84[_0x2a57d9(0xa8)]),_0x45bf84[_0x2a57d9(0xcb)]){case v[_0x2a57d9(0xfd)]:break;case v[_0x2a57d9(0xbe)]:{this[_0x2a57d9(0xc4)][_0x2a57d9(0xcd)](_0x564e50,_0x123978,{'unitId':_0x564e50,'subUnitId':_0x123978,'ref':'','id':_0x45bf84[_0x2a57d9(0x116)],'dT':f(+_0x45bf84['createTimestamp']),'threadId':_0x45bf84[_0x2a57d9(0xf6)],'personId':(_0x91a644=(_0x5a5068=_0x45bf84['user'])==null?void 0x0:_0x5a5068[_0x2a57d9(0x107)])!=null?_0x91a644:_0x45bf84[_0x2a57d9(0x10a)],'text':JSON[_0x2a57d9(0xce)](_0x45bf84['content']),'parentId':_0x5c1114['id']});break;}case v[_0x2a57d9(0xdd)]:{const _0x10afce=this[_0x2a57d9(0xc4)]['getComment'](_0x564e50,_0x123978,_0x45bf84[_0x2a57d9(0x116)]);_0x10afce&&_0x10afce[_0x2a57d9(0xdb)]&&this[_0x2a57d9(0xc4)][_0x2a57d9(0x104)](_0x564e50,_0x123978,_0x45bf84['replyId']);break;}case v[_0x2a57d9(0xe9)]:{this[_0x2a57d9(0xc4)][_0x2a57d9(0xb2)](_0x564e50,_0x123978,{'commentId':_0x45bf84['replyId'],'text':JSON[_0x2a57d9(0xce)](_0x45bf84[_0x2a57d9(0x101)])});break;}case v[_0x2a57d9(0xe3)]:{const _0x3b4e11=(_0xa60206=this['_threadCommentModel'][_0x2a57d9(0xcc)](_0x45bf84[_0x2a57d9(0xc0)])[_0x2a57d9(0x113)](_0x3c4901=>_0x3c4901[_0x2a57d9(0xf6)]===_0x45bf84[_0x2a57d9(0xf6)]))==null?void 0x0:_0xa60206[_0x2a57d9(0xc9)];_0x3b4e11&&this[_0x2a57d9(0xc4)]['resolveComment'](_0x564e50,_0x123978,_0x3b4e11['id'],_0x45bf84['solved']===I[_0x2a57d9(0xf1)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x14cdcb(0xfb)])),S(0x1,c[_0x14cdcb(0xb9)](M['ThreadCommentModel'])),S(0x2,c[_0x14cdcb(0xb9)](c[_0x14cdcb(0x11e)])),S(0x3,c[_0x14cdcb(0xb9)](c[_0x14cdcb(0xf0)]))],p);const q='thread-comment-data-source.config',D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x170480,_0x5ca9d9,_0x5eba88,_0x483f95)=>{const _0x3dc223=_0x14cdcb;for(var _0x118ec1=_0x483f95>0x1?void 0x0:_0x483f95?A(_0x5ca9d9,_0x5eba88):_0x5ca9d9,_0x120b93=_0x170480[_0x3dc223(0xb3)]-0x1,_0x4bfa74;_0x120b93>=0x0;_0x120b93--)(_0x4bfa74=_0x170480[_0x120b93])&&(_0x118ec1=_0x4bfa74(_0x118ec1)||_0x118ec1);return _0x118ec1;},_=(_0x427c28,_0x571b63)=>(_0x446ef1,_0x40eb0b)=>_0x571b63(_0x446ef1,_0x40eb0b,_0x427c28);function Y(_0x327e36,_0x52fa1d){const _0x2762a8=_0x14cdcb,_0x5e897d=_0x327e36['replies'][0x0];return{..._0x52fa1d,'id':_0x5e897d['replyId'],'resolved':_0x327e36[_0x2762a8(0x108)]===0x1,'dT':f(_0x5e897d[_0x2762a8(0xe6)]),'personId':_0x5e897d['userId'],'threadId':_0x5e897d[_0x2762a8(0xf6)]};}function _0x8c22(_0x528d0b,_0x12fd14){const _0x510f9b=_0x510f();return _0x8c22=function(_0x8c2229,_0x21de81){_0x8c2229=_0x8c2229-0xa8;let _0x3229a3=_0x510f9b[_0x8c2229];return _0x3229a3;},_0x8c22(_0x528d0b,_0x12fd14);}function G(_0x531460,_0x237a9d,_0xebf677){const _0x595974=_0x14cdcb;var _0x1f46d0,_0x4901d9;if(((_0x4901d9=(_0x1f46d0=_0x531460==null?void 0x0:_0x531460[_0x595974(0xbc)])==null?void 0x0:_0x1f46d0['length'])!=null?_0x4901d9:0x0)>0x0){const _0x6994c7=(_0x38b757,_0x2f1648)=>({'id':_0x38b757['replyId'],'threadId':_0x38b757['threadId'],'dT':f(_0x38b757['createTimestamp']),'personId':_0x38b757[_0x595974(0x10a)],'resolved':_0x531460[_0x595974(0x108)]===I[_0x595974(0xf1)],'unitId':_0x237a9d,'subUnitId':_0xebf677,'text':JSON['parse'](_0x38b757[_0x595974(0x101)]),'parentId':_0x2f1648}),_0xedb6e6=_0x6994c7(_0x531460[_0x595974(0xbc)][0x0]);return{..._0xedb6e6,'children':_0x531460[_0x595974(0xbc)][_0x595974(0xfc)](0x1)[_0x595974(0xd2)](_0x2a4d66=>_0x6994c7(_0x2a4d66,_0xedb6e6['id']))};}return null;}let g=class{constructor(_0x35f71b,_0x2e37a5,_0x52a014,_0x229ea6){const _0x5a59ac=_0x14cdcb;this[_0x5a59ac(0xc8)]=_0x35f71b,this[_0x5a59ac(0xbb)]=_0x2e37a5,this[_0x5a59ac(0x11a)]=_0x52a014,this['_injector']=_0x229ea6;}async[_0x14cdcb(0xcd)](_0x5d56a7){const _0x114e94=_0x14cdcb;var _0xc85c92,_0x2736a6;const {parentId:_0x183fbe,unitId:_0x18c0ed,text:_0x4fdae0,threadId:_0x52db00}=_0x5d56a7,_0x11821c=(_0x2736a6=(_0xc85c92=_0x4fdae0['customRanges'])==null?void 0x0:_0xc85c92[_0x114e94(0xb8)](_0x274b76=>_0x274b76[_0x114e94(0xaf)]===c[_0x114e94(0xfe)]['COMMENT'])['map'](_0x3668df=>_0x3668df[_0x114e94(0xf7)]))!=null?_0x2736a6:[],_0x4df066=JSON['stringify'](_0x4fdae0),_0x364339=(await this[_0x114e94(0x11a)][_0x114e94(0xd1)](_0x18c0ed))['getMemberID']();if(_0x183fbe){const _0x286d87={'memberId':_0x364339,'unitId':_0x18c0ed,'content':_0x4df066,'mention':_0x11821c,'threadId':_0x52db00},_0x2ff866=(await this[_0x114e94(0xc8)]['post'](_0x114e94(0xd4)+_0x18c0ed+'/reply',{'body':_0x286d87}))[_0x114e94(0xbf)][_0x114e94(0xc3)];return{..._0x5d56a7,'id':_0x2ff866[_0x114e94(0x116)],'dT':c[_0x114e94(0xe4)](+_0x2ff866[_0x114e94(0xe6)])['format'](_0x114e94(0xc7)),'personId':_0x2ff866[_0x114e94(0x10a)]};}else{const _0x582efb={'memberId':_0x364339,'unitId':_0x18c0ed,'content':_0x4df066,'mention':_0x11821c},_0x306947=await this[_0x114e94(0xc8)][_0x114e94(0x102)]('/universer-api/comment/unit/'+_0x18c0ed+_0x114e94(0xbd),{'body':_0x582efb});return Y(_0x306947[_0x114e94(0xbf)][_0x114e94(0x11c)],_0x5d56a7);}}async[_0x14cdcb(0xb2)](_0x57a3a2){const _0x6f2adb=_0x14cdcb;var _0x19ca32,_0x3bf60d;const {text:_0x2d4c5f,unitId:_0x474c9e}=_0x57a3a2,_0x5e47ef=(_0x3bf60d=(_0x19ca32=_0x2d4c5f['customRanges'])==null?void 0x0:_0x19ca32[_0x6f2adb(0xb8)](_0x1d1aca=>_0x1d1aca[_0x6f2adb(0xaf)]===c['CustomRangeType'][_0x6f2adb(0xb1)])[_0x6f2adb(0xd2)](_0x1395ad=>_0x1395ad[_0x6f2adb(0xf7)]))!=null?_0x3bf60d:[],_0x199b87=JSON[_0x6f2adb(0x109)](_0x2d4c5f),_0x3bd886=_0x57a3a2['threadId'],_0x4f2ba3=_0x57a3a2['id'],_0x3ad382={'memberId':(await this[_0x6f2adb(0x11a)][_0x6f2adb(0xd1)](_0x474c9e))[_0x6f2adb(0xae)](),'unitId':_0x474c9e,'threadId':_0x3bd886,'mention':_0x5e47ef,'content':_0x199b87,'replyId':_0x4f2ba3},_0x5388f4=await this[_0x6f2adb(0xc8)][_0x6f2adb(0x102)](_0x6f2adb(0xd4)+_0x474c9e+_0x6f2adb(0xaa),{'body':_0x3ad382});return!_0x5388f4[_0x6f2adb(0xbf)][_0x6f2adb(0xb5)]||_0x5388f4[_0x6f2adb(0xbf)][_0x6f2adb(0xb5)]['code']===0x1;}async['resolveComment'](_0x3f7bd1){const _0x4d6824=_0x14cdcb,{unitId:_0x362747}=_0x3f7bd1,_0x2add96=_0x3f7bd1[_0x4d6824(0xf6)],_0x3c15dd={'memberId':this[_0x4d6824(0xbb)]['getCurrentUser']()['userID'],'unitId':_0x362747,'threadId':_0x2add96,'solved':_0x3f7bd1['resolved']?I['Solved']:I['OpenOrReOpen']},_0x32f26b=await this[_0x4d6824(0xc8)][_0x4d6824(0x102)](_0x4d6824(0xd4)+_0x362747+_0x4d6824(0xf4),{'body':_0x3c15dd});return!_0x32f26b['body'][_0x4d6824(0xb5)]||_0x32f26b['body'][_0x4d6824(0xb5)][_0x4d6824(0xd0)]===0x1;}async[_0x14cdcb(0x104)](_0x5f1309,_0x3483bc,_0xf61951,_0x494840){const _0x4affd4=_0x14cdcb,_0x4932b6={'memberId':(await this[_0x4affd4(0x11a)]['requireSession'](_0x5f1309))[_0x4affd4(0xae)](),'threadId':_0xf61951,'replyId':_0x494840,'unitId':_0x5f1309},_0x486e56=await this[_0x4affd4(0xc8)]['post'](_0x4affd4(0xd4)+_0x5f1309+_0x4affd4(0x10b),{'body':_0x4932b6});return!_0x486e56[_0x4affd4(0xbf)][_0x4affd4(0xb5)]||_0x486e56[_0x4affd4(0xbf)][_0x4affd4(0xb5)][_0x4affd4(0xd0)]===0x1;}async[_0x14cdcb(0xe0)](_0x1a3966,_0x2f5a2d,_0x544975){const _0xce6de6=_0x14cdcb,_0x278c93={'unitId':_0x1a3966,'threadId':_0x544975},_0x181e59=await this[_0xce6de6(0xc8)][_0xce6de6(0x102)](_0xce6de6(0xd4)+_0x1a3966+_0xce6de6(0xe8),{'body':_0x278c93}),_0xfcb1fb=_0x544975[_0xce6de6(0xd2)](_0x2a8844=>G(_0x181e59[_0xce6de6(0xbf)]['comments'][_0x2a8844],_0x1a3966,_0x2f5a2d))[_0xce6de6(0xb8)](Boolean);return Object['values'](_0x181e59['body'][_0xce6de6(0xda)])[_0xce6de6(0x10d)](_0x5593dc=>{const _0x69786=_0xce6de6;this['_userService'][_0x69786(0xde)](_0x5593dc);}),_0xfcb1fb;}[_0x14cdcb(0xf5)](_0x3ec0d5){const _0x4ea19e=_0x14cdcb;return{'id':_0x3ec0d5['id'],'threadId':_0x3ec0d5[_0x4ea19e(0xf6)],'ref':_0x3ec0d5[_0x4ea19e(0xb0)]};}};g=x([_(0x0,c['Inject'](P[_0x14cdcb(0xe2)])),_(0x1,c[_0x14cdcb(0xb9)](c[_0x14cdcb(0x11e)])),_(0x2,c[_0x14cdcb(0xb9)](b['CollaborationSessionService'])),_(0x3,c[_0x14cdcb(0xb9)](c['Injector']))],g);var H=Object[_0x14cdcb(0xcf)],J=(_0x4985ad,_0x2c8012,_0x130e42,_0xe5155a)=>{const _0x327fa3=_0x14cdcb;for(var _0x1b7eec=_0xe5155a>0x1?void 0x0:_0xe5155a?H(_0x2c8012,_0x130e42):_0x2c8012,_0x3f05a7=_0x4985ad[_0x327fa3(0xb3)]-0x1,_0x4cdbf1;_0x3f05a7>=0x0;_0x3f05a7--)(_0x4cdbf1=_0x4985ad[_0x3f05a7])&&(_0x1b7eec=_0x4cdbf1(_0x1b7eec)||_0x1b7eec);return _0x1b7eec;},y=(_0x22cd19,_0x49b017)=>(_0x222e1c,_0x3ee817)=>_0x49b017(_0x222e1c,_0x3ee817,_0x22cd19);let C=class extends c[_0x14cdcb(0x10e)]{constructor(_0x58f8a3,_0x53e642){const _0x1d2827=_0x14cdcb;super(),this[_0x1d2827(0xe7)]=_0x58f8a3,this[_0x1d2827(0x114)]=_0x53e642,this[_0x1d2827(0xb7)]();}['_initDataSource'](){const _0x48c603=_0x14cdcb;this[_0x48c603(0xe7)][_0x48c603(0xab)]=this[_0x48c603(0x114)],this[_0x48c603(0xe7)]['syncUpdateMutationToColla']=!0x1;}};function _0x510f(){const _0x369f35=['dayjs','pluginName','createTimestamp','_threadCommentDataSourceService','/list','Edit','onStarting','@univerjs/core','@univerjs/thread-comment','UniverInstanceType','39uBrGNN','_commentService','Injector','Solved','UniverThreadCommentUIPlugin','_config','/solved','saveCommentToSnapshot','threadId','rangeId','_injector','304156xqEkVD','434610voaudC','CommentService','slice','Add','CustomRangeType','toStringTag','UniverLicensePlugin','content','post','250kUkFrL','deleteComment','IThreadCommentDataSourceService','UNIVER_UNKNOWN','userID','solved','stringify','userId','/delete','disposeWithMe','forEach','Disposable','format','DependentOn','114ZkhqKo','merge','find','_threadCommentDataSource','commentUpdate$','replyId','@univerjs-pro/collaboration-client','defineProperty','UniverThreadCommentDataSourcePlugin','_sessionService','UNRECOGNIZED','comment','payload','UserManagerService','user','personId','/edit','dataSource','511ODJfIt','342848uUdQhO','getMemberID','rangeType','ref','COMMENT','updateComment','length','OpenOrReOpen','error','21512kacxuJ','_initDataSource','filter','Inject','Unknown','_userService','replies','/add','Reply','body','unitId','/universer-api/user/list','45770ggkamk','reply','_threadCommentModel','pipe','onReady','YYYY/MM/DD\x20HH:mm','_httpService','root','13296BtoUpb','type','getUnit','addComment','parse','getOwnPropertyDescriptor','code','requireSession','map','bufferTime','/universer-api/comment/unit/','size','rxjs','155943fOMKyH','_initUserSync','get','users','parentId','_init','Delete','addUser','subscribe','listComments','Plugin','HTTPService','Solve'];_0x510f=function(){return _0x369f35;};return _0x510f();}C=J([y(0x0,M[_0x14cdcb(0x105)]),y(0x1,c[_0x14cdcb(0xb9)](g))],C);var F=Object[_0x14cdcb(0x118)],L=Object[_0x14cdcb(0xcf)],Z=(_0x3b0a1f,_0x1e64bc,_0x1a7775)=>_0x1e64bc in _0x3b0a1f?F(_0x3b0a1f,_0x1e64bc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1a7775}):_0x3b0a1f[_0x1e64bc]=_0x1a7775,W=(_0x1e3370,_0x2bfac4,_0x5dc9e0,_0x5728d9)=>{const _0x3421a3=_0x14cdcb;for(var _0x13c233=_0x5728d9>0x1?void 0x0:_0x5728d9?L(_0x2bfac4,_0x5dc9e0):_0x2bfac4,_0x258722=_0x1e3370[_0x3421a3(0xb3)]-0x1,_0x580c0c;_0x258722>=0x0;_0x258722--)(_0x580c0c=_0x1e3370[_0x258722])&&(_0x13c233=_0x580c0c(_0x13c233)||_0x13c233);return _0x13c233;},O=(_0x982f74,_0x1fde18)=>(_0x32d1e3,_0x308797)=>_0x1fde18(_0x32d1e3,_0x308797,_0x982f74),N=(_0x52c330,_0x373c20,_0x1cc10c)=>Z(_0x52c330,typeof _0x373c20!='symbol'?_0x373c20+'':_0x373c20,_0x1cc10c);exports[_0x14cdcb(0x119)]=class extends c[_0x14cdcb(0xe1)]{constructor(_0x16a55f=D,_0x249cb0,_0x28bbfc){const _0x568c45=_0x14cdcb;super(),this['_config']=_0x16a55f,this['_injector']=_0x249cb0,this['_configService']=_0x28bbfc;const {..._0x3cdfbb}=c[_0x568c45(0x112)]({},D,this[_0x568c45(0xf3)]);this['_configService']['setConfig'](q,_0x3cdfbb);}[_0x14cdcb(0xea)](){const _0x3af36d=_0x14cdcb;[[g],[C],[p]][_0x3af36d(0x10d)](_0x27f27a=>{const _0x17a634=_0x3af36d;this[_0x17a634(0xf8)]['add'](_0x27f27a);});}[_0x14cdcb(0xc6)](){const _0x45ccec=_0x14cdcb;this[_0x45ccec(0xf8)][_0x45ccec(0xd9)](C),this[_0x45ccec(0xf8)][_0x45ccec(0xd9)](p);}},N(exports[_0x14cdcb(0x119)],_0x14cdcb(0xe5),U),N(exports['UniverThreadCommentDataSourcePlugin'],'type',c[_0x14cdcb(0xed)][_0x14cdcb(0x106)]),exports[_0x14cdcb(0x119)]=W([c[_0x14cdcb(0x110)](j[_0x14cdcb(0xf2)],b['UniverCollaborationClientPlugin'],T[_0x14cdcb(0x100)]),O(0x1,c['Inject'](c['Injector'])),O(0x2,c['IConfigService'])],exports[_0x14cdcb(0x119)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x2cc8a6=_0x1055;(function(_0x5b8c71,_0x2628e5){const _0x751248=_0x1055,_0x53f661=_0x5b8c71();while(!![]){try{const _0x38a1bf=-parseInt(_0x751248(0x1bf))/0x1+parseInt(_0x751248(0x1d6))/0x2*(-parseInt(_0x751248(0x1bb))/0x3)+parseInt(_0x751248(0x1bc))/0x4+-parseInt(_0x751248(0x1db))/0x5+parseInt(_0x751248(0x1a0))/0x6*(-parseInt(_0x751248(0x1d3))/0x7)+-parseInt(_0x751248(0x1b9))/0x8*(parseInt(_0x751248(0x1f0))/0x9)+parseInt(_0x751248(0x1b1))/0xa*(parseInt(_0x751248(0x1a1))/0xb);if(_0x38a1bf===_0x2628e5)break;else _0x53f661['push'](_0x53f661['shift']());}catch(_0x5e43ed){_0x53f661['push'](_0x53f661['shift']());}}}(_0x5b60,0x211cb));import{CommentService as _0x74c6c3,CollaborationSessionService as _0x48974a,UniverCollaborationClientPlugin as _0x5cf774}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x26eb12}from'@univerjs-pro/license';import{dayjs as _0x3e9fc4,UserManagerService as _0x196045,Inject as _0x508d76,Injector as _0x54331d,Disposable as _0x4cf6d8,CustomRangeType as _0x3f5e23,UniverInstanceType as _0x22d94a,DependentOn as _0x37d3da,IConfigService as _0x6fd7ab,Plugin as _0x173940,merge as _0x422e60}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4388c4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1b41e9,IThreadCommentDataSourceService as _0xa3bc21}from'@univerjs/thread-comment';import{bufferTime as _0x5a99f1}from'rxjs';import{HTTPService as _0x3d2d95}from'@univerjs/network';const W=_0x2cc8a6(0x1aa);var I=(_0x27d71c=>(_0x27d71c[_0x27d71c[_0x2cc8a6(0x1d5)]=0x0]=_0x2cc8a6(0x1d5),_0x27d71c[_0x27d71c[_0x2cc8a6(0x1eb)]=0x1]=_0x2cc8a6(0x1eb),_0x27d71c[_0x27d71c['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x27d71c))(I||{}),v=(_0x366c39=>(_0x366c39[_0x366c39[_0x2cc8a6(0x1e9)]=0x0]='Unknown',_0x366c39[_0x366c39[_0x2cc8a6(0x1c3)]=0x1]='Add',_0x366c39[_0x366c39[_0x2cc8a6(0x1ad)]=0x2]=_0x2cc8a6(0x1ad),_0x366c39[_0x366c39[_0x2cc8a6(0x1ef)]=0x3]='Edit',_0x366c39[_0x366c39['Delete']=0x4]='Delete',_0x366c39[_0x366c39[_0x2cc8a6(0x1b0)]=0x5]=_0x2cc8a6(0x1b0),_0x366c39[_0x366c39[_0x2cc8a6(0x1da)]=-0x1]='UNRECOGNIZED',_0x366c39))(v||{});const D=_0x31337d=>_0x3e9fc4(new Date(+_0x31337d))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x4e0a83,_0x50f89f)=>{const _0xf43e6e=_0x2cc8a6,_0x133bb6=_0x4e0a83[_0xf43e6e(0x1e5)](_0x196045),_0x126725=_0x4e0a83[_0xf43e6e(0x1e5)](_0x3d2d95);_0x50f89f[_0xf43e6e(0x1e7)](_0x24483f=>{const _0x668824=_0xf43e6e;_0x133bb6[_0x668824(0x19e)](_0x24483f)&&_0x50f89f[_0x668824(0x1c1)](_0x24483f);}),_0x50f89f[_0xf43e6e(0x1ee)]&&(await _0x126725['get'](_0xf43e6e(0x1cf),{'params':{'userIDs':[..._0x50f89f]}}))[_0xf43e6e(0x1d4)]['users'][_0xf43e6e(0x1e7)](_0x5eaeb7=>{const _0x5a7dfe=_0xf43e6e;_0x5eaeb7&&_0x133bb6[_0x5a7dfe(0x1a2)](_0x5eaeb7);});};var K=Object[_0x2cc8a6(0x1fa)],V=(_0x341f89,_0x5e988f,_0x1d6e9e,_0x574205)=>{for(var _0x1ae094=_0x574205>0x1?void 0x0:_0x574205?K(_0x5e988f,_0x1d6e9e):_0x5e988f,_0x104601=_0x341f89['length']-0x1,_0x273303;_0x104601>=0x0;_0x104601--)(_0x273303=_0x341f89[_0x104601])&&(_0x1ae094=_0x273303(_0x1ae094)||_0x1ae094);return _0x1ae094;},p=(_0x31f48a,_0x167e6c)=>(_0x1f6941,_0x4caff9)=>_0x167e6c(_0x1f6941,_0x4caff9,_0x31f48a);function _0x5b60(){const _0x55a7e6=['error','threadId','/edit','/universer-api/user/list','createTimestamp','slice','users','43085BfYcxO','body','OpenOrReOpen','96166dxVwVG','deleteComment','COMMENT','find','UNRECOGNIZED','529310gCeyTH','map','_injector','/list','post','/universer-api/comment/unit/','_threadCommentDataSource','stringify','add','Delete','get','filter','forEach','/solved','Unknown','unitId','Solved','disposeWithMe','subscribe','size','Edit','783kQyDdT','getUnit','customRanges','rangeId','symbol','_initUserSync','rangeType','content','personId','comment','getOwnPropertyDescriptor','code','_sessionService','/add','listComments','_init','addComment','getUser','replies','144CWLwzP','642378JgbtwO','addUser','_httpService','userID','_config','replyId','solved','parentId','comments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getComment','parse','Reply','_commentService','resolved','Solve','110OtIegn','type','saveCommentToSnapshot','pipe','_configService','updateComment','getMemberID','onStarting','23672BgeZbM','_threadCommentDataSourceService','3aCvdgq','777076CVlYQv','_userService','_threadCommentModel','141922aItzIx','user','delete','/delete','Add','length','_initDataSource','userId','values','root','commentUpdate$','requireSession','reply'];_0x5b60=function(){return _0x55a7e6;};return _0x5b60();}let S=class extends _0x4cf6d8{constructor(_0x91d85d,_0x59cc94,_0x322416,_0x5d7ec4){const _0x164134=_0x2cc8a6;super(),this[_0x164134(0x1ae)]=_0x91d85d,this['_threadCommentModel']=_0x59cc94,this['_userService']=_0x322416,this[_0x164134(0x1dd)]=_0x5d7ec4,this['_init'](),this[_0x164134(0x1f5)]();}[_0x2cc8a6(0x1f5)](){const _0x347c0f=_0x2cc8a6;this['disposeWithMe'](this[_0x347c0f(0x1be)][_0x347c0f(0x1c9)][_0x347c0f(0x1b4)](_0x5a99f1(0x10))['subscribe'](_0x3cf785=>{const _0x1da555=new Set();_0x3cf785['forEach'](_0xc69bb3=>{const _0x391e3d=_0x1055;switch(_0xc69bb3[_0x391e3d(0x1b2)]){case _0x391e3d(0x1e3):{const _0x5f3472=_0xc69bb3['payload'][_0x391e3d(0x1f8)];_0x1da555[_0x391e3d(0x1e3)](_0x5f3472);break;}}}),B(this['_injector'],_0x1da555);}));}[_0x2cc8a6(0x19c)](){const _0x529c7c=_0x2cc8a6;this[_0x529c7c(0x1ec)](this[_0x529c7c(0x1ae)]['commentUpdate$'][_0x529c7c(0x1ed)](async _0x1a1cc2=>{const _0x1282cb=_0x529c7c;var _0x3eb973,_0x34964c,_0x534ef4,_0x33fe5e;const _0x4eb6f1=(_0x3eb973=this[_0x1282cb(0x1be)][_0x1282cb(0x1f1)](_0x1a1cc2[_0x1282cb(0x1ea)])[_0x1282cb(0x1d9)](_0x55054f=>_0x55054f[_0x1282cb(0x1cd)]===_0x1a1cc2['threadId']))==null?void 0x0:_0x3eb973[_0x1282cb(0x1c8)];if(!_0x4eb6f1)return;const {unitId:_0x360a76,subUnitId:_0x4bded6}=_0x4eb6f1;switch(_0x1a1cc2['user']&&this[_0x1282cb(0x1bd)][_0x1282cb(0x1a2)](_0x1a1cc2[_0x1282cb(0x1c0)]),_0x1a1cc2[_0x1282cb(0x1b2)]){case v[_0x1282cb(0x1c3)]:break;case v[_0x1282cb(0x1ad)]:{this[_0x1282cb(0x1be)][_0x1282cb(0x19d)](_0x360a76,_0x4bded6,{'unitId':_0x360a76,'subUnitId':_0x4bded6,'ref':'','id':_0x1a1cc2[_0x1282cb(0x1a6)],'dT':D(+_0x1a1cc2['createTimestamp']),'threadId':_0x1a1cc2[_0x1282cb(0x1cd)],'personId':(_0x534ef4=(_0x34964c=_0x1a1cc2[_0x1282cb(0x1c0)])==null?void 0x0:_0x34964c['userID'])!=null?_0x534ef4:_0x1a1cc2[_0x1282cb(0x1c6)],'text':JSON[_0x1282cb(0x1ac)](_0x1a1cc2[_0x1282cb(0x1f7)]),'parentId':_0x4eb6f1['id']});break;}case v[_0x1282cb(0x1e4)]:{const _0x14a0a5=this[_0x1282cb(0x1be)][_0x1282cb(0x1ab)](_0x360a76,_0x4bded6,_0x1a1cc2[_0x1282cb(0x1a6)]);_0x14a0a5&&_0x14a0a5[_0x1282cb(0x1a8)]&&this[_0x1282cb(0x1be)][_0x1282cb(0x1d7)](_0x360a76,_0x4bded6,_0x1a1cc2['replyId']);break;}case v['Edit']:{this[_0x1282cb(0x1be)][_0x1282cb(0x1b6)](_0x360a76,_0x4bded6,{'commentId':_0x1a1cc2['replyId'],'text':JSON['parse'](_0x1a1cc2['content'])});break;}case v[_0x1282cb(0x1b0)]:{const _0xdb3e69=(_0x33fe5e=this['_threadCommentModel'][_0x1282cb(0x1f1)](_0x1a1cc2[_0x1282cb(0x1ea)])['find'](_0x4d00ef=>_0x4d00ef[_0x1282cb(0x1cd)]===_0x1a1cc2[_0x1282cb(0x1cd)]))==null?void 0x0:_0x33fe5e[_0x1282cb(0x1c8)];_0xdb3e69&&this[_0x1282cb(0x1be)]['resolveComment'](_0x360a76,_0x4bded6,_0xdb3e69['id'],_0x1a1cc2[_0x1282cb(0x1a7)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x508d76(_0x74c6c3)),p(0x1,_0x508d76(_0x1b41e9)),p(0x2,_0x508d76(_0x196045)),p(0x3,_0x508d76(_0x54331d))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x47c3bd,_0x3693ef,_0x449b11,_0xc171e4)=>{const _0x4bf66a=_0x2cc8a6;for(var _0x2cf6bf=_0xc171e4>0x1?void 0x0:_0xc171e4?k(_0x3693ef,_0x449b11):_0x3693ef,_0x4e9866=_0x47c3bd[_0x4bf66a(0x1c4)]-0x1,_0x7833b6;_0x4e9866>=0x0;_0x4e9866--)(_0x7833b6=_0x47c3bd[_0x4e9866])&&(_0x2cf6bf=_0x7833b6(_0x2cf6bf)||_0x2cf6bf);return _0x2cf6bf;},_=(_0x381e6d,_0x1c8501)=>(_0x3520aa,_0x5b426d)=>_0x1c8501(_0x3520aa,_0x5b426d,_0x381e6d);function X(_0x40bc8c,_0xb32cf1){const _0x451a23=_0x2cc8a6,_0x487652=_0x40bc8c[_0x451a23(0x19f)][0x0];return{..._0xb32cf1,'id':_0x487652[_0x451a23(0x1a6)],'resolved':_0x40bc8c['solved']===0x1,'dT':D(_0x487652['createTimestamp']),'personId':_0x487652[_0x451a23(0x1c6)],'threadId':_0x487652[_0x451a23(0x1cd)]};}function ee(_0x2d7b2e,_0x114984,_0x4e2d25){const _0x386e95=_0x2cc8a6;var _0x48bd19,_0x2ccb25;if(((_0x2ccb25=(_0x48bd19=_0x2d7b2e==null?void 0x0:_0x2d7b2e['replies'])==null?void 0x0:_0x48bd19[_0x386e95(0x1c4)])!=null?_0x2ccb25:0x0)>0x0){const _0x4aa96f=(_0x4bba49,_0x4f7bcc)=>({'id':_0x4bba49[_0x386e95(0x1a6)],'threadId':_0x4bba49[_0x386e95(0x1cd)],'dT':D(_0x4bba49[_0x386e95(0x1d0)]),'personId':_0x4bba49[_0x386e95(0x1c6)],'resolved':_0x2d7b2e['solved']===I[_0x386e95(0x1eb)],'unitId':_0x114984,'subUnitId':_0x4e2d25,'text':JSON[_0x386e95(0x1ac)](_0x4bba49[_0x386e95(0x1f7)]),'parentId':_0x4f7bcc}),_0x3d9af9=_0x4aa96f(_0x2d7b2e['replies'][0x0]);return{..._0x3d9af9,'children':_0x2d7b2e[_0x386e95(0x19f)][_0x386e95(0x1d1)](0x1)['map'](_0x3f40c7=>_0x4aa96f(_0x3f40c7,_0x3d9af9['id']))};}return null;}let f=class{constructor(_0x3283c2,_0x2aaf8d,_0xd160ac,_0x2330c4){const _0x120c9e=_0x2cc8a6;this[_0x120c9e(0x1a3)]=_0x3283c2,this['_userService']=_0x2aaf8d,this['_sessionService']=_0xd160ac,this[_0x120c9e(0x1dd)]=_0x2330c4;}async[_0x2cc8a6(0x19d)](_0x26e7a9){const _0x5a7ea5=_0x2cc8a6;var _0x546a69,_0x15f3aa;const {parentId:_0x454460,unitId:_0x3a945d,text:_0x419298,threadId:_0x4827c1}=_0x26e7a9,_0x31158c=(_0x15f3aa=(_0x546a69=_0x419298['customRanges'])==null?void 0x0:_0x546a69['filter'](_0x3a5040=>_0x3a5040[_0x5a7ea5(0x1f6)]===_0x3f5e23[_0x5a7ea5(0x1d8)])[_0x5a7ea5(0x1dc)](_0x32c1af=>_0x32c1af[_0x5a7ea5(0x1f3)]))!=null?_0x15f3aa:[],_0x18efbc=JSON[_0x5a7ea5(0x1e2)](_0x419298),_0x33ac2b=(await this[_0x5a7ea5(0x1fc)][_0x5a7ea5(0x1ca)](_0x3a945d))[_0x5a7ea5(0x1b7)]();if(_0x454460){const _0x52f831={'memberId':_0x33ac2b,'unitId':_0x3a945d,'content':_0x18efbc,'mention':_0x31158c,'threadId':_0x4827c1},_0x559380=(await this[_0x5a7ea5(0x1a3)][_0x5a7ea5(0x1df)]('/universer-api/comment/unit/'+_0x3a945d+'/reply',{'body':_0x52f831}))[_0x5a7ea5(0x1d4)][_0x5a7ea5(0x1cb)];return{..._0x26e7a9,'id':_0x559380[_0x5a7ea5(0x1a6)],'dT':_0x3e9fc4(+_0x559380[_0x5a7ea5(0x1d0)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x559380[_0x5a7ea5(0x1c6)]};}else{const _0x34da07={'memberId':_0x33ac2b,'unitId':_0x3a945d,'content':_0x18efbc,'mention':_0x31158c},_0x35aa30=await this[_0x5a7ea5(0x1a3)][_0x5a7ea5(0x1df)]('/universer-api/comment/unit/'+_0x3a945d+_0x5a7ea5(0x1fd),{'body':_0x34da07});return X(_0x35aa30[_0x5a7ea5(0x1d4)][_0x5a7ea5(0x1f9)],_0x26e7a9);}}async['updateComment'](_0x416c67){const _0x5d810b=_0x2cc8a6;var _0x5e5eb8,_0x1202f1;const {text:_0x43bb2f,unitId:_0x4976c8}=_0x416c67,_0x5c686c=(_0x1202f1=(_0x5e5eb8=_0x43bb2f[_0x5d810b(0x1f2)])==null?void 0x0:_0x5e5eb8[_0x5d810b(0x1e6)](_0x56340f=>_0x56340f[_0x5d810b(0x1f6)]===_0x3f5e23['COMMENT'])[_0x5d810b(0x1dc)](_0x4ff117=>_0x4ff117[_0x5d810b(0x1f3)]))!=null?_0x1202f1:[],_0x634c5d=JSON[_0x5d810b(0x1e2)](_0x43bb2f),_0x3db1cb=_0x416c67['threadId'],_0x5994e1=_0x416c67['id'],_0x274f6a={'memberId':(await this[_0x5d810b(0x1fc)][_0x5d810b(0x1ca)](_0x4976c8))['getMemberID'](),'unitId':_0x4976c8,'threadId':_0x3db1cb,'mention':_0x5c686c,'content':_0x634c5d,'replyId':_0x5994e1},_0x16110a=await this[_0x5d810b(0x1a3)][_0x5d810b(0x1df)]('/universer-api/comment/unit/'+_0x4976c8+_0x5d810b(0x1ce),{'body':_0x274f6a});return!_0x16110a[_0x5d810b(0x1d4)][_0x5d810b(0x1cc)]||_0x16110a['body'][_0x5d810b(0x1cc)]['code']===0x1;}async['resolveComment'](_0x569f01){const _0x2c6c05=_0x2cc8a6,{unitId:_0x13004c}=_0x569f01,_0x2e855d=_0x569f01[_0x2c6c05(0x1cd)],_0x199af3={'memberId':this[_0x2c6c05(0x1bd)]['getCurrentUser']()[_0x2c6c05(0x1a4)],'unitId':_0x13004c,'threadId':_0x2e855d,'solved':_0x569f01[_0x2c6c05(0x1af)]?I[_0x2c6c05(0x1eb)]:I['OpenOrReOpen']},_0x27cebc=await this[_0x2c6c05(0x1a3)][_0x2c6c05(0x1df)](_0x2c6c05(0x1e0)+_0x13004c+_0x2c6c05(0x1e8),{'body':_0x199af3});return!_0x27cebc[_0x2c6c05(0x1d4)][_0x2c6c05(0x1cc)]||_0x27cebc[_0x2c6c05(0x1d4)]['error'][_0x2c6c05(0x1fb)]===0x1;}async['deleteComment'](_0x172133,_0x276567,_0x5945f5,_0x384546){const _0x271eee=_0x2cc8a6,_0x1a29f2={'memberId':(await this[_0x271eee(0x1fc)][_0x271eee(0x1ca)](_0x172133))[_0x271eee(0x1b7)](),'threadId':_0x5945f5,'replyId':_0x384546,'unitId':_0x172133},_0x4e0af9=await this[_0x271eee(0x1a3)][_0x271eee(0x1df)]('/universer-api/comment/unit/'+_0x172133+_0x271eee(0x1c2),{'body':_0x1a29f2});return!_0x4e0af9['body'][_0x271eee(0x1cc)]||_0x4e0af9[_0x271eee(0x1d4)][_0x271eee(0x1cc)][_0x271eee(0x1fb)]===0x1;}async[_0x2cc8a6(0x19b)](_0x55e253,_0x56397a,_0x5a4b68){const _0x397508=_0x2cc8a6,_0x21666f={'unitId':_0x55e253,'threadId':_0x5a4b68},_0x57ab13=await this[_0x397508(0x1a3)]['post'](_0x397508(0x1e0)+_0x55e253+_0x397508(0x1de),{'body':_0x21666f}),_0xdf5013=_0x5a4b68['map'](_0x294766=>ee(_0x57ab13[_0x397508(0x1d4)][_0x397508(0x1a9)][_0x294766],_0x55e253,_0x56397a))[_0x397508(0x1e6)](Boolean);return Object[_0x397508(0x1c7)](_0x57ab13[_0x397508(0x1d4)][_0x397508(0x1d2)])[_0x397508(0x1e7)](_0x3b3a7d=>{const _0x5ae66f=_0x397508;this[_0x5ae66f(0x1bd)][_0x5ae66f(0x1a2)](_0x3b3a7d);}),_0xdf5013;}[_0x2cc8a6(0x1b3)](_0xfc9ce7){const _0x1e0306=_0x2cc8a6;return{'id':_0xfc9ce7['id'],'threadId':_0xfc9ce7[_0x1e0306(0x1cd)],'ref':_0xfc9ce7['ref']};}};f=Q([_(0x0,_0x508d76(_0x3d2d95)),_(0x1,_0x508d76(_0x196045)),_(0x2,_0x508d76(_0x48974a)),_(0x3,_0x508d76(_0x54331d))],f);var re=Object[_0x2cc8a6(0x1fa)],te=(_0x477f8e,_0x41e07b,_0x21938f,_0x487709)=>{const _0x57feed=_0x2cc8a6;for(var _0x496bda=_0x487709>0x1?void 0x0:_0x487709?re(_0x41e07b,_0x21938f):_0x41e07b,_0x53da12=_0x477f8e[_0x57feed(0x1c4)]-0x1,_0x164b4e;_0x53da12>=0x0;_0x53da12--)(_0x164b4e=_0x477f8e[_0x53da12])&&(_0x496bda=_0x164b4e(_0x496bda)||_0x496bda);return _0x496bda;},N=(_0x2d904a,_0xcbabe2)=>(_0x3282e8,_0x46583e)=>_0xcbabe2(_0x3282e8,_0x46583e,_0x2d904a);let g=class extends _0x4cf6d8{constructor(_0x15ca97,_0x48a214){const _0x2d6572=_0x2cc8a6;super(),this['_threadCommentDataSourceService']=_0x15ca97,this[_0x2d6572(0x1e1)]=_0x48a214,this[_0x2d6572(0x1c5)]();}[_0x2cc8a6(0x1c5)](){const _0xd6efc1=_0x2cc8a6;this[_0xd6efc1(0x1ba)]['dataSource']=this['_threadCommentDataSource'],this[_0xd6efc1(0x1ba)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0xa3bc21),N(0x1,_0x508d76(f))],g);var se=Object['defineProperty'],oe=Object[_0x2cc8a6(0x1fa)],ne=(_0x56a402,_0x2e3a15,_0x4fa52d)=>_0x2e3a15 in _0x56a402?se(_0x56a402,_0x2e3a15,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4fa52d}):_0x56a402[_0x2e3a15]=_0x4fa52d,ie=(_0x212195,_0x338356,_0x23dee3,_0x38b712)=>{for(var _0x49df31=_0x38b712>0x1?void 0x0:_0x38b712?oe(_0x338356,_0x23dee3):_0x338356,_0x5a6128=_0x212195['length']-0x1,_0x3211bb;_0x5a6128>=0x0;_0x5a6128--)(_0x3211bb=_0x212195[_0x5a6128])&&(_0x49df31=_0x3211bb(_0x49df31)||_0x49df31);return _0x49df31;},w=(_0x1cf2e9,_0x7e46e3)=>(_0x205031,_0x477d12)=>_0x7e46e3(_0x205031,_0x477d12,_0x1cf2e9),$=(_0xa16efd,_0x4c7be5,_0x6d4b36)=>ne(_0xa16efd,typeof _0x4c7be5!=_0x2cc8a6(0x1f4)?_0x4c7be5+'':_0x4c7be5,_0x6d4b36);let b=class extends _0x173940{constructor(_0x311ece=M,_0xa5aef7,_0x260226){const _0x2a2c74=_0x2cc8a6;super(),this[_0x2a2c74(0x1a5)]=_0x311ece,this['_injector']=_0xa5aef7,this[_0x2a2c74(0x1b5)]=_0x260226;const {..._0x33eb49}=_0x422e60({},M,this[_0x2a2c74(0x1a5)]);this[_0x2a2c74(0x1b5)]['setConfig'](z,_0x33eb49);}[_0x2cc8a6(0x1b8)](){const _0x3d45f4=_0x2cc8a6;[[f],[g],[S]][_0x3d45f4(0x1e7)](_0x220941=>{const _0x183db6=_0x3d45f4;this[_0x183db6(0x1dd)][_0x183db6(0x1e3)](_0x220941);});}['onReady'](){const _0x47dae5=_0x2cc8a6;this[_0x47dae5(0x1dd)][_0x47dae5(0x1e5)](g),this[_0x47dae5(0x1dd)][_0x47dae5(0x1e5)](S);}};$(b,'pluginName',W),$(b,'type',_0x22d94a['UNIVER_UNKNOWN']),b=ie([_0x37d3da(_0x4388c4,_0x5cf774,_0x26eb12),w(0x1,_0x508d76(_0x54331d)),w(0x2,_0x6fd7ab)],b);function _0x1055(_0x46ac91,_0x399605){const _0x5b605e=_0x5b60();return _0x1055=function(_0x1055aa,_0x2dbf99){_0x1055aa=_0x1055aa-0x19b;let _0x3145ce=_0x5b605e[_0x1055aa];return _0x3145ce;},_0x1055(_0x46ac91,_0x399605);}export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x5e519c=_0x5ceb;(function(_0x123488,_0x434d91){const _0x3fc728=_0x5ceb,_0x5acb2d=_0x123488();while(!![]){try{const _0x2f4881=parseInt(_0x3fc728(0xbc))/0x1*(parseInt(_0x3fc728(0xdf))/0x2)+-parseInt(_0x3fc728(0xae))/0x3+parseInt(_0x3fc728(0x9a))/0x4*(parseInt(_0x3fc728(0xd3))/0x5)+parseInt(_0x3fc728(0xcc))/0x6+-parseInt(_0x3fc728(0xca))/0x7+parseInt(_0x3fc728(0x9e))/0x8*(-parseInt(_0x3fc728(0xd2))/0x9)+-parseInt(_0x3fc728(0xa0))/0xa*(parseInt(_0x3fc728(0xe6))/0xb);if(_0x2f4881===_0x434d91)break;else _0x5acb2d['push'](_0x5acb2d['shift']());}catch(_0x3fc1ce){_0x5acb2d['push'](_0x5acb2d['shift']());}}}(_0x5878,0xbea9b));import{CommentService as _0x12d00b,CollaborationSessionService as _0x494f6f,UniverCollaborationClientPlugin as _0x297c90}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x24c725}from'@univerjs-pro/license';import{dayjs as _0x19b6e7,UserManagerService as _0x3d615e,Inject as _0x1bd6b7,Injector as _0x1dfc40,Disposable as _0x4dbd30,CustomRangeType as _0x517552,UniverInstanceType as _0x5c3a2a,DependentOn as _0x2aafae,IConfigService as _0x4ccfd1,Plugin as _0x41074e,merge as _0x59806d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x31b480}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2d9488,IThreadCommentDataSourceService as _0x1e1893}from'@univerjs/thread-comment';import{bufferTime as _0x522b81}from'rxjs';import{HTTPService as _0x52a4a2}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x395eb1=>(_0x395eb1[_0x395eb1[_0x5e519c(0xda)]=0x0]=_0x5e519c(0xda),_0x395eb1[_0x395eb1[_0x5e519c(0xa9)]=0x1]=_0x5e519c(0xa9),_0x395eb1[_0x395eb1['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x395eb1))(I||{}),v=(_0x3d9ea7=>(_0x3d9ea7[_0x3d9ea7['Unknown']=0x0]=_0x5e519c(0xb5),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0xd8)]=0x1]=_0x5e519c(0xd8),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0xdc)]=0x2]=_0x5e519c(0xdc),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0x91)]=0x3]=_0x5e519c(0x91),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0xc4)]=0x4]=_0x5e519c(0xc4),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0xef)]=0x5]=_0x5e519c(0xef),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0xc7)]=-0x1]=_0x5e519c(0xc7),_0x3d9ea7))(v||{});const D=_0x268478=>_0x19b6e7(new Date(+_0x268478))[_0x5e519c(0xcb)](_0x5e519c(0xbb)),B=async(_0x262fad,_0x353302)=>{const _0x1b6b6c=_0x5e519c,_0x4f46b8=_0x262fad[_0x1b6b6c(0xee)](_0x3d615e),_0x152324=_0x262fad[_0x1b6b6c(0xee)](_0x52a4a2);_0x353302[_0x1b6b6c(0xdd)](_0x526851=>{const _0x329486=_0x1b6b6c;_0x4f46b8[_0x329486(0xa5)](_0x526851)&&_0x353302[_0x329486(0xd0)](_0x526851);}),_0x353302['size']&&(await _0x152324[_0x1b6b6c(0xee)]('/universer-api/user/list',{'params':{'userIDs':[..._0x353302]}}))[_0x1b6b6c(0xa2)][_0x1b6b6c(0xc3)][_0x1b6b6c(0xdd)](_0x42ce50=>{const _0x59dfa1=_0x1b6b6c;_0x42ce50&&_0x4f46b8[_0x59dfa1(0xd4)](_0x42ce50);});};function _0x5878(){const _0x50530a=['Reply','forEach','_sessionService','2bmXCRB','pluginName','_threadCommentDataSource','_commentService','length','dataSource','userID','11ISIPwp','comments','ref','root','parentId','/add','/reply','replyId','get','Solve','Edit','unitId','customRanges','createTimestamp','user','map','_httpService','deleteComment','type','78004utSuZr','_config','filter','getOwnPropertyDescriptor','156568aIboBl','getUnit','4452870KExamF','solved','body','post','error','getUser','requireSession','values','pipe','Solved','_init','updateComment','userId','disposeWithMe','1960779gVlxGF','_threadCommentDataSourceService','find','_threadCommentModel','resolveComment','_injector','/list','Unknown','addComment','onStarting','payload','/universer-api/comment/unit/','_initUserSync','YYYY/MM/DD\x20HH:mm','1387055JDQbjc','_configService','rangeType','_userService','getMemberID','replies','add','users','Delete','saveCommentToSnapshot','subscribe','UNRECOGNIZED','COMMENT','threadId','2179807aUEToF','format','6001866xgiKbL','/edit','personId','syncUpdateMutationToColla','delete','rangeId','144wYzrYA','30FYEQzq','addUser','commentUpdate$','code','parse','Add','listComments','OpenOrReOpen','_initDataSource'];_0x5878=function(){return _0x50530a;};return _0x5878();}var K=Object[_0x5e519c(0x9d)],V=(_0x1a6862,_0x55ac9c,_0x3d26a5,_0x236beb)=>{const _0x269ff4=_0x5e519c;for(var _0x34b007=_0x236beb>0x1?void 0x0:_0x236beb?K(_0x55ac9c,_0x3d26a5):_0x55ac9c,_0x2adf79=_0x1a6862[_0x269ff4(0xe3)]-0x1,_0x243102;_0x2adf79>=0x0;_0x2adf79--)(_0x243102=_0x1a6862[_0x2adf79])&&(_0x34b007=_0x243102(_0x34b007)||_0x34b007);return _0x34b007;},p=(_0x24b02c,_0x28b848)=>(_0x36079c,_0x3dcd39)=>_0x28b848(_0x36079c,_0x3dcd39,_0x24b02c);let S=class extends _0x4dbd30{constructor(_0x41aebb,_0x4ca893,_0x36868a,_0x54160a){const _0x51dcbf=_0x5e519c;super(),this['_commentService']=_0x41aebb,this[_0x51dcbf(0xb1)]=_0x4ca893,this['_userService']=_0x36868a,this[_0x51dcbf(0xb3)]=_0x54160a,this[_0x51dcbf(0xaa)](),this[_0x51dcbf(0xba)]();}[_0x5e519c(0xba)](){const _0x726858=_0x5e519c;this[_0x726858(0xad)](this['_threadCommentModel']['commentUpdate$'][_0x726858(0xa8)](_0x522b81(0x10))[_0x726858(0xc6)](_0x333991=>{const _0x39515e=_0x726858,_0x2d1b88=new Set();_0x333991[_0x39515e(0xdd)](_0x454762=>{const _0x17df64=_0x39515e;switch(_0x454762[_0x17df64(0x99)]){case _0x17df64(0xc2):{const _0x3ac24f=_0x454762[_0x17df64(0xb8)][_0x17df64(0xce)];_0x2d1b88[_0x17df64(0xc2)](_0x3ac24f);break;}}}),B(this['_injector'],_0x2d1b88);}));}[_0x5e519c(0xaa)](){const _0x23622b=_0x5e519c;this[_0x23622b(0xad)](this[_0x23622b(0xe2)][_0x23622b(0xd5)][_0x23622b(0xc6)](async _0x3a21ba=>{const _0x3a6884=_0x23622b;var _0x2c23de,_0xeb45f8,_0x323a45,_0xd1ce65;const _0x5db5c9=(_0x2c23de=this[_0x3a6884(0xb1)][_0x3a6884(0x9f)](_0x3a21ba['unitId'])['find'](_0x8a7d8=>_0x8a7d8[_0x3a6884(0xc9)]===_0x3a21ba[_0x3a6884(0xc9)]))==null?void 0x0:_0x2c23de['root'];if(!_0x5db5c9)return;const {unitId:_0x5b93ed,subUnitId:_0x594da2}=_0x5db5c9;switch(_0x3a21ba['user']&&this[_0x3a6884(0xbf)][_0x3a6884(0xd4)](_0x3a21ba['user']),_0x3a21ba[_0x3a6884(0x99)]){case v['Add']:break;case v[_0x3a6884(0xdc)]:{this[_0x3a6884(0xb1)]['addComment'](_0x5b93ed,_0x594da2,{'unitId':_0x5b93ed,'subUnitId':_0x594da2,'ref':'','id':_0x3a21ba[_0x3a6884(0xed)],'dT':D(+_0x3a21ba[_0x3a6884(0x94)]),'threadId':_0x3a21ba['threadId'],'personId':(_0x323a45=(_0xeb45f8=_0x3a21ba[_0x3a6884(0x95)])==null?void 0x0:_0xeb45f8[_0x3a6884(0xe5)])!=null?_0x323a45:_0x3a21ba[_0x3a6884(0xac)],'text':JSON[_0x3a6884(0xd7)](_0x3a21ba['content']),'parentId':_0x5db5c9['id']});break;}case v['Delete']:{const _0x33f369=this[_0x3a6884(0xb1)]['getComment'](_0x5b93ed,_0x594da2,_0x3a21ba[_0x3a6884(0xed)]);_0x33f369&&_0x33f369[_0x3a6884(0xea)]&&this['_threadCommentModel']['deleteComment'](_0x5b93ed,_0x594da2,_0x3a21ba['replyId']);break;}case v['Edit']:{this[_0x3a6884(0xb1)]['updateComment'](_0x5b93ed,_0x594da2,{'commentId':_0x3a21ba[_0x3a6884(0xed)],'text':JSON[_0x3a6884(0xd7)](_0x3a21ba['content'])});break;}case v[_0x3a6884(0xef)]:{const _0x28a6ae=(_0xd1ce65=this[_0x3a6884(0xb1)][_0x3a6884(0x9f)](_0x3a21ba[_0x3a6884(0x92)])[_0x3a6884(0xb0)](_0x485aec=>_0x485aec[_0x3a6884(0xc9)]===_0x3a21ba[_0x3a6884(0xc9)]))==null?void 0x0:_0xd1ce65[_0x3a6884(0xe9)];_0x28a6ae&&this[_0x3a6884(0xb1)][_0x3a6884(0xb2)](_0x5b93ed,_0x594da2,_0x28a6ae['id'],_0x3a21ba['solved']===I[_0x3a6884(0xa9)]);break;}}}));}};S=V([p(0x0,_0x1bd6b7(_0x12d00b)),p(0x1,_0x1bd6b7(_0x2d9488)),p(0x2,_0x1bd6b7(_0x3d615e)),p(0x3,_0x1bd6b7(_0x1dfc40))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x126e9c,_0xe5cf5c,_0x420c12,_0x1a178f)=>{const _0x19ae95=_0x5e519c;for(var _0x272145=_0x1a178f>0x1?void 0x0:_0x1a178f?k(_0xe5cf5c,_0x420c12):_0xe5cf5c,_0x5b4cec=_0x126e9c[_0x19ae95(0xe3)]-0x1,_0x137b66;_0x5b4cec>=0x0;_0x5b4cec--)(_0x137b66=_0x126e9c[_0x5b4cec])&&(_0x272145=_0x137b66(_0x272145)||_0x272145);return _0x272145;},_=(_0x26a1f4,_0x281b8d)=>(_0x584d65,_0x22df2d)=>_0x281b8d(_0x584d65,_0x22df2d,_0x26a1f4);function X(_0x480b96,_0x1fe62d){const _0x22c521=_0x5e519c,_0x41c193=_0x480b96[_0x22c521(0xc1)][0x0];return{..._0x1fe62d,'id':_0x41c193['replyId'],'resolved':_0x480b96[_0x22c521(0xa1)]===0x1,'dT':D(_0x41c193[_0x22c521(0x94)]),'personId':_0x41c193['userId'],'threadId':_0x41c193['threadId']};}function ee(_0x788a95,_0x16985f,_0x284a63){const _0x3568bc=_0x5e519c;var _0xa97886,_0x2e28b7;if(((_0x2e28b7=(_0xa97886=_0x788a95==null?void 0x0:_0x788a95[_0x3568bc(0xc1)])==null?void 0x0:_0xa97886[_0x3568bc(0xe3)])!=null?_0x2e28b7:0x0)>0x0){const _0x3a66dd=(_0x4f17ed,_0x2f2aa3)=>({'id':_0x4f17ed['replyId'],'threadId':_0x4f17ed[_0x3568bc(0xc9)],'dT':D(_0x4f17ed[_0x3568bc(0x94)]),'personId':_0x4f17ed['userId'],'resolved':_0x788a95[_0x3568bc(0xa1)]===I[_0x3568bc(0xa9)],'unitId':_0x16985f,'subUnitId':_0x284a63,'text':JSON[_0x3568bc(0xd7)](_0x4f17ed['content']),'parentId':_0x2f2aa3}),_0x4a2743=_0x3a66dd(_0x788a95[_0x3568bc(0xc1)][0x0]);return{..._0x4a2743,'children':_0x788a95['replies']['slice'](0x1)[_0x3568bc(0x96)](_0x4c26c8=>_0x3a66dd(_0x4c26c8,_0x4a2743['id']))};}return null;}let f=class{constructor(_0x4a0a55,_0x46b7ec,_0x1193db,_0x3af4c8){const _0x52c118=_0x5e519c;this[_0x52c118(0x97)]=_0x4a0a55,this['_userService']=_0x46b7ec,this['_sessionService']=_0x1193db,this[_0x52c118(0xb3)]=_0x3af4c8;}async[_0x5e519c(0xb6)](_0xa173bc){const _0x5d729b=_0x5e519c;var _0x2ca814,_0x20a6b1;const {parentId:_0x339b09,unitId:_0x419960,text:_0x5f52be,threadId:_0x82adbd}=_0xa173bc,_0xd4d1e2=(_0x20a6b1=(_0x2ca814=_0x5f52be[_0x5d729b(0x93)])==null?void 0x0:_0x2ca814[_0x5d729b(0x9c)](_0x619ef8=>_0x619ef8[_0x5d729b(0xbe)]===_0x517552[_0x5d729b(0xc8)])['map'](_0x96f5de=>_0x96f5de[_0x5d729b(0xd1)]))!=null?_0x20a6b1:[],_0x4695e9=JSON['stringify'](_0x5f52be),_0x231617=(await this[_0x5d729b(0xde)][_0x5d729b(0xa6)](_0x419960))[_0x5d729b(0xc0)]();if(_0x339b09){const _0x3dcf31={'memberId':_0x231617,'unitId':_0x419960,'content':_0x4695e9,'mention':_0xd4d1e2,'threadId':_0x82adbd},_0x1c7184=(await this[_0x5d729b(0x97)][_0x5d729b(0xa3)]('/universer-api/comment/unit/'+_0x419960+_0x5d729b(0xec),{'body':_0x3dcf31}))[_0x5d729b(0xa2)]['reply'];return{..._0xa173bc,'id':_0x1c7184[_0x5d729b(0xed)],'dT':_0x19b6e7(+_0x1c7184['createTimestamp'])[_0x5d729b(0xcb)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1c7184[_0x5d729b(0xac)]};}else{const _0x5895a0={'memberId':_0x231617,'unitId':_0x419960,'content':_0x4695e9,'mention':_0xd4d1e2},_0x57a9e2=await this[_0x5d729b(0x97)][_0x5d729b(0xa3)]('/universer-api/comment/unit/'+_0x419960+_0x5d729b(0xeb),{'body':_0x5895a0});return X(_0x57a9e2['body']['comment'],_0xa173bc);}}async[_0x5e519c(0xab)](_0x5ba388){const _0x146c7b=_0x5e519c;var _0x311480,_0x4049e4;const {text:_0x290947,unitId:_0x11be01}=_0x5ba388,_0x42fc8c=(_0x4049e4=(_0x311480=_0x290947[_0x146c7b(0x93)])==null?void 0x0:_0x311480['filter'](_0x4c81b6=>_0x4c81b6[_0x146c7b(0xbe)]===_0x517552[_0x146c7b(0xc8)])[_0x146c7b(0x96)](_0x491c81=>_0x491c81[_0x146c7b(0xd1)]))!=null?_0x4049e4:[],_0x38ccac=JSON['stringify'](_0x290947),_0x28705f=_0x5ba388[_0x146c7b(0xc9)],_0x7635d8=_0x5ba388['id'],_0x3dc1f1={'memberId':(await this[_0x146c7b(0xde)][_0x146c7b(0xa6)](_0x11be01))[_0x146c7b(0xc0)](),'unitId':_0x11be01,'threadId':_0x28705f,'mention':_0x42fc8c,'content':_0x38ccac,'replyId':_0x7635d8},_0x129bcf=await this[_0x146c7b(0x97)][_0x146c7b(0xa3)]('/universer-api/comment/unit/'+_0x11be01+_0x146c7b(0xcd),{'body':_0x3dc1f1});return!_0x129bcf[_0x146c7b(0xa2)][_0x146c7b(0xa4)]||_0x129bcf[_0x146c7b(0xa2)][_0x146c7b(0xa4)][_0x146c7b(0xd6)]===0x1;}async['resolveComment'](_0x55be80){const _0x92af12=_0x5e519c,{unitId:_0x1a91b1}=_0x55be80,_0x4e663e=_0x55be80[_0x92af12(0xc9)],_0x475f70={'memberId':this['_userService']['getCurrentUser']()[_0x92af12(0xe5)],'unitId':_0x1a91b1,'threadId':_0x4e663e,'solved':_0x55be80['resolved']?I[_0x92af12(0xa9)]:I[_0x92af12(0xda)]},_0x180eca=await this[_0x92af12(0x97)][_0x92af12(0xa3)]('/universer-api/comment/unit/'+_0x1a91b1+'/solved',{'body':_0x475f70});return!_0x180eca[_0x92af12(0xa2)]['error']||_0x180eca[_0x92af12(0xa2)][_0x92af12(0xa4)]['code']===0x1;}async[_0x5e519c(0x98)](_0x58645b,_0x4e7965,_0x17e333,_0x4f1b06){const _0x1ec86c=_0x5e519c,_0xa7fbde={'memberId':(await this[_0x1ec86c(0xde)][_0x1ec86c(0xa6)](_0x58645b))[_0x1ec86c(0xc0)](),'threadId':_0x17e333,'replyId':_0x4f1b06,'unitId':_0x58645b},_0x5d410c=await this[_0x1ec86c(0x97)][_0x1ec86c(0xa3)](_0x1ec86c(0xb9)+_0x58645b+'/delete',{'body':_0xa7fbde});return!_0x5d410c['body'][_0x1ec86c(0xa4)]||_0x5d410c[_0x1ec86c(0xa2)][_0x1ec86c(0xa4)][_0x1ec86c(0xd6)]===0x1;}async[_0x5e519c(0xd9)](_0x3feefd,_0x25d00d,_0x3cd881){const _0x55c250=_0x5e519c,_0x42cacf={'unitId':_0x3feefd,'threadId':_0x3cd881},_0x58bd70=await this[_0x55c250(0x97)][_0x55c250(0xa3)](_0x55c250(0xb9)+_0x3feefd+_0x55c250(0xb4),{'body':_0x42cacf}),_0x3159b5=_0x3cd881['map'](_0x3fee24=>ee(_0x58bd70['body'][_0x55c250(0xe7)][_0x3fee24],_0x3feefd,_0x25d00d))['filter'](Boolean);return Object[_0x55c250(0xa7)](_0x58bd70['body']['users'])[_0x55c250(0xdd)](_0x236fed=>{const _0x5bcb36=_0x55c250;this['_userService'][_0x5bcb36(0xd4)](_0x236fed);}),_0x3159b5;}[_0x5e519c(0xc5)](_0x442952){const _0x7578a2=_0x5e519c;return{'id':_0x442952['id'],'threadId':_0x442952[_0x7578a2(0xc9)],'ref':_0x442952[_0x7578a2(0xe8)]};}};f=Q([_(0x0,_0x1bd6b7(_0x52a4a2)),_(0x1,_0x1bd6b7(_0x3d615e)),_(0x2,_0x1bd6b7(_0x494f6f)),_(0x3,_0x1bd6b7(_0x1dfc40))],f);var re=Object[_0x5e519c(0x9d)],te=(_0x17877c,_0xcf2c87,_0x2e7c25,_0x54ff9e)=>{const _0x2d5414=_0x5e519c;for(var _0x4ac2c0=_0x54ff9e>0x1?void 0x0:_0x54ff9e?re(_0xcf2c87,_0x2e7c25):_0xcf2c87,_0x6292eb=_0x17877c[_0x2d5414(0xe3)]-0x1,_0x1f4304;_0x6292eb>=0x0;_0x6292eb--)(_0x1f4304=_0x17877c[_0x6292eb])&&(_0x4ac2c0=_0x1f4304(_0x4ac2c0)||_0x4ac2c0);return _0x4ac2c0;},N=(_0x5dc274,_0x153500)=>(_0x428cc3,_0x199ebd)=>_0x153500(_0x428cc3,_0x199ebd,_0x5dc274);let g=class extends _0x4dbd30{constructor(_0x2ff542,_0x37e7ba){const _0x4d4df0=_0x5e519c;super(),this[_0x4d4df0(0xaf)]=_0x2ff542,this[_0x4d4df0(0xe1)]=_0x37e7ba,this[_0x4d4df0(0xdb)]();}['_initDataSource'](){const _0x393965=_0x5e519c;this[_0x393965(0xaf)][_0x393965(0xe4)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x393965(0xcf)]=!0x1;}};g=te([N(0x0,_0x1e1893),N(0x1,_0x1bd6b7(f))],g);var se=Object['defineProperty'],oe=Object[_0x5e519c(0x9d)],ne=(_0x35ad40,_0x447367,_0x3dff44)=>_0x447367 in _0x35ad40?se(_0x35ad40,_0x447367,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3dff44}):_0x35ad40[_0x447367]=_0x3dff44,ie=(_0x5dff54,_0x3381e2,_0x1c99ce,_0x2503ae)=>{const _0x548b72=_0x5e519c;for(var _0x3b1f82=_0x2503ae>0x1?void 0x0:_0x2503ae?oe(_0x3381e2,_0x1c99ce):_0x3381e2,_0x4eb2=_0x5dff54[_0x548b72(0xe3)]-0x1,_0x4723f0;_0x4eb2>=0x0;_0x4eb2--)(_0x4723f0=_0x5dff54[_0x4eb2])&&(_0x3b1f82=_0x4723f0(_0x3b1f82)||_0x3b1f82);return _0x3b1f82;},w=(_0x58e0ee,_0x58a975)=>(_0x1623a2,_0x3e7078)=>_0x58a975(_0x1623a2,_0x3e7078,_0x58e0ee),$=(_0x41cd99,_0x2b58bb,_0x2e1e76)=>ne(_0x41cd99,typeof _0x2b58bb!='symbol'?_0x2b58bb+'':_0x2b58bb,_0x2e1e76);function _0x5ceb(_0x44b9cb,_0x5cec12){const _0x587803=_0x5878();return _0x5ceb=function(_0x5ceb85,_0x45c382){_0x5ceb85=_0x5ceb85-0x91;let _0x1f9fd2=_0x587803[_0x5ceb85];return _0x1f9fd2;},_0x5ceb(_0x44b9cb,_0x5cec12);}let b=class extends _0x41074e{constructor(_0x29bf7a=M,_0x2d535e,_0x27f7e0){const _0x2ea9fb=_0x5e519c;super(),this['_config']=_0x29bf7a,this[_0x2ea9fb(0xb3)]=_0x2d535e,this[_0x2ea9fb(0xbd)]=_0x27f7e0;const {..._0x3af099}=_0x59806d({},M,this[_0x2ea9fb(0x9b)]);this[_0x2ea9fb(0xbd)]['setConfig'](z,_0x3af099);}[_0x5e519c(0xb7)](){const _0x207c21=_0x5e519c;[[f],[g],[S]][_0x207c21(0xdd)](_0x342c0c=>{const _0x2e5340=_0x207c21;this[_0x2e5340(0xb3)]['add'](_0x342c0c);});}['onReady'](){const _0x4cafb7=_0x5e519c;this[_0x4cafb7(0xb3)][_0x4cafb7(0xee)](g),this[_0x4cafb7(0xb3)][_0x4cafb7(0xee)](S);}};$(b,_0x5e519c(0xe0),W),$(b,_0x5e519c(0x99),_0x5c3a2a['UNIVER_UNKNOWN']),b=ie([_0x2aafae(_0x31b480,_0x297c90,_0x24c725),w(0x1,_0x1bd6b7(_0x1dfc40)),w(0x2,_0x4ccfd1)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x2cc8a6=_0x1055;(function(_0x5b8c71,_0x2628e5){const _0x751248=_0x1055,_0x53f661=_0x5b8c71();while(!![]){try{const _0x38a1bf=-parseInt(_0x751248(0x1bf))/0x1+parseInt(_0x751248(0x1d6))/0x2*(-parseInt(_0x751248(0x1bb))/0x3)+parseInt(_0x751248(0x1bc))/0x4+-parseInt(_0x751248(0x1db))/0x5+parseInt(_0x751248(0x1a0))/0x6*(-parseInt(_0x751248(0x1d3))/0x7)+-parseInt(_0x751248(0x1b9))/0x8*(parseInt(_0x751248(0x1f0))/0x9)+parseInt(_0x751248(0x1b1))/0xa*(parseInt(_0x751248(0x1a1))/0xb);if(_0x38a1bf===_0x2628e5)break;else _0x53f661['push'](_0x53f661['shift']());}catch(_0x5e43ed){_0x53f661['push'](_0x53f661['shift']());}}}(_0x5b60,0x211cb));import{CommentService as _0x74c6c3,CollaborationSessionService as _0x48974a,UniverCollaborationClientPlugin as _0x5cf774}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x26eb12}from'@univerjs-pro/license';import{dayjs as _0x3e9fc4,UserManagerService as _0x196045,Inject as _0x508d76,Injector as _0x54331d,Disposable as _0x4cf6d8,CustomRangeType as _0x3f5e23,UniverInstanceType as _0x22d94a,DependentOn as _0x37d3da,IConfigService as _0x6fd7ab,Plugin as _0x173940,merge as _0x422e60}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4388c4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1b41e9,IThreadCommentDataSourceService as _0xa3bc21}from'@univerjs/thread-comment';import{bufferTime as _0x5a99f1}from'rxjs';import{HTTPService as _0x3d2d95}from'@univerjs/network';const W=_0x2cc8a6(0x1aa);var I=(_0x27d71c=>(_0x27d71c[_0x27d71c[_0x2cc8a6(0x1d5)]=0x0]=_0x2cc8a6(0x1d5),_0x27d71c[_0x27d71c[_0x2cc8a6(0x1eb)]=0x1]=_0x2cc8a6(0x1eb),_0x27d71c[_0x27d71c['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x27d71c))(I||{}),v=(_0x366c39=>(_0x366c39[_0x366c39[_0x2cc8a6(0x1e9)]=0x0]='Unknown',_0x366c39[_0x366c39[_0x2cc8a6(0x1c3)]=0x1]='Add',_0x366c39[_0x366c39[_0x2cc8a6(0x1ad)]=0x2]=_0x2cc8a6(0x1ad),_0x366c39[_0x366c39[_0x2cc8a6(0x1ef)]=0x3]='Edit',_0x366c39[_0x366c39['Delete']=0x4]='Delete',_0x366c39[_0x366c39[_0x2cc8a6(0x1b0)]=0x5]=_0x2cc8a6(0x1b0),_0x366c39[_0x366c39[_0x2cc8a6(0x1da)]=-0x1]='UNRECOGNIZED',_0x366c39))(v||{});const D=_0x31337d=>_0x3e9fc4(new Date(+_0x31337d))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x4e0a83,_0x50f89f)=>{const _0xf43e6e=_0x2cc8a6,_0x133bb6=_0x4e0a83[_0xf43e6e(0x1e5)](_0x196045),_0x126725=_0x4e0a83[_0xf43e6e(0x1e5)](_0x3d2d95);_0x50f89f[_0xf43e6e(0x1e7)](_0x24483f=>{const _0x668824=_0xf43e6e;_0x133bb6[_0x668824(0x19e)](_0x24483f)&&_0x50f89f[_0x668824(0x1c1)](_0x24483f);}),_0x50f89f[_0xf43e6e(0x1ee)]&&(await _0x126725['get'](_0xf43e6e(0x1cf),{'params':{'userIDs':[..._0x50f89f]}}))[_0xf43e6e(0x1d4)]['users'][_0xf43e6e(0x1e7)](_0x5eaeb7=>{const _0x5a7dfe=_0xf43e6e;_0x5eaeb7&&_0x133bb6[_0x5a7dfe(0x1a2)](_0x5eaeb7);});};var K=Object[_0x2cc8a6(0x1fa)],V=(_0x341f89,_0x5e988f,_0x1d6e9e,_0x574205)=>{for(var _0x1ae094=_0x574205>0x1?void 0x0:_0x574205?K(_0x5e988f,_0x1d6e9e):_0x5e988f,_0x104601=_0x341f89['length']-0x1,_0x273303;_0x104601>=0x0;_0x104601--)(_0x273303=_0x341f89[_0x104601])&&(_0x1ae094=_0x273303(_0x1ae094)||_0x1ae094);return _0x1ae094;},p=(_0x31f48a,_0x167e6c)=>(_0x1f6941,_0x4caff9)=>_0x167e6c(_0x1f6941,_0x4caff9,_0x31f48a);function _0x5b60(){const _0x55a7e6=['error','threadId','/edit','/universer-api/user/list','createTimestamp','slice','users','43085BfYcxO','body','OpenOrReOpen','96166dxVwVG','deleteComment','COMMENT','find','UNRECOGNIZED','529310gCeyTH','map','_injector','/list','post','/universer-api/comment/unit/','_threadCommentDataSource','stringify','add','Delete','get','filter','forEach','/solved','Unknown','unitId','Solved','disposeWithMe','subscribe','size','Edit','783kQyDdT','getUnit','customRanges','rangeId','symbol','_initUserSync','rangeType','content','personId','comment','getOwnPropertyDescriptor','code','_sessionService','/add','listComments','_init','addComment','getUser','replies','144CWLwzP','642378JgbtwO','addUser','_httpService','userID','_config','replyId','solved','parentId','comments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getComment','parse','Reply','_commentService','resolved','Solve','110OtIegn','type','saveCommentToSnapshot','pipe','_configService','updateComment','getMemberID','onStarting','23672BgeZbM','_threadCommentDataSourceService','3aCvdgq','777076CVlYQv','_userService','_threadCommentModel','141922aItzIx','user','delete','/delete','Add','length','_initDataSource','userId','values','root','commentUpdate$','requireSession','reply'];_0x5b60=function(){return _0x55a7e6;};return _0x5b60();}let S=class extends _0x4cf6d8{constructor(_0x91d85d,_0x59cc94,_0x322416,_0x5d7ec4){const _0x164134=_0x2cc8a6;super(),this[_0x164134(0x1ae)]=_0x91d85d,this['_threadCommentModel']=_0x59cc94,this['_userService']=_0x322416,this[_0x164134(0x1dd)]=_0x5d7ec4,this['_init'](),this[_0x164134(0x1f5)]();}[_0x2cc8a6(0x1f5)](){const _0x347c0f=_0x2cc8a6;this['disposeWithMe'](this[_0x347c0f(0x1be)][_0x347c0f(0x1c9)][_0x347c0f(0x1b4)](_0x5a99f1(0x10))['subscribe'](_0x3cf785=>{const _0x1da555=new Set();_0x3cf785['forEach'](_0xc69bb3=>{const _0x391e3d=_0x1055;switch(_0xc69bb3[_0x391e3d(0x1b2)]){case _0x391e3d(0x1e3):{const _0x5f3472=_0xc69bb3['payload'][_0x391e3d(0x1f8)];_0x1da555[_0x391e3d(0x1e3)](_0x5f3472);break;}}}),B(this['_injector'],_0x1da555);}));}[_0x2cc8a6(0x19c)](){const _0x529c7c=_0x2cc8a6;this[_0x529c7c(0x1ec)](this[_0x529c7c(0x1ae)]['commentUpdate$'][_0x529c7c(0x1ed)](async _0x1a1cc2=>{const _0x1282cb=_0x529c7c;var _0x3eb973,_0x34964c,_0x534ef4,_0x33fe5e;const _0x4eb6f1=(_0x3eb973=this[_0x1282cb(0x1be)][_0x1282cb(0x1f1)](_0x1a1cc2[_0x1282cb(0x1ea)])[_0x1282cb(0x1d9)](_0x55054f=>_0x55054f[_0x1282cb(0x1cd)]===_0x1a1cc2['threadId']))==null?void 0x0:_0x3eb973[_0x1282cb(0x1c8)];if(!_0x4eb6f1)return;const {unitId:_0x360a76,subUnitId:_0x4bded6}=_0x4eb6f1;switch(_0x1a1cc2['user']&&this[_0x1282cb(0x1bd)][_0x1282cb(0x1a2)](_0x1a1cc2[_0x1282cb(0x1c0)]),_0x1a1cc2[_0x1282cb(0x1b2)]){case v[_0x1282cb(0x1c3)]:break;case v[_0x1282cb(0x1ad)]:{this[_0x1282cb(0x1be)][_0x1282cb(0x19d)](_0x360a76,_0x4bded6,{'unitId':_0x360a76,'subUnitId':_0x4bded6,'ref':'','id':_0x1a1cc2[_0x1282cb(0x1a6)],'dT':D(+_0x1a1cc2['createTimestamp']),'threadId':_0x1a1cc2[_0x1282cb(0x1cd)],'personId':(_0x534ef4=(_0x34964c=_0x1a1cc2[_0x1282cb(0x1c0)])==null?void 0x0:_0x34964c['userID'])!=null?_0x534ef4:_0x1a1cc2[_0x1282cb(0x1c6)],'text':JSON[_0x1282cb(0x1ac)](_0x1a1cc2[_0x1282cb(0x1f7)]),'parentId':_0x4eb6f1['id']});break;}case v[_0x1282cb(0x1e4)]:{const _0x14a0a5=this[_0x1282cb(0x1be)][_0x1282cb(0x1ab)](_0x360a76,_0x4bded6,_0x1a1cc2[_0x1282cb(0x1a6)]);_0x14a0a5&&_0x14a0a5[_0x1282cb(0x1a8)]&&this[_0x1282cb(0x1be)][_0x1282cb(0x1d7)](_0x360a76,_0x4bded6,_0x1a1cc2['replyId']);break;}case v['Edit']:{this[_0x1282cb(0x1be)][_0x1282cb(0x1b6)](_0x360a76,_0x4bded6,{'commentId':_0x1a1cc2['replyId'],'text':JSON['parse'](_0x1a1cc2['content'])});break;}case v[_0x1282cb(0x1b0)]:{const _0xdb3e69=(_0x33fe5e=this['_threadCommentModel'][_0x1282cb(0x1f1)](_0x1a1cc2[_0x1282cb(0x1ea)])['find'](_0x4d00ef=>_0x4d00ef[_0x1282cb(0x1cd)]===_0x1a1cc2[_0x1282cb(0x1cd)]))==null?void 0x0:_0x33fe5e[_0x1282cb(0x1c8)];_0xdb3e69&&this[_0x1282cb(0x1be)]['resolveComment'](_0x360a76,_0x4bded6,_0xdb3e69['id'],_0x1a1cc2[_0x1282cb(0x1a7)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x508d76(_0x74c6c3)),p(0x1,_0x508d76(_0x1b41e9)),p(0x2,_0x508d76(_0x196045)),p(0x3,_0x508d76(_0x54331d))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x47c3bd,_0x3693ef,_0x449b11,_0xc171e4)=>{const _0x4bf66a=_0x2cc8a6;for(var _0x2cf6bf=_0xc171e4>0x1?void 0x0:_0xc171e4?k(_0x3693ef,_0x449b11):_0x3693ef,_0x4e9866=_0x47c3bd[_0x4bf66a(0x1c4)]-0x1,_0x7833b6;_0x4e9866>=0x0;_0x4e9866--)(_0x7833b6=_0x47c3bd[_0x4e9866])&&(_0x2cf6bf=_0x7833b6(_0x2cf6bf)||_0x2cf6bf);return _0x2cf6bf;},_=(_0x381e6d,_0x1c8501)=>(_0x3520aa,_0x5b426d)=>_0x1c8501(_0x3520aa,_0x5b426d,_0x381e6d);function X(_0x40bc8c,_0xb32cf1){const _0x451a23=_0x2cc8a6,_0x487652=_0x40bc8c[_0x451a23(0x19f)][0x0];return{..._0xb32cf1,'id':_0x487652[_0x451a23(0x1a6)],'resolved':_0x40bc8c['solved']===0x1,'dT':D(_0x487652['createTimestamp']),'personId':_0x487652[_0x451a23(0x1c6)],'threadId':_0x487652[_0x451a23(0x1cd)]};}function ee(_0x2d7b2e,_0x114984,_0x4e2d25){const _0x386e95=_0x2cc8a6;var _0x48bd19,_0x2ccb25;if(((_0x2ccb25=(_0x48bd19=_0x2d7b2e==null?void 0x0:_0x2d7b2e['replies'])==null?void 0x0:_0x48bd19[_0x386e95(0x1c4)])!=null?_0x2ccb25:0x0)>0x0){const _0x4aa96f=(_0x4bba49,_0x4f7bcc)=>({'id':_0x4bba49[_0x386e95(0x1a6)],'threadId':_0x4bba49[_0x386e95(0x1cd)],'dT':D(_0x4bba49[_0x386e95(0x1d0)]),'personId':_0x4bba49[_0x386e95(0x1c6)],'resolved':_0x2d7b2e['solved']===I[_0x386e95(0x1eb)],'unitId':_0x114984,'subUnitId':_0x4e2d25,'text':JSON[_0x386e95(0x1ac)](_0x4bba49[_0x386e95(0x1f7)]),'parentId':_0x4f7bcc}),_0x3d9af9=_0x4aa96f(_0x2d7b2e['replies'][0x0]);return{..._0x3d9af9,'children':_0x2d7b2e[_0x386e95(0x19f)][_0x386e95(0x1d1)](0x1)['map'](_0x3f40c7=>_0x4aa96f(_0x3f40c7,_0x3d9af9['id']))};}return null;}let f=class{constructor(_0x3283c2,_0x2aaf8d,_0xd160ac,_0x2330c4){const _0x120c9e=_0x2cc8a6;this[_0x120c9e(0x1a3)]=_0x3283c2,this['_userService']=_0x2aaf8d,this['_sessionService']=_0xd160ac,this[_0x120c9e(0x1dd)]=_0x2330c4;}async[_0x2cc8a6(0x19d)](_0x26e7a9){const _0x5a7ea5=_0x2cc8a6;var _0x546a69,_0x15f3aa;const {parentId:_0x454460,unitId:_0x3a945d,text:_0x419298,threadId:_0x4827c1}=_0x26e7a9,_0x31158c=(_0x15f3aa=(_0x546a69=_0x419298['customRanges'])==null?void 0x0:_0x546a69['filter'](_0x3a5040=>_0x3a5040[_0x5a7ea5(0x1f6)]===_0x3f5e23[_0x5a7ea5(0x1d8)])[_0x5a7ea5(0x1dc)](_0x32c1af=>_0x32c1af[_0x5a7ea5(0x1f3)]))!=null?_0x15f3aa:[],_0x18efbc=JSON[_0x5a7ea5(0x1e2)](_0x419298),_0x33ac2b=(await this[_0x5a7ea5(0x1fc)][_0x5a7ea5(0x1ca)](_0x3a945d))[_0x5a7ea5(0x1b7)]();if(_0x454460){const _0x52f831={'memberId':_0x33ac2b,'unitId':_0x3a945d,'content':_0x18efbc,'mention':_0x31158c,'threadId':_0x4827c1},_0x559380=(await this[_0x5a7ea5(0x1a3)][_0x5a7ea5(0x1df)]('/universer-api/comment/unit/'+_0x3a945d+'/reply',{'body':_0x52f831}))[_0x5a7ea5(0x1d4)][_0x5a7ea5(0x1cb)];return{..._0x26e7a9,'id':_0x559380[_0x5a7ea5(0x1a6)],'dT':_0x3e9fc4(+_0x559380[_0x5a7ea5(0x1d0)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x559380[_0x5a7ea5(0x1c6)]};}else{const _0x34da07={'memberId':_0x33ac2b,'unitId':_0x3a945d,'content':_0x18efbc,'mention':_0x31158c},_0x35aa30=await this[_0x5a7ea5(0x1a3)][_0x5a7ea5(0x1df)]('/universer-api/comment/unit/'+_0x3a945d+_0x5a7ea5(0x1fd),{'body':_0x34da07});return X(_0x35aa30[_0x5a7ea5(0x1d4)][_0x5a7ea5(0x1f9)],_0x26e7a9);}}async['updateComment'](_0x416c67){const _0x5d810b=_0x2cc8a6;var _0x5e5eb8,_0x1202f1;const {text:_0x43bb2f,unitId:_0x4976c8}=_0x416c67,_0x5c686c=(_0x1202f1=(_0x5e5eb8=_0x43bb2f[_0x5d810b(0x1f2)])==null?void 0x0:_0x5e5eb8[_0x5d810b(0x1e6)](_0x56340f=>_0x56340f[_0x5d810b(0x1f6)]===_0x3f5e23['COMMENT'])[_0x5d810b(0x1dc)](_0x4ff117=>_0x4ff117[_0x5d810b(0x1f3)]))!=null?_0x1202f1:[],_0x634c5d=JSON[_0x5d810b(0x1e2)](_0x43bb2f),_0x3db1cb=_0x416c67['threadId'],_0x5994e1=_0x416c67['id'],_0x274f6a={'memberId':(await this[_0x5d810b(0x1fc)][_0x5d810b(0x1ca)](_0x4976c8))['getMemberID'](),'unitId':_0x4976c8,'threadId':_0x3db1cb,'mention':_0x5c686c,'content':_0x634c5d,'replyId':_0x5994e1},_0x16110a=await this[_0x5d810b(0x1a3)][_0x5d810b(0x1df)]('/universer-api/comment/unit/'+_0x4976c8+_0x5d810b(0x1ce),{'body':_0x274f6a});return!_0x16110a[_0x5d810b(0x1d4)][_0x5d810b(0x1cc)]||_0x16110a['body'][_0x5d810b(0x1cc)]['code']===0x1;}async['resolveComment'](_0x569f01){const _0x2c6c05=_0x2cc8a6,{unitId:_0x13004c}=_0x569f01,_0x2e855d=_0x569f01[_0x2c6c05(0x1cd)],_0x199af3={'memberId':this[_0x2c6c05(0x1bd)]['getCurrentUser']()[_0x2c6c05(0x1a4)],'unitId':_0x13004c,'threadId':_0x2e855d,'solved':_0x569f01[_0x2c6c05(0x1af)]?I[_0x2c6c05(0x1eb)]:I['OpenOrReOpen']},_0x27cebc=await this[_0x2c6c05(0x1a3)][_0x2c6c05(0x1df)](_0x2c6c05(0x1e0)+_0x13004c+_0x2c6c05(0x1e8),{'body':_0x199af3});return!_0x27cebc[_0x2c6c05(0x1d4)][_0x2c6c05(0x1cc)]||_0x27cebc[_0x2c6c05(0x1d4)]['error'][_0x2c6c05(0x1fb)]===0x1;}async['deleteComment'](_0x172133,_0x276567,_0x5945f5,_0x384546){const _0x271eee=_0x2cc8a6,_0x1a29f2={'memberId':(await this[_0x271eee(0x1fc)][_0x271eee(0x1ca)](_0x172133))[_0x271eee(0x1b7)](),'threadId':_0x5945f5,'replyId':_0x384546,'unitId':_0x172133},_0x4e0af9=await this[_0x271eee(0x1a3)][_0x271eee(0x1df)]('/universer-api/comment/unit/'+_0x172133+_0x271eee(0x1c2),{'body':_0x1a29f2});return!_0x4e0af9['body'][_0x271eee(0x1cc)]||_0x4e0af9[_0x271eee(0x1d4)][_0x271eee(0x1cc)][_0x271eee(0x1fb)]===0x1;}async[_0x2cc8a6(0x19b)](_0x55e253,_0x56397a,_0x5a4b68){const _0x397508=_0x2cc8a6,_0x21666f={'unitId':_0x55e253,'threadId':_0x5a4b68},_0x57ab13=await this[_0x397508(0x1a3)]['post'](_0x397508(0x1e0)+_0x55e253+_0x397508(0x1de),{'body':_0x21666f}),_0xdf5013=_0x5a4b68['map'](_0x294766=>ee(_0x57ab13[_0x397508(0x1d4)][_0x397508(0x1a9)][_0x294766],_0x55e253,_0x56397a))[_0x397508(0x1e6)](Boolean);return Object[_0x397508(0x1c7)](_0x57ab13[_0x397508(0x1d4)][_0x397508(0x1d2)])[_0x397508(0x1e7)](_0x3b3a7d=>{const _0x5ae66f=_0x397508;this[_0x5ae66f(0x1bd)][_0x5ae66f(0x1a2)](_0x3b3a7d);}),_0xdf5013;}[_0x2cc8a6(0x1b3)](_0xfc9ce7){const _0x1e0306=_0x2cc8a6;return{'id':_0xfc9ce7['id'],'threadId':_0xfc9ce7[_0x1e0306(0x1cd)],'ref':_0xfc9ce7['ref']};}};f=Q([_(0x0,_0x508d76(_0x3d2d95)),_(0x1,_0x508d76(_0x196045)),_(0x2,_0x508d76(_0x48974a)),_(0x3,_0x508d76(_0x54331d))],f);var re=Object[_0x2cc8a6(0x1fa)],te=(_0x477f8e,_0x41e07b,_0x21938f,_0x487709)=>{const _0x57feed=_0x2cc8a6;for(var _0x496bda=_0x487709>0x1?void 0x0:_0x487709?re(_0x41e07b,_0x21938f):_0x41e07b,_0x53da12=_0x477f8e[_0x57feed(0x1c4)]-0x1,_0x164b4e;_0x53da12>=0x0;_0x53da12--)(_0x164b4e=_0x477f8e[_0x53da12])&&(_0x496bda=_0x164b4e(_0x496bda)||_0x496bda);return _0x496bda;},N=(_0x2d904a,_0xcbabe2)=>(_0x3282e8,_0x46583e)=>_0xcbabe2(_0x3282e8,_0x46583e,_0x2d904a);let g=class extends _0x4cf6d8{constructor(_0x15ca97,_0x48a214){const _0x2d6572=_0x2cc8a6;super(),this['_threadCommentDataSourceService']=_0x15ca97,this[_0x2d6572(0x1e1)]=_0x48a214,this[_0x2d6572(0x1c5)]();}[_0x2cc8a6(0x1c5)](){const _0xd6efc1=_0x2cc8a6;this[_0xd6efc1(0x1ba)]['dataSource']=this['_threadCommentDataSource'],this[_0xd6efc1(0x1ba)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0xa3bc21),N(0x1,_0x508d76(f))],g);var se=Object['defineProperty'],oe=Object[_0x2cc8a6(0x1fa)],ne=(_0x56a402,_0x2e3a15,_0x4fa52d)=>_0x2e3a15 in _0x56a402?se(_0x56a402,_0x2e3a15,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4fa52d}):_0x56a402[_0x2e3a15]=_0x4fa52d,ie=(_0x212195,_0x338356,_0x23dee3,_0x38b712)=>{for(var _0x49df31=_0x38b712>0x1?void 0x0:_0x38b712?oe(_0x338356,_0x23dee3):_0x338356,_0x5a6128=_0x212195['length']-0x1,_0x3211bb;_0x5a6128>=0x0;_0x5a6128--)(_0x3211bb=_0x212195[_0x5a6128])&&(_0x49df31=_0x3211bb(_0x49df31)||_0x49df31);return _0x49df31;},w=(_0x1cf2e9,_0x7e46e3)=>(_0x205031,_0x477d12)=>_0x7e46e3(_0x205031,_0x477d12,_0x1cf2e9),$=(_0xa16efd,_0x4c7be5,_0x6d4b36)=>ne(_0xa16efd,typeof _0x4c7be5!=_0x2cc8a6(0x1f4)?_0x4c7be5+'':_0x4c7be5,_0x6d4b36);let b=class extends _0x173940{constructor(_0x311ece=M,_0xa5aef7,_0x260226){const _0x2a2c74=_0x2cc8a6;super(),this[_0x2a2c74(0x1a5)]=_0x311ece,this['_injector']=_0xa5aef7,this[_0x2a2c74(0x1b5)]=_0x260226;const {..._0x33eb49}=_0x422e60({},M,this[_0x2a2c74(0x1a5)]);this[_0x2a2c74(0x1b5)]['setConfig'](z,_0x33eb49);}[_0x2cc8a6(0x1b8)](){const _0x3d45f4=_0x2cc8a6;[[f],[g],[S]][_0x3d45f4(0x1e7)](_0x220941=>{const _0x183db6=_0x3d45f4;this[_0x183db6(0x1dd)][_0x183db6(0x1e3)](_0x220941);});}['onReady'](){const _0x47dae5=_0x2cc8a6;this[_0x47dae5(0x1dd)][_0x47dae5(0x1e5)](g),this[_0x47dae5(0x1dd)][_0x47dae5(0x1e5)](S);}};$(b,'pluginName',W),$(b,'type',_0x22d94a['UNIVER_UNKNOWN']),b=ie([_0x37d3da(_0x4388c4,_0x5cf774,_0x26eb12),w(0x1,_0x508d76(_0x54331d)),w(0x2,_0x6fd7ab)],b);function _0x1055(_0x46ac91,_0x399605){const _0x5b605e=_0x5b60();return _0x1055=function(_0x1055aa,_0x2dbf99){_0x1055aa=_0x1055aa-0x19b;let _0x3145ce=_0x5b605e[_0x1055aa];return _0x3145ce;},_0x1055(_0x46ac91,_0x399605);}export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x5e519c=_0x5ceb;(function(_0x123488,_0x434d91){const _0x3fc728=_0x5ceb,_0x5acb2d=_0x123488();while(!![]){try{const _0x2f4881=parseInt(_0x3fc728(0xbc))/0x1*(parseInt(_0x3fc728(0xdf))/0x2)+-parseInt(_0x3fc728(0xae))/0x3+parseInt(_0x3fc728(0x9a))/0x4*(parseInt(_0x3fc728(0xd3))/0x5)+parseInt(_0x3fc728(0xcc))/0x6+-parseInt(_0x3fc728(0xca))/0x7+parseInt(_0x3fc728(0x9e))/0x8*(-parseInt(_0x3fc728(0xd2))/0x9)+-parseInt(_0x3fc728(0xa0))/0xa*(parseInt(_0x3fc728(0xe6))/0xb);if(_0x2f4881===_0x434d91)break;else _0x5acb2d['push'](_0x5acb2d['shift']());}catch(_0x3fc1ce){_0x5acb2d['push'](_0x5acb2d['shift']());}}}(_0x5878,0xbea9b));import{CommentService as _0x12d00b,CollaborationSessionService as _0x494f6f,UniverCollaborationClientPlugin as _0x297c90}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x24c725}from'@univerjs-pro/license';import{dayjs as _0x19b6e7,UserManagerService as _0x3d615e,Inject as _0x1bd6b7,Injector as _0x1dfc40,Disposable as _0x4dbd30,CustomRangeType as _0x517552,UniverInstanceType as _0x5c3a2a,DependentOn as _0x2aafae,IConfigService as _0x4ccfd1,Plugin as _0x41074e,merge as _0x59806d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x31b480}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2d9488,IThreadCommentDataSourceService as _0x1e1893}from'@univerjs/thread-comment';import{bufferTime as _0x522b81}from'rxjs';import{HTTPService as _0x52a4a2}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x395eb1=>(_0x395eb1[_0x395eb1[_0x5e519c(0xda)]=0x0]=_0x5e519c(0xda),_0x395eb1[_0x395eb1[_0x5e519c(0xa9)]=0x1]=_0x5e519c(0xa9),_0x395eb1[_0x395eb1['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x395eb1))(I||{}),v=(_0x3d9ea7=>(_0x3d9ea7[_0x3d9ea7['Unknown']=0x0]=_0x5e519c(0xb5),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0xd8)]=0x1]=_0x5e519c(0xd8),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0xdc)]=0x2]=_0x5e519c(0xdc),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0x91)]=0x3]=_0x5e519c(0x91),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0xc4)]=0x4]=_0x5e519c(0xc4),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0xef)]=0x5]=_0x5e519c(0xef),_0x3d9ea7[_0x3d9ea7[_0x5e519c(0xc7)]=-0x1]=_0x5e519c(0xc7),_0x3d9ea7))(v||{});const D=_0x268478=>_0x19b6e7(new Date(+_0x268478))[_0x5e519c(0xcb)](_0x5e519c(0xbb)),B=async(_0x262fad,_0x353302)=>{const _0x1b6b6c=_0x5e519c,_0x4f46b8=_0x262fad[_0x1b6b6c(0xee)](_0x3d615e),_0x152324=_0x262fad[_0x1b6b6c(0xee)](_0x52a4a2);_0x353302[_0x1b6b6c(0xdd)](_0x526851=>{const _0x329486=_0x1b6b6c;_0x4f46b8[_0x329486(0xa5)](_0x526851)&&_0x353302[_0x329486(0xd0)](_0x526851);}),_0x353302['size']&&(await _0x152324[_0x1b6b6c(0xee)]('/universer-api/user/list',{'params':{'userIDs':[..._0x353302]}}))[_0x1b6b6c(0xa2)][_0x1b6b6c(0xc3)][_0x1b6b6c(0xdd)](_0x42ce50=>{const _0x59dfa1=_0x1b6b6c;_0x42ce50&&_0x4f46b8[_0x59dfa1(0xd4)](_0x42ce50);});};function _0x5878(){const _0x50530a=['Reply','forEach','_sessionService','2bmXCRB','pluginName','_threadCommentDataSource','_commentService','length','dataSource','userID','11ISIPwp','comments','ref','root','parentId','/add','/reply','replyId','get','Solve','Edit','unitId','customRanges','createTimestamp','user','map','_httpService','deleteComment','type','78004utSuZr','_config','filter','getOwnPropertyDescriptor','156568aIboBl','getUnit','4452870KExamF','solved','body','post','error','getUser','requireSession','values','pipe','Solved','_init','updateComment','userId','disposeWithMe','1960779gVlxGF','_threadCommentDataSourceService','find','_threadCommentModel','resolveComment','_injector','/list','Unknown','addComment','onStarting','payload','/universer-api/comment/unit/','_initUserSync','YYYY/MM/DD\x20HH:mm','1387055JDQbjc','_configService','rangeType','_userService','getMemberID','replies','add','users','Delete','saveCommentToSnapshot','subscribe','UNRECOGNIZED','COMMENT','threadId','2179807aUEToF','format','6001866xgiKbL','/edit','personId','syncUpdateMutationToColla','delete','rangeId','144wYzrYA','30FYEQzq','addUser','commentUpdate$','code','parse','Add','listComments','OpenOrReOpen','_initDataSource'];_0x5878=function(){return _0x50530a;};return _0x5878();}var K=Object[_0x5e519c(0x9d)],V=(_0x1a6862,_0x55ac9c,_0x3d26a5,_0x236beb)=>{const _0x269ff4=_0x5e519c;for(var _0x34b007=_0x236beb>0x1?void 0x0:_0x236beb?K(_0x55ac9c,_0x3d26a5):_0x55ac9c,_0x2adf79=_0x1a6862[_0x269ff4(0xe3)]-0x1,_0x243102;_0x2adf79>=0x0;_0x2adf79--)(_0x243102=_0x1a6862[_0x2adf79])&&(_0x34b007=_0x243102(_0x34b007)||_0x34b007);return _0x34b007;},p=(_0x24b02c,_0x28b848)=>(_0x36079c,_0x3dcd39)=>_0x28b848(_0x36079c,_0x3dcd39,_0x24b02c);let S=class extends _0x4dbd30{constructor(_0x41aebb,_0x4ca893,_0x36868a,_0x54160a){const _0x51dcbf=_0x5e519c;super(),this['_commentService']=_0x41aebb,this[_0x51dcbf(0xb1)]=_0x4ca893,this['_userService']=_0x36868a,this[_0x51dcbf(0xb3)]=_0x54160a,this[_0x51dcbf(0xaa)](),this[_0x51dcbf(0xba)]();}[_0x5e519c(0xba)](){const _0x726858=_0x5e519c;this[_0x726858(0xad)](this['_threadCommentModel']['commentUpdate$'][_0x726858(0xa8)](_0x522b81(0x10))[_0x726858(0xc6)](_0x333991=>{const _0x39515e=_0x726858,_0x2d1b88=new Set();_0x333991[_0x39515e(0xdd)](_0x454762=>{const _0x17df64=_0x39515e;switch(_0x454762[_0x17df64(0x99)]){case _0x17df64(0xc2):{const _0x3ac24f=_0x454762[_0x17df64(0xb8)][_0x17df64(0xce)];_0x2d1b88[_0x17df64(0xc2)](_0x3ac24f);break;}}}),B(this['_injector'],_0x2d1b88);}));}[_0x5e519c(0xaa)](){const _0x23622b=_0x5e519c;this[_0x23622b(0xad)](this[_0x23622b(0xe2)][_0x23622b(0xd5)][_0x23622b(0xc6)](async _0x3a21ba=>{const _0x3a6884=_0x23622b;var _0x2c23de,_0xeb45f8,_0x323a45,_0xd1ce65;const _0x5db5c9=(_0x2c23de=this[_0x3a6884(0xb1)][_0x3a6884(0x9f)](_0x3a21ba['unitId'])['find'](_0x8a7d8=>_0x8a7d8[_0x3a6884(0xc9)]===_0x3a21ba[_0x3a6884(0xc9)]))==null?void 0x0:_0x2c23de['root'];if(!_0x5db5c9)return;const {unitId:_0x5b93ed,subUnitId:_0x594da2}=_0x5db5c9;switch(_0x3a21ba['user']&&this[_0x3a6884(0xbf)][_0x3a6884(0xd4)](_0x3a21ba['user']),_0x3a21ba[_0x3a6884(0x99)]){case v['Add']:break;case v[_0x3a6884(0xdc)]:{this[_0x3a6884(0xb1)]['addComment'](_0x5b93ed,_0x594da2,{'unitId':_0x5b93ed,'subUnitId':_0x594da2,'ref':'','id':_0x3a21ba[_0x3a6884(0xed)],'dT':D(+_0x3a21ba[_0x3a6884(0x94)]),'threadId':_0x3a21ba['threadId'],'personId':(_0x323a45=(_0xeb45f8=_0x3a21ba[_0x3a6884(0x95)])==null?void 0x0:_0xeb45f8[_0x3a6884(0xe5)])!=null?_0x323a45:_0x3a21ba[_0x3a6884(0xac)],'text':JSON[_0x3a6884(0xd7)](_0x3a21ba['content']),'parentId':_0x5db5c9['id']});break;}case v['Delete']:{const _0x33f369=this[_0x3a6884(0xb1)]['getComment'](_0x5b93ed,_0x594da2,_0x3a21ba[_0x3a6884(0xed)]);_0x33f369&&_0x33f369[_0x3a6884(0xea)]&&this['_threadCommentModel']['deleteComment'](_0x5b93ed,_0x594da2,_0x3a21ba['replyId']);break;}case v['Edit']:{this[_0x3a6884(0xb1)]['updateComment'](_0x5b93ed,_0x594da2,{'commentId':_0x3a21ba[_0x3a6884(0xed)],'text':JSON[_0x3a6884(0xd7)](_0x3a21ba['content'])});break;}case v[_0x3a6884(0xef)]:{const _0x28a6ae=(_0xd1ce65=this[_0x3a6884(0xb1)][_0x3a6884(0x9f)](_0x3a21ba[_0x3a6884(0x92)])[_0x3a6884(0xb0)](_0x485aec=>_0x485aec[_0x3a6884(0xc9)]===_0x3a21ba[_0x3a6884(0xc9)]))==null?void 0x0:_0xd1ce65[_0x3a6884(0xe9)];_0x28a6ae&&this[_0x3a6884(0xb1)][_0x3a6884(0xb2)](_0x5b93ed,_0x594da2,_0x28a6ae['id'],_0x3a21ba['solved']===I[_0x3a6884(0xa9)]);break;}}}));}};S=V([p(0x0,_0x1bd6b7(_0x12d00b)),p(0x1,_0x1bd6b7(_0x2d9488)),p(0x2,_0x1bd6b7(_0x3d615e)),p(0x3,_0x1bd6b7(_0x1dfc40))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x126e9c,_0xe5cf5c,_0x420c12,_0x1a178f)=>{const _0x19ae95=_0x5e519c;for(var _0x272145=_0x1a178f>0x1?void 0x0:_0x1a178f?k(_0xe5cf5c,_0x420c12):_0xe5cf5c,_0x5b4cec=_0x126e9c[_0x19ae95(0xe3)]-0x1,_0x137b66;_0x5b4cec>=0x0;_0x5b4cec--)(_0x137b66=_0x126e9c[_0x5b4cec])&&(_0x272145=_0x137b66(_0x272145)||_0x272145);return _0x272145;},_=(_0x26a1f4,_0x281b8d)=>(_0x584d65,_0x22df2d)=>_0x281b8d(_0x584d65,_0x22df2d,_0x26a1f4);function X(_0x480b96,_0x1fe62d){const _0x22c521=_0x5e519c,_0x41c193=_0x480b96[_0x22c521(0xc1)][0x0];return{..._0x1fe62d,'id':_0x41c193['replyId'],'resolved':_0x480b96[_0x22c521(0xa1)]===0x1,'dT':D(_0x41c193[_0x22c521(0x94)]),'personId':_0x41c193['userId'],'threadId':_0x41c193['threadId']};}function ee(_0x788a95,_0x16985f,_0x284a63){const _0x3568bc=_0x5e519c;var _0xa97886,_0x2e28b7;if(((_0x2e28b7=(_0xa97886=_0x788a95==null?void 0x0:_0x788a95[_0x3568bc(0xc1)])==null?void 0x0:_0xa97886[_0x3568bc(0xe3)])!=null?_0x2e28b7:0x0)>0x0){const _0x3a66dd=(_0x4f17ed,_0x2f2aa3)=>({'id':_0x4f17ed['replyId'],'threadId':_0x4f17ed[_0x3568bc(0xc9)],'dT':D(_0x4f17ed[_0x3568bc(0x94)]),'personId':_0x4f17ed['userId'],'resolved':_0x788a95[_0x3568bc(0xa1)]===I[_0x3568bc(0xa9)],'unitId':_0x16985f,'subUnitId':_0x284a63,'text':JSON[_0x3568bc(0xd7)](_0x4f17ed['content']),'parentId':_0x2f2aa3}),_0x4a2743=_0x3a66dd(_0x788a95[_0x3568bc(0xc1)][0x0]);return{..._0x4a2743,'children':_0x788a95['replies']['slice'](0x1)[_0x3568bc(0x96)](_0x4c26c8=>_0x3a66dd(_0x4c26c8,_0x4a2743['id']))};}return null;}let f=class{constructor(_0x4a0a55,_0x46b7ec,_0x1193db,_0x3af4c8){const _0x52c118=_0x5e519c;this[_0x52c118(0x97)]=_0x4a0a55,this['_userService']=_0x46b7ec,this['_sessionService']=_0x1193db,this[_0x52c118(0xb3)]=_0x3af4c8;}async[_0x5e519c(0xb6)](_0xa173bc){const _0x5d729b=_0x5e519c;var _0x2ca814,_0x20a6b1;const {parentId:_0x339b09,unitId:_0x419960,text:_0x5f52be,threadId:_0x82adbd}=_0xa173bc,_0xd4d1e2=(_0x20a6b1=(_0x2ca814=_0x5f52be[_0x5d729b(0x93)])==null?void 0x0:_0x2ca814[_0x5d729b(0x9c)](_0x619ef8=>_0x619ef8[_0x5d729b(0xbe)]===_0x517552[_0x5d729b(0xc8)])['map'](_0x96f5de=>_0x96f5de[_0x5d729b(0xd1)]))!=null?_0x20a6b1:[],_0x4695e9=JSON['stringify'](_0x5f52be),_0x231617=(await this[_0x5d729b(0xde)][_0x5d729b(0xa6)](_0x419960))[_0x5d729b(0xc0)]();if(_0x339b09){const _0x3dcf31={'memberId':_0x231617,'unitId':_0x419960,'content':_0x4695e9,'mention':_0xd4d1e2,'threadId':_0x82adbd},_0x1c7184=(await this[_0x5d729b(0x97)][_0x5d729b(0xa3)]('/universer-api/comment/unit/'+_0x419960+_0x5d729b(0xec),{'body':_0x3dcf31}))[_0x5d729b(0xa2)]['reply'];return{..._0xa173bc,'id':_0x1c7184[_0x5d729b(0xed)],'dT':_0x19b6e7(+_0x1c7184['createTimestamp'])[_0x5d729b(0xcb)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1c7184[_0x5d729b(0xac)]};}else{const _0x5895a0={'memberId':_0x231617,'unitId':_0x419960,'content':_0x4695e9,'mention':_0xd4d1e2},_0x57a9e2=await this[_0x5d729b(0x97)][_0x5d729b(0xa3)]('/universer-api/comment/unit/'+_0x419960+_0x5d729b(0xeb),{'body':_0x5895a0});return X(_0x57a9e2['body']['comment'],_0xa173bc);}}async[_0x5e519c(0xab)](_0x5ba388){const _0x146c7b=_0x5e519c;var _0x311480,_0x4049e4;const {text:_0x290947,unitId:_0x11be01}=_0x5ba388,_0x42fc8c=(_0x4049e4=(_0x311480=_0x290947[_0x146c7b(0x93)])==null?void 0x0:_0x311480['filter'](_0x4c81b6=>_0x4c81b6[_0x146c7b(0xbe)]===_0x517552[_0x146c7b(0xc8)])[_0x146c7b(0x96)](_0x491c81=>_0x491c81[_0x146c7b(0xd1)]))!=null?_0x4049e4:[],_0x38ccac=JSON['stringify'](_0x290947),_0x28705f=_0x5ba388[_0x146c7b(0xc9)],_0x7635d8=_0x5ba388['id'],_0x3dc1f1={'memberId':(await this[_0x146c7b(0xde)][_0x146c7b(0xa6)](_0x11be01))[_0x146c7b(0xc0)](),'unitId':_0x11be01,'threadId':_0x28705f,'mention':_0x42fc8c,'content':_0x38ccac,'replyId':_0x7635d8},_0x129bcf=await this[_0x146c7b(0x97)][_0x146c7b(0xa3)]('/universer-api/comment/unit/'+_0x11be01+_0x146c7b(0xcd),{'body':_0x3dc1f1});return!_0x129bcf[_0x146c7b(0xa2)][_0x146c7b(0xa4)]||_0x129bcf[_0x146c7b(0xa2)][_0x146c7b(0xa4)][_0x146c7b(0xd6)]===0x1;}async['resolveComment'](_0x55be80){const _0x92af12=_0x5e519c,{unitId:_0x1a91b1}=_0x55be80,_0x4e663e=_0x55be80[_0x92af12(0xc9)],_0x475f70={'memberId':this['_userService']['getCurrentUser']()[_0x92af12(0xe5)],'unitId':_0x1a91b1,'threadId':_0x4e663e,'solved':_0x55be80['resolved']?I[_0x92af12(0xa9)]:I[_0x92af12(0xda)]},_0x180eca=await this[_0x92af12(0x97)][_0x92af12(0xa3)]('/universer-api/comment/unit/'+_0x1a91b1+'/solved',{'body':_0x475f70});return!_0x180eca[_0x92af12(0xa2)]['error']||_0x180eca[_0x92af12(0xa2)][_0x92af12(0xa4)]['code']===0x1;}async[_0x5e519c(0x98)](_0x58645b,_0x4e7965,_0x17e333,_0x4f1b06){const _0x1ec86c=_0x5e519c,_0xa7fbde={'memberId':(await this[_0x1ec86c(0xde)][_0x1ec86c(0xa6)](_0x58645b))[_0x1ec86c(0xc0)](),'threadId':_0x17e333,'replyId':_0x4f1b06,'unitId':_0x58645b},_0x5d410c=await this[_0x1ec86c(0x97)][_0x1ec86c(0xa3)](_0x1ec86c(0xb9)+_0x58645b+'/delete',{'body':_0xa7fbde});return!_0x5d410c['body'][_0x1ec86c(0xa4)]||_0x5d410c[_0x1ec86c(0xa2)][_0x1ec86c(0xa4)][_0x1ec86c(0xd6)]===0x1;}async[_0x5e519c(0xd9)](_0x3feefd,_0x25d00d,_0x3cd881){const _0x55c250=_0x5e519c,_0x42cacf={'unitId':_0x3feefd,'threadId':_0x3cd881},_0x58bd70=await this[_0x55c250(0x97)][_0x55c250(0xa3)](_0x55c250(0xb9)+_0x3feefd+_0x55c250(0xb4),{'body':_0x42cacf}),_0x3159b5=_0x3cd881['map'](_0x3fee24=>ee(_0x58bd70['body'][_0x55c250(0xe7)][_0x3fee24],_0x3feefd,_0x25d00d))['filter'](Boolean);return Object[_0x55c250(0xa7)](_0x58bd70['body']['users'])[_0x55c250(0xdd)](_0x236fed=>{const _0x5bcb36=_0x55c250;this['_userService'][_0x5bcb36(0xd4)](_0x236fed);}),_0x3159b5;}[_0x5e519c(0xc5)](_0x442952){const _0x7578a2=_0x5e519c;return{'id':_0x442952['id'],'threadId':_0x442952[_0x7578a2(0xc9)],'ref':_0x442952[_0x7578a2(0xe8)]};}};f=Q([_(0x0,_0x1bd6b7(_0x52a4a2)),_(0x1,_0x1bd6b7(_0x3d615e)),_(0x2,_0x1bd6b7(_0x494f6f)),_(0x3,_0x1bd6b7(_0x1dfc40))],f);var re=Object[_0x5e519c(0x9d)],te=(_0x17877c,_0xcf2c87,_0x2e7c25,_0x54ff9e)=>{const _0x2d5414=_0x5e519c;for(var _0x4ac2c0=_0x54ff9e>0x1?void 0x0:_0x54ff9e?re(_0xcf2c87,_0x2e7c25):_0xcf2c87,_0x6292eb=_0x17877c[_0x2d5414(0xe3)]-0x1,_0x1f4304;_0x6292eb>=0x0;_0x6292eb--)(_0x1f4304=_0x17877c[_0x6292eb])&&(_0x4ac2c0=_0x1f4304(_0x4ac2c0)||_0x4ac2c0);return _0x4ac2c0;},N=(_0x5dc274,_0x153500)=>(_0x428cc3,_0x199ebd)=>_0x153500(_0x428cc3,_0x199ebd,_0x5dc274);let g=class extends _0x4dbd30{constructor(_0x2ff542,_0x37e7ba){const _0x4d4df0=_0x5e519c;super(),this[_0x4d4df0(0xaf)]=_0x2ff542,this[_0x4d4df0(0xe1)]=_0x37e7ba,this[_0x4d4df0(0xdb)]();}['_initDataSource'](){const _0x393965=_0x5e519c;this[_0x393965(0xaf)][_0x393965(0xe4)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x393965(0xcf)]=!0x1;}};g=te([N(0x0,_0x1e1893),N(0x1,_0x1bd6b7(f))],g);var se=Object['defineProperty'],oe=Object[_0x5e519c(0x9d)],ne=(_0x35ad40,_0x447367,_0x3dff44)=>_0x447367 in _0x35ad40?se(_0x35ad40,_0x447367,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3dff44}):_0x35ad40[_0x447367]=_0x3dff44,ie=(_0x5dff54,_0x3381e2,_0x1c99ce,_0x2503ae)=>{const _0x548b72=_0x5e519c;for(var _0x3b1f82=_0x2503ae>0x1?void 0x0:_0x2503ae?oe(_0x3381e2,_0x1c99ce):_0x3381e2,_0x4eb2=_0x5dff54[_0x548b72(0xe3)]-0x1,_0x4723f0;_0x4eb2>=0x0;_0x4eb2--)(_0x4723f0=_0x5dff54[_0x4eb2])&&(_0x3b1f82=_0x4723f0(_0x3b1f82)||_0x3b1f82);return _0x3b1f82;},w=(_0x58e0ee,_0x58a975)=>(_0x1623a2,_0x3e7078)=>_0x58a975(_0x1623a2,_0x3e7078,_0x58e0ee),$=(_0x41cd99,_0x2b58bb,_0x2e1e76)=>ne(_0x41cd99,typeof _0x2b58bb!='symbol'?_0x2b58bb+'':_0x2b58bb,_0x2e1e76);function _0x5ceb(_0x44b9cb,_0x5cec12){const _0x587803=_0x5878();return _0x5ceb=function(_0x5ceb85,_0x45c382){_0x5ceb85=_0x5ceb85-0x91;let _0x1f9fd2=_0x587803[_0x5ceb85];return _0x1f9fd2;},_0x5ceb(_0x44b9cb,_0x5cec12);}let b=class extends _0x41074e{constructor(_0x29bf7a=M,_0x2d535e,_0x27f7e0){const _0x2ea9fb=_0x5e519c;super(),this['_config']=_0x29bf7a,this[_0x2ea9fb(0xb3)]=_0x2d535e,this[_0x2ea9fb(0xbd)]=_0x27f7e0;const {..._0x3af099}=_0x59806d({},M,this[_0x2ea9fb(0x9b)]);this[_0x2ea9fb(0xbd)]['setConfig'](z,_0x3af099);}[_0x5e519c(0xb7)](){const _0x207c21=_0x5e519c;[[f],[g],[S]][_0x207c21(0xdd)](_0x342c0c=>{const _0x2e5340=_0x207c21;this[_0x2e5340(0xb3)]['add'](_0x342c0c);});}['onReady'](){const _0x4cafb7=_0x5e519c;this[_0x4cafb7(0xb3)][_0x4cafb7(0xee)](g),this[_0x4cafb7(0xb3)][_0x4cafb7(0xee)](S);}};$(b,_0x5e519c(0xe0),W),$(b,_0x5e519c(0x99),_0x5c3a2a['UNIVER_UNKNOWN']),b=ie([_0x2aafae(_0x31b480,_0x297c90,_0x24c725),w(0x1,_0x1bd6b7(_0x1dfc40)),w(0x2,_0x4ccfd1)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x441d4c,_0x481c05){const _0x47d82f=_0x29cd,_0x91e344=_0x441d4c();while(!![]){try{const _0xbc2bce=-parseInt(_0x47d82f(0x1d1))/0x1*(-parseInt(_0x47d82f(0x1b7))/0x2)+parseInt(_0x47d82f(0x200))/0x3*(parseInt(_0x47d82f(0x1fa))/0x4)+-parseInt(_0x47d82f(0x228))/0x5+-parseInt(_0x47d82f(0x1b1))/0x6+-parseInt(_0x47d82f(0x227))/0x7+-parseInt(_0x47d82f(0x225))/0x8+parseInt(_0x47d82f(0x229))/0x9*(parseInt(_0x47d82f(0x1c7))/0xa);if(_0xbc2bce===_0x481c05)break;else _0x91e344['push'](_0x91e344['shift']());}catch(_0x4a3846){_0x91e344['push'](_0x91e344['shift']());}}}(_0x2451,0x94512),function(_0x3397ec,_0xa4b193){const _0x2213c9=_0x29cd;typeof exports==_0x2213c9(0x1fe)&&typeof module<'u'?_0xa4b193(exports,require(_0x2213c9(0x1d5)),require('@univerjs-pro/license'),require(_0x2213c9(0x1b9)),require('@univerjs/thread-comment-ui'),require(_0x2213c9(0x1fc)),require('rxjs'),require(_0x2213c9(0x1c3))):typeof define=='function'&&define[_0x2213c9(0x20d)]?define([_0x2213c9(0x1ea),_0x2213c9(0x1d5),_0x2213c9(0x206),_0x2213c9(0x1b9),_0x2213c9(0x223),_0x2213c9(0x1fc),'rxjs',_0x2213c9(0x1c3)],_0xa4b193):(_0x3397ec=typeof globalThis<'u'?globalThis:_0x3397ec||self,_0xa4b193(_0x3397ec[_0x2213c9(0x1d3)]={},_0x3397ec[_0x2213c9(0x220)],_0x3397ec[_0x2213c9(0x1db)],_0x3397ec['UniverCore'],_0x3397ec[_0x2213c9(0x205)],_0x3397ec[_0x2213c9(0x20a)],_0x3397ec[_0x2213c9(0x1f6)],_0x3397ec[_0x2213c9(0x214)]));}(this,function(_0x5708ee,_0xa6c00e,_0x3dcb7f,_0x40565c,_0x11e035,_0x2e46d8,_0x50e44c,_0x126f1a){'use strict';const _0x15bd47=_0x29cd;const _0x2ddd03=_0x15bd47(0x21a);var _0x3f0710=(_0x55a6f1=>(_0x55a6f1[_0x55a6f1[_0x15bd47(0x207)]=0x0]='OpenOrReOpen',_0x55a6f1[_0x55a6f1[_0x15bd47(0x1cd)]=0x1]=_0x15bd47(0x1cd),_0x55a6f1[_0x55a6f1[_0x15bd47(0x218)]=-0x1]=_0x15bd47(0x218),_0x55a6f1))(_0x3f0710||{}),_0x3283b7=(_0x21eb7b=>(_0x21eb7b[_0x21eb7b[_0x15bd47(0x1c9)]=0x0]=_0x15bd47(0x1c9),_0x21eb7b[_0x21eb7b['Add']=0x1]='Add',_0x21eb7b[_0x21eb7b['Reply']=0x2]=_0x15bd47(0x20e),_0x21eb7b[_0x21eb7b[_0x15bd47(0x1bb)]=0x3]=_0x15bd47(0x1bb),_0x21eb7b[_0x21eb7b[_0x15bd47(0x1b6)]=0x4]=_0x15bd47(0x1b6),_0x21eb7b[_0x21eb7b[_0x15bd47(0x1f8)]=0x5]='Solve',_0x21eb7b[_0x21eb7b[_0x15bd47(0x218)]=-0x1]='UNRECOGNIZED',_0x21eb7b))(_0x3283b7||{});const _0x3ac07d=_0x86fb95=>_0x40565c[_0x15bd47(0x1d0)](new Date(+_0x86fb95))['format']('YYYY/MM/DD\x20HH:mm'),_0x59a2e5=async(_0x49b654,_0x2a0433)=>{const _0x481e40=_0x15bd47,_0x33df57=_0x49b654[_0x481e40(0x1dc)](_0x40565c[_0x481e40(0x1cf)]),_0x1e3e65=_0x49b654[_0x481e40(0x1dc)](_0x126f1a[_0x481e40(0x1e0)]);_0x2a0433[_0x481e40(0x20f)](_0x4b790b=>{const _0x334c80=_0x481e40;_0x33df57[_0x334c80(0x213)](_0x4b790b)&&_0x2a0433[_0x334c80(0x1f4)](_0x4b790b);}),_0x2a0433['size']&&(await _0x1e3e65[_0x481e40(0x1dc)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2a0433]}}))[_0x481e40(0x1ca)]['users'][_0x481e40(0x20f)](_0x5789e5=>{_0x5789e5&&_0x33df57['addUser'](_0x5789e5);});};var _0x1ffb52=Object[_0x15bd47(0x201)],_0x3eaf2e=(_0x54a7c4,_0x2aa985,_0x55f94d,_0x466127)=>{const _0x14fad1=_0x15bd47;for(var _0x33b456=_0x466127>0x1?void 0x0:_0x466127?_0x1ffb52(_0x2aa985,_0x55f94d):_0x2aa985,_0x4a8d07=_0x54a7c4[_0x14fad1(0x1ba)]-0x1,_0x194495;_0x4a8d07>=0x0;_0x4a8d07--)(_0x194495=_0x54a7c4[_0x4a8d07])&&(_0x33b456=_0x194495(_0x33b456)||_0x33b456);return _0x33b456;},_0x486313=(_0x1144ad,_0x1d030f)=>(_0x4b38da,_0x2e6cf9)=>_0x1d030f(_0x4b38da,_0x2e6cf9,_0x1144ad);let _0x208812=class extends _0x40565c[_0x15bd47(0x1f3)]{constructor(_0x4c94af,_0x47a30e,_0x29a89b,_0x2e882c){const _0x578880=_0x15bd47;super(),this['_commentService']=_0x4c94af,this[_0x578880(0x1dd)]=_0x47a30e,this[_0x578880(0x1b3)]=_0x29a89b,this[_0x578880(0x1c1)]=_0x2e882c,this[_0x578880(0x1f5)](),this[_0x578880(0x1da)]();}['_initUserSync'](){const _0x3f7db0=_0x15bd47;this['disposeWithMe'](this['_threadCommentModel'][_0x3f7db0(0x20b)]['pipe'](_0x50e44c[_0x3f7db0(0x1ad)](0x10))[_0x3f7db0(0x209)](_0x3af95f=>{const _0x4ff42b=_0x3f7db0,_0x527a2f=new Set();_0x3af95f[_0x4ff42b(0x20f)](_0x4e8b49=>{const _0x406573=_0x4ff42b;switch(_0x4e8b49['type']){case _0x406573(0x1bc):{const _0x42b6df=_0x4e8b49[_0x406573(0x1b5)]['personId'];_0x527a2f[_0x406573(0x1bc)](_0x42b6df);break;}}}),_0x59a2e5(this[_0x4ff42b(0x1c1)],_0x527a2f);}));}[_0x15bd47(0x1f5)](){const _0xf0adff=_0x15bd47;this[_0xf0adff(0x20c)](this[_0xf0adff(0x1f2)]['commentUpdate$']['subscribe'](async _0x1dee6e=>{const _0x118155=_0xf0adff;var _0x4302cc,_0x1edb28,_0x56c94b,_0x2f5776;const _0x2ee505=(_0x4302cc=this[_0x118155(0x1dd)][_0x118155(0x1eb)](_0x1dee6e[_0x118155(0x202)])['find'](_0x19e17f=>_0x19e17f[_0x118155(0x1e7)]===_0x1dee6e[_0x118155(0x1e7)]))==null?void 0x0:_0x4302cc['root'];if(!_0x2ee505)return;const {unitId:_0x3de618,subUnitId:_0x27f30a}=_0x2ee505;switch(_0x1dee6e[_0x118155(0x1c0)]&&this[_0x118155(0x1b3)][_0x118155(0x1c2)](_0x1dee6e[_0x118155(0x1c0)]),_0x1dee6e[_0x118155(0x219)]){case _0x3283b7[_0x118155(0x1aa)]:break;case _0x3283b7[_0x118155(0x20e)]:{this['_threadCommentModel'][_0x118155(0x215)](_0x3de618,_0x27f30a,{'unitId':_0x3de618,'subUnitId':_0x27f30a,'ref':'','id':_0x1dee6e[_0x118155(0x1df)],'dT':_0x3ac07d(+_0x1dee6e[_0x118155(0x1af)]),'threadId':_0x1dee6e[_0x118155(0x1e7)],'personId':(_0x56c94b=(_0x1edb28=_0x1dee6e['user'])==null?void 0x0:_0x1edb28[_0x118155(0x222)])!=null?_0x56c94b:_0x1dee6e[_0x118155(0x1b8)],'text':JSON[_0x118155(0x1fd)](_0x1dee6e[_0x118155(0x1e8)]),'parentId':_0x2ee505['id']});break;}case _0x3283b7['Delete']:{const _0x404d7c=this['_threadCommentModel'][_0x118155(0x208)](_0x3de618,_0x27f30a,_0x1dee6e[_0x118155(0x1df)]);_0x404d7c&&_0x404d7c[_0x118155(0x1cb)]&&this[_0x118155(0x1dd)]['deleteComment'](_0x3de618,_0x27f30a,_0x1dee6e[_0x118155(0x1df)]);break;}case _0x3283b7[_0x118155(0x1bb)]:{this[_0x118155(0x1dd)][_0x118155(0x1d7)](_0x3de618,_0x27f30a,{'commentId':_0x1dee6e[_0x118155(0x1df)],'text':JSON[_0x118155(0x1fd)](_0x1dee6e[_0x118155(0x1e8)])});break;}case _0x3283b7[_0x118155(0x1f8)]:{const _0x1d97b9=(_0x2f5776=this['_threadCommentModel'][_0x118155(0x1eb)](_0x1dee6e[_0x118155(0x202)])[_0x118155(0x1d6)](_0x607583=>_0x607583['threadId']===_0x1dee6e['threadId']))==null?void 0x0:_0x2f5776[_0x118155(0x212)];_0x1d97b9&&this[_0x118155(0x1dd)]['resolveComment'](_0x3de618,_0x27f30a,_0x1d97b9['id'],_0x1dee6e[_0x118155(0x22a)]===_0x3f0710[_0x118155(0x1cd)]);break;}}}));}};_0x208812=_0x3eaf2e([_0x486313(0x0,_0x40565c[_0x15bd47(0x1c6)](_0xa6c00e['CommentService'])),_0x486313(0x1,_0x40565c[_0x15bd47(0x1c6)](_0x2e46d8[_0x15bd47(0x1e1)])),_0x486313(0x2,_0x40565c['Inject'](_0x40565c[_0x15bd47(0x1cf)])),_0x486313(0x3,_0x40565c['Inject'](_0x40565c['Injector']))],_0x208812);const _0x2ef742=_0x15bd47(0x1ec),_0x5b7dbe={};var _0x16054b=Object[_0x15bd47(0x201)],_0x4e4a4a=(_0x1df027,_0x348bfe,_0x2061a1,_0x21976c)=>{const _0x5ec660=_0x15bd47;for(var _0xd7e007=_0x21976c>0x1?void 0x0:_0x21976c?_0x16054b(_0x348bfe,_0x2061a1):_0x348bfe,_0x146511=_0x1df027[_0x5ec660(0x1ba)]-0x1,_0xb67e1a;_0x146511>=0x0;_0x146511--)(_0xb67e1a=_0x1df027[_0x146511])&&(_0xd7e007=_0xb67e1a(_0xd7e007)||_0xd7e007);return _0xd7e007;},_0x18c4cc=(_0x52f0d2,_0x27fc72)=>(_0x15e24f,_0x3e49af)=>_0x27fc72(_0x15e24f,_0x3e49af,_0x52f0d2);function _0x33a584(_0x3167bd,_0x47371d){const _0x27901f=_0x15bd47,_0x24d3db=_0x3167bd[_0x27901f(0x216)][0x0];return{..._0x47371d,'id':_0x24d3db[_0x27901f(0x1df)],'resolved':_0x3167bd[_0x27901f(0x22a)]===0x1,'dT':_0x3ac07d(_0x24d3db[_0x27901f(0x1af)]),'personId':_0x24d3db[_0x27901f(0x1b8)],'threadId':_0x24d3db['threadId']};}function _0x41d4cc(_0x495836,_0x80e79f,_0x76e95b){const _0x5d18c1=_0x15bd47;var _0x16540a,_0x568556;if(((_0x568556=(_0x16540a=_0x495836==null?void 0x0:_0x495836[_0x5d18c1(0x216)])==null?void 0x0:_0x16540a[_0x5d18c1(0x1ba)])!=null?_0x568556:0x0)>0x0){const _0x4e9afb=(_0x21f9a8,_0x32bcb6)=>({'id':_0x21f9a8[_0x5d18c1(0x1df)],'threadId':_0x21f9a8[_0x5d18c1(0x1e7)],'dT':_0x3ac07d(_0x21f9a8[_0x5d18c1(0x1af)]),'personId':_0x21f9a8[_0x5d18c1(0x1b8)],'resolved':_0x495836[_0x5d18c1(0x22a)]===_0x3f0710[_0x5d18c1(0x1cd)],'unitId':_0x80e79f,'subUnitId':_0x76e95b,'text':JSON[_0x5d18c1(0x1fd)](_0x21f9a8['content']),'parentId':_0x32bcb6}),_0x3a1533=_0x4e9afb(_0x495836[_0x5d18c1(0x216)][0x0]);return{..._0x3a1533,'children':_0x495836[_0x5d18c1(0x216)][_0x5d18c1(0x21e)](0x1)[_0x5d18c1(0x21f)](_0x5f4b27=>_0x4e9afb(_0x5f4b27,_0x3a1533['id']))};}return null;}let _0x58f14a=class{constructor(_0x784b80,_0x51440d,_0x243d33,_0x5039a9){const _0x1149ec=_0x15bd47;this['_httpService']=_0x784b80,this[_0x1149ec(0x1b3)]=_0x51440d,this[_0x1149ec(0x21b)]=_0x243d33,this[_0x1149ec(0x1c1)]=_0x5039a9;}async[_0x15bd47(0x215)](_0x3c7fac){const _0x57ecdc=_0x15bd47;var _0x234f6f,_0x52eaf0;const {parentId:_0x31c52e,unitId:_0x393195,text:_0x253e3c,threadId:_0x15b91e}=_0x3c7fac,_0xe63c68=(_0x52eaf0=(_0x234f6f=_0x253e3c[_0x57ecdc(0x224)])==null?void 0x0:_0x234f6f[_0x57ecdc(0x1d2)](_0x3b3fb3=>_0x3b3fb3[_0x57ecdc(0x1ef)]===_0x40565c[_0x57ecdc(0x1ab)][_0x57ecdc(0x1f7)])[_0x57ecdc(0x21f)](_0x50dc89=>_0x50dc89['rangeId']))!=null?_0x52eaf0:[],_0x151e7a=JSON[_0x57ecdc(0x1fb)](_0x253e3c),_0x51dca9=(await this[_0x57ecdc(0x21b)][_0x57ecdc(0x1b0)](_0x393195))['getMemberID']();if(_0x31c52e){const _0x148ffc={'memberId':_0x51dca9,'unitId':_0x393195,'content':_0x151e7a,'mention':_0xe63c68,'threadId':_0x15b91e},_0x5ee446=(await this[_0x57ecdc(0x203)][_0x57ecdc(0x1e6)]('/universer-api/comment/unit/'+_0x393195+_0x57ecdc(0x1f0),{'body':_0x148ffc}))[_0x57ecdc(0x1ca)][_0x57ecdc(0x1ce)];return{..._0x3c7fac,'id':_0x5ee446[_0x57ecdc(0x1df)],'dT':_0x40565c[_0x57ecdc(0x1d0)](+_0x5ee446['createTimestamp'])[_0x57ecdc(0x211)](_0x57ecdc(0x1ff)),'personId':_0x5ee446[_0x57ecdc(0x1b8)]};}else{const _0x2c86bd={'memberId':_0x51dca9,'unitId':_0x393195,'content':_0x151e7a,'mention':_0xe63c68},_0x3fb94b=await this[_0x57ecdc(0x203)][_0x57ecdc(0x1e6)](_0x57ecdc(0x1f9)+_0x393195+'/add',{'body':_0x2c86bd});return _0x33a584(_0x3fb94b[_0x57ecdc(0x1ca)][_0x57ecdc(0x1bd)],_0x3c7fac);}}async[_0x15bd47(0x1d7)](_0x43014e){const _0xe1f46a=_0x15bd47;var _0x3e2630,_0x408025;const {text:_0x1b43ab,unitId:_0x2c2522}=_0x43014e,_0x4dd532=(_0x408025=(_0x3e2630=_0x1b43ab[_0xe1f46a(0x224)])==null?void 0x0:_0x3e2630[_0xe1f46a(0x1d2)](_0x5a3144=>_0x5a3144['rangeType']===_0x40565c[_0xe1f46a(0x1ab)][_0xe1f46a(0x1f7)])['map'](_0x4a102b=>_0x4a102b[_0xe1f46a(0x1d4)]))!=null?_0x408025:[],_0x58f1e1=JSON[_0xe1f46a(0x1fb)](_0x1b43ab),_0x217bc5=_0x43014e[_0xe1f46a(0x1e7)],_0x5687fe=_0x43014e['id'],_0x1a2530={'memberId':(await this['_sessionService'][_0xe1f46a(0x1b0)](_0x2c2522))[_0xe1f46a(0x1e5)](),'unitId':_0x2c2522,'threadId':_0x217bc5,'mention':_0x4dd532,'content':_0x58f1e1,'replyId':_0x5687fe},_0x4df379=await this[_0xe1f46a(0x203)][_0xe1f46a(0x1e6)](_0xe1f46a(0x1f9)+_0x2c2522+'/edit',{'body':_0x1a2530});return!_0x4df379[_0xe1f46a(0x1ca)][_0xe1f46a(0x1f1)]||_0x4df379[_0xe1f46a(0x1ca)][_0xe1f46a(0x1f1)][_0xe1f46a(0x1e9)]===0x1;}async[_0x15bd47(0x1d8)](_0x217ab9){const _0x2c06af=_0x15bd47,{unitId:_0x76e4b9}=_0x217ab9,_0xc3b3ab=_0x217ab9[_0x2c06af(0x1e7)],_0x185fd3={'memberId':this['_userService']['getCurrentUser']()[_0x2c06af(0x222)],'unitId':_0x76e4b9,'threadId':_0xc3b3ab,'solved':_0x217ab9[_0x2c06af(0x1e4)]?_0x3f0710[_0x2c06af(0x1cd)]:_0x3f0710['OpenOrReOpen']},_0x172a24=await this['_httpService'][_0x2c06af(0x1e6)](_0x2c06af(0x1f9)+_0x76e4b9+_0x2c06af(0x1c8),{'body':_0x185fd3});return!_0x172a24[_0x2c06af(0x1ca)]['error']||_0x172a24[_0x2c06af(0x1ca)][_0x2c06af(0x1f1)][_0x2c06af(0x1e9)]===0x1;}async['deleteComment'](_0x53d197,_0x10f5ae,_0x3d3d7a,_0xd5811){const _0x76db7f=_0x15bd47,_0x4a4931={'memberId':(await this[_0x76db7f(0x21b)][_0x76db7f(0x1b0)](_0x53d197))['getMemberID'](),'threadId':_0x3d3d7a,'replyId':_0xd5811,'unitId':_0x53d197},_0x690f07=await this[_0x76db7f(0x203)][_0x76db7f(0x1e6)](_0x76db7f(0x1f9)+_0x53d197+_0x76db7f(0x1a9),{'body':_0x4a4931});return!_0x690f07[_0x76db7f(0x1ca)]['error']||_0x690f07[_0x76db7f(0x1ca)]['error'][_0x76db7f(0x1e9)]===0x1;}async[_0x15bd47(0x1de)](_0x4bd754,_0x558d7b,_0x170c4f){const _0x96bc73=_0x15bd47,_0x19150e={'unitId':_0x4bd754,'threadId':_0x170c4f},_0x26dfef=await this[_0x96bc73(0x203)]['post'](_0x96bc73(0x1f9)+_0x4bd754+'/list',{'body':_0x19150e}),_0x4c9f08=_0x170c4f[_0x96bc73(0x21f)](_0x1e6d2f=>_0x41d4cc(_0x26dfef['body'][_0x96bc73(0x1ac)][_0x1e6d2f],_0x4bd754,_0x558d7b))[_0x96bc73(0x1d2)](Boolean);return Object['values'](_0x26dfef[_0x96bc73(0x1ca)][_0x96bc73(0x1ae)])[_0x96bc73(0x20f)](_0xc1f1bb=>{const _0x26f884=_0x96bc73;this[_0x26f884(0x1b3)]['addUser'](_0xc1f1bb);}),_0x4c9f08;}[_0x15bd47(0x221)](_0x10a60c){const _0x264c8f=_0x15bd47;return{'id':_0x10a60c['id'],'threadId':_0x10a60c[_0x264c8f(0x1e7)],'ref':_0x10a60c[_0x264c8f(0x1cc)]};}};_0x58f14a=_0x4e4a4a([_0x18c4cc(0x0,_0x40565c[_0x15bd47(0x1c6)](_0x126f1a[_0x15bd47(0x1e0)])),_0x18c4cc(0x1,_0x40565c[_0x15bd47(0x1c6)](_0x40565c['UserManagerService'])),_0x18c4cc(0x2,_0x40565c['Inject'](_0xa6c00e['CollaborationSessionService'])),_0x18c4cc(0x3,_0x40565c[_0x15bd47(0x1c6)](_0x40565c[_0x15bd47(0x210)]))],_0x58f14a);var _0x5797ff=Object[_0x15bd47(0x201)],_0x19c1ed=(_0x8e2e44,_0x3202a2,_0xaff06d,_0x356c6b)=>{const _0x18c7c3=_0x15bd47;for(var _0x2f66fd=_0x356c6b>0x1?void 0x0:_0x356c6b?_0x5797ff(_0x3202a2,_0xaff06d):_0x3202a2,_0x3d7bd5=_0x8e2e44[_0x18c7c3(0x1ba)]-0x1,_0x32b694;_0x3d7bd5>=0x0;_0x3d7bd5--)(_0x32b694=_0x8e2e44[_0x3d7bd5])&&(_0x2f66fd=_0x32b694(_0x2f66fd)||_0x2f66fd);return _0x2f66fd;},_0x493d77=(_0x44509d,_0x3c787b)=>(_0x330b95,_0xac5553)=>_0x3c787b(_0x330b95,_0xac5553,_0x44509d);let _0x1b65e3=class extends _0x40565c[_0x15bd47(0x1f3)]{constructor(_0x1c4bc0,_0x11535f){const _0x55e2f9=_0x15bd47;super(),this[_0x55e2f9(0x1d9)]=_0x1c4bc0,this['_threadCommentDataSource']=_0x11535f,this['_initDataSource']();}[_0x15bd47(0x204)](){const _0x36f88a=_0x15bd47;this[_0x36f88a(0x1d9)][_0x36f88a(0x1c4)]=this['_threadCommentDataSource'],this[_0x36f88a(0x1d9)]['syncUpdateMutationToColla']=!0x1;}};_0x1b65e3=_0x19c1ed([_0x493d77(0x0,_0x2e46d8[_0x15bd47(0x1c5)]),_0x493d77(0x1,_0x40565c['Inject'](_0x58f14a))],_0x1b65e3);var _0xd596b3=Object[_0x15bd47(0x1b2)],_0xd06090=Object[_0x15bd47(0x201)],_0x1b074e=(_0x1ea63a,_0x1ae1aa,_0x256ea2)=>_0x1ae1aa in _0x1ea63a?_0xd596b3(_0x1ea63a,_0x1ae1aa,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x256ea2}):_0x1ea63a[_0x1ae1aa]=_0x256ea2,_0x4019ea=(_0x114d4f,_0x2821dd,_0x563095,_0x10c936)=>{for(var _0x299df3=_0x10c936>0x1?void 0x0:_0x10c936?_0xd06090(_0x2821dd,_0x563095):_0x2821dd,_0x52ac87=_0x114d4f['length']-0x1,_0x2fd152;_0x52ac87>=0x0;_0x52ac87--)(_0x2fd152=_0x114d4f[_0x52ac87])&&(_0x299df3=_0x2fd152(_0x299df3)||_0x299df3);return _0x299df3;},_0xde1a5c=(_0x466446,_0x37e845)=>(_0x44840f,_0x5b2dbf)=>_0x37e845(_0x44840f,_0x5b2dbf,_0x466446),_0x108fa6=(_0x4dbb3d,_0x5e4e86,_0x30adea)=>_0x1b074e(_0x4dbb3d,typeof _0x5e4e86!='symbol'?_0x5e4e86+'':_0x5e4e86,_0x30adea);_0x5708ee[_0x15bd47(0x21c)]=class extends _0x40565c[_0x15bd47(0x1e3)]{constructor(_0x29f5f9=_0x5b7dbe,_0x529e65,_0x4a63d3){const _0x5a9006=_0x15bd47;super(),this[_0x5a9006(0x217)]=_0x29f5f9,this[_0x5a9006(0x1c1)]=_0x529e65,this['_configService']=_0x4a63d3;const {..._0x3624ca}=_0x40565c[_0x5a9006(0x1ed)]({},_0x5b7dbe,this['_config']);this[_0x5a9006(0x226)][_0x5a9006(0x21d)](_0x2ef742,_0x3624ca);}['onStarting'](){const _0x4ff97f=_0x15bd47;[[_0x58f14a],[_0x1b65e3],[_0x208812]][_0x4ff97f(0x20f)](_0x306bb4=>{const _0x16d2bd=_0x4ff97f;this['_injector'][_0x16d2bd(0x1bc)](_0x306bb4);});}['onReady'](){const _0x484708=_0x15bd47;this[_0x484708(0x1c1)][_0x484708(0x1dc)](_0x1b65e3),this[_0x484708(0x1c1)][_0x484708(0x1dc)](_0x208812);}},_0x108fa6(_0x5708ee[_0x15bd47(0x21c)],'pluginName',_0x2ddd03),_0x108fa6(_0x5708ee[_0x15bd47(0x21c)],_0x15bd47(0x219),_0x40565c['UniverInstanceType'][_0x15bd47(0x1bf)]),_0x5708ee[_0x15bd47(0x21c)]=_0x4019ea([_0x40565c[_0x15bd47(0x1be)](_0x11e035[_0x15bd47(0x1ee)],_0xa6c00e['UniverCollaborationClientPlugin'],_0x3dcb7f[_0x15bd47(0x1b4)]),_0xde1a5c(0x1,_0x40565c[_0x15bd47(0x1c6)](_0x40565c['Injector'])),_0xde1a5c(0x2,_0x40565c['IConfigService'])],_0x5708ee[_0x15bd47(0x21c)]),Object[_0x15bd47(0x1b2)](_0x5708ee,Symbol[_0x15bd47(0x1e2)],{'value':'Module'});}));function _0x29cd(_0x28562f,_0x3105d0){const _0x2451c7=_0x2451();return _0x29cd=function(_0x29cd6d,_0x1f7480){_0x29cd6d=_0x29cd6d-0x1a9;let _0x10e19f=_0x2451c7[_0x29cd6d];return _0x10e19f;},_0x29cd(_0x28562f,_0x3105d0);}function _0x2451(){const _0x100484=['thread-comment-data-source.config','merge','UniverThreadCommentUIPlugin','rangeType','/reply','error','_commentService','Disposable','delete','_init','rxjs','COMMENT','Solve','/universer-api/comment/unit/','10732DTGpGl','stringify','@univerjs/thread-comment','parse','object','YYYY/MM/DD\x20HH:mm','690HIvytn','getOwnPropertyDescriptor','unitId','_httpService','_initDataSource','UniverThreadCommentUi','@univerjs-pro/license','OpenOrReOpen','getComment','subscribe','UniverThreadComment','commentUpdate$','disposeWithMe','amd','Reply','forEach','Injector','format','root','getUser','UniverNetwork','addComment','replies','_config','UNRECOGNIZED','type','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_sessionService','UniverThreadCommentDataSourcePlugin','setConfig','slice','map','UniverProCollaborationClient','saveCommentToSnapshot','userID','@univerjs/thread-comment-ui','customRanges','6791288bKMxLc','_configService','856051TzECeo','2177100nQSMdW','5121ygdCBN','solved','/delete','Add','CustomRangeType','comments','bufferTime','users','createTimestamp','requireSession','6545154syKtVB','defineProperty','_userService','UniverLicensePlugin','payload','Delete','16DleDzf','userId','@univerjs/core','length','Edit','add','comment','DependentOn','UNIVER_UNKNOWN','user','_injector','addUser','@univerjs/network','dataSource','IThreadCommentDataSourceService','Inject','41950uKoEXY','/solved','Unknown','body','parentId','ref','Solved','reply','UserManagerService','dayjs','12618mNUxaH','filter','UniverProThreadCommentDatasource','rangeId','@univerjs-pro/collaboration-client','find','updateComment','resolveComment','_threadCommentDataSourceService','_initUserSync','UniverProLicense','get','_threadCommentModel','listComments','replyId','HTTPService','ThreadCommentModel','toStringTag','Plugin','resolved','getMemberID','post','threadId','content','code','exports','getUnit'];_0x2451=function(){return _0x100484;};return _0x2451();}
1
+ function _0x37da(_0x80db3f,_0xaa4555){const _0x3674f7=_0x3674();return _0x37da=function(_0x37dafd,_0x2eefd2){_0x37dafd=_0x37dafd-0x19f;let _0x1f82f7=_0x3674f7[_0x37dafd];return _0x1f82f7;},_0x37da(_0x80db3f,_0xaa4555);}function _0x3674(){const _0x519256=['IThreadCommentDataSourceService','Solve','stringify','comment','Plugin','map','toStringTag','get','_threadCommentDataSource','Edit','personId','userId','exports','IConfigService','dayjs','UniverCollaborationClientPlugin','Reply','Inject','_initDataSource','resolveComment','post','amd','@univerjs-pro/license','error','updateComment','/delete','130614HnWLla','replyId','_threadCommentDataSourceService','/universer-api/user/list','@univerjs/network','UserManagerService','merge','DependentOn','rxjs','CustomRangeType','_httpService','type','saveCommentToSnapshot','values','_sessionService','COMMENT','Add','forEach','onReady','CommentService','UNIVER_UNKNOWN','getUnit','425120JOPPvH','/add','getMemberID','UniverInstanceType','@univerjs/core','UniverCore','user','length','UNRECOGNIZED','/reply','slice','Injector','UniverThreadComment','find','Solved','format','UniverLicensePlugin','ThreadCommentModel','code','_threadCommentModel','customRanges','313500bTAkhd','1771987WEIFOS','createTimestamp','pipe','OpenOrReOpen','solved','addUser','disposeWithMe','content','UniverThreadCommentUIPlugin','Unknown','@univerjs/thread-comment-ui','@univerjs/thread-comment','_init','addComment','bufferTime','_injector','getOwnPropertyDescriptor','/universer-api/comment/unit/','add','filter','263325wiooLA','userID','parse','UniverThreadCommentDataSourcePlugin','469266ScQHQc','symbol','dataSource','threadId','UniverProLicense','body','listComments','YYYY/MM/DD\x20HH:mm','rangeType','_userService','/list','Disposable','rangeId','_commentService','parentId','UniverNetwork','subscribe','ref','resolved','_config','HTTPService','unitId','3348124odCTkX','users','requireSession','UniverThreadCommentUi','replies','deleteComment','defineProperty','Module','_configService','payload','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','@univerjs-pro/collaboration-client','/edit','syncUpdateMutationToColla','Delete'];_0x3674=function(){return _0x519256;};return _0x3674();}(function(_0x212ea2,_0x22cf5c){const _0x18bf24=_0x37da,_0x420165=_0x212ea2();while(!![]){try{const _0x3d144b=-parseInt(_0x18bf24(0x1ba))/0x1+-parseInt(_0x18bf24(0x1d3))/0x2+-parseInt(_0x18bf24(0x1cf))/0x3+parseInt(_0x18bf24(0x1e9))/0x4+parseInt(_0x18bf24(0x1a5))/0x5+-parseInt(_0x18bf24(0x212))/0x6+parseInt(_0x18bf24(0x1bb))/0x7;if(_0x3d144b===_0x22cf5c)break;else _0x420165['push'](_0x420165['shift']());}catch(_0x1e6335){_0x420165['push'](_0x420165['shift']());}}}(_0x3674,0x7e58f),function(_0x1f741e,_0x2718c0){const _0x477e35=_0x37da;typeof exports=='object'&&typeof module<'u'?_0x2718c0(exports,require(_0x477e35(0x1f4)),require(_0x477e35(0x20e)),require(_0x477e35(0x1a9)),require(_0x477e35(0x1c5)),require(_0x477e35(0x1c6)),require(_0x477e35(0x21a)),require('@univerjs/network')):typeof define=='function'&&define[_0x477e35(0x20d)]?define([_0x477e35(0x204),_0x477e35(0x1f4),_0x477e35(0x20e),_0x477e35(0x1a9),_0x477e35(0x1c5),_0x477e35(0x1c6),_0x477e35(0x21a),_0x477e35(0x216)],_0x2718c0):(_0x1f741e=typeof globalThis<'u'?globalThis:_0x1f741e||self,_0x2718c0(_0x1f741e['UniverProThreadCommentDatasource']={},_0x1f741e['UniverProCollaborationClient'],_0x1f741e[_0x477e35(0x1d7)],_0x1f741e[_0x477e35(0x1aa)],_0x1f741e[_0x477e35(0x1ec)],_0x1f741e[_0x477e35(0x1b1)],_0x1f741e['rxjs'],_0x1f741e[_0x477e35(0x1e2)]));}(this,function(_0x5b5f3f,_0x2bbcf7,_0x3057e4,_0x1489c4,_0x37cbe5,_0x3008b3,_0x21d5eb,_0x126286){'use strict';const _0x2a2473=_0x37da;const _0x366665=_0x2a2473(0x1f3);var _0x4f9904=(_0x4cf9a5=>(_0x4cf9a5[_0x4cf9a5['OpenOrReOpen']=0x0]=_0x2a2473(0x1be),_0x4cf9a5[_0x4cf9a5['Solved']=0x1]='Solved',_0x4cf9a5[_0x4cf9a5[_0x2a2473(0x1ad)]=-0x1]=_0x2a2473(0x1ad),_0x4cf9a5))(_0x4f9904||{}),_0x6bcd17=(_0x495b56=>(_0x495b56[_0x495b56[_0x2a2473(0x1c4)]=0x0]=_0x2a2473(0x1c4),_0x495b56[_0x495b56['Add']=0x1]=_0x2a2473(0x19f),_0x495b56[_0x495b56[_0x2a2473(0x208)]=0x2]='Reply',_0x495b56[_0x495b56[_0x2a2473(0x201)]=0x3]=_0x2a2473(0x201),_0x495b56[_0x495b56[_0x2a2473(0x1f7)]=0x4]=_0x2a2473(0x1f7),_0x495b56[_0x495b56['Solve']=0x5]='Solve',_0x495b56[_0x495b56['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x495b56))(_0x6bcd17||{});const _0x4eef73=_0x1bd6c1=>_0x1489c4[_0x2a2473(0x206)](new Date(+_0x1bd6c1))['format']('YYYY/MM/DD\x20HH:mm'),_0x1d0b6c=async(_0x28c774,_0x40b12e)=>{const _0x55cc7d=_0x2a2473,_0x1ac15a=_0x28c774['get'](_0x1489c4[_0x55cc7d(0x217)]),_0x31d287=_0x28c774['get'](_0x126286[_0x55cc7d(0x1e7)]);_0x40b12e[_0x55cc7d(0x1a0)](_0x89b6b5=>{_0x1ac15a['getUser'](_0x89b6b5)&&_0x40b12e['delete'](_0x89b6b5);}),_0x40b12e['size']&&(await _0x31d287[_0x55cc7d(0x1ff)](_0x55cc7d(0x215),{'params':{'userIDs':[..._0x40b12e]}}))[_0x55cc7d(0x1d8)][_0x55cc7d(0x1ea)][_0x55cc7d(0x1a0)](_0x4ae922=>{const _0x3f89d8=_0x55cc7d;_0x4ae922&&_0x1ac15a[_0x3f89d8(0x1c0)](_0x4ae922);});};var _0x29ffc9=Object['getOwnPropertyDescriptor'],_0x2e5ae5=(_0x3c3732,_0x59dffd,_0x51211f,_0x20b7f2)=>{const _0x10871b=_0x2a2473;for(var _0x5c8b2c=_0x20b7f2>0x1?void 0x0:_0x20b7f2?_0x29ffc9(_0x59dffd,_0x51211f):_0x59dffd,_0x23e42f=_0x3c3732[_0x10871b(0x1ac)]-0x1,_0x72966a;_0x23e42f>=0x0;_0x23e42f--)(_0x72966a=_0x3c3732[_0x23e42f])&&(_0x5c8b2c=_0x72966a(_0x5c8b2c)||_0x5c8b2c);return _0x5c8b2c;},_0xdc392c=(_0x572491,_0x433cc0)=>(_0x271434,_0x538feb)=>_0x433cc0(_0x271434,_0x538feb,_0x572491);let _0x46f606=class extends _0x1489c4[_0x2a2473(0x1de)]{constructor(_0xeb5b06,_0x55c12c,_0x1a2331,_0x34f60b){const _0xdec1d=_0x2a2473;super(),this[_0xdec1d(0x1e0)]=_0xeb5b06,this[_0xdec1d(0x1b8)]=_0x55c12c,this[_0xdec1d(0x1dc)]=_0x1a2331,this[_0xdec1d(0x1ca)]=_0x34f60b,this[_0xdec1d(0x1c7)](),this['_initUserSync']();}['_initUserSync'](){const _0x748984=_0x2a2473;this[_0x748984(0x1c1)](this['_threadCommentModel']['commentUpdate$'][_0x748984(0x1bd)](_0x21d5eb[_0x748984(0x1c9)](0x10))[_0x748984(0x1e3)](_0xf2605e=>{const _0x53adf7=_0x748984,_0x5caf22=new Set();_0xf2605e[_0x53adf7(0x1a0)](_0x90158e=>{const _0x84979c=_0x53adf7;switch(_0x90158e['type']){case _0x84979c(0x1cd):{const _0x21bebf=_0x90158e[_0x84979c(0x1f2)][_0x84979c(0x202)];_0x5caf22[_0x84979c(0x1cd)](_0x21bebf);break;}}}),_0x1d0b6c(this[_0x53adf7(0x1ca)],_0x5caf22);}));}[_0x2a2473(0x1c7)](){const _0x3c599d=_0x2a2473;this[_0x3c599d(0x1c1)](this[_0x3c599d(0x1e0)]['commentUpdate$'][_0x3c599d(0x1e3)](async _0x2e45c7=>{const _0xa65795=_0x3c599d;var _0xb73c23,_0x203001,_0x5606ad,_0x19f058;const _0x1b6582=(_0xb73c23=this[_0xa65795(0x1b8)][_0xa65795(0x1a4)](_0x2e45c7['unitId'])[_0xa65795(0x1b2)](_0x1d9538=>_0x1d9538['threadId']===_0x2e45c7[_0xa65795(0x1d6)]))==null?void 0x0:_0xb73c23['root'];if(!_0x1b6582)return;const {unitId:_0x506de8,subUnitId:_0x3d2d33}=_0x1b6582;switch(_0x2e45c7[_0xa65795(0x1ab)]&&this[_0xa65795(0x1dc)]['addUser'](_0x2e45c7[_0xa65795(0x1ab)]),_0x2e45c7[_0xa65795(0x21d)]){case _0x6bcd17[_0xa65795(0x19f)]:break;case _0x6bcd17[_0xa65795(0x208)]:{this[_0xa65795(0x1b8)][_0xa65795(0x1c8)](_0x506de8,_0x3d2d33,{'unitId':_0x506de8,'subUnitId':_0x3d2d33,'ref':'','id':_0x2e45c7['replyId'],'dT':_0x4eef73(+_0x2e45c7[_0xa65795(0x1bc)]),'threadId':_0x2e45c7[_0xa65795(0x1d6)],'personId':(_0x5606ad=(_0x203001=_0x2e45c7['user'])==null?void 0x0:_0x203001[_0xa65795(0x1d0)])!=null?_0x5606ad:_0x2e45c7['userId'],'text':JSON[_0xa65795(0x1d1)](_0x2e45c7[_0xa65795(0x1c2)]),'parentId':_0x1b6582['id']});break;}case _0x6bcd17[_0xa65795(0x1f7)]:{const _0x4ec1fb=this['_threadCommentModel']['getComment'](_0x506de8,_0x3d2d33,_0x2e45c7['replyId']);_0x4ec1fb&&_0x4ec1fb[_0xa65795(0x1e1)]&&this[_0xa65795(0x1b8)]['deleteComment'](_0x506de8,_0x3d2d33,_0x2e45c7['replyId']);break;}case _0x6bcd17[_0xa65795(0x201)]:{this[_0xa65795(0x1b8)][_0xa65795(0x210)](_0x506de8,_0x3d2d33,{'commentId':_0x2e45c7['replyId'],'text':JSON['parse'](_0x2e45c7[_0xa65795(0x1c2)])});break;}case _0x6bcd17[_0xa65795(0x1f9)]:{const _0x3f3dad=(_0x19f058=this['_threadCommentModel'][_0xa65795(0x1a4)](_0x2e45c7[_0xa65795(0x1e8)])[_0xa65795(0x1b2)](_0x276535=>_0x276535[_0xa65795(0x1d6)]===_0x2e45c7['threadId']))==null?void 0x0:_0x19f058['root'];_0x3f3dad&&this['_threadCommentModel'][_0xa65795(0x20b)](_0x506de8,_0x3d2d33,_0x3f3dad['id'],_0x2e45c7['solved']===_0x4f9904['Solved']);break;}}}));}};_0x46f606=_0x2e5ae5([_0xdc392c(0x0,_0x1489c4[_0x2a2473(0x209)](_0x2bbcf7[_0x2a2473(0x1a2)])),_0xdc392c(0x1,_0x1489c4['Inject'](_0x3008b3[_0x2a2473(0x1b6)])),_0xdc392c(0x2,_0x1489c4[_0x2a2473(0x209)](_0x1489c4[_0x2a2473(0x217)])),_0xdc392c(0x3,_0x1489c4['Inject'](_0x1489c4[_0x2a2473(0x1b0)]))],_0x46f606);const _0x227be3='thread-comment-data-source.config',_0x247007={};var _0x4038ea=Object[_0x2a2473(0x1cb)],_0xc92523=(_0x3af91f,_0x117a1e,_0x4040fe,_0x4113fe)=>{for(var _0x1705a7=_0x4113fe>0x1?void 0x0:_0x4113fe?_0x4038ea(_0x117a1e,_0x4040fe):_0x117a1e,_0x57dabf=_0x3af91f['length']-0x1,_0x206032;_0x57dabf>=0x0;_0x57dabf--)(_0x206032=_0x3af91f[_0x57dabf])&&(_0x1705a7=_0x206032(_0x1705a7)||_0x1705a7);return _0x1705a7;},_0x4dcd8e=(_0x4fa435,_0x25dfdf)=>(_0x106a75,_0xc26e1c)=>_0x25dfdf(_0x106a75,_0xc26e1c,_0x4fa435);function _0x2c3cd3(_0x2c5714,_0x54b7cf){const _0x29f58b=_0x2a2473,_0x231c44=_0x2c5714['replies'][0x0];return{..._0x54b7cf,'id':_0x231c44['replyId'],'resolved':_0x2c5714[_0x29f58b(0x1bf)]===0x1,'dT':_0x4eef73(_0x231c44['createTimestamp']),'personId':_0x231c44['userId'],'threadId':_0x231c44['threadId']};}function _0x373eb9(_0x3200d0,_0x5ca5bd,_0x4b6724){const _0x4a4bac=_0x2a2473;var _0x4f92d1,_0x2b0906;if(((_0x2b0906=(_0x4f92d1=_0x3200d0==null?void 0x0:_0x3200d0[_0x4a4bac(0x1ed)])==null?void 0x0:_0x4f92d1[_0x4a4bac(0x1ac)])!=null?_0x2b0906:0x0)>0x0){const _0x52c5dd=(_0x3d14f5,_0x1e83d5)=>({'id':_0x3d14f5[_0x4a4bac(0x213)],'threadId':_0x3d14f5[_0x4a4bac(0x1d6)],'dT':_0x4eef73(_0x3d14f5[_0x4a4bac(0x1bc)]),'personId':_0x3d14f5[_0x4a4bac(0x203)],'resolved':_0x3200d0[_0x4a4bac(0x1bf)]===_0x4f9904[_0x4a4bac(0x1b3)],'unitId':_0x5ca5bd,'subUnitId':_0x4b6724,'text':JSON[_0x4a4bac(0x1d1)](_0x3d14f5['content']),'parentId':_0x1e83d5}),_0x481d6b=_0x52c5dd(_0x3200d0[_0x4a4bac(0x1ed)][0x0]);return{..._0x481d6b,'children':_0x3200d0[_0x4a4bac(0x1ed)][_0x4a4bac(0x1af)](0x1)[_0x4a4bac(0x1fd)](_0x51e985=>_0x52c5dd(_0x51e985,_0x481d6b['id']))};}return null;}let _0x102993=class{constructor(_0x4a2f2e,_0x2b1c98,_0x103a15,_0x428056){const _0x419c8d=_0x2a2473;this[_0x419c8d(0x21c)]=_0x4a2f2e,this['_userService']=_0x2b1c98,this[_0x419c8d(0x220)]=_0x103a15,this[_0x419c8d(0x1ca)]=_0x428056;}async[_0x2a2473(0x1c8)](_0x527074){const _0xcf14f0=_0x2a2473;var _0x1d0cab,_0x36152e;const {parentId:_0x3810eb,unitId:_0x4a201f,text:_0x28e235,threadId:_0xb2f580}=_0x527074,_0x345729=(_0x36152e=(_0x1d0cab=_0x28e235['customRanges'])==null?void 0x0:_0x1d0cab[_0xcf14f0(0x1ce)](_0x247767=>_0x247767[_0xcf14f0(0x1db)]===_0x1489c4['CustomRangeType'][_0xcf14f0(0x221)])['map'](_0x2ce5de=>_0x2ce5de[_0xcf14f0(0x1df)]))!=null?_0x36152e:[],_0x31bc91=JSON[_0xcf14f0(0x1fa)](_0x28e235),_0x1028a3=(await this['_sessionService']['requireSession'](_0x4a201f))[_0xcf14f0(0x1a7)]();if(_0x3810eb){const _0x516c67={'memberId':_0x1028a3,'unitId':_0x4a201f,'content':_0x31bc91,'mention':_0x345729,'threadId':_0xb2f580},_0x4bdd24=(await this[_0xcf14f0(0x21c)][_0xcf14f0(0x20c)](_0xcf14f0(0x1cc)+_0x4a201f+_0xcf14f0(0x1ae),{'body':_0x516c67}))[_0xcf14f0(0x1d8)]['reply'];return{..._0x527074,'id':_0x4bdd24['replyId'],'dT':_0x1489c4[_0xcf14f0(0x206)](+_0x4bdd24[_0xcf14f0(0x1bc)])[_0xcf14f0(0x1b4)](_0xcf14f0(0x1da)),'personId':_0x4bdd24[_0xcf14f0(0x203)]};}else{const _0x2b470b={'memberId':_0x1028a3,'unitId':_0x4a201f,'content':_0x31bc91,'mention':_0x345729},_0xdd9003=await this[_0xcf14f0(0x21c)]['post']('/universer-api/comment/unit/'+_0x4a201f+_0xcf14f0(0x1a6),{'body':_0x2b470b});return _0x2c3cd3(_0xdd9003[_0xcf14f0(0x1d8)][_0xcf14f0(0x1fb)],_0x527074);}}async['updateComment'](_0x41b375){const _0x13e07c=_0x2a2473;var _0x5abc78,_0x3a0387;const {text:_0x132de2,unitId:_0x4178fe}=_0x41b375,_0xfade61=(_0x3a0387=(_0x5abc78=_0x132de2[_0x13e07c(0x1b9)])==null?void 0x0:_0x5abc78[_0x13e07c(0x1ce)](_0x5a7b06=>_0x5a7b06[_0x13e07c(0x1db)]===_0x1489c4[_0x13e07c(0x21b)][_0x13e07c(0x221)])[_0x13e07c(0x1fd)](_0x2704be=>_0x2704be['rangeId']))!=null?_0x3a0387:[],_0x3cbc55=JSON[_0x13e07c(0x1fa)](_0x132de2),_0x3daa17=_0x41b375[_0x13e07c(0x1d6)],_0x51804a=_0x41b375['id'],_0x3d5903={'memberId':(await this[_0x13e07c(0x220)]['requireSession'](_0x4178fe))[_0x13e07c(0x1a7)](),'unitId':_0x4178fe,'threadId':_0x3daa17,'mention':_0xfade61,'content':_0x3cbc55,'replyId':_0x51804a},_0x2dbc7b=await this['_httpService'][_0x13e07c(0x20c)](_0x13e07c(0x1cc)+_0x4178fe+_0x13e07c(0x1f5),{'body':_0x3d5903});return!_0x2dbc7b[_0x13e07c(0x1d8)][_0x13e07c(0x20f)]||_0x2dbc7b[_0x13e07c(0x1d8)][_0x13e07c(0x20f)][_0x13e07c(0x1b7)]===0x1;}async[_0x2a2473(0x20b)](_0x28c0e3){const _0x1fa499=_0x2a2473,{unitId:_0x15ebcc}=_0x28c0e3,_0x5a1080=_0x28c0e3[_0x1fa499(0x1d6)],_0x240a99={'memberId':this[_0x1fa499(0x1dc)]['getCurrentUser']()[_0x1fa499(0x1d0)],'unitId':_0x15ebcc,'threadId':_0x5a1080,'solved':_0x28c0e3[_0x1fa499(0x1e5)]?_0x4f9904[_0x1fa499(0x1b3)]:_0x4f9904[_0x1fa499(0x1be)]},_0x38d3c1=await this['_httpService'][_0x1fa499(0x20c)](_0x1fa499(0x1cc)+_0x15ebcc+'/solved',{'body':_0x240a99});return!_0x38d3c1[_0x1fa499(0x1d8)][_0x1fa499(0x20f)]||_0x38d3c1['body'][_0x1fa499(0x20f)][_0x1fa499(0x1b7)]===0x1;}async[_0x2a2473(0x1ee)](_0x4afffe,_0x344a20,_0x15cb89,_0xaffa90){const _0x4ea657=_0x2a2473,_0x2f36a6={'memberId':(await this['_sessionService'][_0x4ea657(0x1eb)](_0x4afffe))[_0x4ea657(0x1a7)](),'threadId':_0x15cb89,'replyId':_0xaffa90,'unitId':_0x4afffe},_0x210aae=await this[_0x4ea657(0x21c)][_0x4ea657(0x20c)](_0x4ea657(0x1cc)+_0x4afffe+_0x4ea657(0x211),{'body':_0x2f36a6});return!_0x210aae[_0x4ea657(0x1d8)][_0x4ea657(0x20f)]||_0x210aae[_0x4ea657(0x1d8)][_0x4ea657(0x20f)]['code']===0x1;}async[_0x2a2473(0x1d9)](_0x33f36e,_0x445368,_0x506e41){const _0x1aded7=_0x2a2473,_0x42d6a8={'unitId':_0x33f36e,'threadId':_0x506e41},_0x524454=await this[_0x1aded7(0x21c)]['post']('/universer-api/comment/unit/'+_0x33f36e+_0x1aded7(0x1dd),{'body':_0x42d6a8}),_0x4f6a58=_0x506e41[_0x1aded7(0x1fd)](_0xb80c49=>_0x373eb9(_0x524454['body']['comments'][_0xb80c49],_0x33f36e,_0x445368))[_0x1aded7(0x1ce)](Boolean);return Object[_0x1aded7(0x21f)](_0x524454[_0x1aded7(0x1d8)][_0x1aded7(0x1ea)])[_0x1aded7(0x1a0)](_0x2457ec=>{this['_userService']['addUser'](_0x2457ec);}),_0x4f6a58;}[_0x2a2473(0x21e)](_0x24f30b){const _0x1733c2=_0x2a2473;return{'id':_0x24f30b['id'],'threadId':_0x24f30b[_0x1733c2(0x1d6)],'ref':_0x24f30b[_0x1733c2(0x1e4)]};}};_0x102993=_0xc92523([_0x4dcd8e(0x0,_0x1489c4['Inject'](_0x126286[_0x2a2473(0x1e7)])),_0x4dcd8e(0x1,_0x1489c4[_0x2a2473(0x209)](_0x1489c4[_0x2a2473(0x217)])),_0x4dcd8e(0x2,_0x1489c4['Inject'](_0x2bbcf7['CollaborationSessionService'])),_0x4dcd8e(0x3,_0x1489c4['Inject'](_0x1489c4['Injector']))],_0x102993);var _0x485ad3=Object[_0x2a2473(0x1cb)],_0x5c1e53=(_0x4db725,_0x52fd18,_0x12cbfb,_0x5e4a43)=>{const _0x193511=_0x2a2473;for(var _0xc73553=_0x5e4a43>0x1?void 0x0:_0x5e4a43?_0x485ad3(_0x52fd18,_0x12cbfb):_0x52fd18,_0xdce475=_0x4db725[_0x193511(0x1ac)]-0x1,_0x4fc099;_0xdce475>=0x0;_0xdce475--)(_0x4fc099=_0x4db725[_0xdce475])&&(_0xc73553=_0x4fc099(_0xc73553)||_0xc73553);return _0xc73553;},_0x3bb396=(_0x5aaab2,_0x1e7584)=>(_0x2e2f00,_0xa46db3)=>_0x1e7584(_0x2e2f00,_0xa46db3,_0x5aaab2);let _0x307c8d=class extends _0x1489c4[_0x2a2473(0x1de)]{constructor(_0x37101d,_0x36eb13){const _0x16d2e4=_0x2a2473;super(),this[_0x16d2e4(0x214)]=_0x37101d,this[_0x16d2e4(0x200)]=_0x36eb13,this[_0x16d2e4(0x20a)]();}['_initDataSource'](){const _0x2e8b5d=_0x2a2473;this[_0x2e8b5d(0x214)][_0x2e8b5d(0x1d5)]=this[_0x2e8b5d(0x200)],this[_0x2e8b5d(0x214)][_0x2e8b5d(0x1f6)]=!0x1;}};_0x307c8d=_0x5c1e53([_0x3bb396(0x0,_0x3008b3[_0x2a2473(0x1f8)]),_0x3bb396(0x1,_0x1489c4[_0x2a2473(0x209)](_0x102993))],_0x307c8d);var _0x573648=Object[_0x2a2473(0x1ef)],_0x169acb=Object[_0x2a2473(0x1cb)],_0x4964d5=(_0x37a19b,_0x2e5ec4,_0x2b27ea)=>_0x2e5ec4 in _0x37a19b?_0x573648(_0x37a19b,_0x2e5ec4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2b27ea}):_0x37a19b[_0x2e5ec4]=_0x2b27ea,_0xb99fee=(_0x5d0d00,_0x5d374e,_0x456541,_0x422209)=>{const _0xc94b9c=_0x2a2473;for(var _0x1b7c5d=_0x422209>0x1?void 0x0:_0x422209?_0x169acb(_0x5d374e,_0x456541):_0x5d374e,_0x378c02=_0x5d0d00[_0xc94b9c(0x1ac)]-0x1,_0x4a28bd;_0x378c02>=0x0;_0x378c02--)(_0x4a28bd=_0x5d0d00[_0x378c02])&&(_0x1b7c5d=_0x4a28bd(_0x1b7c5d)||_0x1b7c5d);return _0x1b7c5d;},_0x6043e1=(_0x1bb395,_0x2f2ecb)=>(_0x9dc5c3,_0x91f94)=>_0x2f2ecb(_0x9dc5c3,_0x91f94,_0x1bb395),_0x16fa90=(_0x46bd7f,_0x41271e,_0x265f04)=>_0x4964d5(_0x46bd7f,typeof _0x41271e!=_0x2a2473(0x1d4)?_0x41271e+'':_0x41271e,_0x265f04);_0x5b5f3f[_0x2a2473(0x1d2)]=class extends _0x1489c4[_0x2a2473(0x1fc)]{constructor(_0x30f31f=_0x247007,_0x3d230e,_0x55088f){const _0x2e35b9=_0x2a2473;super(),this['_config']=_0x30f31f,this[_0x2e35b9(0x1ca)]=_0x3d230e,this[_0x2e35b9(0x1f1)]=_0x55088f;const {..._0x44c26f}=_0x1489c4[_0x2e35b9(0x218)]({},_0x247007,this[_0x2e35b9(0x1e6)]);this[_0x2e35b9(0x1f1)]['setConfig'](_0x227be3,_0x44c26f);}['onStarting'](){[[_0x102993],[_0x307c8d],[_0x46f606]]['forEach'](_0xf6e540=>{const _0x38d385=_0x37da;this[_0x38d385(0x1ca)][_0x38d385(0x1cd)](_0xf6e540);});}[_0x2a2473(0x1a1)](){const _0x6c051c=_0x2a2473;this[_0x6c051c(0x1ca)][_0x6c051c(0x1ff)](_0x307c8d),this['_injector'][_0x6c051c(0x1ff)](_0x46f606);}},_0x16fa90(_0x5b5f3f[_0x2a2473(0x1d2)],'pluginName',_0x366665),_0x16fa90(_0x5b5f3f[_0x2a2473(0x1d2)],_0x2a2473(0x21d),_0x1489c4[_0x2a2473(0x1a8)][_0x2a2473(0x1a3)]),_0x5b5f3f['UniverThreadCommentDataSourcePlugin']=_0xb99fee([_0x1489c4[_0x2a2473(0x219)](_0x37cbe5[_0x2a2473(0x1c3)],_0x2bbcf7[_0x2a2473(0x207)],_0x3057e4[_0x2a2473(0x1b5)]),_0x6043e1(0x1,_0x1489c4[_0x2a2473(0x209)](_0x1489c4['Injector'])),_0x6043e1(0x2,_0x1489c4[_0x2a2473(0x205)])],_0x5b5f3f['UniverThreadCommentDataSourcePlugin']),Object[_0x2a2473(0x1ef)](_0x5b5f3f,Symbol[_0x2a2473(0x1fe)],{'value':_0x2a2473(0x1f0)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.7.0-beta.0",
3
+ "version": "0.7.0-nightly.202504301607",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.7.0-beta.0",
49
- "@univerjs/core": "0.7.0-beta.0",
50
- "@univerjs/network": "0.7.0-beta.0",
51
- "@univerjs-pro/license": "0.7.0-beta.0",
48
+ "@univerjs-pro/collaboration-client": "0.7.0-nightly.202504301607",
49
+ "@univerjs-pro/license": "0.7.0-nightly.202504301607",
50
+ "@univerjs/network": "0.7.0-nightly.202504301607",
51
+ "@univerjs/core": "0.7.0-nightly.202504301607",
52
52
  "@univerjs/protocol": "0.1.46-alpha.3",
53
- "@univerjs/thread-comment": "0.7.0-beta.0",
54
- "@univerjs/thread-comment-ui": "0.7.0-beta.0"
53
+ "@univerjs/thread-comment": "0.7.0-nightly.202504301607",
54
+ "@univerjs/thread-comment-ui": "0.7.0-nightly.202504301607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",