@univerjs-pro/thread-comment-datasource 0.7.0 → 0.8.0-nightly.202505261607

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 _0x3c8b66=_0x5db2;(function(_0x3f731d,_0x3441a2){const _0x398a16=_0x5db2,_0x1f59f7=_0x3f731d();while(!![]){try{const _0x2f7d38=-parseInt(_0x398a16(0x1a3))/0x1+parseInt(_0x398a16(0x142))/0x2*(parseInt(_0x398a16(0x1b7))/0x3)+parseInt(_0x398a16(0x144))/0x4*(parseInt(_0x398a16(0x162))/0x5)+-parseInt(_0x398a16(0x155))/0x6*(parseInt(_0x398a16(0x1a6))/0x7)+parseInt(_0x398a16(0x180))/0x8+parseInt(_0x398a16(0x182))/0x9+-parseInt(_0x398a16(0x1b0))/0xa*(parseInt(_0x398a16(0x192))/0xb);if(_0x2f7d38===_0x3441a2)break;else _0x1f59f7['push'](_0x1f59f7['shift']());}catch(_0x254243){_0x1f59f7['push'](_0x1f59f7['shift']());}}}(_0x415c,0xb0183));Object[_0x3c8b66(0x1a4)](exports,Symbol[_0x3c8b66(0x1ad)],{'value':_0x3c8b66(0x1c0)});const b=require(_0x3c8b66(0x1b1)),T=require(_0x3c8b66(0x169)),c=require(_0x3c8b66(0x174)),j=require(_0x3c8b66(0x146)),M=require(_0x3c8b66(0x17e)),w=require(_0x3c8b66(0x14d)),P=require(_0x3c8b66(0x1a9)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0x415c(){const _0x1611a1=['getOwnPropertyDescriptor','userId','forEach','1137twtnHb','/solved','listComments','/list','/universer-api/comment/unit/','filter','_config','Edit','add','Module','users','/edit','slice','_injector','user','Add','2186YFcoss','CustomRangeType','109148Bjprpf','replyId','@univerjs/thread-comment-ui','find','get','rangeId','_sessionService','stringify','Reply','rxjs','UniverThreadCommentUIPlugin','body','parse','saveCommentToSnapshot','Delete','_configService','disposeWithMe','3673974rAPvNA','commentUpdate$','_threadCommentDataSource','pipe','CommentService','UniverCollaborationClientPlugin','IConfigService','code','requireSession','error','Inject','comment','symbol','235IsYDif','Solve','userID','format','root','resolveComment','_threadCommentModel','@univerjs-pro/license','Unknown','Disposable','pluginName','length','addUser','_initUserSync','Solved','_userService','UNRECOGNIZED','DependentOn','@univerjs/core','Injector','onReady','_commentService','addComment','bufferTime','unitId','replies','map','solved','@univerjs/thread-comment','rangeType','4163928miYGPV','getMemberID','2381994ZHpcrn','setConfig','HTTPService','size','ref','type','getCurrentUser','updateComment','content','dayjs','UniverLicensePlugin','personId','Plugin','UniverThreadCommentDataSourcePlugin','post','subscribe','11MBZgvd','customRanges','resolved','getUser','_threadCommentDataSourceService','_initDataSource','_init','/delete','createTimestamp','onStarting','getUnit','COMMENT','OpenOrReOpen','YYYY/MM/DD\x20HH:mm','UserManagerService','ThreadCommentModel','UniverInstanceType','147588fSIQxp','defineProperty','UNIVER_UNKNOWN','7ybXphP','threadId','merge','@univerjs/network','delete','payload','deleteComment','toStringTag','/add','dataSource','10006930VdSfYv','@univerjs-pro/collaboration-client','values','_httpService'];_0x415c=function(){return _0x1611a1;};return _0x415c();}var I=(_0x2a23f2=>(_0x2a23f2[_0x2a23f2['OpenOrReOpen']=0x0]=_0x3c8b66(0x19e),_0x2a23f2[_0x2a23f2[_0x3c8b66(0x170)]=0x1]='Solved',_0x2a23f2[_0x2a23f2[_0x3c8b66(0x172)]=-0x1]='UNRECOGNIZED',_0x2a23f2))(I||{}),v=(_0x24ffea=>(_0x24ffea[_0x24ffea[_0x3c8b66(0x16a)]=0x0]=_0x3c8b66(0x16a),_0x24ffea[_0x24ffea[_0x3c8b66(0x141)]=0x1]=_0x3c8b66(0x141),_0x24ffea[_0x24ffea['Reply']=0x2]=_0x3c8b66(0x14c),_0x24ffea[_0x24ffea[_0x3c8b66(0x1be)]=0x3]='Edit',_0x24ffea[_0x24ffea['Delete']=0x4]=_0x3c8b66(0x152),_0x24ffea[_0x24ffea[_0x3c8b66(0x163)]=0x5]=_0x3c8b66(0x163),_0x24ffea[_0x24ffea[_0x3c8b66(0x172)]=-0x1]=_0x3c8b66(0x172),_0x24ffea))(v||{});const f=_0x5cb5b9=>c[_0x3c8b66(0x18b)](new Date(+_0x5cb5b9))[_0x3c8b66(0x165)](_0x3c8b66(0x19f)),R=async(_0x57f7e4,_0xdf846)=>{const _0xa0693b=_0x3c8b66,_0x17a03c=_0x57f7e4[_0xa0693b(0x148)](c[_0xa0693b(0x1a0)]),_0x37ec19=_0x57f7e4['get'](P[_0xa0693b(0x184)]);_0xdf846[_0xa0693b(0x1b6)](_0x2f7ca4=>{const _0x165c4c=_0xa0693b;_0x17a03c[_0x165c4c(0x195)](_0x2f7ca4)&&_0xdf846[_0x165c4c(0x1aa)](_0x2f7ca4);}),_0xdf846[_0xa0693b(0x185)]&&(await _0x37ec19[_0xa0693b(0x148)]('/universer-api/user/list',{'params':{'userIDs':[..._0xdf846]}}))[_0xa0693b(0x14f)][_0xa0693b(0x1c1)][_0xa0693b(0x1b6)](_0x3a2234=>{const _0x246f0f=_0xa0693b;_0x3a2234&&_0x17a03c[_0x246f0f(0x16e)](_0x3a2234);});};var $=Object[_0x3c8b66(0x1b4)],E=(_0x321705,_0x1f5e41,_0x918f18,_0x307c71)=>{const _0x284cad=_0x3c8b66;for(var _0x355b36=_0x307c71>0x1?void 0x0:_0x307c71?$(_0x1f5e41,_0x918f18):_0x1f5e41,_0x58556e=_0x321705[_0x284cad(0x16d)]-0x1,_0x446f7a;_0x58556e>=0x0;_0x58556e--)(_0x446f7a=_0x321705[_0x58556e])&&(_0x355b36=_0x446f7a(_0x355b36)||_0x355b36);return _0x355b36;},S=(_0x30963c,_0x52f9d0)=>(_0x5e42aa,_0x5ea365)=>_0x52f9d0(_0x5e42aa,_0x5ea365,_0x30963c);let p=class extends c[_0x3c8b66(0x16b)]{constructor(_0x53caf2,_0x39c73b,_0x262e3b,_0x29ca3e){const _0x1dad58=_0x3c8b66;super(),this[_0x1dad58(0x177)]=_0x53caf2,this[_0x1dad58(0x168)]=_0x39c73b,this[_0x1dad58(0x171)]=_0x262e3b,this[_0x1dad58(0x13f)]=_0x29ca3e,this[_0x1dad58(0x198)](),this[_0x1dad58(0x16f)]();}[_0x3c8b66(0x16f)](){const _0x70ecc9=_0x3c8b66;this['disposeWithMe'](this[_0x70ecc9(0x168)][_0x70ecc9(0x156)][_0x70ecc9(0x158)](w[_0x70ecc9(0x179)](0x10))['subscribe'](_0x46e73d=>{const _0x46fdfe=_0x70ecc9,_0xccc340=new Set();_0x46e73d[_0x46fdfe(0x1b6)](_0x451808=>{const _0x2bda4c=_0x46fdfe;switch(_0x451808[_0x2bda4c(0x187)]){case'add':{const _0x351700=_0x451808[_0x2bda4c(0x1ab)][_0x2bda4c(0x18d)];_0xccc340['add'](_0x351700);break;}}}),R(this[_0x46fdfe(0x13f)],_0xccc340);}));}[_0x3c8b66(0x198)](){const _0x53aa33=_0x3c8b66;this[_0x53aa33(0x154)](this[_0x53aa33(0x177)][_0x53aa33(0x156)][_0x53aa33(0x191)](async _0x456cbf=>{const _0x43638e=_0x53aa33;var _0xcd6860,_0x24e7eb,_0x4a1aca,_0x105915;const _0x1ae6b5=(_0xcd6860=this['_threadCommentModel']['getUnit'](_0x456cbf['unitId'])['find'](_0x12ed92=>_0x12ed92[_0x43638e(0x1a7)]===_0x456cbf[_0x43638e(0x1a7)]))==null?void 0x0:_0xcd6860[_0x43638e(0x166)];if(!_0x1ae6b5)return;const {unitId:_0x217629,subUnitId:_0x66a95}=_0x1ae6b5;switch(_0x456cbf[_0x43638e(0x140)]&&this[_0x43638e(0x171)]['addUser'](_0x456cbf[_0x43638e(0x140)]),_0x456cbf[_0x43638e(0x187)]){case v[_0x43638e(0x141)]:break;case v[_0x43638e(0x14c)]:{this[_0x43638e(0x168)]['addComment'](_0x217629,_0x66a95,{'unitId':_0x217629,'subUnitId':_0x66a95,'ref':'','id':_0x456cbf[_0x43638e(0x145)],'dT':f(+_0x456cbf['createTimestamp']),'threadId':_0x456cbf[_0x43638e(0x1a7)],'personId':(_0x4a1aca=(_0x24e7eb=_0x456cbf[_0x43638e(0x140)])==null?void 0x0:_0x24e7eb[_0x43638e(0x164)])!=null?_0x4a1aca:_0x456cbf['userId'],'text':JSON[_0x43638e(0x150)](_0x456cbf[_0x43638e(0x18a)]),'parentId':_0x1ae6b5['id']});break;}case v[_0x43638e(0x152)]:{const _0x40c2dd=this['_threadCommentModel']['getComment'](_0x217629,_0x66a95,_0x456cbf[_0x43638e(0x145)]);_0x40c2dd&&_0x40c2dd['parentId']&&this[_0x43638e(0x168)][_0x43638e(0x1ac)](_0x217629,_0x66a95,_0x456cbf[_0x43638e(0x145)]);break;}case v[_0x43638e(0x1be)]:{this[_0x43638e(0x168)][_0x43638e(0x189)](_0x217629,_0x66a95,{'commentId':_0x456cbf['replyId'],'text':JSON[_0x43638e(0x150)](_0x456cbf['content'])});break;}case v[_0x43638e(0x163)]:{const _0x263346=(_0x105915=this['_threadCommentModel'][_0x43638e(0x19c)](_0x456cbf[_0x43638e(0x17a)])[_0x43638e(0x147)](_0x3bc8fb=>_0x3bc8fb[_0x43638e(0x1a7)]===_0x456cbf[_0x43638e(0x1a7)]))==null?void 0x0:_0x105915[_0x43638e(0x166)];_0x263346&&this[_0x43638e(0x168)][_0x43638e(0x167)](_0x217629,_0x66a95,_0x263346['id'],_0x456cbf[_0x43638e(0x17d)]===I[_0x43638e(0x170)]);break;}}}));}};p=E([S(0x0,c[_0x3c8b66(0x15f)](b[_0x3c8b66(0x159)])),S(0x1,c[_0x3c8b66(0x15f)](M[_0x3c8b66(0x1a1)])),S(0x2,c[_0x3c8b66(0x15f)](c['UserManagerService'])),S(0x3,c[_0x3c8b66(0x15f)](c[_0x3c8b66(0x175)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x3c8b66(0x1b4)],x=(_0x378c8c,_0x958aac,_0x33be85,_0x30f92d)=>{for(var _0x1e80aa=_0x30f92d>0x1?void 0x0:_0x30f92d?A(_0x958aac,_0x33be85):_0x958aac,_0x56fa1f=_0x378c8c['length']-0x1,_0x1202d5;_0x56fa1f>=0x0;_0x56fa1f--)(_0x1202d5=_0x378c8c[_0x56fa1f])&&(_0x1e80aa=_0x1202d5(_0x1e80aa)||_0x1e80aa);return _0x1e80aa;},_=(_0x5c7078,_0x218489)=>(_0xc7f971,_0x47a787)=>_0x218489(_0xc7f971,_0x47a787,_0x5c7078);function Y(_0x301775,_0x2356da){const _0x26dd51=_0x3c8b66,_0x91c055=_0x301775[_0x26dd51(0x17b)][0x0];return{..._0x2356da,'id':_0x91c055[_0x26dd51(0x145)],'resolved':_0x301775[_0x26dd51(0x17d)]===0x1,'dT':f(_0x91c055[_0x26dd51(0x19a)]),'personId':_0x91c055[_0x26dd51(0x1b5)],'threadId':_0x91c055[_0x26dd51(0x1a7)]};}function G(_0x2df7b1,_0x21915f,_0x4280ba){const _0x3d5210=_0x3c8b66;var _0x1a69f3,_0xd979ba;if(((_0xd979ba=(_0x1a69f3=_0x2df7b1==null?void 0x0:_0x2df7b1['replies'])==null?void 0x0:_0x1a69f3['length'])!=null?_0xd979ba:0x0)>0x0){const _0x59f9ae=(_0x46f068,_0x22e181)=>({'id':_0x46f068[_0x3d5210(0x145)],'threadId':_0x46f068[_0x3d5210(0x1a7)],'dT':f(_0x46f068[_0x3d5210(0x19a)]),'personId':_0x46f068[_0x3d5210(0x1b5)],'resolved':_0x2df7b1['solved']===I['Solved'],'unitId':_0x21915f,'subUnitId':_0x4280ba,'text':JSON[_0x3d5210(0x150)](_0x46f068[_0x3d5210(0x18a)]),'parentId':_0x22e181}),_0x2baa7c=_0x59f9ae(_0x2df7b1['replies'][0x0]);return{..._0x2baa7c,'children':_0x2df7b1['replies'][_0x3d5210(0x13e)](0x1)[_0x3d5210(0x17c)](_0x1d689e=>_0x59f9ae(_0x1d689e,_0x2baa7c['id']))};}return null;}function _0x5db2(_0x41c8c0,_0x474093){const _0x415cfe=_0x415c();return _0x5db2=function(_0x5db2e3,_0x4d31c9){_0x5db2e3=_0x5db2e3-0x13e;let _0x276c15=_0x415cfe[_0x5db2e3];return _0x276c15;},_0x5db2(_0x41c8c0,_0x474093);}let g=class{constructor(_0x2b92d5,_0x1a81f2,_0x841936,_0x362d81){const _0x3363dc=_0x3c8b66;this[_0x3363dc(0x1b3)]=_0x2b92d5,this[_0x3363dc(0x171)]=_0x1a81f2,this[_0x3363dc(0x14a)]=_0x841936,this[_0x3363dc(0x13f)]=_0x362d81;}async[_0x3c8b66(0x178)](_0xab6aa){const _0x555758=_0x3c8b66;var _0x434a80,_0x5dc2fc;const {parentId:_0x2cec01,unitId:_0x28d437,text:_0x3cc834,threadId:_0x15fe13}=_0xab6aa,_0x5bee23=(_0x5dc2fc=(_0x434a80=_0x3cc834[_0x555758(0x193)])==null?void 0x0:_0x434a80['filter'](_0x4f3b3c=>_0x4f3b3c[_0x555758(0x17f)]===c[_0x555758(0x143)][_0x555758(0x19d)])['map'](_0x252373=>_0x252373[_0x555758(0x149)]))!=null?_0x5dc2fc:[],_0x899c37=JSON['stringify'](_0x3cc834),_0x11953c=(await this[_0x555758(0x14a)][_0x555758(0x15d)](_0x28d437))['getMemberID']();if(_0x2cec01){const _0x11931e={'memberId':_0x11953c,'unitId':_0x28d437,'content':_0x899c37,'mention':_0x5bee23,'threadId':_0x15fe13},_0x443046=(await this[_0x555758(0x1b3)][_0x555758(0x190)](_0x555758(0x1bb)+_0x28d437+'/reply',{'body':_0x11931e}))[_0x555758(0x14f)]['reply'];return{..._0xab6aa,'id':_0x443046[_0x555758(0x145)],'dT':c[_0x555758(0x18b)](+_0x443046['createTimestamp'])[_0x555758(0x165)](_0x555758(0x19f)),'personId':_0x443046['userId']};}else{const _0x5f31a0={'memberId':_0x11953c,'unitId':_0x28d437,'content':_0x899c37,'mention':_0x5bee23},_0x4f0208=await this[_0x555758(0x1b3)][_0x555758(0x190)]('/universer-api/comment/unit/'+_0x28d437+_0x555758(0x1ae),{'body':_0x5f31a0});return Y(_0x4f0208[_0x555758(0x14f)][_0x555758(0x160)],_0xab6aa);}}async['updateComment'](_0x3b8ecc){const _0x37b96b=_0x3c8b66;var _0x59da26,_0x55dd9b;const {text:_0x422777,unitId:_0x32bfc8}=_0x3b8ecc,_0x529148=(_0x55dd9b=(_0x59da26=_0x422777[_0x37b96b(0x193)])==null?void 0x0:_0x59da26[_0x37b96b(0x1bc)](_0x2ecceb=>_0x2ecceb[_0x37b96b(0x17f)]===c[_0x37b96b(0x143)][_0x37b96b(0x19d)])['map'](_0x304917=>_0x304917['rangeId']))!=null?_0x55dd9b:[],_0x21fdd5=JSON[_0x37b96b(0x14b)](_0x422777),_0x3955da=_0x3b8ecc['threadId'],_0x5ac084=_0x3b8ecc['id'],_0x547f13={'memberId':(await this[_0x37b96b(0x14a)][_0x37b96b(0x15d)](_0x32bfc8))['getMemberID'](),'unitId':_0x32bfc8,'threadId':_0x3955da,'mention':_0x529148,'content':_0x21fdd5,'replyId':_0x5ac084},_0x32ed6c=await this[_0x37b96b(0x1b3)][_0x37b96b(0x190)]('/universer-api/comment/unit/'+_0x32bfc8+_0x37b96b(0x1c2),{'body':_0x547f13});return!_0x32ed6c['body'][_0x37b96b(0x15e)]||_0x32ed6c[_0x37b96b(0x14f)]['error'][_0x37b96b(0x15c)]===0x1;}async[_0x3c8b66(0x167)](_0x37e049){const _0x323549=_0x3c8b66,{unitId:_0x23af09}=_0x37e049,_0x3f8e95=_0x37e049[_0x323549(0x1a7)],_0x34895d={'memberId':this[_0x323549(0x171)][_0x323549(0x188)]()[_0x323549(0x164)],'unitId':_0x23af09,'threadId':_0x3f8e95,'solved':_0x37e049[_0x323549(0x194)]?I['Solved']:I['OpenOrReOpen']},_0x2846fe=await this['_httpService'][_0x323549(0x190)]('/universer-api/comment/unit/'+_0x23af09+_0x323549(0x1b8),{'body':_0x34895d});return!_0x2846fe['body']['error']||_0x2846fe['body'][_0x323549(0x15e)][_0x323549(0x15c)]===0x1;}async[_0x3c8b66(0x1ac)](_0xdfe78e,_0x2cb208,_0x5acb5a,_0x2ca35a){const _0x36d96d=_0x3c8b66,_0x4f6ca0={'memberId':(await this[_0x36d96d(0x14a)][_0x36d96d(0x15d)](_0xdfe78e))[_0x36d96d(0x181)](),'threadId':_0x5acb5a,'replyId':_0x2ca35a,'unitId':_0xdfe78e},_0x7473a2=await this[_0x36d96d(0x1b3)][_0x36d96d(0x190)](_0x36d96d(0x1bb)+_0xdfe78e+_0x36d96d(0x199),{'body':_0x4f6ca0});return!_0x7473a2['body'][_0x36d96d(0x15e)]||_0x7473a2[_0x36d96d(0x14f)][_0x36d96d(0x15e)]['code']===0x1;}async[_0x3c8b66(0x1b9)](_0x4f67b5,_0x1f6e0e,_0x156235){const _0x2d5c94=_0x3c8b66,_0x36d979={'unitId':_0x4f67b5,'threadId':_0x156235},_0x467fda=await this['_httpService'][_0x2d5c94(0x190)](_0x2d5c94(0x1bb)+_0x4f67b5+_0x2d5c94(0x1ba),{'body':_0x36d979}),_0x326223=_0x156235[_0x2d5c94(0x17c)](_0x497ea4=>G(_0x467fda[_0x2d5c94(0x14f)]['comments'][_0x497ea4],_0x4f67b5,_0x1f6e0e))['filter'](Boolean);return Object[_0x2d5c94(0x1b2)](_0x467fda[_0x2d5c94(0x14f)][_0x2d5c94(0x1c1)])[_0x2d5c94(0x1b6)](_0x23197b=>{const _0xadf8aa=_0x2d5c94;this[_0xadf8aa(0x171)][_0xadf8aa(0x16e)](_0x23197b);}),_0x326223;}[_0x3c8b66(0x151)](_0x36dd2f){const _0x12c146=_0x3c8b66;return{'id':_0x36dd2f['id'],'threadId':_0x36dd2f['threadId'],'ref':_0x36dd2f[_0x12c146(0x186)]};}};g=x([_(0x0,c[_0x3c8b66(0x15f)](P[_0x3c8b66(0x184)])),_(0x1,c[_0x3c8b66(0x15f)](c[_0x3c8b66(0x1a0)])),_(0x2,c[_0x3c8b66(0x15f)](b['CollaborationSessionService'])),_(0x3,c[_0x3c8b66(0x15f)](c[_0x3c8b66(0x175)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x543bff,_0x2881eb,_0x2ad88f,_0x14e6d1)=>{const _0x388fca=_0x3c8b66;for(var _0x1a70c1=_0x14e6d1>0x1?void 0x0:_0x14e6d1?H(_0x2881eb,_0x2ad88f):_0x2881eb,_0x278c07=_0x543bff[_0x388fca(0x16d)]-0x1,_0x10fd1c;_0x278c07>=0x0;_0x278c07--)(_0x10fd1c=_0x543bff[_0x278c07])&&(_0x1a70c1=_0x10fd1c(_0x1a70c1)||_0x1a70c1);return _0x1a70c1;},y=(_0x47614e,_0x2d5053)=>(_0x3cfe32,_0xdeb92)=>_0x2d5053(_0x3cfe32,_0xdeb92,_0x47614e);let C=class extends c[_0x3c8b66(0x16b)]{constructor(_0x362007,_0x269e94){const _0x4351b7=_0x3c8b66;super(),this[_0x4351b7(0x196)]=_0x362007,this[_0x4351b7(0x157)]=_0x269e94,this[_0x4351b7(0x197)]();}[_0x3c8b66(0x197)](){const _0xda70c5=_0x3c8b66;this[_0xda70c5(0x196)][_0xda70c5(0x1af)]=this[_0xda70c5(0x157)],this[_0xda70c5(0x196)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x3c8b66(0x15f)](g))],C);var F=Object[_0x3c8b66(0x1a4)],L=Object[_0x3c8b66(0x1b4)],Z=(_0x3cbd41,_0x1a7602,_0x1360e6)=>_0x1a7602 in _0x3cbd41?F(_0x3cbd41,_0x1a7602,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1360e6}):_0x3cbd41[_0x1a7602]=_0x1360e6,W=(_0x4dde97,_0x2babd6,_0x2147cc,_0x277145)=>{const _0x3b5fee=_0x3c8b66;for(var _0x26f9b5=_0x277145>0x1?void 0x0:_0x277145?L(_0x2babd6,_0x2147cc):_0x2babd6,_0x5d686b=_0x4dde97[_0x3b5fee(0x16d)]-0x1,_0x4bb53d;_0x5d686b>=0x0;_0x5d686b--)(_0x4bb53d=_0x4dde97[_0x5d686b])&&(_0x26f9b5=_0x4bb53d(_0x26f9b5)||_0x26f9b5);return _0x26f9b5;},O=(_0x3501cd,_0x27c99b)=>(_0xe93d86,_0x26f5f2)=>_0x27c99b(_0xe93d86,_0x26f5f2,_0x3501cd),N=(_0x5316a4,_0xe0223b,_0x37c6ff)=>Z(_0x5316a4,typeof _0xe0223b!=_0x3c8b66(0x161)?_0xe0223b+'':_0xe0223b,_0x37c6ff);exports[_0x3c8b66(0x18f)]=class extends c[_0x3c8b66(0x18e)]{constructor(_0x555436=D,_0x27ce0b,_0x29c300){const _0x40c034=_0x3c8b66;super(),this[_0x40c034(0x1bd)]=_0x555436,this['_injector']=_0x27ce0b,this[_0x40c034(0x153)]=_0x29c300;const {..._0x29b08c}=c[_0x40c034(0x1a8)]({},D,this[_0x40c034(0x1bd)]);this[_0x40c034(0x153)][_0x40c034(0x183)](q,_0x29b08c);}[_0x3c8b66(0x19b)](){const _0x547c66=_0x3c8b66;[[g],[C],[p]][_0x547c66(0x1b6)](_0x4e29e9=>{const _0x45b29b=_0x547c66;this['_injector'][_0x45b29b(0x1bf)](_0x4e29e9);});}[_0x3c8b66(0x176)](){const _0x19e5a6=_0x3c8b66;this[_0x19e5a6(0x13f)][_0x19e5a6(0x148)](C),this[_0x19e5a6(0x13f)]['get'](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x3c8b66(0x16c),U),N(exports[_0x3c8b66(0x18f)],_0x3c8b66(0x187),c[_0x3c8b66(0x1a2)][_0x3c8b66(0x1a5)]),exports[_0x3c8b66(0x18f)]=W([c[_0x3c8b66(0x173)](j[_0x3c8b66(0x14e)],b[_0x3c8b66(0x15a)],T[_0x3c8b66(0x18c)]),O(0x1,c[_0x3c8b66(0x15f)](c[_0x3c8b66(0x175)])),O(0x2,c[_0x3c8b66(0x15b)])],exports[_0x3c8b66(0x18f)]);
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 _0x2ab71b=_0xe5c9;(function(_0x266013,_0x8de279){const _0x1576c5=_0xe5c9,_0x444791=_0x266013();while(!![]){try{const _0x3e38a0=-parseInt(_0x1576c5(0x146))/0x1+-parseInt(_0x1576c5(0x136))/0x2*(-parseInt(_0x1576c5(0x16c))/0x3)+-parseInt(_0x1576c5(0x13a))/0x4*(-parseInt(_0x1576c5(0x118))/0x5)+parseInt(_0x1576c5(0x161))/0x6+parseInt(_0x1576c5(0x112))/0x7+-parseInt(_0x1576c5(0x157))/0x8*(parseInt(_0x1576c5(0x135))/0x9)+parseInt(_0x1576c5(0x162))/0xa*(parseInt(_0x1576c5(0x129))/0xb);if(_0x3e38a0===_0x8de279)break;else _0x444791['push'](_0x444791['shift']());}catch(_0x2f0eff){_0x444791['push'](_0x444791['shift']());}}}(_0x1f39,0x4d455));import{CommentService as _0x4cdef4,CollaborationSessionService as _0x34e856,UniverCollaborationClientPlugin as _0x49c8f9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x333fa5}from'@univerjs-pro/license';function _0x1f39(){const _0x280914=['error','length','onStarting','/universer-api/comment/unit/','map','775072oYOPNH','_threadCommentDataSourceService','users','_init','Unknown','_sessionService','_threadCommentModel','commentUpdate$','OpenOrReOpen','Reply','3264270kABlkz','200090WOoNxP','_userService','getUser','addComment','_injector','userId','resolveComment','/delete','Edit','pluginName','3lxjtwU','replies','type','parse','Solve','code','saveCommentToSnapshot','Solved','get','972825FpJPmR','/add','_httpService','size','_threadCommentDataSource','getCurrentUser','25RcCvdM','UNIVER_UNKNOWN','/edit','stringify','UNRECOGNIZED','format','getMemberID','createTimestamp','getUnit','replyId','threadId','root','/universer-api/user/list','YYYY/MM/DD\x20HH:mm','syncUpdateMutationToColla','post','rangeId','77SuyDdU','disposeWithMe','deleteComment','_config','solved','slice','forEach','defineProperty','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','filter','body','thread-comment-data-source.config','18gzaAnp','21106VaxnFT','resolved','userID','Delete','50476yvSJqQ','getOwnPropertyDescriptor','user','reply','_initDataSource','subscribe','addUser','pipe','add','unitId','find','COMMENT','386462bdhxtr','listComments','dataSource','payload','_initUserSync','_configService','/reply','_commentService','rangeType','updateComment','Add','content'];_0x1f39=function(){return _0x280914;};return _0x1f39();}import{dayjs as _0x3952b6,UserManagerService as _0x3d1032,Inject as _0x785250,Injector as _0x231213,Disposable as _0x607ca7,CustomRangeType as _0x5c9b14,UniverInstanceType as _0x35c6da,DependentOn as _0x5cc80e,IConfigService as _0x49ccea,Plugin as _0x5c0206,merge as _0x4eb6ff}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5b3fcf}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2221fd,IThreadCommentDataSourceService as _0x50d9f5}from'@univerjs/thread-comment';import{bufferTime as _0x11dc46}from'rxjs';import{HTTPService as _0x497553}from'@univerjs/network';const W=_0x2ab71b(0x131);var I=(_0x6e12d2=>(_0x6e12d2[_0x6e12d2['OpenOrReOpen']=0x0]=_0x2ab71b(0x15f),_0x6e12d2[_0x6e12d2[_0x2ab71b(0x110)]=0x1]='Solved',_0x6e12d2[_0x6e12d2[_0x2ab71b(0x11c)]=-0x1]=_0x2ab71b(0x11c),_0x6e12d2))(I||{}),v=(_0x34cc17=>(_0x34cc17[_0x34cc17[_0x2ab71b(0x15b)]=0x0]='Unknown',_0x34cc17[_0x34cc17[_0x2ab71b(0x150)]=0x1]=_0x2ab71b(0x150),_0x34cc17[_0x34cc17[_0x2ab71b(0x160)]=0x2]=_0x2ab71b(0x160),_0x34cc17[_0x34cc17[_0x2ab71b(0x16a)]=0x3]=_0x2ab71b(0x16a),_0x34cc17[_0x34cc17[_0x2ab71b(0x139)]=0x4]='Delete',_0x34cc17[_0x34cc17[_0x2ab71b(0x10d)]=0x5]=_0x2ab71b(0x10d),_0x34cc17[_0x34cc17[_0x2ab71b(0x11c)]=-0x1]='UNRECOGNIZED',_0x34cc17))(v||{});const D=_0x2c2d05=>_0x3952b6(new Date(+_0x2c2d05))[_0x2ab71b(0x11d)](_0x2ab71b(0x125)),B=async(_0x192e7d,_0x2c134b)=>{const _0x452283=_0x2ab71b,_0x222c4b=_0x192e7d['get'](_0x3d1032),_0x1b0172=_0x192e7d[_0x452283(0x111)](_0x497553);_0x2c134b[_0x452283(0x12f)](_0x407d1a=>{const _0x3deb70=_0x452283;_0x222c4b[_0x3deb70(0x164)](_0x407d1a)&&_0x2c134b['delete'](_0x407d1a);}),_0x2c134b[_0x452283(0x115)]&&(await _0x1b0172[_0x452283(0x111)](_0x452283(0x124),{'params':{'userIDs':[..._0x2c134b]}}))[_0x452283(0x133)][_0x452283(0x159)][_0x452283(0x12f)](_0x1857f3=>{const _0x44032d=_0x452283;_0x1857f3&&_0x222c4b[_0x44032d(0x140)](_0x1857f3);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2891bd,_0x47c46f,_0x503d76,_0x42d8bc)=>{for(var _0x3924a7=_0x42d8bc>0x1?void 0x0:_0x42d8bc?K(_0x47c46f,_0x503d76):_0x47c46f,_0x181456=_0x2891bd['length']-0x1,_0x4f814c;_0x181456>=0x0;_0x181456--)(_0x4f814c=_0x2891bd[_0x181456])&&(_0x3924a7=_0x4f814c(_0x3924a7)||_0x3924a7);return _0x3924a7;},p=(_0x5450dc,_0x22afae)=>(_0x38f894,_0x29e217)=>_0x22afae(_0x38f894,_0x29e217,_0x5450dc);let S=class extends _0x607ca7{constructor(_0x5e3967,_0x2abae6,_0x262a1b,_0x3234c8){const _0x1e1c99=_0x2ab71b;super(),this['_commentService']=_0x5e3967,this['_threadCommentModel']=_0x2abae6,this[_0x1e1c99(0x163)]=_0x262a1b,this['_injector']=_0x3234c8,this[_0x1e1c99(0x15a)](),this[_0x1e1c99(0x14a)]();}[_0x2ab71b(0x14a)](){const _0x8b4d08=_0x2ab71b;this[_0x8b4d08(0x12a)](this[_0x8b4d08(0x15d)][_0x8b4d08(0x15e)][_0x8b4d08(0x141)](_0x11dc46(0x10))[_0x8b4d08(0x13f)](_0x18f49c=>{const _0x42f5e1=_0x8b4d08,_0x2afc62=new Set();_0x18f49c[_0x42f5e1(0x12f)](_0x3715bf=>{const _0x4ae1ed=_0x42f5e1;switch(_0x3715bf[_0x4ae1ed(0x10b)]){case'add':{const _0x25384f=_0x3715bf[_0x4ae1ed(0x149)]['personId'];_0x2afc62[_0x4ae1ed(0x142)](_0x25384f);break;}}}),B(this[_0x42f5e1(0x166)],_0x2afc62);}));}['_init'](){const _0xb54f3b=_0x2ab71b;this[_0xb54f3b(0x12a)](this[_0xb54f3b(0x14d)][_0xb54f3b(0x15e)][_0xb54f3b(0x13f)](async _0x2c6437=>{const _0x1c0a4a=_0xb54f3b;var _0x55917a,_0x121e41,_0x13a55d,_0x2f825c;const _0x44f035=(_0x55917a=this[_0x1c0a4a(0x15d)][_0x1c0a4a(0x120)](_0x2c6437['unitId'])[_0x1c0a4a(0x144)](_0x519f97=>_0x519f97[_0x1c0a4a(0x122)]===_0x2c6437[_0x1c0a4a(0x122)]))==null?void 0x0:_0x55917a['root'];if(!_0x44f035)return;const {unitId:_0x510c7a,subUnitId:_0x1a84fa}=_0x44f035;switch(_0x2c6437[_0x1c0a4a(0x13c)]&&this['_userService'][_0x1c0a4a(0x140)](_0x2c6437[_0x1c0a4a(0x13c)]),_0x2c6437['type']){case v[_0x1c0a4a(0x150)]:break;case v['Reply']:{this['_threadCommentModel'][_0x1c0a4a(0x165)](_0x510c7a,_0x1a84fa,{'unitId':_0x510c7a,'subUnitId':_0x1a84fa,'ref':'','id':_0x2c6437[_0x1c0a4a(0x121)],'dT':D(+_0x2c6437[_0x1c0a4a(0x11f)]),'threadId':_0x2c6437[_0x1c0a4a(0x122)],'personId':(_0x13a55d=(_0x121e41=_0x2c6437[_0x1c0a4a(0x13c)])==null?void 0x0:_0x121e41[_0x1c0a4a(0x138)])!=null?_0x13a55d:_0x2c6437[_0x1c0a4a(0x167)],'text':JSON[_0x1c0a4a(0x10c)](_0x2c6437['content']),'parentId':_0x44f035['id']});break;}case v[_0x1c0a4a(0x139)]:{const _0x35f50c=this[_0x1c0a4a(0x15d)]['getComment'](_0x510c7a,_0x1a84fa,_0x2c6437[_0x1c0a4a(0x121)]);_0x35f50c&&_0x35f50c['parentId']&&this[_0x1c0a4a(0x15d)]['deleteComment'](_0x510c7a,_0x1a84fa,_0x2c6437['replyId']);break;}case v['Edit']:{this[_0x1c0a4a(0x15d)][_0x1c0a4a(0x14f)](_0x510c7a,_0x1a84fa,{'commentId':_0x2c6437[_0x1c0a4a(0x121)],'text':JSON[_0x1c0a4a(0x10c)](_0x2c6437[_0x1c0a4a(0x151)])});break;}case v[_0x1c0a4a(0x10d)]:{const _0x4bb68e=(_0x2f825c=this['_threadCommentModel'][_0x1c0a4a(0x120)](_0x2c6437[_0x1c0a4a(0x143)])['find'](_0x25ee80=>_0x25ee80[_0x1c0a4a(0x122)]===_0x2c6437[_0x1c0a4a(0x122)]))==null?void 0x0:_0x2f825c[_0x1c0a4a(0x123)];_0x4bb68e&&this[_0x1c0a4a(0x15d)]['resolveComment'](_0x510c7a,_0x1a84fa,_0x4bb68e['id'],_0x2c6437[_0x1c0a4a(0x12d)]===I[_0x1c0a4a(0x110)]);break;}}}));}};S=V([p(0x0,_0x785250(_0x4cdef4)),p(0x1,_0x785250(_0x2221fd)),p(0x2,_0x785250(_0x3d1032)),p(0x3,_0x785250(_0x231213))],S);const z=_0x2ab71b(0x134),M={};var k=Object[_0x2ab71b(0x13b)],Q=(_0x448413,_0x4dd429,_0x5aba76,_0x458a5a)=>{for(var _0x5a44cb=_0x458a5a>0x1?void 0x0:_0x458a5a?k(_0x4dd429,_0x5aba76):_0x4dd429,_0x3f7c4e=_0x448413['length']-0x1,_0x244627;_0x3f7c4e>=0x0;_0x3f7c4e--)(_0x244627=_0x448413[_0x3f7c4e])&&(_0x5a44cb=_0x244627(_0x5a44cb)||_0x5a44cb);return _0x5a44cb;},_=(_0x431f82,_0x1b328e)=>(_0x7ad1bb,_0x57bcc2)=>_0x1b328e(_0x7ad1bb,_0x57bcc2,_0x431f82);function X(_0x40cec1,_0x23a5da){const _0x37b040=_0x2ab71b,_0x295796=_0x40cec1[_0x37b040(0x10a)][0x0];return{..._0x23a5da,'id':_0x295796[_0x37b040(0x121)],'resolved':_0x40cec1[_0x37b040(0x12d)]===0x1,'dT':D(_0x295796['createTimestamp']),'personId':_0x295796[_0x37b040(0x167)],'threadId':_0x295796['threadId']};}function ee(_0x4bbebc,_0x32121d,_0x31ebe3){const _0x1bac32=_0x2ab71b;var _0x9c239,_0x36553e;if(((_0x36553e=(_0x9c239=_0x4bbebc==null?void 0x0:_0x4bbebc['replies'])==null?void 0x0:_0x9c239[_0x1bac32(0x153)])!=null?_0x36553e:0x0)>0x0){const _0x65048b=(_0xcd6b10,_0x1f5ff8)=>({'id':_0xcd6b10[_0x1bac32(0x121)],'threadId':_0xcd6b10[_0x1bac32(0x122)],'dT':D(_0xcd6b10[_0x1bac32(0x11f)]),'personId':_0xcd6b10[_0x1bac32(0x167)],'resolved':_0x4bbebc[_0x1bac32(0x12d)]===I[_0x1bac32(0x110)],'unitId':_0x32121d,'subUnitId':_0x31ebe3,'text':JSON[_0x1bac32(0x10c)](_0xcd6b10[_0x1bac32(0x151)]),'parentId':_0x1f5ff8}),_0x4fa81a=_0x65048b(_0x4bbebc[_0x1bac32(0x10a)][0x0]);return{..._0x4fa81a,'children':_0x4bbebc[_0x1bac32(0x10a)][_0x1bac32(0x12e)](0x1)[_0x1bac32(0x156)](_0x39c81e=>_0x65048b(_0x39c81e,_0x4fa81a['id']))};}return null;}let f=class{constructor(_0x50369f,_0x1c91d5,_0xf4144b,_0x16a90a){const _0x14d095=_0x2ab71b;this[_0x14d095(0x114)]=_0x50369f,this[_0x14d095(0x163)]=_0x1c91d5,this['_sessionService']=_0xf4144b,this['_injector']=_0x16a90a;}async[_0x2ab71b(0x165)](_0x56f6ce){const _0x5b06c3=_0x2ab71b;var _0x843a9d,_0x4fe080;const {parentId:_0x522ad4,unitId:_0x529dae,text:_0xbc760b,threadId:_0x507d49}=_0x56f6ce,_0x5eaca5=(_0x4fe080=(_0x843a9d=_0xbc760b['customRanges'])==null?void 0x0:_0x843a9d['filter'](_0x338726=>_0x338726[_0x5b06c3(0x14e)]===_0x5c9b14[_0x5b06c3(0x145)])[_0x5b06c3(0x156)](_0x1b674f=>_0x1b674f[_0x5b06c3(0x128)]))!=null?_0x4fe080:[],_0x203908=JSON[_0x5b06c3(0x11b)](_0xbc760b),_0x458c0f=(await this[_0x5b06c3(0x15c)]['requireSession'](_0x529dae))[_0x5b06c3(0x11e)]();if(_0x522ad4){const _0x16eb72={'memberId':_0x458c0f,'unitId':_0x529dae,'content':_0x203908,'mention':_0x5eaca5,'threadId':_0x507d49},_0x124c02=(await this['_httpService']['post'](_0x5b06c3(0x155)+_0x529dae+_0x5b06c3(0x14c),{'body':_0x16eb72}))[_0x5b06c3(0x133)][_0x5b06c3(0x13d)];return{..._0x56f6ce,'id':_0x124c02[_0x5b06c3(0x121)],'dT':_0x3952b6(+_0x124c02[_0x5b06c3(0x11f)])['format'](_0x5b06c3(0x125)),'personId':_0x124c02[_0x5b06c3(0x167)]};}else{const _0x24321f={'memberId':_0x458c0f,'unitId':_0x529dae,'content':_0x203908,'mention':_0x5eaca5},_0x19e4e5=await this['_httpService'][_0x5b06c3(0x127)](_0x5b06c3(0x155)+_0x529dae+_0x5b06c3(0x113),{'body':_0x24321f});return X(_0x19e4e5[_0x5b06c3(0x133)]['comment'],_0x56f6ce);}}async[_0x2ab71b(0x14f)](_0x6b2394){const _0xfd8253=_0x2ab71b;var _0x1523fb,_0x1031d6;const {text:_0x546299,unitId:_0x196f86}=_0x6b2394,_0x12f852=(_0x1031d6=(_0x1523fb=_0x546299['customRanges'])==null?void 0x0:_0x1523fb[_0xfd8253(0x132)](_0x3685a5=>_0x3685a5[_0xfd8253(0x14e)]===_0x5c9b14['COMMENT'])[_0xfd8253(0x156)](_0x5f153a=>_0x5f153a[_0xfd8253(0x128)]))!=null?_0x1031d6:[],_0x1ae3dc=JSON[_0xfd8253(0x11b)](_0x546299),_0x5516f2=_0x6b2394[_0xfd8253(0x122)],_0x449577=_0x6b2394['id'],_0x40ea38={'memberId':(await this[_0xfd8253(0x15c)]['requireSession'](_0x196f86))['getMemberID'](),'unitId':_0x196f86,'threadId':_0x5516f2,'mention':_0x12f852,'content':_0x1ae3dc,'replyId':_0x449577},_0x2bf93d=await this[_0xfd8253(0x114)]['post'](_0xfd8253(0x155)+_0x196f86+_0xfd8253(0x11a),{'body':_0x40ea38});return!_0x2bf93d[_0xfd8253(0x133)][_0xfd8253(0x152)]||_0x2bf93d['body'][_0xfd8253(0x152)][_0xfd8253(0x10e)]===0x1;}async[_0x2ab71b(0x168)](_0x4bb8ef){const _0x312e98=_0x2ab71b,{unitId:_0x1dcf95}=_0x4bb8ef,_0x4fd8e4=_0x4bb8ef[_0x312e98(0x122)],_0x268b4d={'memberId':this[_0x312e98(0x163)][_0x312e98(0x117)]()['userID'],'unitId':_0x1dcf95,'threadId':_0x4fd8e4,'solved':_0x4bb8ef[_0x312e98(0x137)]?I['Solved']:I[_0x312e98(0x15f)]},_0x5b2eae=await this['_httpService'][_0x312e98(0x127)](_0x312e98(0x155)+_0x1dcf95+'/solved',{'body':_0x268b4d});return!_0x5b2eae[_0x312e98(0x133)][_0x312e98(0x152)]||_0x5b2eae[_0x312e98(0x133)][_0x312e98(0x152)][_0x312e98(0x10e)]===0x1;}async[_0x2ab71b(0x12b)](_0x455186,_0x22db3d,_0x185ec1,_0x4ab50b){const _0x223ee2=_0x2ab71b,_0xafe0e8={'memberId':(await this['_sessionService']['requireSession'](_0x455186))['getMemberID'](),'threadId':_0x185ec1,'replyId':_0x4ab50b,'unitId':_0x455186},_0x1ad951=await this[_0x223ee2(0x114)]['post'](_0x223ee2(0x155)+_0x455186+_0x223ee2(0x169),{'body':_0xafe0e8});return!_0x1ad951[_0x223ee2(0x133)][_0x223ee2(0x152)]||_0x1ad951[_0x223ee2(0x133)][_0x223ee2(0x152)]['code']===0x1;}async[_0x2ab71b(0x147)](_0xeec0d3,_0x3e733d,_0x47d842){const _0x4e5d07=_0x2ab71b,_0x35d037={'unitId':_0xeec0d3,'threadId':_0x47d842},_0xc7fa44=await this[_0x4e5d07(0x114)][_0x4e5d07(0x127)](_0x4e5d07(0x155)+_0xeec0d3+'/list',{'body':_0x35d037}),_0x36445f=_0x47d842['map'](_0x5c4c53=>ee(_0xc7fa44['body']['comments'][_0x5c4c53],_0xeec0d3,_0x3e733d))['filter'](Boolean);return Object['values'](_0xc7fa44[_0x4e5d07(0x133)]['users'])[_0x4e5d07(0x12f)](_0x23e15c=>{const _0x32b23e=_0x4e5d07;this[_0x32b23e(0x163)][_0x32b23e(0x140)](_0x23e15c);}),_0x36445f;}[_0x2ab71b(0x10f)](_0x1c0d1e){const _0x78531e=_0x2ab71b;return{'id':_0x1c0d1e['id'],'threadId':_0x1c0d1e[_0x78531e(0x122)],'ref':_0x1c0d1e['ref']};}};f=Q([_(0x0,_0x785250(_0x497553)),_(0x1,_0x785250(_0x3d1032)),_(0x2,_0x785250(_0x34e856)),_(0x3,_0x785250(_0x231213))],f);var re=Object[_0x2ab71b(0x13b)],te=(_0xee91bb,_0x235a59,_0x52de03,_0x28f217)=>{const _0x33cd5f=_0x2ab71b;for(var _0x1ddc58=_0x28f217>0x1?void 0x0:_0x28f217?re(_0x235a59,_0x52de03):_0x235a59,_0x46c8dd=_0xee91bb[_0x33cd5f(0x153)]-0x1,_0x5b236d;_0x46c8dd>=0x0;_0x46c8dd--)(_0x5b236d=_0xee91bb[_0x46c8dd])&&(_0x1ddc58=_0x5b236d(_0x1ddc58)||_0x1ddc58);return _0x1ddc58;},N=(_0x3bc0bf,_0x503314)=>(_0x2f4b4a,_0x62c6da)=>_0x503314(_0x2f4b4a,_0x62c6da,_0x3bc0bf);let g=class extends _0x607ca7{constructor(_0x496bfb,_0x18d088){const _0x12107a=_0x2ab71b;super(),this[_0x12107a(0x158)]=_0x496bfb,this[_0x12107a(0x116)]=_0x18d088,this['_initDataSource']();}[_0x2ab71b(0x13e)](){const _0x78f09c=_0x2ab71b;this[_0x78f09c(0x158)][_0x78f09c(0x148)]=this['_threadCommentDataSource'],this[_0x78f09c(0x158)][_0x78f09c(0x126)]=!0x1;}};g=te([N(0x0,_0x50d9f5),N(0x1,_0x785250(f))],g);var se=Object[_0x2ab71b(0x130)],oe=Object[_0x2ab71b(0x13b)],ne=(_0x5afe2e,_0x297d62,_0x4e0b46)=>_0x297d62 in _0x5afe2e?se(_0x5afe2e,_0x297d62,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4e0b46}):_0x5afe2e[_0x297d62]=_0x4e0b46,ie=(_0x5ccbe7,_0x290ef1,_0x3e4c99,_0x15879e)=>{const _0x541509=_0x2ab71b;for(var _0x98df6b=_0x15879e>0x1?void 0x0:_0x15879e?oe(_0x290ef1,_0x3e4c99):_0x290ef1,_0x5e6139=_0x5ccbe7[_0x541509(0x153)]-0x1,_0x2fba5a;_0x5e6139>=0x0;_0x5e6139--)(_0x2fba5a=_0x5ccbe7[_0x5e6139])&&(_0x98df6b=_0x2fba5a(_0x98df6b)||_0x98df6b);return _0x98df6b;},w=(_0xea0248,_0x358841)=>(_0x3e97ed,_0x58bffa)=>_0x358841(_0x3e97ed,_0x58bffa,_0xea0248),$=(_0x17b0d1,_0x5711cb,_0x4b0b5f)=>ne(_0x17b0d1,typeof _0x5711cb!='symbol'?_0x5711cb+'':_0x5711cb,_0x4b0b5f);function _0xe5c9(_0x4a38c2,_0x8d6108){const _0x1f394c=_0x1f39();return _0xe5c9=function(_0xe5c9ee,_0x7ac369){_0xe5c9ee=_0xe5c9ee-0x10a;let _0x48fc34=_0x1f394c[_0xe5c9ee];return _0x48fc34;},_0xe5c9(_0x4a38c2,_0x8d6108);}let b=class extends _0x5c0206{constructor(_0x495a2a=M,_0x37133d,_0x36f526){const _0x47243e=_0x2ab71b;super(),this['_config']=_0x495a2a,this['_injector']=_0x37133d,this[_0x47243e(0x14b)]=_0x36f526;const {..._0x4ed11a}=_0x4eb6ff({},M,this[_0x47243e(0x12c)]);this['_configService']['setConfig'](z,_0x4ed11a);}[_0x2ab71b(0x154)](){const _0x4bd321=_0x2ab71b;[[f],[g],[S]][_0x4bd321(0x12f)](_0x22db10=>{const _0x353cae=_0x4bd321;this[_0x353cae(0x166)][_0x353cae(0x142)](_0x22db10);});}['onReady'](){const _0x2ef20d=_0x2ab71b;this[_0x2ef20d(0x166)][_0x2ef20d(0x111)](g),this[_0x2ef20d(0x166)]['get'](S);}};$(b,_0x2ab71b(0x16b),W),$(b,_0x2ab71b(0x10b),_0x35c6da[_0x2ab71b(0x119)]),b=ie([_0x5cc80e(_0x5b3fcf,_0x49c8f9,_0x333fa5),w(0x1,_0x785250(_0x231213)),w(0x2,_0x49ccea)],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 _0x2ab71b=_0xe5c9;(function(_0x266013,_0x8de279){const _0x1576c5=_0xe5c9,_0x444791=_0x266013();while(!![]){try{const _0x3e38a0=-parseInt(_0x1576c5(0x146))/0x1+-parseInt(_0x1576c5(0x136))/0x2*(-parseInt(_0x1576c5(0x16c))/0x3)+-parseInt(_0x1576c5(0x13a))/0x4*(-parseInt(_0x1576c5(0x118))/0x5)+parseInt(_0x1576c5(0x161))/0x6+parseInt(_0x1576c5(0x112))/0x7+-parseInt(_0x1576c5(0x157))/0x8*(parseInt(_0x1576c5(0x135))/0x9)+parseInt(_0x1576c5(0x162))/0xa*(parseInt(_0x1576c5(0x129))/0xb);if(_0x3e38a0===_0x8de279)break;else _0x444791['push'](_0x444791['shift']());}catch(_0x2f0eff){_0x444791['push'](_0x444791['shift']());}}}(_0x1f39,0x4d455));import{CommentService as _0x4cdef4,CollaborationSessionService as _0x34e856,UniverCollaborationClientPlugin as _0x49c8f9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x333fa5}from'@univerjs-pro/license';function _0x1f39(){const _0x280914=['error','length','onStarting','/universer-api/comment/unit/','map','775072oYOPNH','_threadCommentDataSourceService','users','_init','Unknown','_sessionService','_threadCommentModel','commentUpdate$','OpenOrReOpen','Reply','3264270kABlkz','200090WOoNxP','_userService','getUser','addComment','_injector','userId','resolveComment','/delete','Edit','pluginName','3lxjtwU','replies','type','parse','Solve','code','saveCommentToSnapshot','Solved','get','972825FpJPmR','/add','_httpService','size','_threadCommentDataSource','getCurrentUser','25RcCvdM','UNIVER_UNKNOWN','/edit','stringify','UNRECOGNIZED','format','getMemberID','createTimestamp','getUnit','replyId','threadId','root','/universer-api/user/list','YYYY/MM/DD\x20HH:mm','syncUpdateMutationToColla','post','rangeId','77SuyDdU','disposeWithMe','deleteComment','_config','solved','slice','forEach','defineProperty','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','filter','body','thread-comment-data-source.config','18gzaAnp','21106VaxnFT','resolved','userID','Delete','50476yvSJqQ','getOwnPropertyDescriptor','user','reply','_initDataSource','subscribe','addUser','pipe','add','unitId','find','COMMENT','386462bdhxtr','listComments','dataSource','payload','_initUserSync','_configService','/reply','_commentService','rangeType','updateComment','Add','content'];_0x1f39=function(){return _0x280914;};return _0x1f39();}import{dayjs as _0x3952b6,UserManagerService as _0x3d1032,Inject as _0x785250,Injector as _0x231213,Disposable as _0x607ca7,CustomRangeType as _0x5c9b14,UniverInstanceType as _0x35c6da,DependentOn as _0x5cc80e,IConfigService as _0x49ccea,Plugin as _0x5c0206,merge as _0x4eb6ff}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5b3fcf}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2221fd,IThreadCommentDataSourceService as _0x50d9f5}from'@univerjs/thread-comment';import{bufferTime as _0x11dc46}from'rxjs';import{HTTPService as _0x497553}from'@univerjs/network';const W=_0x2ab71b(0x131);var I=(_0x6e12d2=>(_0x6e12d2[_0x6e12d2['OpenOrReOpen']=0x0]=_0x2ab71b(0x15f),_0x6e12d2[_0x6e12d2[_0x2ab71b(0x110)]=0x1]='Solved',_0x6e12d2[_0x6e12d2[_0x2ab71b(0x11c)]=-0x1]=_0x2ab71b(0x11c),_0x6e12d2))(I||{}),v=(_0x34cc17=>(_0x34cc17[_0x34cc17[_0x2ab71b(0x15b)]=0x0]='Unknown',_0x34cc17[_0x34cc17[_0x2ab71b(0x150)]=0x1]=_0x2ab71b(0x150),_0x34cc17[_0x34cc17[_0x2ab71b(0x160)]=0x2]=_0x2ab71b(0x160),_0x34cc17[_0x34cc17[_0x2ab71b(0x16a)]=0x3]=_0x2ab71b(0x16a),_0x34cc17[_0x34cc17[_0x2ab71b(0x139)]=0x4]='Delete',_0x34cc17[_0x34cc17[_0x2ab71b(0x10d)]=0x5]=_0x2ab71b(0x10d),_0x34cc17[_0x34cc17[_0x2ab71b(0x11c)]=-0x1]='UNRECOGNIZED',_0x34cc17))(v||{});const D=_0x2c2d05=>_0x3952b6(new Date(+_0x2c2d05))[_0x2ab71b(0x11d)](_0x2ab71b(0x125)),B=async(_0x192e7d,_0x2c134b)=>{const _0x452283=_0x2ab71b,_0x222c4b=_0x192e7d['get'](_0x3d1032),_0x1b0172=_0x192e7d[_0x452283(0x111)](_0x497553);_0x2c134b[_0x452283(0x12f)](_0x407d1a=>{const _0x3deb70=_0x452283;_0x222c4b[_0x3deb70(0x164)](_0x407d1a)&&_0x2c134b['delete'](_0x407d1a);}),_0x2c134b[_0x452283(0x115)]&&(await _0x1b0172[_0x452283(0x111)](_0x452283(0x124),{'params':{'userIDs':[..._0x2c134b]}}))[_0x452283(0x133)][_0x452283(0x159)][_0x452283(0x12f)](_0x1857f3=>{const _0x44032d=_0x452283;_0x1857f3&&_0x222c4b[_0x44032d(0x140)](_0x1857f3);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2891bd,_0x47c46f,_0x503d76,_0x42d8bc)=>{for(var _0x3924a7=_0x42d8bc>0x1?void 0x0:_0x42d8bc?K(_0x47c46f,_0x503d76):_0x47c46f,_0x181456=_0x2891bd['length']-0x1,_0x4f814c;_0x181456>=0x0;_0x181456--)(_0x4f814c=_0x2891bd[_0x181456])&&(_0x3924a7=_0x4f814c(_0x3924a7)||_0x3924a7);return _0x3924a7;},p=(_0x5450dc,_0x22afae)=>(_0x38f894,_0x29e217)=>_0x22afae(_0x38f894,_0x29e217,_0x5450dc);let S=class extends _0x607ca7{constructor(_0x5e3967,_0x2abae6,_0x262a1b,_0x3234c8){const _0x1e1c99=_0x2ab71b;super(),this['_commentService']=_0x5e3967,this['_threadCommentModel']=_0x2abae6,this[_0x1e1c99(0x163)]=_0x262a1b,this['_injector']=_0x3234c8,this[_0x1e1c99(0x15a)](),this[_0x1e1c99(0x14a)]();}[_0x2ab71b(0x14a)](){const _0x8b4d08=_0x2ab71b;this[_0x8b4d08(0x12a)](this[_0x8b4d08(0x15d)][_0x8b4d08(0x15e)][_0x8b4d08(0x141)](_0x11dc46(0x10))[_0x8b4d08(0x13f)](_0x18f49c=>{const _0x42f5e1=_0x8b4d08,_0x2afc62=new Set();_0x18f49c[_0x42f5e1(0x12f)](_0x3715bf=>{const _0x4ae1ed=_0x42f5e1;switch(_0x3715bf[_0x4ae1ed(0x10b)]){case'add':{const _0x25384f=_0x3715bf[_0x4ae1ed(0x149)]['personId'];_0x2afc62[_0x4ae1ed(0x142)](_0x25384f);break;}}}),B(this[_0x42f5e1(0x166)],_0x2afc62);}));}['_init'](){const _0xb54f3b=_0x2ab71b;this[_0xb54f3b(0x12a)](this[_0xb54f3b(0x14d)][_0xb54f3b(0x15e)][_0xb54f3b(0x13f)](async _0x2c6437=>{const _0x1c0a4a=_0xb54f3b;var _0x55917a,_0x121e41,_0x13a55d,_0x2f825c;const _0x44f035=(_0x55917a=this[_0x1c0a4a(0x15d)][_0x1c0a4a(0x120)](_0x2c6437['unitId'])[_0x1c0a4a(0x144)](_0x519f97=>_0x519f97[_0x1c0a4a(0x122)]===_0x2c6437[_0x1c0a4a(0x122)]))==null?void 0x0:_0x55917a['root'];if(!_0x44f035)return;const {unitId:_0x510c7a,subUnitId:_0x1a84fa}=_0x44f035;switch(_0x2c6437[_0x1c0a4a(0x13c)]&&this['_userService'][_0x1c0a4a(0x140)](_0x2c6437[_0x1c0a4a(0x13c)]),_0x2c6437['type']){case v[_0x1c0a4a(0x150)]:break;case v['Reply']:{this['_threadCommentModel'][_0x1c0a4a(0x165)](_0x510c7a,_0x1a84fa,{'unitId':_0x510c7a,'subUnitId':_0x1a84fa,'ref':'','id':_0x2c6437[_0x1c0a4a(0x121)],'dT':D(+_0x2c6437[_0x1c0a4a(0x11f)]),'threadId':_0x2c6437[_0x1c0a4a(0x122)],'personId':(_0x13a55d=(_0x121e41=_0x2c6437[_0x1c0a4a(0x13c)])==null?void 0x0:_0x121e41[_0x1c0a4a(0x138)])!=null?_0x13a55d:_0x2c6437[_0x1c0a4a(0x167)],'text':JSON[_0x1c0a4a(0x10c)](_0x2c6437['content']),'parentId':_0x44f035['id']});break;}case v[_0x1c0a4a(0x139)]:{const _0x35f50c=this[_0x1c0a4a(0x15d)]['getComment'](_0x510c7a,_0x1a84fa,_0x2c6437[_0x1c0a4a(0x121)]);_0x35f50c&&_0x35f50c['parentId']&&this[_0x1c0a4a(0x15d)]['deleteComment'](_0x510c7a,_0x1a84fa,_0x2c6437['replyId']);break;}case v['Edit']:{this[_0x1c0a4a(0x15d)][_0x1c0a4a(0x14f)](_0x510c7a,_0x1a84fa,{'commentId':_0x2c6437[_0x1c0a4a(0x121)],'text':JSON[_0x1c0a4a(0x10c)](_0x2c6437[_0x1c0a4a(0x151)])});break;}case v[_0x1c0a4a(0x10d)]:{const _0x4bb68e=(_0x2f825c=this['_threadCommentModel'][_0x1c0a4a(0x120)](_0x2c6437[_0x1c0a4a(0x143)])['find'](_0x25ee80=>_0x25ee80[_0x1c0a4a(0x122)]===_0x2c6437[_0x1c0a4a(0x122)]))==null?void 0x0:_0x2f825c[_0x1c0a4a(0x123)];_0x4bb68e&&this[_0x1c0a4a(0x15d)]['resolveComment'](_0x510c7a,_0x1a84fa,_0x4bb68e['id'],_0x2c6437[_0x1c0a4a(0x12d)]===I[_0x1c0a4a(0x110)]);break;}}}));}};S=V([p(0x0,_0x785250(_0x4cdef4)),p(0x1,_0x785250(_0x2221fd)),p(0x2,_0x785250(_0x3d1032)),p(0x3,_0x785250(_0x231213))],S);const z=_0x2ab71b(0x134),M={};var k=Object[_0x2ab71b(0x13b)],Q=(_0x448413,_0x4dd429,_0x5aba76,_0x458a5a)=>{for(var _0x5a44cb=_0x458a5a>0x1?void 0x0:_0x458a5a?k(_0x4dd429,_0x5aba76):_0x4dd429,_0x3f7c4e=_0x448413['length']-0x1,_0x244627;_0x3f7c4e>=0x0;_0x3f7c4e--)(_0x244627=_0x448413[_0x3f7c4e])&&(_0x5a44cb=_0x244627(_0x5a44cb)||_0x5a44cb);return _0x5a44cb;},_=(_0x431f82,_0x1b328e)=>(_0x7ad1bb,_0x57bcc2)=>_0x1b328e(_0x7ad1bb,_0x57bcc2,_0x431f82);function X(_0x40cec1,_0x23a5da){const _0x37b040=_0x2ab71b,_0x295796=_0x40cec1[_0x37b040(0x10a)][0x0];return{..._0x23a5da,'id':_0x295796[_0x37b040(0x121)],'resolved':_0x40cec1[_0x37b040(0x12d)]===0x1,'dT':D(_0x295796['createTimestamp']),'personId':_0x295796[_0x37b040(0x167)],'threadId':_0x295796['threadId']};}function ee(_0x4bbebc,_0x32121d,_0x31ebe3){const _0x1bac32=_0x2ab71b;var _0x9c239,_0x36553e;if(((_0x36553e=(_0x9c239=_0x4bbebc==null?void 0x0:_0x4bbebc['replies'])==null?void 0x0:_0x9c239[_0x1bac32(0x153)])!=null?_0x36553e:0x0)>0x0){const _0x65048b=(_0xcd6b10,_0x1f5ff8)=>({'id':_0xcd6b10[_0x1bac32(0x121)],'threadId':_0xcd6b10[_0x1bac32(0x122)],'dT':D(_0xcd6b10[_0x1bac32(0x11f)]),'personId':_0xcd6b10[_0x1bac32(0x167)],'resolved':_0x4bbebc[_0x1bac32(0x12d)]===I[_0x1bac32(0x110)],'unitId':_0x32121d,'subUnitId':_0x31ebe3,'text':JSON[_0x1bac32(0x10c)](_0xcd6b10[_0x1bac32(0x151)]),'parentId':_0x1f5ff8}),_0x4fa81a=_0x65048b(_0x4bbebc[_0x1bac32(0x10a)][0x0]);return{..._0x4fa81a,'children':_0x4bbebc[_0x1bac32(0x10a)][_0x1bac32(0x12e)](0x1)[_0x1bac32(0x156)](_0x39c81e=>_0x65048b(_0x39c81e,_0x4fa81a['id']))};}return null;}let f=class{constructor(_0x50369f,_0x1c91d5,_0xf4144b,_0x16a90a){const _0x14d095=_0x2ab71b;this[_0x14d095(0x114)]=_0x50369f,this[_0x14d095(0x163)]=_0x1c91d5,this['_sessionService']=_0xf4144b,this['_injector']=_0x16a90a;}async[_0x2ab71b(0x165)](_0x56f6ce){const _0x5b06c3=_0x2ab71b;var _0x843a9d,_0x4fe080;const {parentId:_0x522ad4,unitId:_0x529dae,text:_0xbc760b,threadId:_0x507d49}=_0x56f6ce,_0x5eaca5=(_0x4fe080=(_0x843a9d=_0xbc760b['customRanges'])==null?void 0x0:_0x843a9d['filter'](_0x338726=>_0x338726[_0x5b06c3(0x14e)]===_0x5c9b14[_0x5b06c3(0x145)])[_0x5b06c3(0x156)](_0x1b674f=>_0x1b674f[_0x5b06c3(0x128)]))!=null?_0x4fe080:[],_0x203908=JSON[_0x5b06c3(0x11b)](_0xbc760b),_0x458c0f=(await this[_0x5b06c3(0x15c)]['requireSession'](_0x529dae))[_0x5b06c3(0x11e)]();if(_0x522ad4){const _0x16eb72={'memberId':_0x458c0f,'unitId':_0x529dae,'content':_0x203908,'mention':_0x5eaca5,'threadId':_0x507d49},_0x124c02=(await this['_httpService']['post'](_0x5b06c3(0x155)+_0x529dae+_0x5b06c3(0x14c),{'body':_0x16eb72}))[_0x5b06c3(0x133)][_0x5b06c3(0x13d)];return{..._0x56f6ce,'id':_0x124c02[_0x5b06c3(0x121)],'dT':_0x3952b6(+_0x124c02[_0x5b06c3(0x11f)])['format'](_0x5b06c3(0x125)),'personId':_0x124c02[_0x5b06c3(0x167)]};}else{const _0x24321f={'memberId':_0x458c0f,'unitId':_0x529dae,'content':_0x203908,'mention':_0x5eaca5},_0x19e4e5=await this['_httpService'][_0x5b06c3(0x127)](_0x5b06c3(0x155)+_0x529dae+_0x5b06c3(0x113),{'body':_0x24321f});return X(_0x19e4e5[_0x5b06c3(0x133)]['comment'],_0x56f6ce);}}async[_0x2ab71b(0x14f)](_0x6b2394){const _0xfd8253=_0x2ab71b;var _0x1523fb,_0x1031d6;const {text:_0x546299,unitId:_0x196f86}=_0x6b2394,_0x12f852=(_0x1031d6=(_0x1523fb=_0x546299['customRanges'])==null?void 0x0:_0x1523fb[_0xfd8253(0x132)](_0x3685a5=>_0x3685a5[_0xfd8253(0x14e)]===_0x5c9b14['COMMENT'])[_0xfd8253(0x156)](_0x5f153a=>_0x5f153a[_0xfd8253(0x128)]))!=null?_0x1031d6:[],_0x1ae3dc=JSON[_0xfd8253(0x11b)](_0x546299),_0x5516f2=_0x6b2394[_0xfd8253(0x122)],_0x449577=_0x6b2394['id'],_0x40ea38={'memberId':(await this[_0xfd8253(0x15c)]['requireSession'](_0x196f86))['getMemberID'](),'unitId':_0x196f86,'threadId':_0x5516f2,'mention':_0x12f852,'content':_0x1ae3dc,'replyId':_0x449577},_0x2bf93d=await this[_0xfd8253(0x114)]['post'](_0xfd8253(0x155)+_0x196f86+_0xfd8253(0x11a),{'body':_0x40ea38});return!_0x2bf93d[_0xfd8253(0x133)][_0xfd8253(0x152)]||_0x2bf93d['body'][_0xfd8253(0x152)][_0xfd8253(0x10e)]===0x1;}async[_0x2ab71b(0x168)](_0x4bb8ef){const _0x312e98=_0x2ab71b,{unitId:_0x1dcf95}=_0x4bb8ef,_0x4fd8e4=_0x4bb8ef[_0x312e98(0x122)],_0x268b4d={'memberId':this[_0x312e98(0x163)][_0x312e98(0x117)]()['userID'],'unitId':_0x1dcf95,'threadId':_0x4fd8e4,'solved':_0x4bb8ef[_0x312e98(0x137)]?I['Solved']:I[_0x312e98(0x15f)]},_0x5b2eae=await this['_httpService'][_0x312e98(0x127)](_0x312e98(0x155)+_0x1dcf95+'/solved',{'body':_0x268b4d});return!_0x5b2eae[_0x312e98(0x133)][_0x312e98(0x152)]||_0x5b2eae[_0x312e98(0x133)][_0x312e98(0x152)][_0x312e98(0x10e)]===0x1;}async[_0x2ab71b(0x12b)](_0x455186,_0x22db3d,_0x185ec1,_0x4ab50b){const _0x223ee2=_0x2ab71b,_0xafe0e8={'memberId':(await this['_sessionService']['requireSession'](_0x455186))['getMemberID'](),'threadId':_0x185ec1,'replyId':_0x4ab50b,'unitId':_0x455186},_0x1ad951=await this[_0x223ee2(0x114)]['post'](_0x223ee2(0x155)+_0x455186+_0x223ee2(0x169),{'body':_0xafe0e8});return!_0x1ad951[_0x223ee2(0x133)][_0x223ee2(0x152)]||_0x1ad951[_0x223ee2(0x133)][_0x223ee2(0x152)]['code']===0x1;}async[_0x2ab71b(0x147)](_0xeec0d3,_0x3e733d,_0x47d842){const _0x4e5d07=_0x2ab71b,_0x35d037={'unitId':_0xeec0d3,'threadId':_0x47d842},_0xc7fa44=await this[_0x4e5d07(0x114)][_0x4e5d07(0x127)](_0x4e5d07(0x155)+_0xeec0d3+'/list',{'body':_0x35d037}),_0x36445f=_0x47d842['map'](_0x5c4c53=>ee(_0xc7fa44['body']['comments'][_0x5c4c53],_0xeec0d3,_0x3e733d))['filter'](Boolean);return Object['values'](_0xc7fa44[_0x4e5d07(0x133)]['users'])[_0x4e5d07(0x12f)](_0x23e15c=>{const _0x32b23e=_0x4e5d07;this[_0x32b23e(0x163)][_0x32b23e(0x140)](_0x23e15c);}),_0x36445f;}[_0x2ab71b(0x10f)](_0x1c0d1e){const _0x78531e=_0x2ab71b;return{'id':_0x1c0d1e['id'],'threadId':_0x1c0d1e[_0x78531e(0x122)],'ref':_0x1c0d1e['ref']};}};f=Q([_(0x0,_0x785250(_0x497553)),_(0x1,_0x785250(_0x3d1032)),_(0x2,_0x785250(_0x34e856)),_(0x3,_0x785250(_0x231213))],f);var re=Object[_0x2ab71b(0x13b)],te=(_0xee91bb,_0x235a59,_0x52de03,_0x28f217)=>{const _0x33cd5f=_0x2ab71b;for(var _0x1ddc58=_0x28f217>0x1?void 0x0:_0x28f217?re(_0x235a59,_0x52de03):_0x235a59,_0x46c8dd=_0xee91bb[_0x33cd5f(0x153)]-0x1,_0x5b236d;_0x46c8dd>=0x0;_0x46c8dd--)(_0x5b236d=_0xee91bb[_0x46c8dd])&&(_0x1ddc58=_0x5b236d(_0x1ddc58)||_0x1ddc58);return _0x1ddc58;},N=(_0x3bc0bf,_0x503314)=>(_0x2f4b4a,_0x62c6da)=>_0x503314(_0x2f4b4a,_0x62c6da,_0x3bc0bf);let g=class extends _0x607ca7{constructor(_0x496bfb,_0x18d088){const _0x12107a=_0x2ab71b;super(),this[_0x12107a(0x158)]=_0x496bfb,this[_0x12107a(0x116)]=_0x18d088,this['_initDataSource']();}[_0x2ab71b(0x13e)](){const _0x78f09c=_0x2ab71b;this[_0x78f09c(0x158)][_0x78f09c(0x148)]=this['_threadCommentDataSource'],this[_0x78f09c(0x158)][_0x78f09c(0x126)]=!0x1;}};g=te([N(0x0,_0x50d9f5),N(0x1,_0x785250(f))],g);var se=Object[_0x2ab71b(0x130)],oe=Object[_0x2ab71b(0x13b)],ne=(_0x5afe2e,_0x297d62,_0x4e0b46)=>_0x297d62 in _0x5afe2e?se(_0x5afe2e,_0x297d62,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4e0b46}):_0x5afe2e[_0x297d62]=_0x4e0b46,ie=(_0x5ccbe7,_0x290ef1,_0x3e4c99,_0x15879e)=>{const _0x541509=_0x2ab71b;for(var _0x98df6b=_0x15879e>0x1?void 0x0:_0x15879e?oe(_0x290ef1,_0x3e4c99):_0x290ef1,_0x5e6139=_0x5ccbe7[_0x541509(0x153)]-0x1,_0x2fba5a;_0x5e6139>=0x0;_0x5e6139--)(_0x2fba5a=_0x5ccbe7[_0x5e6139])&&(_0x98df6b=_0x2fba5a(_0x98df6b)||_0x98df6b);return _0x98df6b;},w=(_0xea0248,_0x358841)=>(_0x3e97ed,_0x58bffa)=>_0x358841(_0x3e97ed,_0x58bffa,_0xea0248),$=(_0x17b0d1,_0x5711cb,_0x4b0b5f)=>ne(_0x17b0d1,typeof _0x5711cb!='symbol'?_0x5711cb+'':_0x5711cb,_0x4b0b5f);function _0xe5c9(_0x4a38c2,_0x8d6108){const _0x1f394c=_0x1f39();return _0xe5c9=function(_0xe5c9ee,_0x7ac369){_0xe5c9ee=_0xe5c9ee-0x10a;let _0x48fc34=_0x1f394c[_0xe5c9ee];return _0x48fc34;},_0xe5c9(_0x4a38c2,_0x8d6108);}let b=class extends _0x5c0206{constructor(_0x495a2a=M,_0x37133d,_0x36f526){const _0x47243e=_0x2ab71b;super(),this['_config']=_0x495a2a,this['_injector']=_0x37133d,this[_0x47243e(0x14b)]=_0x36f526;const {..._0x4ed11a}=_0x4eb6ff({},M,this[_0x47243e(0x12c)]);this['_configService']['setConfig'](z,_0x4ed11a);}[_0x2ab71b(0x154)](){const _0x4bd321=_0x2ab71b;[[f],[g],[S]][_0x4bd321(0x12f)](_0x22db10=>{const _0x353cae=_0x4bd321;this[_0x353cae(0x166)][_0x353cae(0x142)](_0x22db10);});}['onReady'](){const _0x2ef20d=_0x2ab71b;this[_0x2ef20d(0x166)][_0x2ef20d(0x111)](g),this[_0x2ef20d(0x166)]['get'](S);}};$(b,_0x2ab71b(0x16b),W),$(b,_0x2ab71b(0x10b),_0x35c6da[_0x2ab71b(0x119)]),b=ie([_0x5cc80e(_0x5b3fcf,_0x49c8f9,_0x333fa5),w(0x1,_0x785250(_0x231213)),w(0x2,_0x49ccea)],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 _0x59e9(){const _0x39bcaa=['UniverCollaborationClientPlugin','@univerjs-pro/license','exports','YYYY/MM/DD\x20HH:mm','269316dTaOjj','users','toStringTag','_config','replyId','pipe','OpenOrReOpen','getComment','filter','find','map','createTimestamp','UniverThreadComment','89344mXrBaO','1SgznuY','UniverThreadCommentUIPlugin','getUser','length','syncUpdateMutationToColla','275XSBjWF','Reply','payload','UniverProThreadCommentDatasource','Disposable','size','rxjs','Solved','_commentService','381074REzvYa','123070OBmBXw','getMemberID','listComments','getCurrentUser','onReady','dataSource','reply','user','personId','_init','/universer-api/comment/unit/','_injector','4yjFxvg','HTTPService','dayjs','_initDataSource','12443054arONrH','@univerjs-pro/collaboration-client','Edit','/list','595980gaOFiq','commentUpdate$','resolveComment','ThreadCommentModel','content','Inject','type','solved','forEach','addUser','CustomRangeType','/edit','UNIVER_UNKNOWN','post','ref','values','UNRECOGNIZED','getOwnPropertyDescriptor','defineProperty','comments','addComment','parse','1989474HuByQw','CollaborationSessionService','_threadCommentModel','@univerjs/core','format','get','IConfigService','126hpulVS','Module','saveCommentToSnapshot','customRanges','userId','DependentOn','threadId','UserManagerService','Solve','stringify','unitId','@univerjs/thread-comment','/add','UniverNetwork','add','_userService','requireSession','parentId','getUnit','UniverInstanceType','rangeId','onStarting','userID','UniverProLicense','Injector','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','707TLBgLq','@univerjs/thread-comment-ui','body','UniverCore','_initUserSync','_httpService','_sessionService','thread-comment-data-source.config','COMMENT','updateComment','setConfig','Plugin','bufferTime','code','Delete','resolved','replies','Add','190ATBzag','_configService','rangeType','_threadCommentDataSourceService','_threadCommentDataSource','pluginName','error'];_0x59e9=function(){return _0x39bcaa;};return _0x59e9();}function _0x1c13(_0x3a8a1a,_0x4abe03){const _0x59e9e8=_0x59e9();return _0x1c13=function(_0x1c1373,_0x4b811f){_0x1c1373=_0x1c1373-0x170;let _0x4666fd=_0x59e9e8[_0x1c1373];return _0x4666fd;},_0x1c13(_0x3a8a1a,_0x4abe03);}(function(_0x55d524,_0x4b59af){const _0x59de5e=_0x1c13,_0x46b1ce=_0x55d524();while(!![]){try{const _0x2f3464=-parseInt(_0x59de5e(0x1d8))/0x1*(-parseInt(_0x59de5e(0x1e6))/0x2)+-parseInt(_0x59de5e(0x18c))/0x3*(parseInt(_0x59de5e(0x1f3))/0x4)+parseInt(_0x59de5e(0x1e7))/0x5*(parseInt(_0x59de5e(0x193))/0x6)+parseInt(_0x59de5e(0x1ad))/0x7*(parseInt(_0x59de5e(0x1d7))/0x8)+-parseInt(_0x59de5e(0x176))/0x9*(-parseInt(_0x59de5e(0x1bf))/0xa)+parseInt(_0x59de5e(0x1dd))/0xb*(-parseInt(_0x59de5e(0x1ca))/0xc)+-parseInt(_0x59de5e(0x172))/0xd;if(_0x2f3464===_0x4b59af)break;else _0x46b1ce['push'](_0x46b1ce['shift']());}catch(_0x1a6ebd){_0x46b1ce['push'](_0x46b1ce['shift']());}}}(_0x59e9,0xdeb3c),function(_0x36d218,_0x3162b3){const _0x51e6a4=_0x1c13;typeof exports=='object'&&typeof module<'u'?_0x3162b3(exports,require(_0x51e6a4(0x173)),require(_0x51e6a4(0x1c7)),require('@univerjs/core'),require(_0x51e6a4(0x1ae)),require(_0x51e6a4(0x19e)),require(_0x51e6a4(0x1e3)),require('@univerjs/network')):typeof define=='function'&&define['amd']?define([_0x51e6a4(0x1c8),_0x51e6a4(0x173),_0x51e6a4(0x1c7),_0x51e6a4(0x18f),_0x51e6a4(0x1ae),_0x51e6a4(0x19e),'rxjs','@univerjs/network'],_0x3162b3):(_0x36d218=typeof globalThis<'u'?globalThis:_0x36d218||self,_0x3162b3(_0x36d218[_0x51e6a4(0x1e0)]={},_0x36d218['UniverProCollaborationClient'],_0x36d218[_0x51e6a4(0x1aa)],_0x36d218[_0x51e6a4(0x1b0)],_0x36d218['UniverThreadCommentUi'],_0x36d218[_0x51e6a4(0x1d6)],_0x36d218[_0x51e6a4(0x1e3)],_0x36d218[_0x51e6a4(0x1a0)]));}(this,function(_0x4c9c42,_0x56d33,_0x2b8469,_0x4db6d5,_0x573e60,_0x31e269,_0x55c955,_0x21f292){'use strict';const _0x5f2104=_0x1c13;const _0x2e64ca=_0x5f2104(0x1ac);var _0x5f251f=(_0x2fd33c=>(_0x2fd33c[_0x2fd33c[_0x5f2104(0x1d0)]=0x0]='OpenOrReOpen',_0x2fd33c[_0x2fd33c[_0x5f2104(0x1e4)]=0x1]=_0x5f2104(0x1e4),_0x2fd33c[_0x2fd33c[_0x5f2104(0x186)]=-0x1]='UNRECOGNIZED',_0x2fd33c))(_0x5f251f||{}),_0x361f5a=(_0x1f810c=>(_0x1f810c[_0x1f810c['Unknown']=0x0]='Unknown',_0x1f810c[_0x1f810c['Add']=0x1]=_0x5f2104(0x1be),_0x1f810c[_0x1f810c['Reply']=0x2]=_0x5f2104(0x1de),_0x1f810c[_0x1f810c[_0x5f2104(0x174)]=0x3]=_0x5f2104(0x174),_0x1f810c[_0x1f810c[_0x5f2104(0x1bb)]=0x4]=_0x5f2104(0x1bb),_0x1f810c[_0x1f810c[_0x5f2104(0x19b)]=0x5]=_0x5f2104(0x19b),_0x1f810c[_0x1f810c['UNRECOGNIZED']=-0x1]=_0x5f2104(0x186),_0x1f810c))(_0x361f5a||{});const _0x327fff=_0x6952eb=>_0x4db6d5[_0x5f2104(0x170)](new Date(+_0x6952eb))['format'](_0x5f2104(0x1c9)),_0x4e188d=async(_0x4470fb,_0x3f84a5)=>{const _0x383e49=_0x5f2104,_0x1b8327=_0x4470fb[_0x383e49(0x191)](_0x4db6d5[_0x383e49(0x19a)]),_0x123639=_0x4470fb[_0x383e49(0x191)](_0x21f292[_0x383e49(0x1f4)]);_0x3f84a5['forEach'](_0x26273a=>{const _0x2b4e94=_0x383e49;_0x1b8327[_0x2b4e94(0x1da)](_0x26273a)&&_0x3f84a5['delete'](_0x26273a);}),_0x3f84a5[_0x383e49(0x1e2)]&&(await _0x123639[_0x383e49(0x191)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3f84a5]}}))[_0x383e49(0x1af)]['users']['forEach'](_0x4ad094=>{const _0x184f62=_0x383e49;_0x4ad094&&_0x1b8327[_0x184f62(0x17f)](_0x4ad094);});};var _0x5297a1=Object[_0x5f2104(0x187)],_0x1be2c1=(_0x520d8f,_0x39bd46,_0xf4280d,_0x325b48)=>{const _0x5e6f17=_0x5f2104;for(var _0x58e62b=_0x325b48>0x1?void 0x0:_0x325b48?_0x5297a1(_0x39bd46,_0xf4280d):_0x39bd46,_0x1a1ac5=_0x520d8f[_0x5e6f17(0x1db)]-0x1,_0x5574c9;_0x1a1ac5>=0x0;_0x1a1ac5--)(_0x5574c9=_0x520d8f[_0x1a1ac5])&&(_0x58e62b=_0x5574c9(_0x58e62b)||_0x58e62b);return _0x58e62b;},_0x2cd593=(_0x3e4549,_0x4837b5)=>(_0x39afa5,_0x3f0523)=>_0x4837b5(_0x39afa5,_0x3f0523,_0x3e4549);let _0xd04f3c=class extends _0x4db6d5['Disposable']{constructor(_0x4fa6c8,_0x512f0c,_0x50a0e6,_0x1f8dcf){const _0x1ffa0d=_0x5f2104;super(),this[_0x1ffa0d(0x1e5)]=_0x4fa6c8,this['_threadCommentModel']=_0x512f0c,this[_0x1ffa0d(0x1a2)]=_0x50a0e6,this[_0x1ffa0d(0x1f2)]=_0x1f8dcf,this[_0x1ffa0d(0x1f0)](),this[_0x1ffa0d(0x1b1)]();}[_0x5f2104(0x1b1)](){const _0x15171b=_0x5f2104;this['disposeWithMe'](this[_0x15171b(0x18e)][_0x15171b(0x177)][_0x15171b(0x1cf)](_0x55c955[_0x15171b(0x1b9)](0x10))['subscribe'](_0x3b4867=>{const _0x471e3b=_0x15171b,_0x15da93=new Set();_0x3b4867[_0x471e3b(0x17e)](_0x4f936c=>{const _0x2e9dce=_0x471e3b;switch(_0x4f936c['type']){case _0x2e9dce(0x1a1):{const _0x31d3df=_0x4f936c[_0x2e9dce(0x1df)][_0x2e9dce(0x1ef)];_0x15da93[_0x2e9dce(0x1a1)](_0x31d3df);break;}}}),_0x4e188d(this[_0x471e3b(0x1f2)],_0x15da93);}));}[_0x5f2104(0x1f0)](){const _0x12edeb=_0x5f2104;this['disposeWithMe'](this[_0x12edeb(0x1e5)][_0x12edeb(0x177)]['subscribe'](async _0x592ba8=>{const _0x11803b=_0x12edeb;var _0x14f298,_0x519605,_0x18e520,_0x49b2ff;const _0x19bda3=(_0x14f298=this[_0x11803b(0x18e)][_0x11803b(0x1a5)](_0x592ba8[_0x11803b(0x19d)])[_0x11803b(0x1d3)](_0x38b119=>_0x38b119[_0x11803b(0x199)]===_0x592ba8[_0x11803b(0x199)]))==null?void 0x0:_0x14f298['root'];if(!_0x19bda3)return;const {unitId:_0x367e26,subUnitId:_0x221c6a}=_0x19bda3;switch(_0x592ba8[_0x11803b(0x1ee)]&&this[_0x11803b(0x1a2)]['addUser'](_0x592ba8[_0x11803b(0x1ee)]),_0x592ba8[_0x11803b(0x17c)]){case _0x361f5a[_0x11803b(0x1be)]:break;case _0x361f5a[_0x11803b(0x1de)]:{this['_threadCommentModel'][_0x11803b(0x18a)](_0x367e26,_0x221c6a,{'unitId':_0x367e26,'subUnitId':_0x221c6a,'ref':'','id':_0x592ba8[_0x11803b(0x1ce)],'dT':_0x327fff(+_0x592ba8[_0x11803b(0x1d5)]),'threadId':_0x592ba8[_0x11803b(0x199)],'personId':(_0x18e520=(_0x519605=_0x592ba8[_0x11803b(0x1ee)])==null?void 0x0:_0x519605[_0x11803b(0x1a9)])!=null?_0x18e520:_0x592ba8[_0x11803b(0x197)],'text':JSON[_0x11803b(0x18b)](_0x592ba8[_0x11803b(0x17a)]),'parentId':_0x19bda3['id']});break;}case _0x361f5a[_0x11803b(0x1bb)]:{const _0xb65af4=this['_threadCommentModel'][_0x11803b(0x1d1)](_0x367e26,_0x221c6a,_0x592ba8[_0x11803b(0x1ce)]);_0xb65af4&&_0xb65af4[_0x11803b(0x1a4)]&&this['_threadCommentModel']['deleteComment'](_0x367e26,_0x221c6a,_0x592ba8[_0x11803b(0x1ce)]);break;}case _0x361f5a['Edit']:{this[_0x11803b(0x18e)]['updateComment'](_0x367e26,_0x221c6a,{'commentId':_0x592ba8[_0x11803b(0x1ce)],'text':JSON[_0x11803b(0x18b)](_0x592ba8[_0x11803b(0x17a)])});break;}case _0x361f5a[_0x11803b(0x19b)]:{const _0x4332fe=(_0x49b2ff=this[_0x11803b(0x18e)][_0x11803b(0x1a5)](_0x592ba8[_0x11803b(0x19d)])[_0x11803b(0x1d3)](_0x275f57=>_0x275f57[_0x11803b(0x199)]===_0x592ba8[_0x11803b(0x199)]))==null?void 0x0:_0x49b2ff['root'];_0x4332fe&&this[_0x11803b(0x18e)][_0x11803b(0x178)](_0x367e26,_0x221c6a,_0x4332fe['id'],_0x592ba8[_0x11803b(0x17d)]===_0x5f251f[_0x11803b(0x1e4)]);break;}}}));}};_0xd04f3c=_0x1be2c1([_0x2cd593(0x0,_0x4db6d5[_0x5f2104(0x17b)](_0x56d33['CommentService'])),_0x2cd593(0x1,_0x4db6d5[_0x5f2104(0x17b)](_0x31e269[_0x5f2104(0x179)])),_0x2cd593(0x2,_0x4db6d5[_0x5f2104(0x17b)](_0x4db6d5[_0x5f2104(0x19a)])),_0x2cd593(0x3,_0x4db6d5[_0x5f2104(0x17b)](_0x4db6d5['Injector']))],_0xd04f3c);const _0x27462f=_0x5f2104(0x1b4),_0x1ebf6a={};var _0x243354=Object[_0x5f2104(0x187)],_0x134bdc=(_0x7f48c2,_0x5a2774,_0x201bad,_0x33a14b)=>{const _0x3a0f25=_0x5f2104;for(var _0x39e1ab=_0x33a14b>0x1?void 0x0:_0x33a14b?_0x243354(_0x5a2774,_0x201bad):_0x5a2774,_0xac2a6b=_0x7f48c2[_0x3a0f25(0x1db)]-0x1,_0x3f0f27;_0xac2a6b>=0x0;_0xac2a6b--)(_0x3f0f27=_0x7f48c2[_0xac2a6b])&&(_0x39e1ab=_0x3f0f27(_0x39e1ab)||_0x39e1ab);return _0x39e1ab;},_0x4d3d7d=(_0x9ea745,_0x4362c6)=>(_0x235375,_0x4fb246)=>_0x4362c6(_0x235375,_0x4fb246,_0x9ea745);function _0x45c655(_0x36e16c,_0x26606e){const _0x31fd6f=_0x5f2104,_0x2dd0f0=_0x36e16c[_0x31fd6f(0x1bd)][0x0];return{..._0x26606e,'id':_0x2dd0f0['replyId'],'resolved':_0x36e16c[_0x31fd6f(0x17d)]===0x1,'dT':_0x327fff(_0x2dd0f0[_0x31fd6f(0x1d5)]),'personId':_0x2dd0f0['userId'],'threadId':_0x2dd0f0[_0x31fd6f(0x199)]};}function _0x49c2e9(_0x20d3ff,_0x257308,_0x29a1e3){const _0x3f708e=_0x5f2104;var _0x26304f,_0x30142a;if(((_0x30142a=(_0x26304f=_0x20d3ff==null?void 0x0:_0x20d3ff[_0x3f708e(0x1bd)])==null?void 0x0:_0x26304f['length'])!=null?_0x30142a:0x0)>0x0){const _0x143ee6=(_0x4146da,_0x385da6)=>({'id':_0x4146da[_0x3f708e(0x1ce)],'threadId':_0x4146da[_0x3f708e(0x199)],'dT':_0x327fff(_0x4146da['createTimestamp']),'personId':_0x4146da[_0x3f708e(0x197)],'resolved':_0x20d3ff['solved']===_0x5f251f[_0x3f708e(0x1e4)],'unitId':_0x257308,'subUnitId':_0x29a1e3,'text':JSON[_0x3f708e(0x18b)](_0x4146da[_0x3f708e(0x17a)]),'parentId':_0x385da6}),_0x1b8285=_0x143ee6(_0x20d3ff[_0x3f708e(0x1bd)][0x0]);return{..._0x1b8285,'children':_0x20d3ff[_0x3f708e(0x1bd)]['slice'](0x1)[_0x3f708e(0x1d4)](_0x50940e=>_0x143ee6(_0x50940e,_0x1b8285['id']))};}return null;}let _0x4d429c=class{constructor(_0x446249,_0x4ede34,_0x5edbdb,_0x18538b){const _0x4e772f=_0x5f2104;this['_httpService']=_0x446249,this[_0x4e772f(0x1a2)]=_0x4ede34,this[_0x4e772f(0x1b3)]=_0x5edbdb,this[_0x4e772f(0x1f2)]=_0x18538b;}async[_0x5f2104(0x18a)](_0x2fd2d2){const _0x2857c0=_0x5f2104;var _0x25de1c,_0x4f3a62;const {parentId:_0x43986d,unitId:_0x20f1bd,text:_0x3c7dd1,threadId:_0x1d5fcb}=_0x2fd2d2,_0x2f355e=(_0x4f3a62=(_0x25de1c=_0x3c7dd1[_0x2857c0(0x196)])==null?void 0x0:_0x25de1c[_0x2857c0(0x1d2)](_0x1834b4=>_0x1834b4[_0x2857c0(0x1c1)]===_0x4db6d5[_0x2857c0(0x180)]['COMMENT'])['map'](_0x54ea16=>_0x54ea16[_0x2857c0(0x1a7)]))!=null?_0x4f3a62:[],_0x208983=JSON['stringify'](_0x3c7dd1),_0x5ec605=(await this[_0x2857c0(0x1b3)][_0x2857c0(0x1a3)](_0x20f1bd))[_0x2857c0(0x1e8)]();if(_0x43986d){const _0x500862={'memberId':_0x5ec605,'unitId':_0x20f1bd,'content':_0x208983,'mention':_0x2f355e,'threadId':_0x1d5fcb},_0x2a439f=(await this[_0x2857c0(0x1b2)][_0x2857c0(0x183)](_0x2857c0(0x1f1)+_0x20f1bd+'/reply',{'body':_0x500862}))['body'][_0x2857c0(0x1ed)];return{..._0x2fd2d2,'id':_0x2a439f[_0x2857c0(0x1ce)],'dT':_0x4db6d5[_0x2857c0(0x170)](+_0x2a439f[_0x2857c0(0x1d5)])[_0x2857c0(0x190)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2a439f[_0x2857c0(0x197)]};}else{const _0x318f4f={'memberId':_0x5ec605,'unitId':_0x20f1bd,'content':_0x208983,'mention':_0x2f355e},_0x36a39f=await this['_httpService']['post'](_0x2857c0(0x1f1)+_0x20f1bd+_0x2857c0(0x19f),{'body':_0x318f4f});return _0x45c655(_0x36a39f['body']['comment'],_0x2fd2d2);}}async[_0x5f2104(0x1b6)](_0x11b119){const _0x4e464d=_0x5f2104;var _0x1714c7,_0x1ac762;const {text:_0x330f1f,unitId:_0x3c56cb}=_0x11b119,_0x409d6d=(_0x1ac762=(_0x1714c7=_0x330f1f['customRanges'])==null?void 0x0:_0x1714c7[_0x4e464d(0x1d2)](_0x2b30c4=>_0x2b30c4[_0x4e464d(0x1c1)]===_0x4db6d5[_0x4e464d(0x180)][_0x4e464d(0x1b5)])['map'](_0x57c6d5=>_0x57c6d5[_0x4e464d(0x1a7)]))!=null?_0x1ac762:[],_0x5622b7=JSON[_0x4e464d(0x19c)](_0x330f1f),_0x3c5f75=_0x11b119['threadId'],_0x781d40=_0x11b119['id'],_0x3cb78d={'memberId':(await this['_sessionService'][_0x4e464d(0x1a3)](_0x3c56cb))[_0x4e464d(0x1e8)](),'unitId':_0x3c56cb,'threadId':_0x3c5f75,'mention':_0x409d6d,'content':_0x5622b7,'replyId':_0x781d40},_0x592b34=await this[_0x4e464d(0x1b2)][_0x4e464d(0x183)](_0x4e464d(0x1f1)+_0x3c56cb+_0x4e464d(0x181),{'body':_0x3cb78d});return!_0x592b34[_0x4e464d(0x1af)][_0x4e464d(0x1c5)]||_0x592b34[_0x4e464d(0x1af)]['error'][_0x4e464d(0x1ba)]===0x1;}async[_0x5f2104(0x178)](_0x2f358f){const _0x2851af=_0x5f2104,{unitId:_0x3dadca}=_0x2f358f,_0x3a0890=_0x2f358f[_0x2851af(0x199)],_0x264c7a={'memberId':this[_0x2851af(0x1a2)][_0x2851af(0x1ea)]()[_0x2851af(0x1a9)],'unitId':_0x3dadca,'threadId':_0x3a0890,'solved':_0x2f358f[_0x2851af(0x1bc)]?_0x5f251f[_0x2851af(0x1e4)]:_0x5f251f['OpenOrReOpen']},_0x3f9a5b=await this[_0x2851af(0x1b2)]['post']('/universer-api/comment/unit/'+_0x3dadca+'/solved',{'body':_0x264c7a});return!_0x3f9a5b[_0x2851af(0x1af)][_0x2851af(0x1c5)]||_0x3f9a5b[_0x2851af(0x1af)]['error'][_0x2851af(0x1ba)]===0x1;}async['deleteComment'](_0x3ddef4,_0x5713c4,_0x11c287,_0x3dc0bd){const _0x315ad1=_0x5f2104,_0xc8e981={'memberId':(await this[_0x315ad1(0x1b3)][_0x315ad1(0x1a3)](_0x3ddef4))['getMemberID'](),'threadId':_0x11c287,'replyId':_0x3dc0bd,'unitId':_0x3ddef4},_0x4ed3b6=await this['_httpService'][_0x315ad1(0x183)](_0x315ad1(0x1f1)+_0x3ddef4+'/delete',{'body':_0xc8e981});return!_0x4ed3b6[_0x315ad1(0x1af)][_0x315ad1(0x1c5)]||_0x4ed3b6['body'][_0x315ad1(0x1c5)][_0x315ad1(0x1ba)]===0x1;}async[_0x5f2104(0x1e9)](_0x36d149,_0x511748,_0x244dd3){const _0x33fe64=_0x5f2104,_0x3b3463={'unitId':_0x36d149,'threadId':_0x244dd3},_0x1d649f=await this[_0x33fe64(0x1b2)][_0x33fe64(0x183)](_0x33fe64(0x1f1)+_0x36d149+_0x33fe64(0x175),{'body':_0x3b3463}),_0x4cb36c=_0x244dd3[_0x33fe64(0x1d4)](_0x2cee0e=>_0x49c2e9(_0x1d649f[_0x33fe64(0x1af)][_0x33fe64(0x189)][_0x2cee0e],_0x36d149,_0x511748))['filter'](Boolean);return Object[_0x33fe64(0x185)](_0x1d649f[_0x33fe64(0x1af)][_0x33fe64(0x1cb)])[_0x33fe64(0x17e)](_0x37025e=>{const _0x3b4c59=_0x33fe64;this[_0x3b4c59(0x1a2)][_0x3b4c59(0x17f)](_0x37025e);}),_0x4cb36c;}[_0x5f2104(0x195)](_0x118007){const _0x36e9dc=_0x5f2104;return{'id':_0x118007['id'],'threadId':_0x118007[_0x36e9dc(0x199)],'ref':_0x118007[_0x36e9dc(0x184)]};}};_0x4d429c=_0x134bdc([_0x4d3d7d(0x0,_0x4db6d5['Inject'](_0x21f292[_0x5f2104(0x1f4)])),_0x4d3d7d(0x1,_0x4db6d5['Inject'](_0x4db6d5['UserManagerService'])),_0x4d3d7d(0x2,_0x4db6d5[_0x5f2104(0x17b)](_0x56d33[_0x5f2104(0x18d)])),_0x4d3d7d(0x3,_0x4db6d5[_0x5f2104(0x17b)](_0x4db6d5[_0x5f2104(0x1ab)]))],_0x4d429c);var _0x2a049b=Object['getOwnPropertyDescriptor'],_0x3a82d7=(_0x41ed67,_0x1143ea,_0x226cb4,_0x11a2b3)=>{for(var _0x4da85d=_0x11a2b3>0x1?void 0x0:_0x11a2b3?_0x2a049b(_0x1143ea,_0x226cb4):_0x1143ea,_0x388e6e=_0x41ed67['length']-0x1,_0x2445ba;_0x388e6e>=0x0;_0x388e6e--)(_0x2445ba=_0x41ed67[_0x388e6e])&&(_0x4da85d=_0x2445ba(_0x4da85d)||_0x4da85d);return _0x4da85d;},_0x22ff95=(_0x3a57a7,_0x3a55b1)=>(_0x7b3141,_0x493cae)=>_0x3a55b1(_0x7b3141,_0x493cae,_0x3a57a7);let _0x4a98a2=class extends _0x4db6d5[_0x5f2104(0x1e1)]{constructor(_0x3759b7,_0x3b1c67){const _0x2bbcba=_0x5f2104;super(),this['_threadCommentDataSourceService']=_0x3759b7,this['_threadCommentDataSource']=_0x3b1c67,this[_0x2bbcba(0x171)]();}[_0x5f2104(0x171)](){const _0x27fbb7=_0x5f2104;this[_0x27fbb7(0x1c2)][_0x27fbb7(0x1ec)]=this[_0x27fbb7(0x1c3)],this[_0x27fbb7(0x1c2)][_0x27fbb7(0x1dc)]=!0x1;}};_0x4a98a2=_0x3a82d7([_0x22ff95(0x0,_0x31e269['IThreadCommentDataSourceService']),_0x22ff95(0x1,_0x4db6d5[_0x5f2104(0x17b)](_0x4d429c))],_0x4a98a2);var _0x3aa5bb=Object[_0x5f2104(0x188)],_0x3f72c5=Object[_0x5f2104(0x187)],_0x53bfc8=(_0x10ae59,_0x5ee202,_0x2e8318)=>_0x5ee202 in _0x10ae59?_0x3aa5bb(_0x10ae59,_0x5ee202,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2e8318}):_0x10ae59[_0x5ee202]=_0x2e8318,_0x75fa9b=(_0x4177dd,_0x1afc40,_0x4e6862,_0x2b64bb)=>{for(var _0x58fa3a=_0x2b64bb>0x1?void 0x0:_0x2b64bb?_0x3f72c5(_0x1afc40,_0x4e6862):_0x1afc40,_0x16eb59=_0x4177dd['length']-0x1,_0x23017c;_0x16eb59>=0x0;_0x16eb59--)(_0x23017c=_0x4177dd[_0x16eb59])&&(_0x58fa3a=_0x23017c(_0x58fa3a)||_0x58fa3a);return _0x58fa3a;},_0x3fd815=(_0x3d7e18,_0x5d4f4a)=>(_0x1dd298,_0x20c4c2)=>_0x5d4f4a(_0x1dd298,_0x20c4c2,_0x3d7e18),_0x334345=(_0x33d7db,_0x33f734,_0x45b017)=>_0x53bfc8(_0x33d7db,typeof _0x33f734!='symbol'?_0x33f734+'':_0x33f734,_0x45b017);_0x4c9c42['UniverThreadCommentDataSourcePlugin']=class extends _0x4db6d5[_0x5f2104(0x1b8)]{constructor(_0x2622cf=_0x1ebf6a,_0x712a31,_0x56392a){const _0x309d1f=_0x5f2104;super(),this[_0x309d1f(0x1cd)]=_0x2622cf,this[_0x309d1f(0x1f2)]=_0x712a31,this[_0x309d1f(0x1c0)]=_0x56392a;const {..._0x18ca64}=_0x4db6d5['merge']({},_0x1ebf6a,this[_0x309d1f(0x1cd)]);this[_0x309d1f(0x1c0)][_0x309d1f(0x1b7)](_0x27462f,_0x18ca64);}[_0x5f2104(0x1a8)](){const _0x4968fc=_0x5f2104;[[_0x4d429c],[_0x4a98a2],[_0xd04f3c]][_0x4968fc(0x17e)](_0x4d3785=>{const _0x36c76a=_0x4968fc;this[_0x36c76a(0x1f2)][_0x36c76a(0x1a1)](_0x4d3785);});}[_0x5f2104(0x1eb)](){const _0x33a255=_0x5f2104;this[_0x33a255(0x1f2)]['get'](_0x4a98a2),this[_0x33a255(0x1f2)]['get'](_0xd04f3c);}},_0x334345(_0x4c9c42['UniverThreadCommentDataSourcePlugin'],_0x5f2104(0x1c4),_0x2e64ca),_0x334345(_0x4c9c42['UniverThreadCommentDataSourcePlugin'],'type',_0x4db6d5[_0x5f2104(0x1a6)][_0x5f2104(0x182)]),_0x4c9c42['UniverThreadCommentDataSourcePlugin']=_0x75fa9b([_0x4db6d5[_0x5f2104(0x198)](_0x573e60[_0x5f2104(0x1d9)],_0x56d33[_0x5f2104(0x1c6)],_0x2b8469['UniverLicensePlugin']),_0x3fd815(0x1,_0x4db6d5['Inject'](_0x4db6d5[_0x5f2104(0x1ab)])),_0x3fd815(0x2,_0x4db6d5[_0x5f2104(0x192)])],_0x4c9c42['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x4c9c42,Symbol[_0x5f2104(0x1cc)],{'value':_0x5f2104(0x194)});}));
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-nightly.202505261607",
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-nightly.202505261607",
49
+ "@univerjs-pro/license": "0.8.0-nightly.202505261607",
50
+ "@univerjs/core": "0.8.0-nightly.202505261607",
51
+ "@univerjs/protocol": "0.1.47-alpha.0",
52
+ "@univerjs/network": "0.8.0-nightly.202505261607",
53
+ "@univerjs/thread-comment": "0.8.0-nightly.202505261607",
54
+ "@univerjs/thread-comment-ui": "0.8.0-nightly.202505261607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.8.3",
59
59
  "vite": "^6.3.5",
60
- "vitest": "^3.1.3",
61
- "@univerjs-infra/shared": "0.7.0"
60
+ "vitest": "^3.1.4",
61
+ "@univerjs-infra/shared": "0.8.0-beta.0"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",