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

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 _0x32bf24=_0x28ba;(function(_0xc1044d,_0x421445){const _0x552ffb=_0x28ba,_0x4a4327=_0xc1044d();while(!![]){try{const _0xd7be0b=parseInt(_0x552ffb(0x25d))/0x1*(-parseInt(_0x552ffb(0x204))/0x2)+-parseInt(_0x552ffb(0x257))/0x3+-parseInt(_0x552ffb(0x221))/0x4+parseInt(_0x552ffb(0x1e9))/0x5+parseInt(_0x552ffb(0x1f0))/0x6*(-parseInt(_0x552ffb(0x1f5))/0x7)+-parseInt(_0x552ffb(0x1fc))/0x8*(parseInt(_0x552ffb(0x26b))/0x9)+parseInt(_0x552ffb(0x1ec))/0xa;if(_0xd7be0b===_0x421445)break;else _0x4a4327['push'](_0x4a4327['shift']());}catch(_0x3e83bb){_0x4a4327['push'](_0x4a4327['shift']());}}}(_0x28eb,0x9f9f3));function _0x28ba(_0x2bb994,_0x69103c){const _0x28eb3e=_0x28eb();return _0x28ba=function(_0x28ba12,_0x2cb552){_0x28ba12=_0x28ba12-0x1e8;let _0x212b15=_0x28eb3e[_0x28ba12];return _0x212b15;},_0x28ba(_0x2bb994,_0x69103c);}Object['defineProperty'](exports,Symbol[_0x32bf24(0x232)],{'value':_0x32bf24(0x1ff)});const b=require(_0x32bf24(0x1ea)),T=require(_0x32bf24(0x235)),c=require('@univerjs/core'),j=require(_0x32bf24(0x1f1)),M=require(_0x32bf24(0x234)),w=require(_0x32bf24(0x1ef)),P=require(_0x32bf24(0x20d)),U=_0x32bf24(0x1e8);var I=(_0x4ca070=>(_0x4ca070[_0x4ca070[_0x32bf24(0x253)]=0x0]=_0x32bf24(0x253),_0x4ca070[_0x4ca070[_0x32bf24(0x1f6)]=0x1]=_0x32bf24(0x1f6),_0x4ca070[_0x4ca070[_0x32bf24(0x23a)]=-0x1]=_0x32bf24(0x23a),_0x4ca070))(I||{}),v=(_0x39a7f9=>(_0x39a7f9[_0x39a7f9[_0x32bf24(0x24c)]=0x0]=_0x32bf24(0x24c),_0x39a7f9[_0x39a7f9[_0x32bf24(0x207)]=0x1]='Add',_0x39a7f9[_0x39a7f9[_0x32bf24(0x1fd)]=0x2]=_0x32bf24(0x1fd),_0x39a7f9[_0x39a7f9[_0x32bf24(0x241)]=0x3]=_0x32bf24(0x241),_0x39a7f9[_0x39a7f9['Delete']=0x4]='Delete',_0x39a7f9[_0x39a7f9[_0x32bf24(0x242)]=0x5]=_0x32bf24(0x242),_0x39a7f9[_0x39a7f9[_0x32bf24(0x23a)]=-0x1]='UNRECOGNIZED',_0x39a7f9))(v||{});const f=_0x1cad2=>c['dayjs'](new Date(+_0x1cad2))[_0x32bf24(0x21e)](_0x32bf24(0x267)),R=async(_0xbc68bf,_0x1aec37)=>{const _0x5a0c2f=_0x32bf24,_0x3c9cab=_0xbc68bf[_0x5a0c2f(0x26a)](c[_0x5a0c2f(0x226)]),_0x4b5e7b=_0xbc68bf[_0x5a0c2f(0x26a)](P['HTTPService']);_0x1aec37[_0x5a0c2f(0x211)](_0x301176=>{const _0x5b899c=_0x5a0c2f;_0x3c9cab[_0x5b899c(0x247)](_0x301176)&&_0x1aec37['delete'](_0x301176);}),_0x1aec37[_0x5a0c2f(0x24b)]&&(await _0x4b5e7b[_0x5a0c2f(0x26a)](_0x5a0c2f(0x209),{'params':{'userIDs':[..._0x1aec37]}}))[_0x5a0c2f(0x260)]['users'][_0x5a0c2f(0x211)](_0x1fccfd=>{const _0x2b9b7d=_0x5a0c2f;_0x1fccfd&&_0x3c9cab[_0x2b9b7d(0x210)](_0x1fccfd);});};var $=Object[_0x32bf24(0x21f)],E=(_0x3f4843,_0x49449e,_0x36ff1a,_0x555636)=>{const _0x3fe3f1=_0x32bf24;for(var _0x21354c=_0x555636>0x1?void 0x0:_0x555636?$(_0x49449e,_0x36ff1a):_0x49449e,_0x28ed06=_0x3f4843[_0x3fe3f1(0x259)]-0x1,_0x2845f6;_0x28ed06>=0x0;_0x28ed06--)(_0x2845f6=_0x3f4843[_0x28ed06])&&(_0x21354c=_0x2845f6(_0x21354c)||_0x21354c);return _0x21354c;},S=(_0x3b9d0e,_0x13a873)=>(_0x25584b,_0x47a235)=>_0x13a873(_0x25584b,_0x47a235,_0x3b9d0e);let p=class extends c['Disposable']{constructor(_0xdaf727,_0x218bd1,_0x3e1d60,_0xdbbd48){const _0x11cca4=_0x32bf24;super(),this[_0x11cca4(0x224)]=_0xdaf727,this[_0x11cca4(0x22f)]=_0x218bd1,this['_userService']=_0x3e1d60,this[_0x11cca4(0x246)]=_0xdbbd48,this[_0x11cca4(0x24e)](),this[_0x11cca4(0x1fa)]();}[_0x32bf24(0x1fa)](){const _0x18b669=_0x32bf24;this['disposeWithMe'](this['_threadCommentModel'][_0x18b669(0x236)][_0x18b669(0x21c)](w[_0x18b669(0x217)](0x10))[_0x18b669(0x20e)](_0x266e2a=>{const _0x4b8af9=new Set();_0x266e2a['forEach'](_0x579fbd=>{const _0x2e37f0=_0x28ba;switch(_0x579fbd[_0x2e37f0(0x249)]){case _0x2e37f0(0x23f):{const _0x438029=_0x579fbd[_0x2e37f0(0x213)][_0x2e37f0(0x205)];_0x4b8af9[_0x2e37f0(0x23f)](_0x438029);break;}}}),R(this['_injector'],_0x4b8af9);}));}['_init'](){const _0x1b44d8=_0x32bf24;this[_0x1b44d8(0x248)](this['_commentService'][_0x1b44d8(0x236)][_0x1b44d8(0x20e)](async _0x54c955=>{const _0x4350cc=_0x1b44d8;var _0x59dff3,_0x577ec4,_0x3076f4,_0x1e4692;const _0x38e56e=(_0x59dff3=this[_0x4350cc(0x22f)]['getUnit'](_0x54c955['unitId'])[_0x4350cc(0x1ee)](_0x42ea23=>_0x42ea23[_0x4350cc(0x222)]===_0x54c955[_0x4350cc(0x222)]))==null?void 0x0:_0x59dff3[_0x4350cc(0x200)];if(!_0x38e56e)return;const {unitId:_0x312a15,subUnitId:_0x2d7d0f}=_0x38e56e;switch(_0x54c955[_0x4350cc(0x22c)]&&this['_userService'][_0x4350cc(0x210)](_0x54c955[_0x4350cc(0x22c)]),_0x54c955['type']){case v[_0x4350cc(0x207)]:break;case v[_0x4350cc(0x1fd)]:{this[_0x4350cc(0x22f)][_0x4350cc(0x1f3)](_0x312a15,_0x2d7d0f,{'unitId':_0x312a15,'subUnitId':_0x2d7d0f,'ref':'','id':_0x54c955['replyId'],'dT':f(+_0x54c955[_0x4350cc(0x25e)]),'threadId':_0x54c955[_0x4350cc(0x222)],'personId':(_0x3076f4=(_0x577ec4=_0x54c955['user'])==null?void 0x0:_0x577ec4[_0x4350cc(0x24d)])!=null?_0x3076f4:_0x54c955[_0x4350cc(0x254)],'text':JSON[_0x4350cc(0x261)](_0x54c955[_0x4350cc(0x266)]),'parentId':_0x38e56e['id']});break;}case v[_0x4350cc(0x25f)]:{const _0x15a9d9=this[_0x4350cc(0x22f)][_0x4350cc(0x225)](_0x312a15,_0x2d7d0f,_0x54c955[_0x4350cc(0x1f9)]);_0x15a9d9&&_0x15a9d9[_0x4350cc(0x1fe)]&&this['_threadCommentModel'][_0x4350cc(0x20c)](_0x312a15,_0x2d7d0f,_0x54c955['replyId']);break;}case v[_0x4350cc(0x241)]:{this[_0x4350cc(0x22f)][_0x4350cc(0x25c)](_0x312a15,_0x2d7d0f,{'commentId':_0x54c955[_0x4350cc(0x1f9)],'text':JSON['parse'](_0x54c955[_0x4350cc(0x266)])});break;}case v[_0x4350cc(0x242)]:{const _0x277da1=(_0x1e4692=this[_0x4350cc(0x22f)][_0x4350cc(0x258)](_0x54c955[_0x4350cc(0x269)])[_0x4350cc(0x1ee)](_0x259866=>_0x259866[_0x4350cc(0x222)]===_0x54c955['threadId']))==null?void 0x0:_0x1e4692[_0x4350cc(0x200)];_0x277da1&&this[_0x4350cc(0x22f)][_0x4350cc(0x22d)](_0x312a15,_0x2d7d0f,_0x277da1['id'],_0x54c955['solved']===I[_0x4350cc(0x1f6)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x32bf24(0x231)])),S(0x1,c[_0x32bf24(0x1ed)](M[_0x32bf24(0x22e)])),S(0x2,c[_0x32bf24(0x1ed)](c[_0x32bf24(0x226)])),S(0x3,c[_0x32bf24(0x1ed)](c['Injector']))],p);const q=_0x32bf24(0x250),D={};function _0x28eb(){const _0x288c5e=['bufferTime','UniverThreadCommentUIPlugin','error','DependentOn','onStarting','pipe','/universer-api/comment/unit/','format','getOwnPropertyDescriptor','code','4316140CJzZob','threadId','comments','_commentService','getComment','UserManagerService','users','_httpService','Injector','/reply','Disposable','user','resolveComment','ThreadCommentModel','_threadCommentModel','defineProperty','CommentService','toStringTag','post','@univerjs/thread-comment','@univerjs-pro/license','commentUpdate$','reply','pluginName','getMemberID','UNRECOGNIZED','_config','requireSession','comment','UniverCollaborationClientPlugin','add','dataSource','Edit','Solve','/add','UNIVER_UNKNOWN','dayjs','_injector','getUser','disposeWithMe','type','rangeId','size','Unknown','userID','_init','_userService','thread-comment-data-source.config','stringify','CollaborationSessionService','OpenOrReOpen','userId','ref','/list','3598539EXusPZ','getUnit','length','_sessionService','HTTPService','updateComment','211384RGiLLF','createTimestamp','Delete','body','parse','values','COMMENT','onReady','_initDataSource','content','YYYY/MM/DD\x20HH:mm','IThreadCommentDataSourceService','unitId','get','3724029DYVkZz','UniverThreadCommentDataSourcePlugin','merge','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','474135PzUKKL','@univerjs-pro/collaboration-client','replies','62861720nILUVE','Inject','find','rxjs','6902262CDaXYd','@univerjs/thread-comment-ui','/edit','addComment','symbol','7jasVfu','Solved','syncUpdateMutationToColla','resolved','replyId','_initUserSync','/solved','24sNryiW','Reply','parentId','Module','root','solved','CustomRangeType','UniverInstanceType','10hrFdna','personId','getCurrentUser','Add','_threadCommentDataSourceService','/universer-api/user/list','rangeType','saveCommentToSnapshot','deleteComment','@univerjs/network','subscribe','map','addUser','forEach','filter','payload','_configService','listComments','_threadCommentDataSource'];_0x28eb=function(){return _0x288c5e;};return _0x28eb();}var A=Object[_0x32bf24(0x21f)],x=(_0xab5f43,_0x516de3,_0x508b1d,_0x2a35df)=>{const _0x5c69f6=_0x32bf24;for(var _0x272d20=_0x2a35df>0x1?void 0x0:_0x2a35df?A(_0x516de3,_0x508b1d):_0x516de3,_0x7651f1=_0xab5f43[_0x5c69f6(0x259)]-0x1,_0x5a1a84;_0x7651f1>=0x0;_0x7651f1--)(_0x5a1a84=_0xab5f43[_0x7651f1])&&(_0x272d20=_0x5a1a84(_0x272d20)||_0x272d20);return _0x272d20;},_=(_0xad6636,_0x1033b2)=>(_0x24b6b2,_0x31bda6)=>_0x1033b2(_0x24b6b2,_0x31bda6,_0xad6636);function Y(_0xceb71f,_0x1411a9){const _0x4cd374=_0x32bf24,_0x21da1c=_0xceb71f[_0x4cd374(0x1eb)][0x0];return{..._0x1411a9,'id':_0x21da1c['replyId'],'resolved':_0xceb71f[_0x4cd374(0x201)]===0x1,'dT':f(_0x21da1c['createTimestamp']),'personId':_0x21da1c[_0x4cd374(0x254)],'threadId':_0x21da1c[_0x4cd374(0x222)]};}function G(_0x2735ef,_0x53a45c,_0x277187){const _0x4b6ce5=_0x32bf24;var _0x4542c4,_0x2426cc;if(((_0x2426cc=(_0x4542c4=_0x2735ef==null?void 0x0:_0x2735ef[_0x4b6ce5(0x1eb)])==null?void 0x0:_0x4542c4['length'])!=null?_0x2426cc:0x0)>0x0){const _0x367cb2=(_0x45ffe4,_0x2ea1c2)=>({'id':_0x45ffe4['replyId'],'threadId':_0x45ffe4[_0x4b6ce5(0x222)],'dT':f(_0x45ffe4[_0x4b6ce5(0x25e)]),'personId':_0x45ffe4[_0x4b6ce5(0x254)],'resolved':_0x2735ef[_0x4b6ce5(0x201)]===I['Solved'],'unitId':_0x53a45c,'subUnitId':_0x277187,'text':JSON[_0x4b6ce5(0x261)](_0x45ffe4[_0x4b6ce5(0x266)]),'parentId':_0x2ea1c2}),_0x2a9e30=_0x367cb2(_0x2735ef['replies'][0x0]);return{..._0x2a9e30,'children':_0x2735ef['replies']['slice'](0x1)['map'](_0xabd79f=>_0x367cb2(_0xabd79f,_0x2a9e30['id']))};}return null;}let g=class{constructor(_0x2ab868,_0x1ad747,_0x1abc77,_0x33c090){const _0x2f4d3d=_0x32bf24;this[_0x2f4d3d(0x228)]=_0x2ab868,this[_0x2f4d3d(0x24f)]=_0x1ad747,this['_sessionService']=_0x1abc77,this[_0x2f4d3d(0x246)]=_0x33c090;}async[_0x32bf24(0x1f3)](_0x57d36c){const _0x40cff3=_0x32bf24;var _0x483af0,_0x4c3150;const {parentId:_0x46240c,unitId:_0x591126,text:_0x460228,threadId:_0x2bb440}=_0x57d36c,_0x2052bd=(_0x4c3150=(_0x483af0=_0x460228['customRanges'])==null?void 0x0:_0x483af0[_0x40cff3(0x212)](_0x8b7540=>_0x8b7540[_0x40cff3(0x20a)]===c['CustomRangeType'][_0x40cff3(0x263)])[_0x40cff3(0x20f)](_0x183287=>_0x183287[_0x40cff3(0x24a)]))!=null?_0x4c3150:[],_0x3be949=JSON[_0x40cff3(0x251)](_0x460228),_0x213c0d=(await this[_0x40cff3(0x25a)]['requireSession'](_0x591126))['getMemberID']();if(_0x46240c){const _0x1a1464={'memberId':_0x213c0d,'unitId':_0x591126,'content':_0x3be949,'mention':_0x2052bd,'threadId':_0x2bb440},_0x47c28f=(await this[_0x40cff3(0x228)][_0x40cff3(0x233)]('/universer-api/comment/unit/'+_0x591126+_0x40cff3(0x22a),{'body':_0x1a1464}))['body'][_0x40cff3(0x237)];return{..._0x57d36c,'id':_0x47c28f[_0x40cff3(0x1f9)],'dT':c[_0x40cff3(0x245)](+_0x47c28f['createTimestamp'])[_0x40cff3(0x21e)](_0x40cff3(0x267)),'personId':_0x47c28f[_0x40cff3(0x254)]};}else{const _0x11fe77={'memberId':_0x213c0d,'unitId':_0x591126,'content':_0x3be949,'mention':_0x2052bd},_0x3c6c27=await this['_httpService']['post'](_0x40cff3(0x21d)+_0x591126+_0x40cff3(0x243),{'body':_0x11fe77});return Y(_0x3c6c27[_0x40cff3(0x260)][_0x40cff3(0x23d)],_0x57d36c);}}async[_0x32bf24(0x25c)](_0x118e1f){const _0x1a5dab=_0x32bf24;var _0x4e2bd6,_0x342783;const {text:_0x2e24c2,unitId:_0x4a5320}=_0x118e1f,_0x1bb527=(_0x342783=(_0x4e2bd6=_0x2e24c2['customRanges'])==null?void 0x0:_0x4e2bd6['filter'](_0x2d4b82=>_0x2d4b82[_0x1a5dab(0x20a)]===c[_0x1a5dab(0x202)][_0x1a5dab(0x263)])[_0x1a5dab(0x20f)](_0x1f52d6=>_0x1f52d6['rangeId']))!=null?_0x342783:[],_0x2a9552=JSON['stringify'](_0x2e24c2),_0x2faaab=_0x118e1f['threadId'],_0x328801=_0x118e1f['id'],_0x4d668f={'memberId':(await this['_sessionService'][_0x1a5dab(0x23c)](_0x4a5320))['getMemberID'](),'unitId':_0x4a5320,'threadId':_0x2faaab,'mention':_0x1bb527,'content':_0x2a9552,'replyId':_0x328801},_0x14903f=await this[_0x1a5dab(0x228)]['post'](_0x1a5dab(0x21d)+_0x4a5320+_0x1a5dab(0x1f2),{'body':_0x4d668f});return!_0x14903f[_0x1a5dab(0x260)][_0x1a5dab(0x219)]||_0x14903f['body']['error'][_0x1a5dab(0x220)]===0x1;}async[_0x32bf24(0x22d)](_0x37f8fd){const _0x35abb9=_0x32bf24,{unitId:_0x296e9a}=_0x37f8fd,_0x3974c9=_0x37f8fd[_0x35abb9(0x222)],_0x1190c5={'memberId':this[_0x35abb9(0x24f)][_0x35abb9(0x206)]()[_0x35abb9(0x24d)],'unitId':_0x296e9a,'threadId':_0x3974c9,'solved':_0x37f8fd[_0x35abb9(0x1f8)]?I['Solved']:I['OpenOrReOpen']},_0x88c3f4=await this[_0x35abb9(0x228)][_0x35abb9(0x233)](_0x35abb9(0x21d)+_0x296e9a+_0x35abb9(0x1fb),{'body':_0x1190c5});return!_0x88c3f4['body']['error']||_0x88c3f4[_0x35abb9(0x260)][_0x35abb9(0x219)][_0x35abb9(0x220)]===0x1;}async[_0x32bf24(0x20c)](_0xbe1276,_0x59c941,_0x3450df,_0x4a8c6f){const _0x49d824=_0x32bf24,_0x4f928d={'memberId':(await this['_sessionService'][_0x49d824(0x23c)](_0xbe1276))[_0x49d824(0x239)](),'threadId':_0x3450df,'replyId':_0x4a8c6f,'unitId':_0xbe1276},_0x525073=await this['_httpService']['post'](_0x49d824(0x21d)+_0xbe1276+'/delete',{'body':_0x4f928d});return!_0x525073[_0x49d824(0x260)][_0x49d824(0x219)]||_0x525073[_0x49d824(0x260)]['error']['code']===0x1;}async[_0x32bf24(0x215)](_0x479f51,_0x4f3a5d,_0x41d3d8){const _0x35e738=_0x32bf24,_0x402a90={'unitId':_0x479f51,'threadId':_0x41d3d8},_0x240b44=await this['_httpService'][_0x35e738(0x233)](_0x35e738(0x21d)+_0x479f51+_0x35e738(0x256),{'body':_0x402a90}),_0x7ee5de=_0x41d3d8['map'](_0x592aff=>G(_0x240b44[_0x35e738(0x260)][_0x35e738(0x223)][_0x592aff],_0x479f51,_0x4f3a5d))[_0x35e738(0x212)](Boolean);return Object[_0x35e738(0x262)](_0x240b44[_0x35e738(0x260)][_0x35e738(0x227)])[_0x35e738(0x211)](_0x94c6b2=>{const _0x1eaa89=_0x35e738;this[_0x1eaa89(0x24f)]['addUser'](_0x94c6b2);}),_0x7ee5de;}[_0x32bf24(0x20b)](_0x49b265){const _0x3aa705=_0x32bf24;return{'id':_0x49b265['id'],'threadId':_0x49b265[_0x3aa705(0x222)],'ref':_0x49b265[_0x3aa705(0x255)]};}};g=x([_(0x0,c[_0x32bf24(0x1ed)](P[_0x32bf24(0x25b)])),_(0x1,c[_0x32bf24(0x1ed)](c['UserManagerService'])),_(0x2,c['Inject'](b[_0x32bf24(0x252)])),_(0x3,c['Inject'](c[_0x32bf24(0x229)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x3b3e4e,_0xa03f4f,_0x296124,_0x59987c)=>{for(var _0x2bac5e=_0x59987c>0x1?void 0x0:_0x59987c?H(_0xa03f4f,_0x296124):_0xa03f4f,_0x77cff4=_0x3b3e4e['length']-0x1,_0x179712;_0x77cff4>=0x0;_0x77cff4--)(_0x179712=_0x3b3e4e[_0x77cff4])&&(_0x2bac5e=_0x179712(_0x2bac5e)||_0x2bac5e);return _0x2bac5e;},y=(_0xa86682,_0x2526f6)=>(_0xdab616,_0x1569e2)=>_0x2526f6(_0xdab616,_0x1569e2,_0xa86682);let C=class extends c[_0x32bf24(0x22b)]{constructor(_0x55838f,_0x401ca2){const _0x1d85cb=_0x32bf24;super(),this[_0x1d85cb(0x208)]=_0x55838f,this[_0x1d85cb(0x216)]=_0x401ca2,this[_0x1d85cb(0x265)]();}['_initDataSource'](){const _0x57e909=_0x32bf24;this[_0x57e909(0x208)][_0x57e909(0x240)]=this[_0x57e909(0x216)],this[_0x57e909(0x208)][_0x57e909(0x1f7)]=!0x1;}};C=J([y(0x0,M[_0x32bf24(0x268)]),y(0x1,c[_0x32bf24(0x1ed)](g))],C);var F=Object[_0x32bf24(0x230)],L=Object[_0x32bf24(0x21f)],Z=(_0x44400c,_0x3b724e,_0x13d384)=>_0x3b724e in _0x44400c?F(_0x44400c,_0x3b724e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x13d384}):_0x44400c[_0x3b724e]=_0x13d384,W=(_0x25c230,_0x32cd07,_0x260495,_0x23acde)=>{const _0x8eeb21=_0x32bf24;for(var _0xc3b646=_0x23acde>0x1?void 0x0:_0x23acde?L(_0x32cd07,_0x260495):_0x32cd07,_0x38c613=_0x25c230[_0x8eeb21(0x259)]-0x1,_0x5d4ef7;_0x38c613>=0x0;_0x38c613--)(_0x5d4ef7=_0x25c230[_0x38c613])&&(_0xc3b646=_0x5d4ef7(_0xc3b646)||_0xc3b646);return _0xc3b646;},O=(_0x40c00d,_0xf7af8a)=>(_0x36fc8e,_0xe10767)=>_0xf7af8a(_0x36fc8e,_0xe10767,_0x40c00d),N=(_0x20e3e8,_0x4bd495,_0x3917da)=>Z(_0x20e3e8,typeof _0x4bd495!=_0x32bf24(0x1f4)?_0x4bd495+'':_0x4bd495,_0x3917da);exports[_0x32bf24(0x26c)]=class extends c['Plugin']{constructor(_0x487a69=D,_0x2b1133,_0x3e3150){const _0x2dd4db=_0x32bf24;super(),this['_config']=_0x487a69,this['_injector']=_0x2b1133,this[_0x2dd4db(0x214)]=_0x3e3150;const {..._0x3ea356}=c[_0x2dd4db(0x26d)]({},D,this[_0x2dd4db(0x23b)]);this[_0x2dd4db(0x214)]['setConfig'](q,_0x3ea356);}[_0x32bf24(0x21b)](){const _0x1e6f0d=_0x32bf24;[[g],[C],[p]][_0x1e6f0d(0x211)](_0x253ab1=>{const _0xe6bd58=_0x1e6f0d;this[_0xe6bd58(0x246)][_0xe6bd58(0x23f)](_0x253ab1);});}[_0x32bf24(0x264)](){const _0x41cfff=_0x32bf24;this[_0x41cfff(0x246)]['get'](C),this[_0x41cfff(0x246)][_0x41cfff(0x26a)](p);}},N(exports[_0x32bf24(0x26c)],_0x32bf24(0x238),U),N(exports[_0x32bf24(0x26c)],_0x32bf24(0x249),c[_0x32bf24(0x203)][_0x32bf24(0x244)]),exports[_0x32bf24(0x26c)]=W([c[_0x32bf24(0x21a)](j[_0x32bf24(0x218)],b[_0x32bf24(0x23e)],T['UniverLicensePlugin']),O(0x1,c['Inject'](c['Injector'])),O(0x2,c['IConfigService'])],exports[_0x32bf24(0x26c)]);
1
+ 'use strict';const _0x24cd7f=_0x48cf;(function(_0x2e5aa8,_0x3a4b0e){const _0x596b5f=_0x48cf,_0x20b676=_0x2e5aa8();while(!![]){try{const _0x25c708=-parseInt(_0x596b5f(0x10b))/0x1+parseInt(_0x596b5f(0xdc))/0x2+parseInt(_0x596b5f(0xc6))/0x3*(parseInt(_0x596b5f(0x10e))/0x4)+parseInt(_0x596b5f(0xbb))/0x5*(-parseInt(_0x596b5f(0x134))/0x6)+parseInt(_0x596b5f(0x117))/0x7*(parseInt(_0x596b5f(0xf5))/0x8)+parseInt(_0x596b5f(0x122))/0x9+-parseInt(_0x596b5f(0xdd))/0xa*(parseInt(_0x596b5f(0x11f))/0xb);if(_0x25c708===_0x3a4b0e)break;else _0x20b676['push'](_0x20b676['shift']());}catch(_0x3ec97b){_0x20b676['push'](_0x20b676['shift']());}}}(_0xf7c7,0x2c742));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x24cd7f(0xcc)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x24cd7f(0xeb)),c=require(_0x24cd7f(0xba)),j=require(_0x24cd7f(0xcf)),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x24cd7f(0x119);var I=(_0x5dfb21=>(_0x5dfb21[_0x5dfb21['OpenOrReOpen']=0x0]=_0x24cd7f(0xf2),_0x5dfb21[_0x5dfb21[_0x24cd7f(0x12d)]=0x1]='Solved',_0x5dfb21[_0x5dfb21['UNRECOGNIZED']=-0x1]=_0x24cd7f(0xdb),_0x5dfb21))(I||{}),v=(_0x379c1d=>(_0x379c1d[_0x379c1d[_0x24cd7f(0xf8)]=0x0]=_0x24cd7f(0xf8),_0x379c1d[_0x379c1d[_0x24cd7f(0xc9)]=0x1]='Add',_0x379c1d[_0x379c1d[_0x24cd7f(0x104)]=0x2]=_0x24cd7f(0x104),_0x379c1d[_0x379c1d[_0x24cd7f(0xff)]=0x3]=_0x24cd7f(0xff),_0x379c1d[_0x379c1d[_0x24cd7f(0x114)]=0x4]=_0x24cd7f(0x114),_0x379c1d[_0x379c1d[_0x24cd7f(0x123)]=0x5]='Solve',_0x379c1d[_0x379c1d[_0x24cd7f(0xdb)]=-0x1]='UNRECOGNIZED',_0x379c1d))(v||{});function _0xf7c7(){const _0x1c5888=['filter','pipe','/reply','content','/universer-api/user/list','Delete','solved','_initDataSource','14917ytkCKI','unitId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','onReady','bufferTime','_init','_configService','body','88aJXnFZ','error','map','1108296kifsTu','Solve','getUser','UniverLicensePlugin','reply','Plugin','/solved','addComment','type','DependentOn','HTTPService','Solved','comments','disposeWithMe','onStarting','personId','deleteComment','CustomRangeType','110652fxqfgI','defineProperty','size','addUser','threadId','@univerjs/core','85HDwawR','_initUserSync','code','users','payload','forEach','slice','_injector','userID','UniverThreadCommentDataSourcePlugin','Disposable','3UXCjIO','_config','UniverThreadCommentUIPlugin','Add','_threadCommentDataSourceService','dataSource','Module','getMemberID','delete','@univerjs/thread-comment-ui','Injector','_httpService','get','replies','CollaborationSessionService','ThreadCommentModel','COMMENT','/universer-api/comment/unit/','replyId','Inject','commentUpdate$','UNRECOGNIZED','690140RYqVFt','141050RVoQQd','UserManagerService','_userService','_commentService','userId','createTimestamp','rangeId','pluginName','symbol','/list','resolveComment','root','_threadCommentModel','updateComment','@univerjs-pro/license','_sessionService','ref','subscribe','getUnit','post','add','OpenOrReOpen','find','format','552yNkHfi','stringify','getOwnPropertyDescriptor','Unknown','syncUpdateMutationToColla','_threadCommentDataSource','YYYY/MM/DD\x20HH:mm','merge','/add','user','Edit','customRanges','parse','IThreadCommentDataSourceService','length','Reply','parentId','UNIVER_UNKNOWN','comment','listComments','IConfigService','saveCommentToSnapshot','326766gcCKCA','requireSession','thread-comment-data-source.config','1279796jLTXkS'];_0xf7c7=function(){return _0x1c5888;};return _0xf7c7();}const f=_0x2ec48a=>c['dayjs'](new Date(+_0x2ec48a))[_0x24cd7f(0xf4)](_0x24cd7f(0xfb)),R=async(_0x479c9b,_0x151f08)=>{const _0x4d57f5=_0x24cd7f,_0x54c409=_0x479c9b[_0x4d57f5(0xd2)](c[_0x4d57f5(0xde)]),_0x4cefec=_0x479c9b[_0x4d57f5(0xd2)](P[_0x4d57f5(0x12c)]);_0x151f08[_0x4d57f5(0xc0)](_0x38fa52=>{const _0x1fc802=_0x4d57f5;_0x54c409[_0x1fc802(0x124)](_0x38fa52)&&_0x151f08[_0x1fc802(0xce)](_0x38fa52);}),_0x151f08[_0x4d57f5(0xb7)]&&(await _0x4cefec['get'](_0x4d57f5(0x113),{'params':{'userIDs':[..._0x151f08]}}))[_0x4d57f5(0x11e)][_0x4d57f5(0xbe)][_0x4d57f5(0xc0)](_0x41b9ae=>{const _0x3c460e=_0x4d57f5;_0x41b9ae&&_0x54c409[_0x3c460e(0xb8)](_0x41b9ae);});};var $=Object[_0x24cd7f(0xf7)],E=(_0x5c3653,_0x1f4f2e,_0xa3397b,_0x233ac2)=>{const _0x51ffee=_0x24cd7f;for(var _0x26c193=_0x233ac2>0x1?void 0x0:_0x233ac2?$(_0x1f4f2e,_0xa3397b):_0x1f4f2e,_0x47add2=_0x5c3653[_0x51ffee(0x103)]-0x1,_0x3a6785;_0x47add2>=0x0;_0x47add2--)(_0x3a6785=_0x5c3653[_0x47add2])&&(_0x26c193=_0x3a6785(_0x26c193)||_0x26c193);return _0x26c193;},S=(_0x40090a,_0x2efe13)=>(_0xb110b0,_0x2ca2e8)=>_0x2efe13(_0xb110b0,_0x2ca2e8,_0x40090a);let p=class extends c[_0x24cd7f(0xc5)]{constructor(_0x3a2fb9,_0xdacefd,_0xbfa23b,_0x5691da){const _0x5a2990=_0x24cd7f;super(),this[_0x5a2990(0xe0)]=_0x3a2fb9,this[_0x5a2990(0xe9)]=_0xdacefd,this[_0x5a2990(0xdf)]=_0xbfa23b,this[_0x5a2990(0xc2)]=_0x5691da,this[_0x5a2990(0x11c)](),this[_0x5a2990(0xbc)]();}[_0x24cd7f(0xbc)](){const _0x3a74b7=_0x24cd7f;this[_0x3a74b7(0x12f)](this['_threadCommentModel'][_0x3a74b7(0xda)][_0x3a74b7(0x110)](w[_0x3a74b7(0x11b)](0x10))[_0x3a74b7(0xee)](_0x5c26a0=>{const _0x112582=_0x3a74b7,_0x302d5e=new Set();_0x5c26a0[_0x112582(0xc0)](_0x4fa186=>{const _0x5c133f=_0x112582;switch(_0x4fa186[_0x5c133f(0x12a)]){case _0x5c133f(0xf1):{const _0x30b30e=_0x4fa186[_0x5c133f(0xbf)][_0x5c133f(0x131)];_0x302d5e[_0x5c133f(0xf1)](_0x30b30e);break;}}}),R(this[_0x112582(0xc2)],_0x302d5e);}));}[_0x24cd7f(0x11c)](){this['disposeWithMe'](this['_commentService']['commentUpdate$']['subscribe'](async _0x41257a=>{const _0x2552b0=_0x48cf;var _0xb88aa7,_0x208c3b,_0x17bd03,_0x383091;const _0x139182=(_0xb88aa7=this['_threadCommentModel'][_0x2552b0(0xef)](_0x41257a[_0x2552b0(0x118)])[_0x2552b0(0xf3)](_0x3ea0e4=>_0x3ea0e4[_0x2552b0(0xb9)]===_0x41257a[_0x2552b0(0xb9)]))==null?void 0x0:_0xb88aa7[_0x2552b0(0xe8)];if(!_0x139182)return;const {unitId:_0x519515,subUnitId:_0x6b23c}=_0x139182;switch(_0x41257a[_0x2552b0(0xfe)]&&this[_0x2552b0(0xdf)][_0x2552b0(0xb8)](_0x41257a['user']),_0x41257a[_0x2552b0(0x12a)]){case v[_0x2552b0(0xc9)]:break;case v['Reply']:{this[_0x2552b0(0xe9)][_0x2552b0(0x129)](_0x519515,_0x6b23c,{'unitId':_0x519515,'subUnitId':_0x6b23c,'ref':'','id':_0x41257a[_0x2552b0(0xd8)],'dT':f(+_0x41257a['createTimestamp']),'threadId':_0x41257a['threadId'],'personId':(_0x17bd03=(_0x208c3b=_0x41257a[_0x2552b0(0xfe)])==null?void 0x0:_0x208c3b[_0x2552b0(0xc3)])!=null?_0x17bd03:_0x41257a[_0x2552b0(0xe1)],'text':JSON[_0x2552b0(0x101)](_0x41257a[_0x2552b0(0x112)]),'parentId':_0x139182['id']});break;}case v[_0x2552b0(0x114)]:{const _0xae078a=this[_0x2552b0(0xe9)]['getComment'](_0x519515,_0x6b23c,_0x41257a[_0x2552b0(0xd8)]);_0xae078a&&_0xae078a[_0x2552b0(0x105)]&&this['_threadCommentModel']['deleteComment'](_0x519515,_0x6b23c,_0x41257a[_0x2552b0(0xd8)]);break;}case v[_0x2552b0(0xff)]:{this[_0x2552b0(0xe9)][_0x2552b0(0xea)](_0x519515,_0x6b23c,{'commentId':_0x41257a[_0x2552b0(0xd8)],'text':JSON[_0x2552b0(0x101)](_0x41257a[_0x2552b0(0x112)])});break;}case v[_0x2552b0(0x123)]:{const _0x204500=(_0x383091=this[_0x2552b0(0xe9)][_0x2552b0(0xef)](_0x41257a[_0x2552b0(0x118)])[_0x2552b0(0xf3)](_0x3af9fe=>_0x3af9fe['threadId']===_0x41257a['threadId']))==null?void 0x0:_0x383091[_0x2552b0(0xe8)];_0x204500&&this['_threadCommentModel'][_0x2552b0(0xe7)](_0x519515,_0x6b23c,_0x204500['id'],_0x41257a[_0x2552b0(0x115)]===I[_0x2552b0(0x12d)]);break;}}}));}};p=E([S(0x0,c[_0x24cd7f(0xd9)](b['CommentService'])),S(0x1,c[_0x24cd7f(0xd9)](M[_0x24cd7f(0xd5)])),S(0x2,c['Inject'](c[_0x24cd7f(0xde)])),S(0x3,c[_0x24cd7f(0xd9)](c[_0x24cd7f(0xd0)]))],p);const q=_0x24cd7f(0x10d),D={};var A=Object[_0x24cd7f(0xf7)],x=(_0x105fd3,_0x491c3b,_0x13a3c8,_0x5cb772)=>{for(var _0x469438=_0x5cb772>0x1?void 0x0:_0x5cb772?A(_0x491c3b,_0x13a3c8):_0x491c3b,_0x51e1a1=_0x105fd3['length']-0x1,_0x165db2;_0x51e1a1>=0x0;_0x51e1a1--)(_0x165db2=_0x105fd3[_0x51e1a1])&&(_0x469438=_0x165db2(_0x469438)||_0x469438);return _0x469438;},_=(_0x3b6bd8,_0x1ad0d0)=>(_0x46a18d,_0x2a0720)=>_0x1ad0d0(_0x46a18d,_0x2a0720,_0x3b6bd8);function Y(_0x6e2f35,_0x26e03d){const _0x5be93f=_0x24cd7f,_0x5ab89d=_0x6e2f35[_0x5be93f(0xd3)][0x0];return{..._0x26e03d,'id':_0x5ab89d[_0x5be93f(0xd8)],'resolved':_0x6e2f35[_0x5be93f(0x115)]===0x1,'dT':f(_0x5ab89d[_0x5be93f(0xe2)]),'personId':_0x5ab89d[_0x5be93f(0xe1)],'threadId':_0x5ab89d['threadId']};}function _0x48cf(_0x30cc5d,_0x25e750){const _0xf7c7f8=_0xf7c7();return _0x48cf=function(_0x48cf82,_0x3231d1){_0x48cf82=_0x48cf82-0xb7;let _0x1687d3=_0xf7c7f8[_0x48cf82];return _0x1687d3;},_0x48cf(_0x30cc5d,_0x25e750);}function G(_0x168684,_0x520577,_0xf09982){const _0x56e814=_0x24cd7f;var _0x29ad35,_0x29c570;if(((_0x29c570=(_0x29ad35=_0x168684==null?void 0x0:_0x168684[_0x56e814(0xd3)])==null?void 0x0:_0x29ad35['length'])!=null?_0x29c570:0x0)>0x0){const _0x521c68=(_0x4d5cff,_0x11e879)=>({'id':_0x4d5cff[_0x56e814(0xd8)],'threadId':_0x4d5cff['threadId'],'dT':f(_0x4d5cff['createTimestamp']),'personId':_0x4d5cff[_0x56e814(0xe1)],'resolved':_0x168684[_0x56e814(0x115)]===I[_0x56e814(0x12d)],'unitId':_0x520577,'subUnitId':_0xf09982,'text':JSON[_0x56e814(0x101)](_0x4d5cff[_0x56e814(0x112)]),'parentId':_0x11e879}),_0x172d7a=_0x521c68(_0x168684[_0x56e814(0xd3)][0x0]);return{..._0x172d7a,'children':_0x168684[_0x56e814(0xd3)][_0x56e814(0xc1)](0x1)[_0x56e814(0x121)](_0x4b8737=>_0x521c68(_0x4b8737,_0x172d7a['id']))};}return null;}let g=class{constructor(_0x24fa46,_0x10415a,_0x4d68bf,_0x5d80eb){const _0xe25e88=_0x24cd7f;this[_0xe25e88(0xd1)]=_0x24fa46,this[_0xe25e88(0xdf)]=_0x10415a,this[_0xe25e88(0xec)]=_0x4d68bf,this['_injector']=_0x5d80eb;}async[_0x24cd7f(0x129)](_0x3cea79){const _0xdb57c7=_0x24cd7f;var _0x4157ac,_0x440567;const {parentId:_0x17a3c5,unitId:_0x2add0d,text:_0x18baa5,threadId:_0x589b73}=_0x3cea79,_0x2fa42=(_0x440567=(_0x4157ac=_0x18baa5[_0xdb57c7(0x100)])==null?void 0x0:_0x4157ac[_0xdb57c7(0x10f)](_0x134781=>_0x134781['rangeType']===c[_0xdb57c7(0x133)][_0xdb57c7(0xd6)])['map'](_0x4db88d=>_0x4db88d['rangeId']))!=null?_0x440567:[],_0x47cab2=JSON[_0xdb57c7(0xf6)](_0x18baa5),_0x25328b=(await this[_0xdb57c7(0xec)]['requireSession'](_0x2add0d))[_0xdb57c7(0xcd)]();if(_0x17a3c5){const _0x3f10dd={'memberId':_0x25328b,'unitId':_0x2add0d,'content':_0x47cab2,'mention':_0x2fa42,'threadId':_0x589b73},_0x1bd0c5=(await this[_0xdb57c7(0xd1)][_0xdb57c7(0xf0)](_0xdb57c7(0xd7)+_0x2add0d+_0xdb57c7(0x111),{'body':_0x3f10dd}))[_0xdb57c7(0x11e)][_0xdb57c7(0x126)];return{..._0x3cea79,'id':_0x1bd0c5['replyId'],'dT':c['dayjs'](+_0x1bd0c5['createTimestamp'])[_0xdb57c7(0xf4)](_0xdb57c7(0xfb)),'personId':_0x1bd0c5[_0xdb57c7(0xe1)]};}else{const _0x57cdb7={'memberId':_0x25328b,'unitId':_0x2add0d,'content':_0x47cab2,'mention':_0x2fa42},_0x44f028=await this['_httpService'][_0xdb57c7(0xf0)](_0xdb57c7(0xd7)+_0x2add0d+_0xdb57c7(0xfd),{'body':_0x57cdb7});return Y(_0x44f028['body'][_0xdb57c7(0x107)],_0x3cea79);}}async['updateComment'](_0x21b14e){const _0x47213c=_0x24cd7f;var _0x5f051b,_0xe97167;const {text:_0x38cefe,unitId:_0x1cdf49}=_0x21b14e,_0x54608c=(_0xe97167=(_0x5f051b=_0x38cefe[_0x47213c(0x100)])==null?void 0x0:_0x5f051b[_0x47213c(0x10f)](_0x2ce8e1=>_0x2ce8e1['rangeType']===c[_0x47213c(0x133)][_0x47213c(0xd6)])[_0x47213c(0x121)](_0x3606bb=>_0x3606bb[_0x47213c(0xe3)]))!=null?_0xe97167:[],_0x44a8bc=JSON[_0x47213c(0xf6)](_0x38cefe),_0x544622=_0x21b14e[_0x47213c(0xb9)],_0x43d7cc=_0x21b14e['id'],_0x267335={'memberId':(await this['_sessionService'][_0x47213c(0x10c)](_0x1cdf49))[_0x47213c(0xcd)](),'unitId':_0x1cdf49,'threadId':_0x544622,'mention':_0x54608c,'content':_0x44a8bc,'replyId':_0x43d7cc},_0x94106f=await this[_0x47213c(0xd1)][_0x47213c(0xf0)](_0x47213c(0xd7)+_0x1cdf49+'/edit',{'body':_0x267335});return!_0x94106f['body']['error']||_0x94106f[_0x47213c(0x11e)][_0x47213c(0x120)]['code']===0x1;}async['resolveComment'](_0x2ae74c){const _0x33574a=_0x24cd7f,{unitId:_0x405af1}=_0x2ae74c,_0x5bf048=_0x2ae74c['threadId'],_0x5a318a={'memberId':this['_userService']['getCurrentUser']()[_0x33574a(0xc3)],'unitId':_0x405af1,'threadId':_0x5bf048,'solved':_0x2ae74c['resolved']?I[_0x33574a(0x12d)]:I[_0x33574a(0xf2)]},_0x890cea=await this[_0x33574a(0xd1)][_0x33574a(0xf0)]('/universer-api/comment/unit/'+_0x405af1+_0x33574a(0x128),{'body':_0x5a318a});return!_0x890cea[_0x33574a(0x11e)][_0x33574a(0x120)]||_0x890cea[_0x33574a(0x11e)][_0x33574a(0x120)][_0x33574a(0xbd)]===0x1;}async[_0x24cd7f(0x132)](_0x1fa43b,_0x3d9d65,_0x4e1cd,_0xae5bba){const _0x9dc541=_0x24cd7f,_0x486317={'memberId':(await this['_sessionService'][_0x9dc541(0x10c)](_0x1fa43b))[_0x9dc541(0xcd)](),'threadId':_0x4e1cd,'replyId':_0xae5bba,'unitId':_0x1fa43b},_0x5a6e5b=await this['_httpService'][_0x9dc541(0xf0)](_0x9dc541(0xd7)+_0x1fa43b+'/delete',{'body':_0x486317});return!_0x5a6e5b[_0x9dc541(0x11e)][_0x9dc541(0x120)]||_0x5a6e5b[_0x9dc541(0x11e)]['error'][_0x9dc541(0xbd)]===0x1;}async[_0x24cd7f(0x108)](_0x17fec5,_0x44a24d,_0x3757f7){const _0x5a3280=_0x24cd7f,_0x526aab={'unitId':_0x17fec5,'threadId':_0x3757f7},_0x1f4a1d=await this['_httpService'][_0x5a3280(0xf0)](_0x5a3280(0xd7)+_0x17fec5+_0x5a3280(0xe6),{'body':_0x526aab}),_0x2f5da4=_0x3757f7['map'](_0x5f25cb=>G(_0x1f4a1d[_0x5a3280(0x11e)][_0x5a3280(0x12e)][_0x5f25cb],_0x17fec5,_0x44a24d))[_0x5a3280(0x10f)](Boolean);return Object['values'](_0x1f4a1d['body'][_0x5a3280(0xbe)])[_0x5a3280(0xc0)](_0xe3937f=>{const _0x58950f=_0x5a3280;this[_0x58950f(0xdf)]['addUser'](_0xe3937f);}),_0x2f5da4;}[_0x24cd7f(0x10a)](_0x4ea6dd){const _0x256dec=_0x24cd7f;return{'id':_0x4ea6dd['id'],'threadId':_0x4ea6dd[_0x256dec(0xb9)],'ref':_0x4ea6dd[_0x256dec(0xed)]};}};g=x([_(0x0,c['Inject'](P[_0x24cd7f(0x12c)])),_(0x1,c[_0x24cd7f(0xd9)](c[_0x24cd7f(0xde)])),_(0x2,c[_0x24cd7f(0xd9)](b[_0x24cd7f(0xd4)])),_(0x3,c['Inject'](c[_0x24cd7f(0xd0)]))],g);var H=Object[_0x24cd7f(0xf7)],J=(_0x247382,_0x531161,_0x3cc8c8,_0x4dda94)=>{const _0x3d95fb=_0x24cd7f;for(var _0xe172d8=_0x4dda94>0x1?void 0x0:_0x4dda94?H(_0x531161,_0x3cc8c8):_0x531161,_0x4c3319=_0x247382[_0x3d95fb(0x103)]-0x1,_0x2dd14e;_0x4c3319>=0x0;_0x4c3319--)(_0x2dd14e=_0x247382[_0x4c3319])&&(_0xe172d8=_0x2dd14e(_0xe172d8)||_0xe172d8);return _0xe172d8;},y=(_0x5260da,_0xf40068)=>(_0x103204,_0x154be4)=>_0xf40068(_0x103204,_0x154be4,_0x5260da);let C=class extends c[_0x24cd7f(0xc5)]{constructor(_0x4354f7,_0x5f5305){const _0x4a71b1=_0x24cd7f;super(),this['_threadCommentDataSourceService']=_0x4354f7,this[_0x4a71b1(0xfa)]=_0x5f5305,this[_0x4a71b1(0x116)]();}['_initDataSource'](){const _0x4102c3=_0x24cd7f;this['_threadCommentDataSourceService'][_0x4102c3(0xcb)]=this[_0x4102c3(0xfa)],this[_0x4102c3(0xca)][_0x4102c3(0xf9)]=!0x1;}};C=J([y(0x0,M[_0x24cd7f(0x102)]),y(0x1,c[_0x24cd7f(0xd9)](g))],C);var F=Object[_0x24cd7f(0x135)],L=Object['getOwnPropertyDescriptor'],Z=(_0x38c5dc,_0xf19c4,_0x5b9478)=>_0xf19c4 in _0x38c5dc?F(_0x38c5dc,_0xf19c4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5b9478}):_0x38c5dc[_0xf19c4]=_0x5b9478,W=(_0x337cbc,_0x1facc5,_0x10d4db,_0x4a9594)=>{const _0x25caed=_0x24cd7f;for(var _0x1299d0=_0x4a9594>0x1?void 0x0:_0x4a9594?L(_0x1facc5,_0x10d4db):_0x1facc5,_0x2bc413=_0x337cbc[_0x25caed(0x103)]-0x1,_0x48b1ad;_0x2bc413>=0x0;_0x2bc413--)(_0x48b1ad=_0x337cbc[_0x2bc413])&&(_0x1299d0=_0x48b1ad(_0x1299d0)||_0x1299d0);return _0x1299d0;},O=(_0x515aa7,_0x4d6b01)=>(_0x5a329b,_0x3a8c78)=>_0x4d6b01(_0x5a329b,_0x3a8c78,_0x515aa7),N=(_0x3e9ce7,_0x4a8d3c,_0x2abfd1)=>Z(_0x3e9ce7,typeof _0x4a8d3c!=_0x24cd7f(0xe5)?_0x4a8d3c+'':_0x4a8d3c,_0x2abfd1);exports[_0x24cd7f(0xc4)]=class extends c[_0x24cd7f(0x127)]{constructor(_0x1fa87b=D,_0x28a78f,_0x250814){const _0x5aaf66=_0x24cd7f;super(),this[_0x5aaf66(0xc7)]=_0x1fa87b,this['_injector']=_0x28a78f,this[_0x5aaf66(0x11d)]=_0x250814;const {..._0x582a69}=c[_0x5aaf66(0xfc)]({},D,this['_config']);this[_0x5aaf66(0x11d)]['setConfig'](q,_0x582a69);}[_0x24cd7f(0x130)](){const _0x4c9884=_0x24cd7f;[[g],[C],[p]][_0x4c9884(0xc0)](_0x4fec74=>{const _0x1cee96=_0x4c9884;this[_0x1cee96(0xc2)][_0x1cee96(0xf1)](_0x4fec74);});}[_0x24cd7f(0x11a)](){const _0x48f178=_0x24cd7f;this[_0x48f178(0xc2)]['get'](C),this[_0x48f178(0xc2)]['get'](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x24cd7f(0xe4),U),N(exports[_0x24cd7f(0xc4)],_0x24cd7f(0x12a),c['UniverInstanceType'][_0x24cd7f(0x106)]),exports[_0x24cd7f(0xc4)]=W([c[_0x24cd7f(0x12b)](j[_0x24cd7f(0xc8)],b['UniverCollaborationClientPlugin'],T[_0x24cd7f(0x125)]),O(0x1,c['Inject'](c[_0x24cd7f(0xd0)])),O(0x2,c[_0x24cd7f(0x109)])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x361ff7=_0x2b3d;(function(_0x3b8dfd,_0x23b7d1){const _0x2726bb=_0x2b3d,_0x2a2d8a=_0x3b8dfd();while(!![]){try{const _0x3bc8a1=-parseInt(_0x2726bb(0x14f))/0x1+parseInt(_0x2726bb(0x11c))/0x2+parseInt(_0x2726bb(0x123))/0x3*(-parseInt(_0x2726bb(0x178))/0x4)+-parseInt(_0x2726bb(0x13d))/0x5+parseInt(_0x2726bb(0x144))/0x6+-parseInt(_0x2726bb(0x127))/0x7+parseInt(_0x2726bb(0x17a))/0x8*(parseInt(_0x2726bb(0x126))/0x9);if(_0x3bc8a1===_0x23b7d1)break;else _0x2a2d8a['push'](_0x2a2d8a['shift']());}catch(_0x16e457){_0x2a2d8a['push'](_0x2a2d8a['shift']());}}}(_0x1ab1,0x60da5));import{CommentService as _0x550980,CollaborationSessionService as _0xed4b95,UniverCollaborationClientPlugin as _0x1f4157}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x50fae2}from'@univerjs-pro/license';import{dayjs as _0x453ba2,UserManagerService as _0x230923,Inject as _0x4c9cd9,Injector as _0x1592aa,Disposable as _0xaf25f7,CustomRangeType as _0x32fdec,UniverInstanceType as _0x5015d6,DependentOn as _0x434b14,IConfigService as _0x2808c2,Plugin as _0x375e34,merge as _0x3bd94e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4bca2b}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x51ac0f,IThreadCommentDataSourceService as _0x38d4a8}from'@univerjs/thread-comment';import{bufferTime as _0x2c3f39}from'rxjs';import{HTTPService as _0x13c39a}from'@univerjs/network';const W=_0x361ff7(0x15c);var I=(_0x43eb89=>(_0x43eb89[_0x43eb89[_0x361ff7(0x15b)]=0x0]=_0x361ff7(0x15b),_0x43eb89[_0x43eb89[_0x361ff7(0x12e)]=0x1]=_0x361ff7(0x12e),_0x43eb89[_0x43eb89[_0x361ff7(0x164)]=-0x1]=_0x361ff7(0x164),_0x43eb89))(I||{}),v=(_0x6d47e4=>(_0x6d47e4[_0x6d47e4['Unknown']=0x0]=_0x361ff7(0x175),_0x6d47e4[_0x6d47e4[_0x361ff7(0x13f)]=0x1]=_0x361ff7(0x13f),_0x6d47e4[_0x6d47e4[_0x361ff7(0x180)]=0x2]=_0x361ff7(0x180),_0x6d47e4[_0x6d47e4[_0x361ff7(0x16b)]=0x3]='Edit',_0x6d47e4[_0x6d47e4[_0x361ff7(0x17b)]=0x4]='Delete',_0x6d47e4[_0x6d47e4[_0x361ff7(0x12d)]=0x5]=_0x361ff7(0x12d),_0x6d47e4[_0x6d47e4[_0x361ff7(0x164)]=-0x1]=_0x361ff7(0x164),_0x6d47e4))(v||{});const D=_0x2ad013=>_0x453ba2(new Date(+_0x2ad013))[_0x361ff7(0x16c)](_0x361ff7(0x13a)),B=async(_0x1bc43e,_0x333760)=>{const _0x37d30e=_0x361ff7,_0x4799ba=_0x1bc43e[_0x37d30e(0x176)](_0x230923),_0x5acad5=_0x1bc43e['get'](_0x13c39a);_0x333760[_0x37d30e(0x136)](_0x25ad47=>{const _0x3ec9dc=_0x37d30e;_0x4799ba[_0x3ec9dc(0x16e)](_0x25ad47)&&_0x333760[_0x3ec9dc(0x13b)](_0x25ad47);}),_0x333760[_0x37d30e(0x125)]&&(await _0x5acad5[_0x37d30e(0x176)](_0x37d30e(0x12b),{'params':{'userIDs':[..._0x333760]}}))[_0x37d30e(0x119)]['users'][_0x37d30e(0x136)](_0xdb7fd5=>{_0xdb7fd5&&_0x4799ba['addUser'](_0xdb7fd5);});};var K=Object[_0x361ff7(0x121)],V=(_0xa4a34c,_0x75f4ba,_0x12ff7f,_0x670346)=>{const _0x3a553c=_0x361ff7;for(var _0x40cfa9=_0x670346>0x1?void 0x0:_0x670346?K(_0x75f4ba,_0x12ff7f):_0x75f4ba,_0x2dd1f0=_0xa4a34c[_0x3a553c(0x11d)]-0x1,_0x1d9674;_0x2dd1f0>=0x0;_0x2dd1f0--)(_0x1d9674=_0xa4a34c[_0x2dd1f0])&&(_0x40cfa9=_0x1d9674(_0x40cfa9)||_0x40cfa9);return _0x40cfa9;},p=(_0x17e6e4,_0xe04232)=>(_0x3b1e38,_0x2bf4bf)=>_0xe04232(_0x3b1e38,_0x2bf4bf,_0x17e6e4);function _0x2b3d(_0x38e0cb,_0x3d6b74){const _0x1ab131=_0x1ab1();return _0x2b3d=function(_0x2b3d77,_0x2ed7e1){_0x2b3d77=_0x2b3d77-0x119;let _0x3962fd=_0x1ab131[_0x2b3d77];return _0x3962fd;},_0x2b3d(_0x38e0cb,_0x3d6b74);}let S=class extends _0xaf25f7{constructor(_0x32a74d,_0x4cbcd9,_0x5edc86,_0x298108){const _0x37a336=_0x361ff7;super(),this[_0x37a336(0x122)]=_0x32a74d,this[_0x37a336(0x147)]=_0x4cbcd9,this[_0x37a336(0x165)]=_0x5edc86,this[_0x37a336(0x128)]=_0x298108,this[_0x37a336(0x168)](),this[_0x37a336(0x140)]();}[_0x361ff7(0x140)](){const _0x104cbb=_0x361ff7;this[_0x104cbb(0x120)](this[_0x104cbb(0x147)][_0x104cbb(0x15a)][_0x104cbb(0x14d)](_0x2c3f39(0x10))['subscribe'](_0xb9ee1f=>{const _0x3c7d97=_0x104cbb,_0x29ed2e=new Set();_0xb9ee1f[_0x3c7d97(0x136)](_0x53b36e=>{const _0x38de08=_0x3c7d97;switch(_0x53b36e[_0x38de08(0x172)]){case _0x38de08(0x14c):{const _0x9c8192=_0x53b36e[_0x38de08(0x16d)]['personId'];_0x29ed2e[_0x38de08(0x14c)](_0x9c8192);break;}}}),B(this[_0x3c7d97(0x128)],_0x29ed2e);}));}['_init'](){const _0x51ac85=_0x361ff7;this[_0x51ac85(0x120)](this[_0x51ac85(0x122)][_0x51ac85(0x15a)][_0x51ac85(0x163)](async _0x17de44=>{const _0x358862=_0x51ac85;var _0x1a5e8a,_0xb4a3a9,_0x333f70,_0x538181;const _0x36a951=(_0x1a5e8a=this[_0x358862(0x147)]['getUnit'](_0x17de44[_0x358862(0x142)])[_0x358862(0x170)](_0x451c5e=>_0x451c5e['threadId']===_0x17de44['threadId']))==null?void 0x0:_0x1a5e8a['root'];if(!_0x36a951)return;const {unitId:_0x4004bd,subUnitId:_0x17d3bf}=_0x36a951;switch(_0x17de44[_0x358862(0x12a)]&&this[_0x358862(0x165)][_0x358862(0x130)](_0x17de44[_0x358862(0x12a)]),_0x17de44['type']){case v['Add']:break;case v[_0x358862(0x180)]:{this[_0x358862(0x147)][_0x358862(0x153)](_0x4004bd,_0x17d3bf,{'unitId':_0x4004bd,'subUnitId':_0x17d3bf,'ref':'','id':_0x17de44[_0x358862(0x17c)],'dT':D(+_0x17de44[_0x358862(0x138)]),'threadId':_0x17de44['threadId'],'personId':(_0x333f70=(_0xb4a3a9=_0x17de44[_0x358862(0x12a)])==null?void 0x0:_0xb4a3a9['userID'])!=null?_0x333f70:_0x17de44[_0x358862(0x146)],'text':JSON[_0x358862(0x177)](_0x17de44[_0x358862(0x135)]),'parentId':_0x36a951['id']});break;}case v[_0x358862(0x17b)]:{const _0x594598=this[_0x358862(0x147)]['getComment'](_0x4004bd,_0x17d3bf,_0x17de44['replyId']);_0x594598&&_0x594598[_0x358862(0x13c)]&&this[_0x358862(0x147)][_0x358862(0x14e)](_0x4004bd,_0x17d3bf,_0x17de44[_0x358862(0x17c)]);break;}case v[_0x358862(0x16b)]:{this['_threadCommentModel']['updateComment'](_0x4004bd,_0x17d3bf,{'commentId':_0x17de44[_0x358862(0x17c)],'text':JSON[_0x358862(0x177)](_0x17de44['content'])});break;}case v[_0x358862(0x12d)]:{const _0x5adef5=(_0x538181=this[_0x358862(0x147)][_0x358862(0x141)](_0x17de44['unitId'])[_0x358862(0x170)](_0x523fc8=>_0x523fc8[_0x358862(0x145)]===_0x17de44[_0x358862(0x145)]))==null?void 0x0:_0x538181[_0x358862(0x134)];_0x5adef5&&this[_0x358862(0x147)]['resolveComment'](_0x4004bd,_0x17d3bf,_0x5adef5['id'],_0x17de44[_0x358862(0x173)]===I[_0x358862(0x12e)]);break;}}}));}};S=V([p(0x0,_0x4c9cd9(_0x550980)),p(0x1,_0x4c9cd9(_0x51ac0f)),p(0x2,_0x4c9cd9(_0x230923)),p(0x3,_0x4c9cd9(_0x1592aa))],S);const z=_0x361ff7(0x154),M={};function _0x1ab1(){const _0xb90c2c=['Solved','dataSource','addUser','replies','ref','getMemberID','root','content','forEach','setConfig','createTimestamp','_initDataSource','YYYY/MM/DD\x20HH:mm','delete','parentId','1861005ZxZnHv','rangeId','Add','_initUserSync','getUnit','unitId','UNIVER_UNKNOWN','2834496hEMLOf','threadId','userId','_threadCommentModel','userID','_configService','comment','/reply','add','pipe','deleteComment','85830ovYLdY','/delete','_sessionService','filter','addComment','thread-comment-data-source.config','reply','defineProperty','resolveComment','symbol','code','commentUpdate$','OpenOrReOpen','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/edit','post','comments','/list','_threadCommentDataSource','stringify','subscribe','UNRECOGNIZED','_userService','_config','_threadCommentDataSourceService','_init','/universer-api/comment/unit/','requireSession','Edit','format','payload','getUser','COMMENT','find','pluginName','type','solved','syncUpdateMutationToColla','Unknown','get','parse','4UTFVrR','onReady','71048JiKkRL','Delete','replyId','listComments','customRanges','getCurrentUser','Reply','map','body','/solved','users','1368642uIDPiw','length','rangeType','_httpService','disposeWithMe','getOwnPropertyDescriptor','_commentService','987741EYoUbe','error','size','351RRFTME','2233763tTHEqj','_injector','slice','user','/universer-api/user/list','/add','Solve'];_0x1ab1=function(){return _0xb90c2c;};return _0x1ab1();}var k=Object[_0x361ff7(0x121)],Q=(_0x1ff86c,_0xb0fb5f,_0x169f2a,_0x24bf4b)=>{for(var _0x18079d=_0x24bf4b>0x1?void 0x0:_0x24bf4b?k(_0xb0fb5f,_0x169f2a):_0xb0fb5f,_0x3e9778=_0x1ff86c['length']-0x1,_0x49cef4;_0x3e9778>=0x0;_0x3e9778--)(_0x49cef4=_0x1ff86c[_0x3e9778])&&(_0x18079d=_0x49cef4(_0x18079d)||_0x18079d);return _0x18079d;},_=(_0x596ad6,_0x449f02)=>(_0x310cd7,_0x4cf512)=>_0x449f02(_0x310cd7,_0x4cf512,_0x596ad6);function X(_0x598a7f,_0x3e3b3c){const _0x60820d=_0x361ff7,_0x21b693=_0x598a7f[_0x60820d(0x131)][0x0];return{..._0x3e3b3c,'id':_0x21b693[_0x60820d(0x17c)],'resolved':_0x598a7f[_0x60820d(0x173)]===0x1,'dT':D(_0x21b693[_0x60820d(0x138)]),'personId':_0x21b693[_0x60820d(0x146)],'threadId':_0x21b693['threadId']};}function ee(_0x4b1d5b,_0x3502d3,_0x151f3c){const _0x13ff7d=_0x361ff7;var _0x17a31a,_0x1f24dc;if(((_0x1f24dc=(_0x17a31a=_0x4b1d5b==null?void 0x0:_0x4b1d5b['replies'])==null?void 0x0:_0x17a31a[_0x13ff7d(0x11d)])!=null?_0x1f24dc:0x0)>0x0){const _0x33940f=(_0x219e26,_0x1c170f)=>({'id':_0x219e26[_0x13ff7d(0x17c)],'threadId':_0x219e26[_0x13ff7d(0x145)],'dT':D(_0x219e26[_0x13ff7d(0x138)]),'personId':_0x219e26[_0x13ff7d(0x146)],'resolved':_0x4b1d5b['solved']===I[_0x13ff7d(0x12e)],'unitId':_0x3502d3,'subUnitId':_0x151f3c,'text':JSON[_0x13ff7d(0x177)](_0x219e26['content']),'parentId':_0x1c170f}),_0x3dbeb8=_0x33940f(_0x4b1d5b[_0x13ff7d(0x131)][0x0]);return{..._0x3dbeb8,'children':_0x4b1d5b[_0x13ff7d(0x131)][_0x13ff7d(0x129)](0x1)['map'](_0xcaab3e=>_0x33940f(_0xcaab3e,_0x3dbeb8['id']))};}return null;}let f=class{constructor(_0x36b86b,_0x59304f,_0x102033,_0x55d464){const _0x5ae170=_0x361ff7;this['_httpService']=_0x36b86b,this[_0x5ae170(0x165)]=_0x59304f,this[_0x5ae170(0x151)]=_0x102033,this['_injector']=_0x55d464;}async['addComment'](_0x4f94bc){const _0x2c7dd2=_0x361ff7;var _0x2a0c30,_0x22d5e2;const {parentId:_0x520163,unitId:_0x5d1eb2,text:_0xfbc3db,threadId:_0x1ea3ab}=_0x4f94bc,_0xd6ae0c=(_0x22d5e2=(_0x2a0c30=_0xfbc3db[_0x2c7dd2(0x17e)])==null?void 0x0:_0x2a0c30[_0x2c7dd2(0x152)](_0x5e0a86=>_0x5e0a86[_0x2c7dd2(0x11e)]===_0x32fdec[_0x2c7dd2(0x16f)])[_0x2c7dd2(0x181)](_0x1eb04a=>_0x1eb04a[_0x2c7dd2(0x13e)]))!=null?_0x22d5e2:[],_0x1a3539=JSON[_0x2c7dd2(0x162)](_0xfbc3db),_0x573dac=(await this['_sessionService'][_0x2c7dd2(0x16a)](_0x5d1eb2))[_0x2c7dd2(0x133)]();if(_0x520163){const _0x440989={'memberId':_0x573dac,'unitId':_0x5d1eb2,'content':_0x1a3539,'mention':_0xd6ae0c,'threadId':_0x1ea3ab},_0x1d3075=(await this[_0x2c7dd2(0x11f)][_0x2c7dd2(0x15e)](_0x2c7dd2(0x169)+_0x5d1eb2+_0x2c7dd2(0x14b),{'body':_0x440989}))[_0x2c7dd2(0x119)][_0x2c7dd2(0x155)];return{..._0x4f94bc,'id':_0x1d3075['replyId'],'dT':_0x453ba2(+_0x1d3075[_0x2c7dd2(0x138)])[_0x2c7dd2(0x16c)](_0x2c7dd2(0x13a)),'personId':_0x1d3075['userId']};}else{const _0x4bb6ce={'memberId':_0x573dac,'unitId':_0x5d1eb2,'content':_0x1a3539,'mention':_0xd6ae0c},_0x175faa=await this[_0x2c7dd2(0x11f)][_0x2c7dd2(0x15e)](_0x2c7dd2(0x169)+_0x5d1eb2+_0x2c7dd2(0x12c),{'body':_0x4bb6ce});return X(_0x175faa[_0x2c7dd2(0x119)][_0x2c7dd2(0x14a)],_0x4f94bc);}}async['updateComment'](_0x205399){const _0x481f7b=_0x361ff7;var _0x41e766,_0x227547;const {text:_0x2d957f,unitId:_0x24ce9d}=_0x205399,_0x1dddaa=(_0x227547=(_0x41e766=_0x2d957f['customRanges'])==null?void 0x0:_0x41e766[_0x481f7b(0x152)](_0x523bdc=>_0x523bdc[_0x481f7b(0x11e)]===_0x32fdec['COMMENT'])[_0x481f7b(0x181)](_0x5e718e=>_0x5e718e['rangeId']))!=null?_0x227547:[],_0x4d5791=JSON[_0x481f7b(0x162)](_0x2d957f),_0x5aa590=_0x205399['threadId'],_0x3136b7=_0x205399['id'],_0x1eb828={'memberId':(await this[_0x481f7b(0x151)][_0x481f7b(0x16a)](_0x24ce9d))[_0x481f7b(0x133)](),'unitId':_0x24ce9d,'threadId':_0x5aa590,'mention':_0x1dddaa,'content':_0x4d5791,'replyId':_0x3136b7},_0x2d4a77=await this[_0x481f7b(0x11f)][_0x481f7b(0x15e)](_0x481f7b(0x169)+_0x24ce9d+_0x481f7b(0x15d),{'body':_0x1eb828});return!_0x2d4a77[_0x481f7b(0x119)][_0x481f7b(0x124)]||_0x2d4a77['body'][_0x481f7b(0x124)]['code']===0x1;}async[_0x361ff7(0x157)](_0x32702d){const _0x8b7020=_0x361ff7,{unitId:_0x2517f5}=_0x32702d,_0x3b236e=_0x32702d[_0x8b7020(0x145)],_0x297efb={'memberId':this[_0x8b7020(0x165)][_0x8b7020(0x17f)]()[_0x8b7020(0x148)],'unitId':_0x2517f5,'threadId':_0x3b236e,'solved':_0x32702d['resolved']?I['Solved']:I[_0x8b7020(0x15b)]},_0xfafc82=await this[_0x8b7020(0x11f)][_0x8b7020(0x15e)](_0x8b7020(0x169)+_0x2517f5+_0x8b7020(0x11a),{'body':_0x297efb});return!_0xfafc82[_0x8b7020(0x119)][_0x8b7020(0x124)]||_0xfafc82['body'][_0x8b7020(0x124)][_0x8b7020(0x159)]===0x1;}async[_0x361ff7(0x14e)](_0x188e6e,_0x3c74ec,_0x378f98,_0x34705b){const _0x24a3f9=_0x361ff7,_0x408ad2={'memberId':(await this[_0x24a3f9(0x151)]['requireSession'](_0x188e6e))[_0x24a3f9(0x133)](),'threadId':_0x378f98,'replyId':_0x34705b,'unitId':_0x188e6e},_0x4eb936=await this[_0x24a3f9(0x11f)][_0x24a3f9(0x15e)]('/universer-api/comment/unit/'+_0x188e6e+_0x24a3f9(0x150),{'body':_0x408ad2});return!_0x4eb936['body']['error']||_0x4eb936[_0x24a3f9(0x119)][_0x24a3f9(0x124)][_0x24a3f9(0x159)]===0x1;}async[_0x361ff7(0x17d)](_0x3c84ba,_0x354e92,_0x58b9f1){const _0x50371b=_0x361ff7,_0x5c3e62={'unitId':_0x3c84ba,'threadId':_0x58b9f1},_0x7f5e91=await this['_httpService'][_0x50371b(0x15e)](_0x50371b(0x169)+_0x3c84ba+_0x50371b(0x160),{'body':_0x5c3e62}),_0x204345=_0x58b9f1[_0x50371b(0x181)](_0x23e6aa=>ee(_0x7f5e91[_0x50371b(0x119)][_0x50371b(0x15f)][_0x23e6aa],_0x3c84ba,_0x354e92))[_0x50371b(0x152)](Boolean);return Object['values'](_0x7f5e91['body'][_0x50371b(0x11b)])[_0x50371b(0x136)](_0x2e7ccf=>{const _0x2486c8=_0x50371b;this['_userService'][_0x2486c8(0x130)](_0x2e7ccf);}),_0x204345;}['saveCommentToSnapshot'](_0x209869){const _0x193b09=_0x361ff7;return{'id':_0x209869['id'],'threadId':_0x209869[_0x193b09(0x145)],'ref':_0x209869[_0x193b09(0x132)]};}};f=Q([_(0x0,_0x4c9cd9(_0x13c39a)),_(0x1,_0x4c9cd9(_0x230923)),_(0x2,_0x4c9cd9(_0xed4b95)),_(0x3,_0x4c9cd9(_0x1592aa))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x162788,_0x3318da,_0x11107e,_0x4af0d8)=>{for(var _0x35984d=_0x4af0d8>0x1?void 0x0:_0x4af0d8?re(_0x3318da,_0x11107e):_0x3318da,_0x5085f8=_0x162788['length']-0x1,_0x9e599c;_0x5085f8>=0x0;_0x5085f8--)(_0x9e599c=_0x162788[_0x5085f8])&&(_0x35984d=_0x9e599c(_0x35984d)||_0x35984d);return _0x35984d;},N=(_0x49076c,_0x4333b2)=>(_0xab9dd3,_0x1b4a13)=>_0x4333b2(_0xab9dd3,_0x1b4a13,_0x49076c);let g=class extends _0xaf25f7{constructor(_0x1dca2e,_0x23297d){const _0x43b1e2=_0x361ff7;super(),this[_0x43b1e2(0x167)]=_0x1dca2e,this[_0x43b1e2(0x161)]=_0x23297d,this[_0x43b1e2(0x139)]();}[_0x361ff7(0x139)](){const _0x322152=_0x361ff7;this[_0x322152(0x167)][_0x322152(0x12f)]=this[_0x322152(0x161)],this['_threadCommentDataSourceService'][_0x322152(0x174)]=!0x1;}};g=te([N(0x0,_0x38d4a8),N(0x1,_0x4c9cd9(f))],g);var se=Object[_0x361ff7(0x156)],oe=Object[_0x361ff7(0x121)],ne=(_0xc6012a,_0x2e4070,_0xf4e055)=>_0x2e4070 in _0xc6012a?se(_0xc6012a,_0x2e4070,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf4e055}):_0xc6012a[_0x2e4070]=_0xf4e055,ie=(_0xf60cff,_0x19f739,_0x4b71c0,_0x46ad65)=>{const _0x1a8c32=_0x361ff7;for(var _0x442c0e=_0x46ad65>0x1?void 0x0:_0x46ad65?oe(_0x19f739,_0x4b71c0):_0x19f739,_0x950c48=_0xf60cff[_0x1a8c32(0x11d)]-0x1,_0x5485e2;_0x950c48>=0x0;_0x950c48--)(_0x5485e2=_0xf60cff[_0x950c48])&&(_0x442c0e=_0x5485e2(_0x442c0e)||_0x442c0e);return _0x442c0e;},w=(_0x48d74e,_0x332cbe)=>(_0x16fb5f,_0x2a157f)=>_0x332cbe(_0x16fb5f,_0x2a157f,_0x48d74e),$=(_0x2158cb,_0x58cdbc,_0x174bac)=>ne(_0x2158cb,typeof _0x58cdbc!=_0x361ff7(0x158)?_0x58cdbc+'':_0x58cdbc,_0x174bac);let b=class extends _0x375e34{constructor(_0x5d6040=M,_0x30b201,_0x161b3a){const _0x316b89=_0x361ff7;super(),this['_config']=_0x5d6040,this['_injector']=_0x30b201,this[_0x316b89(0x149)]=_0x161b3a;const {..._0x45947b}=_0x3bd94e({},M,this[_0x316b89(0x166)]);this['_configService'][_0x316b89(0x137)](z,_0x45947b);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x3ee509=>{const _0x1254ce=_0x2b3d;this[_0x1254ce(0x128)][_0x1254ce(0x14c)](_0x3ee509);});}[_0x361ff7(0x179)](){const _0x338fb9=_0x361ff7;this[_0x338fb9(0x128)]['get'](g),this[_0x338fb9(0x128)][_0x338fb9(0x176)](S);}};$(b,_0x361ff7(0x171),W),$(b,_0x361ff7(0x172),_0x5015d6[_0x361ff7(0x143)]),b=ie([_0x434b14(_0x4bca2b,_0x1f4157,_0x50fae2),w(0x1,_0x4c9cd9(_0x1592aa)),w(0x2,_0x2808c2)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x2d5350=_0x5b24;function _0x5282(){const _0x322b26=['format','OpenOrReOpen','getCurrentUser','/edit','body','symbol','requireSession','/universer-api/comment/unit/','onReady','size','rangeType','userId','Reply','deleteComment','user','ref','getComment','comments','/solved','31920240NEnvaB','get','Unknown','listComments','content','forEach','_httpService','1763512CQnKvL','stringify','parse','root','_configService','replies','_injector','Add','code','Delete','_threadCommentDataSourceService','Solve','getMemberID','_threadCommentDataSource','/add','Solved','_commentService','UNIVER_UNKNOWN','6986168DhicmD','threadId','solved','5801478JeRctW','onStarting','defineProperty','reply','delete','post','updateComment','userID','find','dataSource','subscribe','_sessionService','getUser','disposeWithMe','users','9ZHbwiz','_config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentModel','Edit','getUnit','customRanges','add','1208Pbenet','/list','replyId','_initUserSync','addUser','unitId','5638824XeUNfj','commentUpdate$','1IrWvpq','2885427rweuQJ','_initDataSource','rangeId','COMMENT','filter','type','resolveComment','_userService','createTimestamp','13085twpSKB','UNRECOGNIZED','length','pluginName','map','pipe','error','getOwnPropertyDescriptor'];_0x5282=function(){return _0x322b26;};return _0x5282();}(function(_0x4f49c9,_0x1d89f0){const _0xa95a08=_0x5b24,_0x3a6338=_0x4f49c9();while(!![]){try{const _0x5300d0=parseInt(_0xa95a08(0xed))/0x1*(parseInt(_0xa95a08(0x119))/0x2)+parseInt(_0xa95a08(0xee))/0x3+parseInt(_0xa95a08(0xe5))/0x4*(parseInt(_0xa95a08(0xf7))/0x5)+parseInt(_0xa95a08(0xce))/0x6+parseInt(_0xa95a08(0xcb))/0x7+parseInt(_0xa95a08(0xeb))/0x8*(-parseInt(_0xa95a08(0xdd))/0x9)+-parseInt(_0xa95a08(0x112))/0xa;if(_0x5300d0===_0x1d89f0)break;else _0x3a6338['push'](_0x3a6338['shift']());}catch(_0xee8e77){_0x3a6338['push'](_0x3a6338['shift']());}}}(_0x5282,0xab607));import{CommentService as _0x5646f3,CollaborationSessionService as _0x242f6a,UniverCollaborationClientPlugin as _0x1f9298}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3137d0}from'@univerjs-pro/license';import{dayjs as _0x4b79be,UserManagerService as _0x48e2a5,Inject as _0x82e101,Injector as _0x2de2a0,Disposable as _0xd7e540,CustomRangeType as _0x27a3d3,UniverInstanceType as _0x5b3885,DependentOn as _0xfde2f5,IConfigService as _0x14ce99,Plugin as _0x419499,merge as _0x4682c7}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x55cac6}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1ba485,IThreadCommentDataSourceService as _0x4fae4e}from'@univerjs/thread-comment';import{bufferTime as _0x1ee30f}from'rxjs';function _0x5b24(_0x1cdd0e,_0x5af263){const _0x5282bc=_0x5282();return _0x5b24=function(_0x5b240b,_0x2b21c8){_0x5b240b=_0x5b240b-0xc8;let _0x1acb8b=_0x5282bc[_0x5b240b];return _0x1acb8b;},_0x5b24(_0x1cdd0e,_0x5af263);}import{HTTPService as _0x16aa01}from'@univerjs/network';const W=_0x2d5350(0xdf);var I=(_0x3024b4=>(_0x3024b4[_0x3024b4[_0x2d5350(0x100)]=0x0]='OpenOrReOpen',_0x3024b4[_0x3024b4['Solved']=0x1]='Solved',_0x3024b4[_0x3024b4[_0x2d5350(0xf8)]=-0x1]='UNRECOGNIZED',_0x3024b4))(I||{}),v=(_0x124b25=>(_0x124b25[_0x124b25[_0x2d5350(0x114)]=0x0]=_0x2d5350(0x114),_0x124b25[_0x124b25[_0x2d5350(0x120)]=0x1]=_0x2d5350(0x120),_0x124b25[_0x124b25[_0x2d5350(0x10b)]=0x2]=_0x2d5350(0x10b),_0x124b25[_0x124b25[_0x2d5350(0xe1)]=0x3]=_0x2d5350(0xe1),_0x124b25[_0x124b25[_0x2d5350(0x122)]=0x4]=_0x2d5350(0x122),_0x124b25[_0x124b25[_0x2d5350(0x124)]=0x5]=_0x2d5350(0x124),_0x124b25[_0x124b25[_0x2d5350(0xf8)]=-0x1]=_0x2d5350(0xf8),_0x124b25))(v||{});const D=_0x35cca1=>_0x4b79be(new Date(+_0x35cca1))[_0x2d5350(0xff)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3e423b,_0x367b81)=>{const _0x8e92fc=_0x2d5350,_0x379b67=_0x3e423b[_0x8e92fc(0x113)](_0x48e2a5),_0xa89619=_0x3e423b['get'](_0x16aa01);_0x367b81['forEach'](_0x16088e=>{const _0x3d4f42=_0x8e92fc;_0x379b67[_0x3d4f42(0xda)](_0x16088e)&&_0x367b81[_0x3d4f42(0xd2)](_0x16088e);}),_0x367b81[_0x8e92fc(0x108)]&&(await _0xa89619[_0x8e92fc(0x113)]('/universer-api/user/list',{'params':{'userIDs':[..._0x367b81]}}))[_0x8e92fc(0x103)][_0x8e92fc(0xdc)][_0x8e92fc(0x117)](_0x402337=>{const _0x2ffb06=_0x8e92fc;_0x402337&&_0x379b67[_0x2ffb06(0xe9)](_0x402337);});};var K=Object[_0x2d5350(0xfe)],V=(_0xcb8fcf,_0x975fa6,_0x305288,_0x4242cf)=>{const _0x5429ec=_0x2d5350;for(var _0x17ad9a=_0x4242cf>0x1?void 0x0:_0x4242cf?K(_0x975fa6,_0x305288):_0x975fa6,_0x48544c=_0xcb8fcf[_0x5429ec(0xf9)]-0x1,_0x1bd1ac;_0x48544c>=0x0;_0x48544c--)(_0x1bd1ac=_0xcb8fcf[_0x48544c])&&(_0x17ad9a=_0x1bd1ac(_0x17ad9a)||_0x17ad9a);return _0x17ad9a;},p=(_0x54ffd1,_0x234003)=>(_0x22f624,_0x47e8ec)=>_0x234003(_0x22f624,_0x47e8ec,_0x54ffd1);let S=class extends _0xd7e540{constructor(_0x1c8253,_0x50c327,_0x11a5e8,_0x4f4a1c){const _0x431fd6=_0x2d5350;super(),this[_0x431fd6(0xc9)]=_0x1c8253,this[_0x431fd6(0xe0)]=_0x50c327,this[_0x431fd6(0xf5)]=_0x11a5e8,this[_0x431fd6(0x11f)]=_0x4f4a1c,this['_init'](),this[_0x431fd6(0xe8)]();}[_0x2d5350(0xe8)](){const _0x430198=_0x2d5350;this[_0x430198(0xdb)](this['_threadCommentModel'][_0x430198(0xec)][_0x430198(0xfc)](_0x1ee30f(0x10))['subscribe'](_0x387b63=>{const _0x35251e=_0x430198,_0xe145be=new Set();_0x387b63[_0x35251e(0x117)](_0x128904=>{const _0x400e9b=_0x35251e;switch(_0x128904[_0x400e9b(0xf3)]){case'add':{const _0x35594e=_0x128904['payload']['personId'];_0xe145be[_0x400e9b(0xe4)](_0x35594e);break;}}}),B(this[_0x35251e(0x11f)],_0xe145be);}));}['_init'](){const _0x10548d=_0x2d5350;this[_0x10548d(0xdb)](this[_0x10548d(0xc9)][_0x10548d(0xec)][_0x10548d(0xd8)](async _0x79bf6a=>{const _0x1b120d=_0x10548d;var _0x2a947d,_0x45f03f,_0x33dc3b,_0x5c655c;const _0x35e463=(_0x2a947d=this[_0x1b120d(0xe0)][_0x1b120d(0xe2)](_0x79bf6a[_0x1b120d(0xea)])[_0x1b120d(0xd6)](_0x5cfb28=>_0x5cfb28[_0x1b120d(0xcc)]===_0x79bf6a[_0x1b120d(0xcc)]))==null?void 0x0:_0x2a947d[_0x1b120d(0x11c)];if(!_0x35e463)return;const {unitId:_0x41d88e,subUnitId:_0x456ee6}=_0x35e463;switch(_0x79bf6a[_0x1b120d(0x10d)]&&this['_userService'][_0x1b120d(0xe9)](_0x79bf6a[_0x1b120d(0x10d)]),_0x79bf6a[_0x1b120d(0xf3)]){case v[_0x1b120d(0x120)]:break;case v['Reply']:{this[_0x1b120d(0xe0)]['addComment'](_0x41d88e,_0x456ee6,{'unitId':_0x41d88e,'subUnitId':_0x456ee6,'ref':'','id':_0x79bf6a['replyId'],'dT':D(+_0x79bf6a[_0x1b120d(0xf6)]),'threadId':_0x79bf6a['threadId'],'personId':(_0x33dc3b=(_0x45f03f=_0x79bf6a[_0x1b120d(0x10d)])==null?void 0x0:_0x45f03f[_0x1b120d(0xd5)])!=null?_0x33dc3b:_0x79bf6a['userId'],'text':JSON[_0x1b120d(0x11b)](_0x79bf6a[_0x1b120d(0x116)]),'parentId':_0x35e463['id']});break;}case v[_0x1b120d(0x122)]:{const _0x151700=this['_threadCommentModel'][_0x1b120d(0x10f)](_0x41d88e,_0x456ee6,_0x79bf6a[_0x1b120d(0xe7)]);_0x151700&&_0x151700['parentId']&&this[_0x1b120d(0xe0)]['deleteComment'](_0x41d88e,_0x456ee6,_0x79bf6a[_0x1b120d(0xe7)]);break;}case v[_0x1b120d(0xe1)]:{this['_threadCommentModel']['updateComment'](_0x41d88e,_0x456ee6,{'commentId':_0x79bf6a['replyId'],'text':JSON[_0x1b120d(0x11b)](_0x79bf6a[_0x1b120d(0x116)])});break;}case v[_0x1b120d(0x124)]:{const _0x3d510d=(_0x5c655c=this[_0x1b120d(0xe0)][_0x1b120d(0xe2)](_0x79bf6a['unitId'])[_0x1b120d(0xd6)](_0x167fe3=>_0x167fe3['threadId']===_0x79bf6a[_0x1b120d(0xcc)]))==null?void 0x0:_0x5c655c[_0x1b120d(0x11c)];_0x3d510d&&this[_0x1b120d(0xe0)][_0x1b120d(0xf4)](_0x41d88e,_0x456ee6,_0x3d510d['id'],_0x79bf6a[_0x1b120d(0xcd)]===I[_0x1b120d(0xc8)]);break;}}}));}};S=V([p(0x0,_0x82e101(_0x5646f3)),p(0x1,_0x82e101(_0x1ba485)),p(0x2,_0x82e101(_0x48e2a5)),p(0x3,_0x82e101(_0x2de2a0))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1df013,_0x388f42,_0x986144,_0x5354af)=>{const _0x4b08f0=_0x2d5350;for(var _0x27d257=_0x5354af>0x1?void 0x0:_0x5354af?k(_0x388f42,_0x986144):_0x388f42,_0x2e01c4=_0x1df013[_0x4b08f0(0xf9)]-0x1,_0x26e628;_0x2e01c4>=0x0;_0x2e01c4--)(_0x26e628=_0x1df013[_0x2e01c4])&&(_0x27d257=_0x26e628(_0x27d257)||_0x27d257);return _0x27d257;},_=(_0x4bdda0,_0x36d52c)=>(_0x520d65,_0x141c4e)=>_0x36d52c(_0x520d65,_0x141c4e,_0x4bdda0);function X(_0x5e74aa,_0x413701){const _0x2f8e15=_0x2d5350,_0x5ac38b=_0x5e74aa[_0x2f8e15(0x11e)][0x0];return{..._0x413701,'id':_0x5ac38b[_0x2f8e15(0xe7)],'resolved':_0x5e74aa[_0x2f8e15(0xcd)]===0x1,'dT':D(_0x5ac38b[_0x2f8e15(0xf6)]),'personId':_0x5ac38b[_0x2f8e15(0x10a)],'threadId':_0x5ac38b[_0x2f8e15(0xcc)]};}function ee(_0x2417a,_0x1931a0,_0x5b039b){const _0xee6606=_0x2d5350;var _0x2dc4af,_0x85328f;if(((_0x85328f=(_0x2dc4af=_0x2417a==null?void 0x0:_0x2417a[_0xee6606(0x11e)])==null?void 0x0:_0x2dc4af[_0xee6606(0xf9)])!=null?_0x85328f:0x0)>0x0){const _0x395103=(_0x360bdc,_0x38d607)=>({'id':_0x360bdc['replyId'],'threadId':_0x360bdc[_0xee6606(0xcc)],'dT':D(_0x360bdc[_0xee6606(0xf6)]),'personId':_0x360bdc[_0xee6606(0x10a)],'resolved':_0x2417a[_0xee6606(0xcd)]===I[_0xee6606(0xc8)],'unitId':_0x1931a0,'subUnitId':_0x5b039b,'text':JSON[_0xee6606(0x11b)](_0x360bdc[_0xee6606(0x116)]),'parentId':_0x38d607}),_0x4dce44=_0x395103(_0x2417a[_0xee6606(0x11e)][0x0]);return{..._0x4dce44,'children':_0x2417a['replies']['slice'](0x1)[_0xee6606(0xfb)](_0x5bbbba=>_0x395103(_0x5bbbba,_0x4dce44['id']))};}return null;}let f=class{constructor(_0x27a508,_0x576c22,_0x28db77,_0x1180f6){const _0x12defe=_0x2d5350;this[_0x12defe(0x118)]=_0x27a508,this['_userService']=_0x576c22,this[_0x12defe(0xd9)]=_0x28db77,this['_injector']=_0x1180f6;}async['addComment'](_0x2610cc){const _0x30c68b=_0x2d5350;var _0x4071d5,_0x4a7861;const {parentId:_0x324571,unitId:_0x17f5e0,text:_0x81fbea,threadId:_0x151e10}=_0x2610cc,_0x2e0da6=(_0x4a7861=(_0x4071d5=_0x81fbea[_0x30c68b(0xe3)])==null?void 0x0:_0x4071d5[_0x30c68b(0xf2)](_0x43d350=>_0x43d350[_0x30c68b(0x109)]===_0x27a3d3[_0x30c68b(0xf1)])[_0x30c68b(0xfb)](_0x6c75c5=>_0x6c75c5[_0x30c68b(0xf0)]))!=null?_0x4a7861:[],_0x1a50a4=JSON[_0x30c68b(0x11a)](_0x81fbea),_0x55db86=(await this[_0x30c68b(0xd9)]['requireSession'](_0x17f5e0))[_0x30c68b(0x125)]();if(_0x324571){const _0x580ad2={'memberId':_0x55db86,'unitId':_0x17f5e0,'content':_0x1a50a4,'mention':_0x2e0da6,'threadId':_0x151e10},_0x2d770c=(await this['_httpService']['post'](_0x30c68b(0x106)+_0x17f5e0+'/reply',{'body':_0x580ad2}))[_0x30c68b(0x103)][_0x30c68b(0xd1)];return{..._0x2610cc,'id':_0x2d770c[_0x30c68b(0xe7)],'dT':_0x4b79be(+_0x2d770c[_0x30c68b(0xf6)])[_0x30c68b(0xff)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2d770c[_0x30c68b(0x10a)]};}else{const _0xceb580={'memberId':_0x55db86,'unitId':_0x17f5e0,'content':_0x1a50a4,'mention':_0x2e0da6},_0x168c13=await this['_httpService'][_0x30c68b(0xd3)](_0x30c68b(0x106)+_0x17f5e0+_0x30c68b(0x127),{'body':_0xceb580});return X(_0x168c13['body']['comment'],_0x2610cc);}}async[_0x2d5350(0xd4)](_0x47e27d){const _0x85ce6a=_0x2d5350;var _0x31e541,_0x49498e;const {text:_0x1951c8,unitId:_0x195b3f}=_0x47e27d,_0x2f6d65=(_0x49498e=(_0x31e541=_0x1951c8['customRanges'])==null?void 0x0:_0x31e541[_0x85ce6a(0xf2)](_0x111feb=>_0x111feb['rangeType']===_0x27a3d3[_0x85ce6a(0xf1)])[_0x85ce6a(0xfb)](_0x35fdd7=>_0x35fdd7['rangeId']))!=null?_0x49498e:[],_0x713cf1=JSON[_0x85ce6a(0x11a)](_0x1951c8),_0x4fc30d=_0x47e27d[_0x85ce6a(0xcc)],_0x1e5033=_0x47e27d['id'],_0x487d62={'memberId':(await this[_0x85ce6a(0xd9)][_0x85ce6a(0x105)](_0x195b3f))[_0x85ce6a(0x125)](),'unitId':_0x195b3f,'threadId':_0x4fc30d,'mention':_0x2f6d65,'content':_0x713cf1,'replyId':_0x1e5033},_0x236b07=await this[_0x85ce6a(0x118)][_0x85ce6a(0xd3)](_0x85ce6a(0x106)+_0x195b3f+_0x85ce6a(0x102),{'body':_0x487d62});return!_0x236b07['body'][_0x85ce6a(0xfd)]||_0x236b07[_0x85ce6a(0x103)]['error'][_0x85ce6a(0x121)]===0x1;}async[_0x2d5350(0xf4)](_0x675f29){const _0x43c343=_0x2d5350,{unitId:_0x27a660}=_0x675f29,_0x448c66=_0x675f29[_0x43c343(0xcc)],_0x14a711={'memberId':this[_0x43c343(0xf5)][_0x43c343(0x101)]()['userID'],'unitId':_0x27a660,'threadId':_0x448c66,'solved':_0x675f29['resolved']?I['Solved']:I['OpenOrReOpen']},_0x282023=await this[_0x43c343(0x118)][_0x43c343(0xd3)]('/universer-api/comment/unit/'+_0x27a660+_0x43c343(0x111),{'body':_0x14a711});return!_0x282023[_0x43c343(0x103)][_0x43c343(0xfd)]||_0x282023[_0x43c343(0x103)][_0x43c343(0xfd)]['code']===0x1;}async[_0x2d5350(0x10c)](_0x3776f5,_0x3ba336,_0x1779c9,_0x5ae9b3){const _0xbafe49=_0x2d5350,_0x3d9aad={'memberId':(await this['_sessionService'][_0xbafe49(0x105)](_0x3776f5))[_0xbafe49(0x125)](),'threadId':_0x1779c9,'replyId':_0x5ae9b3,'unitId':_0x3776f5},_0x2d252c=await this['_httpService']['post'](_0xbafe49(0x106)+_0x3776f5+'/delete',{'body':_0x3d9aad});return!_0x2d252c[_0xbafe49(0x103)][_0xbafe49(0xfd)]||_0x2d252c[_0xbafe49(0x103)][_0xbafe49(0xfd)][_0xbafe49(0x121)]===0x1;}async[_0x2d5350(0x115)](_0x5bc84b,_0x124577,_0x144626){const _0x32ed26=_0x2d5350,_0x5c63f8={'unitId':_0x5bc84b,'threadId':_0x144626},_0x28f4ec=await this[_0x32ed26(0x118)][_0x32ed26(0xd3)]('/universer-api/comment/unit/'+_0x5bc84b+_0x32ed26(0xe6),{'body':_0x5c63f8}),_0x49ddfc=_0x144626[_0x32ed26(0xfb)](_0x1fab8e=>ee(_0x28f4ec['body'][_0x32ed26(0x110)][_0x1fab8e],_0x5bc84b,_0x124577))['filter'](Boolean);return Object['values'](_0x28f4ec[_0x32ed26(0x103)][_0x32ed26(0xdc)])[_0x32ed26(0x117)](_0xd5d441=>{const _0x1af91d=_0x32ed26;this[_0x1af91d(0xf5)][_0x1af91d(0xe9)](_0xd5d441);}),_0x49ddfc;}['saveCommentToSnapshot'](_0x172d15){const _0x52eb70=_0x2d5350;return{'id':_0x172d15['id'],'threadId':_0x172d15['threadId'],'ref':_0x172d15[_0x52eb70(0x10e)]};}};f=Q([_(0x0,_0x82e101(_0x16aa01)),_(0x1,_0x82e101(_0x48e2a5)),_(0x2,_0x82e101(_0x242f6a)),_(0x3,_0x82e101(_0x2de2a0))],f);var re=Object[_0x2d5350(0xfe)],te=(_0x161bb3,_0x4e6a7b,_0x316e49,_0x3b8236)=>{const _0x99020e=_0x2d5350;for(var _0x38d524=_0x3b8236>0x1?void 0x0:_0x3b8236?re(_0x4e6a7b,_0x316e49):_0x4e6a7b,_0x39255b=_0x161bb3[_0x99020e(0xf9)]-0x1,_0x1341c9;_0x39255b>=0x0;_0x39255b--)(_0x1341c9=_0x161bb3[_0x39255b])&&(_0x38d524=_0x1341c9(_0x38d524)||_0x38d524);return _0x38d524;},N=(_0x31621c,_0xad4c0f)=>(_0x2024d5,_0x394031)=>_0xad4c0f(_0x2024d5,_0x394031,_0x31621c);let g=class extends _0xd7e540{constructor(_0x2e1c38,_0x31f48d){const _0x61a7bc=_0x2d5350;super(),this[_0x61a7bc(0x123)]=_0x2e1c38,this[_0x61a7bc(0x126)]=_0x31f48d,this[_0x61a7bc(0xef)]();}['_initDataSource'](){const _0x99b2e2=_0x2d5350;this[_0x99b2e2(0x123)][_0x99b2e2(0xd7)]=this[_0x99b2e2(0x126)],this[_0x99b2e2(0x123)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x4fae4e),N(0x1,_0x82e101(f))],g);var se=Object[_0x2d5350(0xd0)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1d8100,_0xb2340,_0x542ef7)=>_0xb2340 in _0x1d8100?se(_0x1d8100,_0xb2340,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x542ef7}):_0x1d8100[_0xb2340]=_0x542ef7,ie=(_0x42f1d8,_0x4548d8,_0x54b53c,_0x4c2c1f)=>{for(var _0x5dbc5d=_0x4c2c1f>0x1?void 0x0:_0x4c2c1f?oe(_0x4548d8,_0x54b53c):_0x4548d8,_0xdae79f=_0x42f1d8['length']-0x1,_0x2c1c90;_0xdae79f>=0x0;_0xdae79f--)(_0x2c1c90=_0x42f1d8[_0xdae79f])&&(_0x5dbc5d=_0x2c1c90(_0x5dbc5d)||_0x5dbc5d);return _0x5dbc5d;},w=(_0xbd0b62,_0x57b92e)=>(_0x2f69b6,_0x5c7479)=>_0x57b92e(_0x2f69b6,_0x5c7479,_0xbd0b62),$=(_0x52dd39,_0x1a4a83,_0x1fdefe)=>ne(_0x52dd39,typeof _0x1a4a83!=_0x2d5350(0x104)?_0x1a4a83+'':_0x1a4a83,_0x1fdefe);let b=class extends _0x419499{constructor(_0x418a10=M,_0x4b4bbc,_0x16863c){const _0x421808=_0x2d5350;super(),this['_config']=_0x418a10,this[_0x421808(0x11f)]=_0x4b4bbc,this[_0x421808(0x11d)]=_0x16863c;const {..._0x5da4ff}=_0x4682c7({},M,this[_0x421808(0xde)]);this['_configService']['setConfig'](z,_0x5da4ff);}[_0x2d5350(0xcf)](){const _0x173f0d=_0x2d5350;[[f],[g],[S]][_0x173f0d(0x117)](_0x43f6e8=>{const _0x41eb1d=_0x173f0d;this['_injector'][_0x41eb1d(0xe4)](_0x43f6e8);});}[_0x2d5350(0x107)](){const _0x51c706=_0x2d5350;this[_0x51c706(0x11f)][_0x51c706(0x113)](g),this[_0x51c706(0x11f)]['get'](S);}};$(b,_0x2d5350(0xfa),W),$(b,'type',_0x5b3885[_0x2d5350(0xca)]),b=ie([_0xfde2f5(_0x55cac6,_0x1f9298,_0x3137d0),w(0x1,_0x82e101(_0x2de2a0)),w(0x2,_0x14ce99)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x361ff7=_0x2b3d;(function(_0x3b8dfd,_0x23b7d1){const _0x2726bb=_0x2b3d,_0x2a2d8a=_0x3b8dfd();while(!![]){try{const _0x3bc8a1=-parseInt(_0x2726bb(0x14f))/0x1+parseInt(_0x2726bb(0x11c))/0x2+parseInt(_0x2726bb(0x123))/0x3*(-parseInt(_0x2726bb(0x178))/0x4)+-parseInt(_0x2726bb(0x13d))/0x5+parseInt(_0x2726bb(0x144))/0x6+-parseInt(_0x2726bb(0x127))/0x7+parseInt(_0x2726bb(0x17a))/0x8*(parseInt(_0x2726bb(0x126))/0x9);if(_0x3bc8a1===_0x23b7d1)break;else _0x2a2d8a['push'](_0x2a2d8a['shift']());}catch(_0x16e457){_0x2a2d8a['push'](_0x2a2d8a['shift']());}}}(_0x1ab1,0x60da5));import{CommentService as _0x550980,CollaborationSessionService as _0xed4b95,UniverCollaborationClientPlugin as _0x1f4157}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x50fae2}from'@univerjs-pro/license';import{dayjs as _0x453ba2,UserManagerService as _0x230923,Inject as _0x4c9cd9,Injector as _0x1592aa,Disposable as _0xaf25f7,CustomRangeType as _0x32fdec,UniverInstanceType as _0x5015d6,DependentOn as _0x434b14,IConfigService as _0x2808c2,Plugin as _0x375e34,merge as _0x3bd94e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4bca2b}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x51ac0f,IThreadCommentDataSourceService as _0x38d4a8}from'@univerjs/thread-comment';import{bufferTime as _0x2c3f39}from'rxjs';import{HTTPService as _0x13c39a}from'@univerjs/network';const W=_0x361ff7(0x15c);var I=(_0x43eb89=>(_0x43eb89[_0x43eb89[_0x361ff7(0x15b)]=0x0]=_0x361ff7(0x15b),_0x43eb89[_0x43eb89[_0x361ff7(0x12e)]=0x1]=_0x361ff7(0x12e),_0x43eb89[_0x43eb89[_0x361ff7(0x164)]=-0x1]=_0x361ff7(0x164),_0x43eb89))(I||{}),v=(_0x6d47e4=>(_0x6d47e4[_0x6d47e4['Unknown']=0x0]=_0x361ff7(0x175),_0x6d47e4[_0x6d47e4[_0x361ff7(0x13f)]=0x1]=_0x361ff7(0x13f),_0x6d47e4[_0x6d47e4[_0x361ff7(0x180)]=0x2]=_0x361ff7(0x180),_0x6d47e4[_0x6d47e4[_0x361ff7(0x16b)]=0x3]='Edit',_0x6d47e4[_0x6d47e4[_0x361ff7(0x17b)]=0x4]='Delete',_0x6d47e4[_0x6d47e4[_0x361ff7(0x12d)]=0x5]=_0x361ff7(0x12d),_0x6d47e4[_0x6d47e4[_0x361ff7(0x164)]=-0x1]=_0x361ff7(0x164),_0x6d47e4))(v||{});const D=_0x2ad013=>_0x453ba2(new Date(+_0x2ad013))[_0x361ff7(0x16c)](_0x361ff7(0x13a)),B=async(_0x1bc43e,_0x333760)=>{const _0x37d30e=_0x361ff7,_0x4799ba=_0x1bc43e[_0x37d30e(0x176)](_0x230923),_0x5acad5=_0x1bc43e['get'](_0x13c39a);_0x333760[_0x37d30e(0x136)](_0x25ad47=>{const _0x3ec9dc=_0x37d30e;_0x4799ba[_0x3ec9dc(0x16e)](_0x25ad47)&&_0x333760[_0x3ec9dc(0x13b)](_0x25ad47);}),_0x333760[_0x37d30e(0x125)]&&(await _0x5acad5[_0x37d30e(0x176)](_0x37d30e(0x12b),{'params':{'userIDs':[..._0x333760]}}))[_0x37d30e(0x119)]['users'][_0x37d30e(0x136)](_0xdb7fd5=>{_0xdb7fd5&&_0x4799ba['addUser'](_0xdb7fd5);});};var K=Object[_0x361ff7(0x121)],V=(_0xa4a34c,_0x75f4ba,_0x12ff7f,_0x670346)=>{const _0x3a553c=_0x361ff7;for(var _0x40cfa9=_0x670346>0x1?void 0x0:_0x670346?K(_0x75f4ba,_0x12ff7f):_0x75f4ba,_0x2dd1f0=_0xa4a34c[_0x3a553c(0x11d)]-0x1,_0x1d9674;_0x2dd1f0>=0x0;_0x2dd1f0--)(_0x1d9674=_0xa4a34c[_0x2dd1f0])&&(_0x40cfa9=_0x1d9674(_0x40cfa9)||_0x40cfa9);return _0x40cfa9;},p=(_0x17e6e4,_0xe04232)=>(_0x3b1e38,_0x2bf4bf)=>_0xe04232(_0x3b1e38,_0x2bf4bf,_0x17e6e4);function _0x2b3d(_0x38e0cb,_0x3d6b74){const _0x1ab131=_0x1ab1();return _0x2b3d=function(_0x2b3d77,_0x2ed7e1){_0x2b3d77=_0x2b3d77-0x119;let _0x3962fd=_0x1ab131[_0x2b3d77];return _0x3962fd;},_0x2b3d(_0x38e0cb,_0x3d6b74);}let S=class extends _0xaf25f7{constructor(_0x32a74d,_0x4cbcd9,_0x5edc86,_0x298108){const _0x37a336=_0x361ff7;super(),this[_0x37a336(0x122)]=_0x32a74d,this[_0x37a336(0x147)]=_0x4cbcd9,this[_0x37a336(0x165)]=_0x5edc86,this[_0x37a336(0x128)]=_0x298108,this[_0x37a336(0x168)](),this[_0x37a336(0x140)]();}[_0x361ff7(0x140)](){const _0x104cbb=_0x361ff7;this[_0x104cbb(0x120)](this[_0x104cbb(0x147)][_0x104cbb(0x15a)][_0x104cbb(0x14d)](_0x2c3f39(0x10))['subscribe'](_0xb9ee1f=>{const _0x3c7d97=_0x104cbb,_0x29ed2e=new Set();_0xb9ee1f[_0x3c7d97(0x136)](_0x53b36e=>{const _0x38de08=_0x3c7d97;switch(_0x53b36e[_0x38de08(0x172)]){case _0x38de08(0x14c):{const _0x9c8192=_0x53b36e[_0x38de08(0x16d)]['personId'];_0x29ed2e[_0x38de08(0x14c)](_0x9c8192);break;}}}),B(this[_0x3c7d97(0x128)],_0x29ed2e);}));}['_init'](){const _0x51ac85=_0x361ff7;this[_0x51ac85(0x120)](this[_0x51ac85(0x122)][_0x51ac85(0x15a)][_0x51ac85(0x163)](async _0x17de44=>{const _0x358862=_0x51ac85;var _0x1a5e8a,_0xb4a3a9,_0x333f70,_0x538181;const _0x36a951=(_0x1a5e8a=this[_0x358862(0x147)]['getUnit'](_0x17de44[_0x358862(0x142)])[_0x358862(0x170)](_0x451c5e=>_0x451c5e['threadId']===_0x17de44['threadId']))==null?void 0x0:_0x1a5e8a['root'];if(!_0x36a951)return;const {unitId:_0x4004bd,subUnitId:_0x17d3bf}=_0x36a951;switch(_0x17de44[_0x358862(0x12a)]&&this[_0x358862(0x165)][_0x358862(0x130)](_0x17de44[_0x358862(0x12a)]),_0x17de44['type']){case v['Add']:break;case v[_0x358862(0x180)]:{this[_0x358862(0x147)][_0x358862(0x153)](_0x4004bd,_0x17d3bf,{'unitId':_0x4004bd,'subUnitId':_0x17d3bf,'ref':'','id':_0x17de44[_0x358862(0x17c)],'dT':D(+_0x17de44[_0x358862(0x138)]),'threadId':_0x17de44['threadId'],'personId':(_0x333f70=(_0xb4a3a9=_0x17de44[_0x358862(0x12a)])==null?void 0x0:_0xb4a3a9['userID'])!=null?_0x333f70:_0x17de44[_0x358862(0x146)],'text':JSON[_0x358862(0x177)](_0x17de44[_0x358862(0x135)]),'parentId':_0x36a951['id']});break;}case v[_0x358862(0x17b)]:{const _0x594598=this[_0x358862(0x147)]['getComment'](_0x4004bd,_0x17d3bf,_0x17de44['replyId']);_0x594598&&_0x594598[_0x358862(0x13c)]&&this[_0x358862(0x147)][_0x358862(0x14e)](_0x4004bd,_0x17d3bf,_0x17de44[_0x358862(0x17c)]);break;}case v[_0x358862(0x16b)]:{this['_threadCommentModel']['updateComment'](_0x4004bd,_0x17d3bf,{'commentId':_0x17de44[_0x358862(0x17c)],'text':JSON[_0x358862(0x177)](_0x17de44['content'])});break;}case v[_0x358862(0x12d)]:{const _0x5adef5=(_0x538181=this[_0x358862(0x147)][_0x358862(0x141)](_0x17de44['unitId'])[_0x358862(0x170)](_0x523fc8=>_0x523fc8[_0x358862(0x145)]===_0x17de44[_0x358862(0x145)]))==null?void 0x0:_0x538181[_0x358862(0x134)];_0x5adef5&&this[_0x358862(0x147)]['resolveComment'](_0x4004bd,_0x17d3bf,_0x5adef5['id'],_0x17de44[_0x358862(0x173)]===I[_0x358862(0x12e)]);break;}}}));}};S=V([p(0x0,_0x4c9cd9(_0x550980)),p(0x1,_0x4c9cd9(_0x51ac0f)),p(0x2,_0x4c9cd9(_0x230923)),p(0x3,_0x4c9cd9(_0x1592aa))],S);const z=_0x361ff7(0x154),M={};function _0x1ab1(){const _0xb90c2c=['Solved','dataSource','addUser','replies','ref','getMemberID','root','content','forEach','setConfig','createTimestamp','_initDataSource','YYYY/MM/DD\x20HH:mm','delete','parentId','1861005ZxZnHv','rangeId','Add','_initUserSync','getUnit','unitId','UNIVER_UNKNOWN','2834496hEMLOf','threadId','userId','_threadCommentModel','userID','_configService','comment','/reply','add','pipe','deleteComment','85830ovYLdY','/delete','_sessionService','filter','addComment','thread-comment-data-source.config','reply','defineProperty','resolveComment','symbol','code','commentUpdate$','OpenOrReOpen','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/edit','post','comments','/list','_threadCommentDataSource','stringify','subscribe','UNRECOGNIZED','_userService','_config','_threadCommentDataSourceService','_init','/universer-api/comment/unit/','requireSession','Edit','format','payload','getUser','COMMENT','find','pluginName','type','solved','syncUpdateMutationToColla','Unknown','get','parse','4UTFVrR','onReady','71048JiKkRL','Delete','replyId','listComments','customRanges','getCurrentUser','Reply','map','body','/solved','users','1368642uIDPiw','length','rangeType','_httpService','disposeWithMe','getOwnPropertyDescriptor','_commentService','987741EYoUbe','error','size','351RRFTME','2233763tTHEqj','_injector','slice','user','/universer-api/user/list','/add','Solve'];_0x1ab1=function(){return _0xb90c2c;};return _0x1ab1();}var k=Object[_0x361ff7(0x121)],Q=(_0x1ff86c,_0xb0fb5f,_0x169f2a,_0x24bf4b)=>{for(var _0x18079d=_0x24bf4b>0x1?void 0x0:_0x24bf4b?k(_0xb0fb5f,_0x169f2a):_0xb0fb5f,_0x3e9778=_0x1ff86c['length']-0x1,_0x49cef4;_0x3e9778>=0x0;_0x3e9778--)(_0x49cef4=_0x1ff86c[_0x3e9778])&&(_0x18079d=_0x49cef4(_0x18079d)||_0x18079d);return _0x18079d;},_=(_0x596ad6,_0x449f02)=>(_0x310cd7,_0x4cf512)=>_0x449f02(_0x310cd7,_0x4cf512,_0x596ad6);function X(_0x598a7f,_0x3e3b3c){const _0x60820d=_0x361ff7,_0x21b693=_0x598a7f[_0x60820d(0x131)][0x0];return{..._0x3e3b3c,'id':_0x21b693[_0x60820d(0x17c)],'resolved':_0x598a7f[_0x60820d(0x173)]===0x1,'dT':D(_0x21b693[_0x60820d(0x138)]),'personId':_0x21b693[_0x60820d(0x146)],'threadId':_0x21b693['threadId']};}function ee(_0x4b1d5b,_0x3502d3,_0x151f3c){const _0x13ff7d=_0x361ff7;var _0x17a31a,_0x1f24dc;if(((_0x1f24dc=(_0x17a31a=_0x4b1d5b==null?void 0x0:_0x4b1d5b['replies'])==null?void 0x0:_0x17a31a[_0x13ff7d(0x11d)])!=null?_0x1f24dc:0x0)>0x0){const _0x33940f=(_0x219e26,_0x1c170f)=>({'id':_0x219e26[_0x13ff7d(0x17c)],'threadId':_0x219e26[_0x13ff7d(0x145)],'dT':D(_0x219e26[_0x13ff7d(0x138)]),'personId':_0x219e26[_0x13ff7d(0x146)],'resolved':_0x4b1d5b['solved']===I[_0x13ff7d(0x12e)],'unitId':_0x3502d3,'subUnitId':_0x151f3c,'text':JSON[_0x13ff7d(0x177)](_0x219e26['content']),'parentId':_0x1c170f}),_0x3dbeb8=_0x33940f(_0x4b1d5b[_0x13ff7d(0x131)][0x0]);return{..._0x3dbeb8,'children':_0x4b1d5b[_0x13ff7d(0x131)][_0x13ff7d(0x129)](0x1)['map'](_0xcaab3e=>_0x33940f(_0xcaab3e,_0x3dbeb8['id']))};}return null;}let f=class{constructor(_0x36b86b,_0x59304f,_0x102033,_0x55d464){const _0x5ae170=_0x361ff7;this['_httpService']=_0x36b86b,this[_0x5ae170(0x165)]=_0x59304f,this[_0x5ae170(0x151)]=_0x102033,this['_injector']=_0x55d464;}async['addComment'](_0x4f94bc){const _0x2c7dd2=_0x361ff7;var _0x2a0c30,_0x22d5e2;const {parentId:_0x520163,unitId:_0x5d1eb2,text:_0xfbc3db,threadId:_0x1ea3ab}=_0x4f94bc,_0xd6ae0c=(_0x22d5e2=(_0x2a0c30=_0xfbc3db[_0x2c7dd2(0x17e)])==null?void 0x0:_0x2a0c30[_0x2c7dd2(0x152)](_0x5e0a86=>_0x5e0a86[_0x2c7dd2(0x11e)]===_0x32fdec[_0x2c7dd2(0x16f)])[_0x2c7dd2(0x181)](_0x1eb04a=>_0x1eb04a[_0x2c7dd2(0x13e)]))!=null?_0x22d5e2:[],_0x1a3539=JSON[_0x2c7dd2(0x162)](_0xfbc3db),_0x573dac=(await this['_sessionService'][_0x2c7dd2(0x16a)](_0x5d1eb2))[_0x2c7dd2(0x133)]();if(_0x520163){const _0x440989={'memberId':_0x573dac,'unitId':_0x5d1eb2,'content':_0x1a3539,'mention':_0xd6ae0c,'threadId':_0x1ea3ab},_0x1d3075=(await this[_0x2c7dd2(0x11f)][_0x2c7dd2(0x15e)](_0x2c7dd2(0x169)+_0x5d1eb2+_0x2c7dd2(0x14b),{'body':_0x440989}))[_0x2c7dd2(0x119)][_0x2c7dd2(0x155)];return{..._0x4f94bc,'id':_0x1d3075['replyId'],'dT':_0x453ba2(+_0x1d3075[_0x2c7dd2(0x138)])[_0x2c7dd2(0x16c)](_0x2c7dd2(0x13a)),'personId':_0x1d3075['userId']};}else{const _0x4bb6ce={'memberId':_0x573dac,'unitId':_0x5d1eb2,'content':_0x1a3539,'mention':_0xd6ae0c},_0x175faa=await this[_0x2c7dd2(0x11f)][_0x2c7dd2(0x15e)](_0x2c7dd2(0x169)+_0x5d1eb2+_0x2c7dd2(0x12c),{'body':_0x4bb6ce});return X(_0x175faa[_0x2c7dd2(0x119)][_0x2c7dd2(0x14a)],_0x4f94bc);}}async['updateComment'](_0x205399){const _0x481f7b=_0x361ff7;var _0x41e766,_0x227547;const {text:_0x2d957f,unitId:_0x24ce9d}=_0x205399,_0x1dddaa=(_0x227547=(_0x41e766=_0x2d957f['customRanges'])==null?void 0x0:_0x41e766[_0x481f7b(0x152)](_0x523bdc=>_0x523bdc[_0x481f7b(0x11e)]===_0x32fdec['COMMENT'])[_0x481f7b(0x181)](_0x5e718e=>_0x5e718e['rangeId']))!=null?_0x227547:[],_0x4d5791=JSON[_0x481f7b(0x162)](_0x2d957f),_0x5aa590=_0x205399['threadId'],_0x3136b7=_0x205399['id'],_0x1eb828={'memberId':(await this[_0x481f7b(0x151)][_0x481f7b(0x16a)](_0x24ce9d))[_0x481f7b(0x133)](),'unitId':_0x24ce9d,'threadId':_0x5aa590,'mention':_0x1dddaa,'content':_0x4d5791,'replyId':_0x3136b7},_0x2d4a77=await this[_0x481f7b(0x11f)][_0x481f7b(0x15e)](_0x481f7b(0x169)+_0x24ce9d+_0x481f7b(0x15d),{'body':_0x1eb828});return!_0x2d4a77[_0x481f7b(0x119)][_0x481f7b(0x124)]||_0x2d4a77['body'][_0x481f7b(0x124)]['code']===0x1;}async[_0x361ff7(0x157)](_0x32702d){const _0x8b7020=_0x361ff7,{unitId:_0x2517f5}=_0x32702d,_0x3b236e=_0x32702d[_0x8b7020(0x145)],_0x297efb={'memberId':this[_0x8b7020(0x165)][_0x8b7020(0x17f)]()[_0x8b7020(0x148)],'unitId':_0x2517f5,'threadId':_0x3b236e,'solved':_0x32702d['resolved']?I['Solved']:I[_0x8b7020(0x15b)]},_0xfafc82=await this[_0x8b7020(0x11f)][_0x8b7020(0x15e)](_0x8b7020(0x169)+_0x2517f5+_0x8b7020(0x11a),{'body':_0x297efb});return!_0xfafc82[_0x8b7020(0x119)][_0x8b7020(0x124)]||_0xfafc82['body'][_0x8b7020(0x124)][_0x8b7020(0x159)]===0x1;}async[_0x361ff7(0x14e)](_0x188e6e,_0x3c74ec,_0x378f98,_0x34705b){const _0x24a3f9=_0x361ff7,_0x408ad2={'memberId':(await this[_0x24a3f9(0x151)]['requireSession'](_0x188e6e))[_0x24a3f9(0x133)](),'threadId':_0x378f98,'replyId':_0x34705b,'unitId':_0x188e6e},_0x4eb936=await this[_0x24a3f9(0x11f)][_0x24a3f9(0x15e)]('/universer-api/comment/unit/'+_0x188e6e+_0x24a3f9(0x150),{'body':_0x408ad2});return!_0x4eb936['body']['error']||_0x4eb936[_0x24a3f9(0x119)][_0x24a3f9(0x124)][_0x24a3f9(0x159)]===0x1;}async[_0x361ff7(0x17d)](_0x3c84ba,_0x354e92,_0x58b9f1){const _0x50371b=_0x361ff7,_0x5c3e62={'unitId':_0x3c84ba,'threadId':_0x58b9f1},_0x7f5e91=await this['_httpService'][_0x50371b(0x15e)](_0x50371b(0x169)+_0x3c84ba+_0x50371b(0x160),{'body':_0x5c3e62}),_0x204345=_0x58b9f1[_0x50371b(0x181)](_0x23e6aa=>ee(_0x7f5e91[_0x50371b(0x119)][_0x50371b(0x15f)][_0x23e6aa],_0x3c84ba,_0x354e92))[_0x50371b(0x152)](Boolean);return Object['values'](_0x7f5e91['body'][_0x50371b(0x11b)])[_0x50371b(0x136)](_0x2e7ccf=>{const _0x2486c8=_0x50371b;this['_userService'][_0x2486c8(0x130)](_0x2e7ccf);}),_0x204345;}['saveCommentToSnapshot'](_0x209869){const _0x193b09=_0x361ff7;return{'id':_0x209869['id'],'threadId':_0x209869[_0x193b09(0x145)],'ref':_0x209869[_0x193b09(0x132)]};}};f=Q([_(0x0,_0x4c9cd9(_0x13c39a)),_(0x1,_0x4c9cd9(_0x230923)),_(0x2,_0x4c9cd9(_0xed4b95)),_(0x3,_0x4c9cd9(_0x1592aa))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x162788,_0x3318da,_0x11107e,_0x4af0d8)=>{for(var _0x35984d=_0x4af0d8>0x1?void 0x0:_0x4af0d8?re(_0x3318da,_0x11107e):_0x3318da,_0x5085f8=_0x162788['length']-0x1,_0x9e599c;_0x5085f8>=0x0;_0x5085f8--)(_0x9e599c=_0x162788[_0x5085f8])&&(_0x35984d=_0x9e599c(_0x35984d)||_0x35984d);return _0x35984d;},N=(_0x49076c,_0x4333b2)=>(_0xab9dd3,_0x1b4a13)=>_0x4333b2(_0xab9dd3,_0x1b4a13,_0x49076c);let g=class extends _0xaf25f7{constructor(_0x1dca2e,_0x23297d){const _0x43b1e2=_0x361ff7;super(),this[_0x43b1e2(0x167)]=_0x1dca2e,this[_0x43b1e2(0x161)]=_0x23297d,this[_0x43b1e2(0x139)]();}[_0x361ff7(0x139)](){const _0x322152=_0x361ff7;this[_0x322152(0x167)][_0x322152(0x12f)]=this[_0x322152(0x161)],this['_threadCommentDataSourceService'][_0x322152(0x174)]=!0x1;}};g=te([N(0x0,_0x38d4a8),N(0x1,_0x4c9cd9(f))],g);var se=Object[_0x361ff7(0x156)],oe=Object[_0x361ff7(0x121)],ne=(_0xc6012a,_0x2e4070,_0xf4e055)=>_0x2e4070 in _0xc6012a?se(_0xc6012a,_0x2e4070,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf4e055}):_0xc6012a[_0x2e4070]=_0xf4e055,ie=(_0xf60cff,_0x19f739,_0x4b71c0,_0x46ad65)=>{const _0x1a8c32=_0x361ff7;for(var _0x442c0e=_0x46ad65>0x1?void 0x0:_0x46ad65?oe(_0x19f739,_0x4b71c0):_0x19f739,_0x950c48=_0xf60cff[_0x1a8c32(0x11d)]-0x1,_0x5485e2;_0x950c48>=0x0;_0x950c48--)(_0x5485e2=_0xf60cff[_0x950c48])&&(_0x442c0e=_0x5485e2(_0x442c0e)||_0x442c0e);return _0x442c0e;},w=(_0x48d74e,_0x332cbe)=>(_0x16fb5f,_0x2a157f)=>_0x332cbe(_0x16fb5f,_0x2a157f,_0x48d74e),$=(_0x2158cb,_0x58cdbc,_0x174bac)=>ne(_0x2158cb,typeof _0x58cdbc!=_0x361ff7(0x158)?_0x58cdbc+'':_0x58cdbc,_0x174bac);let b=class extends _0x375e34{constructor(_0x5d6040=M,_0x30b201,_0x161b3a){const _0x316b89=_0x361ff7;super(),this['_config']=_0x5d6040,this['_injector']=_0x30b201,this[_0x316b89(0x149)]=_0x161b3a;const {..._0x45947b}=_0x3bd94e({},M,this[_0x316b89(0x166)]);this['_configService'][_0x316b89(0x137)](z,_0x45947b);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x3ee509=>{const _0x1254ce=_0x2b3d;this[_0x1254ce(0x128)][_0x1254ce(0x14c)](_0x3ee509);});}[_0x361ff7(0x179)](){const _0x338fb9=_0x361ff7;this[_0x338fb9(0x128)]['get'](g),this[_0x338fb9(0x128)][_0x338fb9(0x176)](S);}};$(b,_0x361ff7(0x171),W),$(b,_0x361ff7(0x172),_0x5015d6[_0x361ff7(0x143)]),b=ie([_0x434b14(_0x4bca2b,_0x1f4157,_0x50fae2),w(0x1,_0x4c9cd9(_0x1592aa)),w(0x2,_0x2808c2)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x2d5350=_0x5b24;function _0x5282(){const _0x322b26=['format','OpenOrReOpen','getCurrentUser','/edit','body','symbol','requireSession','/universer-api/comment/unit/','onReady','size','rangeType','userId','Reply','deleteComment','user','ref','getComment','comments','/solved','31920240NEnvaB','get','Unknown','listComments','content','forEach','_httpService','1763512CQnKvL','stringify','parse','root','_configService','replies','_injector','Add','code','Delete','_threadCommentDataSourceService','Solve','getMemberID','_threadCommentDataSource','/add','Solved','_commentService','UNIVER_UNKNOWN','6986168DhicmD','threadId','solved','5801478JeRctW','onStarting','defineProperty','reply','delete','post','updateComment','userID','find','dataSource','subscribe','_sessionService','getUser','disposeWithMe','users','9ZHbwiz','_config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentModel','Edit','getUnit','customRanges','add','1208Pbenet','/list','replyId','_initUserSync','addUser','unitId','5638824XeUNfj','commentUpdate$','1IrWvpq','2885427rweuQJ','_initDataSource','rangeId','COMMENT','filter','type','resolveComment','_userService','createTimestamp','13085twpSKB','UNRECOGNIZED','length','pluginName','map','pipe','error','getOwnPropertyDescriptor'];_0x5282=function(){return _0x322b26;};return _0x5282();}(function(_0x4f49c9,_0x1d89f0){const _0xa95a08=_0x5b24,_0x3a6338=_0x4f49c9();while(!![]){try{const _0x5300d0=parseInt(_0xa95a08(0xed))/0x1*(parseInt(_0xa95a08(0x119))/0x2)+parseInt(_0xa95a08(0xee))/0x3+parseInt(_0xa95a08(0xe5))/0x4*(parseInt(_0xa95a08(0xf7))/0x5)+parseInt(_0xa95a08(0xce))/0x6+parseInt(_0xa95a08(0xcb))/0x7+parseInt(_0xa95a08(0xeb))/0x8*(-parseInt(_0xa95a08(0xdd))/0x9)+-parseInt(_0xa95a08(0x112))/0xa;if(_0x5300d0===_0x1d89f0)break;else _0x3a6338['push'](_0x3a6338['shift']());}catch(_0xee8e77){_0x3a6338['push'](_0x3a6338['shift']());}}}(_0x5282,0xab607));import{CommentService as _0x5646f3,CollaborationSessionService as _0x242f6a,UniverCollaborationClientPlugin as _0x1f9298}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3137d0}from'@univerjs-pro/license';import{dayjs as _0x4b79be,UserManagerService as _0x48e2a5,Inject as _0x82e101,Injector as _0x2de2a0,Disposable as _0xd7e540,CustomRangeType as _0x27a3d3,UniverInstanceType as _0x5b3885,DependentOn as _0xfde2f5,IConfigService as _0x14ce99,Plugin as _0x419499,merge as _0x4682c7}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x55cac6}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1ba485,IThreadCommentDataSourceService as _0x4fae4e}from'@univerjs/thread-comment';import{bufferTime as _0x1ee30f}from'rxjs';function _0x5b24(_0x1cdd0e,_0x5af263){const _0x5282bc=_0x5282();return _0x5b24=function(_0x5b240b,_0x2b21c8){_0x5b240b=_0x5b240b-0xc8;let _0x1acb8b=_0x5282bc[_0x5b240b];return _0x1acb8b;},_0x5b24(_0x1cdd0e,_0x5af263);}import{HTTPService as _0x16aa01}from'@univerjs/network';const W=_0x2d5350(0xdf);var I=(_0x3024b4=>(_0x3024b4[_0x3024b4[_0x2d5350(0x100)]=0x0]='OpenOrReOpen',_0x3024b4[_0x3024b4['Solved']=0x1]='Solved',_0x3024b4[_0x3024b4[_0x2d5350(0xf8)]=-0x1]='UNRECOGNIZED',_0x3024b4))(I||{}),v=(_0x124b25=>(_0x124b25[_0x124b25[_0x2d5350(0x114)]=0x0]=_0x2d5350(0x114),_0x124b25[_0x124b25[_0x2d5350(0x120)]=0x1]=_0x2d5350(0x120),_0x124b25[_0x124b25[_0x2d5350(0x10b)]=0x2]=_0x2d5350(0x10b),_0x124b25[_0x124b25[_0x2d5350(0xe1)]=0x3]=_0x2d5350(0xe1),_0x124b25[_0x124b25[_0x2d5350(0x122)]=0x4]=_0x2d5350(0x122),_0x124b25[_0x124b25[_0x2d5350(0x124)]=0x5]=_0x2d5350(0x124),_0x124b25[_0x124b25[_0x2d5350(0xf8)]=-0x1]=_0x2d5350(0xf8),_0x124b25))(v||{});const D=_0x35cca1=>_0x4b79be(new Date(+_0x35cca1))[_0x2d5350(0xff)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3e423b,_0x367b81)=>{const _0x8e92fc=_0x2d5350,_0x379b67=_0x3e423b[_0x8e92fc(0x113)](_0x48e2a5),_0xa89619=_0x3e423b['get'](_0x16aa01);_0x367b81['forEach'](_0x16088e=>{const _0x3d4f42=_0x8e92fc;_0x379b67[_0x3d4f42(0xda)](_0x16088e)&&_0x367b81[_0x3d4f42(0xd2)](_0x16088e);}),_0x367b81[_0x8e92fc(0x108)]&&(await _0xa89619[_0x8e92fc(0x113)]('/universer-api/user/list',{'params':{'userIDs':[..._0x367b81]}}))[_0x8e92fc(0x103)][_0x8e92fc(0xdc)][_0x8e92fc(0x117)](_0x402337=>{const _0x2ffb06=_0x8e92fc;_0x402337&&_0x379b67[_0x2ffb06(0xe9)](_0x402337);});};var K=Object[_0x2d5350(0xfe)],V=(_0xcb8fcf,_0x975fa6,_0x305288,_0x4242cf)=>{const _0x5429ec=_0x2d5350;for(var _0x17ad9a=_0x4242cf>0x1?void 0x0:_0x4242cf?K(_0x975fa6,_0x305288):_0x975fa6,_0x48544c=_0xcb8fcf[_0x5429ec(0xf9)]-0x1,_0x1bd1ac;_0x48544c>=0x0;_0x48544c--)(_0x1bd1ac=_0xcb8fcf[_0x48544c])&&(_0x17ad9a=_0x1bd1ac(_0x17ad9a)||_0x17ad9a);return _0x17ad9a;},p=(_0x54ffd1,_0x234003)=>(_0x22f624,_0x47e8ec)=>_0x234003(_0x22f624,_0x47e8ec,_0x54ffd1);let S=class extends _0xd7e540{constructor(_0x1c8253,_0x50c327,_0x11a5e8,_0x4f4a1c){const _0x431fd6=_0x2d5350;super(),this[_0x431fd6(0xc9)]=_0x1c8253,this[_0x431fd6(0xe0)]=_0x50c327,this[_0x431fd6(0xf5)]=_0x11a5e8,this[_0x431fd6(0x11f)]=_0x4f4a1c,this['_init'](),this[_0x431fd6(0xe8)]();}[_0x2d5350(0xe8)](){const _0x430198=_0x2d5350;this[_0x430198(0xdb)](this['_threadCommentModel'][_0x430198(0xec)][_0x430198(0xfc)](_0x1ee30f(0x10))['subscribe'](_0x387b63=>{const _0x35251e=_0x430198,_0xe145be=new Set();_0x387b63[_0x35251e(0x117)](_0x128904=>{const _0x400e9b=_0x35251e;switch(_0x128904[_0x400e9b(0xf3)]){case'add':{const _0x35594e=_0x128904['payload']['personId'];_0xe145be[_0x400e9b(0xe4)](_0x35594e);break;}}}),B(this[_0x35251e(0x11f)],_0xe145be);}));}['_init'](){const _0x10548d=_0x2d5350;this[_0x10548d(0xdb)](this[_0x10548d(0xc9)][_0x10548d(0xec)][_0x10548d(0xd8)](async _0x79bf6a=>{const _0x1b120d=_0x10548d;var _0x2a947d,_0x45f03f,_0x33dc3b,_0x5c655c;const _0x35e463=(_0x2a947d=this[_0x1b120d(0xe0)][_0x1b120d(0xe2)](_0x79bf6a[_0x1b120d(0xea)])[_0x1b120d(0xd6)](_0x5cfb28=>_0x5cfb28[_0x1b120d(0xcc)]===_0x79bf6a[_0x1b120d(0xcc)]))==null?void 0x0:_0x2a947d[_0x1b120d(0x11c)];if(!_0x35e463)return;const {unitId:_0x41d88e,subUnitId:_0x456ee6}=_0x35e463;switch(_0x79bf6a[_0x1b120d(0x10d)]&&this['_userService'][_0x1b120d(0xe9)](_0x79bf6a[_0x1b120d(0x10d)]),_0x79bf6a[_0x1b120d(0xf3)]){case v[_0x1b120d(0x120)]:break;case v['Reply']:{this[_0x1b120d(0xe0)]['addComment'](_0x41d88e,_0x456ee6,{'unitId':_0x41d88e,'subUnitId':_0x456ee6,'ref':'','id':_0x79bf6a['replyId'],'dT':D(+_0x79bf6a[_0x1b120d(0xf6)]),'threadId':_0x79bf6a['threadId'],'personId':(_0x33dc3b=(_0x45f03f=_0x79bf6a[_0x1b120d(0x10d)])==null?void 0x0:_0x45f03f[_0x1b120d(0xd5)])!=null?_0x33dc3b:_0x79bf6a['userId'],'text':JSON[_0x1b120d(0x11b)](_0x79bf6a[_0x1b120d(0x116)]),'parentId':_0x35e463['id']});break;}case v[_0x1b120d(0x122)]:{const _0x151700=this['_threadCommentModel'][_0x1b120d(0x10f)](_0x41d88e,_0x456ee6,_0x79bf6a[_0x1b120d(0xe7)]);_0x151700&&_0x151700['parentId']&&this[_0x1b120d(0xe0)]['deleteComment'](_0x41d88e,_0x456ee6,_0x79bf6a[_0x1b120d(0xe7)]);break;}case v[_0x1b120d(0xe1)]:{this['_threadCommentModel']['updateComment'](_0x41d88e,_0x456ee6,{'commentId':_0x79bf6a['replyId'],'text':JSON[_0x1b120d(0x11b)](_0x79bf6a[_0x1b120d(0x116)])});break;}case v[_0x1b120d(0x124)]:{const _0x3d510d=(_0x5c655c=this[_0x1b120d(0xe0)][_0x1b120d(0xe2)](_0x79bf6a['unitId'])[_0x1b120d(0xd6)](_0x167fe3=>_0x167fe3['threadId']===_0x79bf6a[_0x1b120d(0xcc)]))==null?void 0x0:_0x5c655c[_0x1b120d(0x11c)];_0x3d510d&&this[_0x1b120d(0xe0)][_0x1b120d(0xf4)](_0x41d88e,_0x456ee6,_0x3d510d['id'],_0x79bf6a[_0x1b120d(0xcd)]===I[_0x1b120d(0xc8)]);break;}}}));}};S=V([p(0x0,_0x82e101(_0x5646f3)),p(0x1,_0x82e101(_0x1ba485)),p(0x2,_0x82e101(_0x48e2a5)),p(0x3,_0x82e101(_0x2de2a0))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1df013,_0x388f42,_0x986144,_0x5354af)=>{const _0x4b08f0=_0x2d5350;for(var _0x27d257=_0x5354af>0x1?void 0x0:_0x5354af?k(_0x388f42,_0x986144):_0x388f42,_0x2e01c4=_0x1df013[_0x4b08f0(0xf9)]-0x1,_0x26e628;_0x2e01c4>=0x0;_0x2e01c4--)(_0x26e628=_0x1df013[_0x2e01c4])&&(_0x27d257=_0x26e628(_0x27d257)||_0x27d257);return _0x27d257;},_=(_0x4bdda0,_0x36d52c)=>(_0x520d65,_0x141c4e)=>_0x36d52c(_0x520d65,_0x141c4e,_0x4bdda0);function X(_0x5e74aa,_0x413701){const _0x2f8e15=_0x2d5350,_0x5ac38b=_0x5e74aa[_0x2f8e15(0x11e)][0x0];return{..._0x413701,'id':_0x5ac38b[_0x2f8e15(0xe7)],'resolved':_0x5e74aa[_0x2f8e15(0xcd)]===0x1,'dT':D(_0x5ac38b[_0x2f8e15(0xf6)]),'personId':_0x5ac38b[_0x2f8e15(0x10a)],'threadId':_0x5ac38b[_0x2f8e15(0xcc)]};}function ee(_0x2417a,_0x1931a0,_0x5b039b){const _0xee6606=_0x2d5350;var _0x2dc4af,_0x85328f;if(((_0x85328f=(_0x2dc4af=_0x2417a==null?void 0x0:_0x2417a[_0xee6606(0x11e)])==null?void 0x0:_0x2dc4af[_0xee6606(0xf9)])!=null?_0x85328f:0x0)>0x0){const _0x395103=(_0x360bdc,_0x38d607)=>({'id':_0x360bdc['replyId'],'threadId':_0x360bdc[_0xee6606(0xcc)],'dT':D(_0x360bdc[_0xee6606(0xf6)]),'personId':_0x360bdc[_0xee6606(0x10a)],'resolved':_0x2417a[_0xee6606(0xcd)]===I[_0xee6606(0xc8)],'unitId':_0x1931a0,'subUnitId':_0x5b039b,'text':JSON[_0xee6606(0x11b)](_0x360bdc[_0xee6606(0x116)]),'parentId':_0x38d607}),_0x4dce44=_0x395103(_0x2417a[_0xee6606(0x11e)][0x0]);return{..._0x4dce44,'children':_0x2417a['replies']['slice'](0x1)[_0xee6606(0xfb)](_0x5bbbba=>_0x395103(_0x5bbbba,_0x4dce44['id']))};}return null;}let f=class{constructor(_0x27a508,_0x576c22,_0x28db77,_0x1180f6){const _0x12defe=_0x2d5350;this[_0x12defe(0x118)]=_0x27a508,this['_userService']=_0x576c22,this[_0x12defe(0xd9)]=_0x28db77,this['_injector']=_0x1180f6;}async['addComment'](_0x2610cc){const _0x30c68b=_0x2d5350;var _0x4071d5,_0x4a7861;const {parentId:_0x324571,unitId:_0x17f5e0,text:_0x81fbea,threadId:_0x151e10}=_0x2610cc,_0x2e0da6=(_0x4a7861=(_0x4071d5=_0x81fbea[_0x30c68b(0xe3)])==null?void 0x0:_0x4071d5[_0x30c68b(0xf2)](_0x43d350=>_0x43d350[_0x30c68b(0x109)]===_0x27a3d3[_0x30c68b(0xf1)])[_0x30c68b(0xfb)](_0x6c75c5=>_0x6c75c5[_0x30c68b(0xf0)]))!=null?_0x4a7861:[],_0x1a50a4=JSON[_0x30c68b(0x11a)](_0x81fbea),_0x55db86=(await this[_0x30c68b(0xd9)]['requireSession'](_0x17f5e0))[_0x30c68b(0x125)]();if(_0x324571){const _0x580ad2={'memberId':_0x55db86,'unitId':_0x17f5e0,'content':_0x1a50a4,'mention':_0x2e0da6,'threadId':_0x151e10},_0x2d770c=(await this['_httpService']['post'](_0x30c68b(0x106)+_0x17f5e0+'/reply',{'body':_0x580ad2}))[_0x30c68b(0x103)][_0x30c68b(0xd1)];return{..._0x2610cc,'id':_0x2d770c[_0x30c68b(0xe7)],'dT':_0x4b79be(+_0x2d770c[_0x30c68b(0xf6)])[_0x30c68b(0xff)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2d770c[_0x30c68b(0x10a)]};}else{const _0xceb580={'memberId':_0x55db86,'unitId':_0x17f5e0,'content':_0x1a50a4,'mention':_0x2e0da6},_0x168c13=await this['_httpService'][_0x30c68b(0xd3)](_0x30c68b(0x106)+_0x17f5e0+_0x30c68b(0x127),{'body':_0xceb580});return X(_0x168c13['body']['comment'],_0x2610cc);}}async[_0x2d5350(0xd4)](_0x47e27d){const _0x85ce6a=_0x2d5350;var _0x31e541,_0x49498e;const {text:_0x1951c8,unitId:_0x195b3f}=_0x47e27d,_0x2f6d65=(_0x49498e=(_0x31e541=_0x1951c8['customRanges'])==null?void 0x0:_0x31e541[_0x85ce6a(0xf2)](_0x111feb=>_0x111feb['rangeType']===_0x27a3d3[_0x85ce6a(0xf1)])[_0x85ce6a(0xfb)](_0x35fdd7=>_0x35fdd7['rangeId']))!=null?_0x49498e:[],_0x713cf1=JSON[_0x85ce6a(0x11a)](_0x1951c8),_0x4fc30d=_0x47e27d[_0x85ce6a(0xcc)],_0x1e5033=_0x47e27d['id'],_0x487d62={'memberId':(await this[_0x85ce6a(0xd9)][_0x85ce6a(0x105)](_0x195b3f))[_0x85ce6a(0x125)](),'unitId':_0x195b3f,'threadId':_0x4fc30d,'mention':_0x2f6d65,'content':_0x713cf1,'replyId':_0x1e5033},_0x236b07=await this[_0x85ce6a(0x118)][_0x85ce6a(0xd3)](_0x85ce6a(0x106)+_0x195b3f+_0x85ce6a(0x102),{'body':_0x487d62});return!_0x236b07['body'][_0x85ce6a(0xfd)]||_0x236b07[_0x85ce6a(0x103)]['error'][_0x85ce6a(0x121)]===0x1;}async[_0x2d5350(0xf4)](_0x675f29){const _0x43c343=_0x2d5350,{unitId:_0x27a660}=_0x675f29,_0x448c66=_0x675f29[_0x43c343(0xcc)],_0x14a711={'memberId':this[_0x43c343(0xf5)][_0x43c343(0x101)]()['userID'],'unitId':_0x27a660,'threadId':_0x448c66,'solved':_0x675f29['resolved']?I['Solved']:I['OpenOrReOpen']},_0x282023=await this[_0x43c343(0x118)][_0x43c343(0xd3)]('/universer-api/comment/unit/'+_0x27a660+_0x43c343(0x111),{'body':_0x14a711});return!_0x282023[_0x43c343(0x103)][_0x43c343(0xfd)]||_0x282023[_0x43c343(0x103)][_0x43c343(0xfd)]['code']===0x1;}async[_0x2d5350(0x10c)](_0x3776f5,_0x3ba336,_0x1779c9,_0x5ae9b3){const _0xbafe49=_0x2d5350,_0x3d9aad={'memberId':(await this['_sessionService'][_0xbafe49(0x105)](_0x3776f5))[_0xbafe49(0x125)](),'threadId':_0x1779c9,'replyId':_0x5ae9b3,'unitId':_0x3776f5},_0x2d252c=await this['_httpService']['post'](_0xbafe49(0x106)+_0x3776f5+'/delete',{'body':_0x3d9aad});return!_0x2d252c[_0xbafe49(0x103)][_0xbafe49(0xfd)]||_0x2d252c[_0xbafe49(0x103)][_0xbafe49(0xfd)][_0xbafe49(0x121)]===0x1;}async[_0x2d5350(0x115)](_0x5bc84b,_0x124577,_0x144626){const _0x32ed26=_0x2d5350,_0x5c63f8={'unitId':_0x5bc84b,'threadId':_0x144626},_0x28f4ec=await this[_0x32ed26(0x118)][_0x32ed26(0xd3)]('/universer-api/comment/unit/'+_0x5bc84b+_0x32ed26(0xe6),{'body':_0x5c63f8}),_0x49ddfc=_0x144626[_0x32ed26(0xfb)](_0x1fab8e=>ee(_0x28f4ec['body'][_0x32ed26(0x110)][_0x1fab8e],_0x5bc84b,_0x124577))['filter'](Boolean);return Object['values'](_0x28f4ec[_0x32ed26(0x103)][_0x32ed26(0xdc)])[_0x32ed26(0x117)](_0xd5d441=>{const _0x1af91d=_0x32ed26;this[_0x1af91d(0xf5)][_0x1af91d(0xe9)](_0xd5d441);}),_0x49ddfc;}['saveCommentToSnapshot'](_0x172d15){const _0x52eb70=_0x2d5350;return{'id':_0x172d15['id'],'threadId':_0x172d15['threadId'],'ref':_0x172d15[_0x52eb70(0x10e)]};}};f=Q([_(0x0,_0x82e101(_0x16aa01)),_(0x1,_0x82e101(_0x48e2a5)),_(0x2,_0x82e101(_0x242f6a)),_(0x3,_0x82e101(_0x2de2a0))],f);var re=Object[_0x2d5350(0xfe)],te=(_0x161bb3,_0x4e6a7b,_0x316e49,_0x3b8236)=>{const _0x99020e=_0x2d5350;for(var _0x38d524=_0x3b8236>0x1?void 0x0:_0x3b8236?re(_0x4e6a7b,_0x316e49):_0x4e6a7b,_0x39255b=_0x161bb3[_0x99020e(0xf9)]-0x1,_0x1341c9;_0x39255b>=0x0;_0x39255b--)(_0x1341c9=_0x161bb3[_0x39255b])&&(_0x38d524=_0x1341c9(_0x38d524)||_0x38d524);return _0x38d524;},N=(_0x31621c,_0xad4c0f)=>(_0x2024d5,_0x394031)=>_0xad4c0f(_0x2024d5,_0x394031,_0x31621c);let g=class extends _0xd7e540{constructor(_0x2e1c38,_0x31f48d){const _0x61a7bc=_0x2d5350;super(),this[_0x61a7bc(0x123)]=_0x2e1c38,this[_0x61a7bc(0x126)]=_0x31f48d,this[_0x61a7bc(0xef)]();}['_initDataSource'](){const _0x99b2e2=_0x2d5350;this[_0x99b2e2(0x123)][_0x99b2e2(0xd7)]=this[_0x99b2e2(0x126)],this[_0x99b2e2(0x123)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x4fae4e),N(0x1,_0x82e101(f))],g);var se=Object[_0x2d5350(0xd0)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1d8100,_0xb2340,_0x542ef7)=>_0xb2340 in _0x1d8100?se(_0x1d8100,_0xb2340,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x542ef7}):_0x1d8100[_0xb2340]=_0x542ef7,ie=(_0x42f1d8,_0x4548d8,_0x54b53c,_0x4c2c1f)=>{for(var _0x5dbc5d=_0x4c2c1f>0x1?void 0x0:_0x4c2c1f?oe(_0x4548d8,_0x54b53c):_0x4548d8,_0xdae79f=_0x42f1d8['length']-0x1,_0x2c1c90;_0xdae79f>=0x0;_0xdae79f--)(_0x2c1c90=_0x42f1d8[_0xdae79f])&&(_0x5dbc5d=_0x2c1c90(_0x5dbc5d)||_0x5dbc5d);return _0x5dbc5d;},w=(_0xbd0b62,_0x57b92e)=>(_0x2f69b6,_0x5c7479)=>_0x57b92e(_0x2f69b6,_0x5c7479,_0xbd0b62),$=(_0x52dd39,_0x1a4a83,_0x1fdefe)=>ne(_0x52dd39,typeof _0x1a4a83!=_0x2d5350(0x104)?_0x1a4a83+'':_0x1a4a83,_0x1fdefe);let b=class extends _0x419499{constructor(_0x418a10=M,_0x4b4bbc,_0x16863c){const _0x421808=_0x2d5350;super(),this['_config']=_0x418a10,this[_0x421808(0x11f)]=_0x4b4bbc,this[_0x421808(0x11d)]=_0x16863c;const {..._0x5da4ff}=_0x4682c7({},M,this[_0x421808(0xde)]);this['_configService']['setConfig'](z,_0x5da4ff);}[_0x2d5350(0xcf)](){const _0x173f0d=_0x2d5350;[[f],[g],[S]][_0x173f0d(0x117)](_0x43f6e8=>{const _0x41eb1d=_0x173f0d;this['_injector'][_0x41eb1d(0xe4)](_0x43f6e8);});}[_0x2d5350(0x107)](){const _0x51c706=_0x2d5350;this[_0x51c706(0x11f)][_0x51c706(0x113)](g),this[_0x51c706(0x11f)]['get'](S);}};$(b,_0x2d5350(0xfa),W),$(b,'type',_0x5b3885[_0x2d5350(0xca)]),b=ie([_0xfde2f5(_0x55cac6,_0x1f9298,_0x3137d0),w(0x1,_0x82e101(_0x2de2a0)),w(0x2,_0x14ce99)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x2e59(){const _0x1de1a4=['_injector','root','649176CNfwrc','Reply','UniverCore','Add','disposeWithMe','UniverThreadCommentUIPlugin','_userService','64842Mregox','size','comment','IThreadCommentDataSourceService','1486405mAoIJo','Edit','length','1038bFfTrO','CustomRangeType','rangeType','deleteComment','Unknown','personId','IConfigService','/reply','type','get','DependentOn','dataSource','parse','UniverInstanceType','saveCommentToSnapshot','forEach','function','resolveComment','Inject','Injector','payload','add','solved','1361099ofHQnQ','requireSession','body','_initDataSource','getUser','getMemberID','10520700lcdeGo','@univerjs/thread-comment-ui','code','onStarting','defineProperty','ref','rangeId','merge','addUser','OpenOrReOpen','userID','483hPdBmy','/add','object','8206KhwXuy','getCurrentUser','_sessionService','customRanges','content','pluginName','_commentService','values','UniverCollaborationClientPlugin','/universer-api/user/list','135iaFBgH','_init','_threadCommentModel','UniverProCollaborationClient','exports','post','user','_threadCommentDataSource','@univerjs-pro/license','Solve','getUnit','UniverThreadCommentUi','replies','Delete','YYYY/MM/DD\x20HH:mm','UniverProLicense','_configService','dayjs','_initUserSync','@univerjs/network','CollaborationSessionService','COMMENT','/list','subscribe','UniverProThreadCommentDatasource','listComments','2568665ERSPmB','UserManagerService','/universer-api/comment/unit/','replyId','Module','filter','@univerjs/core','addComment','Solved','bufferTime','thread-comment-data-source.config','createTimestamp','reply','commentUpdate$','find','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getOwnPropertyDescriptor','updateComment','_threadCommentDataSourceService','UniverNetwork','error','UNRECOGNIZED','HTTPService','/delete','UniverThreadCommentDataSourcePlugin','threadId','4wVfQFs','delete','resolved','toStringTag','_config','slice','getComment','_httpService','Disposable','format','comments','userId','rxjs','map','setConfig','@univerjs/thread-comment'];_0x2e59=function(){return _0x1de1a4;};return _0x2e59();}function _0x110d(_0x28f4bb,_0x1fc91d){const _0x2e59d5=_0x2e59();return _0x110d=function(_0x110d3e,_0x51545f){_0x110d3e=_0x110d3e-0x7e;let _0x577268=_0x2e59d5[_0x110d3e];return _0x577268;},_0x110d(_0x28f4bb,_0x1fc91d);}(function(_0x4612b1,_0x265f85){const _0xd80ef0=_0x110d,_0x1d66a7=_0x4612b1();while(!![]){try{const _0x1c27a4=-parseInt(_0xd80ef0(0x98))/0x1+parseInt(_0xd80ef0(0xac))/0x2*(parseInt(_0xd80ef0(0x81))/0x3)+parseInt(_0xd80ef0(0xea))/0x4*(-parseInt(_0xd80ef0(0x7e))/0x5)+-parseInt(_0xd80ef0(0x103))/0x6*(-parseInt(_0xd80ef0(0xa9))/0x7)+-parseInt(_0xd80ef0(0xfc))/0x8*(-parseInt(_0xd80ef0(0xb6))/0x9)+-parseInt(_0xd80ef0(0x9e))/0xa+parseInt(_0xd80ef0(0xd0))/0xb;if(_0x1c27a4===_0x265f85)break;else _0x1d66a7['push'](_0x1d66a7['shift']());}catch(_0x4e2af2){_0x1d66a7['push'](_0x1d66a7['shift']());}}}(_0x2e59,0xdd177),function(_0x576453,_0x3e43d2){const _0x5e04fb=_0x110d;typeof exports==_0x5e04fb(0xab)&&typeof module<'u'?_0x3e43d2(exports,require('@univerjs-pro/collaboration-client'),require(_0x5e04fb(0xbe)),require(_0x5e04fb(0xd6)),require(_0x5e04fb(0x9f)),require(_0x5e04fb(0xf9)),require('rxjs'),require(_0x5e04fb(0xc9))):typeof define==_0x5e04fb(0x91)&&define['amd']?define([_0x5e04fb(0xba),'@univerjs-pro/collaboration-client','@univerjs-pro/license',_0x5e04fb(0xd6),_0x5e04fb(0x9f),_0x5e04fb(0xf9),_0x5e04fb(0xf6),_0x5e04fb(0xc9)],_0x3e43d2):(_0x576453=typeof globalThis<'u'?globalThis:_0x576453||self,_0x3e43d2(_0x576453[_0x5e04fb(0xce)]={},_0x576453[_0x5e04fb(0xb9)],_0x576453[_0x5e04fb(0xc5)],_0x576453[_0x5e04fb(0xfe)],_0x576453[_0x5e04fb(0xc1)],_0x576453['UniverThreadComment'],_0x576453[_0x5e04fb(0xf6)],_0x576453[_0x5e04fb(0xe3)]));}(this,function(_0x46e8a4,_0x22466d,_0x3ab69a,_0x433b27,_0x2f04bb,_0x158d2c,_0x232b85,_0x314ea6){'use strict';const _0x1d4772=_0x110d;const _0x188ebf=_0x1d4772(0xdf);var _0x32d80a=(_0x4370f9=>(_0x4370f9[_0x4370f9[_0x1d4772(0xa7)]=0x0]=_0x1d4772(0xa7),_0x4370f9[_0x4370f9[_0x1d4772(0xd8)]=0x1]='Solved',_0x4370f9[_0x4370f9[_0x1d4772(0xe5)]=-0x1]=_0x1d4772(0xe5),_0x4370f9))(_0x32d80a||{}),_0x594ec7=(_0x189fcd=>(_0x189fcd[_0x189fcd[_0x1d4772(0x85)]=0x0]=_0x1d4772(0x85),_0x189fcd[_0x189fcd[_0x1d4772(0xff)]=0x1]=_0x1d4772(0xff),_0x189fcd[_0x189fcd[_0x1d4772(0xfd)]=0x2]='Reply',_0x189fcd[_0x189fcd[_0x1d4772(0x7f)]=0x3]=_0x1d4772(0x7f),_0x189fcd[_0x189fcd[_0x1d4772(0xc3)]=0x4]=_0x1d4772(0xc3),_0x189fcd[_0x189fcd[_0x1d4772(0xbf)]=0x5]='Solve',_0x189fcd[_0x189fcd[_0x1d4772(0xe5)]=-0x1]=_0x1d4772(0xe5),_0x189fcd))(_0x594ec7||{});const _0x3bc9ef=_0x58940e=>_0x433b27[_0x1d4772(0xc7)](new Date(+_0x58940e))[_0x1d4772(0xf3)](_0x1d4772(0xc4)),_0x3f4c98=async(_0x129496,_0x121628)=>{const _0x1eba46=_0x1d4772,_0xea4e69=_0x129496[_0x1eba46(0x8a)](_0x433b27[_0x1eba46(0xd1)]),_0x64eb58=_0x129496['get'](_0x314ea6[_0x1eba46(0xe6)]);_0x121628[_0x1eba46(0x90)](_0x506380=>{const _0x1b43f7=_0x1eba46;_0xea4e69[_0x1b43f7(0x9c)](_0x506380)&&_0x121628[_0x1b43f7(0xeb)](_0x506380);}),_0x121628[_0x1eba46(0x104)]&&(await _0x64eb58[_0x1eba46(0x8a)](_0x1eba46(0xb5),{'params':{'userIDs':[..._0x121628]}}))[_0x1eba46(0x9a)]['users']['forEach'](_0xf47aeb=>{_0xf47aeb&&_0xea4e69['addUser'](_0xf47aeb);});};var _0x1970e3=Object[_0x1d4772(0xe0)],_0x1dd895=(_0x412698,_0x59c071,_0x31151b,_0x4e6c33)=>{const _0x4e7587=_0x1d4772;for(var _0x4885dd=_0x4e6c33>0x1?void 0x0:_0x4e6c33?_0x1970e3(_0x59c071,_0x31151b):_0x59c071,_0x5b6d80=_0x412698[_0x4e7587(0x80)]-0x1,_0x3638c1;_0x5b6d80>=0x0;_0x5b6d80--)(_0x3638c1=_0x412698[_0x5b6d80])&&(_0x4885dd=_0x3638c1(_0x4885dd)||_0x4885dd);return _0x4885dd;},_0x2a846a=(_0x297f66,_0x56bb97)=>(_0x279d75,_0x4c87c3)=>_0x56bb97(_0x279d75,_0x4c87c3,_0x297f66);let _0x1ef2cb=class extends _0x433b27['Disposable']{constructor(_0x216cd8,_0x2c6626,_0x235a97,_0x253fc8){const _0xd822fc=_0x1d4772;super(),this['_commentService']=_0x216cd8,this[_0xd822fc(0xb8)]=_0x2c6626,this[_0xd822fc(0x102)]=_0x235a97,this[_0xd822fc(0xfa)]=_0x253fc8,this['_init'](),this['_initUserSync']();}[_0x1d4772(0xc8)](){const _0x43f72=_0x1d4772;this[_0x43f72(0x100)](this[_0x43f72(0xb8)][_0x43f72(0xdd)]['pipe'](_0x232b85[_0x43f72(0xd9)](0x10))[_0x43f72(0xcd)](_0x1aed4a=>{const _0x146c87=_0x43f72,_0x315fe1=new Set();_0x1aed4a[_0x146c87(0x90)](_0x36295d=>{const _0x47c168=_0x146c87;switch(_0x36295d[_0x47c168(0x89)]){case _0x47c168(0x96):{const _0x48b8d0=_0x36295d[_0x47c168(0x95)][_0x47c168(0x86)];_0x315fe1['add'](_0x48b8d0);break;}}}),_0x3f4c98(this[_0x146c87(0xfa)],_0x315fe1);}));}[_0x1d4772(0xb7)](){const _0x2dac06=_0x1d4772;this[_0x2dac06(0x100)](this[_0x2dac06(0xb2)]['commentUpdate$'][_0x2dac06(0xcd)](async _0x1151f5=>{const _0x153595=_0x2dac06;var _0x4b6419,_0x5b2d95,_0x538bcc,_0x18b0dd;const _0x1a262d=(_0x4b6419=this[_0x153595(0xb8)][_0x153595(0xc0)](_0x1151f5['unitId'])[_0x153595(0xde)](_0x193184=>_0x193184['threadId']===_0x1151f5[_0x153595(0xe9)]))==null?void 0x0:_0x4b6419[_0x153595(0xfb)];if(!_0x1a262d)return;const {unitId:_0x3e4abb,subUnitId:_0x38eab4}=_0x1a262d;switch(_0x1151f5[_0x153595(0xbc)]&&this['_userService'][_0x153595(0xa6)](_0x1151f5[_0x153595(0xbc)]),_0x1151f5['type']){case _0x594ec7[_0x153595(0xff)]:break;case _0x594ec7['Reply']:{this[_0x153595(0xb8)][_0x153595(0xd7)](_0x3e4abb,_0x38eab4,{'unitId':_0x3e4abb,'subUnitId':_0x38eab4,'ref':'','id':_0x1151f5['replyId'],'dT':_0x3bc9ef(+_0x1151f5[_0x153595(0xdb)]),'threadId':_0x1151f5[_0x153595(0xe9)],'personId':(_0x538bcc=(_0x5b2d95=_0x1151f5[_0x153595(0xbc)])==null?void 0x0:_0x5b2d95[_0x153595(0xa8)])!=null?_0x538bcc:_0x1151f5[_0x153595(0xf5)],'text':JSON[_0x153595(0x8d)](_0x1151f5['content']),'parentId':_0x1a262d['id']});break;}case _0x594ec7[_0x153595(0xc3)]:{const _0x5d5dbd=this[_0x153595(0xb8)][_0x153595(0xf0)](_0x3e4abb,_0x38eab4,_0x1151f5[_0x153595(0xd3)]);_0x5d5dbd&&_0x5d5dbd['parentId']&&this[_0x153595(0xb8)][_0x153595(0x84)](_0x3e4abb,_0x38eab4,_0x1151f5[_0x153595(0xd3)]);break;}case _0x594ec7['Edit']:{this['_threadCommentModel'][_0x153595(0xe1)](_0x3e4abb,_0x38eab4,{'commentId':_0x1151f5[_0x153595(0xd3)],'text':JSON['parse'](_0x1151f5[_0x153595(0xb0)])});break;}case _0x594ec7[_0x153595(0xbf)]:{const _0x2ce26d=(_0x18b0dd=this[_0x153595(0xb8)][_0x153595(0xc0)](_0x1151f5['unitId'])['find'](_0x986bb0=>_0x986bb0['threadId']===_0x1151f5[_0x153595(0xe9)]))==null?void 0x0:_0x18b0dd[_0x153595(0xfb)];_0x2ce26d&&this['_threadCommentModel'][_0x153595(0x92)](_0x3e4abb,_0x38eab4,_0x2ce26d['id'],_0x1151f5[_0x153595(0x97)]===_0x32d80a[_0x153595(0xd8)]);break;}}}));}};_0x1ef2cb=_0x1dd895([_0x2a846a(0x0,_0x433b27[_0x1d4772(0x93)](_0x22466d['CommentService'])),_0x2a846a(0x1,_0x433b27[_0x1d4772(0x93)](_0x158d2c['ThreadCommentModel'])),_0x2a846a(0x2,_0x433b27[_0x1d4772(0x93)](_0x433b27[_0x1d4772(0xd1)])),_0x2a846a(0x3,_0x433b27[_0x1d4772(0x93)](_0x433b27[_0x1d4772(0x94)]))],_0x1ef2cb);const _0x14a81b=_0x1d4772(0xda),_0x4b4cba={};var _0x4b4807=Object['getOwnPropertyDescriptor'],_0x23d3f5=(_0x4cdfa0,_0x3b787c,_0x34cd98,_0xa161bf)=>{for(var _0x2aab18=_0xa161bf>0x1?void 0x0:_0xa161bf?_0x4b4807(_0x3b787c,_0x34cd98):_0x3b787c,_0x3fe52d=_0x4cdfa0['length']-0x1,_0x37b6c3;_0x3fe52d>=0x0;_0x3fe52d--)(_0x37b6c3=_0x4cdfa0[_0x3fe52d])&&(_0x2aab18=_0x37b6c3(_0x2aab18)||_0x2aab18);return _0x2aab18;},_0x3b7792=(_0x5ec054,_0x421886)=>(_0x3857e5,_0x272619)=>_0x421886(_0x3857e5,_0x272619,_0x5ec054);function _0x370122(_0x2796f1,_0xc3a9d3){const _0x889210=_0x1d4772,_0x11d7cb=_0x2796f1[_0x889210(0xc2)][0x0];return{..._0xc3a9d3,'id':_0x11d7cb[_0x889210(0xd3)],'resolved':_0x2796f1[_0x889210(0x97)]===0x1,'dT':_0x3bc9ef(_0x11d7cb[_0x889210(0xdb)]),'personId':_0x11d7cb[_0x889210(0xf5)],'threadId':_0x11d7cb['threadId']};}function _0x204357(_0x134154,_0x3d6b74,_0x245db1){const _0x32bb58=_0x1d4772;var _0x365ad6,_0x4a59ce;if(((_0x4a59ce=(_0x365ad6=_0x134154==null?void 0x0:_0x134154[_0x32bb58(0xc2)])==null?void 0x0:_0x365ad6[_0x32bb58(0x80)])!=null?_0x4a59ce:0x0)>0x0){const _0x2d57b6=(_0x17fa51,_0x4c5690)=>({'id':_0x17fa51[_0x32bb58(0xd3)],'threadId':_0x17fa51['threadId'],'dT':_0x3bc9ef(_0x17fa51[_0x32bb58(0xdb)]),'personId':_0x17fa51[_0x32bb58(0xf5)],'resolved':_0x134154[_0x32bb58(0x97)]===_0x32d80a[_0x32bb58(0xd8)],'unitId':_0x3d6b74,'subUnitId':_0x245db1,'text':JSON[_0x32bb58(0x8d)](_0x17fa51[_0x32bb58(0xb0)]),'parentId':_0x4c5690}),_0x569586=_0x2d57b6(_0x134154['replies'][0x0]);return{..._0x569586,'children':_0x134154[_0x32bb58(0xc2)][_0x32bb58(0xef)](0x1)[_0x32bb58(0xf7)](_0x179f63=>_0x2d57b6(_0x179f63,_0x569586['id']))};}return null;}let _0x410124=class{constructor(_0x4f68f2,_0x3497f4,_0xe48bb7,_0x24d40e){const _0x30e08c=_0x1d4772;this['_httpService']=_0x4f68f2,this[_0x30e08c(0x102)]=_0x3497f4,this['_sessionService']=_0xe48bb7,this[_0x30e08c(0xfa)]=_0x24d40e;}async[_0x1d4772(0xd7)](_0x23f0b0){const _0x548e51=_0x1d4772;var _0x8884a5,_0x272e40;const {parentId:_0x3f2ee6,unitId:_0x52620d,text:_0x56c212,threadId:_0x347eb4}=_0x23f0b0,_0xba724c=(_0x272e40=(_0x8884a5=_0x56c212[_0x548e51(0xaf)])==null?void 0x0:_0x8884a5[_0x548e51(0xd5)](_0x1e1776=>_0x1e1776[_0x548e51(0x83)]===_0x433b27[_0x548e51(0x82)][_0x548e51(0xcb)])[_0x548e51(0xf7)](_0x3fdea4=>_0x3fdea4[_0x548e51(0xa4)]))!=null?_0x272e40:[],_0x481077=JSON['stringify'](_0x56c212),_0x5b3059=(await this[_0x548e51(0xae)][_0x548e51(0x99)](_0x52620d))[_0x548e51(0x9d)]();if(_0x3f2ee6){const _0x39266b={'memberId':_0x5b3059,'unitId':_0x52620d,'content':_0x481077,'mention':_0xba724c,'threadId':_0x347eb4},_0x279f18=(await this[_0x548e51(0xf1)][_0x548e51(0xbb)](_0x548e51(0xd2)+_0x52620d+_0x548e51(0x88),{'body':_0x39266b}))[_0x548e51(0x9a)][_0x548e51(0xdc)];return{..._0x23f0b0,'id':_0x279f18[_0x548e51(0xd3)],'dT':_0x433b27[_0x548e51(0xc7)](+_0x279f18[_0x548e51(0xdb)])['format'](_0x548e51(0xc4)),'personId':_0x279f18[_0x548e51(0xf5)]};}else{const _0x6f0151={'memberId':_0x5b3059,'unitId':_0x52620d,'content':_0x481077,'mention':_0xba724c},_0x375194=await this[_0x548e51(0xf1)]['post']('/universer-api/comment/unit/'+_0x52620d+_0x548e51(0xaa),{'body':_0x6f0151});return _0x370122(_0x375194[_0x548e51(0x9a)][_0x548e51(0x105)],_0x23f0b0);}}async[_0x1d4772(0xe1)](_0x1548f0){const _0x20dc79=_0x1d4772;var _0x2b68d9,_0x59e52e;const {text:_0x53cc89,unitId:_0xfe669c}=_0x1548f0,_0xa0e11=(_0x59e52e=(_0x2b68d9=_0x53cc89['customRanges'])==null?void 0x0:_0x2b68d9[_0x20dc79(0xd5)](_0x9cfd72=>_0x9cfd72[_0x20dc79(0x83)]===_0x433b27[_0x20dc79(0x82)]['COMMENT'])[_0x20dc79(0xf7)](_0x5af48a=>_0x5af48a[_0x20dc79(0xa4)]))!=null?_0x59e52e:[],_0x1c52f3=JSON['stringify'](_0x53cc89),_0x4fd9ca=_0x1548f0['threadId'],_0xbd54b8=_0x1548f0['id'],_0x43fafd={'memberId':(await this['_sessionService'][_0x20dc79(0x99)](_0xfe669c))[_0x20dc79(0x9d)](),'unitId':_0xfe669c,'threadId':_0x4fd9ca,'mention':_0xa0e11,'content':_0x1c52f3,'replyId':_0xbd54b8},_0x141724=await this['_httpService'][_0x20dc79(0xbb)](_0x20dc79(0xd2)+_0xfe669c+'/edit',{'body':_0x43fafd});return!_0x141724[_0x20dc79(0x9a)][_0x20dc79(0xe4)]||_0x141724['body']['error']['code']===0x1;}async['resolveComment'](_0x273963){const _0x9acd07=_0x1d4772,{unitId:_0x4d1644}=_0x273963,_0x39cf0e=_0x273963['threadId'],_0x279e86={'memberId':this[_0x9acd07(0x102)][_0x9acd07(0xad)]()['userID'],'unitId':_0x4d1644,'threadId':_0x39cf0e,'solved':_0x273963[_0x9acd07(0xec)]?_0x32d80a[_0x9acd07(0xd8)]:_0x32d80a[_0x9acd07(0xa7)]},_0x49aeeb=await this[_0x9acd07(0xf1)][_0x9acd07(0xbb)](_0x9acd07(0xd2)+_0x4d1644+'/solved',{'body':_0x279e86});return!_0x49aeeb[_0x9acd07(0x9a)][_0x9acd07(0xe4)]||_0x49aeeb[_0x9acd07(0x9a)]['error'][_0x9acd07(0xa0)]===0x1;}async[_0x1d4772(0x84)](_0x3fe813,_0x429c98,_0x5c3b92,_0x2d093b){const _0xc5af5f=_0x1d4772,_0x1f1277={'memberId':(await this['_sessionService'][_0xc5af5f(0x99)](_0x3fe813))[_0xc5af5f(0x9d)](),'threadId':_0x5c3b92,'replyId':_0x2d093b,'unitId':_0x3fe813},_0x37b135=await this['_httpService'][_0xc5af5f(0xbb)](_0xc5af5f(0xd2)+_0x3fe813+_0xc5af5f(0xe7),{'body':_0x1f1277});return!_0x37b135[_0xc5af5f(0x9a)][_0xc5af5f(0xe4)]||_0x37b135[_0xc5af5f(0x9a)][_0xc5af5f(0xe4)]['code']===0x1;}async[_0x1d4772(0xcf)](_0x512f23,_0x34147d,_0x46d443){const _0x590bf0=_0x1d4772,_0x37d998={'unitId':_0x512f23,'threadId':_0x46d443},_0x55c93d=await this[_0x590bf0(0xf1)][_0x590bf0(0xbb)](_0x590bf0(0xd2)+_0x512f23+_0x590bf0(0xcc),{'body':_0x37d998}),_0x37eba3=_0x46d443[_0x590bf0(0xf7)](_0x32e9eb=>_0x204357(_0x55c93d[_0x590bf0(0x9a)][_0x590bf0(0xf4)][_0x32e9eb],_0x512f23,_0x34147d))[_0x590bf0(0xd5)](Boolean);return Object[_0x590bf0(0xb3)](_0x55c93d[_0x590bf0(0x9a)]['users'])[_0x590bf0(0x90)](_0x3f746b=>{const _0x360eab=_0x590bf0;this[_0x360eab(0x102)][_0x360eab(0xa6)](_0x3f746b);}),_0x37eba3;}[_0x1d4772(0x8f)](_0x1f2216){const _0x558f6f=_0x1d4772;return{'id':_0x1f2216['id'],'threadId':_0x1f2216[_0x558f6f(0xe9)],'ref':_0x1f2216[_0x558f6f(0xa3)]};}};_0x410124=_0x23d3f5([_0x3b7792(0x0,_0x433b27[_0x1d4772(0x93)](_0x314ea6['HTTPService'])),_0x3b7792(0x1,_0x433b27[_0x1d4772(0x93)](_0x433b27[_0x1d4772(0xd1)])),_0x3b7792(0x2,_0x433b27['Inject'](_0x22466d[_0x1d4772(0xca)])),_0x3b7792(0x3,_0x433b27['Inject'](_0x433b27[_0x1d4772(0x94)]))],_0x410124);var _0x50909f=Object['getOwnPropertyDescriptor'],_0x3088a7=(_0x3c0320,_0x4124cc,_0x6f197f,_0x4eb43f)=>{for(var _0x146d78=_0x4eb43f>0x1?void 0x0:_0x4eb43f?_0x50909f(_0x4124cc,_0x6f197f):_0x4124cc,_0x11d0bb=_0x3c0320['length']-0x1,_0x146b70;_0x11d0bb>=0x0;_0x11d0bb--)(_0x146b70=_0x3c0320[_0x11d0bb])&&(_0x146d78=_0x146b70(_0x146d78)||_0x146d78);return _0x146d78;},_0x11bb19=(_0x4875d7,_0x1fc6b0)=>(_0xada19e,_0x46ac86)=>_0x1fc6b0(_0xada19e,_0x46ac86,_0x4875d7);let _0x5b2df6=class extends _0x433b27[_0x1d4772(0xf2)]{constructor(_0x3fea78,_0x582fe6){const _0x11c099=_0x1d4772;super(),this[_0x11c099(0xe2)]=_0x3fea78,this[_0x11c099(0xbd)]=_0x582fe6,this[_0x11c099(0x9b)]();}[_0x1d4772(0x9b)](){const _0x47315e=_0x1d4772;this[_0x47315e(0xe2)][_0x47315e(0x8c)]=this[_0x47315e(0xbd)],this[_0x47315e(0xe2)]['syncUpdateMutationToColla']=!0x1;}};_0x5b2df6=_0x3088a7([_0x11bb19(0x0,_0x158d2c[_0x1d4772(0x106)]),_0x11bb19(0x1,_0x433b27[_0x1d4772(0x93)](_0x410124))],_0x5b2df6);var _0x3e8add=Object[_0x1d4772(0xa2)],_0x4d9646=Object[_0x1d4772(0xe0)],_0x181827=(_0x47ac88,_0x51f313,_0x228741)=>_0x51f313 in _0x47ac88?_0x3e8add(_0x47ac88,_0x51f313,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x228741}):_0x47ac88[_0x51f313]=_0x228741,_0x5600a8=(_0x3279c0,_0x56b366,_0x4fe542,_0xc9d5e4)=>{const _0x1833f2=_0x1d4772;for(var _0x4b4d61=_0xc9d5e4>0x1?void 0x0:_0xc9d5e4?_0x4d9646(_0x56b366,_0x4fe542):_0x56b366,_0x14a4b4=_0x3279c0[_0x1833f2(0x80)]-0x1,_0x42ba16;_0x14a4b4>=0x0;_0x14a4b4--)(_0x42ba16=_0x3279c0[_0x14a4b4])&&(_0x4b4d61=_0x42ba16(_0x4b4d61)||_0x4b4d61);return _0x4b4d61;},_0x365b26=(_0xd6324c,_0x24d3e7)=>(_0xc4fead,_0x2adba3)=>_0x24d3e7(_0xc4fead,_0x2adba3,_0xd6324c),_0x80cd08=(_0x5a1b5e,_0x5ae52a,_0x2b247a)=>_0x181827(_0x5a1b5e,typeof _0x5ae52a!='symbol'?_0x5ae52a+'':_0x5ae52a,_0x2b247a);_0x46e8a4[_0x1d4772(0xe8)]=class extends _0x433b27['Plugin']{constructor(_0x43f9e8=_0x4b4cba,_0x290b9f,_0x156280){const _0x263bdc=_0x1d4772;super(),this[_0x263bdc(0xee)]=_0x43f9e8,this['_injector']=_0x290b9f,this[_0x263bdc(0xc6)]=_0x156280;const {..._0x48c9d7}=_0x433b27[_0x263bdc(0xa5)]({},_0x4b4cba,this[_0x263bdc(0xee)]);this[_0x263bdc(0xc6)][_0x263bdc(0xf8)](_0x14a81b,_0x48c9d7);}[_0x1d4772(0xa1)](){const _0x17dca5=_0x1d4772;[[_0x410124],[_0x5b2df6],[_0x1ef2cb]][_0x17dca5(0x90)](_0x2cedcf=>{const _0x13359c=_0x17dca5;this[_0x13359c(0xfa)][_0x13359c(0x96)](_0x2cedcf);});}['onReady'](){const _0x166c23=_0x1d4772;this[_0x166c23(0xfa)][_0x166c23(0x8a)](_0x5b2df6),this[_0x166c23(0xfa)][_0x166c23(0x8a)](_0x1ef2cb);}},_0x80cd08(_0x46e8a4[_0x1d4772(0xe8)],_0x1d4772(0xb1),_0x188ebf),_0x80cd08(_0x46e8a4['UniverThreadCommentDataSourcePlugin'],_0x1d4772(0x89),_0x433b27[_0x1d4772(0x8e)]['UNIVER_UNKNOWN']),_0x46e8a4[_0x1d4772(0xe8)]=_0x5600a8([_0x433b27[_0x1d4772(0x8b)](_0x2f04bb[_0x1d4772(0x101)],_0x22466d[_0x1d4772(0xb4)],_0x3ab69a['UniverLicensePlugin']),_0x365b26(0x1,_0x433b27['Inject'](_0x433b27[_0x1d4772(0x94)])),_0x365b26(0x2,_0x433b27[_0x1d4772(0x87)])],_0x46e8a4[_0x1d4772(0xe8)]),Object[_0x1d4772(0xa2)](_0x46e8a4,Symbol[_0x1d4772(0xed)],{'value':_0x1d4772(0xd4)});}));
1
+ function _0x8c6a(_0x1e4ec5,_0x3a5205){const _0x5c169b=_0x5c16();return _0x8c6a=function(_0x8c6ab,_0x108e47){_0x8c6ab=_0x8c6ab-0x175;let _0x134f9c=_0x5c169b[_0x8c6ab];return _0x134f9c;},_0x8c6a(_0x1e4ec5,_0x3a5205);}(function(_0x4873a7,_0x496b74){const _0x2ecdf7=_0x8c6a,_0x370cbb=_0x4873a7();while(!![]){try{const _0x296036=parseInt(_0x2ecdf7(0x1ea))/0x1*(parseInt(_0x2ecdf7(0x194))/0x2)+-parseInt(_0x2ecdf7(0x1cc))/0x3+-parseInt(_0x2ecdf7(0x1f1))/0x4*(parseInt(_0x2ecdf7(0x1a0))/0x5)+-parseInt(_0x2ecdf7(0x1ca))/0x6*(parseInt(_0x2ecdf7(0x17f))/0x7)+parseInt(_0x2ecdf7(0x1d6))/0x8*(-parseInt(_0x2ecdf7(0x189))/0x9)+-parseInt(_0x2ecdf7(0x190))/0xa+-parseInt(_0x2ecdf7(0x1b5))/0xb*(-parseInt(_0x2ecdf7(0x1cf))/0xc);if(_0x296036===_0x496b74)break;else _0x370cbb['push'](_0x370cbb['shift']());}catch(_0x43cfa2){_0x370cbb['push'](_0x370cbb['shift']());}}}(_0x5c16,0x5d3ce),function(_0x559d2f,_0x928144){const _0x19e11c=_0x8c6a;typeof exports==_0x19e11c(0x17a)&&typeof module<'u'?_0x928144(exports,require(_0x19e11c(0x1a8)),require(_0x19e11c(0x1e6)),require('@univerjs/core'),require(_0x19e11c(0x176)),require(_0x19e11c(0x1b7)),require(_0x19e11c(0x195)),require(_0x19e11c(0x1e1))):typeof define==_0x19e11c(0x1a2)&&define[_0x19e11c(0x1e8)]?define(['exports',_0x19e11c(0x1a8),_0x19e11c(0x1e6),'@univerjs/core',_0x19e11c(0x176),_0x19e11c(0x1b7),_0x19e11c(0x195),'@univerjs/network'],_0x928144):(_0x559d2f=typeof globalThis<'u'?globalThis:_0x559d2f||self,_0x928144(_0x559d2f[_0x19e11c(0x1fa)]={},_0x559d2f[_0x19e11c(0x19c)],_0x559d2f[_0x19e11c(0x19e)],_0x559d2f[_0x19e11c(0x183)],_0x559d2f['UniverThreadCommentUi'],_0x559d2f[_0x19e11c(0x1cb)],_0x559d2f[_0x19e11c(0x195)],_0x559d2f[_0x19e11c(0x1dd)]));}(this,function(_0x5a7c67,_0x3871da,_0x46729d,_0x533e70,_0x2a2413,_0x3ce02e,_0x363ffb,_0x457d43){'use strict';const _0xd67764=_0x8c6a;const _0x322963=_0xd67764(0x17b);var _0x3c522a=(_0x4a6efc=>(_0x4a6efc[_0x4a6efc[_0xd67764(0x1af)]=0x0]=_0xd67764(0x1af),_0x4a6efc[_0x4a6efc[_0xd67764(0x1d0)]=0x1]=_0xd67764(0x1d0),_0x4a6efc[_0x4a6efc[_0xd67764(0x1c9)]=-0x1]=_0xd67764(0x1c9),_0x4a6efc))(_0x3c522a||{}),_0x447af1=(_0xacf8ce=>(_0xacf8ce[_0xacf8ce['Unknown']=0x0]='Unknown',_0xacf8ce[_0xacf8ce[_0xd67764(0x19f)]=0x1]=_0xd67764(0x19f),_0xacf8ce[_0xacf8ce[_0xd67764(0x1eb)]=0x2]=_0xd67764(0x1eb),_0xacf8ce[_0xacf8ce[_0xd67764(0x1a5)]=0x3]=_0xd67764(0x1a5),_0xacf8ce[_0xacf8ce[_0xd67764(0x179)]=0x4]=_0xd67764(0x179),_0xacf8ce[_0xacf8ce[_0xd67764(0x186)]=0x5]=_0xd67764(0x186),_0xacf8ce[_0xacf8ce[_0xd67764(0x1c9)]=-0x1]=_0xd67764(0x1c9),_0xacf8ce))(_0x447af1||{});const _0x36926e=_0x4a96ec=>_0x533e70['dayjs'](new Date(+_0x4a96ec))['format'](_0xd67764(0x1b4)),_0xa1bb66=async(_0x5a0b69,_0x5c34f8)=>{const _0x26b86d=_0xd67764,_0x23c5ff=_0x5a0b69[_0x26b86d(0x1e4)](_0x533e70[_0x26b86d(0x1c5)]),_0x5ac5d9=_0x5a0b69[_0x26b86d(0x1e4)](_0x457d43['HTTPService']);_0x5c34f8['forEach'](_0x5508a7=>{const _0x5bd936=_0x26b86d;_0x23c5ff[_0x5bd936(0x1a7)](_0x5508a7)&&_0x5c34f8[_0x5bd936(0x1b0)](_0x5508a7);}),_0x5c34f8['size']&&(await _0x5ac5d9[_0x26b86d(0x1e4)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5c34f8]}}))[_0x26b86d(0x1ae)]['users'][_0x26b86d(0x1a9)](_0x1c6d5b=>{const _0x37ad39=_0x26b86d;_0x1c6d5b&&_0x23c5ff[_0x37ad39(0x177)](_0x1c6d5b);});};var _0x363d00=Object[_0xd67764(0x178)],_0x1965bd=(_0x9a3bd0,_0x6fb14a,_0xa98c8e,_0x47ae64)=>{for(var _0x5173cf=_0x47ae64>0x1?void 0x0:_0x47ae64?_0x363d00(_0x6fb14a,_0xa98c8e):_0x6fb14a,_0x44ef59=_0x9a3bd0['length']-0x1,_0x1ea466;_0x44ef59>=0x0;_0x44ef59--)(_0x1ea466=_0x9a3bd0[_0x44ef59])&&(_0x5173cf=_0x1ea466(_0x5173cf)||_0x5173cf);return _0x5173cf;},_0xc19667=(_0x34cb81,_0x48c081)=>(_0x7025ca,_0xc7fbdb)=>_0x48c081(_0x7025ca,_0xc7fbdb,_0x34cb81);let _0x8f3511=class extends _0x533e70[_0xd67764(0x1b1)]{constructor(_0x41e5aa,_0x34828c,_0x544c69,_0x46ecbf){const _0x5a51b2=_0xd67764;super(),this[_0x5a51b2(0x1ba)]=_0x41e5aa,this[_0x5a51b2(0x1ac)]=_0x34828c,this[_0x5a51b2(0x1e7)]=_0x544c69,this['_injector']=_0x46ecbf,this[_0x5a51b2(0x1f5)](),this[_0x5a51b2(0x1e0)]();}['_initUserSync'](){const _0x2a1466=_0xd67764;this[_0x2a1466(0x1aa)](this[_0x2a1466(0x1ac)][_0x2a1466(0x17e)][_0x2a1466(0x184)](_0x363ffb[_0x2a1466(0x18e)](0x10))[_0x2a1466(0x1cd)](_0x4087ce=>{const _0x60c112=_0x2a1466,_0x41f083=new Set();_0x4087ce[_0x60c112(0x1a9)](_0x4f18b0=>{const _0x266f64=_0x60c112;switch(_0x4f18b0[_0x266f64(0x17c)]){case _0x266f64(0x1ec):{const _0x1eb637=_0x4f18b0[_0x266f64(0x1f8)][_0x266f64(0x1a1)];_0x41f083[_0x266f64(0x1ec)](_0x1eb637);break;}}}),_0xa1bb66(this[_0x60c112(0x19d)],_0x41f083);}));}[_0xd67764(0x1f5)](){const _0x3468b0=_0xd67764;this[_0x3468b0(0x1aa)](this['_commentService'][_0x3468b0(0x17e)][_0x3468b0(0x1cd)](async _0x3bf02c=>{const _0x45649f=_0x3468b0;var _0x130acf,_0x37f5c5,_0x5886ba,_0xfc4603;const _0x5f1ed9=(_0x130acf=this['_threadCommentModel'][_0x45649f(0x191)](_0x3bf02c[_0x45649f(0x193)])[_0x45649f(0x1fc)](_0x2773e0=>_0x2773e0[_0x45649f(0x199)]===_0x3bf02c['threadId']))==null?void 0x0:_0x130acf[_0x45649f(0x1d2)];if(!_0x5f1ed9)return;const {unitId:_0x4642a0,subUnitId:_0x3ae869}=_0x5f1ed9;switch(_0x3bf02c[_0x45649f(0x18b)]&&this['_userService'][_0x45649f(0x177)](_0x3bf02c[_0x45649f(0x18b)]),_0x3bf02c[_0x45649f(0x17c)]){case _0x447af1[_0x45649f(0x19f)]:break;case _0x447af1[_0x45649f(0x1eb)]:{this[_0x45649f(0x1ac)][_0x45649f(0x1c0)](_0x4642a0,_0x3ae869,{'unitId':_0x4642a0,'subUnitId':_0x3ae869,'ref':'','id':_0x3bf02c['replyId'],'dT':_0x36926e(+_0x3bf02c[_0x45649f(0x192)]),'threadId':_0x3bf02c[_0x45649f(0x199)],'personId':(_0x5886ba=(_0x37f5c5=_0x3bf02c[_0x45649f(0x18b)])==null?void 0x0:_0x37f5c5[_0x45649f(0x1ed)])!=null?_0x5886ba:_0x3bf02c[_0x45649f(0x1a6)],'text':JSON['parse'](_0x3bf02c['content']),'parentId':_0x5f1ed9['id']});break;}case _0x447af1[_0x45649f(0x179)]:{const _0x167d79=this[_0x45649f(0x1ac)][_0x45649f(0x180)](_0x4642a0,_0x3ae869,_0x3bf02c[_0x45649f(0x1df)]);_0x167d79&&_0x167d79[_0x45649f(0x1f2)]&&this[_0x45649f(0x1ac)][_0x45649f(0x18f)](_0x4642a0,_0x3ae869,_0x3bf02c[_0x45649f(0x1df)]);break;}case _0x447af1[_0x45649f(0x1a5)]:{this[_0x45649f(0x1ac)][_0x45649f(0x1bb)](_0x4642a0,_0x3ae869,{'commentId':_0x3bf02c['replyId'],'text':JSON[_0x45649f(0x1d3)](_0x3bf02c[_0x45649f(0x1dc)])});break;}case _0x447af1['Solve']:{const _0x24b78b=(_0xfc4603=this['_threadCommentModel']['getUnit'](_0x3bf02c[_0x45649f(0x193)])[_0x45649f(0x1fc)](_0x186c65=>_0x186c65[_0x45649f(0x199)]===_0x3bf02c[_0x45649f(0x199)]))==null?void 0x0:_0xfc4603[_0x45649f(0x1d2)];_0x24b78b&&this[_0x45649f(0x1ac)][_0x45649f(0x1db)](_0x4642a0,_0x3ae869,_0x24b78b['id'],_0x3bf02c[_0x45649f(0x198)]===_0x3c522a[_0x45649f(0x1d0)]);break;}}}));}};_0x8f3511=_0x1965bd([_0xc19667(0x0,_0x533e70['Inject'](_0x3871da[_0xd67764(0x1d7)])),_0xc19667(0x1,_0x533e70[_0xd67764(0x1ee)](_0x3ce02e['ThreadCommentModel'])),_0xc19667(0x2,_0x533e70[_0xd67764(0x1ee)](_0x533e70[_0xd67764(0x1c5)])),_0xc19667(0x3,_0x533e70[_0xd67764(0x1ee)](_0x533e70['Injector']))],_0x8f3511);const _0x36b3b0='thread-comment-data-source.config',_0x4d9c69={};var _0x2bd032=Object[_0xd67764(0x178)],_0x3efbd8=(_0x1eb7f0,_0x3427ce,_0x588bb3,_0x16ed3f)=>{for(var _0x5315b6=_0x16ed3f>0x1?void 0x0:_0x16ed3f?_0x2bd032(_0x3427ce,_0x588bb3):_0x3427ce,_0x40605a=_0x1eb7f0['length']-0x1,_0x189777;_0x40605a>=0x0;_0x40605a--)(_0x189777=_0x1eb7f0[_0x40605a])&&(_0x5315b6=_0x189777(_0x5315b6)||_0x5315b6);return _0x5315b6;},_0x4ff84b=(_0x2e0d24,_0x230135)=>(_0x4bf249,_0x419074)=>_0x230135(_0x4bf249,_0x419074,_0x2e0d24);function _0x145529(_0x32cb57,_0x26cda5){const _0xbb4276=_0xd67764,_0x50fa2e=_0x32cb57[_0xbb4276(0x1c2)][0x0];return{..._0x26cda5,'id':_0x50fa2e[_0xbb4276(0x1df)],'resolved':_0x32cb57[_0xbb4276(0x198)]===0x1,'dT':_0x36926e(_0x50fa2e[_0xbb4276(0x192)]),'personId':_0x50fa2e['userId'],'threadId':_0x50fa2e[_0xbb4276(0x199)]};}function _0x35ea8c(_0x4dde6e,_0x29a0ff,_0x447ae){const _0x16e1a2=_0xd67764;var _0x4e7aac,_0x47d0fd;if(((_0x47d0fd=(_0x4e7aac=_0x4dde6e==null?void 0x0:_0x4dde6e['replies'])==null?void 0x0:_0x4e7aac['length'])!=null?_0x47d0fd:0x0)>0x0){const _0x544a18=(_0x3ca6ba,_0x543b9e)=>({'id':_0x3ca6ba[_0x16e1a2(0x1df)],'threadId':_0x3ca6ba[_0x16e1a2(0x199)],'dT':_0x36926e(_0x3ca6ba[_0x16e1a2(0x192)]),'personId':_0x3ca6ba[_0x16e1a2(0x1a6)],'resolved':_0x4dde6e[_0x16e1a2(0x198)]===_0x3c522a[_0x16e1a2(0x1d0)],'unitId':_0x29a0ff,'subUnitId':_0x447ae,'text':JSON[_0x16e1a2(0x1d3)](_0x3ca6ba[_0x16e1a2(0x1dc)]),'parentId':_0x543b9e}),_0x11b197=_0x544a18(_0x4dde6e[_0x16e1a2(0x1c2)][0x0]);return{..._0x11b197,'children':_0x4dde6e['replies'][_0x16e1a2(0x1bd)](0x1)[_0x16e1a2(0x17d)](_0x5945e2=>_0x544a18(_0x5945e2,_0x11b197['id']))};}return null;}let _0x407eca=class{constructor(_0x4d87ec,_0x9e6a15,_0x52ecaf,_0x55ba50){const _0x12c01d=_0xd67764;this[_0x12c01d(0x1d1)]=_0x4d87ec,this[_0x12c01d(0x1e7)]=_0x9e6a15,this[_0x12c01d(0x175)]=_0x52ecaf,this[_0x12c01d(0x19d)]=_0x55ba50;}async['addComment'](_0x4e9d0e){const _0x3a8471=_0xd67764;var _0x462d73,_0x1ad62d;const {parentId:_0x216302,unitId:_0x53aca3,text:_0x25479f,threadId:_0x5df593}=_0x4e9d0e,_0x1de09=(_0x1ad62d=(_0x462d73=_0x25479f[_0x3a8471(0x1ab)])==null?void 0x0:_0x462d73[_0x3a8471(0x1b9)](_0x4ab3d0=>_0x4ab3d0[_0x3a8471(0x1e3)]===_0x533e70[_0x3a8471(0x19b)][_0x3a8471(0x1de)])[_0x3a8471(0x17d)](_0x3bd196=>_0x3bd196[_0x3a8471(0x1a4)]))!=null?_0x1ad62d:[],_0x21e251=JSON['stringify'](_0x25479f),_0xb4dd94=(await this[_0x3a8471(0x175)]['requireSession'](_0x53aca3))['getMemberID']();if(_0x216302){const _0x3f81af={'memberId':_0xb4dd94,'unitId':_0x53aca3,'content':_0x21e251,'mention':_0x1de09,'threadId':_0x5df593},_0x590108=(await this['_httpService'][_0x3a8471(0x1c1)](_0x3a8471(0x1a3)+_0x53aca3+_0x3a8471(0x18c),{'body':_0x3f81af}))[_0x3a8471(0x1ae)][_0x3a8471(0x1e9)];return{..._0x4e9d0e,'id':_0x590108['replyId'],'dT':_0x533e70[_0x3a8471(0x181)](+_0x590108[_0x3a8471(0x192)])['format'](_0x3a8471(0x1b4)),'personId':_0x590108[_0x3a8471(0x1a6)]};}else{const _0x241094={'memberId':_0xb4dd94,'unitId':_0x53aca3,'content':_0x21e251,'mention':_0x1de09},_0xc27d9b=await this[_0x3a8471(0x1d1)][_0x3a8471(0x1c1)](_0x3a8471(0x1a3)+_0x53aca3+_0x3a8471(0x1f4),{'body':_0x241094});return _0x145529(_0xc27d9b[_0x3a8471(0x1ae)]['comment'],_0x4e9d0e);}}async[_0xd67764(0x1bb)](_0x16baec){const _0x4a0be9=_0xd67764;var _0x545ba7,_0x1aff1d;const {text:_0x2e55eb,unitId:_0x4d4372}=_0x16baec,_0x3be248=(_0x1aff1d=(_0x545ba7=_0x2e55eb[_0x4a0be9(0x1ab)])==null?void 0x0:_0x545ba7[_0x4a0be9(0x1b9)](_0x49b258=>_0x49b258[_0x4a0be9(0x1e3)]===_0x533e70[_0x4a0be9(0x19b)][_0x4a0be9(0x1de)])[_0x4a0be9(0x17d)](_0x1dc274=>_0x1dc274[_0x4a0be9(0x1a4)]))!=null?_0x1aff1d:[],_0x1118d8=JSON[_0x4a0be9(0x1b3)](_0x2e55eb),_0xf70581=_0x16baec[_0x4a0be9(0x199)],_0x5a0348=_0x16baec['id'],_0x1e721d={'memberId':(await this[_0x4a0be9(0x175)]['requireSession'](_0x4d4372))[_0x4a0be9(0x1d9)](),'unitId':_0x4d4372,'threadId':_0xf70581,'mention':_0x3be248,'content':_0x1118d8,'replyId':_0x5a0348},_0x3b2790=await this[_0x4a0be9(0x1d1)][_0x4a0be9(0x1c1)](_0x4a0be9(0x1a3)+_0x4d4372+_0x4a0be9(0x1ad),{'body':_0x1e721d});return!_0x3b2790[_0x4a0be9(0x1ae)][_0x4a0be9(0x1c6)]||_0x3b2790['body'][_0x4a0be9(0x1c6)][_0x4a0be9(0x1e5)]===0x1;}async[_0xd67764(0x1db)](_0x697dd){const _0xb78577=_0xd67764,{unitId:_0x16e60c}=_0x697dd,_0x1f4d1d=_0x697dd[_0xb78577(0x199)],_0xdf6f5a={'memberId':this[_0xb78577(0x1e7)]['getCurrentUser']()[_0xb78577(0x1ed)],'unitId':_0x16e60c,'threadId':_0x1f4d1d,'solved':_0x697dd['resolved']?_0x3c522a['Solved']:_0x3c522a[_0xb78577(0x1af)]},_0x2428b5=await this[_0xb78577(0x1d1)][_0xb78577(0x1c1)](_0xb78577(0x1a3)+_0x16e60c+_0xb78577(0x187),{'body':_0xdf6f5a});return!_0x2428b5[_0xb78577(0x1ae)][_0xb78577(0x1c6)]||_0x2428b5[_0xb78577(0x1ae)]['error'][_0xb78577(0x1e5)]===0x1;}async[_0xd67764(0x18f)](_0x359ccc,_0x174396,_0x1b6f81,_0x2eedfc){const _0x50ce3f=_0xd67764,_0x9beb9d={'memberId':(await this['_sessionService'][_0x50ce3f(0x18d)](_0x359ccc))[_0x50ce3f(0x1d9)](),'threadId':_0x1b6f81,'replyId':_0x2eedfc,'unitId':_0x359ccc},_0x4d764f=await this[_0x50ce3f(0x1d1)]['post']('/universer-api/comment/unit/'+_0x359ccc+'/delete',{'body':_0x9beb9d});return!_0x4d764f[_0x50ce3f(0x1ae)][_0x50ce3f(0x1c6)]||_0x4d764f[_0x50ce3f(0x1ae)][_0x50ce3f(0x1c6)]['code']===0x1;}async[_0xd67764(0x1f7)](_0x31682f,_0x2d133f,_0x44768c){const _0x127e88=_0xd67764,_0x51817c={'unitId':_0x31682f,'threadId':_0x44768c},_0x3638d8=await this[_0x127e88(0x1d1)][_0x127e88(0x1c1)](_0x127e88(0x1a3)+_0x31682f+_0x127e88(0x1f0),{'body':_0x51817c}),_0x12e74d=_0x44768c[_0x127e88(0x17d)](_0x5bcf3b=>_0x35ea8c(_0x3638d8['body'][_0x127e88(0x1d4)][_0x5bcf3b],_0x31682f,_0x2d133f))[_0x127e88(0x1b9)](Boolean);return Object[_0x127e88(0x1f3)](_0x3638d8['body'][_0x127e88(0x1be)])[_0x127e88(0x1a9)](_0xb17755=>{const _0x1ed35d=_0x127e88;this[_0x1ed35d(0x1e7)]['addUser'](_0xb17755);}),_0x12e74d;}['saveCommentToSnapshot'](_0x4ccf30){const _0xc9a88=_0xd67764;return{'id':_0x4ccf30['id'],'threadId':_0x4ccf30[_0xc9a88(0x199)],'ref':_0x4ccf30[_0xc9a88(0x1ef)]};}};_0x407eca=_0x3efbd8([_0x4ff84b(0x0,_0x533e70[_0xd67764(0x1ee)](_0x457d43[_0xd67764(0x1b2)])),_0x4ff84b(0x1,_0x533e70['Inject'](_0x533e70[_0xd67764(0x1c5)])),_0x4ff84b(0x2,_0x533e70['Inject'](_0x3871da[_0xd67764(0x196)])),_0x4ff84b(0x3,_0x533e70['Inject'](_0x533e70[_0xd67764(0x185)]))],_0x407eca);var _0x28a2b6=Object[_0xd67764(0x178)],_0x2e3a05=(_0x68ee86,_0x465ff7,_0x3da224,_0x176324)=>{for(var _0x4ede24=_0x176324>0x1?void 0x0:_0x176324?_0x28a2b6(_0x465ff7,_0x3da224):_0x465ff7,_0xc629cd=_0x68ee86['length']-0x1,_0x3299e0;_0xc629cd>=0x0;_0xc629cd--)(_0x3299e0=_0x68ee86[_0xc629cd])&&(_0x4ede24=_0x3299e0(_0x4ede24)||_0x4ede24);return _0x4ede24;},_0x72a1ea=(_0x37468d,_0x147258)=>(_0x160e10,_0x29fb51)=>_0x147258(_0x160e10,_0x29fb51,_0x37468d);let _0x307b6a=class extends _0x533e70[_0xd67764(0x1b1)]{constructor(_0x2dd793,_0x4caca1){const _0x3f4cdf=_0xd67764;super(),this[_0x3f4cdf(0x1fb)]=_0x2dd793,this[_0x3f4cdf(0x1bf)]=_0x4caca1,this[_0x3f4cdf(0x1e2)]();}[_0xd67764(0x1e2)](){const _0x1d5e5a=_0xd67764;this[_0x1d5e5a(0x1fb)]['dataSource']=this[_0x1d5e5a(0x1bf)],this[_0x1d5e5a(0x1fb)][_0x1d5e5a(0x1b8)]=!0x1;}};_0x307b6a=_0x2e3a05([_0x72a1ea(0x0,_0x3ce02e[_0xd67764(0x1d8)]),_0x72a1ea(0x1,_0x533e70[_0xd67764(0x1ee)](_0x407eca))],_0x307b6a);var _0x1c3c13=Object[_0xd67764(0x1c8)],_0x17cd52=Object[_0xd67764(0x178)],_0x25ca65=(_0x4211fa,_0x48f40b,_0x4232f1)=>_0x48f40b in _0x4211fa?_0x1c3c13(_0x4211fa,_0x48f40b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4232f1}):_0x4211fa[_0x48f40b]=_0x4232f1,_0x4d5234=(_0x411fa9,_0x7ec6c,_0x20b3c8,_0x3d1bcc)=>{const _0x717cf4=_0xd67764;for(var _0x59f714=_0x3d1bcc>0x1?void 0x0:_0x3d1bcc?_0x17cd52(_0x7ec6c,_0x20b3c8):_0x7ec6c,_0x24988d=_0x411fa9[_0x717cf4(0x182)]-0x1,_0x3ba6cf;_0x24988d>=0x0;_0x24988d--)(_0x3ba6cf=_0x411fa9[_0x24988d])&&(_0x59f714=_0x3ba6cf(_0x59f714)||_0x59f714);return _0x59f714;},_0x1be6f4=(_0xdd7980,_0xe881bf)=>(_0x3e7f42,_0x49d6e5)=>_0xe881bf(_0x3e7f42,_0x49d6e5,_0xdd7980),_0x1bfb74=(_0x260e6e,_0x3145e7,_0x2876cf)=>_0x25ca65(_0x260e6e,typeof _0x3145e7!=_0xd67764(0x1ce)?_0x3145e7+'':_0x3145e7,_0x2876cf);_0x5a7c67[_0xd67764(0x1bc)]=class extends _0x533e70['Plugin']{constructor(_0x2f3352=_0x4d9c69,_0x41d564,_0x17f59c){const _0x4197c0=_0xd67764;super(),this[_0x4197c0(0x1c4)]=_0x2f3352,this[_0x4197c0(0x19d)]=_0x41d564,this[_0x4197c0(0x1f6)]=_0x17f59c;const {..._0x50cadc}=_0x533e70[_0x4197c0(0x18a)]({},_0x4d9c69,this[_0x4197c0(0x1c4)]);this[_0x4197c0(0x1f6)]['setConfig'](_0x36b3b0,_0x50cadc);}[_0xd67764(0x1da)](){const _0x5be3f2=_0xd67764;[[_0x407eca],[_0x307b6a],[_0x8f3511]][_0x5be3f2(0x1a9)](_0x40e62f=>{const _0x26c88d=_0x5be3f2;this[_0x26c88d(0x19d)][_0x26c88d(0x1ec)](_0x40e62f);});}['onReady'](){const _0x43d58f=_0xd67764;this[_0x43d58f(0x19d)][_0x43d58f(0x1e4)](_0x307b6a),this[_0x43d58f(0x19d)]['get'](_0x8f3511);}},_0x1bfb74(_0x5a7c67[_0xd67764(0x1bc)],'pluginName',_0x322963),_0x1bfb74(_0x5a7c67['UniverThreadCommentDataSourcePlugin'],_0xd67764(0x17c),_0x533e70[_0xd67764(0x1c7)][_0xd67764(0x197)]),_0x5a7c67['UniverThreadCommentDataSourcePlugin']=_0x4d5234([_0x533e70['DependentOn'](_0x2a2413[_0xd67764(0x1f9)],_0x3871da[_0xd67764(0x1b6)],_0x46729d[_0xd67764(0x1d5)]),_0x1be6f4(0x1,_0x533e70['Inject'](_0x533e70[_0xd67764(0x185)])),_0x1be6f4(0x2,_0x533e70[_0xd67764(0x19a)])],_0x5a7c67[_0xd67764(0x1bc)]),Object['defineProperty'](_0x5a7c67,Symbol[_0xd67764(0x188)],{'value':_0xd67764(0x1c3)});}));function _0x5c16(){const _0x49c782=['comments','UniverLicensePlugin','1496pPnidA','CommentService','IThreadCommentDataSourceService','getMemberID','onStarting','resolveComment','content','UniverNetwork','COMMENT','replyId','_initUserSync','@univerjs/network','_initDataSource','rangeType','get','code','@univerjs-pro/license','_userService','amd','reply','1ESvHtD','Reply','add','userID','Inject','ref','/list','160vEOGZC','parentId','values','/add','_init','_configService','listComments','payload','UniverThreadCommentUIPlugin','UniverProThreadCommentDatasource','_threadCommentDataSourceService','find','_sessionService','@univerjs/thread-comment-ui','addUser','getOwnPropertyDescriptor','Delete','object','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','type','map','commentUpdate$','970354jDfNcp','getComment','dayjs','length','UniverCore','pipe','Injector','Solve','/solved','toStringTag','36117fkrrOb','merge','user','/reply','requireSession','bufferTime','deleteComment','428060CHSyVL','getUnit','createTimestamp','unitId','689382VHfeIN','rxjs','CollaborationSessionService','UNIVER_UNKNOWN','solved','threadId','IConfigService','CustomRangeType','UniverProCollaborationClient','_injector','UniverProLicense','Add','70250vebvLD','personId','function','/universer-api/comment/unit/','rangeId','Edit','userId','getUser','@univerjs-pro/collaboration-client','forEach','disposeWithMe','customRanges','_threadCommentModel','/edit','body','OpenOrReOpen','delete','Disposable','HTTPService','stringify','YYYY/MM/DD\x20HH:mm','21430387nnDsHH','UniverCollaborationClientPlugin','@univerjs/thread-comment','syncUpdateMutationToColla','filter','_commentService','updateComment','UniverThreadCommentDataSourcePlugin','slice','users','_threadCommentDataSource','addComment','post','replies','Module','_config','UserManagerService','error','UniverInstanceType','defineProperty','UNRECOGNIZED','6CbWOWp','UniverThreadComment','1251441gsBtFq','subscribe','symbol','12LvXfLe','Solved','_httpService','root','parse'];_0x5c16=function(){return _0x49c782;};return _0x5c16();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.7.0",
3
+ "version": "0.8.0-beta.0",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.7.0",
49
- "@univerjs-pro/license": "0.7.0",
50
- "@univerjs/network": "0.7.0",
51
- "@univerjs/protocol": "0.1.46-alpha.3",
52
- "@univerjs/thread-comment-ui": "0.7.0",
53
- "@univerjs/thread-comment": "0.7.0",
54
- "@univerjs/core": "0.7.0"
48
+ "@univerjs-pro/collaboration-client": "0.8.0-beta.0",
49
+ "@univerjs-pro/license": "0.8.0-beta.0",
50
+ "@univerjs/network": "0.8.0-beta.0",
51
+ "@univerjs/protocol": "0.1.47-alpha.0",
52
+ "@univerjs/core": "0.8.0-beta.0",
53
+ "@univerjs/thread-comment": "0.8.0-beta.0",
54
+ "@univerjs/thread-comment-ui": "0.8.0-beta.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.8.3",
59
59
  "vite": "^6.3.5",
60
- "vitest": "^3.1.3",
61
- "@univerjs-infra/shared": "0.7.0"
60
+ "vitest": "^3.1.4",
61
+ "@univerjs-infra/shared": "0.8.0-beta.0"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",