@univerjs-pro/thread-comment-datasource 0.16.1 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x320824=_0x3448;function _0x4f97(){const _0x17a9ed=['listComments','CommentService','DependentOn','requireSession','customRanges','/delete','size','YYYY/MM/DD\x20HH:mm','6xxZifR','473ueSshA','user','/edit','length','/add','threadId','forEach','_httpService','filter','/universer-api/user/list','values','unitId','rangeId','ThreadCommentModel','code','/universer-api/comment/unit/','Unknown','_initDataSource','UniverInstanceType','CollaborationSessionService','2060073rICuiO','get','content','map','comments','286010FvwHGc','stringify','27100KwSeRg','CustomRangeType','addComment','Reply','dayjs','UNIVER_UNKNOWN','_commentService','UniverThreadCommentUIPlugin','root','pluginName','pipe','_config','userId','_sessionService','getMemberID','add','resolveComment','Delete','UniverThreadCommentDataSourcePlugin','userID','_init','Injector','413KKssRe','getOwnPropertyDescriptor','getUnit','payload','createTimestamp','error','IThreadCommentDataSourceService','382tBUBfu','rangeType','find','subscribe','1692700xoGuUx','_configService','personId','Module','delete','toStringTag','UserManagerService','UNRECOGNIZED','replyId','_threadCommentDataSource','comment','addUser','getComment','replies','UniverCollaborationClientPlugin','bufferTime','Solve','parse','_initUserSync','dataSource','/solved','_threadCommentDataSourceService','Disposable','1452304dqXssr','merge','thread-comment-data-source.config','Solved','solved','COMMENT','commentUpdate$','2523936SDwldi','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','OpenOrReOpen','format','_userService','HTTPService','post','getUser','body','type','Inject','slice','Add','defineProperty','Edit','users','174MuCQwi','resolved','setConfig','_threadCommentModel','_injector','/list'];_0x4f97=function(){return _0x17a9ed;};return _0x4f97();}(function(_0x289cb4,_0x413791){const _0x50013d=_0x3448,_0x9d40e5=_0x289cb4();while(!![]){try{const _0x4d5a04=-parseInt(_0x50013d(0x1e8))/0x1*(parseInt(_0x50013d(0x1ef))/0x2)+-parseInt(_0x50013d(0x221))/0x3*(parseInt(_0x50013d(0x1d2))/0x4)+-parseInt(_0x50013d(0x1f3))/0x5+parseInt(_0x50013d(0x1b6))/0x6*(-parseInt(_0x50013d(0x20a))/0x7)+parseInt(_0x50013d(0x211))/0x8+-parseInt(_0x50013d(0x1cb))/0x9+parseInt(_0x50013d(0x1d0))/0xa*(parseInt(_0x50013d(0x1b7))/0xb);if(_0x4d5a04===_0x413791)break;else _0x9d40e5['push'](_0x9d40e5['shift']());}catch(_0xf696bb){_0x9d40e5['push'](_0x9d40e5['shift']());}}}(_0x4f97,0x48e61));Object[_0x320824(0x21e)](exports,Symbol[_0x320824(0x1f8)],{'value':_0x320824(0x1f6)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x320824(0x212);var I=(_0x562c3a=>(_0x562c3a[_0x562c3a['OpenOrReOpen']=0x0]=_0x320824(0x213),_0x562c3a[_0x562c3a[_0x320824(0x20d)]=0x1]='Solved',_0x562c3a[_0x562c3a[_0x320824(0x1fa)]=-0x1]='UNRECOGNIZED',_0x562c3a))(I||{}),v=(_0x246be9=>(_0x246be9[_0x246be9[_0x320824(0x1c7)]=0x0]=_0x320824(0x1c7),_0x246be9[_0x246be9[_0x320824(0x21d)]=0x1]='Add',_0x246be9[_0x246be9[_0x320824(0x1d5)]=0x2]=_0x320824(0x1d5),_0x246be9[_0x246be9[_0x320824(0x21f)]=0x3]=_0x320824(0x21f),_0x246be9[_0x246be9['Delete']=0x4]=_0x320824(0x1e3),_0x246be9[_0x246be9[_0x320824(0x203)]=0x5]=_0x320824(0x203),_0x246be9[_0x246be9['UNRECOGNIZED']=-0x1]=_0x320824(0x1fa),_0x246be9))(v||{});const f=_0x21ebfd=>c[_0x320824(0x1d6)](new Date(+_0x21ebfd))[_0x320824(0x214)](_0x320824(0x22e)),R=async(_0x32f931,_0x21fc0e)=>{const _0x504151=_0x320824,_0x57fb28=_0x32f931['get'](c[_0x504151(0x1f9)]),_0x3ea110=_0x32f931[_0x504151(0x1cc)](P['HTTPService']);_0x21fc0e[_0x504151(0x1bd)](_0x41ae85=>{const _0xc82df=_0x504151;_0x57fb28[_0xc82df(0x218)](_0x41ae85)&&_0x21fc0e[_0xc82df(0x1f7)](_0x41ae85);}),_0x21fc0e[_0x504151(0x22d)]&&(await _0x3ea110[_0x504151(0x1cc)](_0x504151(0x1c0),{'params':{'userIDs':[..._0x21fc0e]}}))['body'][_0x504151(0x220)][_0x504151(0x1bd)](_0x1486ca=>{const _0x22a211=_0x504151;_0x1486ca&&_0x57fb28[_0x22a211(0x1fe)](_0x1486ca);});};var $=Object[_0x320824(0x1e9)],E=(_0xc48fca,_0x4e173e,_0x2bf1e9,_0xd6fd4b)=>{const _0x3f779e=_0x320824;for(var _0x26fa8f=_0xd6fd4b>0x1?void 0x0:_0xd6fd4b?$(_0x4e173e,_0x2bf1e9):_0x4e173e,_0x1bff71=_0xc48fca[_0x3f779e(0x1ba)]-0x1,_0x11ae3b;_0x1bff71>=0x0;_0x1bff71--)(_0x11ae3b=_0xc48fca[_0x1bff71])&&(_0x26fa8f=_0x11ae3b(_0x26fa8f)||_0x26fa8f);return _0x26fa8f;},S=(_0x4c690b,_0xac982f)=>(_0x45bc73,_0x1f747d)=>_0xac982f(_0x45bc73,_0x1f747d,_0x4c690b);let _=class extends c[_0x320824(0x209)]{constructor(_0x24a123,_0x587a3f,_0x3a7409,_0x22b132){const _0x4ded85=_0x320824;super(),this[_0x4ded85(0x1d8)]=_0x24a123,this[_0x4ded85(0x224)]=_0x587a3f,this[_0x4ded85(0x215)]=_0x3a7409,this['_injector']=_0x22b132,this[_0x4ded85(0x1e6)](),this['_initUserSync']();}[_0x320824(0x205)](){const _0x32ff98=_0x320824;this['disposeWithMe'](this[_0x32ff98(0x224)][_0x32ff98(0x210)][_0x32ff98(0x1dc)](j[_0x32ff98(0x202)](0x10))[_0x32ff98(0x1f2)](_0x2ea23d=>{const _0x21897a=_0x32ff98,_0x2273e4=new Set();_0x2ea23d[_0x21897a(0x1bd)](_0x481c88=>{const _0x5ca8b5=_0x21897a;if(_0x481c88[_0x5ca8b5(0x21a)]===_0x5ca8b5(0x1e1)){const _0x1012c8=_0x481c88[_0x5ca8b5(0x1eb)][_0x5ca8b5(0x1f5)];_0x2273e4[_0x5ca8b5(0x1e1)](_0x1012c8);}}),R(this['_injector'],_0x2273e4);}));}[_0x320824(0x1e6)](){const _0x21e10c=_0x320824;this['disposeWithMe'](this[_0x21e10c(0x1d8)][_0x21e10c(0x210)][_0x21e10c(0x1f2)](async _0x3b9455=>{const _0x1ca81a=_0x21e10c;var _0x39a7bc,_0x3be3a1,_0x440939,_0x201b2e;const _0x11f726=(_0x39a7bc=this[_0x1ca81a(0x224)][_0x1ca81a(0x1ea)](_0x3b9455['unitId'])[_0x1ca81a(0x1f1)](_0x1e679f=>_0x1e679f[_0x1ca81a(0x1bc)]===_0x3b9455[_0x1ca81a(0x1bc)]))==null?void 0x0:_0x39a7bc[_0x1ca81a(0x1da)];if(!_0x11f726)return;const {unitId:_0x5a64b3,subUnitId:_0x40653e}=_0x11f726;switch(_0x3b9455[_0x1ca81a(0x1b8)]&&this[_0x1ca81a(0x215)][_0x1ca81a(0x1fe)](_0x3b9455['user']),_0x3b9455[_0x1ca81a(0x21a)]){case v[_0x1ca81a(0x21d)]:break;case v['Reply']:{this[_0x1ca81a(0x224)][_0x1ca81a(0x1d4)](_0x5a64b3,_0x40653e,{'unitId':_0x5a64b3,'subUnitId':_0x40653e,'ref':'','id':_0x3b9455[_0x1ca81a(0x1fb)],'dT':f(+_0x3b9455['createTimestamp']),'threadId':_0x3b9455[_0x1ca81a(0x1bc)],'personId':(_0x440939=(_0x3be3a1=_0x3b9455[_0x1ca81a(0x1b8)])==null?void 0x0:_0x3be3a1[_0x1ca81a(0x1e5)])!=null?_0x440939:_0x3b9455[_0x1ca81a(0x1de)],'text':JSON[_0x1ca81a(0x204)](_0x3b9455[_0x1ca81a(0x1cd)]),'parentId':_0x11f726['id']});break;}case v['Delete']:{const _0x30e719=this[_0x1ca81a(0x224)][_0x1ca81a(0x1ff)](_0x5a64b3,_0x40653e,_0x3b9455[_0x1ca81a(0x1fb)]);_0x30e719&&_0x30e719['parentId']&&this[_0x1ca81a(0x224)]['deleteComment'](_0x5a64b3,_0x40653e,_0x3b9455[_0x1ca81a(0x1fb)]);break;}case v['Edit']:{this['_threadCommentModel']['updateComment'](_0x5a64b3,_0x40653e,{'commentId':_0x3b9455['replyId'],'text':JSON[_0x1ca81a(0x204)](_0x3b9455['content'])});break;}case v['Solve']:{const _0x22f02a=(_0x201b2e=this[_0x1ca81a(0x224)][_0x1ca81a(0x1ea)](_0x3b9455[_0x1ca81a(0x1c2)])[_0x1ca81a(0x1f1)](_0x4c56ad=>_0x4c56ad['threadId']===_0x3b9455['threadId']))==null?void 0x0:_0x201b2e[_0x1ca81a(0x1da)];_0x22f02a&&this['_threadCommentModel'][_0x1ca81a(0x1e2)](_0x5a64b3,_0x40653e,_0x22f02a['id'],_0x3b9455['solved']===I[_0x1ca81a(0x20d)]);break;}}}));}};_=E([S(0x0,c[_0x320824(0x21b)](b[_0x320824(0x228)])),S(0x1,c[_0x320824(0x21b)](M[_0x320824(0x1c4)])),S(0x2,c[_0x320824(0x21b)](c[_0x320824(0x1f9)])),S(0x3,c[_0x320824(0x21b)](c[_0x320824(0x1e7)]))],_);const q=_0x320824(0x20c),D={};var A=Object[_0x320824(0x1e9)],x=(_0x614bc9,_0x2816f9,_0x2312a4,_0x2dc4c2)=>{const _0x4d41fa=_0x320824;for(var _0x205f06=_0x2dc4c2>0x1?void 0x0:_0x2dc4c2?A(_0x2816f9,_0x2312a4):_0x2816f9,_0x342237=_0x614bc9[_0x4d41fa(0x1ba)]-0x1,_0x304db1;_0x342237>=0x0;_0x342237--)(_0x304db1=_0x614bc9[_0x342237])&&(_0x205f06=_0x304db1(_0x205f06)||_0x205f06);return _0x205f06;},C=(_0x56bfb8,_0x4dbe4b)=>(_0x270730,_0x5ea6a2)=>_0x4dbe4b(_0x270730,_0x5ea6a2,_0x56bfb8);function Y(_0xe3b5e9,_0x1011d0){const _0x40e66d=_0x320824,_0x6f779d=_0xe3b5e9[_0x40e66d(0x200)][0x0];return{..._0x1011d0,'id':_0x6f779d[_0x40e66d(0x1fb)],'resolved':_0xe3b5e9[_0x40e66d(0x20e)]===0x1,'dT':f(_0x6f779d[_0x40e66d(0x1ec)]),'personId':_0x6f779d[_0x40e66d(0x1de)],'threadId':_0x6f779d[_0x40e66d(0x1bc)]};}function G(_0x193ed8,_0x2ff490,_0x2cf254){const _0x27bbb9=_0x320824;var _0x3d3bd1,_0x43c80c;if(((_0x43c80c=(_0x3d3bd1=_0x193ed8==null?void 0x0:_0x193ed8['replies'])==null?void 0x0:_0x3d3bd1[_0x27bbb9(0x1ba)])!=null?_0x43c80c:0x0)>0x0){const _0xbe8caa=(_0x519c91,_0x511fee)=>({'id':_0x519c91[_0x27bbb9(0x1fb)],'threadId':_0x519c91[_0x27bbb9(0x1bc)],'dT':f(_0x519c91['createTimestamp']),'personId':_0x519c91[_0x27bbb9(0x1de)],'resolved':_0x193ed8[_0x27bbb9(0x20e)]===I[_0x27bbb9(0x20d)],'unitId':_0x2ff490,'subUnitId':_0x2cf254,'text':JSON['parse'](_0x519c91[_0x27bbb9(0x1cd)]),'parentId':_0x511fee}),_0x46fc10=_0xbe8caa(_0x193ed8[_0x27bbb9(0x200)][0x0]);return{..._0x46fc10,'children':_0x193ed8[_0x27bbb9(0x200)][_0x27bbb9(0x21c)](0x1)[_0x27bbb9(0x1ce)](_0x2adc9b=>_0xbe8caa(_0x2adc9b,_0x46fc10['id']))};}return null;}let p=class{constructor(_0x2bb934,_0x3866e6,_0x350035){const _0x551145=_0x320824;this['_httpService']=_0x2bb934,this[_0x551145(0x215)]=_0x3866e6,this['_sessionService']=_0x350035;}async['addComment'](_0x369eb3){const _0x570935=_0x320824;var _0x4ebe7d,_0x3c4d2d;const {parentId:_0x3dad1e,unitId:_0x52d254,text:_0x24cfef,threadId:_0xd3a9db}=_0x369eb3,_0x3b882c=(_0x3c4d2d=(_0x4ebe7d=_0x24cfef['customRanges'])==null?void 0x0:_0x4ebe7d[_0x570935(0x1bf)](_0x1ba2c3=>_0x1ba2c3[_0x570935(0x1f0)]===c[_0x570935(0x1d3)][_0x570935(0x20f)])[_0x570935(0x1ce)](_0x1481a=>_0x1481a[_0x570935(0x1c3)]))!=null?_0x3c4d2d:[],_0x28ea37=JSON[_0x570935(0x1d1)](_0x24cfef),_0x69cb38=(await this['_sessionService'][_0x570935(0x22a)](_0x52d254))[_0x570935(0x1e0)]();if(_0x3dad1e){const _0x148fe3={'memberId':_0x69cb38,'unitId':_0x52d254,'content':_0x28ea37,'mention':_0x3b882c,'threadId':_0xd3a9db},_0xaf5458=(await this[_0x570935(0x1be)][_0x570935(0x217)](_0x570935(0x1c6)+_0x52d254+'/reply',{'body':_0x148fe3}))[_0x570935(0x219)]['reply'];return{..._0x369eb3,'id':_0xaf5458[_0x570935(0x1fb)],'dT':c[_0x570935(0x1d6)](+_0xaf5458[_0x570935(0x1ec)])[_0x570935(0x214)](_0x570935(0x22e)),'personId':_0xaf5458[_0x570935(0x1de)]};}else{const _0x50bf70={'memberId':_0x69cb38,'unitId':_0x52d254,'content':_0x28ea37,'mention':_0x3b882c},_0x23d068=await this[_0x570935(0x1be)][_0x570935(0x217)](_0x570935(0x1c6)+_0x52d254+_0x570935(0x1bb),{'body':_0x50bf70});return Y(_0x23d068['body'][_0x570935(0x1fd)],_0x369eb3);}}async['updateComment'](_0x14ea21){const _0x41fbc2=_0x320824;var _0x162537,_0x532d7e;const {text:_0x3aba0d,unitId:_0x4a6234}=_0x14ea21,_0x3cc595=(_0x532d7e=(_0x162537=_0x3aba0d[_0x41fbc2(0x22b)])==null?void 0x0:_0x162537[_0x41fbc2(0x1bf)](_0x2948fa=>_0x2948fa[_0x41fbc2(0x1f0)]===c[_0x41fbc2(0x1d3)][_0x41fbc2(0x20f)])[_0x41fbc2(0x1ce)](_0x3ece4c=>_0x3ece4c['rangeId']))!=null?_0x532d7e:[],_0x1089cd=JSON[_0x41fbc2(0x1d1)](_0x3aba0d),_0x5142d5=_0x14ea21['threadId'],_0x1e6a29=_0x14ea21['id'],_0x11e368={'memberId':(await this[_0x41fbc2(0x1df)][_0x41fbc2(0x22a)](_0x4a6234))[_0x41fbc2(0x1e0)](),'unitId':_0x4a6234,'threadId':_0x5142d5,'mention':_0x3cc595,'content':_0x1089cd,'replyId':_0x1e6a29},_0x101d8b=await this[_0x41fbc2(0x1be)][_0x41fbc2(0x217)](_0x41fbc2(0x1c6)+_0x4a6234+_0x41fbc2(0x1b9),{'body':_0x11e368});return!_0x101d8b[_0x41fbc2(0x219)][_0x41fbc2(0x1ed)]||_0x101d8b[_0x41fbc2(0x219)][_0x41fbc2(0x1ed)][_0x41fbc2(0x1c5)]===0x1;}async['resolveComment'](_0xd2b682){const _0x1bfecb=_0x320824,{unitId:_0xa8fbe}=_0xd2b682,_0x1c7acf=_0xd2b682[_0x1bfecb(0x1bc)],_0xc37f5c={'memberId':this['_userService']['getCurrentUser']()[_0x1bfecb(0x1e5)],'unitId':_0xa8fbe,'threadId':_0x1c7acf,'solved':_0xd2b682[_0x1bfecb(0x222)]?I['Solved']:I['OpenOrReOpen']},_0x4825ce=await this['_httpService'][_0x1bfecb(0x217)](_0x1bfecb(0x1c6)+_0xa8fbe+_0x1bfecb(0x207),{'body':_0xc37f5c});return!_0x4825ce[_0x1bfecb(0x219)][_0x1bfecb(0x1ed)]||_0x4825ce[_0x1bfecb(0x219)][_0x1bfecb(0x1ed)]['code']===0x1;}async['deleteComment'](_0x1a6ce7,_0x22c8fd,_0x8bec7a,_0x14f9c5){const _0x35cc7a=_0x320824,_0x588ba3={'memberId':(await this[_0x35cc7a(0x1df)][_0x35cc7a(0x22a)](_0x1a6ce7))[_0x35cc7a(0x1e0)](),'threadId':_0x8bec7a,'replyId':_0x14f9c5,'unitId':_0x1a6ce7},_0x2cdb16=await this['_httpService'][_0x35cc7a(0x217)]('/universer-api/comment/unit/'+_0x1a6ce7+_0x35cc7a(0x22c),{'body':_0x588ba3});return!_0x2cdb16[_0x35cc7a(0x219)]['error']||_0x2cdb16[_0x35cc7a(0x219)][_0x35cc7a(0x1ed)][_0x35cc7a(0x1c5)]===0x1;}async[_0x320824(0x227)](_0x18e15b,_0x21b1cf,_0x435e5c){const _0x68aeb6=_0x320824,_0x43e348={'unitId':_0x18e15b,'threadId':_0x435e5c},_0x55037e=await this[_0x68aeb6(0x1be)][_0x68aeb6(0x217)](_0x68aeb6(0x1c6)+_0x18e15b+_0x68aeb6(0x226),{'body':_0x43e348}),_0x485f03=_0x435e5c['map'](_0x4e3091=>G(_0x55037e[_0x68aeb6(0x219)][_0x68aeb6(0x1cf)][_0x4e3091],_0x18e15b,_0x21b1cf))['filter'](Boolean);return Object[_0x68aeb6(0x1c1)](_0x55037e['body']['users'])['forEach'](_0x17d020=>{const _0x3cdd41=_0x68aeb6;this[_0x3cdd41(0x215)]['addUser'](_0x17d020);}),_0x485f03;}['saveCommentToSnapshot'](_0x44b7be){const _0x3b4965=_0x320824;return{'id':_0x44b7be['id'],'threadId':_0x44b7be[_0x3b4965(0x1bc)],'ref':_0x44b7be['ref']};}};function _0x3448(_0x395b86,_0x4cf981){_0x395b86=_0x395b86-0x1b6;const _0x4f973b=_0x4f97();let _0x344854=_0x4f973b[_0x395b86];return _0x344854;}p=x([C(0x0,c[_0x320824(0x21b)](P[_0x320824(0x216)])),C(0x1,c[_0x320824(0x21b)](c['UserManagerService'])),C(0x2,c[_0x320824(0x21b)](b[_0x320824(0x1ca)]))],p);var H=Object[_0x320824(0x1e9)],J=(_0x2667d3,_0x3c1636,_0x269e79,_0x52f0f9)=>{const _0x394286=_0x320824;for(var _0x3cc25b=_0x52f0f9>0x1?void 0x0:_0x52f0f9?H(_0x3c1636,_0x269e79):_0x3c1636,_0x49aa38=_0x2667d3[_0x394286(0x1ba)]-0x1,_0xdcb04e;_0x49aa38>=0x0;_0x49aa38--)(_0xdcb04e=_0x2667d3[_0x49aa38])&&(_0x3cc25b=_0xdcb04e(_0x3cc25b)||_0x3cc25b);return _0x3cc25b;},y=(_0xf63a0e,_0x4756b1)=>(_0x59a3e5,_0x36d21f)=>_0x4756b1(_0x59a3e5,_0x36d21f,_0xf63a0e);let g=class extends c[_0x320824(0x209)]{constructor(_0x2ab398,_0xec44db){const _0x482cce=_0x320824;super(),this[_0x482cce(0x208)]=_0x2ab398,this[_0x482cce(0x1fc)]=_0xec44db,this['_initDataSource']();}[_0x320824(0x1c8)](){const _0x1b8e42=_0x320824;this[_0x1b8e42(0x208)][_0x1b8e42(0x206)]=this['_threadCommentDataSource'],this[_0x1b8e42(0x208)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x320824(0x1ee)]),y(0x1,c[_0x320824(0x21b)](p))],g);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x3dd349,_0x5de03d,_0x287618)=>_0x5de03d in _0x3dd349?F(_0x3dd349,_0x5de03d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x287618}):_0x3dd349[_0x5de03d]=_0x287618,W=(_0x3e9922,_0x4cf239,_0x1bb037,_0x366262)=>{const _0x1fdeca=_0x320824;for(var _0x236d6b=_0x366262>0x1?void 0x0:_0x366262?L(_0x4cf239,_0x1bb037):_0x4cf239,_0x3be541=_0x3e9922[_0x1fdeca(0x1ba)]-0x1,_0x4a5858;_0x3be541>=0x0;_0x3be541--)(_0x4a5858=_0x3e9922[_0x3be541])&&(_0x236d6b=_0x4a5858(_0x236d6b)||_0x236d6b);return _0x236d6b;},O=(_0x73f52b,_0x6bac67)=>(_0x3a3c09,_0x16ac1d)=>_0x6bac67(_0x3a3c09,_0x16ac1d,_0x73f52b),N=(_0x44db95,_0x187ac1,_0x4da549)=>Z(_0x44db95,typeof _0x187ac1!='symbol'?_0x187ac1+'':_0x187ac1,_0x4da549);exports[_0x320824(0x1e4)]=class extends c['Plugin']{constructor(_0x6229ca=D,_0x1a8746,_0x37be96){const _0xd0e435=_0x320824;super(),this[_0xd0e435(0x1dd)]=_0x6229ca,this[_0xd0e435(0x225)]=_0x1a8746,this[_0xd0e435(0x1f4)]=_0x37be96;const {..._0x4e2b9d}=c[_0xd0e435(0x20b)]({},D,this[_0xd0e435(0x1dd)]);this[_0xd0e435(0x1f4)][_0xd0e435(0x223)](q,_0x4e2b9d);}['onStarting'](){const _0x190055=_0x320824;[[p],[g],[_]][_0x190055(0x1bd)](_0x2d83dc=>{const _0x657fb0=_0x190055;this[_0x657fb0(0x225)]['add'](_0x2d83dc);});}['onReady'](){const _0x3d9ef8=_0x320824;this[_0x3d9ef8(0x225)][_0x3d9ef8(0x1cc)](g),this['_injector'][_0x3d9ef8(0x1cc)](_);}},N(exports[_0x320824(0x1e4)],_0x320824(0x1db),U),N(exports[_0x320824(0x1e4)],_0x320824(0x21a),c[_0x320824(0x1c9)][_0x320824(0x1d7)]),exports[_0x320824(0x1e4)]=W([c[_0x320824(0x229)](w[_0x320824(0x1d9)],b[_0x320824(0x201)],T['UniverLicensePlugin']),O(0x1,c[_0x320824(0x21b)](c['Injector'])),O(0x2,c['IConfigService'])],exports[_0x320824(0x1e4)]);
1
+ 'use strict';const _0x1b3e94=_0x4eff;function _0x16c2(){const _0x4862d8=['forEach','userID','DependentOn','_sessionService','556840jMJlpy','getMemberID','addComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','add','customRanges','filter','solved','/add','Edit','body','0.17.0','threadId','setConfig','version','6ecEwQW','_initUserSync','subscribe','format','_threadCommentModel','bufferTime','CustomRangeType','_httpService','replies','rangeId','getOwnPropertyDescriptor','post','_injector','_initDataSource','length','saveCommentToSnapshot','Reply','dataSource','_configService','_userService','syncUpdateMutationToColla','HTTPService','stringify','CommentService','UniverCollaborationClientPlugin','disposeWithMe','Plugin','comment','Solved','Solve','resolveComment','UserManagerService','values','1839815rzeuFf','getUnit','311865GBmahK','getComment','name','UNRECOGNIZED','addUser','payload','resolved','userId','/reply','UniverLicensePlugin','size','content','2162584yNBSzX','ThreadCommentModel','Inject','Delete','createTimestamp','pipe','186332vMgyJj','updateComment','_commentService','onReady','dayjs','15hrMmjQ','packageName','Module','_threadCommentDataSourceService','Disposable','_init','requireSession','5908068kOeKJM','_config','get','/edit','UniverThreadCommentDataSourcePlugin','parse','personId','CollaborationSessionService','code','UniverThreadCommentUIPlugin','Add','617729yhfeZt','commentUpdate$','toStringTag','unitId','error','Unknown','map','deleteComment','reply','parentId','COMMENT','YYYY/MM/DD\x20HH:mm','replyId','user','users','/universer-api/comment/unit/','defineProperty','_threadCommentDataSource','Injector','root','OpenOrReOpen'];_0x16c2=function(){return _0x4862d8;};return _0x16c2();}(function(_0x2d0750,_0x1bab0){const _0x23d632=_0x4eff,_0x51fd6c=_0x2d0750();while(!![]){try{const _0x55f8b6=parseInt(_0x23d632(0x140))/0x1+-parseInt(_0x23d632(0x10e))/0x2+-parseInt(_0x23d632(0x157))/0x3*(-parseInt(_0x23d632(0x152))/0x4)+parseInt(_0x23d632(0x13e))/0x5*(-parseInt(_0x23d632(0x11d))/0x6)+-parseInt(_0x23d632(0x169))/0x7+-parseInt(_0x23d632(0x14c))/0x8+parseInt(_0x23d632(0x15e))/0x9;if(_0x55f8b6===_0x1bab0)break;else _0x51fd6c['push'](_0x51fd6c['shift']());}catch(_0x5d2cbb){_0x51fd6c['push'](_0x51fd6c['shift']());}}}(_0x16c2,0x2feb7));function _0x4eff(_0x13105e,_0x565a53){_0x13105e=_0x13105e-0x10e;const _0x16c28b=_0x16c2();let _0x4effa3=_0x16c28b[_0x13105e];return _0x4effa3;}Object[_0x1b3e94(0x179)](exports,Symbol[_0x1b3e94(0x16b)],{'value':_0x1b3e94(0x159)});const b=require('@univerjs-pro/collaboration-client'),w=require('@univerjs-pro/license'),a=require('@univerjs/core'),N=require('@univerjs/thread-comment-ui'),P=require('@univerjs/thread-comment'),U=require('rxjs'),T=require('@univerjs/network'),R='@univerjs-pro/thread-comment-datasource',$=_0x1b3e94(0x119),j={'name':R,'version':$},E=_0x1b3e94(0x111);var I=(_0x2ea2ca=>(_0x2ea2ca[_0x2ea2ca[_0x1b3e94(0x17d)]=0x0]=_0x1b3e94(0x17d),_0x2ea2ca[_0x2ea2ca[_0x1b3e94(0x139)]=0x1]=_0x1b3e94(0x139),_0x2ea2ca[_0x2ea2ca[_0x1b3e94(0x143)]=-0x1]='UNRECOGNIZED',_0x2ea2ca))(I||{}),v=(_0x7199bd=>(_0x7199bd[_0x7199bd[_0x1b3e94(0x16e)]=0x0]=_0x1b3e94(0x16e),_0x7199bd[_0x7199bd[_0x1b3e94(0x168)]=0x1]=_0x1b3e94(0x168),_0x7199bd[_0x7199bd[_0x1b3e94(0x12d)]=0x2]=_0x1b3e94(0x12d),_0x7199bd[_0x7199bd[_0x1b3e94(0x117)]=0x3]=_0x1b3e94(0x117),_0x7199bd[_0x7199bd[_0x1b3e94(0x14f)]=0x4]='Delete',_0x7199bd[_0x7199bd['Solve']=0x5]=_0x1b3e94(0x13a),_0x7199bd[_0x7199bd['UNRECOGNIZED']=-0x1]=_0x1b3e94(0x143),_0x7199bd))(v||{});const f=_0x1a6301=>a[_0x1b3e94(0x156)](new Date(+_0x1a6301))['format'](_0x1b3e94(0x174)),q=async(_0x20bb2e,_0x3e3d22)=>{const _0x196f4d=_0x1b3e94,_0x47e4f8=_0x20bb2e[_0x196f4d(0x160)](a[_0x196f4d(0x13c)]),_0x28fd00=_0x20bb2e['get'](T[_0x196f4d(0x132)]);_0x3e3d22[_0x196f4d(0x17e)](_0x12b100=>{_0x47e4f8['getUser'](_0x12b100)&&_0x3e3d22['delete'](_0x12b100);}),_0x3e3d22[_0x196f4d(0x14a)]&&(await _0x28fd00['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x3e3d22]}}))[_0x196f4d(0x118)][_0x196f4d(0x177)][_0x196f4d(0x17e)](_0x1361b6=>{_0x1361b6&&_0x47e4f8['addUser'](_0x1361b6);});};var A=Object[_0x1b3e94(0x127)],x=(_0x1f14f4,_0x4a28ca,_0x141149,_0x385b27)=>{const _0x283669=_0x1b3e94;for(var _0xa6a370=_0x385b27>0x1?void 0x0:_0x385b27?A(_0x4a28ca,_0x141149):_0x4a28ca,_0x3e8340=_0x1f14f4[_0x283669(0x12b)]-0x1,_0x43f5de;_0x3e8340>=0x0;_0x3e8340--)(_0x43f5de=_0x1f14f4[_0x3e8340])&&(_0xa6a370=_0x43f5de(_0xa6a370)||_0xa6a370);return _0xa6a370;},S=(_0x44fab3,_0x143a56)=>(_0x475b79,_0x16d235)=>_0x143a56(_0x475b79,_0x16d235,_0x44fab3);let _=class extends a[_0x1b3e94(0x15b)]{constructor(_0x365bdb,_0x4e140,_0x1b614e,_0x6e882a){const _0x2500f4=_0x1b3e94;super(),this[_0x2500f4(0x154)]=_0x365bdb,this[_0x2500f4(0x121)]=_0x4e140,this[_0x2500f4(0x130)]=_0x1b614e,this['_injector']=_0x6e882a,this[_0x2500f4(0x15c)](),this[_0x2500f4(0x11e)]();}[_0x1b3e94(0x11e)](){const _0x3de886=_0x1b3e94;this[_0x3de886(0x136)](this[_0x3de886(0x121)]['commentUpdate$'][_0x3de886(0x151)](U[_0x3de886(0x122)](0x10))[_0x3de886(0x11f)](_0x1f953d=>{const _0x45b5ce=_0x3de886,_0x52d7a7=new Set();_0x1f953d[_0x45b5ce(0x17e)](_0x58c469=>{const _0x410388=_0x45b5ce;if(_0x58c469['type']===_0x410388(0x112)){const _0x283f02=_0x58c469[_0x410388(0x145)][_0x410388(0x164)];_0x52d7a7[_0x410388(0x112)](_0x283f02);}}),q(this[_0x45b5ce(0x129)],_0x52d7a7);}));}[_0x1b3e94(0x15c)](){const _0x4e216c=_0x1b3e94;this['disposeWithMe'](this['_commentService'][_0x4e216c(0x16a)][_0x4e216c(0x11f)](async _0x4e639a=>{const _0x1e4e6b=_0x4e216c;var _0x4995f6,_0x2764dc,_0x56cc69,_0x308689;const _0x48112c=(_0x4995f6=this[_0x1e4e6b(0x121)][_0x1e4e6b(0x13f)](_0x4e639a[_0x1e4e6b(0x16c)])['find'](_0x59da35=>_0x59da35[_0x1e4e6b(0x11a)]===_0x4e639a['threadId']))==null?void 0x0:_0x4995f6[_0x1e4e6b(0x17c)];if(!_0x48112c)return;const {unitId:_0x59e993,subUnitId:_0x54e149}=_0x48112c;switch(_0x4e639a[_0x1e4e6b(0x176)]&&this[_0x1e4e6b(0x130)][_0x1e4e6b(0x144)](_0x4e639a[_0x1e4e6b(0x176)]),_0x4e639a['type']){case v[_0x1e4e6b(0x168)]:break;case v[_0x1e4e6b(0x12d)]:{this[_0x1e4e6b(0x121)][_0x1e4e6b(0x110)](_0x59e993,_0x54e149,{'unitId':_0x59e993,'subUnitId':_0x54e149,'ref':'','id':_0x4e639a['replyId'],'dT':f(+_0x4e639a[_0x1e4e6b(0x150)]),'threadId':_0x4e639a['threadId'],'personId':(_0x56cc69=(_0x2764dc=_0x4e639a[_0x1e4e6b(0x176)])==null?void 0x0:_0x2764dc[_0x1e4e6b(0x17f)])!=null?_0x56cc69:_0x4e639a[_0x1e4e6b(0x147)],'text':JSON[_0x1e4e6b(0x163)](_0x4e639a[_0x1e4e6b(0x14b)]),'parentId':_0x48112c['id']});break;}case v[_0x1e4e6b(0x14f)]:{const _0x18b7b1=this['_threadCommentModel'][_0x1e4e6b(0x141)](_0x59e993,_0x54e149,_0x4e639a['replyId']);_0x18b7b1&&_0x18b7b1[_0x1e4e6b(0x172)]&&this[_0x1e4e6b(0x121)][_0x1e4e6b(0x170)](_0x59e993,_0x54e149,_0x4e639a[_0x1e4e6b(0x175)]);break;}case v[_0x1e4e6b(0x117)]:{this[_0x1e4e6b(0x121)][_0x1e4e6b(0x153)](_0x59e993,_0x54e149,{'commentId':_0x4e639a['replyId'],'text':JSON['parse'](_0x4e639a[_0x1e4e6b(0x14b)])});break;}case v[_0x1e4e6b(0x13a)]:{const _0x8e591e=(_0x308689=this[_0x1e4e6b(0x121)][_0x1e4e6b(0x13f)](_0x4e639a[_0x1e4e6b(0x16c)])['find'](_0x1888a4=>_0x1888a4[_0x1e4e6b(0x11a)]===_0x4e639a[_0x1e4e6b(0x11a)]))==null?void 0x0:_0x308689[_0x1e4e6b(0x17c)];_0x8e591e&&this[_0x1e4e6b(0x121)][_0x1e4e6b(0x13b)](_0x59e993,_0x54e149,_0x8e591e['id'],_0x4e639a[_0x1e4e6b(0x115)]===I[_0x1e4e6b(0x139)]);break;}}}));}};_=x([S(0x0,a['Inject'](b[_0x1b3e94(0x134)])),S(0x1,a['Inject'](P[_0x1b3e94(0x14d)])),S(0x2,a[_0x1b3e94(0x14e)](a['UserManagerService'])),S(0x3,a[_0x1b3e94(0x14e)](a[_0x1b3e94(0x17b)]))],_);const Y='thread-comment-data-source.config',y={};var G=Object[_0x1b3e94(0x127)],H=(_0x3ca4a7,_0x21fbd9,_0x18336b,_0x124e03)=>{const _0x807245=_0x1b3e94;for(var _0x59ed3e=_0x124e03>0x1?void 0x0:_0x124e03?G(_0x21fbd9,_0x18336b):_0x21fbd9,_0x183a68=_0x3ca4a7[_0x807245(0x12b)]-0x1,_0x28acd5;_0x183a68>=0x0;_0x183a68--)(_0x28acd5=_0x3ca4a7[_0x183a68])&&(_0x59ed3e=_0x28acd5(_0x59ed3e)||_0x59ed3e);return _0x59ed3e;},C=(_0x395a1b,_0x32207a)=>(_0x57de55,_0x25943b)=>_0x32207a(_0x57de55,_0x25943b,_0x395a1b);function J(_0x2db490,_0x3e7f88){const _0x878ace=_0x1b3e94,_0x3d91c3=_0x2db490['replies'][0x0];return{..._0x3e7f88,'id':_0x3d91c3['replyId'],'resolved':_0x2db490[_0x878ace(0x115)]===0x1,'dT':f(_0x3d91c3['createTimestamp']),'personId':_0x3d91c3[_0x878ace(0x147)],'threadId':_0x3d91c3[_0x878ace(0x11a)]};}function F(_0x305560,_0x7bf3e2,_0x172c0c){const _0x1a9cf5=_0x1b3e94;var _0x5b896b,_0x4c361f;if(((_0x4c361f=(_0x5b896b=_0x305560==null?void 0x0:_0x305560['replies'])==null?void 0x0:_0x5b896b[_0x1a9cf5(0x12b)])!=null?_0x4c361f:0x0)>0x0){const _0x2954d9=(_0x234aad,_0x405b59)=>({'id':_0x234aad[_0x1a9cf5(0x175)],'threadId':_0x234aad[_0x1a9cf5(0x11a)],'dT':f(_0x234aad[_0x1a9cf5(0x150)]),'personId':_0x234aad[_0x1a9cf5(0x147)],'resolved':_0x305560['solved']===I[_0x1a9cf5(0x139)],'unitId':_0x7bf3e2,'subUnitId':_0x172c0c,'text':JSON[_0x1a9cf5(0x163)](_0x234aad[_0x1a9cf5(0x14b)]),'parentId':_0x405b59}),_0x249da4=_0x2954d9(_0x305560[_0x1a9cf5(0x125)][0x0]);return{..._0x249da4,'children':_0x305560[_0x1a9cf5(0x125)]['slice'](0x1)[_0x1a9cf5(0x16f)](_0x43f608=>_0x2954d9(_0x43f608,_0x249da4['id']))};}return null;}let p=class{constructor(_0x49d180,_0x4da2fa,_0x2fd073){const _0xdeec11=_0x1b3e94;this[_0xdeec11(0x124)]=_0x49d180,this[_0xdeec11(0x130)]=_0x4da2fa,this[_0xdeec11(0x181)]=_0x2fd073;}async[_0x1b3e94(0x110)](_0x4b4e11){const _0x14950f=_0x1b3e94;var _0x526d75,_0x4eb0ab;const {parentId:_0x58726f,unitId:_0x370651,text:_0x24969d,threadId:_0xe5c3ff}=_0x4b4e11,_0x1b9e6e=(_0x4eb0ab=(_0x526d75=_0x24969d[_0x14950f(0x113)])==null?void 0x0:_0x526d75[_0x14950f(0x114)](_0x43e3e7=>_0x43e3e7['rangeType']===a[_0x14950f(0x123)][_0x14950f(0x173)])[_0x14950f(0x16f)](_0x28849d=>_0x28849d[_0x14950f(0x126)]))!=null?_0x4eb0ab:[],_0x2fc3b4=JSON[_0x14950f(0x133)](_0x24969d),_0x342aeb=(await this[_0x14950f(0x181)]['requireSession'](_0x370651))[_0x14950f(0x10f)]();if(_0x58726f){const _0x503e49={'memberId':_0x342aeb,'unitId':_0x370651,'content':_0x2fc3b4,'mention':_0x1b9e6e,'threadId':_0xe5c3ff},_0x436893=(await this[_0x14950f(0x124)][_0x14950f(0x128)](_0x14950f(0x178)+_0x370651+_0x14950f(0x148),{'body':_0x503e49}))[_0x14950f(0x118)][_0x14950f(0x171)];return{..._0x4b4e11,'id':_0x436893[_0x14950f(0x175)],'dT':a[_0x14950f(0x156)](+_0x436893[_0x14950f(0x150)])[_0x14950f(0x120)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x436893['userId']};}else{const _0x136e81={'memberId':_0x342aeb,'unitId':_0x370651,'content':_0x2fc3b4,'mention':_0x1b9e6e},_0x294cf4=await this[_0x14950f(0x124)]['post'](_0x14950f(0x178)+_0x370651+_0x14950f(0x116),{'body':_0x136e81});return J(_0x294cf4[_0x14950f(0x118)][_0x14950f(0x138)],_0x4b4e11);}}async[_0x1b3e94(0x153)](_0x5844e4){const _0x1ea4bd=_0x1b3e94;var _0x26eb1a,_0x5f8c90;const {text:_0x163285,unitId:_0x1d79d5}=_0x5844e4,_0x2af802=(_0x5f8c90=(_0x26eb1a=_0x163285[_0x1ea4bd(0x113)])==null?void 0x0:_0x26eb1a[_0x1ea4bd(0x114)](_0x67e17a=>_0x67e17a['rangeType']===a[_0x1ea4bd(0x123)][_0x1ea4bd(0x173)])[_0x1ea4bd(0x16f)](_0x34d370=>_0x34d370['rangeId']))!=null?_0x5f8c90:[],_0x56579b=JSON[_0x1ea4bd(0x133)](_0x163285),_0x3ec91a=_0x5844e4[_0x1ea4bd(0x11a)],_0x1909c8=_0x5844e4['id'],_0x4f6b36={'memberId':(await this['_sessionService'][_0x1ea4bd(0x15d)](_0x1d79d5))[_0x1ea4bd(0x10f)](),'unitId':_0x1d79d5,'threadId':_0x3ec91a,'mention':_0x2af802,'content':_0x56579b,'replyId':_0x1909c8},_0x183fd0=await this['_httpService'][_0x1ea4bd(0x128)](_0x1ea4bd(0x178)+_0x1d79d5+_0x1ea4bd(0x161),{'body':_0x4f6b36});return!_0x183fd0[_0x1ea4bd(0x118)]['error']||_0x183fd0['body'][_0x1ea4bd(0x16d)][_0x1ea4bd(0x166)]===0x1;}async[_0x1b3e94(0x13b)](_0x5be825){const _0x297e07=_0x1b3e94,{unitId:_0x349d1d}=_0x5be825,_0x3cac23=_0x5be825['threadId'],_0x2bf1f6={'memberId':this[_0x297e07(0x130)]['getCurrentUser']()['userID'],'unitId':_0x349d1d,'threadId':_0x3cac23,'solved':_0x5be825[_0x297e07(0x146)]?I['Solved']:I[_0x297e07(0x17d)]},_0x4b0b98=await this['_httpService'][_0x297e07(0x128)](_0x297e07(0x178)+_0x349d1d+'/solved',{'body':_0x2bf1f6});return!_0x4b0b98[_0x297e07(0x118)][_0x297e07(0x16d)]||_0x4b0b98[_0x297e07(0x118)][_0x297e07(0x16d)][_0x297e07(0x166)]===0x1;}async['deleteComment'](_0x186f72,_0x4706e0,_0x325fe2,_0x54c6e3){const _0x3d029d=_0x1b3e94,_0x1786c1={'memberId':(await this[_0x3d029d(0x181)][_0x3d029d(0x15d)](_0x186f72))['getMemberID'](),'threadId':_0x325fe2,'replyId':_0x54c6e3,'unitId':_0x186f72},_0x3ced05=await this[_0x3d029d(0x124)]['post'](_0x3d029d(0x178)+_0x186f72+'/delete',{'body':_0x1786c1});return!_0x3ced05[_0x3d029d(0x118)]['error']||_0x3ced05[_0x3d029d(0x118)][_0x3d029d(0x16d)][_0x3d029d(0x166)]===0x1;}async['listComments'](_0x1f2ed9,_0x669065,_0x19823d){const _0x3cac86=_0x1b3e94,_0x371069={'unitId':_0x1f2ed9,'threadId':_0x19823d},_0x34e1af=await this[_0x3cac86(0x124)]['post'](_0x3cac86(0x178)+_0x1f2ed9+'/list',{'body':_0x371069}),_0xbfa186=_0x19823d[_0x3cac86(0x16f)](_0x580420=>F(_0x34e1af['body']['comments'][_0x580420],_0x1f2ed9,_0x669065))[_0x3cac86(0x114)](Boolean);return Object[_0x3cac86(0x13d)](_0x34e1af['body'][_0x3cac86(0x177)])[_0x3cac86(0x17e)](_0x221e8e=>{const _0x5a809b=_0x3cac86;this[_0x5a809b(0x130)][_0x5a809b(0x144)](_0x221e8e);}),_0xbfa186;}[_0x1b3e94(0x12c)](_0x4a5640){return{'id':_0x4a5640['id'],'threadId':_0x4a5640['threadId'],'ref':_0x4a5640['ref']};}};p=H([C(0x0,a[_0x1b3e94(0x14e)](T[_0x1b3e94(0x132)])),C(0x1,a[_0x1b3e94(0x14e)](a[_0x1b3e94(0x13c)])),C(0x2,a[_0x1b3e94(0x14e)](b[_0x1b3e94(0x165)]))],p);var L=Object[_0x1b3e94(0x127)],Z=(_0x5a5dad,_0x3515a9,_0x1f954b,_0x20e471)=>{for(var _0x3e269c=_0x20e471>0x1?void 0x0:_0x20e471?L(_0x3515a9,_0x1f954b):_0x3515a9,_0x329a04=_0x5a5dad['length']-0x1,_0x167346;_0x329a04>=0x0;_0x329a04--)(_0x167346=_0x5a5dad[_0x329a04])&&(_0x3e269c=_0x167346(_0x3e269c)||_0x3e269c);return _0x3e269c;},O=(_0x456d7b,_0x114d28)=>(_0x135c7e,_0x331b20)=>_0x114d28(_0x135c7e,_0x331b20,_0x456d7b);let g=class extends a[_0x1b3e94(0x15b)]{constructor(_0x274ce5,_0x4b68f2){const _0x372bbe=_0x1b3e94;super(),this[_0x372bbe(0x15a)]=_0x274ce5,this[_0x372bbe(0x17a)]=_0x4b68f2,this[_0x372bbe(0x12a)]();}[_0x1b3e94(0x12a)](){const _0x10b6d6=_0x1b3e94;this['_threadCommentDataSourceService'][_0x10b6d6(0x12e)]=this['_threadCommentDataSource'],this[_0x10b6d6(0x15a)][_0x10b6d6(0x131)]=!0x1;}};g=Z([O(0x0,P['IThreadCommentDataSourceService']),O(0x1,a[_0x1b3e94(0x14e)](p))],g);var k=Object[_0x1b3e94(0x179)],B=Object[_0x1b3e94(0x127)],W=(_0x3a26a8,_0x3e5722,_0x7a8ca5)=>_0x3e5722 in _0x3a26a8?k(_0x3a26a8,_0x3e5722,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x7a8ca5}):_0x3a26a8[_0x3e5722]=_0x7a8ca5,z=(_0x3a91d1,_0x18ed46,_0x194e02,_0x27ef95)=>{const _0x253691=_0x1b3e94;for(var _0x22f4c4=_0x27ef95>0x1?void 0x0:_0x27ef95?B(_0x18ed46,_0x194e02):_0x18ed46,_0x12ce3a=_0x3a91d1[_0x253691(0x12b)]-0x1,_0x560750;_0x12ce3a>=0x0;_0x12ce3a--)(_0x560750=_0x3a91d1[_0x12ce3a])&&(_0x22f4c4=_0x560750(_0x22f4c4)||_0x22f4c4);return _0x22f4c4;},M=(_0x42d507,_0x12d4ce)=>(_0xb90226,_0x43e3ca)=>_0x12d4ce(_0xb90226,_0x43e3ca,_0x42d507),D=(_0x94d816,_0x892f21,_0x170601)=>W(_0x94d816,typeof _0x892f21!='symbol'?_0x892f21+'':_0x892f21,_0x170601);exports['UniverThreadCommentDataSourcePlugin']=class extends a[_0x1b3e94(0x137)]{constructor(_0x58eae9=y,_0x4a2714,_0x3f7483){const _0x4d509d=_0x1b3e94;super(),this[_0x4d509d(0x15f)]=_0x58eae9,this[_0x4d509d(0x129)]=_0x4a2714,this['_configService']=_0x3f7483;const {..._0x8d2b4d}=a['merge']({},y,this[_0x4d509d(0x15f)]);this[_0x4d509d(0x12f)][_0x4d509d(0x11b)](Y,_0x8d2b4d);}['onStarting'](){const _0x18922b=_0x1b3e94;[[p],[g],[_]][_0x18922b(0x17e)](_0x2df0da=>{const _0x13210f=_0x18922b;this[_0x13210f(0x129)]['add'](_0x2df0da);});}[_0x1b3e94(0x155)](){const _0x1ed632=_0x1b3e94;this[_0x1ed632(0x129)][_0x1ed632(0x160)](g),this[_0x1ed632(0x129)][_0x1ed632(0x160)](_);}},D(exports[_0x1b3e94(0x162)],'pluginName',E),D(exports[_0x1b3e94(0x162)],_0x1b3e94(0x158),j[_0x1b3e94(0x142)]),D(exports[_0x1b3e94(0x162)],_0x1b3e94(0x11c),j['version']),exports[_0x1b3e94(0x162)]=z([a[_0x1b3e94(0x180)](N[_0x1b3e94(0x167)],b[_0x1b3e94(0x135)],w[_0x1b3e94(0x149)]),M(0x1,a[_0x1b3e94(0x14e)](a[_0x1b3e94(0x17b)])),M(0x2,a['IConfigService'])],exports[_0x1b3e94(0x162)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x1c4990=_0x37a2;(function(_0x54bbc5,_0xe0f6fc){const _0x38a8ac=_0x37a2,_0x1381ee=_0x54bbc5();while(!![]){try{const _0x3aa1eb=-parseInt(_0x38a8ac(0xef))/0x1+-parseInt(_0x38a8ac(0x10b))/0x2*(-parseInt(_0x38a8ac(0xf2))/0x3)+-parseInt(_0x38a8ac(0x102))/0x4+parseInt(_0x38a8ac(0xee))/0x5+parseInt(_0x38a8ac(0x118))/0x6*(-parseInt(_0x38a8ac(0x110))/0x7)+-parseInt(_0x38a8ac(0xf7))/0x8+parseInt(_0x38a8ac(0x106))/0x9;if(_0x3aa1eb===_0xe0f6fc)break;else _0x1381ee['push'](_0x1381ee['shift']());}catch(_0x3fd14b){_0x1381ee['push'](_0x1381ee['shift']());}}}(_0x5d44,0x4be44));import{CommentService as _0x278af8,CollaborationSessionService as _0x5417b5,UniverCollaborationClientPlugin as _0x4fb59d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2c8ed9}from'@univerjs-pro/license';import{dayjs as _0x5b2334,UserManagerService as _0x4e911f,Inject as _0x108585,Injector as _0x2d7221,Disposable as _0x2c9fc3,CustomRangeType as _0x11ff2a,UniverInstanceType as _0x22c964,DependentOn as _0x4a4332,Plugin as _0x21d69d,merge as _0x49cd4d,IConfigService as _0x440bd9}from'@univerjs/core';function _0x5d44(){const _0x24d7fe=['userId','Delete','UNRECOGNIZED','/delete','_sessionService','_config','reply','requireSession','users','syncUpdateMutationToColla','slice','Unknown','Reply','1859205ZqtcBQ','185859TLmOvm','OpenOrReOpen','body','1038rYgssC','threadId','_init','replies','customRanges','2004256PfLaNi','userID','_initUserSync','pluginName','resolved','root','/reply','rangeId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','length','updateComment','870664OYMeBY','UNIVER_UNKNOWN','symbol','defineProperty','3931740HkgxHN','/list','dataSource','/edit','type','2766gefcSB','/add','Solved','listComments','map','35rhqpDw','delete','get','personId','Add','/universer-api/comment/unit/','parse','addComment','386772kwDwfN','forEach','add','getUnit','format','YYYY/MM/DD\x20HH:mm','parentId','_threadCommentDataSource','resolveComment','error','subscribe','saveCommentToSnapshot','onReady','rangeType','ref','stringify','replyId','values','_configService','createTimestamp','_injector','comments','_commentService','post','getOwnPropertyDescriptor','setConfig','/universer-api/user/list','commentUpdate$','addUser','getComment','pipe','_userService','_threadCommentDataSourceService','_initDataSource','getMemberID','deleteComment','thread-comment-data-source.config','Edit','onStarting','user','getUser','_threadCommentModel','Solve','solved','filter','COMMENT','disposeWithMe','code','_httpService','content','unitId'];_0x5d44=function(){return _0x24d7fe;};return _0x5d44();}import{UniverThreadCommentUIPlugin as _0x33ba46}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x54e638,IThreadCommentDataSourceService as _0x7340a4}from'@univerjs/thread-comment';import{bufferTime as _0x3ed3f1}from'rxjs';import{HTTPService as _0x23a127}from'@univerjs/network';const W=_0x1c4990(0xff);var I=(_0x3e2845=>(_0x3e2845[_0x3e2845[_0x1c4990(0xf0)]=0x0]='OpenOrReOpen',_0x3e2845[_0x3e2845[_0x1c4990(0x10d)]=0x1]='Solved',_0x3e2845[_0x3e2845[_0x1c4990(0xe3)]=-0x1]=_0x1c4990(0xe3),_0x3e2845))(I||{}),v=(_0xb69aba=>(_0xb69aba[_0xb69aba[_0x1c4990(0xec)]=0x0]=_0x1c4990(0xec),_0xb69aba[_0xb69aba[_0x1c4990(0x114)]=0x1]=_0x1c4990(0x114),_0xb69aba[_0xb69aba[_0x1c4990(0xed)]=0x2]=_0x1c4990(0xed),_0xb69aba[_0xb69aba[_0x1c4990(0xd3)]=0x3]=_0x1c4990(0xd3),_0xb69aba[_0xb69aba[_0x1c4990(0xe2)]=0x4]=_0x1c4990(0xe2),_0xb69aba[_0xb69aba[_0x1c4990(0xd8)]=0x5]=_0x1c4990(0xd8),_0xb69aba[_0xb69aba[_0x1c4990(0xe3)]=-0x1]='UNRECOGNIZED',_0xb69aba))(v||{});function _0x37a2(_0x4089be,_0x559117){_0x4089be=_0x4089be-0xc3;const _0x5d44ad=_0x5d44();let _0x37a29e=_0x5d44ad[_0x4089be];return _0x37a29e;}const y=_0x40d80b=>_0x5b2334(new Date(+_0x40d80b))[_0x1c4990(0x11c)](_0x1c4990(0x11d)),B=async(_0x3cc7f2,_0x442646)=>{const _0x3429a9=_0x1c4990,_0x5a03fc=_0x3cc7f2[_0x3429a9(0x112)](_0x4e911f),_0x2fda37=_0x3cc7f2['get'](_0x23a127);_0x442646[_0x3429a9(0x119)](_0x4dcb1c=>{const _0x24859f=_0x3429a9;_0x5a03fc[_0x24859f(0xd6)](_0x4dcb1c)&&_0x442646[_0x24859f(0x111)](_0x4dcb1c);}),_0x442646['size']&&(await _0x2fda37[_0x3429a9(0x112)](_0x3429a9(0xc8),{'params':{'userIDs':[..._0x442646]}}))[_0x3429a9(0xf1)][_0x3429a9(0xe9)][_0x3429a9(0x119)](_0x39929e=>{const _0x55272c=_0x3429a9;_0x39929e&&_0x5a03fc[_0x55272c(0xca)](_0x39929e);});};var K=Object[_0x1c4990(0xc6)],V=(_0x36a719,_0x446352,_0x630a7a,_0x19e310)=>{const _0x296f3c=_0x1c4990;for(var _0x1a0b07=_0x19e310>0x1?void 0x0:_0x19e310?K(_0x446352,_0x630a7a):_0x446352,_0x350ed8=_0x36a719[_0x296f3c(0x100)]-0x1,_0x47c209;_0x350ed8>=0x0;_0x350ed8--)(_0x47c209=_0x36a719[_0x350ed8])&&(_0x1a0b07=_0x47c209(_0x1a0b07)||_0x1a0b07);return _0x1a0b07;},p=(_0x4f7ad6,_0x5ef58f)=>(_0x26b672,_0x161874)=>_0x5ef58f(_0x26b672,_0x161874,_0x4f7ad6);let _=class extends _0x2c9fc3{constructor(_0x7df6b6,_0x43303f,_0xc1cb11,_0x76d89f){const _0x3510e0=_0x1c4990;super(),this[_0x3510e0(0xc4)]=_0x7df6b6,this[_0x3510e0(0xd7)]=_0x43303f,this['_userService']=_0xc1cb11,this[_0x3510e0(0x12c)]=_0x76d89f,this[_0x3510e0(0xf4)](),this[_0x3510e0(0xf9)]();}[_0x1c4990(0xf9)](){const _0x233f80=_0x1c4990;this[_0x233f80(0xdc)](this['_threadCommentModel'][_0x233f80(0xc9)][_0x233f80(0xcc)](_0x3ed3f1(0x10))[_0x233f80(0x122)](_0x14df9b=>{const _0x175d5a=_0x233f80,_0x4753e7=new Set();_0x14df9b[_0x175d5a(0x119)](_0x40cd96=>{const _0x298787=_0x175d5a;if(_0x40cd96[_0x298787(0x10a)]===_0x298787(0x11a)){const _0x179b2f=_0x40cd96['payload'][_0x298787(0x113)];_0x4753e7[_0x298787(0x11a)](_0x179b2f);}}),B(this[_0x175d5a(0x12c)],_0x4753e7);}));}[_0x1c4990(0xf4)](){const _0x4c9bf3=_0x1c4990;this[_0x4c9bf3(0xdc)](this[_0x4c9bf3(0xc4)][_0x4c9bf3(0xc9)][_0x4c9bf3(0x122)](async _0x123081=>{const _0x1a1548=_0x4c9bf3;var _0x58c976,_0x5013ef,_0x56f182,_0x433c01;const _0x15b03a=(_0x58c976=this[_0x1a1548(0xd7)][_0x1a1548(0x11b)](_0x123081[_0x1a1548(0xe0)])['find'](_0x12282c=>_0x12282c[_0x1a1548(0xf3)]===_0x123081[_0x1a1548(0xf3)]))==null?void 0x0:_0x58c976[_0x1a1548(0xfc)];if(!_0x15b03a)return;const {unitId:_0x5b2556,subUnitId:_0x47606f}=_0x15b03a;switch(_0x123081[_0x1a1548(0xd5)]&&this[_0x1a1548(0xcd)][_0x1a1548(0xca)](_0x123081['user']),_0x123081[_0x1a1548(0x10a)]){case v[_0x1a1548(0x114)]:break;case v['Reply']:{this[_0x1a1548(0xd7)][_0x1a1548(0x117)](_0x5b2556,_0x47606f,{'unitId':_0x5b2556,'subUnitId':_0x47606f,'ref':'','id':_0x123081[_0x1a1548(0x128)],'dT':y(+_0x123081[_0x1a1548(0x12b)]),'threadId':_0x123081[_0x1a1548(0xf3)],'personId':(_0x56f182=(_0x5013ef=_0x123081[_0x1a1548(0xd5)])==null?void 0x0:_0x5013ef['userID'])!=null?_0x56f182:_0x123081['userId'],'text':JSON[_0x1a1548(0x116)](_0x123081[_0x1a1548(0xdf)]),'parentId':_0x15b03a['id']});break;}case v['Delete']:{const _0x37fef5=this[_0x1a1548(0xd7)][_0x1a1548(0xcb)](_0x5b2556,_0x47606f,_0x123081['replyId']);_0x37fef5&&_0x37fef5[_0x1a1548(0x11e)]&&this[_0x1a1548(0xd7)]['deleteComment'](_0x5b2556,_0x47606f,_0x123081[_0x1a1548(0x128)]);break;}case v[_0x1a1548(0xd3)]:{this[_0x1a1548(0xd7)][_0x1a1548(0x101)](_0x5b2556,_0x47606f,{'commentId':_0x123081[_0x1a1548(0x128)],'text':JSON[_0x1a1548(0x116)](_0x123081[_0x1a1548(0xdf)])});break;}case v[_0x1a1548(0xd8)]:{const _0x5b1f61=(_0x433c01=this['_threadCommentModel'][_0x1a1548(0x11b)](_0x123081[_0x1a1548(0xe0)])['find'](_0x383b3f=>_0x383b3f[_0x1a1548(0xf3)]===_0x123081[_0x1a1548(0xf3)]))==null?void 0x0:_0x433c01[_0x1a1548(0xfc)];_0x5b1f61&&this[_0x1a1548(0xd7)][_0x1a1548(0x120)](_0x5b2556,_0x47606f,_0x5b1f61['id'],_0x123081['solved']===I[_0x1a1548(0x10d)]);break;}}}));}};_=V([p(0x0,_0x108585(_0x278af8)),p(0x1,_0x108585(_0x54e638)),p(0x2,_0x108585(_0x4e911f)),p(0x3,_0x108585(_0x2d7221))],_);const z=_0x1c4990(0xd2),O={};var k=Object[_0x1c4990(0xc6)],Q=(_0x4bb896,_0x3c563d,_0x3dcc2e,_0x3a5e29)=>{for(var _0x223ec3=_0x3a5e29>0x1?void 0x0:_0x3a5e29?k(_0x3c563d,_0x3dcc2e):_0x3c563d,_0x53dec0=_0x4bb896['length']-0x1,_0x56ffab;_0x53dec0>=0x0;_0x53dec0--)(_0x56ffab=_0x4bb896[_0x53dec0])&&(_0x223ec3=_0x56ffab(_0x223ec3)||_0x223ec3);return _0x223ec3;},b=(_0x267a8b,_0x437b0f)=>(_0x81f267,_0x5e3a5f)=>_0x437b0f(_0x81f267,_0x5e3a5f,_0x267a8b);function X(_0x3f0a39,_0x34f7d2){const _0x13a7d7=_0x1c4990,_0x34b8a7=_0x3f0a39[_0x13a7d7(0xf5)][0x0];return{..._0x34f7d2,'id':_0x34b8a7[_0x13a7d7(0x128)],'resolved':_0x3f0a39[_0x13a7d7(0xd9)]===0x1,'dT':y(_0x34b8a7[_0x13a7d7(0x12b)]),'personId':_0x34b8a7[_0x13a7d7(0xe1)],'threadId':_0x34b8a7['threadId']};}function ee(_0x748a8d,_0x2fef79,_0x5407fb){const _0x395350=_0x1c4990;var _0x199550,_0x5b80fe;if(((_0x5b80fe=(_0x199550=_0x748a8d==null?void 0x0:_0x748a8d[_0x395350(0xf5)])==null?void 0x0:_0x199550['length'])!=null?_0x5b80fe:0x0)>0x0){const _0x41758e=(_0x4f7dee,_0x169062)=>({'id':_0x4f7dee[_0x395350(0x128)],'threadId':_0x4f7dee['threadId'],'dT':y(_0x4f7dee['createTimestamp']),'personId':_0x4f7dee[_0x395350(0xe1)],'resolved':_0x748a8d[_0x395350(0xd9)]===I[_0x395350(0x10d)],'unitId':_0x2fef79,'subUnitId':_0x5407fb,'text':JSON[_0x395350(0x116)](_0x4f7dee[_0x395350(0xdf)]),'parentId':_0x169062}),_0x391086=_0x41758e(_0x748a8d[_0x395350(0xf5)][0x0]);return{..._0x391086,'children':_0x748a8d['replies'][_0x395350(0xeb)](0x1)[_0x395350(0x10f)](_0x2eb096=>_0x41758e(_0x2eb096,_0x391086['id']))};}return null;}let S=class{constructor(_0x50ab96,_0x3aaf62,_0x554d8e){const _0x2fea0f=_0x1c4990;this[_0x2fea0f(0xde)]=_0x50ab96,this[_0x2fea0f(0xcd)]=_0x3aaf62,this[_0x2fea0f(0xe5)]=_0x554d8e;}async[_0x1c4990(0x117)](_0x1a7d5f){const _0x749028=_0x1c4990;var _0x52c72b,_0x15a47e;const {parentId:_0x490d09,unitId:_0x396f65,text:_0x3004c3,threadId:_0x513f4c}=_0x1a7d5f,_0x2e4409=(_0x15a47e=(_0x52c72b=_0x3004c3[_0x749028(0xf6)])==null?void 0x0:_0x52c72b[_0x749028(0xda)](_0x165cfc=>_0x165cfc[_0x749028(0x125)]===_0x11ff2a[_0x749028(0xdb)])[_0x749028(0x10f)](_0x186c68=>_0x186c68[_0x749028(0xfe)]))!=null?_0x15a47e:[],_0x2184b9=JSON[_0x749028(0x127)](_0x3004c3),_0x385dd5=(await this[_0x749028(0xe5)][_0x749028(0xe8)](_0x396f65))[_0x749028(0xd0)]();if(_0x490d09){const _0x487cfe={'memberId':_0x385dd5,'unitId':_0x396f65,'content':_0x2184b9,'mention':_0x2e4409,'threadId':_0x513f4c},_0x422576=(await this[_0x749028(0xde)][_0x749028(0xc5)]('/universer-api/comment/unit/'+_0x396f65+_0x749028(0xfd),{'body':_0x487cfe}))[_0x749028(0xf1)][_0x749028(0xe7)];return{..._0x1a7d5f,'id':_0x422576[_0x749028(0x128)],'dT':_0x5b2334(+_0x422576['createTimestamp'])[_0x749028(0x11c)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x422576[_0x749028(0xe1)]};}else{const _0x369960={'memberId':_0x385dd5,'unitId':_0x396f65,'content':_0x2184b9,'mention':_0x2e4409},_0x535b31=await this[_0x749028(0xde)][_0x749028(0xc5)](_0x749028(0x115)+_0x396f65+_0x749028(0x10c),{'body':_0x369960});return X(_0x535b31['body']['comment'],_0x1a7d5f);}}async['updateComment'](_0x369df0){const _0x48629d=_0x1c4990;var _0x23b1d0,_0x36d45c;const {text:_0x404232,unitId:_0x41e7b6}=_0x369df0,_0x29d593=(_0x36d45c=(_0x23b1d0=_0x404232[_0x48629d(0xf6)])==null?void 0x0:_0x23b1d0[_0x48629d(0xda)](_0x1806e6=>_0x1806e6['rangeType']===_0x11ff2a['COMMENT'])[_0x48629d(0x10f)](_0xae005d=>_0xae005d[_0x48629d(0xfe)]))!=null?_0x36d45c:[],_0x171d31=JSON['stringify'](_0x404232),_0x1c7e3a=_0x369df0['threadId'],_0x2b5a73=_0x369df0['id'],_0x3f7d42={'memberId':(await this[_0x48629d(0xe5)]['requireSession'](_0x41e7b6))['getMemberID'](),'unitId':_0x41e7b6,'threadId':_0x1c7e3a,'mention':_0x29d593,'content':_0x171d31,'replyId':_0x2b5a73},_0x4c3a8b=await this[_0x48629d(0xde)]['post']('/universer-api/comment/unit/'+_0x41e7b6+_0x48629d(0x109),{'body':_0x3f7d42});return!_0x4c3a8b['body'][_0x48629d(0x121)]||_0x4c3a8b[_0x48629d(0xf1)][_0x48629d(0x121)][_0x48629d(0xdd)]===0x1;}async['resolveComment'](_0x3e49a5){const _0x8f86e2=_0x1c4990,{unitId:_0x20fc31}=_0x3e49a5,_0x2f95c2=_0x3e49a5['threadId'],_0x2a8a3f={'memberId':this[_0x8f86e2(0xcd)]['getCurrentUser']()[_0x8f86e2(0xf8)],'unitId':_0x20fc31,'threadId':_0x2f95c2,'solved':_0x3e49a5[_0x8f86e2(0xfb)]?I[_0x8f86e2(0x10d)]:I[_0x8f86e2(0xf0)]},_0x2bbce0=await this['_httpService'][_0x8f86e2(0xc5)](_0x8f86e2(0x115)+_0x20fc31+'/solved',{'body':_0x2a8a3f});return!_0x2bbce0[_0x8f86e2(0xf1)]['error']||_0x2bbce0['body'][_0x8f86e2(0x121)][_0x8f86e2(0xdd)]===0x1;}async[_0x1c4990(0xd1)](_0x24fcdd,_0x1288a7,_0x53f267,_0x2f707f){const _0x141d46=_0x1c4990,_0x160c26={'memberId':(await this[_0x141d46(0xe5)][_0x141d46(0xe8)](_0x24fcdd))['getMemberID'](),'threadId':_0x53f267,'replyId':_0x2f707f,'unitId':_0x24fcdd},_0x3b8df8=await this[_0x141d46(0xde)][_0x141d46(0xc5)](_0x141d46(0x115)+_0x24fcdd+_0x141d46(0xe4),{'body':_0x160c26});return!_0x3b8df8['body'][_0x141d46(0x121)]||_0x3b8df8['body']['error'][_0x141d46(0xdd)]===0x1;}async[_0x1c4990(0x10e)](_0x55bc69,_0x53a9ce,_0x330570){const _0x2439f2=_0x1c4990,_0x16ee93={'unitId':_0x55bc69,'threadId':_0x330570},_0x5c7c4d=await this[_0x2439f2(0xde)][_0x2439f2(0xc5)](_0x2439f2(0x115)+_0x55bc69+_0x2439f2(0x107),{'body':_0x16ee93}),_0x2cfb57=_0x330570[_0x2439f2(0x10f)](_0xb9d311=>ee(_0x5c7c4d['body'][_0x2439f2(0xc3)][_0xb9d311],_0x55bc69,_0x53a9ce))[_0x2439f2(0xda)](Boolean);return Object[_0x2439f2(0x129)](_0x5c7c4d[_0x2439f2(0xf1)][_0x2439f2(0xe9)])['forEach'](_0x5c2d1c=>{const _0x17d590=_0x2439f2;this['_userService'][_0x17d590(0xca)](_0x5c2d1c);}),_0x2cfb57;}[_0x1c4990(0x123)](_0x19e459){const _0x218cc9=_0x1c4990;return{'id':_0x19e459['id'],'threadId':_0x19e459[_0x218cc9(0xf3)],'ref':_0x19e459[_0x218cc9(0x126)]};}};S=Q([b(0x0,_0x108585(_0x23a127)),b(0x1,_0x108585(_0x4e911f)),b(0x2,_0x108585(_0x5417b5))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x1b4820,_0x1d946c,_0x470e7d,_0x2b234e)=>{const _0x2932ec=_0x1c4990;for(var _0x2aafea=_0x2b234e>0x1?void 0x0:_0x2b234e?re(_0x1d946c,_0x470e7d):_0x1d946c,_0x5522c6=_0x1b4820[_0x2932ec(0x100)]-0x1,_0x2227b2;_0x5522c6>=0x0;_0x5522c6--)(_0x2227b2=_0x1b4820[_0x5522c6])&&(_0x2aafea=_0x2227b2(_0x2aafea)||_0x2aafea);return _0x2aafea;},M=(_0x3f0353,_0x381eb5)=>(_0xad62ff,_0x2c6546)=>_0x381eb5(_0xad62ff,_0x2c6546,_0x3f0353);let f=class extends _0x2c9fc3{constructor(_0x4d80fa,_0x4e8550){const _0x507e42=_0x1c4990;super(),this[_0x507e42(0xce)]=_0x4d80fa,this[_0x507e42(0x11f)]=_0x4e8550,this['_initDataSource']();}[_0x1c4990(0xcf)](){const _0x273b0e=_0x1c4990;this[_0x273b0e(0xce)][_0x273b0e(0x108)]=this[_0x273b0e(0x11f)],this[_0x273b0e(0xce)][_0x273b0e(0xea)]=!0x1;}};f=te([M(0x0,_0x7340a4),M(0x1,_0x108585(S))],f);var se=Object[_0x1c4990(0x105)],oe=Object[_0x1c4990(0xc6)],ne=(_0x2e56ff,_0x1a590,_0x2984f2)=>_0x1a590 in _0x2e56ff?se(_0x2e56ff,_0x1a590,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2984f2}):_0x2e56ff[_0x1a590]=_0x2984f2,ie=(_0x8bb360,_0x469d97,_0x529a7e,_0x6b3b8)=>{const _0x1e3213=_0x1c4990;for(var _0x4bae41=_0x6b3b8>0x1?void 0x0:_0x6b3b8?oe(_0x469d97,_0x529a7e):_0x469d97,_0x87d4aa=_0x8bb360[_0x1e3213(0x100)]-0x1,_0x297edd;_0x87d4aa>=0x0;_0x87d4aa--)(_0x297edd=_0x8bb360[_0x87d4aa])&&(_0x4bae41=_0x297edd(_0x4bae41)||_0x4bae41);return _0x4bae41;},N=(_0x5071fe,_0xf3b938)=>(_0x41a703,_0x4bbe2e)=>_0xf3b938(_0x41a703,_0x4bbe2e,_0x5071fe),$=(_0x134d42,_0x2ee20b,_0x11136e)=>ne(_0x134d42,typeof _0x2ee20b!=_0x1c4990(0x104)?_0x2ee20b+'':_0x2ee20b,_0x11136e);let g=class extends _0x21d69d{constructor(_0x416df8=O,_0x2e5463,_0xe1cafb){const _0x57e98c=_0x1c4990;super(),this[_0x57e98c(0xe6)]=_0x416df8,this[_0x57e98c(0x12c)]=_0x2e5463,this[_0x57e98c(0x12a)]=_0xe1cafb;const {..._0x39e32f}=_0x49cd4d({},O,this[_0x57e98c(0xe6)]);this[_0x57e98c(0x12a)][_0x57e98c(0xc7)](z,_0x39e32f);}[_0x1c4990(0xd4)](){[[S],[f],[_]]['forEach'](_0x42786a=>{const _0x108275=_0x37a2;this[_0x108275(0x12c)][_0x108275(0x11a)](_0x42786a);});}[_0x1c4990(0x124)](){const _0x440764=_0x1c4990;this[_0x440764(0x12c)][_0x440764(0x112)](f),this['_injector'][_0x440764(0x112)](_);}};$(g,_0x1c4990(0xfa),W),$(g,_0x1c4990(0x10a),_0x22c964[_0x1c4990(0x103)]),g=ie([_0x4a4332(_0x33ba46,_0x4fb59d,_0x2c8ed9),N(0x1,_0x108585(_0x2d7221)),N(0x2,_0x440bd9)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x4624d6=_0x327f;(function(_0x4f75d0,_0x3605ba){const _0x311a16=_0x327f,_0x32701d=_0x4f75d0();while(!![]){try{const _0xc22f70=-parseInt(_0x311a16(0x134))/0x1+parseInt(_0x311a16(0x13f))/0x2+-parseInt(_0x311a16(0x12f))/0x3*(parseInt(_0x311a16(0x13d))/0x4)+-parseInt(_0x311a16(0x135))/0x5+parseInt(_0x311a16(0x10f))/0x6*(parseInt(_0x311a16(0x137))/0x7)+-parseInt(_0x311a16(0x10d))/0x8*(parseInt(_0x311a16(0x142))/0x9)+parseInt(_0x311a16(0xfd))/0xa;if(_0xc22f70===_0x3605ba)break;else _0x32701d['push'](_0x32701d['shift']());}catch(_0x625eb0){_0x32701d['push'](_0x32701d['shift']());}}}(_0x1090,0x89d1a));import{CommentService as _0x14a410,CollaborationSessionService as _0x323b7b,UniverCollaborationClientPlugin as _0x52714a}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2c6850}from'@univerjs-pro/license';import{dayjs as _0x20ed6c,UserManagerService as _0x4e7639,Inject as _0x23c8d6,Injector as _0x70bfa4,Disposable as _0x39d6c0,CustomRangeType as _0x3145e6,DependentOn as _0x177cae,Plugin as _0x56afab,merge as _0x120c6f,IConfigService as _0x4476e2}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x51a7d2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x37709e,IThreadCommentDataSourceService as _0x40023a}from'@univerjs/thread-comment';import{bufferTime as _0x337727}from'rxjs';import{HTTPService as _0x3afe4b}from'@univerjs/network';const k=_0x4624d6(0x126),B=_0x4624d6(0x146),j={'name':k,'version':B},W=_0x4624d6(0x130);var p=(_0x2f6fb7=>(_0x2f6fb7[_0x2f6fb7[_0x4624d6(0x103)]=0x0]=_0x4624d6(0x103),_0x2f6fb7[_0x2f6fb7[_0x4624d6(0x116)]=0x1]=_0x4624d6(0x116),_0x2f6fb7[_0x2f6fb7[_0x4624d6(0x10c)]=-0x1]=_0x4624d6(0x10c),_0x2f6fb7))(p||{}),v=(_0x58542b=>(_0x58542b[_0x58542b[_0x4624d6(0x155)]=0x0]=_0x4624d6(0x155),_0x58542b[_0x58542b[_0x4624d6(0x12c)]=0x1]=_0x4624d6(0x12c),_0x58542b[_0x58542b['Reply']=0x2]=_0x4624d6(0x13a),_0x58542b[_0x58542b[_0x4624d6(0x129)]=0x3]=_0x4624d6(0x129),_0x58542b[_0x58542b[_0x4624d6(0x131)]=0x4]=_0x4624d6(0x131),_0x58542b[_0x58542b[_0x4624d6(0xfe)]=0x5]=_0x4624d6(0xfe),_0x58542b[_0x58542b[_0x4624d6(0x10c)]=-0x1]=_0x4624d6(0x10c),_0x58542b))(v||{});const D=_0x4f68bf=>_0x20ed6c(new Date(+_0x4f68bf))[_0x4624d6(0x153)](_0x4624d6(0x14e)),z=async(_0x262a83,_0x5b9e75)=>{const _0x22b3e2=_0x4624d6,_0x53a05a=_0x262a83['get'](_0x4e7639),_0x48076c=_0x262a83[_0x22b3e2(0x101)](_0x3afe4b);_0x5b9e75[_0x22b3e2(0xfb)](_0x4753dc=>{const _0x1bd5d0=_0x22b3e2;_0x53a05a[_0x1bd5d0(0x141)](_0x4753dc)&&_0x5b9e75['delete'](_0x4753dc);}),_0x5b9e75[_0x22b3e2(0x11d)]&&(await _0x48076c['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x5b9e75]}}))[_0x22b3e2(0x14c)]['users']['forEach'](_0x19f7f6=>{const _0x592a6e=_0x22b3e2;_0x19f7f6&&_0x53a05a[_0x592a6e(0x123)](_0x19f7f6);});};var K=Object[_0x4624d6(0x110)],V=(_0x163464,_0x129d44,_0x4285ed,_0x19b041)=>{for(var _0x258969=_0x19b041>0x1?void 0x0:_0x19b041?K(_0x129d44,_0x4285ed):_0x129d44,_0x386256=_0x163464['length']-0x1,_0x775b73;_0x386256>=0x0;_0x386256--)(_0x775b73=_0x163464[_0x386256])&&(_0x258969=_0x775b73(_0x258969)||_0x258969);return _0x258969;},_=(_0x3a63d3,_0x3a0aa2)=>(_0x95611f,_0x505a8e)=>_0x3a0aa2(_0x95611f,_0x505a8e,_0x3a63d3);let S=class extends _0x39d6c0{constructor(_0xa2b313,_0xf632f7,_0xd67fcd,_0x4c284a){const _0x5528f7=_0x4624d6;super(),this['_commentService']=_0xa2b313,this[_0x5528f7(0x145)]=_0xf632f7,this['_userService']=_0xd67fcd,this[_0x5528f7(0x13e)]=_0x4c284a,this[_0x5528f7(0x122)](),this[_0x5528f7(0x10e)]();}[_0x4624d6(0x10e)](){const _0x5bfb85=_0x4624d6;this[_0x5bfb85(0x14b)](this['_threadCommentModel'][_0x5bfb85(0x115)][_0x5bfb85(0x12d)](_0x337727(0x10))[_0x5bfb85(0x15f)](_0x5a3415=>{const _0x14cf53=_0x5bfb85,_0x321da2=new Set();_0x5a3415['forEach'](_0x4309d3=>{const _0x45dcd6=_0x327f;if(_0x4309d3[_0x45dcd6(0x14f)]===_0x45dcd6(0x109)){const _0x37691=_0x4309d3[_0x45dcd6(0x15c)][_0x45dcd6(0x163)];_0x321da2[_0x45dcd6(0x109)](_0x37691);}}),z(this[_0x14cf53(0x13e)],_0x321da2);}));}[_0x4624d6(0x122)](){const _0x9c7cfb=_0x4624d6;this[_0x9c7cfb(0x14b)](this[_0x9c7cfb(0x108)][_0x9c7cfb(0x115)]['subscribe'](async _0x179b15=>{const _0x58ccdd=_0x9c7cfb;var _0x4be680,_0x38a35a,_0x43e186,_0x5e81c7;const _0x49ee5e=(_0x4be680=this['_threadCommentModel'][_0x58ccdd(0x152)](_0x179b15[_0x58ccdd(0xff)])['find'](_0x158dd2=>_0x158dd2[_0x58ccdd(0xfc)]===_0x179b15[_0x58ccdd(0xfc)]))==null?void 0x0:_0x4be680['root'];if(!_0x49ee5e)return;const {unitId:_0x45ccce,subUnitId:_0x53a969}=_0x49ee5e;switch(_0x179b15['user']&&this[_0x58ccdd(0x118)][_0x58ccdd(0x123)](_0x179b15['user']),_0x179b15['type']){case v[_0x58ccdd(0x12c)]:break;case v[_0x58ccdd(0x13a)]:{this[_0x58ccdd(0x145)]['addComment'](_0x45ccce,_0x53a969,{'unitId':_0x45ccce,'subUnitId':_0x53a969,'ref':'','id':_0x179b15['replyId'],'dT':D(+_0x179b15[_0x58ccdd(0x158)]),'threadId':_0x179b15[_0x58ccdd(0xfc)],'personId':(_0x43e186=(_0x38a35a=_0x179b15['user'])==null?void 0x0:_0x38a35a[_0x58ccdd(0x127)])!=null?_0x43e186:_0x179b15[_0x58ccdd(0x104)],'text':JSON[_0x58ccdd(0x10a)](_0x179b15[_0x58ccdd(0x133)]),'parentId':_0x49ee5e['id']});break;}case v[_0x58ccdd(0x131)]:{const _0x307e29=this[_0x58ccdd(0x145)][_0x58ccdd(0x14d)](_0x45ccce,_0x53a969,_0x179b15[_0x58ccdd(0x148)]);_0x307e29&&_0x307e29['parentId']&&this['_threadCommentModel']['deleteComment'](_0x45ccce,_0x53a969,_0x179b15[_0x58ccdd(0x148)]);break;}case v['Edit']:{this[_0x58ccdd(0x145)][_0x58ccdd(0x11b)](_0x45ccce,_0x53a969,{'commentId':_0x179b15[_0x58ccdd(0x148)],'text':JSON[_0x58ccdd(0x10a)](_0x179b15[_0x58ccdd(0x133)])});break;}case v[_0x58ccdd(0xfe)]:{const _0x416100=(_0x5e81c7=this[_0x58ccdd(0x145)][_0x58ccdd(0x152)](_0x179b15[_0x58ccdd(0xff)])[_0x58ccdd(0x15e)](_0x366079=>_0x366079['threadId']===_0x179b15[_0x58ccdd(0xfc)]))==null?void 0x0:_0x5e81c7[_0x58ccdd(0x111)];_0x416100&&this[_0x58ccdd(0x145)]['resolveComment'](_0x45ccce,_0x53a969,_0x416100['id'],_0x179b15[_0x58ccdd(0x105)]===p[_0x58ccdd(0x116)]);break;}}}));}};S=V([_(0x0,_0x23c8d6(_0x14a410)),_(0x1,_0x23c8d6(_0x37709e)),_(0x2,_0x23c8d6(_0x4e7639)),_(0x3,_0x23c8d6(_0x70bfa4))],S);const Q='thread-comment-data-source.config',M={};var X=Object[_0x4624d6(0x110)],ee=(_0x15654e,_0x32dffd,_0x5e8b5c,_0x2e472c)=>{const _0x25a18f=_0x4624d6;for(var _0x273905=_0x2e472c>0x1?void 0x0:_0x2e472c?X(_0x32dffd,_0x5e8b5c):_0x32dffd,_0xec1ccd=_0x15654e[_0x25a18f(0x124)]-0x1,_0x4956e3;_0xec1ccd>=0x0;_0xec1ccd--)(_0x4956e3=_0x15654e[_0xec1ccd])&&(_0x273905=_0x4956e3(_0x273905)||_0x273905);return _0x273905;},b=(_0x8dabcd,_0x21a860)=>(_0x10f7b3,_0xb0829d)=>_0x21a860(_0x10f7b3,_0xb0829d,_0x8dabcd);function re(_0xaae18f,_0x253f23){const _0xd316a=_0x4624d6,_0x4362fc=_0xaae18f[_0xd316a(0x140)][0x0];return{..._0x253f23,'id':_0x4362fc['replyId'],'resolved':_0xaae18f[_0xd316a(0x105)]===0x1,'dT':D(_0x4362fc[_0xd316a(0x158)]),'personId':_0x4362fc[_0xd316a(0x104)],'threadId':_0x4362fc[_0xd316a(0xfc)]};}function te(_0x5abc60,_0x758804,_0x2bb882){const _0x23dcc3=_0x4624d6;var _0x536da7,_0x301b7e;if(((_0x301b7e=(_0x536da7=_0x5abc60==null?void 0x0:_0x5abc60[_0x23dcc3(0x140)])==null?void 0x0:_0x536da7[_0x23dcc3(0x124)])!=null?_0x301b7e:0x0)>0x0){const _0xeca4d3=(_0x240620,_0x19c813)=>({'id':_0x240620[_0x23dcc3(0x148)],'threadId':_0x240620[_0x23dcc3(0xfc)],'dT':D(_0x240620[_0x23dcc3(0x158)]),'personId':_0x240620['userId'],'resolved':_0x5abc60[_0x23dcc3(0x105)]===p['Solved'],'unitId':_0x758804,'subUnitId':_0x2bb882,'text':JSON[_0x23dcc3(0x10a)](_0x240620['content']),'parentId':_0x19c813}),_0x1f0be0=_0xeca4d3(_0x5abc60[_0x23dcc3(0x140)][0x0]);return{..._0x1f0be0,'children':_0x5abc60[_0x23dcc3(0x140)][_0x23dcc3(0x15a)](0x1)[_0x23dcc3(0x107)](_0xe22820=>_0xeca4d3(_0xe22820,_0x1f0be0['id']))};}return null;}function _0x327f(_0x179020,_0x475438){_0x179020=_0x179020-0xfb;const _0x10900b=_0x1090();let _0x327f5a=_0x10900b[_0x179020];return _0x327f5a;}let f=class{constructor(_0x2ddcc7,_0x509e31,_0x343390){const _0x527bd4=_0x4624d6;this[_0x527bd4(0x12a)]=_0x2ddcc7,this[_0x527bd4(0x118)]=_0x509e31,this['_sessionService']=_0x343390;}async[_0x4624d6(0x14a)](_0x298451){const _0xf63c0e=_0x4624d6;var _0x5b3f92,_0x59cff4;const {parentId:_0x1b4507,unitId:_0x46c8ff,text:_0xe9edbf,threadId:_0x41d923}=_0x298451,_0x1cf13f=(_0x59cff4=(_0x5b3f92=_0xe9edbf[_0xf63c0e(0x106)])==null?void 0x0:_0x5b3f92[_0xf63c0e(0x160)](_0x3575b6=>_0x3575b6[_0xf63c0e(0x156)]===_0x3145e6[_0xf63c0e(0x139)])[_0xf63c0e(0x107)](_0x492d75=>_0x492d75[_0xf63c0e(0x117)]))!=null?_0x59cff4:[],_0x5c7951=JSON[_0xf63c0e(0x11e)](_0xe9edbf),_0x40f0ad=(await this[_0xf63c0e(0x11c)][_0xf63c0e(0x119)](_0x46c8ff))[_0xf63c0e(0x15b)]();if(_0x1b4507){const _0x3284ec={'memberId':_0x40f0ad,'unitId':_0x46c8ff,'content':_0x5c7951,'mention':_0x1cf13f,'threadId':_0x41d923},_0x59c797=(await this[_0xf63c0e(0x12a)][_0xf63c0e(0x10b)](_0xf63c0e(0x162)+_0x46c8ff+_0xf63c0e(0x114),{'body':_0x3284ec}))[_0xf63c0e(0x14c)]['reply'];return{..._0x298451,'id':_0x59c797[_0xf63c0e(0x148)],'dT':_0x20ed6c(+_0x59c797[_0xf63c0e(0x158)])['format'](_0xf63c0e(0x14e)),'personId':_0x59c797[_0xf63c0e(0x104)]};}else{const _0x36ca74={'memberId':_0x40f0ad,'unitId':_0x46c8ff,'content':_0x5c7951,'mention':_0x1cf13f},_0x21b5e8=await this[_0xf63c0e(0x12a)]['post'](_0xf63c0e(0x162)+_0x46c8ff+_0xf63c0e(0x15d),{'body':_0x36ca74});return re(_0x21b5e8[_0xf63c0e(0x14c)]['comment'],_0x298451);}}async[_0x4624d6(0x11b)](_0x261f4e){const _0x131f75=_0x4624d6;var _0x5ddd21,_0x3a16c3;const {text:_0x577fe5,unitId:_0x33534b}=_0x261f4e,_0x140ce6=(_0x3a16c3=(_0x5ddd21=_0x577fe5[_0x131f75(0x106)])==null?void 0x0:_0x5ddd21['filter'](_0x551dc9=>_0x551dc9['rangeType']===_0x3145e6[_0x131f75(0x139)])[_0x131f75(0x107)](_0x2d6d59=>_0x2d6d59[_0x131f75(0x117)]))!=null?_0x3a16c3:[],_0x569191=JSON[_0x131f75(0x11e)](_0x577fe5),_0x500c37=_0x261f4e[_0x131f75(0xfc)],_0x31b135=_0x261f4e['id'],_0x4dfb66={'memberId':(await this['_sessionService'][_0x131f75(0x119)](_0x33534b))[_0x131f75(0x15b)](),'unitId':_0x33534b,'threadId':_0x500c37,'mention':_0x140ce6,'content':_0x569191,'replyId':_0x31b135},_0x463231=await this[_0x131f75(0x12a)][_0x131f75(0x10b)](_0x131f75(0x162)+_0x33534b+_0x131f75(0x11f),{'body':_0x4dfb66});return!_0x463231[_0x131f75(0x14c)]['error']||_0x463231[_0x131f75(0x14c)][_0x131f75(0x12e)][_0x131f75(0x121)]===0x1;}async[_0x4624d6(0x128)](_0x299ae6){const _0x13c84b=_0x4624d6,{unitId:_0x32997e}=_0x299ae6,_0x19e56c=_0x299ae6[_0x13c84b(0xfc)],_0x5f0eaf={'memberId':this[_0x13c84b(0x118)][_0x13c84b(0x125)]()[_0x13c84b(0x127)],'unitId':_0x32997e,'threadId':_0x19e56c,'solved':_0x299ae6['resolved']?p[_0x13c84b(0x116)]:p[_0x13c84b(0x103)]},_0x22ca12=await this[_0x13c84b(0x12a)][_0x13c84b(0x10b)](_0x13c84b(0x162)+_0x32997e+_0x13c84b(0x157),{'body':_0x5f0eaf});return!_0x22ca12[_0x13c84b(0x14c)][_0x13c84b(0x12e)]||_0x22ca12[_0x13c84b(0x14c)]['error'][_0x13c84b(0x121)]===0x1;}async[_0x4624d6(0x132)](_0x221379,_0x147e1f,_0x176aa8,_0x135285){const _0x48aa90=_0x4624d6,_0x1068de={'memberId':(await this[_0x48aa90(0x11c)][_0x48aa90(0x119)](_0x221379))[_0x48aa90(0x15b)](),'threadId':_0x176aa8,'replyId':_0x135285,'unitId':_0x221379},_0x5e8d61=await this[_0x48aa90(0x12a)][_0x48aa90(0x10b)]('/universer-api/comment/unit/'+_0x221379+_0x48aa90(0x147),{'body':_0x1068de});return!_0x5e8d61['body'][_0x48aa90(0x12e)]||_0x5e8d61[_0x48aa90(0x14c)][_0x48aa90(0x12e)][_0x48aa90(0x121)]===0x1;}async[_0x4624d6(0x159)](_0x346370,_0x16abc8,_0x123daa){const _0xf0d76a=_0x4624d6,_0x3a1ad8={'unitId':_0x346370,'threadId':_0x123daa},_0xe4cb48=await this[_0xf0d76a(0x12a)][_0xf0d76a(0x10b)](_0xf0d76a(0x162)+_0x346370+_0xf0d76a(0x138),{'body':_0x3a1ad8}),_0x598f7e=_0x123daa[_0xf0d76a(0x107)](_0x1480db=>te(_0xe4cb48[_0xf0d76a(0x14c)][_0xf0d76a(0x161)][_0x1480db],_0x346370,_0x16abc8))[_0xf0d76a(0x160)](Boolean);return Object[_0xf0d76a(0x100)](_0xe4cb48[_0xf0d76a(0x14c)][_0xf0d76a(0x150)])['forEach'](_0x3bbb87=>{const _0x1fd458=_0xf0d76a;this[_0x1fd458(0x118)][_0x1fd458(0x123)](_0x3bbb87);}),_0x598f7e;}['saveCommentToSnapshot'](_0x2931d6){const _0x3887a0=_0x4624d6;return{'id':_0x2931d6['id'],'threadId':_0x2931d6[_0x3887a0(0xfc)],'ref':_0x2931d6[_0x3887a0(0x149)]};}};f=ee([b(0x0,_0x23c8d6(_0x3afe4b)),b(0x1,_0x23c8d6(_0x4e7639)),b(0x2,_0x23c8d6(_0x323b7b))],f);var se=Object[_0x4624d6(0x110)],oe=(_0x5d408f,_0x19761e,_0x350d4b,_0x452936)=>{const _0x397dff=_0x4624d6;for(var _0xd5d1b0=_0x452936>0x1?void 0x0:_0x452936?se(_0x19761e,_0x350d4b):_0x19761e,_0x52f679=_0x5d408f[_0x397dff(0x124)]-0x1,_0x13845e;_0x52f679>=0x0;_0x52f679--)(_0x13845e=_0x5d408f[_0x52f679])&&(_0xd5d1b0=_0x13845e(_0xd5d1b0)||_0xd5d1b0);return _0xd5d1b0;},N=(_0x1a4e35,_0x4094bf)=>(_0x5aa3f4,_0x292906)=>_0x4094bf(_0x5aa3f4,_0x292906,_0x1a4e35);let g=class extends _0x39d6c0{constructor(_0x20466f,_0x207b84){const _0xa36dda=_0x4624d6;super(),this[_0xa36dda(0x11a)]=_0x20466f,this[_0xa36dda(0x112)]=_0x207b84,this[_0xa36dda(0x12b)]();}[_0x4624d6(0x12b)](){const _0x12691f=_0x4624d6;this[_0x12691f(0x11a)][_0x12691f(0x143)]=this[_0x12691f(0x112)],this[_0x12691f(0x11a)][_0x12691f(0x144)]=!0x1;}};g=oe([N(0x0,_0x40023a),N(0x1,_0x23c8d6(f))],g);var ne=Object[_0x4624d6(0x136)],ie=Object['getOwnPropertyDescriptor'],ae=(_0x418c,_0x1f1c73,_0x594935)=>_0x1f1c73 in _0x418c?ne(_0x418c,_0x1f1c73,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x594935}):_0x418c[_0x1f1c73]=_0x594935,ce=(_0x5d4e7e,_0x571f46,_0x4501a2,_0x535ec6)=>{const _0x1b6b2f=_0x4624d6;for(var _0x170b74=_0x535ec6>0x1?void 0x0:_0x535ec6?ie(_0x571f46,_0x4501a2):_0x571f46,_0x380f6b=_0x5d4e7e[_0x1b6b2f(0x124)]-0x1,_0x2e4b56;_0x380f6b>=0x0;_0x380f6b--)(_0x2e4b56=_0x5d4e7e[_0x380f6b])&&(_0x170b74=_0x2e4b56(_0x170b74)||_0x170b74);return _0x170b74;},w=(_0xc340c1,_0x547b22)=>(_0x21e19e,_0x2d021c)=>_0x547b22(_0x21e19e,_0x2d021c,_0xc340c1),y=(_0xbbab08,_0x55960f,_0x476d1e)=>ae(_0xbbab08,typeof _0x55960f!=_0x4624d6(0x151)?_0x55960f+'':_0x55960f,_0x476d1e);let I=class extends _0x56afab{constructor(_0x146463=M,_0xa8ffda,_0x39dae9){const _0x2bf8ab=_0x4624d6;super(),this[_0x2bf8ab(0x13c)]=_0x146463,this[_0x2bf8ab(0x13e)]=_0xa8ffda,this[_0x2bf8ab(0x154)]=_0x39dae9;const {..._0x374803}=_0x120c6f({},M,this[_0x2bf8ab(0x13c)]);this[_0x2bf8ab(0x154)][_0x2bf8ab(0x120)](Q,_0x374803);}['onStarting'](){const _0x3eea1d=_0x4624d6;[[f],[g],[S]][_0x3eea1d(0xfb)](_0x5178a7=>{const _0x34c826=_0x3eea1d;this[_0x34c826(0x13e)]['add'](_0x5178a7);});}[_0x4624d6(0x102)](){const _0x309d3d=_0x4624d6;this[_0x309d3d(0x13e)][_0x309d3d(0x101)](g),this[_0x309d3d(0x13e)][_0x309d3d(0x101)](S);}};y(I,'pluginName',W),y(I,'packageName',j[_0x4624d6(0x113)]),y(I,_0x4624d6(0x13b),j[_0x4624d6(0x13b)]),I=ce([_0x177cae(_0x51a7d2,_0x52714a,_0x2c6850),w(0x1,_0x23c8d6(_0x70bfa4)),w(0x2,_0x4476e2)],I);function _0x1090(){const _0x394dcd=['4242feYzEM','getOwnPropertyDescriptor','root','_threadCommentDataSource','name','/reply','commentUpdate$','Solved','rangeId','_userService','requireSession','_threadCommentDataSourceService','updateComment','_sessionService','size','stringify','/edit','setConfig','code','_init','addUser','length','getCurrentUser','@univerjs-pro/thread-comment-datasource','userID','resolveComment','Edit','_httpService','_initDataSource','Add','pipe','error','50178dhTHeZ','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Delete','deleteComment','content','358920NyKaFA','4423935wUHKLB','defineProperty','8981GdQLWs','/list','COMMENT','Reply','version','_config','148fWGJXm','_injector','1597598krKeaP','replies','getUser','18uMgoDw','dataSource','syncUpdateMutationToColla','_threadCommentModel','0.17.0','/delete','replyId','ref','addComment','disposeWithMe','body','getComment','YYYY/MM/DD\x20HH:mm','type','users','symbol','getUnit','format','_configService','Unknown','rangeType','/solved','createTimestamp','listComments','slice','getMemberID','payload','/add','find','subscribe','filter','comments','/universer-api/comment/unit/','personId','forEach','threadId','10829590lXzVcB','Solve','unitId','values','get','onReady','OpenOrReOpen','userId','solved','customRanges','map','_commentService','add','parse','post','UNRECOGNIZED','1447056SvIDkI','_initUserSync'];_0x1090=function(){return _0x394dcd;};return _0x1090();}export{I as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x1c4990=_0x37a2;(function(_0x54bbc5,_0xe0f6fc){const _0x38a8ac=_0x37a2,_0x1381ee=_0x54bbc5();while(!![]){try{const _0x3aa1eb=-parseInt(_0x38a8ac(0xef))/0x1+-parseInt(_0x38a8ac(0x10b))/0x2*(-parseInt(_0x38a8ac(0xf2))/0x3)+-parseInt(_0x38a8ac(0x102))/0x4+parseInt(_0x38a8ac(0xee))/0x5+parseInt(_0x38a8ac(0x118))/0x6*(-parseInt(_0x38a8ac(0x110))/0x7)+-parseInt(_0x38a8ac(0xf7))/0x8+parseInt(_0x38a8ac(0x106))/0x9;if(_0x3aa1eb===_0xe0f6fc)break;else _0x1381ee['push'](_0x1381ee['shift']());}catch(_0x3fd14b){_0x1381ee['push'](_0x1381ee['shift']());}}}(_0x5d44,0x4be44));import{CommentService as _0x278af8,CollaborationSessionService as _0x5417b5,UniverCollaborationClientPlugin as _0x4fb59d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2c8ed9}from'@univerjs-pro/license';import{dayjs as _0x5b2334,UserManagerService as _0x4e911f,Inject as _0x108585,Injector as _0x2d7221,Disposable as _0x2c9fc3,CustomRangeType as _0x11ff2a,UniverInstanceType as _0x22c964,DependentOn as _0x4a4332,Plugin as _0x21d69d,merge as _0x49cd4d,IConfigService as _0x440bd9}from'@univerjs/core';function _0x5d44(){const _0x24d7fe=['userId','Delete','UNRECOGNIZED','/delete','_sessionService','_config','reply','requireSession','users','syncUpdateMutationToColla','slice','Unknown','Reply','1859205ZqtcBQ','185859TLmOvm','OpenOrReOpen','body','1038rYgssC','threadId','_init','replies','customRanges','2004256PfLaNi','userID','_initUserSync','pluginName','resolved','root','/reply','rangeId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','length','updateComment','870664OYMeBY','UNIVER_UNKNOWN','symbol','defineProperty','3931740HkgxHN','/list','dataSource','/edit','type','2766gefcSB','/add','Solved','listComments','map','35rhqpDw','delete','get','personId','Add','/universer-api/comment/unit/','parse','addComment','386772kwDwfN','forEach','add','getUnit','format','YYYY/MM/DD\x20HH:mm','parentId','_threadCommentDataSource','resolveComment','error','subscribe','saveCommentToSnapshot','onReady','rangeType','ref','stringify','replyId','values','_configService','createTimestamp','_injector','comments','_commentService','post','getOwnPropertyDescriptor','setConfig','/universer-api/user/list','commentUpdate$','addUser','getComment','pipe','_userService','_threadCommentDataSourceService','_initDataSource','getMemberID','deleteComment','thread-comment-data-source.config','Edit','onStarting','user','getUser','_threadCommentModel','Solve','solved','filter','COMMENT','disposeWithMe','code','_httpService','content','unitId'];_0x5d44=function(){return _0x24d7fe;};return _0x5d44();}import{UniverThreadCommentUIPlugin as _0x33ba46}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x54e638,IThreadCommentDataSourceService as _0x7340a4}from'@univerjs/thread-comment';import{bufferTime as _0x3ed3f1}from'rxjs';import{HTTPService as _0x23a127}from'@univerjs/network';const W=_0x1c4990(0xff);var I=(_0x3e2845=>(_0x3e2845[_0x3e2845[_0x1c4990(0xf0)]=0x0]='OpenOrReOpen',_0x3e2845[_0x3e2845[_0x1c4990(0x10d)]=0x1]='Solved',_0x3e2845[_0x3e2845[_0x1c4990(0xe3)]=-0x1]=_0x1c4990(0xe3),_0x3e2845))(I||{}),v=(_0xb69aba=>(_0xb69aba[_0xb69aba[_0x1c4990(0xec)]=0x0]=_0x1c4990(0xec),_0xb69aba[_0xb69aba[_0x1c4990(0x114)]=0x1]=_0x1c4990(0x114),_0xb69aba[_0xb69aba[_0x1c4990(0xed)]=0x2]=_0x1c4990(0xed),_0xb69aba[_0xb69aba[_0x1c4990(0xd3)]=0x3]=_0x1c4990(0xd3),_0xb69aba[_0xb69aba[_0x1c4990(0xe2)]=0x4]=_0x1c4990(0xe2),_0xb69aba[_0xb69aba[_0x1c4990(0xd8)]=0x5]=_0x1c4990(0xd8),_0xb69aba[_0xb69aba[_0x1c4990(0xe3)]=-0x1]='UNRECOGNIZED',_0xb69aba))(v||{});function _0x37a2(_0x4089be,_0x559117){_0x4089be=_0x4089be-0xc3;const _0x5d44ad=_0x5d44();let _0x37a29e=_0x5d44ad[_0x4089be];return _0x37a29e;}const y=_0x40d80b=>_0x5b2334(new Date(+_0x40d80b))[_0x1c4990(0x11c)](_0x1c4990(0x11d)),B=async(_0x3cc7f2,_0x442646)=>{const _0x3429a9=_0x1c4990,_0x5a03fc=_0x3cc7f2[_0x3429a9(0x112)](_0x4e911f),_0x2fda37=_0x3cc7f2['get'](_0x23a127);_0x442646[_0x3429a9(0x119)](_0x4dcb1c=>{const _0x24859f=_0x3429a9;_0x5a03fc[_0x24859f(0xd6)](_0x4dcb1c)&&_0x442646[_0x24859f(0x111)](_0x4dcb1c);}),_0x442646['size']&&(await _0x2fda37[_0x3429a9(0x112)](_0x3429a9(0xc8),{'params':{'userIDs':[..._0x442646]}}))[_0x3429a9(0xf1)][_0x3429a9(0xe9)][_0x3429a9(0x119)](_0x39929e=>{const _0x55272c=_0x3429a9;_0x39929e&&_0x5a03fc[_0x55272c(0xca)](_0x39929e);});};var K=Object[_0x1c4990(0xc6)],V=(_0x36a719,_0x446352,_0x630a7a,_0x19e310)=>{const _0x296f3c=_0x1c4990;for(var _0x1a0b07=_0x19e310>0x1?void 0x0:_0x19e310?K(_0x446352,_0x630a7a):_0x446352,_0x350ed8=_0x36a719[_0x296f3c(0x100)]-0x1,_0x47c209;_0x350ed8>=0x0;_0x350ed8--)(_0x47c209=_0x36a719[_0x350ed8])&&(_0x1a0b07=_0x47c209(_0x1a0b07)||_0x1a0b07);return _0x1a0b07;},p=(_0x4f7ad6,_0x5ef58f)=>(_0x26b672,_0x161874)=>_0x5ef58f(_0x26b672,_0x161874,_0x4f7ad6);let _=class extends _0x2c9fc3{constructor(_0x7df6b6,_0x43303f,_0xc1cb11,_0x76d89f){const _0x3510e0=_0x1c4990;super(),this[_0x3510e0(0xc4)]=_0x7df6b6,this[_0x3510e0(0xd7)]=_0x43303f,this['_userService']=_0xc1cb11,this[_0x3510e0(0x12c)]=_0x76d89f,this[_0x3510e0(0xf4)](),this[_0x3510e0(0xf9)]();}[_0x1c4990(0xf9)](){const _0x233f80=_0x1c4990;this[_0x233f80(0xdc)](this['_threadCommentModel'][_0x233f80(0xc9)][_0x233f80(0xcc)](_0x3ed3f1(0x10))[_0x233f80(0x122)](_0x14df9b=>{const _0x175d5a=_0x233f80,_0x4753e7=new Set();_0x14df9b[_0x175d5a(0x119)](_0x40cd96=>{const _0x298787=_0x175d5a;if(_0x40cd96[_0x298787(0x10a)]===_0x298787(0x11a)){const _0x179b2f=_0x40cd96['payload'][_0x298787(0x113)];_0x4753e7[_0x298787(0x11a)](_0x179b2f);}}),B(this[_0x175d5a(0x12c)],_0x4753e7);}));}[_0x1c4990(0xf4)](){const _0x4c9bf3=_0x1c4990;this[_0x4c9bf3(0xdc)](this[_0x4c9bf3(0xc4)][_0x4c9bf3(0xc9)][_0x4c9bf3(0x122)](async _0x123081=>{const _0x1a1548=_0x4c9bf3;var _0x58c976,_0x5013ef,_0x56f182,_0x433c01;const _0x15b03a=(_0x58c976=this[_0x1a1548(0xd7)][_0x1a1548(0x11b)](_0x123081[_0x1a1548(0xe0)])['find'](_0x12282c=>_0x12282c[_0x1a1548(0xf3)]===_0x123081[_0x1a1548(0xf3)]))==null?void 0x0:_0x58c976[_0x1a1548(0xfc)];if(!_0x15b03a)return;const {unitId:_0x5b2556,subUnitId:_0x47606f}=_0x15b03a;switch(_0x123081[_0x1a1548(0xd5)]&&this[_0x1a1548(0xcd)][_0x1a1548(0xca)](_0x123081['user']),_0x123081[_0x1a1548(0x10a)]){case v[_0x1a1548(0x114)]:break;case v['Reply']:{this[_0x1a1548(0xd7)][_0x1a1548(0x117)](_0x5b2556,_0x47606f,{'unitId':_0x5b2556,'subUnitId':_0x47606f,'ref':'','id':_0x123081[_0x1a1548(0x128)],'dT':y(+_0x123081[_0x1a1548(0x12b)]),'threadId':_0x123081[_0x1a1548(0xf3)],'personId':(_0x56f182=(_0x5013ef=_0x123081[_0x1a1548(0xd5)])==null?void 0x0:_0x5013ef['userID'])!=null?_0x56f182:_0x123081['userId'],'text':JSON[_0x1a1548(0x116)](_0x123081[_0x1a1548(0xdf)]),'parentId':_0x15b03a['id']});break;}case v['Delete']:{const _0x37fef5=this[_0x1a1548(0xd7)][_0x1a1548(0xcb)](_0x5b2556,_0x47606f,_0x123081['replyId']);_0x37fef5&&_0x37fef5[_0x1a1548(0x11e)]&&this[_0x1a1548(0xd7)]['deleteComment'](_0x5b2556,_0x47606f,_0x123081[_0x1a1548(0x128)]);break;}case v[_0x1a1548(0xd3)]:{this[_0x1a1548(0xd7)][_0x1a1548(0x101)](_0x5b2556,_0x47606f,{'commentId':_0x123081[_0x1a1548(0x128)],'text':JSON[_0x1a1548(0x116)](_0x123081[_0x1a1548(0xdf)])});break;}case v[_0x1a1548(0xd8)]:{const _0x5b1f61=(_0x433c01=this['_threadCommentModel'][_0x1a1548(0x11b)](_0x123081[_0x1a1548(0xe0)])['find'](_0x383b3f=>_0x383b3f[_0x1a1548(0xf3)]===_0x123081[_0x1a1548(0xf3)]))==null?void 0x0:_0x433c01[_0x1a1548(0xfc)];_0x5b1f61&&this[_0x1a1548(0xd7)][_0x1a1548(0x120)](_0x5b2556,_0x47606f,_0x5b1f61['id'],_0x123081['solved']===I[_0x1a1548(0x10d)]);break;}}}));}};_=V([p(0x0,_0x108585(_0x278af8)),p(0x1,_0x108585(_0x54e638)),p(0x2,_0x108585(_0x4e911f)),p(0x3,_0x108585(_0x2d7221))],_);const z=_0x1c4990(0xd2),O={};var k=Object[_0x1c4990(0xc6)],Q=(_0x4bb896,_0x3c563d,_0x3dcc2e,_0x3a5e29)=>{for(var _0x223ec3=_0x3a5e29>0x1?void 0x0:_0x3a5e29?k(_0x3c563d,_0x3dcc2e):_0x3c563d,_0x53dec0=_0x4bb896['length']-0x1,_0x56ffab;_0x53dec0>=0x0;_0x53dec0--)(_0x56ffab=_0x4bb896[_0x53dec0])&&(_0x223ec3=_0x56ffab(_0x223ec3)||_0x223ec3);return _0x223ec3;},b=(_0x267a8b,_0x437b0f)=>(_0x81f267,_0x5e3a5f)=>_0x437b0f(_0x81f267,_0x5e3a5f,_0x267a8b);function X(_0x3f0a39,_0x34f7d2){const _0x13a7d7=_0x1c4990,_0x34b8a7=_0x3f0a39[_0x13a7d7(0xf5)][0x0];return{..._0x34f7d2,'id':_0x34b8a7[_0x13a7d7(0x128)],'resolved':_0x3f0a39[_0x13a7d7(0xd9)]===0x1,'dT':y(_0x34b8a7[_0x13a7d7(0x12b)]),'personId':_0x34b8a7[_0x13a7d7(0xe1)],'threadId':_0x34b8a7['threadId']};}function ee(_0x748a8d,_0x2fef79,_0x5407fb){const _0x395350=_0x1c4990;var _0x199550,_0x5b80fe;if(((_0x5b80fe=(_0x199550=_0x748a8d==null?void 0x0:_0x748a8d[_0x395350(0xf5)])==null?void 0x0:_0x199550['length'])!=null?_0x5b80fe:0x0)>0x0){const _0x41758e=(_0x4f7dee,_0x169062)=>({'id':_0x4f7dee[_0x395350(0x128)],'threadId':_0x4f7dee['threadId'],'dT':y(_0x4f7dee['createTimestamp']),'personId':_0x4f7dee[_0x395350(0xe1)],'resolved':_0x748a8d[_0x395350(0xd9)]===I[_0x395350(0x10d)],'unitId':_0x2fef79,'subUnitId':_0x5407fb,'text':JSON[_0x395350(0x116)](_0x4f7dee[_0x395350(0xdf)]),'parentId':_0x169062}),_0x391086=_0x41758e(_0x748a8d[_0x395350(0xf5)][0x0]);return{..._0x391086,'children':_0x748a8d['replies'][_0x395350(0xeb)](0x1)[_0x395350(0x10f)](_0x2eb096=>_0x41758e(_0x2eb096,_0x391086['id']))};}return null;}let S=class{constructor(_0x50ab96,_0x3aaf62,_0x554d8e){const _0x2fea0f=_0x1c4990;this[_0x2fea0f(0xde)]=_0x50ab96,this[_0x2fea0f(0xcd)]=_0x3aaf62,this[_0x2fea0f(0xe5)]=_0x554d8e;}async[_0x1c4990(0x117)](_0x1a7d5f){const _0x749028=_0x1c4990;var _0x52c72b,_0x15a47e;const {parentId:_0x490d09,unitId:_0x396f65,text:_0x3004c3,threadId:_0x513f4c}=_0x1a7d5f,_0x2e4409=(_0x15a47e=(_0x52c72b=_0x3004c3[_0x749028(0xf6)])==null?void 0x0:_0x52c72b[_0x749028(0xda)](_0x165cfc=>_0x165cfc[_0x749028(0x125)]===_0x11ff2a[_0x749028(0xdb)])[_0x749028(0x10f)](_0x186c68=>_0x186c68[_0x749028(0xfe)]))!=null?_0x15a47e:[],_0x2184b9=JSON[_0x749028(0x127)](_0x3004c3),_0x385dd5=(await this[_0x749028(0xe5)][_0x749028(0xe8)](_0x396f65))[_0x749028(0xd0)]();if(_0x490d09){const _0x487cfe={'memberId':_0x385dd5,'unitId':_0x396f65,'content':_0x2184b9,'mention':_0x2e4409,'threadId':_0x513f4c},_0x422576=(await this[_0x749028(0xde)][_0x749028(0xc5)]('/universer-api/comment/unit/'+_0x396f65+_0x749028(0xfd),{'body':_0x487cfe}))[_0x749028(0xf1)][_0x749028(0xe7)];return{..._0x1a7d5f,'id':_0x422576[_0x749028(0x128)],'dT':_0x5b2334(+_0x422576['createTimestamp'])[_0x749028(0x11c)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x422576[_0x749028(0xe1)]};}else{const _0x369960={'memberId':_0x385dd5,'unitId':_0x396f65,'content':_0x2184b9,'mention':_0x2e4409},_0x535b31=await this[_0x749028(0xde)][_0x749028(0xc5)](_0x749028(0x115)+_0x396f65+_0x749028(0x10c),{'body':_0x369960});return X(_0x535b31['body']['comment'],_0x1a7d5f);}}async['updateComment'](_0x369df0){const _0x48629d=_0x1c4990;var _0x23b1d0,_0x36d45c;const {text:_0x404232,unitId:_0x41e7b6}=_0x369df0,_0x29d593=(_0x36d45c=(_0x23b1d0=_0x404232[_0x48629d(0xf6)])==null?void 0x0:_0x23b1d0[_0x48629d(0xda)](_0x1806e6=>_0x1806e6['rangeType']===_0x11ff2a['COMMENT'])[_0x48629d(0x10f)](_0xae005d=>_0xae005d[_0x48629d(0xfe)]))!=null?_0x36d45c:[],_0x171d31=JSON['stringify'](_0x404232),_0x1c7e3a=_0x369df0['threadId'],_0x2b5a73=_0x369df0['id'],_0x3f7d42={'memberId':(await this[_0x48629d(0xe5)]['requireSession'](_0x41e7b6))['getMemberID'](),'unitId':_0x41e7b6,'threadId':_0x1c7e3a,'mention':_0x29d593,'content':_0x171d31,'replyId':_0x2b5a73},_0x4c3a8b=await this[_0x48629d(0xde)]['post']('/universer-api/comment/unit/'+_0x41e7b6+_0x48629d(0x109),{'body':_0x3f7d42});return!_0x4c3a8b['body'][_0x48629d(0x121)]||_0x4c3a8b[_0x48629d(0xf1)][_0x48629d(0x121)][_0x48629d(0xdd)]===0x1;}async['resolveComment'](_0x3e49a5){const _0x8f86e2=_0x1c4990,{unitId:_0x20fc31}=_0x3e49a5,_0x2f95c2=_0x3e49a5['threadId'],_0x2a8a3f={'memberId':this[_0x8f86e2(0xcd)]['getCurrentUser']()[_0x8f86e2(0xf8)],'unitId':_0x20fc31,'threadId':_0x2f95c2,'solved':_0x3e49a5[_0x8f86e2(0xfb)]?I[_0x8f86e2(0x10d)]:I[_0x8f86e2(0xf0)]},_0x2bbce0=await this['_httpService'][_0x8f86e2(0xc5)](_0x8f86e2(0x115)+_0x20fc31+'/solved',{'body':_0x2a8a3f});return!_0x2bbce0[_0x8f86e2(0xf1)]['error']||_0x2bbce0['body'][_0x8f86e2(0x121)][_0x8f86e2(0xdd)]===0x1;}async[_0x1c4990(0xd1)](_0x24fcdd,_0x1288a7,_0x53f267,_0x2f707f){const _0x141d46=_0x1c4990,_0x160c26={'memberId':(await this[_0x141d46(0xe5)][_0x141d46(0xe8)](_0x24fcdd))['getMemberID'](),'threadId':_0x53f267,'replyId':_0x2f707f,'unitId':_0x24fcdd},_0x3b8df8=await this[_0x141d46(0xde)][_0x141d46(0xc5)](_0x141d46(0x115)+_0x24fcdd+_0x141d46(0xe4),{'body':_0x160c26});return!_0x3b8df8['body'][_0x141d46(0x121)]||_0x3b8df8['body']['error'][_0x141d46(0xdd)]===0x1;}async[_0x1c4990(0x10e)](_0x55bc69,_0x53a9ce,_0x330570){const _0x2439f2=_0x1c4990,_0x16ee93={'unitId':_0x55bc69,'threadId':_0x330570},_0x5c7c4d=await this[_0x2439f2(0xde)][_0x2439f2(0xc5)](_0x2439f2(0x115)+_0x55bc69+_0x2439f2(0x107),{'body':_0x16ee93}),_0x2cfb57=_0x330570[_0x2439f2(0x10f)](_0xb9d311=>ee(_0x5c7c4d['body'][_0x2439f2(0xc3)][_0xb9d311],_0x55bc69,_0x53a9ce))[_0x2439f2(0xda)](Boolean);return Object[_0x2439f2(0x129)](_0x5c7c4d[_0x2439f2(0xf1)][_0x2439f2(0xe9)])['forEach'](_0x5c2d1c=>{const _0x17d590=_0x2439f2;this['_userService'][_0x17d590(0xca)](_0x5c2d1c);}),_0x2cfb57;}[_0x1c4990(0x123)](_0x19e459){const _0x218cc9=_0x1c4990;return{'id':_0x19e459['id'],'threadId':_0x19e459[_0x218cc9(0xf3)],'ref':_0x19e459[_0x218cc9(0x126)]};}};S=Q([b(0x0,_0x108585(_0x23a127)),b(0x1,_0x108585(_0x4e911f)),b(0x2,_0x108585(_0x5417b5))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x1b4820,_0x1d946c,_0x470e7d,_0x2b234e)=>{const _0x2932ec=_0x1c4990;for(var _0x2aafea=_0x2b234e>0x1?void 0x0:_0x2b234e?re(_0x1d946c,_0x470e7d):_0x1d946c,_0x5522c6=_0x1b4820[_0x2932ec(0x100)]-0x1,_0x2227b2;_0x5522c6>=0x0;_0x5522c6--)(_0x2227b2=_0x1b4820[_0x5522c6])&&(_0x2aafea=_0x2227b2(_0x2aafea)||_0x2aafea);return _0x2aafea;},M=(_0x3f0353,_0x381eb5)=>(_0xad62ff,_0x2c6546)=>_0x381eb5(_0xad62ff,_0x2c6546,_0x3f0353);let f=class extends _0x2c9fc3{constructor(_0x4d80fa,_0x4e8550){const _0x507e42=_0x1c4990;super(),this[_0x507e42(0xce)]=_0x4d80fa,this[_0x507e42(0x11f)]=_0x4e8550,this['_initDataSource']();}[_0x1c4990(0xcf)](){const _0x273b0e=_0x1c4990;this[_0x273b0e(0xce)][_0x273b0e(0x108)]=this[_0x273b0e(0x11f)],this[_0x273b0e(0xce)][_0x273b0e(0xea)]=!0x1;}};f=te([M(0x0,_0x7340a4),M(0x1,_0x108585(S))],f);var se=Object[_0x1c4990(0x105)],oe=Object[_0x1c4990(0xc6)],ne=(_0x2e56ff,_0x1a590,_0x2984f2)=>_0x1a590 in _0x2e56ff?se(_0x2e56ff,_0x1a590,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2984f2}):_0x2e56ff[_0x1a590]=_0x2984f2,ie=(_0x8bb360,_0x469d97,_0x529a7e,_0x6b3b8)=>{const _0x1e3213=_0x1c4990;for(var _0x4bae41=_0x6b3b8>0x1?void 0x0:_0x6b3b8?oe(_0x469d97,_0x529a7e):_0x469d97,_0x87d4aa=_0x8bb360[_0x1e3213(0x100)]-0x1,_0x297edd;_0x87d4aa>=0x0;_0x87d4aa--)(_0x297edd=_0x8bb360[_0x87d4aa])&&(_0x4bae41=_0x297edd(_0x4bae41)||_0x4bae41);return _0x4bae41;},N=(_0x5071fe,_0xf3b938)=>(_0x41a703,_0x4bbe2e)=>_0xf3b938(_0x41a703,_0x4bbe2e,_0x5071fe),$=(_0x134d42,_0x2ee20b,_0x11136e)=>ne(_0x134d42,typeof _0x2ee20b!=_0x1c4990(0x104)?_0x2ee20b+'':_0x2ee20b,_0x11136e);let g=class extends _0x21d69d{constructor(_0x416df8=O,_0x2e5463,_0xe1cafb){const _0x57e98c=_0x1c4990;super(),this[_0x57e98c(0xe6)]=_0x416df8,this[_0x57e98c(0x12c)]=_0x2e5463,this[_0x57e98c(0x12a)]=_0xe1cafb;const {..._0x39e32f}=_0x49cd4d({},O,this[_0x57e98c(0xe6)]);this[_0x57e98c(0x12a)][_0x57e98c(0xc7)](z,_0x39e32f);}[_0x1c4990(0xd4)](){[[S],[f],[_]]['forEach'](_0x42786a=>{const _0x108275=_0x37a2;this[_0x108275(0x12c)][_0x108275(0x11a)](_0x42786a);});}[_0x1c4990(0x124)](){const _0x440764=_0x1c4990;this[_0x440764(0x12c)][_0x440764(0x112)](f),this['_injector'][_0x440764(0x112)](_);}};$(g,_0x1c4990(0xfa),W),$(g,_0x1c4990(0x10a),_0x22c964[_0x1c4990(0x103)]),g=ie([_0x4a4332(_0x33ba46,_0x4fb59d,_0x2c8ed9),N(0x1,_0x108585(_0x2d7221)),N(0x2,_0x440bd9)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x4624d6=_0x327f;(function(_0x4f75d0,_0x3605ba){const _0x311a16=_0x327f,_0x32701d=_0x4f75d0();while(!![]){try{const _0xc22f70=-parseInt(_0x311a16(0x134))/0x1+parseInt(_0x311a16(0x13f))/0x2+-parseInt(_0x311a16(0x12f))/0x3*(parseInt(_0x311a16(0x13d))/0x4)+-parseInt(_0x311a16(0x135))/0x5+parseInt(_0x311a16(0x10f))/0x6*(parseInt(_0x311a16(0x137))/0x7)+-parseInt(_0x311a16(0x10d))/0x8*(parseInt(_0x311a16(0x142))/0x9)+parseInt(_0x311a16(0xfd))/0xa;if(_0xc22f70===_0x3605ba)break;else _0x32701d['push'](_0x32701d['shift']());}catch(_0x625eb0){_0x32701d['push'](_0x32701d['shift']());}}}(_0x1090,0x89d1a));import{CommentService as _0x14a410,CollaborationSessionService as _0x323b7b,UniverCollaborationClientPlugin as _0x52714a}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2c6850}from'@univerjs-pro/license';import{dayjs as _0x20ed6c,UserManagerService as _0x4e7639,Inject as _0x23c8d6,Injector as _0x70bfa4,Disposable as _0x39d6c0,CustomRangeType as _0x3145e6,DependentOn as _0x177cae,Plugin as _0x56afab,merge as _0x120c6f,IConfigService as _0x4476e2}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x51a7d2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x37709e,IThreadCommentDataSourceService as _0x40023a}from'@univerjs/thread-comment';import{bufferTime as _0x337727}from'rxjs';import{HTTPService as _0x3afe4b}from'@univerjs/network';const k=_0x4624d6(0x126),B=_0x4624d6(0x146),j={'name':k,'version':B},W=_0x4624d6(0x130);var p=(_0x2f6fb7=>(_0x2f6fb7[_0x2f6fb7[_0x4624d6(0x103)]=0x0]=_0x4624d6(0x103),_0x2f6fb7[_0x2f6fb7[_0x4624d6(0x116)]=0x1]=_0x4624d6(0x116),_0x2f6fb7[_0x2f6fb7[_0x4624d6(0x10c)]=-0x1]=_0x4624d6(0x10c),_0x2f6fb7))(p||{}),v=(_0x58542b=>(_0x58542b[_0x58542b[_0x4624d6(0x155)]=0x0]=_0x4624d6(0x155),_0x58542b[_0x58542b[_0x4624d6(0x12c)]=0x1]=_0x4624d6(0x12c),_0x58542b[_0x58542b['Reply']=0x2]=_0x4624d6(0x13a),_0x58542b[_0x58542b[_0x4624d6(0x129)]=0x3]=_0x4624d6(0x129),_0x58542b[_0x58542b[_0x4624d6(0x131)]=0x4]=_0x4624d6(0x131),_0x58542b[_0x58542b[_0x4624d6(0xfe)]=0x5]=_0x4624d6(0xfe),_0x58542b[_0x58542b[_0x4624d6(0x10c)]=-0x1]=_0x4624d6(0x10c),_0x58542b))(v||{});const D=_0x4f68bf=>_0x20ed6c(new Date(+_0x4f68bf))[_0x4624d6(0x153)](_0x4624d6(0x14e)),z=async(_0x262a83,_0x5b9e75)=>{const _0x22b3e2=_0x4624d6,_0x53a05a=_0x262a83['get'](_0x4e7639),_0x48076c=_0x262a83[_0x22b3e2(0x101)](_0x3afe4b);_0x5b9e75[_0x22b3e2(0xfb)](_0x4753dc=>{const _0x1bd5d0=_0x22b3e2;_0x53a05a[_0x1bd5d0(0x141)](_0x4753dc)&&_0x5b9e75['delete'](_0x4753dc);}),_0x5b9e75[_0x22b3e2(0x11d)]&&(await _0x48076c['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x5b9e75]}}))[_0x22b3e2(0x14c)]['users']['forEach'](_0x19f7f6=>{const _0x592a6e=_0x22b3e2;_0x19f7f6&&_0x53a05a[_0x592a6e(0x123)](_0x19f7f6);});};var K=Object[_0x4624d6(0x110)],V=(_0x163464,_0x129d44,_0x4285ed,_0x19b041)=>{for(var _0x258969=_0x19b041>0x1?void 0x0:_0x19b041?K(_0x129d44,_0x4285ed):_0x129d44,_0x386256=_0x163464['length']-0x1,_0x775b73;_0x386256>=0x0;_0x386256--)(_0x775b73=_0x163464[_0x386256])&&(_0x258969=_0x775b73(_0x258969)||_0x258969);return _0x258969;},_=(_0x3a63d3,_0x3a0aa2)=>(_0x95611f,_0x505a8e)=>_0x3a0aa2(_0x95611f,_0x505a8e,_0x3a63d3);let S=class extends _0x39d6c0{constructor(_0xa2b313,_0xf632f7,_0xd67fcd,_0x4c284a){const _0x5528f7=_0x4624d6;super(),this['_commentService']=_0xa2b313,this[_0x5528f7(0x145)]=_0xf632f7,this['_userService']=_0xd67fcd,this[_0x5528f7(0x13e)]=_0x4c284a,this[_0x5528f7(0x122)](),this[_0x5528f7(0x10e)]();}[_0x4624d6(0x10e)](){const _0x5bfb85=_0x4624d6;this[_0x5bfb85(0x14b)](this['_threadCommentModel'][_0x5bfb85(0x115)][_0x5bfb85(0x12d)](_0x337727(0x10))[_0x5bfb85(0x15f)](_0x5a3415=>{const _0x14cf53=_0x5bfb85,_0x321da2=new Set();_0x5a3415['forEach'](_0x4309d3=>{const _0x45dcd6=_0x327f;if(_0x4309d3[_0x45dcd6(0x14f)]===_0x45dcd6(0x109)){const _0x37691=_0x4309d3[_0x45dcd6(0x15c)][_0x45dcd6(0x163)];_0x321da2[_0x45dcd6(0x109)](_0x37691);}}),z(this[_0x14cf53(0x13e)],_0x321da2);}));}[_0x4624d6(0x122)](){const _0x9c7cfb=_0x4624d6;this[_0x9c7cfb(0x14b)](this[_0x9c7cfb(0x108)][_0x9c7cfb(0x115)]['subscribe'](async _0x179b15=>{const _0x58ccdd=_0x9c7cfb;var _0x4be680,_0x38a35a,_0x43e186,_0x5e81c7;const _0x49ee5e=(_0x4be680=this['_threadCommentModel'][_0x58ccdd(0x152)](_0x179b15[_0x58ccdd(0xff)])['find'](_0x158dd2=>_0x158dd2[_0x58ccdd(0xfc)]===_0x179b15[_0x58ccdd(0xfc)]))==null?void 0x0:_0x4be680['root'];if(!_0x49ee5e)return;const {unitId:_0x45ccce,subUnitId:_0x53a969}=_0x49ee5e;switch(_0x179b15['user']&&this[_0x58ccdd(0x118)][_0x58ccdd(0x123)](_0x179b15['user']),_0x179b15['type']){case v[_0x58ccdd(0x12c)]:break;case v[_0x58ccdd(0x13a)]:{this[_0x58ccdd(0x145)]['addComment'](_0x45ccce,_0x53a969,{'unitId':_0x45ccce,'subUnitId':_0x53a969,'ref':'','id':_0x179b15['replyId'],'dT':D(+_0x179b15[_0x58ccdd(0x158)]),'threadId':_0x179b15[_0x58ccdd(0xfc)],'personId':(_0x43e186=(_0x38a35a=_0x179b15['user'])==null?void 0x0:_0x38a35a[_0x58ccdd(0x127)])!=null?_0x43e186:_0x179b15[_0x58ccdd(0x104)],'text':JSON[_0x58ccdd(0x10a)](_0x179b15[_0x58ccdd(0x133)]),'parentId':_0x49ee5e['id']});break;}case v[_0x58ccdd(0x131)]:{const _0x307e29=this[_0x58ccdd(0x145)][_0x58ccdd(0x14d)](_0x45ccce,_0x53a969,_0x179b15[_0x58ccdd(0x148)]);_0x307e29&&_0x307e29['parentId']&&this['_threadCommentModel']['deleteComment'](_0x45ccce,_0x53a969,_0x179b15[_0x58ccdd(0x148)]);break;}case v['Edit']:{this[_0x58ccdd(0x145)][_0x58ccdd(0x11b)](_0x45ccce,_0x53a969,{'commentId':_0x179b15[_0x58ccdd(0x148)],'text':JSON[_0x58ccdd(0x10a)](_0x179b15[_0x58ccdd(0x133)])});break;}case v[_0x58ccdd(0xfe)]:{const _0x416100=(_0x5e81c7=this[_0x58ccdd(0x145)][_0x58ccdd(0x152)](_0x179b15[_0x58ccdd(0xff)])[_0x58ccdd(0x15e)](_0x366079=>_0x366079['threadId']===_0x179b15[_0x58ccdd(0xfc)]))==null?void 0x0:_0x5e81c7[_0x58ccdd(0x111)];_0x416100&&this[_0x58ccdd(0x145)]['resolveComment'](_0x45ccce,_0x53a969,_0x416100['id'],_0x179b15[_0x58ccdd(0x105)]===p[_0x58ccdd(0x116)]);break;}}}));}};S=V([_(0x0,_0x23c8d6(_0x14a410)),_(0x1,_0x23c8d6(_0x37709e)),_(0x2,_0x23c8d6(_0x4e7639)),_(0x3,_0x23c8d6(_0x70bfa4))],S);const Q='thread-comment-data-source.config',M={};var X=Object[_0x4624d6(0x110)],ee=(_0x15654e,_0x32dffd,_0x5e8b5c,_0x2e472c)=>{const _0x25a18f=_0x4624d6;for(var _0x273905=_0x2e472c>0x1?void 0x0:_0x2e472c?X(_0x32dffd,_0x5e8b5c):_0x32dffd,_0xec1ccd=_0x15654e[_0x25a18f(0x124)]-0x1,_0x4956e3;_0xec1ccd>=0x0;_0xec1ccd--)(_0x4956e3=_0x15654e[_0xec1ccd])&&(_0x273905=_0x4956e3(_0x273905)||_0x273905);return _0x273905;},b=(_0x8dabcd,_0x21a860)=>(_0x10f7b3,_0xb0829d)=>_0x21a860(_0x10f7b3,_0xb0829d,_0x8dabcd);function re(_0xaae18f,_0x253f23){const _0xd316a=_0x4624d6,_0x4362fc=_0xaae18f[_0xd316a(0x140)][0x0];return{..._0x253f23,'id':_0x4362fc['replyId'],'resolved':_0xaae18f[_0xd316a(0x105)]===0x1,'dT':D(_0x4362fc[_0xd316a(0x158)]),'personId':_0x4362fc[_0xd316a(0x104)],'threadId':_0x4362fc[_0xd316a(0xfc)]};}function te(_0x5abc60,_0x758804,_0x2bb882){const _0x23dcc3=_0x4624d6;var _0x536da7,_0x301b7e;if(((_0x301b7e=(_0x536da7=_0x5abc60==null?void 0x0:_0x5abc60[_0x23dcc3(0x140)])==null?void 0x0:_0x536da7[_0x23dcc3(0x124)])!=null?_0x301b7e:0x0)>0x0){const _0xeca4d3=(_0x240620,_0x19c813)=>({'id':_0x240620[_0x23dcc3(0x148)],'threadId':_0x240620[_0x23dcc3(0xfc)],'dT':D(_0x240620[_0x23dcc3(0x158)]),'personId':_0x240620['userId'],'resolved':_0x5abc60[_0x23dcc3(0x105)]===p['Solved'],'unitId':_0x758804,'subUnitId':_0x2bb882,'text':JSON[_0x23dcc3(0x10a)](_0x240620['content']),'parentId':_0x19c813}),_0x1f0be0=_0xeca4d3(_0x5abc60[_0x23dcc3(0x140)][0x0]);return{..._0x1f0be0,'children':_0x5abc60[_0x23dcc3(0x140)][_0x23dcc3(0x15a)](0x1)[_0x23dcc3(0x107)](_0xe22820=>_0xeca4d3(_0xe22820,_0x1f0be0['id']))};}return null;}function _0x327f(_0x179020,_0x475438){_0x179020=_0x179020-0xfb;const _0x10900b=_0x1090();let _0x327f5a=_0x10900b[_0x179020];return _0x327f5a;}let f=class{constructor(_0x2ddcc7,_0x509e31,_0x343390){const _0x527bd4=_0x4624d6;this[_0x527bd4(0x12a)]=_0x2ddcc7,this[_0x527bd4(0x118)]=_0x509e31,this['_sessionService']=_0x343390;}async[_0x4624d6(0x14a)](_0x298451){const _0xf63c0e=_0x4624d6;var _0x5b3f92,_0x59cff4;const {parentId:_0x1b4507,unitId:_0x46c8ff,text:_0xe9edbf,threadId:_0x41d923}=_0x298451,_0x1cf13f=(_0x59cff4=(_0x5b3f92=_0xe9edbf[_0xf63c0e(0x106)])==null?void 0x0:_0x5b3f92[_0xf63c0e(0x160)](_0x3575b6=>_0x3575b6[_0xf63c0e(0x156)]===_0x3145e6[_0xf63c0e(0x139)])[_0xf63c0e(0x107)](_0x492d75=>_0x492d75[_0xf63c0e(0x117)]))!=null?_0x59cff4:[],_0x5c7951=JSON[_0xf63c0e(0x11e)](_0xe9edbf),_0x40f0ad=(await this[_0xf63c0e(0x11c)][_0xf63c0e(0x119)](_0x46c8ff))[_0xf63c0e(0x15b)]();if(_0x1b4507){const _0x3284ec={'memberId':_0x40f0ad,'unitId':_0x46c8ff,'content':_0x5c7951,'mention':_0x1cf13f,'threadId':_0x41d923},_0x59c797=(await this[_0xf63c0e(0x12a)][_0xf63c0e(0x10b)](_0xf63c0e(0x162)+_0x46c8ff+_0xf63c0e(0x114),{'body':_0x3284ec}))[_0xf63c0e(0x14c)]['reply'];return{..._0x298451,'id':_0x59c797[_0xf63c0e(0x148)],'dT':_0x20ed6c(+_0x59c797[_0xf63c0e(0x158)])['format'](_0xf63c0e(0x14e)),'personId':_0x59c797[_0xf63c0e(0x104)]};}else{const _0x36ca74={'memberId':_0x40f0ad,'unitId':_0x46c8ff,'content':_0x5c7951,'mention':_0x1cf13f},_0x21b5e8=await this[_0xf63c0e(0x12a)]['post'](_0xf63c0e(0x162)+_0x46c8ff+_0xf63c0e(0x15d),{'body':_0x36ca74});return re(_0x21b5e8[_0xf63c0e(0x14c)]['comment'],_0x298451);}}async[_0x4624d6(0x11b)](_0x261f4e){const _0x131f75=_0x4624d6;var _0x5ddd21,_0x3a16c3;const {text:_0x577fe5,unitId:_0x33534b}=_0x261f4e,_0x140ce6=(_0x3a16c3=(_0x5ddd21=_0x577fe5[_0x131f75(0x106)])==null?void 0x0:_0x5ddd21['filter'](_0x551dc9=>_0x551dc9['rangeType']===_0x3145e6[_0x131f75(0x139)])[_0x131f75(0x107)](_0x2d6d59=>_0x2d6d59[_0x131f75(0x117)]))!=null?_0x3a16c3:[],_0x569191=JSON[_0x131f75(0x11e)](_0x577fe5),_0x500c37=_0x261f4e[_0x131f75(0xfc)],_0x31b135=_0x261f4e['id'],_0x4dfb66={'memberId':(await this['_sessionService'][_0x131f75(0x119)](_0x33534b))[_0x131f75(0x15b)](),'unitId':_0x33534b,'threadId':_0x500c37,'mention':_0x140ce6,'content':_0x569191,'replyId':_0x31b135},_0x463231=await this[_0x131f75(0x12a)][_0x131f75(0x10b)](_0x131f75(0x162)+_0x33534b+_0x131f75(0x11f),{'body':_0x4dfb66});return!_0x463231[_0x131f75(0x14c)]['error']||_0x463231[_0x131f75(0x14c)][_0x131f75(0x12e)][_0x131f75(0x121)]===0x1;}async[_0x4624d6(0x128)](_0x299ae6){const _0x13c84b=_0x4624d6,{unitId:_0x32997e}=_0x299ae6,_0x19e56c=_0x299ae6[_0x13c84b(0xfc)],_0x5f0eaf={'memberId':this[_0x13c84b(0x118)][_0x13c84b(0x125)]()[_0x13c84b(0x127)],'unitId':_0x32997e,'threadId':_0x19e56c,'solved':_0x299ae6['resolved']?p[_0x13c84b(0x116)]:p[_0x13c84b(0x103)]},_0x22ca12=await this[_0x13c84b(0x12a)][_0x13c84b(0x10b)](_0x13c84b(0x162)+_0x32997e+_0x13c84b(0x157),{'body':_0x5f0eaf});return!_0x22ca12[_0x13c84b(0x14c)][_0x13c84b(0x12e)]||_0x22ca12[_0x13c84b(0x14c)]['error'][_0x13c84b(0x121)]===0x1;}async[_0x4624d6(0x132)](_0x221379,_0x147e1f,_0x176aa8,_0x135285){const _0x48aa90=_0x4624d6,_0x1068de={'memberId':(await this[_0x48aa90(0x11c)][_0x48aa90(0x119)](_0x221379))[_0x48aa90(0x15b)](),'threadId':_0x176aa8,'replyId':_0x135285,'unitId':_0x221379},_0x5e8d61=await this[_0x48aa90(0x12a)][_0x48aa90(0x10b)]('/universer-api/comment/unit/'+_0x221379+_0x48aa90(0x147),{'body':_0x1068de});return!_0x5e8d61['body'][_0x48aa90(0x12e)]||_0x5e8d61[_0x48aa90(0x14c)][_0x48aa90(0x12e)][_0x48aa90(0x121)]===0x1;}async[_0x4624d6(0x159)](_0x346370,_0x16abc8,_0x123daa){const _0xf0d76a=_0x4624d6,_0x3a1ad8={'unitId':_0x346370,'threadId':_0x123daa},_0xe4cb48=await this[_0xf0d76a(0x12a)][_0xf0d76a(0x10b)](_0xf0d76a(0x162)+_0x346370+_0xf0d76a(0x138),{'body':_0x3a1ad8}),_0x598f7e=_0x123daa[_0xf0d76a(0x107)](_0x1480db=>te(_0xe4cb48[_0xf0d76a(0x14c)][_0xf0d76a(0x161)][_0x1480db],_0x346370,_0x16abc8))[_0xf0d76a(0x160)](Boolean);return Object[_0xf0d76a(0x100)](_0xe4cb48[_0xf0d76a(0x14c)][_0xf0d76a(0x150)])['forEach'](_0x3bbb87=>{const _0x1fd458=_0xf0d76a;this[_0x1fd458(0x118)][_0x1fd458(0x123)](_0x3bbb87);}),_0x598f7e;}['saveCommentToSnapshot'](_0x2931d6){const _0x3887a0=_0x4624d6;return{'id':_0x2931d6['id'],'threadId':_0x2931d6[_0x3887a0(0xfc)],'ref':_0x2931d6[_0x3887a0(0x149)]};}};f=ee([b(0x0,_0x23c8d6(_0x3afe4b)),b(0x1,_0x23c8d6(_0x4e7639)),b(0x2,_0x23c8d6(_0x323b7b))],f);var se=Object[_0x4624d6(0x110)],oe=(_0x5d408f,_0x19761e,_0x350d4b,_0x452936)=>{const _0x397dff=_0x4624d6;for(var _0xd5d1b0=_0x452936>0x1?void 0x0:_0x452936?se(_0x19761e,_0x350d4b):_0x19761e,_0x52f679=_0x5d408f[_0x397dff(0x124)]-0x1,_0x13845e;_0x52f679>=0x0;_0x52f679--)(_0x13845e=_0x5d408f[_0x52f679])&&(_0xd5d1b0=_0x13845e(_0xd5d1b0)||_0xd5d1b0);return _0xd5d1b0;},N=(_0x1a4e35,_0x4094bf)=>(_0x5aa3f4,_0x292906)=>_0x4094bf(_0x5aa3f4,_0x292906,_0x1a4e35);let g=class extends _0x39d6c0{constructor(_0x20466f,_0x207b84){const _0xa36dda=_0x4624d6;super(),this[_0xa36dda(0x11a)]=_0x20466f,this[_0xa36dda(0x112)]=_0x207b84,this[_0xa36dda(0x12b)]();}[_0x4624d6(0x12b)](){const _0x12691f=_0x4624d6;this[_0x12691f(0x11a)][_0x12691f(0x143)]=this[_0x12691f(0x112)],this[_0x12691f(0x11a)][_0x12691f(0x144)]=!0x1;}};g=oe([N(0x0,_0x40023a),N(0x1,_0x23c8d6(f))],g);var ne=Object[_0x4624d6(0x136)],ie=Object['getOwnPropertyDescriptor'],ae=(_0x418c,_0x1f1c73,_0x594935)=>_0x1f1c73 in _0x418c?ne(_0x418c,_0x1f1c73,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x594935}):_0x418c[_0x1f1c73]=_0x594935,ce=(_0x5d4e7e,_0x571f46,_0x4501a2,_0x535ec6)=>{const _0x1b6b2f=_0x4624d6;for(var _0x170b74=_0x535ec6>0x1?void 0x0:_0x535ec6?ie(_0x571f46,_0x4501a2):_0x571f46,_0x380f6b=_0x5d4e7e[_0x1b6b2f(0x124)]-0x1,_0x2e4b56;_0x380f6b>=0x0;_0x380f6b--)(_0x2e4b56=_0x5d4e7e[_0x380f6b])&&(_0x170b74=_0x2e4b56(_0x170b74)||_0x170b74);return _0x170b74;},w=(_0xc340c1,_0x547b22)=>(_0x21e19e,_0x2d021c)=>_0x547b22(_0x21e19e,_0x2d021c,_0xc340c1),y=(_0xbbab08,_0x55960f,_0x476d1e)=>ae(_0xbbab08,typeof _0x55960f!=_0x4624d6(0x151)?_0x55960f+'':_0x55960f,_0x476d1e);let I=class extends _0x56afab{constructor(_0x146463=M,_0xa8ffda,_0x39dae9){const _0x2bf8ab=_0x4624d6;super(),this[_0x2bf8ab(0x13c)]=_0x146463,this[_0x2bf8ab(0x13e)]=_0xa8ffda,this[_0x2bf8ab(0x154)]=_0x39dae9;const {..._0x374803}=_0x120c6f({},M,this[_0x2bf8ab(0x13c)]);this[_0x2bf8ab(0x154)][_0x2bf8ab(0x120)](Q,_0x374803);}['onStarting'](){const _0x3eea1d=_0x4624d6;[[f],[g],[S]][_0x3eea1d(0xfb)](_0x5178a7=>{const _0x34c826=_0x3eea1d;this[_0x34c826(0x13e)]['add'](_0x5178a7);});}[_0x4624d6(0x102)](){const _0x309d3d=_0x4624d6;this[_0x309d3d(0x13e)][_0x309d3d(0x101)](g),this[_0x309d3d(0x13e)][_0x309d3d(0x101)](S);}};y(I,'pluginName',W),y(I,'packageName',j[_0x4624d6(0x113)]),y(I,_0x4624d6(0x13b),j[_0x4624d6(0x13b)]),I=ce([_0x177cae(_0x51a7d2,_0x52714a,_0x2c6850),w(0x1,_0x23c8d6(_0x70bfa4)),w(0x2,_0x4476e2)],I);function _0x1090(){const _0x394dcd=['4242feYzEM','getOwnPropertyDescriptor','root','_threadCommentDataSource','name','/reply','commentUpdate$','Solved','rangeId','_userService','requireSession','_threadCommentDataSourceService','updateComment','_sessionService','size','stringify','/edit','setConfig','code','_init','addUser','length','getCurrentUser','@univerjs-pro/thread-comment-datasource','userID','resolveComment','Edit','_httpService','_initDataSource','Add','pipe','error','50178dhTHeZ','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Delete','deleteComment','content','358920NyKaFA','4423935wUHKLB','defineProperty','8981GdQLWs','/list','COMMENT','Reply','version','_config','148fWGJXm','_injector','1597598krKeaP','replies','getUser','18uMgoDw','dataSource','syncUpdateMutationToColla','_threadCommentModel','0.17.0','/delete','replyId','ref','addComment','disposeWithMe','body','getComment','YYYY/MM/DD\x20HH:mm','type','users','symbol','getUnit','format','_configService','Unknown','rangeType','/solved','createTimestamp','listComments','slice','getMemberID','payload','/add','find','subscribe','filter','comments','/universer-api/comment/unit/','personId','forEach','threadId','10829590lXzVcB','Solve','unitId','values','get','onReady','OpenOrReOpen','userId','solved','customRanges','map','_commentService','add','parse','post','UNRECOGNIZED','1447056SvIDkI','_initUserSync'];_0x1090=function(){return _0x394dcd;};return _0x1090();}export{I as UniverThreadCommentDataSourcePlugin};
@@ -1,11 +1,12 @@
1
1
  import { IUniverThreadCommentDataSourceConfig } from './controllers/config.schema';
2
- import { IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
2
+ import { IConfigService, Injector, Plugin } from '@univerjs/core';
3
3
  export declare class UniverThreadCommentDataSourcePlugin extends Plugin {
4
4
  private readonly _config;
5
5
  protected _injector: Injector;
6
6
  private readonly _configService;
7
7
  static pluginName: string;
8
- static type: UniverInstanceType;
8
+ static packageName: string;
9
+ static version: string;
9
10
  constructor(_config: IUniverThreadCommentDataSourceConfig | undefined, _injector: Injector, _configService: IConfigService);
10
11
  onStarting(): void;
11
12
  onReady(): void;
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x3d2c(_0x3d0f84,_0x27be1f){_0x3d0f84=_0x3d0f84-0x19a;const _0x2316dd=_0x2316();let _0x3d2c86=_0x2316dd[_0x3d0f84];return _0x3d2c86;}function _0x2316(){const _0x4ff98a=['threadId','subscribe','onReady','dayjs','CollaborationSessionService','updateComment','_commentService','get','Edit','UNIVER_UNKNOWN','userID','3254FxHqbB','rxjs','add','2490264TROSQZ','HTTPService','error','UniverProThreadCommentDatasource','code','toStringTag','CustomRangeType','OpenOrReOpen','171UNGvZg','UniverThreadCommentUi','UniverThreadComment','2037304ZSwkOj','rangeType','Add','dataSource','UniverProLicense','body','Module','function','getOwnPropertyDescriptor','145585GUUQTb','getUser','user','filter','@univerjs/core','/solved','forEach','unitId','stringify','_userService','7SLfrGz','replyId','Disposable','CommentService','resolveComment','@univerjs/thread-comment','UserManagerService','_sessionService','comment','/universer-api/user/list','slice','parse','post','4312496QcWiDy','delete','_threadCommentModel','addUser','content','UNRECOGNIZED','_threadCommentDataSourceService','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','UniverThreadCommentUIPlugin','UniverThreadCommentDataSourcePlugin','onStarting','/list','userId','UniverLicensePlugin','commentUpdate$','@univerjs/network','/reply','listComments','_injector','_httpService','IConfigService','root','@univerjs/thread-comment-ui','syncUpdateMutationToColla','merge','_initUserSync','439640BHafQB','YYYY/MM/DD\x20HH:mm','type','payload','parentId','getUnit','format','/delete','Unknown','UniverCore','disposeWithMe','ThreadCommentModel','UniverInstanceType','_config','customRanges','createTimestamp','@univerjs-pro/license','/add','Injector','getMemberID','264gSYEdM','amd','deleteComment','reply','pipe','UniverNetwork','symbol','UniverProCollaborationClient','ref','defineProperty','_init','Reply','Solved','Solve','Delete','users','bufferTime','Plugin','replies','map','_initDataSource','addComment','@univerjs-pro/collaboration-client','/edit','rangeId','/universer-api/comment/unit/','_threadCommentDataSource','setConfig','26079deuoLV','length','comments','Inject','resolved'];_0x2316=function(){return _0x4ff98a;};return _0x2316();}(function(_0x479fa5,_0x28c803){const _0x2dd055=_0x3d2c,_0x597863=_0x479fa5();while(!![]){try{const _0xb85466=-parseInt(_0x2dd055(0x1bd))/0x1*(-parseInt(_0x2dd055(0x1b2))/0x2)+parseInt(_0x2dd055(0x1a2))/0x3+parseInt(_0x2dd055(0x1e0))/0x4+parseInt(_0x2dd055(0x1c9))/0x5*(-parseInt(_0x2dd055(0x210))/0x6)+parseInt(_0x2dd055(0x1d3))/0x7*(parseInt(_0x2dd055(0x1c0))/0x8)+parseInt(_0x2dd055(0x1b5))/0x9+parseInt(_0x2dd055(0x1fc))/0xa;if(_0xb85466===_0x28c803)break;else _0x597863['push'](_0x597863['shift']());}catch(_0x5e72ad){_0x597863['push'](_0x597863['shift']());}}}(_0x2316,0xa0f09),function(_0x4c1147,_0x4a716f){const _0x80ca34=_0x3d2c;typeof exports=='object'&&typeof module<'u'?_0x4a716f(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x80ca34(0x1c7)&&define[_0x80ca34(0x211)]?define(['exports',_0x80ca34(0x19c),_0x80ca34(0x20c),_0x80ca34(0x1cd),_0x80ca34(0x1f8),_0x80ca34(0x1d8),'rxjs',_0x80ca34(0x1f1)],_0x4a716f):(_0x4c1147=typeof globalThis<'u'?globalThis:_0x4c1147||self,_0x4a716f(_0x4c1147[_0x80ca34(0x1b8)]={},_0x4c1147[_0x80ca34(0x217)],_0x4c1147[_0x80ca34(0x1c4)],_0x4c1147[_0x80ca34(0x205)],_0x4c1147[_0x80ca34(0x1be)],_0x4c1147[_0x80ca34(0x1bf)],_0x4c1147[_0x80ca34(0x1b3)],_0x4c1147[_0x80ca34(0x215)]));}(this,function(_0x385d40,_0x369bd8,_0x47e426,_0xa66518,_0x1b42b9,_0x4a626a,_0x10c18f,_0x4c6741){'use strict';const _0x12bde9=_0x3d2c;const _0x381fe7=_0x12bde9(0x1e8);var _0x5f4b83=(_0x3bbd7c=>(_0x3bbd7c[_0x3bbd7c[_0x12bde9(0x1bc)]=0x0]=_0x12bde9(0x1bc),_0x3bbd7c[_0x3bbd7c[_0x12bde9(0x21c)]=0x1]=_0x12bde9(0x21c),_0x3bbd7c[_0x3bbd7c[_0x12bde9(0x1e5)]=-0x1]='UNRECOGNIZED',_0x3bbd7c))(_0x5f4b83||{}),_0x387e95=(_0x28a4a1=>(_0x28a4a1[_0x28a4a1[_0x12bde9(0x204)]=0x0]=_0x12bde9(0x204),_0x28a4a1[_0x28a4a1['Add']=0x1]=_0x12bde9(0x1c2),_0x28a4a1[_0x28a4a1[_0x12bde9(0x21b)]=0x2]=_0x12bde9(0x21b),_0x28a4a1[_0x28a4a1['Edit']=0x3]='Edit',_0x28a4a1[_0x28a4a1[_0x12bde9(0x21e)]=0x4]=_0x12bde9(0x21e),_0x28a4a1[_0x28a4a1['Solve']=0x5]='Solve',_0x28a4a1[_0x28a4a1[_0x12bde9(0x1e5)]=-0x1]=_0x12bde9(0x1e5),_0x28a4a1))(_0x387e95||{});const _0x43f364=_0x3aa1ca=>_0xa66518[_0x12bde9(0x1aa)](new Date(+_0x3aa1ca))['format'](_0x12bde9(0x1fd)),_0x368d8c=async(_0x26d658,_0x31e6a8)=>{const _0x1677a9=_0x12bde9,_0x1f629a=_0x26d658[_0x1677a9(0x1ae)](_0xa66518[_0x1677a9(0x1d9)]),_0x979477=_0x26d658[_0x1677a9(0x1ae)](_0x4c6741[_0x1677a9(0x1b6)]);_0x31e6a8[_0x1677a9(0x1cf)](_0x16f3bf=>{const _0x518c43=_0x1677a9;_0x1f629a[_0x518c43(0x1ca)](_0x16f3bf)&&_0x31e6a8[_0x518c43(0x1e1)](_0x16f3bf);}),_0x31e6a8['size']&&(await _0x979477[_0x1677a9(0x1ae)](_0x1677a9(0x1dc),{'params':{'userIDs':[..._0x31e6a8]}}))[_0x1677a9(0x1c5)]['users']['forEach'](_0x8d6400=>{const _0x4dc5e6=_0x1677a9;_0x8d6400&&_0x1f629a[_0x4dc5e6(0x1e3)](_0x8d6400);});};var _0x2ca868=Object['getOwnPropertyDescriptor'],_0x4c136a=(_0x6b60cd,_0x505064,_0x42d0b5,_0x357ce3)=>{for(var _0x194cca=_0x357ce3>0x1?void 0x0:_0x357ce3?_0x2ca868(_0x505064,_0x42d0b5):_0x505064,_0x30b2e4=_0x6b60cd['length']-0x1,_0x30b196;_0x30b2e4>=0x0;_0x30b2e4--)(_0x30b196=_0x6b60cd[_0x30b2e4])&&(_0x194cca=_0x30b196(_0x194cca)||_0x194cca);return _0x194cca;},_0x59dab2=(_0x4997bc,_0x61feea)=>(_0x1d8267,_0x20ba7e)=>_0x61feea(_0x1d8267,_0x20ba7e,_0x4997bc);let _0x4184d8=class extends _0xa66518[_0x12bde9(0x1d5)]{constructor(_0x100132,_0x574281,_0x4d7ada,_0x4fbef9){const _0x28d610=_0x12bde9;super(),this['_commentService']=_0x100132,this[_0x28d610(0x1e2)]=_0x574281,this['_userService']=_0x4d7ada,this['_injector']=_0x4fbef9,this[_0x28d610(0x21a)](),this['_initUserSync']();}[_0x12bde9(0x1fb)](){const _0x340744=_0x12bde9;this[_0x340744(0x206)](this['_threadCommentModel']['commentUpdate$'][_0x340744(0x214)](_0x10c18f[_0x340744(0x220)](0x10))['subscribe'](_0x566359=>{const _0x185bfc=_0x340744,_0x2b364e=new Set();_0x566359[_0x185bfc(0x1cf)](_0x241c54=>{const _0x523779=_0x185bfc;if(_0x241c54[_0x523779(0x1fe)]===_0x523779(0x1b4)){const _0x47af20=_0x241c54[_0x523779(0x1ff)]['personId'];_0x2b364e[_0x523779(0x1b4)](_0x47af20);}}),_0x368d8c(this[_0x185bfc(0x1f4)],_0x2b364e);}));}['_init'](){const _0x574426=_0x12bde9;this[_0x574426(0x206)](this[_0x574426(0x1ad)][_0x574426(0x1f0)][_0x574426(0x1a8)](async _0x1e2765=>{const _0x1508a8=_0x574426;var _0x46499b,_0x1c788b,_0x4576c2,_0x5722e3;const _0x485161=(_0x46499b=this[_0x1508a8(0x1e2)][_0x1508a8(0x201)](_0x1e2765[_0x1508a8(0x1d0)])['find'](_0x3c3661=>_0x3c3661['threadId']===_0x1e2765[_0x1508a8(0x1a7)]))==null?void 0x0:_0x46499b[_0x1508a8(0x1f7)];if(!_0x485161)return;const {unitId:_0x1de645,subUnitId:_0x399e2b}=_0x485161;switch(_0x1e2765['user']&&this['_userService']['addUser'](_0x1e2765[_0x1508a8(0x1cb)]),_0x1e2765['type']){case _0x387e95[_0x1508a8(0x1c2)]:break;case _0x387e95[_0x1508a8(0x21b)]:{this[_0x1508a8(0x1e2)][_0x1508a8(0x19b)](_0x1de645,_0x399e2b,{'unitId':_0x1de645,'subUnitId':_0x399e2b,'ref':'','id':_0x1e2765[_0x1508a8(0x1d4)],'dT':_0x43f364(+_0x1e2765[_0x1508a8(0x20b)]),'threadId':_0x1e2765[_0x1508a8(0x1a7)],'personId':(_0x4576c2=(_0x1c788b=_0x1e2765['user'])==null?void 0x0:_0x1c788b[_0x1508a8(0x1b1)])!=null?_0x4576c2:_0x1e2765[_0x1508a8(0x1ee)],'text':JSON[_0x1508a8(0x1de)](_0x1e2765['content']),'parentId':_0x485161['id']});break;}case _0x387e95[_0x1508a8(0x21e)]:{const _0x4bbd90=this[_0x1508a8(0x1e2)]['getComment'](_0x1de645,_0x399e2b,_0x1e2765['replyId']);_0x4bbd90&&_0x4bbd90[_0x1508a8(0x200)]&&this[_0x1508a8(0x1e2)][_0x1508a8(0x212)](_0x1de645,_0x399e2b,_0x1e2765['replyId']);break;}case _0x387e95[_0x1508a8(0x1af)]:{this['_threadCommentModel'][_0x1508a8(0x1ac)](_0x1de645,_0x399e2b,{'commentId':_0x1e2765[_0x1508a8(0x1d4)],'text':JSON[_0x1508a8(0x1de)](_0x1e2765[_0x1508a8(0x1e4)])});break;}case _0x387e95[_0x1508a8(0x21d)]:{const _0x278cd=(_0x5722e3=this[_0x1508a8(0x1e2)][_0x1508a8(0x201)](_0x1e2765[_0x1508a8(0x1d0)])['find'](_0x56bd82=>_0x56bd82[_0x1508a8(0x1a7)]===_0x1e2765[_0x1508a8(0x1a7)]))==null?void 0x0:_0x5722e3[_0x1508a8(0x1f7)];_0x278cd&&this[_0x1508a8(0x1e2)][_0x1508a8(0x1d7)](_0x1de645,_0x399e2b,_0x278cd['id'],_0x1e2765['solved']===_0x5f4b83[_0x1508a8(0x21c)]);break;}}}));}};_0x4184d8=_0x4c136a([_0x59dab2(0x0,_0xa66518[_0x12bde9(0x1a5)](_0x369bd8[_0x12bde9(0x1d6)])),_0x59dab2(0x1,_0xa66518[_0x12bde9(0x1a5)](_0x4a626a[_0x12bde9(0x207)])),_0x59dab2(0x2,_0xa66518[_0x12bde9(0x1a5)](_0xa66518['UserManagerService'])),_0x59dab2(0x3,_0xa66518[_0x12bde9(0x1a5)](_0xa66518[_0x12bde9(0x20e)]))],_0x4184d8);const _0x5a5f98='thread-comment-data-source.config',_0x584180={};var _0xe1ceb4=Object['getOwnPropertyDescriptor'],_0x49d1ca=(_0x359a16,_0x32ccf8,_0x1413ec,_0x132601)=>{const _0x2ff045=_0x12bde9;for(var _0x1c22a0=_0x132601>0x1?void 0x0:_0x132601?_0xe1ceb4(_0x32ccf8,_0x1413ec):_0x32ccf8,_0x47b88d=_0x359a16[_0x2ff045(0x1a3)]-0x1,_0x3f776b;_0x47b88d>=0x0;_0x47b88d--)(_0x3f776b=_0x359a16[_0x47b88d])&&(_0x1c22a0=_0x3f776b(_0x1c22a0)||_0x1c22a0);return _0x1c22a0;},_0x309ed0=(_0x5c6425,_0x44d186)=>(_0x12ce66,_0x53da26)=>_0x44d186(_0x12ce66,_0x53da26,_0x5c6425);function _0x3a580c(_0xc2b70f,_0x50c6b0){const _0x2f59b5=_0x12bde9,_0x320778=_0xc2b70f[_0x2f59b5(0x222)][0x0];return{..._0x50c6b0,'id':_0x320778['replyId'],'resolved':_0xc2b70f[_0x2f59b5(0x1e9)]===0x1,'dT':_0x43f364(_0x320778[_0x2f59b5(0x20b)]),'personId':_0x320778['userId'],'threadId':_0x320778[_0x2f59b5(0x1a7)]};}function _0x1263d8(_0x751563,_0x3f4eb5,_0x5e2867){const _0x53bb9e=_0x12bde9;var _0x12799f,_0x425f3c;if(((_0x425f3c=(_0x12799f=_0x751563==null?void 0x0:_0x751563[_0x53bb9e(0x222)])==null?void 0x0:_0x12799f[_0x53bb9e(0x1a3)])!=null?_0x425f3c:0x0)>0x0){const _0x112f31=(_0x59e90f,_0x59897b)=>({'id':_0x59e90f[_0x53bb9e(0x1d4)],'threadId':_0x59e90f[_0x53bb9e(0x1a7)],'dT':_0x43f364(_0x59e90f[_0x53bb9e(0x20b)]),'personId':_0x59e90f['userId'],'resolved':_0x751563[_0x53bb9e(0x1e9)]===_0x5f4b83[_0x53bb9e(0x21c)],'unitId':_0x3f4eb5,'subUnitId':_0x5e2867,'text':JSON[_0x53bb9e(0x1de)](_0x59e90f['content']),'parentId':_0x59897b}),_0x9fc0c1=_0x112f31(_0x751563['replies'][0x0]);return{..._0x9fc0c1,'children':_0x751563[_0x53bb9e(0x222)][_0x53bb9e(0x1dd)](0x1)[_0x53bb9e(0x223)](_0x13ee11=>_0x112f31(_0x13ee11,_0x9fc0c1['id']))};}return null;}let _0x14852d=class{constructor(_0x435bd9,_0x28ba5b,_0x57abf8){const _0x568f13=_0x12bde9;this[_0x568f13(0x1f5)]=_0x435bd9,this['_userService']=_0x28ba5b,this[_0x568f13(0x1da)]=_0x57abf8;}async[_0x12bde9(0x19b)](_0x357fea){const _0x60938c=_0x12bde9;var _0x300c6e,_0x1fb6f8;const {parentId:_0x5d68a7,unitId:_0x734663,text:_0x22abc2,threadId:_0x201c40}=_0x357fea,_0x1acb5a=(_0x1fb6f8=(_0x300c6e=_0x22abc2[_0x60938c(0x20a)])==null?void 0x0:_0x300c6e['filter'](_0x2ea3e8=>_0x2ea3e8[_0x60938c(0x1c1)]===_0xa66518[_0x60938c(0x1bb)]['COMMENT'])[_0x60938c(0x223)](_0x4c684b=>_0x4c684b['rangeId']))!=null?_0x1fb6f8:[],_0x3a78c1=JSON[_0x60938c(0x1d1)](_0x22abc2),_0x21be09=(await this[_0x60938c(0x1da)]['requireSession'](_0x734663))[_0x60938c(0x20f)]();if(_0x5d68a7){const _0x61c2c5={'memberId':_0x21be09,'unitId':_0x734663,'content':_0x3a78c1,'mention':_0x1acb5a,'threadId':_0x201c40},_0x8c8931=(await this[_0x60938c(0x1f5)]['post'](_0x60938c(0x19f)+_0x734663+_0x60938c(0x1f2),{'body':_0x61c2c5}))[_0x60938c(0x1c5)][_0x60938c(0x213)];return{..._0x357fea,'id':_0x8c8931[_0x60938c(0x1d4)],'dT':_0xa66518['dayjs'](+_0x8c8931[_0x60938c(0x20b)])[_0x60938c(0x202)](_0x60938c(0x1fd)),'personId':_0x8c8931['userId']};}else{const _0x281437={'memberId':_0x21be09,'unitId':_0x734663,'content':_0x3a78c1,'mention':_0x1acb5a},_0x4ada82=await this[_0x60938c(0x1f5)][_0x60938c(0x1df)](_0x60938c(0x19f)+_0x734663+_0x60938c(0x20d),{'body':_0x281437});return _0x3a580c(_0x4ada82[_0x60938c(0x1c5)][_0x60938c(0x1db)],_0x357fea);}}async[_0x12bde9(0x1ac)](_0x2413a8){const _0x97b2c7=_0x12bde9;var _0x33a649,_0x43566f;const {text:_0x1f3d28,unitId:_0x427fe5}=_0x2413a8,_0x279e81=(_0x43566f=(_0x33a649=_0x1f3d28[_0x97b2c7(0x20a)])==null?void 0x0:_0x33a649['filter'](_0x14be66=>_0x14be66[_0x97b2c7(0x1c1)]===_0xa66518[_0x97b2c7(0x1bb)]['COMMENT'])[_0x97b2c7(0x223)](_0x4f4667=>_0x4f4667[_0x97b2c7(0x19e)]))!=null?_0x43566f:[],_0x2bb815=JSON[_0x97b2c7(0x1d1)](_0x1f3d28),_0x3fcf47=_0x2413a8[_0x97b2c7(0x1a7)],_0x5eca48=_0x2413a8['id'],_0x483c42={'memberId':(await this[_0x97b2c7(0x1da)]['requireSession'](_0x427fe5))['getMemberID'](),'unitId':_0x427fe5,'threadId':_0x3fcf47,'mention':_0x279e81,'content':_0x2bb815,'replyId':_0x5eca48},_0x3cfb93=await this[_0x97b2c7(0x1f5)]['post'](_0x97b2c7(0x19f)+_0x427fe5+_0x97b2c7(0x19d),{'body':_0x483c42});return!_0x3cfb93[_0x97b2c7(0x1c5)][_0x97b2c7(0x1b7)]||_0x3cfb93[_0x97b2c7(0x1c5)][_0x97b2c7(0x1b7)][_0x97b2c7(0x1b9)]===0x1;}async[_0x12bde9(0x1d7)](_0x12133b){const _0x60bd62=_0x12bde9,{unitId:_0x315b42}=_0x12133b,_0x1126ae=_0x12133b[_0x60bd62(0x1a7)],_0x141f48={'memberId':this[_0x60bd62(0x1d2)]['getCurrentUser']()[_0x60bd62(0x1b1)],'unitId':_0x315b42,'threadId':_0x1126ae,'solved':_0x12133b[_0x60bd62(0x1a6)]?_0x5f4b83['Solved']:_0x5f4b83['OpenOrReOpen']},_0x550293=await this['_httpService'][_0x60bd62(0x1df)](_0x60bd62(0x19f)+_0x315b42+_0x60bd62(0x1ce),{'body':_0x141f48});return!_0x550293[_0x60bd62(0x1c5)]['error']||_0x550293[_0x60bd62(0x1c5)][_0x60bd62(0x1b7)]['code']===0x1;}async[_0x12bde9(0x212)](_0x3d6459,_0xe859f4,_0x2e223f,_0x53e31b){const _0xbe89a9=_0x12bde9,_0x4ffa4f={'memberId':(await this[_0xbe89a9(0x1da)][_0xbe89a9(0x1e7)](_0x3d6459))['getMemberID'](),'threadId':_0x2e223f,'replyId':_0x53e31b,'unitId':_0x3d6459},_0x1c7a13=await this[_0xbe89a9(0x1f5)]['post'](_0xbe89a9(0x19f)+_0x3d6459+_0xbe89a9(0x203),{'body':_0x4ffa4f});return!_0x1c7a13[_0xbe89a9(0x1c5)][_0xbe89a9(0x1b7)]||_0x1c7a13[_0xbe89a9(0x1c5)][_0xbe89a9(0x1b7)][_0xbe89a9(0x1b9)]===0x1;}async[_0x12bde9(0x1f3)](_0xd18e15,_0x576375,_0x52476f){const _0x3f42c8=_0x12bde9,_0x5d8f78={'unitId':_0xd18e15,'threadId':_0x52476f},_0x1d8612=await this['_httpService'][_0x3f42c8(0x1df)]('/universer-api/comment/unit/'+_0xd18e15+_0x3f42c8(0x1ed),{'body':_0x5d8f78}),_0x2a311b=_0x52476f[_0x3f42c8(0x223)](_0x3f359d=>_0x1263d8(_0x1d8612[_0x3f42c8(0x1c5)][_0x3f42c8(0x1a4)][_0x3f359d],_0xd18e15,_0x576375))[_0x3f42c8(0x1cc)](Boolean);return Object['values'](_0x1d8612[_0x3f42c8(0x1c5)][_0x3f42c8(0x21f)])[_0x3f42c8(0x1cf)](_0x3930f5=>{const _0x4b7ad3=_0x3f42c8;this[_0x4b7ad3(0x1d2)][_0x4b7ad3(0x1e3)](_0x3930f5);}),_0x2a311b;}['saveCommentToSnapshot'](_0x1c421f){const _0x24bf2c=_0x12bde9;return{'id':_0x1c421f['id'],'threadId':_0x1c421f[_0x24bf2c(0x1a7)],'ref':_0x1c421f[_0x24bf2c(0x218)]};}};_0x14852d=_0x49d1ca([_0x309ed0(0x0,_0xa66518[_0x12bde9(0x1a5)](_0x4c6741[_0x12bde9(0x1b6)])),_0x309ed0(0x1,_0xa66518[_0x12bde9(0x1a5)](_0xa66518[_0x12bde9(0x1d9)])),_0x309ed0(0x2,_0xa66518[_0x12bde9(0x1a5)](_0x369bd8[_0x12bde9(0x1ab)]))],_0x14852d);var _0xc587c1=Object['getOwnPropertyDescriptor'],_0x406b50=(_0x368638,_0x4b7879,_0x48e6de,_0x2adb2a)=>{for(var _0x108c1e=_0x2adb2a>0x1?void 0x0:_0x2adb2a?_0xc587c1(_0x4b7879,_0x48e6de):_0x4b7879,_0x3c2198=_0x368638['length']-0x1,_0x386bbd;_0x3c2198>=0x0;_0x3c2198--)(_0x386bbd=_0x368638[_0x3c2198])&&(_0x108c1e=_0x386bbd(_0x108c1e)||_0x108c1e);return _0x108c1e;},_0x1a9ba1=(_0x5b64e8,_0x4d4c37)=>(_0x303ec2,_0x13f5d8)=>_0x4d4c37(_0x303ec2,_0x13f5d8,_0x5b64e8);let _0x52afc6=class extends _0xa66518[_0x12bde9(0x1d5)]{constructor(_0x2abe23,_0x15c9a0){const _0x535d96=_0x12bde9;super(),this[_0x535d96(0x1e6)]=_0x2abe23,this[_0x535d96(0x1a0)]=_0x15c9a0,this['_initDataSource']();}[_0x12bde9(0x19a)](){const _0x2a398=_0x12bde9;this[_0x2a398(0x1e6)][_0x2a398(0x1c3)]=this['_threadCommentDataSource'],this[_0x2a398(0x1e6)][_0x2a398(0x1f9)]=!0x1;}};_0x52afc6=_0x406b50([_0x1a9ba1(0x0,_0x4a626a['IThreadCommentDataSourceService']),_0x1a9ba1(0x1,_0xa66518[_0x12bde9(0x1a5)](_0x14852d))],_0x52afc6);var _0x1c3b87=Object['defineProperty'],_0x1dd6e4=Object[_0x12bde9(0x1c8)],_0x25e32=(_0x371a62,_0x278369,_0x25171c)=>_0x278369 in _0x371a62?_0x1c3b87(_0x371a62,_0x278369,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x25171c}):_0x371a62[_0x278369]=_0x25171c,_0x2e2ead=(_0x588746,_0x3a2a33,_0x1d3d0c,_0xe4ad41)=>{const _0x565e24=_0x12bde9;for(var _0x4bf82f=_0xe4ad41>0x1?void 0x0:_0xe4ad41?_0x1dd6e4(_0x3a2a33,_0x1d3d0c):_0x3a2a33,_0x3553fd=_0x588746[_0x565e24(0x1a3)]-0x1,_0x302e2e;_0x3553fd>=0x0;_0x3553fd--)(_0x302e2e=_0x588746[_0x3553fd])&&(_0x4bf82f=_0x302e2e(_0x4bf82f)||_0x4bf82f);return _0x4bf82f;},_0x2fd0cb=(_0x1a71c5,_0x55cb9f)=>(_0x5523b5,_0x5c8455)=>_0x55cb9f(_0x5523b5,_0x5c8455,_0x1a71c5),_0x4bbf9d=(_0x2538f7,_0x1e8e27,_0x2bebdf)=>_0x25e32(_0x2538f7,typeof _0x1e8e27!=_0x12bde9(0x216)?_0x1e8e27+'':_0x1e8e27,_0x2bebdf);_0x385d40[_0x12bde9(0x1eb)]=class extends _0xa66518[_0x12bde9(0x221)]{constructor(_0x59ff59=_0x584180,_0x37346a,_0x50f7d3){const _0x933647=_0x12bde9;super(),this[_0x933647(0x209)]=_0x59ff59,this[_0x933647(0x1f4)]=_0x37346a,this['_configService']=_0x50f7d3;const {..._0x2eb91a}=_0xa66518[_0x933647(0x1fa)]({},_0x584180,this[_0x933647(0x209)]);this['_configService'][_0x933647(0x1a1)](_0x5a5f98,_0x2eb91a);}[_0x12bde9(0x1ec)](){[[_0x14852d],[_0x52afc6],[_0x4184d8]]['forEach'](_0x482d40=>{const _0x5d4638=_0x3d2c;this['_injector'][_0x5d4638(0x1b4)](_0x482d40);});}[_0x12bde9(0x1a9)](){const _0x2c6ea7=_0x12bde9;this[_0x2c6ea7(0x1f4)][_0x2c6ea7(0x1ae)](_0x52afc6),this[_0x2c6ea7(0x1f4)][_0x2c6ea7(0x1ae)](_0x4184d8);}},_0x4bbf9d(_0x385d40[_0x12bde9(0x1eb)],'pluginName',_0x381fe7),_0x4bbf9d(_0x385d40[_0x12bde9(0x1eb)],_0x12bde9(0x1fe),_0xa66518[_0x12bde9(0x208)][_0x12bde9(0x1b0)]),_0x385d40['UniverThreadCommentDataSourcePlugin']=_0x2e2ead([_0xa66518['DependentOn'](_0x1b42b9[_0x12bde9(0x1ea)],_0x369bd8['UniverCollaborationClientPlugin'],_0x47e426[_0x12bde9(0x1ef)]),_0x2fd0cb(0x1,_0xa66518[_0x12bde9(0x1a5)](_0xa66518[_0x12bde9(0x20e)])),_0x2fd0cb(0x2,_0xa66518[_0x12bde9(0x1f6)])],_0x385d40[_0x12bde9(0x1eb)]),Object[_0x12bde9(0x219)](_0x385d40,Symbol[_0x12bde9(0x1ba)],{'value':_0x12bde9(0x1c6)});}));
1
+ function _0x302e(){const _0x2c0b43=['rxjs','@univerjs/thread-comment','body','forEach','thread-comment-data-source.config','61UIvXGw','requireSession','Inject','map','COMMENT','content','OpenOrReOpen','merge','UniverCollaborationClientPlugin','saveCommentToSnapshot','Solved','delete','UniverThreadCommentDataSourcePlugin','amd','getUser','userId','YYYY/MM/DD\x20HH:mm','210jFSXfS','_initDataSource','listComments','symbol','UniverProLicense','reply','CustomRangeType','Solve','_configService','comment','Disposable','root','setConfig','version','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Injector','Plugin','ref','DependentOn','resolveComment','length','threadId','addUser','exports','UNRECOGNIZED','replies','_sessionService','_config','UniverThreadCommentUIPlugin','/edit','packageName','/universer-api/user/list','Module','UserManagerService','CollaborationSessionService','0.17.0','Edit','personId','find','parse','UniverThreadCommentUi','add','UniverNetwork','UniverLicensePlugin','type','unitId','@univerjs/network','_httpService','format','_init','59851jqJXLP','405180gMaYui','dayjs','updateComment','customRanges','users','parentId','_threadCommentDataSource','222IxqQUl','UniverProCollaborationClient','getUnit','Unknown','comments','_commentService','getOwnPropertyDescriptor','1811799apUJSw','defineProperty','onStarting','userID','post','@univerjs/core','3163300JlpwjH','dataSource','15558eVlZEI','Add','function','createTimestamp','addComment','_injector','/list','4DaxCKI','commentUpdate$','disposeWithMe','/universer-api/comment/unit/','user','/reply','toStringTag','getCurrentUser','solved','_threadCommentDataSourceService','/solved','getComment','rangeType','getMemberID','26383dJRydS','Reply','32BglWCa','@univerjs-pro/collaboration-client','error','onReady','bufferTime','CommentService','/delete','replyId','_threadCommentModel','1145424OEqFSN','IThreadCommentDataSourceService','ThreadCommentModel','get','HTTPService','@univerjs-pro/license','subscribe','filter','stringify','code','Delete','deleteComment','_userService'];_0x302e=function(){return _0x2c0b43;};return _0x302e();}function _0x8c07(_0x28977a,_0x26cc34){_0x28977a=_0x28977a-0x1c5;const _0x302e42=_0x302e();let _0x8c070d=_0x302e42[_0x28977a];return _0x8c070d;}(function(_0x4065bc,_0x5f3c2f){const _0x4e685d=_0x8c07,_0x2dcb48=_0x4065bc();while(!![]){try{const _0x2c7f28=-parseInt(_0x4e685d(0x220))/0x1*(-parseInt(_0x4e685d(0x1ee))/0x2)+parseInt(_0x4e685d(0x20e))/0x3+parseInt(_0x4e685d(0x1f5))/0x4*(parseInt(_0x4e685d(0x1ec))/0x5)+-parseInt(_0x4e685d(0x1df))/0x6*(-parseInt(_0x4e685d(0x203))/0x7)+-parseInt(_0x4e685d(0x205))/0x8*(parseInt(_0x4e685d(0x1e6))/0x9)+parseInt(_0x4e685d(0x231))/0xa*(-parseInt(_0x4e685d(0x1d7))/0xb)+parseInt(_0x4e685d(0x1d8))/0xc;if(_0x2c7f28===_0x5f3c2f)break;else _0x2dcb48['push'](_0x2dcb48['shift']());}catch(_0x2dcf27){_0x2dcb48['push'](_0x2dcb48['shift']());}}}(_0x302e,0xb552c),function(_0x2ff184,_0x578b16){const _0x340f7a=_0x8c07;typeof exports=='object'&&typeof module<'u'?_0x578b16(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x340f7a(0x1f0)&&define[_0x340f7a(0x22d)]?define([_0x340f7a(0x248),_0x340f7a(0x206),_0x340f7a(0x213),_0x340f7a(0x1eb),'@univerjs/thread-comment-ui',_0x340f7a(0x21c),'rxjs',_0x340f7a(0x1d3)],_0x578b16):(_0x2ff184=typeof globalThis<'u'?globalThis:_0x2ff184||self,_0x578b16(_0x2ff184['UniverProThreadCommentDatasource']={},_0x2ff184[_0x340f7a(0x1e0)],_0x2ff184[_0x340f7a(0x235)],_0x2ff184['UniverCore'],_0x2ff184[_0x340f7a(0x1cd)],_0x2ff184['UniverThreadComment'],_0x2ff184[_0x340f7a(0x21b)],_0x2ff184[_0x340f7a(0x1cf)]));}(this,function(_0x1d2831,_0x48728e,_0x186b78,_0x5cf6bc,_0x3bbdbc,_0x2d6740,_0x586d69,_0x1981fa){'use strict';const _0x33b441=_0x8c07;const _0x5bf3b2={'name':'@univerjs-pro/thread-comment-datasource','version':_0x33b441(0x1c8)},_0x24c745=_0x33b441(0x23f);var _0x80bbbf=(_0xc86be=>(_0xc86be[_0xc86be[_0x33b441(0x226)]=0x0]=_0x33b441(0x226),_0xc86be[_0xc86be[_0x33b441(0x22a)]=0x1]=_0x33b441(0x22a),_0xc86be[_0xc86be[_0x33b441(0x249)]=-0x1]=_0x33b441(0x249),_0xc86be))(_0x80bbbf||{}),_0x23be56=(_0x11dc23=>(_0x11dc23[_0x11dc23['Unknown']=0x0]=_0x33b441(0x1e2),_0x11dc23[_0x11dc23[_0x33b441(0x1ef)]=0x1]='Add',_0x11dc23[_0x11dc23[_0x33b441(0x204)]=0x2]='Reply',_0x11dc23[_0x11dc23[_0x33b441(0x1c9)]=0x3]=_0x33b441(0x1c9),_0x11dc23[_0x11dc23[_0x33b441(0x218)]=0x4]=_0x33b441(0x218),_0x11dc23[_0x11dc23['Solve']=0x5]=_0x33b441(0x238),_0x11dc23[_0x11dc23['UNRECOGNIZED']=-0x1]=_0x33b441(0x249),_0x11dc23))(_0x23be56||{});const _0x1778dd=_0x3eb2d8=>_0x5cf6bc['dayjs'](new Date(+_0x3eb2d8))['format'](_0x33b441(0x230)),_0x3a9a94=async(_0x1558f9,_0x4bbd27)=>{const _0x441458=_0x33b441,_0x59e5c7=_0x1558f9['get'](_0x5cf6bc[_0x441458(0x1c6)]),_0x2c2530=_0x1558f9[_0x441458(0x211)](_0x1981fa[_0x441458(0x212)]);_0x4bbd27[_0x441458(0x21e)](_0x4720b6=>{const _0x52b1a0=_0x441458;_0x59e5c7[_0x52b1a0(0x22e)](_0x4720b6)&&_0x4bbd27[_0x52b1a0(0x22b)](_0x4720b6);}),_0x4bbd27['size']&&(await _0x2c2530['get'](_0x441458(0x250),{'params':{'userIDs':[..._0x4bbd27]}}))['body'][_0x441458(0x1dc)][_0x441458(0x21e)](_0x1cdf28=>{const _0x3c455b=_0x441458;_0x1cdf28&&_0x59e5c7[_0x3c455b(0x247)](_0x1cdf28);});};var _0x35b8f8=Object[_0x33b441(0x1e5)],_0x3c4235=(_0x4bb391,_0x4abb58,_0x3dc0ce,_0x278f06)=>{for(var _0x3240f9=_0x278f06>0x1?void 0x0:_0x278f06?_0x35b8f8(_0x4abb58,_0x3dc0ce):_0x4abb58,_0x388a85=_0x4bb391['length']-0x1,_0x34541d;_0x388a85>=0x0;_0x388a85--)(_0x34541d=_0x4bb391[_0x388a85])&&(_0x3240f9=_0x34541d(_0x3240f9)||_0x3240f9);return _0x3240f9;},_0x2044cd=(_0x5508b8,_0x3d62a2)=>(_0x11eab8,_0x43bb29)=>_0x3d62a2(_0x11eab8,_0x43bb29,_0x5508b8);let _0x4dfe2a=class extends _0x5cf6bc[_0x33b441(0x23b)]{constructor(_0x2c0324,_0x456d93,_0x4a45c6,_0x425e5a){const _0x4c6c05=_0x33b441;super(),this[_0x4c6c05(0x1e4)]=_0x2c0324,this[_0x4c6c05(0x20d)]=_0x456d93,this[_0x4c6c05(0x21a)]=_0x4a45c6,this[_0x4c6c05(0x1f3)]=_0x425e5a,this[_0x4c6c05(0x1d6)](),this['_initUserSync']();}['_initUserSync'](){const _0xa9738a=_0x33b441;this[_0xa9738a(0x1f7)](this['_threadCommentModel'][_0xa9738a(0x1f6)]['pipe'](_0x586d69[_0xa9738a(0x209)](0x10))[_0xa9738a(0x214)](_0x16cab2=>{const _0x1af4ce=_0xa9738a,_0x25d850=new Set();_0x16cab2[_0x1af4ce(0x21e)](_0x5331bb=>{const _0x497fdb=_0x1af4ce;if(_0x5331bb[_0x497fdb(0x1d1)]===_0x497fdb(0x1ce)){const _0x39f9fd=_0x5331bb['payload'][_0x497fdb(0x1ca)];_0x25d850[_0x497fdb(0x1ce)](_0x39f9fd);}}),_0x3a9a94(this[_0x1af4ce(0x1f3)],_0x25d850);}));}[_0x33b441(0x1d6)](){const _0xab8ece=_0x33b441;this[_0xab8ece(0x1f7)](this[_0xab8ece(0x1e4)][_0xab8ece(0x1f6)]['subscribe'](async _0x3b657b=>{const _0x11a7ca=_0xab8ece;var _0x500dc7,_0xa7892c,_0xd6e487,_0x3b30af;const _0x4d9824=(_0x500dc7=this[_0x11a7ca(0x20d)]['getUnit'](_0x3b657b[_0x11a7ca(0x1d2)])[_0x11a7ca(0x1cb)](_0x280060=>_0x280060[_0x11a7ca(0x246)]===_0x3b657b[_0x11a7ca(0x246)]))==null?void 0x0:_0x500dc7[_0x11a7ca(0x23c)];if(!_0x4d9824)return;const {unitId:_0x5a1db8,subUnitId:_0x4bf16a}=_0x4d9824;switch(_0x3b657b[_0x11a7ca(0x1f9)]&&this[_0x11a7ca(0x21a)][_0x11a7ca(0x247)](_0x3b657b['user']),_0x3b657b['type']){case _0x23be56[_0x11a7ca(0x1ef)]:break;case _0x23be56['Reply']:{this[_0x11a7ca(0x20d)][_0x11a7ca(0x1f2)](_0x5a1db8,_0x4bf16a,{'unitId':_0x5a1db8,'subUnitId':_0x4bf16a,'ref':'','id':_0x3b657b[_0x11a7ca(0x20c)],'dT':_0x1778dd(+_0x3b657b[_0x11a7ca(0x1f1)]),'threadId':_0x3b657b[_0x11a7ca(0x246)],'personId':(_0xd6e487=(_0xa7892c=_0x3b657b[_0x11a7ca(0x1f9)])==null?void 0x0:_0xa7892c['userID'])!=null?_0xd6e487:_0x3b657b[_0x11a7ca(0x22f)],'text':JSON[_0x11a7ca(0x1cc)](_0x3b657b[_0x11a7ca(0x225)]),'parentId':_0x4d9824['id']});break;}case _0x23be56[_0x11a7ca(0x218)]:{const _0x29e7a6=this[_0x11a7ca(0x20d)][_0x11a7ca(0x200)](_0x5a1db8,_0x4bf16a,_0x3b657b[_0x11a7ca(0x20c)]);_0x29e7a6&&_0x29e7a6[_0x11a7ca(0x1dd)]&&this[_0x11a7ca(0x20d)][_0x11a7ca(0x219)](_0x5a1db8,_0x4bf16a,_0x3b657b[_0x11a7ca(0x20c)]);break;}case _0x23be56['Edit']:{this[_0x11a7ca(0x20d)]['updateComment'](_0x5a1db8,_0x4bf16a,{'commentId':_0x3b657b[_0x11a7ca(0x20c)],'text':JSON[_0x11a7ca(0x1cc)](_0x3b657b['content'])});break;}case _0x23be56[_0x11a7ca(0x238)]:{const _0x5a8bbe=(_0x3b30af=this[_0x11a7ca(0x20d)][_0x11a7ca(0x1e1)](_0x3b657b[_0x11a7ca(0x1d2)])[_0x11a7ca(0x1cb)](_0x3cfa72=>_0x3cfa72['threadId']===_0x3b657b[_0x11a7ca(0x246)]))==null?void 0x0:_0x3b30af[_0x11a7ca(0x23c)];_0x5a8bbe&&this[_0x11a7ca(0x20d)][_0x11a7ca(0x244)](_0x5a1db8,_0x4bf16a,_0x5a8bbe['id'],_0x3b657b['solved']===_0x80bbbf[_0x11a7ca(0x22a)]);break;}}}));}};_0x4dfe2a=_0x3c4235([_0x2044cd(0x0,_0x5cf6bc['Inject'](_0x48728e[_0x33b441(0x20a)])),_0x2044cd(0x1,_0x5cf6bc[_0x33b441(0x222)](_0x2d6740[_0x33b441(0x210)])),_0x2044cd(0x2,_0x5cf6bc['Inject'](_0x5cf6bc[_0x33b441(0x1c6)])),_0x2044cd(0x3,_0x5cf6bc[_0x33b441(0x222)](_0x5cf6bc[_0x33b441(0x240)]))],_0x4dfe2a);const _0x474631=_0x33b441(0x21f),_0x551718={};var _0x236829=Object[_0x33b441(0x1e5)],_0x2fb2a6=(_0x55e477,_0x28ba8c,_0x57f981,_0x5def45)=>{const _0x394e40=_0x33b441;for(var _0x31bfb0=_0x5def45>0x1?void 0x0:_0x5def45?_0x236829(_0x28ba8c,_0x57f981):_0x28ba8c,_0x49e2ec=_0x55e477[_0x394e40(0x245)]-0x1,_0x2d3147;_0x49e2ec>=0x0;_0x49e2ec--)(_0x2d3147=_0x55e477[_0x49e2ec])&&(_0x31bfb0=_0x2d3147(_0x31bfb0)||_0x31bfb0);return _0x31bfb0;},_0x306947=(_0x29ada6,_0x136e3b)=>(_0x17e500,_0xd0a9fb)=>_0x136e3b(_0x17e500,_0xd0a9fb,_0x29ada6);function _0x292d63(_0x1b7ae0,_0x4799a5){const _0x24177a=_0x33b441,_0x71d73f=_0x1b7ae0[_0x24177a(0x24a)][0x0];return{..._0x4799a5,'id':_0x71d73f[_0x24177a(0x20c)],'resolved':_0x1b7ae0[_0x24177a(0x1fd)]===0x1,'dT':_0x1778dd(_0x71d73f['createTimestamp']),'personId':_0x71d73f[_0x24177a(0x22f)],'threadId':_0x71d73f['threadId']};}function _0x3b00b0(_0x5f166c,_0x2a4792,_0x3bdf99){const _0xe7e0e0=_0x33b441;var _0x275170,_0xdd2add;if(((_0xdd2add=(_0x275170=_0x5f166c==null?void 0x0:_0x5f166c[_0xe7e0e0(0x24a)])==null?void 0x0:_0x275170[_0xe7e0e0(0x245)])!=null?_0xdd2add:0x0)>0x0){const _0x47305a=(_0x50a9f8,_0x6651b5)=>({'id':_0x50a9f8['replyId'],'threadId':_0x50a9f8[_0xe7e0e0(0x246)],'dT':_0x1778dd(_0x50a9f8[_0xe7e0e0(0x1f1)]),'personId':_0x50a9f8[_0xe7e0e0(0x22f)],'resolved':_0x5f166c[_0xe7e0e0(0x1fd)]===_0x80bbbf['Solved'],'unitId':_0x2a4792,'subUnitId':_0x3bdf99,'text':JSON[_0xe7e0e0(0x1cc)](_0x50a9f8[_0xe7e0e0(0x225)]),'parentId':_0x6651b5}),_0x23cc19=_0x47305a(_0x5f166c[_0xe7e0e0(0x24a)][0x0]);return{..._0x23cc19,'children':_0x5f166c['replies']['slice'](0x1)['map'](_0x477384=>_0x47305a(_0x477384,_0x23cc19['id']))};}return null;}let _0x39ae1a=class{constructor(_0x4b600f,_0x1b369a,_0x1c1374){const _0x52f345=_0x33b441;this[_0x52f345(0x1d4)]=_0x4b600f,this['_userService']=_0x1b369a,this[_0x52f345(0x24b)]=_0x1c1374;}async[_0x33b441(0x1f2)](_0xe7e075){const _0x49fd00=_0x33b441;var _0x1dbaaa,_0x593f57;const {parentId:_0x5bc860,unitId:_0x126df4,text:_0x37a1db,threadId:_0x4352d6}=_0xe7e075,_0x5a29fe=(_0x593f57=(_0x1dbaaa=_0x37a1db[_0x49fd00(0x1db)])==null?void 0x0:_0x1dbaaa[_0x49fd00(0x215)](_0x36c3e4=>_0x36c3e4[_0x49fd00(0x201)]===_0x5cf6bc[_0x49fd00(0x237)][_0x49fd00(0x224)])[_0x49fd00(0x223)](_0x29312e=>_0x29312e['rangeId']))!=null?_0x593f57:[],_0x96ef85=JSON[_0x49fd00(0x216)](_0x37a1db),_0x526b9e=(await this[_0x49fd00(0x24b)][_0x49fd00(0x221)](_0x126df4))[_0x49fd00(0x202)]();if(_0x5bc860){const _0x4f7385={'memberId':_0x526b9e,'unitId':_0x126df4,'content':_0x96ef85,'mention':_0x5a29fe,'threadId':_0x4352d6},_0x140c65=(await this[_0x49fd00(0x1d4)]['post']('/universer-api/comment/unit/'+_0x126df4+_0x49fd00(0x1fa),{'body':_0x4f7385}))[_0x49fd00(0x21d)][_0x49fd00(0x236)];return{..._0xe7e075,'id':_0x140c65[_0x49fd00(0x20c)],'dT':_0x5cf6bc[_0x49fd00(0x1d9)](+_0x140c65[_0x49fd00(0x1f1)])[_0x49fd00(0x1d5)](_0x49fd00(0x230)),'personId':_0x140c65[_0x49fd00(0x22f)]};}else{const _0x19dc66={'memberId':_0x526b9e,'unitId':_0x126df4,'content':_0x96ef85,'mention':_0x5a29fe},_0x2efd1f=await this['_httpService'][_0x49fd00(0x1ea)](_0x49fd00(0x1f8)+_0x126df4+'/add',{'body':_0x19dc66});return _0x292d63(_0x2efd1f[_0x49fd00(0x21d)][_0x49fd00(0x23a)],_0xe7e075);}}async[_0x33b441(0x1da)](_0x14ec4a){const _0x12bd51=_0x33b441;var _0x560411,_0x2a83a5;const {text:_0x7282f0,unitId:_0x9dad4e}=_0x14ec4a,_0x2ef9ee=(_0x2a83a5=(_0x560411=_0x7282f0['customRanges'])==null?void 0x0:_0x560411['filter'](_0x5d616a=>_0x5d616a[_0x12bd51(0x201)]===_0x5cf6bc[_0x12bd51(0x237)][_0x12bd51(0x224)])['map'](_0x3dbb28=>_0x3dbb28['rangeId']))!=null?_0x2a83a5:[],_0x573211=JSON[_0x12bd51(0x216)](_0x7282f0),_0x2ca63f=_0x14ec4a['threadId'],_0x4f2461=_0x14ec4a['id'],_0x5e6877={'memberId':(await this[_0x12bd51(0x24b)][_0x12bd51(0x221)](_0x9dad4e))[_0x12bd51(0x202)](),'unitId':_0x9dad4e,'threadId':_0x2ca63f,'mention':_0x2ef9ee,'content':_0x573211,'replyId':_0x4f2461},_0x4bab6a=await this['_httpService']['post'](_0x12bd51(0x1f8)+_0x9dad4e+_0x12bd51(0x24e),{'body':_0x5e6877});return!_0x4bab6a[_0x12bd51(0x21d)]['error']||_0x4bab6a[_0x12bd51(0x21d)]['error'][_0x12bd51(0x217)]===0x1;}async[_0x33b441(0x244)](_0x461413){const _0x511841=_0x33b441,{unitId:_0x5f1537}=_0x461413,_0x4d0462=_0x461413[_0x511841(0x246)],_0x4c6355={'memberId':this[_0x511841(0x21a)][_0x511841(0x1fc)]()[_0x511841(0x1e9)],'unitId':_0x5f1537,'threadId':_0x4d0462,'solved':_0x461413['resolved']?_0x80bbbf['Solved']:_0x80bbbf[_0x511841(0x226)]},_0x459c71=await this['_httpService'][_0x511841(0x1ea)](_0x511841(0x1f8)+_0x5f1537+_0x511841(0x1ff),{'body':_0x4c6355});return!_0x459c71['body'][_0x511841(0x207)]||_0x459c71[_0x511841(0x21d)][_0x511841(0x207)][_0x511841(0x217)]===0x1;}async[_0x33b441(0x219)](_0xc9bb11,_0x3ece5b,_0x48f054,_0x35e721){const _0xeb1bff=_0x33b441,_0x4140f={'memberId':(await this['_sessionService'][_0xeb1bff(0x221)](_0xc9bb11))[_0xeb1bff(0x202)](),'threadId':_0x48f054,'replyId':_0x35e721,'unitId':_0xc9bb11},_0x2a9319=await this[_0xeb1bff(0x1d4)][_0xeb1bff(0x1ea)]('/universer-api/comment/unit/'+_0xc9bb11+_0xeb1bff(0x20b),{'body':_0x4140f});return!_0x2a9319[_0xeb1bff(0x21d)][_0xeb1bff(0x207)]||_0x2a9319[_0xeb1bff(0x21d)][_0xeb1bff(0x207)][_0xeb1bff(0x217)]===0x1;}async[_0x33b441(0x233)](_0x55cbca,_0x126a58,_0x279288){const _0x4e5bf0=_0x33b441,_0xc2c69d={'unitId':_0x55cbca,'threadId':_0x279288},_0xabfd36=await this['_httpService'][_0x4e5bf0(0x1ea)](_0x4e5bf0(0x1f8)+_0x55cbca+_0x4e5bf0(0x1f4),{'body':_0xc2c69d}),_0x321939=_0x279288['map'](_0x51f0f0=>_0x3b00b0(_0xabfd36[_0x4e5bf0(0x21d)][_0x4e5bf0(0x1e3)][_0x51f0f0],_0x55cbca,_0x126a58))['filter'](Boolean);return Object['values'](_0xabfd36[_0x4e5bf0(0x21d)]['users'])[_0x4e5bf0(0x21e)](_0x1e2999=>{const _0x3ee16f=_0x4e5bf0;this[_0x3ee16f(0x21a)][_0x3ee16f(0x247)](_0x1e2999);}),_0x321939;}[_0x33b441(0x229)](_0x536b75){const _0x166c81=_0x33b441;return{'id':_0x536b75['id'],'threadId':_0x536b75[_0x166c81(0x246)],'ref':_0x536b75[_0x166c81(0x242)]};}};_0x39ae1a=_0x2fb2a6([_0x306947(0x0,_0x5cf6bc[_0x33b441(0x222)](_0x1981fa['HTTPService'])),_0x306947(0x1,_0x5cf6bc[_0x33b441(0x222)](_0x5cf6bc['UserManagerService'])),_0x306947(0x2,_0x5cf6bc[_0x33b441(0x222)](_0x48728e[_0x33b441(0x1c7)]))],_0x39ae1a);var _0x101312=Object[_0x33b441(0x1e5)],_0xc324f7=(_0x55c5a6,_0x5aedc1,_0x49d673,_0x55f6c6)=>{const _0x2d3047=_0x33b441;for(var _0x33ec8c=_0x55f6c6>0x1?void 0x0:_0x55f6c6?_0x101312(_0x5aedc1,_0x49d673):_0x5aedc1,_0x1c3367=_0x55c5a6[_0x2d3047(0x245)]-0x1,_0x1f5b8d;_0x1c3367>=0x0;_0x1c3367--)(_0x1f5b8d=_0x55c5a6[_0x1c3367])&&(_0x33ec8c=_0x1f5b8d(_0x33ec8c)||_0x33ec8c);return _0x33ec8c;},_0x1f9ad7=(_0x18d2a3,_0x28530e)=>(_0x5ac4db,_0x5e5bc8)=>_0x28530e(_0x5ac4db,_0x5e5bc8,_0x18d2a3);let _0x4083f7=class extends _0x5cf6bc['Disposable']{constructor(_0x48d22d,_0x393bcb){const _0x21ef41=_0x33b441;super(),this[_0x21ef41(0x1fe)]=_0x48d22d,this[_0x21ef41(0x1de)]=_0x393bcb,this[_0x21ef41(0x232)]();}[_0x33b441(0x232)](){const _0x563a32=_0x33b441;this[_0x563a32(0x1fe)][_0x563a32(0x1ed)]=this[_0x563a32(0x1de)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x4083f7=_0xc324f7([_0x1f9ad7(0x0,_0x2d6740[_0x33b441(0x20f)]),_0x1f9ad7(0x1,_0x5cf6bc[_0x33b441(0x222)](_0x39ae1a))],_0x4083f7);var _0x494aed=Object['defineProperty'],_0x2812cf=Object[_0x33b441(0x1e5)],_0x33c565=(_0x343c76,_0x582fea,_0xaccc9c)=>_0x582fea in _0x343c76?_0x494aed(_0x343c76,_0x582fea,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xaccc9c}):_0x343c76[_0x582fea]=_0xaccc9c,_0x52f115=(_0x29aa2a,_0x1a02e8,_0x1687ba,_0x24a02c)=>{const _0x26c486=_0x33b441;for(var _0x48676c=_0x24a02c>0x1?void 0x0:_0x24a02c?_0x2812cf(_0x1a02e8,_0x1687ba):_0x1a02e8,_0x38ff61=_0x29aa2a[_0x26c486(0x245)]-0x1,_0x28b0c0;_0x38ff61>=0x0;_0x38ff61--)(_0x28b0c0=_0x29aa2a[_0x38ff61])&&(_0x48676c=_0x28b0c0(_0x48676c)||_0x48676c);return _0x48676c;},_0x5bddb2=(_0x94c4f0,_0x4619f1)=>(_0x278ce9,_0x402b57)=>_0x4619f1(_0x278ce9,_0x402b57,_0x94c4f0),_0x3f137a=(_0x108b02,_0x5980cd,_0x2715bc)=>_0x33c565(_0x108b02,typeof _0x5980cd!=_0x33b441(0x234)?_0x5980cd+'':_0x5980cd,_0x2715bc);_0x1d2831['UniverThreadCommentDataSourcePlugin']=class extends _0x5cf6bc[_0x33b441(0x241)]{constructor(_0xb2672b=_0x551718,_0x1f49c0,_0x2a86c4){const _0x5f4f9f=_0x33b441;super(),this[_0x5f4f9f(0x24c)]=_0xb2672b,this[_0x5f4f9f(0x1f3)]=_0x1f49c0,this[_0x5f4f9f(0x239)]=_0x2a86c4;const {..._0x338f12}=_0x5cf6bc[_0x5f4f9f(0x227)]({},_0x551718,this['_config']);this[_0x5f4f9f(0x239)][_0x5f4f9f(0x23d)](_0x474631,_0x338f12);}[_0x33b441(0x1e8)](){[[_0x39ae1a],[_0x4083f7],[_0x4dfe2a]]['forEach'](_0x2383c6=>{const _0xefea44=_0x8c07;this[_0xefea44(0x1f3)][_0xefea44(0x1ce)](_0x2383c6);});}[_0x33b441(0x208)](){const _0x3085f9=_0x33b441;this[_0x3085f9(0x1f3)][_0x3085f9(0x211)](_0x4083f7),this['_injector'][_0x3085f9(0x211)](_0x4dfe2a);}},_0x3f137a(_0x1d2831[_0x33b441(0x22c)],'pluginName',_0x24c745),_0x3f137a(_0x1d2831[_0x33b441(0x22c)],_0x33b441(0x24f),_0x5bf3b2['name']),_0x3f137a(_0x1d2831[_0x33b441(0x22c)],_0x33b441(0x23e),_0x5bf3b2[_0x33b441(0x23e)]),_0x1d2831[_0x33b441(0x22c)]=_0x52f115([_0x5cf6bc[_0x33b441(0x243)](_0x3bbdbc[_0x33b441(0x24d)],_0x48728e[_0x33b441(0x228)],_0x186b78[_0x33b441(0x1d0)]),_0x5bddb2(0x1,_0x5cf6bc[_0x33b441(0x222)](_0x5cf6bc[_0x33b441(0x240)])),_0x5bddb2(0x2,_0x5cf6bc['IConfigService'])],_0x1d2831['UniverThreadCommentDataSourcePlugin']),Object[_0x33b441(0x1e7)](_0x1d2831,Symbol[_0x33b441(0x1fb)],{'value':_0x33b441(0x1c5)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.16.1",
3
+ "version": "0.17.0",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.16.1",
49
- "@univerjs/core": "0.16.1",
50
- "@univerjs/network": "0.16.1",
51
- "@univerjs/thread-comment": "0.16.1",
48
+ "@univerjs-pro/collaboration-client": "0.17.0",
49
+ "@univerjs-pro/license": "0.17.0",
50
+ "@univerjs/core": "0.17.0",
52
51
  "@univerjs/protocol": "0.1.48",
53
- "@univerjs/thread-comment-ui": "0.16.1",
54
- "@univerjs-pro/license": "0.16.1"
52
+ "@univerjs/network": "0.17.0",
53
+ "@univerjs/thread-comment-ui": "0.17.0",
54
+ "@univerjs/thread-comment": "0.17.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.9.3",
59
59
  "vite": "^7.3.1",
60
60
  "vitest": "^4.0.18",
61
- "@univerjs-infra/shared": "0.16.1"
61
+ "@univerjs-infra/shared": "0.17.0"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",