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

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 _0x39cfa9=_0x496b;(function(_0x558e15,_0xa75ac0){const _0x2be261=_0x496b,_0xba8ab=_0x558e15();while(!![]){try{const _0x393555=-parseInt(_0x2be261(0x10c))/0x1*(parseInt(_0x2be261(0x13e))/0x2)+parseInt(_0x2be261(0x168))/0x3*(parseInt(_0x2be261(0x175))/0x4)+parseInt(_0x2be261(0x163))/0x5*(-parseInt(_0x2be261(0xf5))/0x6)+-parseInt(_0x2be261(0x150))/0x7+-parseInt(_0x2be261(0x115))/0x8*(-parseInt(_0x2be261(0x15f))/0x9)+-parseInt(_0x2be261(0x15c))/0xa*(parseInt(_0x2be261(0x122))/0xb)+-parseInt(_0x2be261(0x105))/0xc*(-parseInt(_0x2be261(0x16f))/0xd);if(_0x393555===_0xa75ac0)break;else _0xba8ab['push'](_0xba8ab['shift']());}catch(_0x51e5f2){_0xba8ab['push'](_0xba8ab['shift']());}}}(_0x44fe,0xa01e3));function _0x496b(_0x4c45cd,_0x3babff){const _0x44fe77=_0x44fe();return _0x496b=function(_0x496b48,_0x198dfd){_0x496b48=_0x496b48-0xf2;let _0x169d79=_0x44fe77[_0x496b48];return _0x169d79;},_0x496b(_0x4c45cd,_0x3babff);}Object[_0x39cfa9(0x148)](exports,Symbol['toStringTag'],{'value':_0x39cfa9(0x169)});const b=require(_0x39cfa9(0x134)),T=require(_0x39cfa9(0x12b)),c=require(_0x39cfa9(0x174)),j=require(_0x39cfa9(0x14e)),M=require(_0x39cfa9(0x146)),w=require(_0x39cfa9(0x152)),P=require('@univerjs/network'),U=_0x39cfa9(0x116);var I=(_0x23f544=>(_0x23f544[_0x23f544['OpenOrReOpen']=0x0]=_0x39cfa9(0x166),_0x23f544[_0x23f544[_0x39cfa9(0x16d)]=0x1]=_0x39cfa9(0x16d),_0x23f544[_0x23f544[_0x39cfa9(0x137)]=-0x1]=_0x39cfa9(0x137),_0x23f544))(I||{}),v=(_0x40ffb9=>(_0x40ffb9[_0x40ffb9[_0x39cfa9(0x110)]=0x0]=_0x39cfa9(0x110),_0x40ffb9[_0x40ffb9[_0x39cfa9(0xf6)]=0x1]='Add',_0x40ffb9[_0x40ffb9['Reply']=0x2]=_0x39cfa9(0x113),_0x40ffb9[_0x40ffb9['Edit']=0x3]=_0x39cfa9(0x164),_0x40ffb9[_0x40ffb9[_0x39cfa9(0x101)]=0x4]='Delete',_0x40ffb9[_0x40ffb9['Solve']=0x5]=_0x39cfa9(0x11d),_0x40ffb9[_0x40ffb9[_0x39cfa9(0x137)]=-0x1]='UNRECOGNIZED',_0x40ffb9))(v||{});const f=_0x3d346b=>c[_0x39cfa9(0x13b)](new Date(+_0x3d346b))[_0x39cfa9(0x10b)](_0x39cfa9(0xf7)),R=async(_0x2f2a40,_0x42be4e)=>{const _0x581ed8=_0x39cfa9,_0x4cb127=_0x2f2a40['get'](c['UserManagerService']),_0x327821=_0x2f2a40['get'](P['HTTPService']);_0x42be4e[_0x581ed8(0x153)](_0x37a2af=>{const _0x5189ec=_0x581ed8;_0x4cb127[_0x5189ec(0x15a)](_0x37a2af)&&_0x42be4e[_0x5189ec(0x141)](_0x37a2af);}),_0x42be4e[_0x581ed8(0x16c)]&&(await _0x327821[_0x581ed8(0x128)](_0x581ed8(0x159),{'params':{'userIDs':[..._0x42be4e]}}))[_0x581ed8(0xfc)]['users'][_0x581ed8(0x153)](_0x532eb7=>{const _0x1e4173=_0x581ed8;_0x532eb7&&_0x4cb127[_0x1e4173(0x106)](_0x532eb7);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x13b178,_0x34650a,_0x3e79bd,_0x20290d)=>{const _0x53d820=_0x39cfa9;for(var _0x2e0fe7=_0x20290d>0x1?void 0x0:_0x20290d?$(_0x34650a,_0x3e79bd):_0x34650a,_0x43b931=_0x13b178[_0x53d820(0x14d)]-0x1,_0x1f91e8;_0x43b931>=0x0;_0x43b931--)(_0x1f91e8=_0x13b178[_0x43b931])&&(_0x2e0fe7=_0x1f91e8(_0x2e0fe7)||_0x2e0fe7);return _0x2e0fe7;},S=(_0x351f62,_0x45f73c)=>(_0x19a18e,_0x50313b)=>_0x45f73c(_0x19a18e,_0x50313b,_0x351f62);let p=class extends c['Disposable']{constructor(_0x29d2bf,_0x4eb3f1,_0x503669,_0x4d8c70){const _0x576160=_0x39cfa9;super(),this[_0x576160(0x14a)]=_0x29d2bf,this[_0x576160(0xf8)]=_0x4eb3f1,this[_0x576160(0x11f)]=_0x503669,this[_0x576160(0x140)]=_0x4d8c70,this[_0x576160(0x125)](),this[_0x576160(0x12e)]();}[_0x39cfa9(0x12e)](){const _0x144b37=_0x39cfa9;this[_0x144b37(0x100)](this[_0x144b37(0xf8)][_0x144b37(0xf9)][_0x144b37(0x155)](w[_0x144b37(0x173)](0x10))['subscribe'](_0x569ac8=>{const _0x221e70=_0x144b37,_0x280f77=new Set();_0x569ac8[_0x221e70(0x153)](_0x29ab3a=>{const _0x59ea88=_0x221e70;switch(_0x29ab3a[_0x59ea88(0x118)]){case _0x59ea88(0x10e):{const _0x279223=_0x29ab3a[_0x59ea88(0x12a)][_0x59ea88(0x11a)];_0x280f77['add'](_0x279223);break;}}}),R(this[_0x221e70(0x140)],_0x280f77);}));}[_0x39cfa9(0x125)](){const _0x4858d5=_0x39cfa9;this[_0x4858d5(0x100)](this[_0x4858d5(0x14a)][_0x4858d5(0xf9)][_0x4858d5(0x156)](async _0xfda666=>{const _0x34c126=_0x4858d5;var _0x41a2af,_0x5d46bf,_0x4dc9d7,_0x4da52d;const _0x5ec197=(_0x41a2af=this[_0x34c126(0xf8)]['getUnit'](_0xfda666[_0x34c126(0x11c)])['find'](_0x5f23d0=>_0x5f23d0[_0x34c126(0x171)]===_0xfda666[_0x34c126(0x171)]))==null?void 0x0:_0x41a2af['root'];if(!_0x5ec197)return;const {unitId:_0x4317ba,subUnitId:_0x4e4e43}=_0x5ec197;switch(_0xfda666[_0x34c126(0x131)]&&this[_0x34c126(0x11f)]['addUser'](_0xfda666['user']),_0xfda666['type']){case v[_0x34c126(0xf6)]:break;case v[_0x34c126(0x113)]:{this[_0x34c126(0xf8)][_0x34c126(0x13c)](_0x4317ba,_0x4e4e43,{'unitId':_0x4317ba,'subUnitId':_0x4e4e43,'ref':'','id':_0xfda666[_0x34c126(0x135)],'dT':f(+_0xfda666[_0x34c126(0x112)]),'threadId':_0xfda666[_0x34c126(0x171)],'personId':(_0x4dc9d7=(_0x5d46bf=_0xfda666[_0x34c126(0x131)])==null?void 0x0:_0x5d46bf[_0x34c126(0x136)])!=null?_0x4dc9d7:_0xfda666[_0x34c126(0x14c)],'text':JSON[_0x34c126(0x123)](_0xfda666['content']),'parentId':_0x5ec197['id']});break;}case v[_0x34c126(0x101)]:{const _0x31f202=this[_0x34c126(0xf8)][_0x34c126(0x109)](_0x4317ba,_0x4e4e43,_0xfda666['replyId']);_0x31f202&&_0x31f202[_0x34c126(0x13f)]&&this['_threadCommentModel'][_0x34c126(0x12c)](_0x4317ba,_0x4e4e43,_0xfda666[_0x34c126(0x135)]);break;}case v[_0x34c126(0x164)]:{this[_0x34c126(0xf8)][_0x34c126(0x124)](_0x4317ba,_0x4e4e43,{'commentId':_0xfda666['replyId'],'text':JSON[_0x34c126(0x123)](_0xfda666[_0x34c126(0x15d)])});break;}case v[_0x34c126(0x11d)]:{const _0x3fbba3=(_0x4da52d=this[_0x34c126(0xf8)][_0x34c126(0x172)](_0xfda666[_0x34c126(0x11c)])[_0x34c126(0x12d)](_0x30f7ef=>_0x30f7ef[_0x34c126(0x171)]===_0xfda666[_0x34c126(0x171)]))==null?void 0x0:_0x4da52d['root'];_0x3fbba3&&this[_0x34c126(0xf8)][_0x34c126(0x147)](_0x4317ba,_0x4e4e43,_0x3fbba3['id'],_0xfda666[_0x34c126(0x144)]===I[_0x34c126(0x16d)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x39cfa9(0x102)])),S(0x1,c[_0x39cfa9(0x170)](M[_0x39cfa9(0x162)])),S(0x2,c[_0x39cfa9(0x170)](c[_0x39cfa9(0x176)])),S(0x3,c[_0x39cfa9(0x170)](c['Injector']))],p);const q=_0x39cfa9(0x16e),D={};var A=Object[_0x39cfa9(0x138)],x=(_0x2e2aff,_0x15e49e,_0x1dd1ea,_0x242544)=>{const _0x392567=_0x39cfa9;for(var _0x207067=_0x242544>0x1?void 0x0:_0x242544?A(_0x15e49e,_0x1dd1ea):_0x15e49e,_0x476082=_0x2e2aff[_0x392567(0x14d)]-0x1,_0x107dc1;_0x476082>=0x0;_0x476082--)(_0x107dc1=_0x2e2aff[_0x476082])&&(_0x207067=_0x107dc1(_0x207067)||_0x207067);return _0x207067;},_=(_0x5cc69d,_0x459d8b)=>(_0x2e0c77,_0x4c278d)=>_0x459d8b(_0x2e0c77,_0x4c278d,_0x5cc69d);function Y(_0x1d5699,_0x275431){const _0x18309c=_0x39cfa9,_0x59ede4=_0x1d5699[_0x18309c(0x13d)][0x0];return{..._0x275431,'id':_0x59ede4[_0x18309c(0x135)],'resolved':_0x1d5699['solved']===0x1,'dT':f(_0x59ede4[_0x18309c(0x112)]),'personId':_0x59ede4[_0x18309c(0x14c)],'threadId':_0x59ede4[_0x18309c(0x171)]};}function G(_0x3d99ae,_0x2e13c2,_0x4e1caf){const _0x369aff=_0x39cfa9;var _0x15097f,_0x5360ff;if(((_0x5360ff=(_0x15097f=_0x3d99ae==null?void 0x0:_0x3d99ae[_0x369aff(0x13d)])==null?void 0x0:_0x15097f[_0x369aff(0x14d)])!=null?_0x5360ff:0x0)>0x0){const _0x5b0e5f=(_0x5807fb,_0x2b231e)=>({'id':_0x5807fb[_0x369aff(0x135)],'threadId':_0x5807fb[_0x369aff(0x171)],'dT':f(_0x5807fb[_0x369aff(0x112)]),'personId':_0x5807fb['userId'],'resolved':_0x3d99ae[_0x369aff(0x144)]===I[_0x369aff(0x16d)],'unitId':_0x2e13c2,'subUnitId':_0x4e1caf,'text':JSON[_0x369aff(0x123)](_0x5807fb[_0x369aff(0x15d)]),'parentId':_0x2b231e}),_0x477c71=_0x5b0e5f(_0x3d99ae[_0x369aff(0x13d)][0x0]);return{..._0x477c71,'children':_0x3d99ae[_0x369aff(0x13d)][_0x369aff(0x11b)](0x1)[_0x369aff(0x127)](_0x5124cc=>_0x5b0e5f(_0x5124cc,_0x477c71['id']))};}return null;}let g=class{constructor(_0x34c84d,_0x4dfbd1,_0x3bba66,_0x31fb82){const _0xfa1cc2=_0x39cfa9;this[_0xfa1cc2(0xfd)]=_0x34c84d,this['_userService']=_0x4dfbd1,this[_0xfa1cc2(0x154)]=_0x3bba66,this[_0xfa1cc2(0x140)]=_0x31fb82;}async[_0x39cfa9(0x13c)](_0x600efd){const _0x20ba6f=_0x39cfa9;var _0x59a666,_0x2bf699;const {parentId:_0x36eee3,unitId:_0x290325,text:_0x16f41b,threadId:_0x1f4a99}=_0x600efd,_0x222299=(_0x2bf699=(_0x59a666=_0x16f41b['customRanges'])==null?void 0x0:_0x59a666[_0x20ba6f(0x145)](_0x46a2a9=>_0x46a2a9[_0x20ba6f(0x132)]===c[_0x20ba6f(0x108)][_0x20ba6f(0x12f)])[_0x20ba6f(0x127)](_0x1113e2=>_0x1113e2[_0x20ba6f(0x10d)]))!=null?_0x2bf699:[],_0xea195=JSON['stringify'](_0x16f41b),_0x4da7ef=(await this['_sessionService'][_0x20ba6f(0xfe)](_0x290325))[_0x20ba6f(0x111)]();if(_0x36eee3){const _0x46037e={'memberId':_0x4da7ef,'unitId':_0x290325,'content':_0xea195,'mention':_0x222299,'threadId':_0x1f4a99},_0x496919=(await this[_0x20ba6f(0xfd)][_0x20ba6f(0x14b)]('/universer-api/comment/unit/'+_0x290325+_0x20ba6f(0x130),{'body':_0x46037e}))[_0x20ba6f(0xfc)]['reply'];return{..._0x600efd,'id':_0x496919[_0x20ba6f(0x135)],'dT':c['dayjs'](+_0x496919['createTimestamp'])['format'](_0x20ba6f(0xf7)),'personId':_0x496919[_0x20ba6f(0x14c)]};}else{const _0x44b52f={'memberId':_0x4da7ef,'unitId':_0x290325,'content':_0xea195,'mention':_0x222299},_0x140203=await this[_0x20ba6f(0xfd)][_0x20ba6f(0x14b)](_0x20ba6f(0x104)+_0x290325+_0x20ba6f(0x103),{'body':_0x44b52f});return Y(_0x140203[_0x20ba6f(0xfc)]['comment'],_0x600efd);}}async[_0x39cfa9(0x124)](_0x1fa654){const _0x1f7892=_0x39cfa9;var _0x4fc03e,_0x53240b;const {text:_0xd51861,unitId:_0x2bb2fa}=_0x1fa654,_0x51f715=(_0x53240b=(_0x4fc03e=_0xd51861['customRanges'])==null?void 0x0:_0x4fc03e[_0x1f7892(0x145)](_0x42e7d4=>_0x42e7d4[_0x1f7892(0x132)]===c['CustomRangeType'][_0x1f7892(0x12f)])[_0x1f7892(0x127)](_0x4fa6e8=>_0x4fa6e8[_0x1f7892(0x10d)]))!=null?_0x53240b:[],_0x2647f8=JSON[_0x1f7892(0x161)](_0xd51861),_0x25d07e=_0x1fa654[_0x1f7892(0x171)],_0x398fd2=_0x1fa654['id'],_0x292970={'memberId':(await this['_sessionService'][_0x1f7892(0xfe)](_0x2bb2fa))[_0x1f7892(0x111)](),'unitId':_0x2bb2fa,'threadId':_0x25d07e,'mention':_0x51f715,'content':_0x2647f8,'replyId':_0x398fd2},_0x262635=await this['_httpService']['post'](_0x1f7892(0x104)+_0x2bb2fa+'/edit',{'body':_0x292970});return!_0x262635['body'][_0x1f7892(0x14f)]||_0x262635['body'][_0x1f7892(0x14f)]['code']===0x1;}async[_0x39cfa9(0x147)](_0x12429a){const _0x80328f=_0x39cfa9,{unitId:_0x46fb6b}=_0x12429a,_0x97791=_0x12429a[_0x80328f(0x171)],_0x4b241b={'memberId':this[_0x80328f(0x11f)][_0x80328f(0x107)]()[_0x80328f(0x136)],'unitId':_0x46fb6b,'threadId':_0x97791,'solved':_0x12429a['resolved']?I[_0x80328f(0x16d)]:I[_0x80328f(0x166)]},_0x1ade9a=await this[_0x80328f(0xfd)][_0x80328f(0x14b)]('/universer-api/comment/unit/'+_0x46fb6b+_0x80328f(0x139),{'body':_0x4b241b});return!_0x1ade9a[_0x80328f(0xfc)][_0x80328f(0x14f)]||_0x1ade9a['body'][_0x80328f(0x14f)]['code']===0x1;}async[_0x39cfa9(0x12c)](_0x4a8ff1,_0x989671,_0x135d1a,_0x1cd497){const _0x32bb88=_0x39cfa9,_0x190b09={'memberId':(await this[_0x32bb88(0x154)][_0x32bb88(0xfe)](_0x4a8ff1))['getMemberID'](),'threadId':_0x135d1a,'replyId':_0x1cd497,'unitId':_0x4a8ff1},_0x46fe64=await this[_0x32bb88(0xfd)]['post'](_0x32bb88(0x104)+_0x4a8ff1+_0x32bb88(0x160),{'body':_0x190b09});return!_0x46fe64['body'][_0x32bb88(0x14f)]||_0x46fe64['body']['error'][_0x32bb88(0x16a)]===0x1;}async[_0x39cfa9(0xfa)](_0xe48bc0,_0x40bdad,_0x3cebd3){const _0x131e5d=_0x39cfa9,_0x2884eb={'unitId':_0xe48bc0,'threadId':_0x3cebd3},_0x2d2ef5=await this[_0x131e5d(0xfd)][_0x131e5d(0x14b)](_0x131e5d(0x104)+_0xe48bc0+_0x131e5d(0x114),{'body':_0x2884eb}),_0x5a8979=_0x3cebd3[_0x131e5d(0x127)](_0x295548=>G(_0x2d2ef5[_0x131e5d(0xfc)][_0x131e5d(0x167)][_0x295548],_0xe48bc0,_0x40bdad))['filter'](Boolean);return Object[_0x131e5d(0x10f)](_0x2d2ef5[_0x131e5d(0xfc)][_0x131e5d(0xf2)])[_0x131e5d(0x153)](_0x1dbe7d=>{const _0x371482=_0x131e5d;this['_userService'][_0x371482(0x106)](_0x1dbe7d);}),_0x5a8979;}[_0x39cfa9(0xfb)](_0x26403f){const _0x1b036a=_0x39cfa9;return{'id':_0x26403f['id'],'threadId':_0x26403f[_0x1b036a(0x171)],'ref':_0x26403f[_0x1b036a(0x121)]};}};g=x([_(0x0,c[_0x39cfa9(0x170)](P[_0x39cfa9(0x133)])),_(0x1,c['Inject'](c['UserManagerService'])),_(0x2,c[_0x39cfa9(0x170)](b[_0x39cfa9(0x11e)])),_(0x3,c[_0x39cfa9(0x170)](c[_0x39cfa9(0xff)]))],g);var H=Object[_0x39cfa9(0x138)],J=(_0x3ae4bd,_0x133e44,_0x37f5b7,_0x433e1e)=>{for(var _0x15f9e4=_0x433e1e>0x1?void 0x0:_0x433e1e?H(_0x133e44,_0x37f5b7):_0x133e44,_0x460100=_0x3ae4bd['length']-0x1,_0x427df8;_0x460100>=0x0;_0x460100--)(_0x427df8=_0x3ae4bd[_0x460100])&&(_0x15f9e4=_0x427df8(_0x15f9e4)||_0x15f9e4);return _0x15f9e4;},y=(_0xbf736b,_0x392bc6)=>(_0x2a4b5d,_0x1f00f9)=>_0x392bc6(_0x2a4b5d,_0x1f00f9,_0xbf736b);let C=class extends c[_0x39cfa9(0x158)]{constructor(_0x1ec9a7,_0x13e95c){const _0x9e3a7a=_0x39cfa9;super(),this['_threadCommentDataSourceService']=_0x1ec9a7,this[_0x9e3a7a(0x15b)]=_0x13e95c,this[_0x9e3a7a(0x13a)]();}['_initDataSource'](){const _0x4e113b=_0x39cfa9;this[_0x4e113b(0xf3)]['dataSource']=this['_threadCommentDataSource'],this[_0x4e113b(0xf3)][_0x4e113b(0x119)]=!0x1;}};C=J([y(0x0,M[_0x39cfa9(0x129)]),y(0x1,c[_0x39cfa9(0x170)](g))],C);function _0x44fe(){const _0x3712a7=['filter','@univerjs/thread-comment','resolveComment','defineProperty','_configService','_commentService','post','userId','length','@univerjs/thread-comment-ui','error','5549243ciqfhg','_config','rxjs','forEach','_sessionService','pipe','subscribe','UniverThreadCommentDataSourcePlugin','Disposable','/universer-api/user/list','getUser','_threadCommentDataSource','80LiORrW','content','IConfigService','18trzjoR','/delete','stringify','ThreadCommentModel','1275zUWHew','Edit','pluginName','OpenOrReOpen','comments','18oCsYxk','Module','code','merge','size','Solved','thread-comment-data-source.config','41616822RSWPLH','Inject','threadId','getUnit','bufferTime','@univerjs/core','47164QQzVbz','UserManagerService','users','_threadCommentDataSourceService','Plugin','15510bXvxZd','Add','YYYY/MM/DD\x20HH:mm','_threadCommentModel','commentUpdate$','listComments','saveCommentToSnapshot','body','_httpService','requireSession','Injector','disposeWithMe','Delete','CommentService','/add','/universer-api/comment/unit/','12gXSSkO','addUser','getCurrentUser','CustomRangeType','getComment','UniverInstanceType','format','948611LaSuFk','rangeId','add','values','Unknown','getMemberID','createTimestamp','Reply','/list','977128SRZSyP','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverLicensePlugin','type','syncUpdateMutationToColla','personId','slice','unitId','Solve','CollaborationSessionService','_userService','onReady','ref','632423ZetClI','parse','updateComment','_init','UniverCollaborationClientPlugin','map','get','IThreadCommentDataSourceService','payload','@univerjs-pro/license','deleteComment','find','_initUserSync','COMMENT','/reply','user','rangeType','HTTPService','@univerjs-pro/collaboration-client','replyId','userID','UNRECOGNIZED','getOwnPropertyDescriptor','/solved','_initDataSource','dayjs','addComment','replies','2PPCuzk','parentId','_injector','delete','DependentOn','UniverThreadCommentUIPlugin','solved'];_0x44fe=function(){return _0x3712a7;};return _0x44fe();}var F=Object['defineProperty'],L=Object[_0x39cfa9(0x138)],Z=(_0x3388db,_0x154878,_0x1ef1ec)=>_0x154878 in _0x3388db?F(_0x3388db,_0x154878,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1ef1ec}):_0x3388db[_0x154878]=_0x1ef1ec,W=(_0x303b9d,_0x56456b,_0x53d654,_0x155166)=>{const _0x5c1054=_0x39cfa9;for(var _0x46966a=_0x155166>0x1?void 0x0:_0x155166?L(_0x56456b,_0x53d654):_0x56456b,_0x712608=_0x303b9d[_0x5c1054(0x14d)]-0x1,_0x415e39;_0x712608>=0x0;_0x712608--)(_0x415e39=_0x303b9d[_0x712608])&&(_0x46966a=_0x415e39(_0x46966a)||_0x46966a);return _0x46966a;},O=(_0x4ba7c5,_0x276e9d)=>(_0x598b8a,_0x2e875d)=>_0x276e9d(_0x598b8a,_0x2e875d,_0x4ba7c5),N=(_0x8a9aea,_0x55b828,_0xec7562)=>Z(_0x8a9aea,typeof _0x55b828!='symbol'?_0x55b828+'':_0x55b828,_0xec7562);exports[_0x39cfa9(0x157)]=class extends c[_0x39cfa9(0xf4)]{constructor(_0xd83c05=D,_0x6ea53d,_0x24d914){const _0x245361=_0x39cfa9;super(),this[_0x245361(0x151)]=_0xd83c05,this[_0x245361(0x140)]=_0x6ea53d,this[_0x245361(0x149)]=_0x24d914;const {..._0x227743}=c[_0x245361(0x16b)]({},D,this[_0x245361(0x151)]);this['_configService']['setConfig'](q,_0x227743);}['onStarting'](){const _0x589d43=_0x39cfa9;[[g],[C],[p]][_0x589d43(0x153)](_0x21fbb4=>{const _0x594778=_0x589d43;this[_0x594778(0x140)]['add'](_0x21fbb4);});}[_0x39cfa9(0x120)](){const _0x3b0b8f=_0x39cfa9;this['_injector'][_0x3b0b8f(0x128)](C),this[_0x3b0b8f(0x140)][_0x3b0b8f(0x128)](p);}},N(exports[_0x39cfa9(0x157)],_0x39cfa9(0x165),U),N(exports[_0x39cfa9(0x157)],_0x39cfa9(0x118),c[_0x39cfa9(0x10a)]['UNIVER_UNKNOWN']),exports[_0x39cfa9(0x157)]=W([c[_0x39cfa9(0x142)](j[_0x39cfa9(0x143)],b[_0x39cfa9(0x126)],T[_0x39cfa9(0x117)]),O(0x1,c[_0x39cfa9(0x170)](c[_0x39cfa9(0xff)])),O(0x2,c[_0x39cfa9(0x15e)])],exports[_0x39cfa9(0x157)]);
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 _0x1d302e=_0x1e2f;(function(_0x1fc926,_0x3b0f4c){const _0x3318d7=_0x1e2f,_0x341fd4=_0x1fc926();while(!![]){try{const _0x196724=-parseInt(_0x3318d7(0x144))/0x1+-parseInt(_0x3318d7(0x165))/0x2+-parseInt(_0x3318d7(0x19a))/0x3+-parseInt(_0x3318d7(0x182))/0x4*(-parseInt(_0x3318d7(0x14d))/0x5)+-parseInt(_0x3318d7(0x19e))/0x6+-parseInt(_0x3318d7(0x187))/0x7*(-parseInt(_0x3318d7(0x184))/0x8)+parseInt(_0x3318d7(0x14e))/0x9;if(_0x196724===_0x3b0f4c)break;else _0x341fd4['push'](_0x341fd4['shift']());}catch(_0x1c55eb){_0x341fd4['push'](_0x341fd4['shift']());}}}(_0x13fb,0x86d7b));import{CommentService as _0x4e0010,CollaborationSessionService as _0x220aff,UniverCollaborationClientPlugin as _0x1dcdc4}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4d8b32}from'@univerjs-pro/license';import{dayjs as _0x1237a9,UserManagerService as _0x330e6e,Inject as _0x768f6c,Injector as _0x3c3e98,Disposable as _0x6596eb,CustomRangeType as _0x1139a9,UniverInstanceType as _0x1d77ae,DependentOn as _0x1a2e8d,IConfigService as _0x2bfd3c,Plugin as _0x14328e,merge as _0x7f9811}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1de634}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x32fa12,IThreadCommentDataSourceService as _0x57ecc3}from'@univerjs/thread-comment';import{bufferTime as _0x4f0216}from'rxjs';import{HTTPService as _0x130cb1}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5e9b61=>(_0x5e9b61[_0x5e9b61[_0x1d302e(0x171)]=0x0]=_0x1d302e(0x171),_0x5e9b61[_0x5e9b61[_0x1d302e(0x176)]=0x1]=_0x1d302e(0x176),_0x5e9b61[_0x5e9b61[_0x1d302e(0x157)]=-0x1]=_0x1d302e(0x157),_0x5e9b61))(I||{}),v=(_0x4f044f=>(_0x4f044f[_0x4f044f[_0x1d302e(0x174)]=0x0]=_0x1d302e(0x174),_0x4f044f[_0x4f044f[_0x1d302e(0x156)]=0x1]=_0x1d302e(0x156),_0x4f044f[_0x4f044f[_0x1d302e(0x190)]=0x2]='Reply',_0x4f044f[_0x4f044f['Edit']=0x3]=_0x1d302e(0x168),_0x4f044f[_0x4f044f[_0x1d302e(0x16e)]=0x4]=_0x1d302e(0x16e),_0x4f044f[_0x4f044f[_0x1d302e(0x16a)]=0x5]=_0x1d302e(0x16a),_0x4f044f[_0x4f044f[_0x1d302e(0x157)]=-0x1]=_0x1d302e(0x157),_0x4f044f))(v||{});const D=_0x529f43=>_0x1237a9(new Date(+_0x529f43))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x228784,_0x32208a)=>{const _0x4e43c9=_0x1d302e,_0x51ac74=_0x228784[_0x4e43c9(0x199)](_0x330e6e),_0x177b6e=_0x228784[_0x4e43c9(0x199)](_0x130cb1);_0x32208a[_0x4e43c9(0x150)](_0x385a8d=>{const _0xa7b9eb=_0x4e43c9;_0x51ac74[_0xa7b9eb(0x170)](_0x385a8d)&&_0x32208a[_0xa7b9eb(0x195)](_0x385a8d);}),_0x32208a[_0x4e43c9(0x149)]&&(await _0x177b6e['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x32208a]}}))[_0x4e43c9(0x175)]['users'][_0x4e43c9(0x150)](_0x27d7d6=>{_0x27d7d6&&_0x51ac74['addUser'](_0x27d7d6);});};function _0x1e2f(_0x81746a,_0x592a1b){const _0x13fb74=_0x13fb();return _0x1e2f=function(_0x1e2f6b,_0xfd2e08){_0x1e2f6b=_0x1e2f6b-0x144;let _0x99b005=_0x13fb74[_0x1e2f6b];return _0x99b005;},_0x1e2f(_0x81746a,_0x592a1b);}var K=Object[_0x1d302e(0x16d)],V=(_0x5b5d0f,_0x5ef976,_0x23367e,_0xb7ebe7)=>{const _0x4ba3da=_0x1d302e;for(var _0x24a596=_0xb7ebe7>0x1?void 0x0:_0xb7ebe7?K(_0x5ef976,_0x23367e):_0x5ef976,_0x4d3aa6=_0x5b5d0f[_0x4ba3da(0x148)]-0x1,_0x198c96;_0x4d3aa6>=0x0;_0x4d3aa6--)(_0x198c96=_0x5b5d0f[_0x4d3aa6])&&(_0x24a596=_0x198c96(_0x24a596)||_0x24a596);return _0x24a596;},p=(_0x243097,_0x10e5b8)=>(_0x7985,_0x59d60c)=>_0x10e5b8(_0x7985,_0x59d60c,_0x243097);let S=class extends _0x6596eb{constructor(_0x1d252e,_0x19ddb4,_0x3f97d8,_0x16b8ba){const _0x3b6b8c=_0x1d302e;super(),this['_commentService']=_0x1d252e,this[_0x3b6b8c(0x169)]=_0x19ddb4,this['_userService']=_0x3f97d8,this['_injector']=_0x16b8ba,this[_0x3b6b8c(0x16b)](),this[_0x3b6b8c(0x146)]();}[_0x1d302e(0x146)](){const _0x56684d=_0x1d302e;this[_0x56684d(0x14f)](this[_0x56684d(0x169)]['commentUpdate$'][_0x56684d(0x18c)](_0x4f0216(0x10))[_0x56684d(0x197)](_0x145531=>{const _0x3a897d=_0x56684d,_0x4732e8=new Set();_0x145531[_0x3a897d(0x150)](_0x7f31bc=>{const _0xe63097=_0x3a897d;switch(_0x7f31bc[_0xe63097(0x145)]){case _0xe63097(0x15f):{const _0x1b44bb=_0x7f31bc[_0xe63097(0x17c)][_0xe63097(0x180)];_0x4732e8[_0xe63097(0x15f)](_0x1b44bb);break;}}}),B(this[_0x3a897d(0x17f)],_0x4732e8);}));}[_0x1d302e(0x16b)](){const _0x5527fe=_0x1d302e;this[_0x5527fe(0x14f)](this[_0x5527fe(0x159)][_0x5527fe(0x14b)][_0x5527fe(0x197)](async _0x24f079=>{const _0x5c26fe=_0x5527fe;var _0x3522d3,_0x382a0c,_0x13897c,_0x458fea;const _0x2e3285=(_0x3522d3=this['_threadCommentModel'][_0x5c26fe(0x158)](_0x24f079['unitId'])[_0x5c26fe(0x16f)](_0x10fb90=>_0x10fb90['threadId']===_0x24f079['threadId']))==null?void 0x0:_0x3522d3['root'];if(!_0x2e3285)return;const {unitId:_0x2eb054,subUnitId:_0x3cb463}=_0x2e3285;switch(_0x24f079[_0x5c26fe(0x194)]&&this[_0x5c26fe(0x186)]['addUser'](_0x24f079[_0x5c26fe(0x194)]),_0x24f079[_0x5c26fe(0x145)]){case v[_0x5c26fe(0x156)]:break;case v[_0x5c26fe(0x190)]:{this[_0x5c26fe(0x169)]['addComment'](_0x2eb054,_0x3cb463,{'unitId':_0x2eb054,'subUnitId':_0x3cb463,'ref':'','id':_0x24f079[_0x5c26fe(0x163)],'dT':D(+_0x24f079[_0x5c26fe(0x181)]),'threadId':_0x24f079[_0x5c26fe(0x18f)],'personId':(_0x13897c=(_0x382a0c=_0x24f079[_0x5c26fe(0x194)])==null?void 0x0:_0x382a0c[_0x5c26fe(0x1a0)])!=null?_0x13897c:_0x24f079[_0x5c26fe(0x164)],'text':JSON['parse'](_0x24f079['content']),'parentId':_0x2e3285['id']});break;}case v['Delete']:{const _0x135494=this[_0x5c26fe(0x169)][_0x5c26fe(0x17e)](_0x2eb054,_0x3cb463,_0x24f079[_0x5c26fe(0x163)]);_0x135494&&_0x135494[_0x5c26fe(0x155)]&&this[_0x5c26fe(0x169)][_0x5c26fe(0x16c)](_0x2eb054,_0x3cb463,_0x24f079[_0x5c26fe(0x163)]);break;}case v[_0x5c26fe(0x168)]:{this['_threadCommentModel']['updateComment'](_0x2eb054,_0x3cb463,{'commentId':_0x24f079[_0x5c26fe(0x163)],'text':JSON['parse'](_0x24f079['content'])});break;}case v[_0x5c26fe(0x16a)]:{const _0x2b6c60=(_0x458fea=this[_0x5c26fe(0x169)][_0x5c26fe(0x158)](_0x24f079[_0x5c26fe(0x188)])[_0x5c26fe(0x16f)](_0x27b965=>_0x27b965['threadId']===_0x24f079['threadId']))==null?void 0x0:_0x458fea['root'];_0x2b6c60&&this['_threadCommentModel']['resolveComment'](_0x2eb054,_0x3cb463,_0x2b6c60['id'],_0x24f079[_0x5c26fe(0x147)]===I[_0x5c26fe(0x176)]);break;}}}));}};S=V([p(0x0,_0x768f6c(_0x4e0010)),p(0x1,_0x768f6c(_0x32fa12)),p(0x2,_0x768f6c(_0x330e6e)),p(0x3,_0x768f6c(_0x3c3e98))],S);const z=_0x1d302e(0x15a),M={};var k=Object[_0x1d302e(0x16d)],Q=(_0x3f6b5d,_0x30ec78,_0x5124d9,_0xe07f02)=>{const _0x418084=_0x1d302e;for(var _0x565ffe=_0xe07f02>0x1?void 0x0:_0xe07f02?k(_0x30ec78,_0x5124d9):_0x30ec78,_0x48a9fa=_0x3f6b5d[_0x418084(0x148)]-0x1,_0xba9bca;_0x48a9fa>=0x0;_0x48a9fa--)(_0xba9bca=_0x3f6b5d[_0x48a9fa])&&(_0x565ffe=_0xba9bca(_0x565ffe)||_0x565ffe);return _0x565ffe;},_=(_0x20c738,_0x53225d)=>(_0x3fcb31,_0x40ada7)=>_0x53225d(_0x3fcb31,_0x40ada7,_0x20c738);function X(_0x623bb5,_0x392986){const _0x4d7fef=_0x1d302e,_0x39685a=_0x623bb5[_0x4d7fef(0x15b)][0x0];return{..._0x392986,'id':_0x39685a[_0x4d7fef(0x163)],'resolved':_0x623bb5['solved']===0x1,'dT':D(_0x39685a['createTimestamp']),'personId':_0x39685a['userId'],'threadId':_0x39685a[_0x4d7fef(0x18f)]};}function ee(_0x421e28,_0x140d4a,_0xe3ba42){const _0x2241e8=_0x1d302e;var _0x28c1cb,_0x5ec6a0;if(((_0x5ec6a0=(_0x28c1cb=_0x421e28==null?void 0x0:_0x421e28[_0x2241e8(0x15b)])==null?void 0x0:_0x28c1cb['length'])!=null?_0x5ec6a0:0x0)>0x0){const _0x7efdc2=(_0x1225c0,_0x2d0853)=>({'id':_0x1225c0[_0x2241e8(0x163)],'threadId':_0x1225c0[_0x2241e8(0x18f)],'dT':D(_0x1225c0['createTimestamp']),'personId':_0x1225c0[_0x2241e8(0x164)],'resolved':_0x421e28['solved']===I[_0x2241e8(0x176)],'unitId':_0x140d4a,'subUnitId':_0xe3ba42,'text':JSON[_0x2241e8(0x177)](_0x1225c0[_0x2241e8(0x191)]),'parentId':_0x2d0853}),_0x1d572a=_0x7efdc2(_0x421e28['replies'][0x0]);return{..._0x1d572a,'children':_0x421e28[_0x2241e8(0x15b)]['slice'](0x1)[_0x2241e8(0x183)](_0x21ab79=>_0x7efdc2(_0x21ab79,_0x1d572a['id']))};}return null;}let f=class{constructor(_0x1ffbb7,_0xb34232,_0x467f1f,_0x1f695a){const _0x5e7819=_0x1d302e;this['_httpService']=_0x1ffbb7,this[_0x5e7819(0x186)]=_0xb34232,this['_sessionService']=_0x467f1f,this['_injector']=_0x1f695a;}async[_0x1d302e(0x178)](_0x36c8c9){const _0x44fba1=_0x1d302e;var _0x4fcbff,_0x3c3e6e;const {parentId:_0xa76e45,unitId:_0x2ef2dc,text:_0x5889ee,threadId:_0xc8ac93}=_0x36c8c9,_0x5df288=(_0x3c3e6e=(_0x4fcbff=_0x5889ee['customRanges'])==null?void 0x0:_0x4fcbff[_0x44fba1(0x14a)](_0x9e57b8=>_0x9e57b8[_0x44fba1(0x19b)]===_0x1139a9[_0x44fba1(0x15c)])[_0x44fba1(0x183)](_0x2e23fa=>_0x2e23fa['rangeId']))!=null?_0x3c3e6e:[],_0x1c0d34=JSON[_0x44fba1(0x14c)](_0x5889ee),_0x2207a4=(await this[_0x44fba1(0x17b)]['requireSession'](_0x2ef2dc))[_0x44fba1(0x151)]();if(_0xa76e45){const _0x614378={'memberId':_0x2207a4,'unitId':_0x2ef2dc,'content':_0x1c0d34,'mention':_0x5df288,'threadId':_0xc8ac93},_0x3d9d71=(await this[_0x44fba1(0x18d)][_0x44fba1(0x152)](_0x44fba1(0x198)+_0x2ef2dc+_0x44fba1(0x189),{'body':_0x614378}))[_0x44fba1(0x175)]['reply'];return{..._0x36c8c9,'id':_0x3d9d71[_0x44fba1(0x163)],'dT':_0x1237a9(+_0x3d9d71[_0x44fba1(0x181)])['format'](_0x44fba1(0x179)),'personId':_0x3d9d71['userId']};}else{const _0x3e1269={'memberId':_0x2207a4,'unitId':_0x2ef2dc,'content':_0x1c0d34,'mention':_0x5df288},_0x482aa2=await this[_0x44fba1(0x18d)]['post'](_0x44fba1(0x198)+_0x2ef2dc+'/add',{'body':_0x3e1269});return X(_0x482aa2[_0x44fba1(0x175)]['comment'],_0x36c8c9);}}async['updateComment'](_0x1c763a){const _0xf12c=_0x1d302e;var _0x551dd1,_0x13b02a;const {text:_0x1fb226,unitId:_0x5c645e}=_0x1c763a,_0x35f3c0=(_0x13b02a=(_0x551dd1=_0x1fb226['customRanges'])==null?void 0x0:_0x551dd1['filter'](_0x4c845e=>_0x4c845e[_0xf12c(0x19b)]===_0x1139a9[_0xf12c(0x15c)])[_0xf12c(0x183)](_0x1d344a=>_0x1d344a['rangeId']))!=null?_0x13b02a:[],_0x543678=JSON[_0xf12c(0x14c)](_0x1fb226),_0x49c028=_0x1c763a[_0xf12c(0x18f)],_0x376635=_0x1c763a['id'],_0x5e12bd={'memberId':(await this[_0xf12c(0x17b)][_0xf12c(0x192)](_0x5c645e))[_0xf12c(0x151)](),'unitId':_0x5c645e,'threadId':_0x49c028,'mention':_0x35f3c0,'content':_0x543678,'replyId':_0x376635},_0x1c7479=await this[_0xf12c(0x18d)]['post'](_0xf12c(0x198)+_0x5c645e+_0xf12c(0x15e),{'body':_0x5e12bd});return!_0x1c7479['body']['error']||_0x1c7479[_0xf12c(0x175)][_0xf12c(0x173)][_0xf12c(0x161)]===0x1;}async[_0x1d302e(0x15d)](_0x47e32d){const _0x5dd3ff=_0x1d302e,{unitId:_0x26640e}=_0x47e32d,_0x39e6c7=_0x47e32d['threadId'],_0x273242={'memberId':this['_userService']['getCurrentUser']()[_0x5dd3ff(0x1a0)],'unitId':_0x26640e,'threadId':_0x39e6c7,'solved':_0x47e32d[_0x5dd3ff(0x19f)]?I[_0x5dd3ff(0x176)]:I[_0x5dd3ff(0x171)]},_0x2c8223=await this['_httpService'][_0x5dd3ff(0x152)](_0x5dd3ff(0x198)+_0x26640e+_0x5dd3ff(0x18a),{'body':_0x273242});return!_0x2c8223['body']['error']||_0x2c8223[_0x5dd3ff(0x175)][_0x5dd3ff(0x173)][_0x5dd3ff(0x161)]===0x1;}async[_0x1d302e(0x16c)](_0x43c5a3,_0x5dd986,_0x1c1e4d,_0x572ebe){const _0x5e668c=_0x1d302e,_0x7d82ad={'memberId':(await this[_0x5e668c(0x17b)][_0x5e668c(0x192)](_0x43c5a3))[_0x5e668c(0x151)](),'threadId':_0x1c1e4d,'replyId':_0x572ebe,'unitId':_0x43c5a3},_0x5116df=await this['_httpService'][_0x5e668c(0x152)]('/universer-api/comment/unit/'+_0x43c5a3+_0x5e668c(0x19c),{'body':_0x7d82ad});return!_0x5116df['body'][_0x5e668c(0x173)]||_0x5116df[_0x5e668c(0x175)][_0x5e668c(0x173)][_0x5e668c(0x161)]===0x1;}async[_0x1d302e(0x166)](_0x510ca9,_0x197e9d,_0x18fbda){const _0x4cd19f=_0x1d302e,_0x3483e4={'unitId':_0x510ca9,'threadId':_0x18fbda},_0x4e1716=await this[_0x4cd19f(0x18d)][_0x4cd19f(0x152)]('/universer-api/comment/unit/'+_0x510ca9+_0x4cd19f(0x1a1),{'body':_0x3483e4}),_0x2295f2=_0x18fbda[_0x4cd19f(0x183)](_0x13ed2e=>ee(_0x4e1716[_0x4cd19f(0x175)]['comments'][_0x13ed2e],_0x510ca9,_0x197e9d))['filter'](Boolean);return Object['values'](_0x4e1716[_0x4cd19f(0x175)]['users'])[_0x4cd19f(0x150)](_0x4fad1b=>{const _0x27da98=_0x4cd19f;this[_0x27da98(0x186)][_0x27da98(0x160)](_0x4fad1b);}),_0x2295f2;}[_0x1d302e(0x172)](_0x2095b6){const _0x452969=_0x1d302e;return{'id':_0x2095b6['id'],'threadId':_0x2095b6['threadId'],'ref':_0x2095b6[_0x452969(0x185)]};}};f=Q([_(0x0,_0x768f6c(_0x130cb1)),_(0x1,_0x768f6c(_0x330e6e)),_(0x2,_0x768f6c(_0x220aff)),_(0x3,_0x768f6c(_0x3c3e98))],f);var re=Object[_0x1d302e(0x16d)],te=(_0x2e7b,_0x2df40c,_0x4f1bec,_0x3105b4)=>{const _0x535f40=_0x1d302e;for(var _0x52c833=_0x3105b4>0x1?void 0x0:_0x3105b4?re(_0x2df40c,_0x4f1bec):_0x2df40c,_0xd7a2fc=_0x2e7b[_0x535f40(0x148)]-0x1,_0x48c2cf;_0xd7a2fc>=0x0;_0xd7a2fc--)(_0x48c2cf=_0x2e7b[_0xd7a2fc])&&(_0x52c833=_0x48c2cf(_0x52c833)||_0x52c833);return _0x52c833;},N=(_0x3e0918,_0x14c97d)=>(_0x224dc6,_0xe4ab1)=>_0x14c97d(_0x224dc6,_0xe4ab1,_0x3e0918);let g=class extends _0x6596eb{constructor(_0x1a0f71,_0x3db004){const _0x36d92c=_0x1d302e;super(),this[_0x36d92c(0x18e)]=_0x1a0f71,this[_0x36d92c(0x17a)]=_0x3db004,this[_0x36d92c(0x162)]();}[_0x1d302e(0x162)](){const _0x35becd=_0x1d302e;this[_0x35becd(0x18e)][_0x35becd(0x19d)]=this[_0x35becd(0x17a)],this['_threadCommentDataSourceService'][_0x35becd(0x17d)]=!0x1;}};g=te([N(0x0,_0x57ecc3),N(0x1,_0x768f6c(f))],g);function _0x13fb(){const _0x44903c=['userId','1903138nnxJMP','listComments','pluginName','Edit','_threadCommentModel','Solve','_init','deleteComment','getOwnPropertyDescriptor','Delete','find','getUser','OpenOrReOpen','saveCommentToSnapshot','error','Unknown','body','Solved','parse','addComment','YYYY/MM/DD\x20HH:mm','_threadCommentDataSource','_sessionService','payload','syncUpdateMutationToColla','getComment','_injector','personId','createTimestamp','4ePWKUE','map','4365640WalMVK','ref','_userService','7VGzCCS','unitId','/reply','/solved','setConfig','pipe','_httpService','_threadCommentDataSourceService','threadId','Reply','content','requireSession','onStarting','user','delete','symbol','subscribe','/universer-api/comment/unit/','get','884583NvQggC','rangeType','/delete','dataSource','5465184QpaTRI','resolved','userID','/list','68712eysXIS','type','_initUserSync','solved','length','size','filter','commentUpdate$','stringify','1513390UGPpid','17369442DcosuM','disposeWithMe','forEach','getMemberID','post','_configService','defineProperty','parentId','Add','UNRECOGNIZED','getUnit','_commentService','thread-comment-data-source.config','replies','COMMENT','resolveComment','/edit','add','addUser','code','_initDataSource','replyId'];_0x13fb=function(){return _0x44903c;};return _0x13fb();}var se=Object[_0x1d302e(0x154)],oe=Object[_0x1d302e(0x16d)],ne=(_0xd27e82,_0x432fba,_0x36085e)=>_0x432fba in _0xd27e82?se(_0xd27e82,_0x432fba,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x36085e}):_0xd27e82[_0x432fba]=_0x36085e,ie=(_0x5a8c6b,_0x15b351,_0x5145fd,_0x5e0fce)=>{const _0x4e8d47=_0x1d302e;for(var _0x1000b8=_0x5e0fce>0x1?void 0x0:_0x5e0fce?oe(_0x15b351,_0x5145fd):_0x15b351,_0x3377cf=_0x5a8c6b[_0x4e8d47(0x148)]-0x1,_0x14ad20;_0x3377cf>=0x0;_0x3377cf--)(_0x14ad20=_0x5a8c6b[_0x3377cf])&&(_0x1000b8=_0x14ad20(_0x1000b8)||_0x1000b8);return _0x1000b8;},w=(_0x209a82,_0x354ee0)=>(_0x33b192,_0x234dc8)=>_0x354ee0(_0x33b192,_0x234dc8,_0x209a82),$=(_0x4cdacf,_0x5faeb4,_0x5a2e16)=>ne(_0x4cdacf,typeof _0x5faeb4!=_0x1d302e(0x196)?_0x5faeb4+'':_0x5faeb4,_0x5a2e16);let b=class extends _0x14328e{constructor(_0x476217=M,_0x32d012,_0x14ec37){const _0x547139=_0x1d302e;super(),this['_config']=_0x476217,this[_0x547139(0x17f)]=_0x32d012,this['_configService']=_0x14ec37;const {..._0xf8bb6c}=_0x7f9811({},M,this['_config']);this[_0x547139(0x153)][_0x547139(0x18b)](z,_0xf8bb6c);}[_0x1d302e(0x193)](){const _0x3dc5d3=_0x1d302e;[[f],[g],[S]][_0x3dc5d3(0x150)](_0xf7d2ce=>{const _0x271ffa=_0x3dc5d3;this[_0x271ffa(0x17f)]['add'](_0xf7d2ce);});}['onReady'](){const _0x2af4d0=_0x1d302e;this[_0x2af4d0(0x17f)]['get'](g),this[_0x2af4d0(0x17f)][_0x2af4d0(0x199)](S);}};$(b,_0x1d302e(0x167),W),$(b,_0x1d302e(0x145),_0x1d77ae['UNIVER_UNKNOWN']),b=ie([_0x1a2e8d(_0x1de634,_0x1dcdc4,_0x4d8b32),w(0x1,_0x768f6c(_0x3c3e98)),w(0x2,_0x2bfd3c)],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 _0x1d302e=_0x1e2f;(function(_0x1fc926,_0x3b0f4c){const _0x3318d7=_0x1e2f,_0x341fd4=_0x1fc926();while(!![]){try{const _0x196724=-parseInt(_0x3318d7(0x144))/0x1+-parseInt(_0x3318d7(0x165))/0x2+-parseInt(_0x3318d7(0x19a))/0x3+-parseInt(_0x3318d7(0x182))/0x4*(-parseInt(_0x3318d7(0x14d))/0x5)+-parseInt(_0x3318d7(0x19e))/0x6+-parseInt(_0x3318d7(0x187))/0x7*(-parseInt(_0x3318d7(0x184))/0x8)+parseInt(_0x3318d7(0x14e))/0x9;if(_0x196724===_0x3b0f4c)break;else _0x341fd4['push'](_0x341fd4['shift']());}catch(_0x1c55eb){_0x341fd4['push'](_0x341fd4['shift']());}}}(_0x13fb,0x86d7b));import{CommentService as _0x4e0010,CollaborationSessionService as _0x220aff,UniverCollaborationClientPlugin as _0x1dcdc4}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4d8b32}from'@univerjs-pro/license';import{dayjs as _0x1237a9,UserManagerService as _0x330e6e,Inject as _0x768f6c,Injector as _0x3c3e98,Disposable as _0x6596eb,CustomRangeType as _0x1139a9,UniverInstanceType as _0x1d77ae,DependentOn as _0x1a2e8d,IConfigService as _0x2bfd3c,Plugin as _0x14328e,merge as _0x7f9811}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1de634}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x32fa12,IThreadCommentDataSourceService as _0x57ecc3}from'@univerjs/thread-comment';import{bufferTime as _0x4f0216}from'rxjs';import{HTTPService as _0x130cb1}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5e9b61=>(_0x5e9b61[_0x5e9b61[_0x1d302e(0x171)]=0x0]=_0x1d302e(0x171),_0x5e9b61[_0x5e9b61[_0x1d302e(0x176)]=0x1]=_0x1d302e(0x176),_0x5e9b61[_0x5e9b61[_0x1d302e(0x157)]=-0x1]=_0x1d302e(0x157),_0x5e9b61))(I||{}),v=(_0x4f044f=>(_0x4f044f[_0x4f044f[_0x1d302e(0x174)]=0x0]=_0x1d302e(0x174),_0x4f044f[_0x4f044f[_0x1d302e(0x156)]=0x1]=_0x1d302e(0x156),_0x4f044f[_0x4f044f[_0x1d302e(0x190)]=0x2]='Reply',_0x4f044f[_0x4f044f['Edit']=0x3]=_0x1d302e(0x168),_0x4f044f[_0x4f044f[_0x1d302e(0x16e)]=0x4]=_0x1d302e(0x16e),_0x4f044f[_0x4f044f[_0x1d302e(0x16a)]=0x5]=_0x1d302e(0x16a),_0x4f044f[_0x4f044f[_0x1d302e(0x157)]=-0x1]=_0x1d302e(0x157),_0x4f044f))(v||{});const D=_0x529f43=>_0x1237a9(new Date(+_0x529f43))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x228784,_0x32208a)=>{const _0x4e43c9=_0x1d302e,_0x51ac74=_0x228784[_0x4e43c9(0x199)](_0x330e6e),_0x177b6e=_0x228784[_0x4e43c9(0x199)](_0x130cb1);_0x32208a[_0x4e43c9(0x150)](_0x385a8d=>{const _0xa7b9eb=_0x4e43c9;_0x51ac74[_0xa7b9eb(0x170)](_0x385a8d)&&_0x32208a[_0xa7b9eb(0x195)](_0x385a8d);}),_0x32208a[_0x4e43c9(0x149)]&&(await _0x177b6e['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x32208a]}}))[_0x4e43c9(0x175)]['users'][_0x4e43c9(0x150)](_0x27d7d6=>{_0x27d7d6&&_0x51ac74['addUser'](_0x27d7d6);});};function _0x1e2f(_0x81746a,_0x592a1b){const _0x13fb74=_0x13fb();return _0x1e2f=function(_0x1e2f6b,_0xfd2e08){_0x1e2f6b=_0x1e2f6b-0x144;let _0x99b005=_0x13fb74[_0x1e2f6b];return _0x99b005;},_0x1e2f(_0x81746a,_0x592a1b);}var K=Object[_0x1d302e(0x16d)],V=(_0x5b5d0f,_0x5ef976,_0x23367e,_0xb7ebe7)=>{const _0x4ba3da=_0x1d302e;for(var _0x24a596=_0xb7ebe7>0x1?void 0x0:_0xb7ebe7?K(_0x5ef976,_0x23367e):_0x5ef976,_0x4d3aa6=_0x5b5d0f[_0x4ba3da(0x148)]-0x1,_0x198c96;_0x4d3aa6>=0x0;_0x4d3aa6--)(_0x198c96=_0x5b5d0f[_0x4d3aa6])&&(_0x24a596=_0x198c96(_0x24a596)||_0x24a596);return _0x24a596;},p=(_0x243097,_0x10e5b8)=>(_0x7985,_0x59d60c)=>_0x10e5b8(_0x7985,_0x59d60c,_0x243097);let S=class extends _0x6596eb{constructor(_0x1d252e,_0x19ddb4,_0x3f97d8,_0x16b8ba){const _0x3b6b8c=_0x1d302e;super(),this['_commentService']=_0x1d252e,this[_0x3b6b8c(0x169)]=_0x19ddb4,this['_userService']=_0x3f97d8,this['_injector']=_0x16b8ba,this[_0x3b6b8c(0x16b)](),this[_0x3b6b8c(0x146)]();}[_0x1d302e(0x146)](){const _0x56684d=_0x1d302e;this[_0x56684d(0x14f)](this[_0x56684d(0x169)]['commentUpdate$'][_0x56684d(0x18c)](_0x4f0216(0x10))[_0x56684d(0x197)](_0x145531=>{const _0x3a897d=_0x56684d,_0x4732e8=new Set();_0x145531[_0x3a897d(0x150)](_0x7f31bc=>{const _0xe63097=_0x3a897d;switch(_0x7f31bc[_0xe63097(0x145)]){case _0xe63097(0x15f):{const _0x1b44bb=_0x7f31bc[_0xe63097(0x17c)][_0xe63097(0x180)];_0x4732e8[_0xe63097(0x15f)](_0x1b44bb);break;}}}),B(this[_0x3a897d(0x17f)],_0x4732e8);}));}[_0x1d302e(0x16b)](){const _0x5527fe=_0x1d302e;this[_0x5527fe(0x14f)](this[_0x5527fe(0x159)][_0x5527fe(0x14b)][_0x5527fe(0x197)](async _0x24f079=>{const _0x5c26fe=_0x5527fe;var _0x3522d3,_0x382a0c,_0x13897c,_0x458fea;const _0x2e3285=(_0x3522d3=this['_threadCommentModel'][_0x5c26fe(0x158)](_0x24f079['unitId'])[_0x5c26fe(0x16f)](_0x10fb90=>_0x10fb90['threadId']===_0x24f079['threadId']))==null?void 0x0:_0x3522d3['root'];if(!_0x2e3285)return;const {unitId:_0x2eb054,subUnitId:_0x3cb463}=_0x2e3285;switch(_0x24f079[_0x5c26fe(0x194)]&&this[_0x5c26fe(0x186)]['addUser'](_0x24f079[_0x5c26fe(0x194)]),_0x24f079[_0x5c26fe(0x145)]){case v[_0x5c26fe(0x156)]:break;case v[_0x5c26fe(0x190)]:{this[_0x5c26fe(0x169)]['addComment'](_0x2eb054,_0x3cb463,{'unitId':_0x2eb054,'subUnitId':_0x3cb463,'ref':'','id':_0x24f079[_0x5c26fe(0x163)],'dT':D(+_0x24f079[_0x5c26fe(0x181)]),'threadId':_0x24f079[_0x5c26fe(0x18f)],'personId':(_0x13897c=(_0x382a0c=_0x24f079[_0x5c26fe(0x194)])==null?void 0x0:_0x382a0c[_0x5c26fe(0x1a0)])!=null?_0x13897c:_0x24f079[_0x5c26fe(0x164)],'text':JSON['parse'](_0x24f079['content']),'parentId':_0x2e3285['id']});break;}case v['Delete']:{const _0x135494=this[_0x5c26fe(0x169)][_0x5c26fe(0x17e)](_0x2eb054,_0x3cb463,_0x24f079[_0x5c26fe(0x163)]);_0x135494&&_0x135494[_0x5c26fe(0x155)]&&this[_0x5c26fe(0x169)][_0x5c26fe(0x16c)](_0x2eb054,_0x3cb463,_0x24f079[_0x5c26fe(0x163)]);break;}case v[_0x5c26fe(0x168)]:{this['_threadCommentModel']['updateComment'](_0x2eb054,_0x3cb463,{'commentId':_0x24f079[_0x5c26fe(0x163)],'text':JSON['parse'](_0x24f079['content'])});break;}case v[_0x5c26fe(0x16a)]:{const _0x2b6c60=(_0x458fea=this[_0x5c26fe(0x169)][_0x5c26fe(0x158)](_0x24f079[_0x5c26fe(0x188)])[_0x5c26fe(0x16f)](_0x27b965=>_0x27b965['threadId']===_0x24f079['threadId']))==null?void 0x0:_0x458fea['root'];_0x2b6c60&&this['_threadCommentModel']['resolveComment'](_0x2eb054,_0x3cb463,_0x2b6c60['id'],_0x24f079[_0x5c26fe(0x147)]===I[_0x5c26fe(0x176)]);break;}}}));}};S=V([p(0x0,_0x768f6c(_0x4e0010)),p(0x1,_0x768f6c(_0x32fa12)),p(0x2,_0x768f6c(_0x330e6e)),p(0x3,_0x768f6c(_0x3c3e98))],S);const z=_0x1d302e(0x15a),M={};var k=Object[_0x1d302e(0x16d)],Q=(_0x3f6b5d,_0x30ec78,_0x5124d9,_0xe07f02)=>{const _0x418084=_0x1d302e;for(var _0x565ffe=_0xe07f02>0x1?void 0x0:_0xe07f02?k(_0x30ec78,_0x5124d9):_0x30ec78,_0x48a9fa=_0x3f6b5d[_0x418084(0x148)]-0x1,_0xba9bca;_0x48a9fa>=0x0;_0x48a9fa--)(_0xba9bca=_0x3f6b5d[_0x48a9fa])&&(_0x565ffe=_0xba9bca(_0x565ffe)||_0x565ffe);return _0x565ffe;},_=(_0x20c738,_0x53225d)=>(_0x3fcb31,_0x40ada7)=>_0x53225d(_0x3fcb31,_0x40ada7,_0x20c738);function X(_0x623bb5,_0x392986){const _0x4d7fef=_0x1d302e,_0x39685a=_0x623bb5[_0x4d7fef(0x15b)][0x0];return{..._0x392986,'id':_0x39685a[_0x4d7fef(0x163)],'resolved':_0x623bb5['solved']===0x1,'dT':D(_0x39685a['createTimestamp']),'personId':_0x39685a['userId'],'threadId':_0x39685a[_0x4d7fef(0x18f)]};}function ee(_0x421e28,_0x140d4a,_0xe3ba42){const _0x2241e8=_0x1d302e;var _0x28c1cb,_0x5ec6a0;if(((_0x5ec6a0=(_0x28c1cb=_0x421e28==null?void 0x0:_0x421e28[_0x2241e8(0x15b)])==null?void 0x0:_0x28c1cb['length'])!=null?_0x5ec6a0:0x0)>0x0){const _0x7efdc2=(_0x1225c0,_0x2d0853)=>({'id':_0x1225c0[_0x2241e8(0x163)],'threadId':_0x1225c0[_0x2241e8(0x18f)],'dT':D(_0x1225c0['createTimestamp']),'personId':_0x1225c0[_0x2241e8(0x164)],'resolved':_0x421e28['solved']===I[_0x2241e8(0x176)],'unitId':_0x140d4a,'subUnitId':_0xe3ba42,'text':JSON[_0x2241e8(0x177)](_0x1225c0[_0x2241e8(0x191)]),'parentId':_0x2d0853}),_0x1d572a=_0x7efdc2(_0x421e28['replies'][0x0]);return{..._0x1d572a,'children':_0x421e28[_0x2241e8(0x15b)]['slice'](0x1)[_0x2241e8(0x183)](_0x21ab79=>_0x7efdc2(_0x21ab79,_0x1d572a['id']))};}return null;}let f=class{constructor(_0x1ffbb7,_0xb34232,_0x467f1f,_0x1f695a){const _0x5e7819=_0x1d302e;this['_httpService']=_0x1ffbb7,this[_0x5e7819(0x186)]=_0xb34232,this['_sessionService']=_0x467f1f,this['_injector']=_0x1f695a;}async[_0x1d302e(0x178)](_0x36c8c9){const _0x44fba1=_0x1d302e;var _0x4fcbff,_0x3c3e6e;const {parentId:_0xa76e45,unitId:_0x2ef2dc,text:_0x5889ee,threadId:_0xc8ac93}=_0x36c8c9,_0x5df288=(_0x3c3e6e=(_0x4fcbff=_0x5889ee['customRanges'])==null?void 0x0:_0x4fcbff[_0x44fba1(0x14a)](_0x9e57b8=>_0x9e57b8[_0x44fba1(0x19b)]===_0x1139a9[_0x44fba1(0x15c)])[_0x44fba1(0x183)](_0x2e23fa=>_0x2e23fa['rangeId']))!=null?_0x3c3e6e:[],_0x1c0d34=JSON[_0x44fba1(0x14c)](_0x5889ee),_0x2207a4=(await this[_0x44fba1(0x17b)]['requireSession'](_0x2ef2dc))[_0x44fba1(0x151)]();if(_0xa76e45){const _0x614378={'memberId':_0x2207a4,'unitId':_0x2ef2dc,'content':_0x1c0d34,'mention':_0x5df288,'threadId':_0xc8ac93},_0x3d9d71=(await this[_0x44fba1(0x18d)][_0x44fba1(0x152)](_0x44fba1(0x198)+_0x2ef2dc+_0x44fba1(0x189),{'body':_0x614378}))[_0x44fba1(0x175)]['reply'];return{..._0x36c8c9,'id':_0x3d9d71[_0x44fba1(0x163)],'dT':_0x1237a9(+_0x3d9d71[_0x44fba1(0x181)])['format'](_0x44fba1(0x179)),'personId':_0x3d9d71['userId']};}else{const _0x3e1269={'memberId':_0x2207a4,'unitId':_0x2ef2dc,'content':_0x1c0d34,'mention':_0x5df288},_0x482aa2=await this[_0x44fba1(0x18d)]['post'](_0x44fba1(0x198)+_0x2ef2dc+'/add',{'body':_0x3e1269});return X(_0x482aa2[_0x44fba1(0x175)]['comment'],_0x36c8c9);}}async['updateComment'](_0x1c763a){const _0xf12c=_0x1d302e;var _0x551dd1,_0x13b02a;const {text:_0x1fb226,unitId:_0x5c645e}=_0x1c763a,_0x35f3c0=(_0x13b02a=(_0x551dd1=_0x1fb226['customRanges'])==null?void 0x0:_0x551dd1['filter'](_0x4c845e=>_0x4c845e[_0xf12c(0x19b)]===_0x1139a9[_0xf12c(0x15c)])[_0xf12c(0x183)](_0x1d344a=>_0x1d344a['rangeId']))!=null?_0x13b02a:[],_0x543678=JSON[_0xf12c(0x14c)](_0x1fb226),_0x49c028=_0x1c763a[_0xf12c(0x18f)],_0x376635=_0x1c763a['id'],_0x5e12bd={'memberId':(await this[_0xf12c(0x17b)][_0xf12c(0x192)](_0x5c645e))[_0xf12c(0x151)](),'unitId':_0x5c645e,'threadId':_0x49c028,'mention':_0x35f3c0,'content':_0x543678,'replyId':_0x376635},_0x1c7479=await this[_0xf12c(0x18d)]['post'](_0xf12c(0x198)+_0x5c645e+_0xf12c(0x15e),{'body':_0x5e12bd});return!_0x1c7479['body']['error']||_0x1c7479[_0xf12c(0x175)][_0xf12c(0x173)][_0xf12c(0x161)]===0x1;}async[_0x1d302e(0x15d)](_0x47e32d){const _0x5dd3ff=_0x1d302e,{unitId:_0x26640e}=_0x47e32d,_0x39e6c7=_0x47e32d['threadId'],_0x273242={'memberId':this['_userService']['getCurrentUser']()[_0x5dd3ff(0x1a0)],'unitId':_0x26640e,'threadId':_0x39e6c7,'solved':_0x47e32d[_0x5dd3ff(0x19f)]?I[_0x5dd3ff(0x176)]:I[_0x5dd3ff(0x171)]},_0x2c8223=await this['_httpService'][_0x5dd3ff(0x152)](_0x5dd3ff(0x198)+_0x26640e+_0x5dd3ff(0x18a),{'body':_0x273242});return!_0x2c8223['body']['error']||_0x2c8223[_0x5dd3ff(0x175)][_0x5dd3ff(0x173)][_0x5dd3ff(0x161)]===0x1;}async[_0x1d302e(0x16c)](_0x43c5a3,_0x5dd986,_0x1c1e4d,_0x572ebe){const _0x5e668c=_0x1d302e,_0x7d82ad={'memberId':(await this[_0x5e668c(0x17b)][_0x5e668c(0x192)](_0x43c5a3))[_0x5e668c(0x151)](),'threadId':_0x1c1e4d,'replyId':_0x572ebe,'unitId':_0x43c5a3},_0x5116df=await this['_httpService'][_0x5e668c(0x152)]('/universer-api/comment/unit/'+_0x43c5a3+_0x5e668c(0x19c),{'body':_0x7d82ad});return!_0x5116df['body'][_0x5e668c(0x173)]||_0x5116df[_0x5e668c(0x175)][_0x5e668c(0x173)][_0x5e668c(0x161)]===0x1;}async[_0x1d302e(0x166)](_0x510ca9,_0x197e9d,_0x18fbda){const _0x4cd19f=_0x1d302e,_0x3483e4={'unitId':_0x510ca9,'threadId':_0x18fbda},_0x4e1716=await this[_0x4cd19f(0x18d)][_0x4cd19f(0x152)]('/universer-api/comment/unit/'+_0x510ca9+_0x4cd19f(0x1a1),{'body':_0x3483e4}),_0x2295f2=_0x18fbda[_0x4cd19f(0x183)](_0x13ed2e=>ee(_0x4e1716[_0x4cd19f(0x175)]['comments'][_0x13ed2e],_0x510ca9,_0x197e9d))['filter'](Boolean);return Object['values'](_0x4e1716[_0x4cd19f(0x175)]['users'])[_0x4cd19f(0x150)](_0x4fad1b=>{const _0x27da98=_0x4cd19f;this[_0x27da98(0x186)][_0x27da98(0x160)](_0x4fad1b);}),_0x2295f2;}[_0x1d302e(0x172)](_0x2095b6){const _0x452969=_0x1d302e;return{'id':_0x2095b6['id'],'threadId':_0x2095b6['threadId'],'ref':_0x2095b6[_0x452969(0x185)]};}};f=Q([_(0x0,_0x768f6c(_0x130cb1)),_(0x1,_0x768f6c(_0x330e6e)),_(0x2,_0x768f6c(_0x220aff)),_(0x3,_0x768f6c(_0x3c3e98))],f);var re=Object[_0x1d302e(0x16d)],te=(_0x2e7b,_0x2df40c,_0x4f1bec,_0x3105b4)=>{const _0x535f40=_0x1d302e;for(var _0x52c833=_0x3105b4>0x1?void 0x0:_0x3105b4?re(_0x2df40c,_0x4f1bec):_0x2df40c,_0xd7a2fc=_0x2e7b[_0x535f40(0x148)]-0x1,_0x48c2cf;_0xd7a2fc>=0x0;_0xd7a2fc--)(_0x48c2cf=_0x2e7b[_0xd7a2fc])&&(_0x52c833=_0x48c2cf(_0x52c833)||_0x52c833);return _0x52c833;},N=(_0x3e0918,_0x14c97d)=>(_0x224dc6,_0xe4ab1)=>_0x14c97d(_0x224dc6,_0xe4ab1,_0x3e0918);let g=class extends _0x6596eb{constructor(_0x1a0f71,_0x3db004){const _0x36d92c=_0x1d302e;super(),this[_0x36d92c(0x18e)]=_0x1a0f71,this[_0x36d92c(0x17a)]=_0x3db004,this[_0x36d92c(0x162)]();}[_0x1d302e(0x162)](){const _0x35becd=_0x1d302e;this[_0x35becd(0x18e)][_0x35becd(0x19d)]=this[_0x35becd(0x17a)],this['_threadCommentDataSourceService'][_0x35becd(0x17d)]=!0x1;}};g=te([N(0x0,_0x57ecc3),N(0x1,_0x768f6c(f))],g);function _0x13fb(){const _0x44903c=['userId','1903138nnxJMP','listComments','pluginName','Edit','_threadCommentModel','Solve','_init','deleteComment','getOwnPropertyDescriptor','Delete','find','getUser','OpenOrReOpen','saveCommentToSnapshot','error','Unknown','body','Solved','parse','addComment','YYYY/MM/DD\x20HH:mm','_threadCommentDataSource','_sessionService','payload','syncUpdateMutationToColla','getComment','_injector','personId','createTimestamp','4ePWKUE','map','4365640WalMVK','ref','_userService','7VGzCCS','unitId','/reply','/solved','setConfig','pipe','_httpService','_threadCommentDataSourceService','threadId','Reply','content','requireSession','onStarting','user','delete','symbol','subscribe','/universer-api/comment/unit/','get','884583NvQggC','rangeType','/delete','dataSource','5465184QpaTRI','resolved','userID','/list','68712eysXIS','type','_initUserSync','solved','length','size','filter','commentUpdate$','stringify','1513390UGPpid','17369442DcosuM','disposeWithMe','forEach','getMemberID','post','_configService','defineProperty','parentId','Add','UNRECOGNIZED','getUnit','_commentService','thread-comment-data-source.config','replies','COMMENT','resolveComment','/edit','add','addUser','code','_initDataSource','replyId'];_0x13fb=function(){return _0x44903c;};return _0x13fb();}var se=Object[_0x1d302e(0x154)],oe=Object[_0x1d302e(0x16d)],ne=(_0xd27e82,_0x432fba,_0x36085e)=>_0x432fba in _0xd27e82?se(_0xd27e82,_0x432fba,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x36085e}):_0xd27e82[_0x432fba]=_0x36085e,ie=(_0x5a8c6b,_0x15b351,_0x5145fd,_0x5e0fce)=>{const _0x4e8d47=_0x1d302e;for(var _0x1000b8=_0x5e0fce>0x1?void 0x0:_0x5e0fce?oe(_0x15b351,_0x5145fd):_0x15b351,_0x3377cf=_0x5a8c6b[_0x4e8d47(0x148)]-0x1,_0x14ad20;_0x3377cf>=0x0;_0x3377cf--)(_0x14ad20=_0x5a8c6b[_0x3377cf])&&(_0x1000b8=_0x14ad20(_0x1000b8)||_0x1000b8);return _0x1000b8;},w=(_0x209a82,_0x354ee0)=>(_0x33b192,_0x234dc8)=>_0x354ee0(_0x33b192,_0x234dc8,_0x209a82),$=(_0x4cdacf,_0x5faeb4,_0x5a2e16)=>ne(_0x4cdacf,typeof _0x5faeb4!=_0x1d302e(0x196)?_0x5faeb4+'':_0x5faeb4,_0x5a2e16);let b=class extends _0x14328e{constructor(_0x476217=M,_0x32d012,_0x14ec37){const _0x547139=_0x1d302e;super(),this['_config']=_0x476217,this[_0x547139(0x17f)]=_0x32d012,this['_configService']=_0x14ec37;const {..._0xf8bb6c}=_0x7f9811({},M,this['_config']);this[_0x547139(0x153)][_0x547139(0x18b)](z,_0xf8bb6c);}[_0x1d302e(0x193)](){const _0x3dc5d3=_0x1d302e;[[f],[g],[S]][_0x3dc5d3(0x150)](_0xf7d2ce=>{const _0x271ffa=_0x3dc5d3;this[_0x271ffa(0x17f)]['add'](_0xf7d2ce);});}['onReady'](){const _0x2af4d0=_0x1d302e;this[_0x2af4d0(0x17f)]['get'](g),this[_0x2af4d0(0x17f)][_0x2af4d0(0x199)](S);}};$(b,_0x1d302e(0x167),W),$(b,_0x1d302e(0x145),_0x1d77ae['UNIVER_UNKNOWN']),b=ie([_0x1a2e8d(_0x1de634,_0x1dcdc4,_0x4d8b32),w(0x1,_0x768f6c(_0x3c3e98)),w(0x2,_0x2bfd3c)],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 _0x25fe(){const _0x10db70=['CustomRangeType','_init','@univerjs/network','/universer-api/comment/unit/','function','1798aGzFXE','customRanges','Disposable','_config','disposeWithMe','/add','bufferTime','2326626YwJphK','OpenOrReOpen','payload','requireSession','users','syncUpdateMutationToColla','@univerjs/thread-comment','UniverLicensePlugin','dataSource','UniverProCollaborationClient','comment','UniverThreadCommentDataSourcePlugin','commentUpdate$','error','resolveComment','saveCommentToSnapshot','getMemberID','ref','@univerjs-pro/license','UniverThreadCommentUIPlugin','solved','stringify','getOwnPropertyDescriptor','Solved','exports','/reply','rangeId','forEach','CollaborationSessionService','UniverProThreadCommentDatasource','_sessionService','11006964gnNmvG','@univerjs/thread-comment-ui','UserManagerService','format','COMMENT','reply','parentId','object','getComment','Injector','listComments','7acTGts','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/edit','rangeType','setConfig','user','rxjs','_threadCommentDataSource','UniverThreadCommentUi','addUser','getUser','createTimestamp','IConfigService','_initUserSync','content','Inject','UNRECOGNIZED','resolved','values','map','delete','deleteComment','personId','root','_injector','amd','/solved','Add','addComment','replyId','filter','Unknown','get','userId','1817945mEWvJx','UniverThreadComment','merge','_threadCommentDataSourceService','Plugin','YYYY/MM/DD\x20HH:mm','_threadCommentModel','unitId','HTTPService','type','updateComment','Delete','Solve','1290088ufJEXD','Reply','_httpService','_configService','_commentService','Module','_userService','@univerjs-pro/collaboration-client','slice','DependentOn','userID','Edit','/universer-api/user/list','onReady','post','1942392pMYGEe','parse','@univerjs/core','size','163xLJYYk','add','code','body','length','_initDataSource','5716206pFQBeO','pluginName','threadId','getUnit','IThreadCommentDataSourceService','replies','dayjs','defineProperty'];_0x25fe=function(){return _0x10db70;};return _0x25fe();}function _0x3e29(_0x38c5a5,_0x3ab47a){const _0x25feda=_0x25fe();return _0x3e29=function(_0x3e2974,_0x433da8){_0x3e2974=_0x3e2974-0x143;let _0x2b4a17=_0x25feda[_0x3e2974];return _0x2b4a17;},_0x3e29(_0x38c5a5,_0x3ab47a);}(function(_0x5b5a5d,_0x90a255){const _0x3d89a1=_0x3e29,_0x2ef233=_0x5b5a5d();while(!![]){try{const _0x298082=parseInt(_0x3d89a1(0x17a))/0x1*(parseInt(_0x3d89a1(0x18d))/0x2)+-parseInt(_0x3d89a1(0x194))/0x3+parseInt(_0x3d89a1(0x167))/0x4+parseInt(_0x3d89a1(0x15a))/0x5+-parseInt(_0x3d89a1(0x180))/0x6+-parseInt(_0x3d89a1(0x1be))/0x7*(-parseInt(_0x3d89a1(0x176))/0x8)+parseInt(_0x3d89a1(0x1b3))/0x9;if(_0x298082===_0x90a255)break;else _0x2ef233['push'](_0x2ef233['shift']());}catch(_0x493530){_0x2ef233['push'](_0x2ef233['shift']());}}}(_0x25fe,0x8b358),function(_0x368115,_0x194c62){const _0x7456cf=_0x3e29;typeof exports==_0x7456cf(0x1ba)&&typeof module<'u'?_0x194c62(exports,require('@univerjs-pro/collaboration-client'),require(_0x7456cf(0x1a6)),require(_0x7456cf(0x178)),require(_0x7456cf(0x1b4)),require(_0x7456cf(0x19a)),require(_0x7456cf(0x1c4)),require(_0x7456cf(0x18a))):typeof define==_0x7456cf(0x18c)&&define[_0x7456cf(0x151)]?define([_0x7456cf(0x1ac),_0x7456cf(0x16e),_0x7456cf(0x1a6),_0x7456cf(0x178),_0x7456cf(0x1b4),_0x7456cf(0x19a),_0x7456cf(0x1c4),_0x7456cf(0x18a)],_0x194c62):(_0x368115=typeof globalThis<'u'?globalThis:_0x368115||self,_0x194c62(_0x368115[_0x7456cf(0x1b1)]={},_0x368115[_0x7456cf(0x19d)],_0x368115['UniverProLicense'],_0x368115['UniverCore'],_0x368115[_0x7456cf(0x1c6)],_0x368115[_0x7456cf(0x15b)],_0x368115[_0x7456cf(0x1c4)],_0x368115['UniverNetwork']));}(this,function(_0x2d8bcc,_0x28f217,_0x1856e,_0x246273,_0x4ba1c9,_0x42fda6,_0x3ab731,_0x18347f){'use strict';const _0xbfbb68=_0x3e29;const _0x3db14e=_0xbfbb68(0x1bf);var _0x3a0bd4=(_0x3b8657=>(_0x3b8657[_0x3b8657[_0xbfbb68(0x195)]=0x0]='OpenOrReOpen',_0x3b8657[_0x3b8657['Solved']=0x1]=_0xbfbb68(0x1ab),_0x3b8657[_0x3b8657[_0xbfbb68(0x148)]=-0x1]=_0xbfbb68(0x148),_0x3b8657))(_0x3a0bd4||{}),_0x4c7360=(_0x369f03=>(_0x369f03[_0x369f03[_0xbfbb68(0x157)]=0x0]=_0xbfbb68(0x157),_0x369f03[_0x369f03[_0xbfbb68(0x153)]=0x1]=_0xbfbb68(0x153),_0x369f03[_0x369f03['Reply']=0x2]='Reply',_0x369f03[_0x369f03[_0xbfbb68(0x172)]=0x3]='Edit',_0x369f03[_0x369f03[_0xbfbb68(0x165)]=0x4]='Delete',_0x369f03[_0x369f03[_0xbfbb68(0x166)]=0x5]='Solve',_0x369f03[_0x369f03[_0xbfbb68(0x148)]=-0x1]=_0xbfbb68(0x148),_0x369f03))(_0x4c7360||{});const _0x3b8a25=_0x471489=>_0x246273[_0xbfbb68(0x186)](new Date(+_0x471489))['format'](_0xbfbb68(0x15f)),_0x22e8b8=async(_0x29c91b,_0xc2eac8)=>{const _0x266f50=_0xbfbb68,_0x3537bd=_0x29c91b[_0x266f50(0x158)](_0x246273[_0x266f50(0x1b5)]),_0x1676c7=_0x29c91b[_0x266f50(0x158)](_0x18347f[_0x266f50(0x162)]);_0xc2eac8[_0x266f50(0x1af)](_0x5a7b50=>{const _0x75ff85=_0x266f50;_0x3537bd[_0x75ff85(0x1c8)](_0x5a7b50)&&_0xc2eac8[_0x75ff85(0x14c)](_0x5a7b50);}),_0xc2eac8[_0x266f50(0x179)]&&(await _0x1676c7['get'](_0x266f50(0x173),{'params':{'userIDs':[..._0xc2eac8]}}))[_0x266f50(0x17d)][_0x266f50(0x198)][_0x266f50(0x1af)](_0x4ed60a=>{const _0x6cb27c=_0x266f50;_0x4ed60a&&_0x3537bd[_0x6cb27c(0x1c7)](_0x4ed60a);});};var _0x3fecba=Object[_0xbfbb68(0x1aa)],_0x7e1b9e=(_0x4deb38,_0xa365bc,_0x2412ca,_0x51f396)=>{const _0x37471f=_0xbfbb68;for(var _0x49729e=_0x51f396>0x1?void 0x0:_0x51f396?_0x3fecba(_0xa365bc,_0x2412ca):_0xa365bc,_0x11cb65=_0x4deb38[_0x37471f(0x17e)]-0x1,_0x48b179;_0x11cb65>=0x0;_0x11cb65--)(_0x48b179=_0x4deb38[_0x11cb65])&&(_0x49729e=_0x48b179(_0x49729e)||_0x49729e);return _0x49729e;},_0x54d2e3=(_0x8c64d1,_0x1e42c7)=>(_0x12dba0,_0x512fc0)=>_0x1e42c7(_0x12dba0,_0x512fc0,_0x8c64d1);let _0x43dc89=class extends _0x246273['Disposable']{constructor(_0x1442f2,_0x4a49ae,_0x5b4ad9,_0x3e122e){const _0x1032ce=_0xbfbb68;super(),this['_commentService']=_0x1442f2,this[_0x1032ce(0x160)]=_0x4a49ae,this[_0x1032ce(0x16d)]=_0x5b4ad9,this['_injector']=_0x3e122e,this[_0x1032ce(0x189)](),this[_0x1032ce(0x145)]();}[_0xbfbb68(0x145)](){const _0x45c254=_0xbfbb68;this['disposeWithMe'](this[_0x45c254(0x160)][_0x45c254(0x1a0)]['pipe'](_0x3ab731[_0x45c254(0x193)](0x10))['subscribe'](_0x5e93df=>{const _0x1d99b0=_0x45c254,_0x55789a=new Set();_0x5e93df[_0x1d99b0(0x1af)](_0x2828b9=>{const _0x294cf6=_0x1d99b0;switch(_0x2828b9[_0x294cf6(0x163)]){case _0x294cf6(0x17b):{const _0x3cbb61=_0x2828b9[_0x294cf6(0x196)][_0x294cf6(0x14e)];_0x55789a[_0x294cf6(0x17b)](_0x3cbb61);break;}}}),_0x22e8b8(this[_0x1d99b0(0x150)],_0x55789a);}));}['_init'](){const _0x4caab5=_0xbfbb68;this[_0x4caab5(0x191)](this[_0x4caab5(0x16b)][_0x4caab5(0x1a0)]['subscribe'](async _0x2a7c36=>{const _0x42f5f6=_0x4caab5;var _0x3a6993,_0x3d55d0,_0x3b43f1,_0x374778;const _0x1779eb=(_0x3a6993=this['_threadCommentModel'][_0x42f5f6(0x183)](_0x2a7c36[_0x42f5f6(0x161)])['find'](_0x2f78b0=>_0x2f78b0[_0x42f5f6(0x182)]===_0x2a7c36[_0x42f5f6(0x182)]))==null?void 0x0:_0x3a6993[_0x42f5f6(0x14f)];if(!_0x1779eb)return;const {unitId:_0x18f82c,subUnitId:_0x2a5669}=_0x1779eb;switch(_0x2a7c36[_0x42f5f6(0x1c3)]&&this[_0x42f5f6(0x16d)]['addUser'](_0x2a7c36['user']),_0x2a7c36[_0x42f5f6(0x163)]){case _0x4c7360[_0x42f5f6(0x153)]:break;case _0x4c7360[_0x42f5f6(0x168)]:{this[_0x42f5f6(0x160)]['addComment'](_0x18f82c,_0x2a5669,{'unitId':_0x18f82c,'subUnitId':_0x2a5669,'ref':'','id':_0x2a7c36[_0x42f5f6(0x155)],'dT':_0x3b8a25(+_0x2a7c36[_0x42f5f6(0x143)]),'threadId':_0x2a7c36['threadId'],'personId':(_0x3b43f1=(_0x3d55d0=_0x2a7c36[_0x42f5f6(0x1c3)])==null?void 0x0:_0x3d55d0[_0x42f5f6(0x171)])!=null?_0x3b43f1:_0x2a7c36[_0x42f5f6(0x159)],'text':JSON[_0x42f5f6(0x177)](_0x2a7c36[_0x42f5f6(0x146)]),'parentId':_0x1779eb['id']});break;}case _0x4c7360[_0x42f5f6(0x165)]:{const _0x448fc0=this[_0x42f5f6(0x160)][_0x42f5f6(0x1bb)](_0x18f82c,_0x2a5669,_0x2a7c36[_0x42f5f6(0x155)]);_0x448fc0&&_0x448fc0[_0x42f5f6(0x1b9)]&&this[_0x42f5f6(0x160)][_0x42f5f6(0x14d)](_0x18f82c,_0x2a5669,_0x2a7c36[_0x42f5f6(0x155)]);break;}case _0x4c7360[_0x42f5f6(0x172)]:{this[_0x42f5f6(0x160)][_0x42f5f6(0x164)](_0x18f82c,_0x2a5669,{'commentId':_0x2a7c36['replyId'],'text':JSON['parse'](_0x2a7c36[_0x42f5f6(0x146)])});break;}case _0x4c7360[_0x42f5f6(0x166)]:{const _0x30a558=(_0x374778=this['_threadCommentModel']['getUnit'](_0x2a7c36[_0x42f5f6(0x161)])['find'](_0x59e2fa=>_0x59e2fa[_0x42f5f6(0x182)]===_0x2a7c36['threadId']))==null?void 0x0:_0x374778[_0x42f5f6(0x14f)];_0x30a558&&this[_0x42f5f6(0x160)][_0x42f5f6(0x1a2)](_0x18f82c,_0x2a5669,_0x30a558['id'],_0x2a7c36[_0x42f5f6(0x1a8)]===_0x3a0bd4[_0x42f5f6(0x1ab)]);break;}}}));}};_0x43dc89=_0x7e1b9e([_0x54d2e3(0x0,_0x246273['Inject'](_0x28f217['CommentService'])),_0x54d2e3(0x1,_0x246273[_0xbfbb68(0x147)](_0x42fda6['ThreadCommentModel'])),_0x54d2e3(0x2,_0x246273[_0xbfbb68(0x147)](_0x246273[_0xbfbb68(0x1b5)])),_0x54d2e3(0x3,_0x246273[_0xbfbb68(0x147)](_0x246273[_0xbfbb68(0x1bc)]))],_0x43dc89);const _0x5d590e='thread-comment-data-source.config',_0x3010a9={};var _0x104e8c=Object[_0xbfbb68(0x1aa)],_0x139f50=(_0x36bddd,_0xe9ebd5,_0x5af84b,_0x307c8b)=>{for(var _0x10b735=_0x307c8b>0x1?void 0x0:_0x307c8b?_0x104e8c(_0xe9ebd5,_0x5af84b):_0xe9ebd5,_0x148ef7=_0x36bddd['length']-0x1,_0x38e649;_0x148ef7>=0x0;_0x148ef7--)(_0x38e649=_0x36bddd[_0x148ef7])&&(_0x10b735=_0x38e649(_0x10b735)||_0x10b735);return _0x10b735;},_0x198fc1=(_0x14424c,_0x14bb6f)=>(_0x211058,_0x532dbd)=>_0x14bb6f(_0x211058,_0x532dbd,_0x14424c);function _0x204947(_0xbb3599,_0x45c457){const _0x5ba62f=_0xbfbb68,_0x37d35f=_0xbb3599['replies'][0x0];return{..._0x45c457,'id':_0x37d35f[_0x5ba62f(0x155)],'resolved':_0xbb3599[_0x5ba62f(0x1a8)]===0x1,'dT':_0x3b8a25(_0x37d35f[_0x5ba62f(0x143)]),'personId':_0x37d35f['userId'],'threadId':_0x37d35f['threadId']};}function _0x187e86(_0x103e35,_0x31c1cf,_0x4e5868){const _0x2c3b5e=_0xbfbb68;var _0x77fce1,_0x3e1fed;if(((_0x3e1fed=(_0x77fce1=_0x103e35==null?void 0x0:_0x103e35[_0x2c3b5e(0x185)])==null?void 0x0:_0x77fce1[_0x2c3b5e(0x17e)])!=null?_0x3e1fed:0x0)>0x0){const _0x131aa4=(_0x28da2b,_0x3c363c)=>({'id':_0x28da2b['replyId'],'threadId':_0x28da2b['threadId'],'dT':_0x3b8a25(_0x28da2b[_0x2c3b5e(0x143)]),'personId':_0x28da2b[_0x2c3b5e(0x159)],'resolved':_0x103e35[_0x2c3b5e(0x1a8)]===_0x3a0bd4['Solved'],'unitId':_0x31c1cf,'subUnitId':_0x4e5868,'text':JSON[_0x2c3b5e(0x177)](_0x28da2b['content']),'parentId':_0x3c363c}),_0xf3724f=_0x131aa4(_0x103e35[_0x2c3b5e(0x185)][0x0]);return{..._0xf3724f,'children':_0x103e35['replies'][_0x2c3b5e(0x16f)](0x1)[_0x2c3b5e(0x14b)](_0x488cb5=>_0x131aa4(_0x488cb5,_0xf3724f['id']))};}return null;}let _0x16099b=class{constructor(_0x5968de,_0x55bbee,_0x45f556,_0x15c013){const _0x2bd99e=_0xbfbb68;this[_0x2bd99e(0x169)]=_0x5968de,this['_userService']=_0x55bbee,this[_0x2bd99e(0x1b2)]=_0x45f556,this[_0x2bd99e(0x150)]=_0x15c013;}async[_0xbfbb68(0x154)](_0x16cd77){const _0x45b5be=_0xbfbb68;var _0x457dd8,_0x333c69;const {parentId:_0x2f3697,unitId:_0x242a19,text:_0x970353,threadId:_0x2ec609}=_0x16cd77,_0x27f699=(_0x333c69=(_0x457dd8=_0x970353['customRanges'])==null?void 0x0:_0x457dd8[_0x45b5be(0x156)](_0x783944=>_0x783944[_0x45b5be(0x1c1)]===_0x246273[_0x45b5be(0x188)]['COMMENT'])[_0x45b5be(0x14b)](_0xebde3b=>_0xebde3b['rangeId']))!=null?_0x333c69:[],_0x164f3f=JSON['stringify'](_0x970353),_0x704682=(await this[_0x45b5be(0x1b2)][_0x45b5be(0x197)](_0x242a19))[_0x45b5be(0x1a4)]();if(_0x2f3697){const _0x3c0cb7={'memberId':_0x704682,'unitId':_0x242a19,'content':_0x164f3f,'mention':_0x27f699,'threadId':_0x2ec609},_0x2ddbdf=(await this[_0x45b5be(0x169)][_0x45b5be(0x175)](_0x45b5be(0x18b)+_0x242a19+_0x45b5be(0x1ad),{'body':_0x3c0cb7}))[_0x45b5be(0x17d)][_0x45b5be(0x1b8)];return{..._0x16cd77,'id':_0x2ddbdf[_0x45b5be(0x155)],'dT':_0x246273['dayjs'](+_0x2ddbdf['createTimestamp'])[_0x45b5be(0x1b6)](_0x45b5be(0x15f)),'personId':_0x2ddbdf['userId']};}else{const _0x4313ba={'memberId':_0x704682,'unitId':_0x242a19,'content':_0x164f3f,'mention':_0x27f699},_0x4d3146=await this[_0x45b5be(0x169)]['post'](_0x45b5be(0x18b)+_0x242a19+_0x45b5be(0x192),{'body':_0x4313ba});return _0x204947(_0x4d3146[_0x45b5be(0x17d)][_0x45b5be(0x19e)],_0x16cd77);}}async[_0xbfbb68(0x164)](_0x14dd92){const _0x31c751=_0xbfbb68;var _0x28aa63,_0x897fc0;const {text:_0x7aed7d,unitId:_0x35ea7e}=_0x14dd92,_0x4562df=(_0x897fc0=(_0x28aa63=_0x7aed7d[_0x31c751(0x18e)])==null?void 0x0:_0x28aa63[_0x31c751(0x156)](_0x28ba52=>_0x28ba52[_0x31c751(0x1c1)]===_0x246273[_0x31c751(0x188)][_0x31c751(0x1b7)])['map'](_0x16a2d5=>_0x16a2d5[_0x31c751(0x1ae)]))!=null?_0x897fc0:[],_0x100b38=JSON[_0x31c751(0x1a9)](_0x7aed7d),_0x143d70=_0x14dd92[_0x31c751(0x182)],_0x2fee53=_0x14dd92['id'],_0x5259c7={'memberId':(await this[_0x31c751(0x1b2)]['requireSession'](_0x35ea7e))[_0x31c751(0x1a4)](),'unitId':_0x35ea7e,'threadId':_0x143d70,'mention':_0x4562df,'content':_0x100b38,'replyId':_0x2fee53},_0x2a9539=await this[_0x31c751(0x169)][_0x31c751(0x175)](_0x31c751(0x18b)+_0x35ea7e+_0x31c751(0x1c0),{'body':_0x5259c7});return!_0x2a9539[_0x31c751(0x17d)]['error']||_0x2a9539['body']['error']['code']===0x1;}async[_0xbfbb68(0x1a2)](_0x41ec83){const _0x14925b=_0xbfbb68,{unitId:_0x1187d0}=_0x41ec83,_0x2ac6fc=_0x41ec83['threadId'],_0x5ef55e={'memberId':this['_userService']['getCurrentUser']()[_0x14925b(0x171)],'unitId':_0x1187d0,'threadId':_0x2ac6fc,'solved':_0x41ec83[_0x14925b(0x149)]?_0x3a0bd4[_0x14925b(0x1ab)]:_0x3a0bd4[_0x14925b(0x195)]},_0x127144=await this[_0x14925b(0x169)][_0x14925b(0x175)](_0x14925b(0x18b)+_0x1187d0+_0x14925b(0x152),{'body':_0x5ef55e});return!_0x127144[_0x14925b(0x17d)][_0x14925b(0x1a1)]||_0x127144[_0x14925b(0x17d)][_0x14925b(0x1a1)]['code']===0x1;}async[_0xbfbb68(0x14d)](_0x1ebcce,_0x3a3192,_0x4fe00f,_0x420031){const _0x37a9f9=_0xbfbb68,_0x484d97={'memberId':(await this[_0x37a9f9(0x1b2)][_0x37a9f9(0x197)](_0x1ebcce))[_0x37a9f9(0x1a4)](),'threadId':_0x4fe00f,'replyId':_0x420031,'unitId':_0x1ebcce},_0x2acedc=await this[_0x37a9f9(0x169)][_0x37a9f9(0x175)](_0x37a9f9(0x18b)+_0x1ebcce+'/delete',{'body':_0x484d97});return!_0x2acedc[_0x37a9f9(0x17d)][_0x37a9f9(0x1a1)]||_0x2acedc[_0x37a9f9(0x17d)][_0x37a9f9(0x1a1)][_0x37a9f9(0x17c)]===0x1;}async[_0xbfbb68(0x1bd)](_0x556ed9,_0x414f7f,_0x386fc8){const _0x33ff26=_0xbfbb68,_0x16e4e8={'unitId':_0x556ed9,'threadId':_0x386fc8},_0x16d563=await this['_httpService'][_0x33ff26(0x175)](_0x33ff26(0x18b)+_0x556ed9+'/list',{'body':_0x16e4e8}),_0x592daf=_0x386fc8[_0x33ff26(0x14b)](_0x5b29a1=>_0x187e86(_0x16d563[_0x33ff26(0x17d)]['comments'][_0x5b29a1],_0x556ed9,_0x414f7f))[_0x33ff26(0x156)](Boolean);return Object[_0x33ff26(0x14a)](_0x16d563[_0x33ff26(0x17d)]['users'])[_0x33ff26(0x1af)](_0x5c4a0f=>{const _0x1daf71=_0x33ff26;this[_0x1daf71(0x16d)][_0x1daf71(0x1c7)](_0x5c4a0f);}),_0x592daf;}[_0xbfbb68(0x1a3)](_0x357c35){const _0xee80f6=_0xbfbb68;return{'id':_0x357c35['id'],'threadId':_0x357c35[_0xee80f6(0x182)],'ref':_0x357c35[_0xee80f6(0x1a5)]};}};_0x16099b=_0x139f50([_0x198fc1(0x0,_0x246273['Inject'](_0x18347f[_0xbfbb68(0x162)])),_0x198fc1(0x1,_0x246273[_0xbfbb68(0x147)](_0x246273['UserManagerService'])),_0x198fc1(0x2,_0x246273[_0xbfbb68(0x147)](_0x28f217[_0xbfbb68(0x1b0)])),_0x198fc1(0x3,_0x246273[_0xbfbb68(0x147)](_0x246273[_0xbfbb68(0x1bc)]))],_0x16099b);var _0x38e100=Object[_0xbfbb68(0x1aa)],_0x47b278=(_0x4538a9,_0x3d5b0d,_0x4ecfb4,_0x4213fc)=>{const _0x3b23c0=_0xbfbb68;for(var _0x52a453=_0x4213fc>0x1?void 0x0:_0x4213fc?_0x38e100(_0x3d5b0d,_0x4ecfb4):_0x3d5b0d,_0x2ae433=_0x4538a9[_0x3b23c0(0x17e)]-0x1,_0x331700;_0x2ae433>=0x0;_0x2ae433--)(_0x331700=_0x4538a9[_0x2ae433])&&(_0x52a453=_0x331700(_0x52a453)||_0x52a453);return _0x52a453;},_0x19031f=(_0x297637,_0x10633f)=>(_0x2a2a73,_0x3fe714)=>_0x10633f(_0x2a2a73,_0x3fe714,_0x297637);let _0x59312e=class extends _0x246273[_0xbfbb68(0x18f)]{constructor(_0x4d3b0c,_0x29939b){const _0x5b1119=_0xbfbb68;super(),this[_0x5b1119(0x15d)]=_0x4d3b0c,this[_0x5b1119(0x1c5)]=_0x29939b,this[_0x5b1119(0x17f)]();}[_0xbfbb68(0x17f)](){const _0xa9a5fa=_0xbfbb68;this[_0xa9a5fa(0x15d)][_0xa9a5fa(0x19c)]=this[_0xa9a5fa(0x1c5)],this[_0xa9a5fa(0x15d)][_0xa9a5fa(0x199)]=!0x1;}};_0x59312e=_0x47b278([_0x19031f(0x0,_0x42fda6[_0xbfbb68(0x184)]),_0x19031f(0x1,_0x246273[_0xbfbb68(0x147)](_0x16099b))],_0x59312e);var _0x549dec=Object['defineProperty'],_0x1c2719=Object['getOwnPropertyDescriptor'],_0x421e28=(_0x157f92,_0x478295,_0x5f203d)=>_0x478295 in _0x157f92?_0x549dec(_0x157f92,_0x478295,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5f203d}):_0x157f92[_0x478295]=_0x5f203d,_0xc67b25=(_0x22e733,_0x27c052,_0x105951,_0x2f81ac)=>{const _0x4be5e5=_0xbfbb68;for(var _0x405d79=_0x2f81ac>0x1?void 0x0:_0x2f81ac?_0x1c2719(_0x27c052,_0x105951):_0x27c052,_0x1066f1=_0x22e733[_0x4be5e5(0x17e)]-0x1,_0x30ce24;_0x1066f1>=0x0;_0x1066f1--)(_0x30ce24=_0x22e733[_0x1066f1])&&(_0x405d79=_0x30ce24(_0x405d79)||_0x405d79);return _0x405d79;},_0x2ac3e0=(_0x226876,_0x2c74fb)=>(_0x429d95,_0x27d162)=>_0x2c74fb(_0x429d95,_0x27d162,_0x226876),_0x16ff9e=(_0x3a644c,_0x1819a4,_0x2fcdb2)=>_0x421e28(_0x3a644c,typeof _0x1819a4!='symbol'?_0x1819a4+'':_0x1819a4,_0x2fcdb2);_0x2d8bcc[_0xbfbb68(0x19f)]=class extends _0x246273[_0xbfbb68(0x15e)]{constructor(_0x49213a=_0x3010a9,_0x1ce026,_0x25f2ca){const _0x128759=_0xbfbb68;super(),this[_0x128759(0x190)]=_0x49213a,this[_0x128759(0x150)]=_0x1ce026,this[_0x128759(0x16a)]=_0x25f2ca;const {..._0x1e1bec}=_0x246273[_0x128759(0x15c)]({},_0x3010a9,this[_0x128759(0x190)]);this[_0x128759(0x16a)][_0x128759(0x1c2)](_0x5d590e,_0x1e1bec);}['onStarting'](){const _0x587b3e=_0xbfbb68;[[_0x16099b],[_0x59312e],[_0x43dc89]][_0x587b3e(0x1af)](_0xf5d9af=>{const _0x299a28=_0x587b3e;this[_0x299a28(0x150)][_0x299a28(0x17b)](_0xf5d9af);});}[_0xbfbb68(0x174)](){const _0x4cd53c=_0xbfbb68;this['_injector'][_0x4cd53c(0x158)](_0x59312e),this[_0x4cd53c(0x150)]['get'](_0x43dc89);}},_0x16ff9e(_0x2d8bcc['UniverThreadCommentDataSourcePlugin'],_0xbfbb68(0x181),_0x3db14e),_0x16ff9e(_0x2d8bcc[_0xbfbb68(0x19f)],_0xbfbb68(0x163),_0x246273['UniverInstanceType']['UNIVER_UNKNOWN']),_0x2d8bcc[_0xbfbb68(0x19f)]=_0xc67b25([_0x246273[_0xbfbb68(0x170)](_0x4ba1c9[_0xbfbb68(0x1a7)],_0x28f217['UniverCollaborationClientPlugin'],_0x1856e[_0xbfbb68(0x19b)]),_0x2ac3e0(0x1,_0x246273['Inject'](_0x246273['Injector'])),_0x2ac3e0(0x2,_0x246273[_0xbfbb68(0x144)])],_0x2d8bcc[_0xbfbb68(0x19f)]),Object[_0xbfbb68(0x187)](_0x2d8bcc,Symbol['toStringTag'],{'value':_0xbfbb68(0x16c)});}));
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.1",
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.1",
49
+ "@univerjs-pro/license": "0.8.0-beta.1",
50
+ "@univerjs/core": "0.8.0-beta.1",
51
+ "@univerjs/thread-comment": "0.8.0-beta.1",
52
+ "@univerjs/network": "0.8.0-beta.1",
53
+ "@univerjs/protocol": "0.1.47-alpha.0",
54
+ "@univerjs/thread-comment-ui": "0.8.0-beta.1"
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.1"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",