@univerjs-pro/thread-comment-datasource 0.8.1-nightly.202506131607 → 0.8.1-nightly.202506151606
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 +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x305715=_0x22ad;(function(_0x510429,_0x265c3b){const _0x28e1e2=_0x22ad,_0x12f58e=_0x510429();while(!![]){try{const _0x2bf443=-parseInt(_0x28e1e2(0x13a))/0x1+-parseInt(_0x28e1e2(0x156))/0x2*(-parseInt(_0x28e1e2(0x109))/0x3)+parseInt(_0x28e1e2(0x166))/0x4*(-parseInt(_0x28e1e2(0x127))/0x5)+parseInt(_0x28e1e2(0x12d))/0x6*(parseInt(_0x28e1e2(0x171))/0x7)+-parseInt(_0x28e1e2(0x10a))/0x8+-parseInt(_0x28e1e2(0x146))/0x9+parseInt(_0x28e1e2(0x12e))/0xa;if(_0x2bf443===_0x265c3b)break;else _0x12f58e['push'](_0x12f58e['shift']());}catch(_0xaa94ca){_0x12f58e['push'](_0x12f58e['shift']());}}}(_0x3509,0x8cdda));Object[_0x305715(0x110)](exports,Symbol[_0x305715(0x168)],{'value':_0x305715(0x12c)});const b=require(_0x305715(0x12b)),T=require(_0x305715(0x10f)),c=require(_0x305715(0x11d)),j=require(_0x305715(0x16c)),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require(_0x305715(0x128)),U=_0x305715(0x138);var I=(_0x50af66=>(_0x50af66[_0x50af66[_0x305715(0x14b)]=0x0]=_0x305715(0x14b),_0x50af66[_0x50af66['Solved']=0x1]=_0x305715(0x145),_0x50af66[_0x50af66[_0x305715(0x10e)]=-0x1]=_0x305715(0x10e),_0x50af66))(I||{}),v=(_0x5ad525=>(_0x5ad525[_0x5ad525[_0x305715(0x122)]=0x0]=_0x305715(0x122),_0x5ad525[_0x5ad525[_0x305715(0xfe)]=0x1]=_0x305715(0xfe),_0x5ad525[_0x5ad525[_0x305715(0x14d)]=0x2]=_0x305715(0x14d),_0x5ad525[_0x5ad525[_0x305715(0x136)]=0x3]=_0x305715(0x136),_0x5ad525[_0x5ad525[_0x305715(0x16d)]=0x4]='Delete',_0x5ad525[_0x5ad525[_0x305715(0x164)]=0x5]=_0x305715(0x164),_0x5ad525[_0x5ad525[_0x305715(0x10e)]=-0x1]=_0x305715(0x10e),_0x5ad525))(v||{});const f=_0x18eca4=>c[_0x305715(0x111)](new Date(+_0x18eca4))[_0x305715(0x102)](_0x305715(0x15b)),R=async(_0x3a68a7,_0x59f308)=>{const _0x5d032e=_0x305715,_0x510f14=_0x3a68a7['get'](c[_0x5d032e(0x11a)]),_0xe71545=_0x3a68a7[_0x5d032e(0x131)](P[_0x5d032e(0x10b)]);_0x59f308['forEach'](_0x161f7a=>{const _0xb7ef7e=_0x5d032e;_0x510f14[_0xb7ef7e(0x106)](_0x161f7a)&&_0x59f308['delete'](_0x161f7a);}),_0x59f308[_0x5d032e(0x13e)]&&(await _0xe71545['get'](_0x5d032e(0x108),{'params':{'userIDs':[..._0x59f308]}}))['body'][_0x5d032e(0x11c)][_0x5d032e(0x14e)](_0x11ae0c=>{const _0x55812f=_0x5d032e;_0x11ae0c&&_0x510f14[_0x55812f(0x125)](_0x11ae0c);});};function _0x22ad(_0x35b97e,_0x21bd82){const _0x35094f=_0x3509();return _0x22ad=function(_0x22adb9,_0x4fb49b){_0x22adb9=_0x22adb9-0xfb;let _0x138fd2=_0x35094f[_0x22adb9];return _0x138fd2;},_0x22ad(_0x35b97e,_0x21bd82);}var $=Object['getOwnPropertyDescriptor'],E=(_0x2a5ac6,_0x5b0abf,_0x2e96a5,_0x156ce2)=>{const _0xb99e73=_0x305715;for(var _0x1f2640=_0x156ce2>0x1?void 0x0:_0x156ce2?$(_0x5b0abf,_0x2e96a5):_0x5b0abf,_0x473849=_0x2a5ac6[_0xb99e73(0x15c)]-0x1,_0x1a30cc;_0x473849>=0x0;_0x473849--)(_0x1a30cc=_0x2a5ac6[_0x473849])&&(_0x1f2640=_0x1a30cc(_0x1f2640)||_0x1f2640);return _0x1f2640;},S=(_0x1c55eb,_0x1d79d5)=>(_0x30e97e,_0xe727a0)=>_0x1d79d5(_0x30e97e,_0xe727a0,_0x1c55eb);let p=class extends c['Disposable']{constructor(_0x382341,_0x1e72a1,_0x1cc743,_0xff71bf){const _0x5e3828=_0x305715;super(),this[_0x5e3828(0x115)]=_0x382341,this[_0x5e3828(0x158)]=_0x1e72a1,this[_0x5e3828(0x161)]=_0x1cc743,this['_injector']=_0xff71bf,this['_init'](),this[_0x5e3828(0x16a)]();}[_0x305715(0x16a)](){const _0x3ee5ec=_0x305715;this['disposeWithMe'](this[_0x3ee5ec(0x158)][_0x3ee5ec(0x172)][_0x3ee5ec(0x167)](w[_0x3ee5ec(0x15f)](0x10))[_0x3ee5ec(0x157)](_0x5d4751=>{const _0x3de0ae=_0x3ee5ec,_0x113ce9=new Set();_0x5d4751[_0x3de0ae(0x14e)](_0x3f1a86=>{const _0x128256=_0x3de0ae;switch(_0x3f1a86[_0x128256(0x155)]){case'add':{const _0x4fdbf4=_0x3f1a86['payload'][_0x128256(0x13b)];_0x113ce9[_0x128256(0x151)](_0x4fdbf4);break;}}}),R(this[_0x3de0ae(0x16b)],_0x113ce9);}));}[_0x305715(0x133)](){const _0x1b397b=_0x305715;this['disposeWithMe'](this[_0x1b397b(0x115)][_0x1b397b(0x172)]['subscribe'](async _0x2961b5=>{const _0x15ca47=_0x1b397b;var _0x904583,_0x4cb65e,_0x527567,_0x18c36f;const _0x22f902=(_0x904583=this['_threadCommentModel']['getUnit'](_0x2961b5['unitId'])[_0x15ca47(0x120)](_0x1937f7=>_0x1937f7[_0x15ca47(0x139)]===_0x2961b5['threadId']))==null?void 0x0:_0x904583['root'];if(!_0x22f902)return;const {unitId:_0x4ae377,subUnitId:_0x1fd22e}=_0x22f902;switch(_0x2961b5[_0x15ca47(0x116)]&&this[_0x15ca47(0x161)][_0x15ca47(0x125)](_0x2961b5[_0x15ca47(0x116)]),_0x2961b5[_0x15ca47(0x155)]){case v[_0x15ca47(0xfe)]:break;case v[_0x15ca47(0x14d)]:{this['_threadCommentModel'][_0x15ca47(0x112)](_0x4ae377,_0x1fd22e,{'unitId':_0x4ae377,'subUnitId':_0x1fd22e,'ref':'','id':_0x2961b5['replyId'],'dT':f(+_0x2961b5[_0x15ca47(0xfc)]),'threadId':_0x2961b5[_0x15ca47(0x139)],'personId':(_0x527567=(_0x4cb65e=_0x2961b5['user'])==null?void 0x0:_0x4cb65e[_0x15ca47(0x113)])!=null?_0x527567:_0x2961b5[_0x15ca47(0x10d)],'text':JSON[_0x15ca47(0x14f)](_0x2961b5[_0x15ca47(0x174)]),'parentId':_0x22f902['id']});break;}case v[_0x15ca47(0x16d)]:{const _0x298a2d=this[_0x15ca47(0x158)][_0x15ca47(0x129)](_0x4ae377,_0x1fd22e,_0x2961b5[_0x15ca47(0x135)]);_0x298a2d&&_0x298a2d['parentId']&&this[_0x15ca47(0x158)][_0x15ca47(0x132)](_0x4ae377,_0x1fd22e,_0x2961b5[_0x15ca47(0x135)]);break;}case v[_0x15ca47(0x136)]:{this['_threadCommentModel'][_0x15ca47(0x104)](_0x4ae377,_0x1fd22e,{'commentId':_0x2961b5['replyId'],'text':JSON[_0x15ca47(0x14f)](_0x2961b5[_0x15ca47(0x174)])});break;}case v[_0x15ca47(0x164)]:{const _0x378c90=(_0x18c36f=this[_0x15ca47(0x158)][_0x15ca47(0x103)](_0x2961b5[_0x15ca47(0x107)])[_0x15ca47(0x120)](_0x2a7af2=>_0x2a7af2[_0x15ca47(0x139)]===_0x2961b5[_0x15ca47(0x139)]))==null?void 0x0:_0x18c36f['root'];_0x378c90&&this[_0x15ca47(0x158)][_0x15ca47(0x101)](_0x4ae377,_0x1fd22e,_0x378c90['id'],_0x2961b5[_0x15ca47(0x14c)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x305715(0x13d)](b[_0x305715(0x123)])),S(0x1,c[_0x305715(0x13d)](M[_0x305715(0x105)])),S(0x2,c[_0x305715(0x13d)](c[_0x305715(0x11a)])),S(0x3,c['Inject'](c[_0x305715(0x175)]))],p);const q=_0x305715(0x13c),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x189662,_0x56c47a,_0x44bb80,_0xe69bdc)=>{for(var _0x2b55cc=_0xe69bdc>0x1?void 0x0:_0xe69bdc?A(_0x56c47a,_0x44bb80):_0x56c47a,_0xc80569=_0x189662['length']-0x1,_0x1042ea;_0xc80569>=0x0;_0xc80569--)(_0x1042ea=_0x189662[_0xc80569])&&(_0x2b55cc=_0x1042ea(_0x2b55cc)||_0x2b55cc);return _0x2b55cc;},_=(_0x5457fa,_0x2c3fac)=>(_0x5a58f2,_0x19f242)=>_0x2c3fac(_0x5a58f2,_0x19f242,_0x5457fa);function Y(_0x48cb4f,_0x5d56e0){const _0x417ec5=_0x305715,_0x1f5803=_0x48cb4f[_0x417ec5(0x11b)][0x0];return{..._0x5d56e0,'id':_0x1f5803['replyId'],'resolved':_0x48cb4f['solved']===0x1,'dT':f(_0x1f5803['createTimestamp']),'personId':_0x1f5803[_0x417ec5(0x10d)],'threadId':_0x1f5803['threadId']};}function G(_0x3321d1,_0x1f4fbb,_0x3a9e2b){const _0x456dfa=_0x305715;var _0x5b7e20,_0x291ea5;if(((_0x291ea5=(_0x5b7e20=_0x3321d1==null?void 0x0:_0x3321d1[_0x456dfa(0x11b)])==null?void 0x0:_0x5b7e20[_0x456dfa(0x15c)])!=null?_0x291ea5:0x0)>0x0){const _0x53c7a7=(_0x4223fe,_0x5d2178)=>({'id':_0x4223fe[_0x456dfa(0x135)],'threadId':_0x4223fe[_0x456dfa(0x139)],'dT':f(_0x4223fe['createTimestamp']),'personId':_0x4223fe[_0x456dfa(0x10d)],'resolved':_0x3321d1['solved']===I[_0x456dfa(0x145)],'unitId':_0x1f4fbb,'subUnitId':_0x3a9e2b,'text':JSON[_0x456dfa(0x14f)](_0x4223fe[_0x456dfa(0x174)]),'parentId':_0x5d2178}),_0x5a84cd=_0x53c7a7(_0x3321d1[_0x456dfa(0x11b)][0x0]);return{..._0x5a84cd,'children':_0x3321d1[_0x456dfa(0x11b)][_0x456dfa(0x119)](0x1)[_0x456dfa(0x114)](_0x2c53ba=>_0x53c7a7(_0x2c53ba,_0x5a84cd['id']))};}return null;}let g=class{constructor(_0x33aeea,_0x395f31,_0x114bc6,_0x3e6838){const _0x53d8a5=_0x305715;this['_httpService']=_0x33aeea,this[_0x53d8a5(0x161)]=_0x395f31,this[_0x53d8a5(0x137)]=_0x114bc6,this['_injector']=_0x3e6838;}async['addComment'](_0x1a895a){const _0x492d2a=_0x305715;var _0x4c66c0,_0x38df20;const {parentId:_0x3a42ae,unitId:_0x563f86,text:_0xe36c25,threadId:_0x338474}=_0x1a895a,_0x2fce57=(_0x38df20=(_0x4c66c0=_0xe36c25['customRanges'])==null?void 0x0:_0x4c66c0[_0x492d2a(0x124)](_0x15451b=>_0x15451b['rangeType']===c[_0x492d2a(0x126)]['COMMENT'])[_0x492d2a(0x114)](_0x5c44cb=>_0x5c44cb[_0x492d2a(0x152)]))!=null?_0x38df20:[],_0x1558e7=JSON[_0x492d2a(0x144)](_0xe36c25),_0x5e63fc=(await this[_0x492d2a(0x137)][_0x492d2a(0x150)](_0x563f86))[_0x492d2a(0x143)]();if(_0x3a42ae){const _0x47130d={'memberId':_0x5e63fc,'unitId':_0x563f86,'content':_0x1558e7,'mention':_0x2fce57,'threadId':_0x338474},_0x4b2ebf=(await this[_0x492d2a(0x12f)]['post'](_0x492d2a(0x16e)+_0x563f86+'/reply',{'body':_0x47130d}))[_0x492d2a(0x100)][_0x492d2a(0x148)];return{..._0x1a895a,'id':_0x4b2ebf['replyId'],'dT':c[_0x492d2a(0x111)](+_0x4b2ebf[_0x492d2a(0xfc)])[_0x492d2a(0x102)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x4b2ebf['userId']};}else{const _0x295126={'memberId':_0x5e63fc,'unitId':_0x563f86,'content':_0x1558e7,'mention':_0x2fce57},_0x34959b=await this[_0x492d2a(0x12f)][_0x492d2a(0x147)]('/universer-api/comment/unit/'+_0x563f86+_0x492d2a(0x165),{'body':_0x295126});return Y(_0x34959b[_0x492d2a(0x100)]['comment'],_0x1a895a);}}async[_0x305715(0x104)](_0x422412){const _0x144d7b=_0x305715;var _0x5cfb43,_0x126317;const {text:_0x278477,unitId:_0x1a214e}=_0x422412,_0x43744b=(_0x126317=(_0x5cfb43=_0x278477[_0x144d7b(0x121)])==null?void 0x0:_0x5cfb43[_0x144d7b(0x124)](_0x57dec4=>_0x57dec4['rangeType']===c['CustomRangeType'][_0x144d7b(0x176)])[_0x144d7b(0x114)](_0x3c093c=>_0x3c093c[_0x144d7b(0x152)]))!=null?_0x126317:[],_0x1219c2=JSON[_0x144d7b(0x144)](_0x278477),_0x348632=_0x422412['threadId'],_0x3ff232=_0x422412['id'],_0x2f90e7={'memberId':(await this[_0x144d7b(0x137)][_0x144d7b(0x150)](_0x1a214e))[_0x144d7b(0x143)](),'unitId':_0x1a214e,'threadId':_0x348632,'mention':_0x43744b,'content':_0x1219c2,'replyId':_0x3ff232},_0x1eb70e=await this[_0x144d7b(0x12f)][_0x144d7b(0x147)](_0x144d7b(0x16e)+_0x1a214e+_0x144d7b(0x15d),{'body':_0x2f90e7});return!_0x1eb70e[_0x144d7b(0x100)][_0x144d7b(0x14a)]||_0x1eb70e[_0x144d7b(0x100)]['error']['code']===0x1;}async['resolveComment'](_0x2f63a6){const _0x186f4c=_0x305715,{unitId:_0x47e20e}=_0x2f63a6,_0x46114d=_0x2f63a6['threadId'],_0x4a3c39={'memberId':this[_0x186f4c(0x161)]['getCurrentUser']()['userID'],'unitId':_0x47e20e,'threadId':_0x46114d,'solved':_0x2f63a6['resolved']?I[_0x186f4c(0x145)]:I[_0x186f4c(0x14b)]},_0x344e6f=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x47e20e+_0x186f4c(0x153),{'body':_0x4a3c39});return!_0x344e6f[_0x186f4c(0x100)]['error']||_0x344e6f[_0x186f4c(0x100)][_0x186f4c(0x14a)]['code']===0x1;}async[_0x305715(0x132)](_0x2e5e49,_0x3ccb40,_0x32cb65,_0x769d67){const _0x4d0b1b=_0x305715,_0x50b278={'memberId':(await this[_0x4d0b1b(0x137)]['requireSession'](_0x2e5e49))[_0x4d0b1b(0x143)](),'threadId':_0x32cb65,'replyId':_0x769d67,'unitId':_0x2e5e49},_0x31c2c3=await this['_httpService'][_0x4d0b1b(0x147)]('/universer-api/comment/unit/'+_0x2e5e49+_0x4d0b1b(0x10c),{'body':_0x50b278});return!_0x31c2c3[_0x4d0b1b(0x100)][_0x4d0b1b(0x14a)]||_0x31c2c3[_0x4d0b1b(0x100)][_0x4d0b1b(0x14a)][_0x4d0b1b(0x177)]===0x1;}async['listComments'](_0x44c85a,_0x567a56,_0x26ab47){const _0x26c7d2=_0x305715,_0x493d0b={'unitId':_0x44c85a,'threadId':_0x26ab47},_0x70c137=await this[_0x26c7d2(0x12f)]['post']('/universer-api/comment/unit/'+_0x44c85a+_0x26c7d2(0x15a),{'body':_0x493d0b}),_0x4ead3f=_0x26ab47[_0x26c7d2(0x114)](_0x4c3ea6=>G(_0x70c137[_0x26c7d2(0x100)][_0x26c7d2(0x154)][_0x4c3ea6],_0x44c85a,_0x567a56))['filter'](Boolean);return Object['values'](_0x70c137[_0x26c7d2(0x100)][_0x26c7d2(0x11c)])[_0x26c7d2(0x14e)](_0x2115d6=>{const _0x2ab220=_0x26c7d2;this[_0x2ab220(0x161)]['addUser'](_0x2115d6);}),_0x4ead3f;}[_0x305715(0x134)](_0x44e9b6){const _0x2ad4ce=_0x305715;return{'id':_0x44e9b6['id'],'threadId':_0x44e9b6['threadId'],'ref':_0x44e9b6[_0x2ad4ce(0x169)]};}};g=x([_(0x0,c[_0x305715(0x13d)](P[_0x305715(0x10b)])),_(0x1,c['Inject'](c[_0x305715(0x11a)])),_(0x2,c[_0x305715(0x13d)](b[_0x305715(0x162)])),_(0x3,c['Inject'](c[_0x305715(0x175)]))],g);function _0x3509(){const _0x4321d9=['unitId','/universer-api/user/list','3NNCTQk','7675992OcSvts','HTTPService','/delete','userId','UNRECOGNIZED','@univerjs-pro/license','defineProperty','dayjs','addComment','userID','map','_commentService','user','Disposable','_configService','slice','UserManagerService','replies','users','@univerjs/core','_threadCommentDataSourceService','UniverInstanceType','find','customRanges','Unknown','CommentService','filter','addUser','CustomRangeType','10ftugHT','@univerjs/network','getComment','getOwnPropertyDescriptor','@univerjs-pro/collaboration-client','Module','6760986iaoMsr','19271430roQhIq','_httpService','_threadCommentDataSource','get','deleteComment','_init','saveCommentToSnapshot','replyId','Edit','_sessionService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','threadId','726505lpNHxf','personId','thread-comment-data-source.config','Inject','size','UniverThreadCommentDataSourcePlugin','UNIVER_UNKNOWN','UniverThreadCommentUIPlugin','pluginName','getMemberID','stringify','Solved','274725ihanHJ','post','reply','IConfigService','error','OpenOrReOpen','solved','Reply','forEach','parse','requireSession','add','rangeId','/solved','comments','type','610394CBpGjB','subscribe','_threadCommentModel','syncUpdateMutationToColla','/list','YYYY/MM/DD\x20HH:mm','length','/edit','UniverLicensePlugin','bufferTime','onStarting','_userService','CollaborationSessionService','setConfig','Solve','/add','2131312wBgWum','pipe','toStringTag','ref','_initUserSync','_injector','@univerjs/thread-comment-ui','Delete','/universer-api/comment/unit/','dataSource','symbol','7yjjmth','commentUpdate$','DependentOn','content','Injector','COMMENT','code','merge','createTimestamp','_config','Add','onReady','body','resolveComment','format','getUnit','updateComment','ThreadCommentModel','getUser'];_0x3509=function(){return _0x4321d9;};return _0x3509();}var H=Object['getOwnPropertyDescriptor'],J=(_0x24da85,_0x8d2f53,_0x41ccad,_0x51fb9c)=>{for(var _0x3b1a1f=_0x51fb9c>0x1?void 0x0:_0x51fb9c?H(_0x8d2f53,_0x41ccad):_0x8d2f53,_0x5182eb=_0x24da85['length']-0x1,_0x42465a;_0x5182eb>=0x0;_0x5182eb--)(_0x42465a=_0x24da85[_0x5182eb])&&(_0x3b1a1f=_0x42465a(_0x3b1a1f)||_0x3b1a1f);return _0x3b1a1f;},y=(_0x10c2ab,_0x5772a4)=>(_0x5f2d79,_0x48b74d)=>_0x5772a4(_0x5f2d79,_0x48b74d,_0x10c2ab);let C=class extends c[_0x305715(0x117)]{constructor(_0xf51065,_0x2c2ea6){const _0x4c0120=_0x305715;super(),this['_threadCommentDataSourceService']=_0xf51065,this[_0x4c0120(0x130)]=_0x2c2ea6,this['_initDataSource']();}['_initDataSource'](){const _0x442137=_0x305715;this[_0x442137(0x11e)][_0x442137(0x16f)]=this['_threadCommentDataSource'],this[_0x442137(0x11e)][_0x442137(0x159)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](g))],C);var F=Object['defineProperty'],L=Object[_0x305715(0x12a)],Z=(_0x29b228,_0x4b517e,_0x464b6e)=>_0x4b517e in _0x29b228?F(_0x29b228,_0x4b517e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x464b6e}):_0x29b228[_0x4b517e]=_0x464b6e,W=(_0xe6ae96,_0x49e246,_0x19f50b,_0x4efdac)=>{for(var _0x2a9490=_0x4efdac>0x1?void 0x0:_0x4efdac?L(_0x49e246,_0x19f50b):_0x49e246,_0x338fae=_0xe6ae96['length']-0x1,_0x2365c6;_0x338fae>=0x0;_0x338fae--)(_0x2365c6=_0xe6ae96[_0x338fae])&&(_0x2a9490=_0x2365c6(_0x2a9490)||_0x2a9490);return _0x2a9490;},O=(_0xc0d520,_0x2e9158)=>(_0x4b88b9,_0x40885c)=>_0x2e9158(_0x4b88b9,_0x40885c,_0xc0d520),N=(_0x2b6979,_0x5cd868,_0x472b26)=>Z(_0x2b6979,typeof _0x5cd868!=_0x305715(0x170)?_0x5cd868+'':_0x5cd868,_0x472b26);exports['UniverThreadCommentDataSourcePlugin']=class extends c['Plugin']{constructor(_0x3c057a=D,_0x88d06a,_0x462f09){const _0xd0ab44=_0x305715;super(),this[_0xd0ab44(0xfd)]=_0x3c057a,this[_0xd0ab44(0x16b)]=_0x88d06a,this['_configService']=_0x462f09;const {..._0x218f81}=c[_0xd0ab44(0xfb)]({},D,this['_config']);this[_0xd0ab44(0x118)][_0xd0ab44(0x163)](q,_0x218f81);}[_0x305715(0x160)](){const _0x4873f9=_0x305715;[[g],[C],[p]][_0x4873f9(0x14e)](_0x281897=>{const _0x3f890d=_0x4873f9;this['_injector'][_0x3f890d(0x151)](_0x281897);});}[_0x305715(0xff)](){const _0x3fb1e1=_0x305715;this[_0x3fb1e1(0x16b)][_0x3fb1e1(0x131)](C),this[_0x3fb1e1(0x16b)][_0x3fb1e1(0x131)](p);}},N(exports[_0x305715(0x13f)],_0x305715(0x142),U),N(exports[_0x305715(0x13f)],'type',c[_0x305715(0x11f)][_0x305715(0x140)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x305715(0x173)](j[_0x305715(0x141)],b['UniverCollaborationClientPlugin'],T[_0x305715(0x15e)]),O(0x1,c['Inject'](c[_0x305715(0x175)])),O(0x2,c[_0x305715(0x149)])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';const _0x4273bd=_0x2cbf;(function(_0x29cc5b,_0x2f58a2){const _0x4d14dd=_0x2cbf,_0x2a8a56=_0x29cc5b();while(!![]){try{const _0x454db6=parseInt(_0x4d14dd(0x15a))/0x1+parseInt(_0x4d14dd(0x195))/0x2*(-parseInt(_0x4d14dd(0x14a))/0x3)+-parseInt(_0x4d14dd(0x172))/0x4+-parseInt(_0x4d14dd(0x13f))/0x5+-parseInt(_0x4d14dd(0x19c))/0x6*(-parseInt(_0x4d14dd(0x15e))/0x7)+parseInt(_0x4d14dd(0x17f))/0x8*(-parseInt(_0x4d14dd(0x148))/0x9)+parseInt(_0x4d14dd(0x143))/0xa*(parseInt(_0x4d14dd(0x197))/0xb);if(_0x454db6===_0x2f58a2)break;else _0x2a8a56['push'](_0x2a8a56['shift']());}catch(_0x5b8a91){_0x2a8a56['push'](_0x2a8a56['shift']());}}}(_0x17a9,0xee943));Object['defineProperty'](exports,Symbol[_0x4273bd(0x184)],{'value':_0x4273bd(0x160)});const b=require(_0x4273bd(0x17a)),T=require(_0x4273bd(0x1a0)),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require(_0x4273bd(0x193)),w=require('rxjs'),P=require(_0x4273bd(0x18b)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xa0d434=>(_0xa0d434[_0xa0d434[_0x4273bd(0x192)]=0x0]=_0x4273bd(0x192),_0xa0d434[_0xa0d434[_0x4273bd(0x1b9)]=0x1]=_0x4273bd(0x1b9),_0xa0d434[_0xa0d434[_0x4273bd(0x163)]=-0x1]=_0x4273bd(0x163),_0xa0d434))(I||{}),v=(_0x84d24e=>(_0x84d24e[_0x84d24e[_0x4273bd(0x173)]=0x0]=_0x4273bd(0x173),_0x84d24e[_0x84d24e[_0x4273bd(0x142)]=0x1]=_0x4273bd(0x142),_0x84d24e[_0x84d24e[_0x4273bd(0x1b4)]=0x2]=_0x4273bd(0x1b4),_0x84d24e[_0x84d24e[_0x4273bd(0x169)]=0x3]=_0x4273bd(0x169),_0x84d24e[_0x84d24e['Delete']=0x4]=_0x4273bd(0x151),_0x84d24e[_0x84d24e[_0x4273bd(0x13d)]=0x5]=_0x4273bd(0x13d),_0x84d24e[_0x84d24e[_0x4273bd(0x163)]=-0x1]=_0x4273bd(0x163),_0x84d24e))(v||{});function _0x17a9(){const _0x20b6cc=['CommentService','replies','OpenOrReOpen','@univerjs/thread-comment','threadId','2PXpWfn','/list','6167953iGjqGb','unitId','updateComment','/universer-api/comment/unit/','type','326958QOjHVX','thread-comment-data-source.config','size','CustomRangeType','@univerjs-pro/license','pluginName','add','post','listComments','content','length','UniverCollaborationClientPlugin','stringify','slice','_threadCommentModel','defineProperty','_threadCommentDataSource','format','addUser','/add','userID','UniverInstanceType','replyId','COMMENT','Reply','IThreadCommentDataSourceService','rangeId','delete','getOwnPropertyDescriptor','Solved','deleteComment','getComment','/reply','Solve','addComment','1633630IQHajo','user','customRanges','Add','20pTyODt','dataSource','Inject','reply','values','27eahPCu','merge','4257717NAMSyC','resolveComment','filter','UniverThreadCommentUIPlugin','_configService','Disposable','saveCommentToSnapshot','Delete','getMemberID','_initUserSync','parse','UserManagerService','onStarting','Injector','YYYY/MM/DD\x20HH:mm','root','1371983ZtqkGd','personId','_threadCommentDataSourceService','HTTPService','154tMbmhp','_injector','Module','userId','forEach','UNRECOGNIZED','map','/solved','_userService','comments','/edit','Edit','_sessionService','solved','find','bufferTime','_init','dayjs','setConfig','getUnit','3508600eoTWEO','Unknown','ref','body','createTimestamp','getUser','symbol','subscribe','@univerjs-pro/collaboration-client','disposeWithMe','_commentService','users','code','245176TtbPNs','commentUpdate$','_initDataSource','comment','/universer-api/user/list','toStringTag','/delete','requireSession','error','UniverThreadCommentDataSourcePlugin','getCurrentUser','pipe','@univerjs/network','onReady','_httpService','CollaborationSessionService','get'];_0x17a9=function(){return _0x20b6cc;};return _0x17a9();}function _0x2cbf(_0x287195,_0x38ddd4){const _0x17a997=_0x17a9();return _0x2cbf=function(_0x2cbfa2,_0x2aa9e7){_0x2cbfa2=_0x2cbfa2-0x13a;let _0x1fb4e6=_0x17a997[_0x2cbfa2];return _0x1fb4e6;},_0x2cbf(_0x287195,_0x38ddd4);}const f=_0x2b3911=>c[_0x4273bd(0x16f)](new Date(+_0x2b3911))[_0x4273bd(0x1ad)](_0x4273bd(0x158)),R=async(_0x230799,_0x4d9cba)=>{const _0x36fb89=_0x4273bd,_0x19ae31=_0x230799[_0x36fb89(0x18f)](c[_0x36fb89(0x155)]),_0x11fed7=_0x230799[_0x36fb89(0x18f)](P[_0x36fb89(0x15d)]);_0x4d9cba[_0x36fb89(0x162)](_0x47e4a2=>{const _0x2eac18=_0x36fb89;_0x19ae31[_0x2eac18(0x177)](_0x47e4a2)&&_0x4d9cba[_0x2eac18(0x1b7)](_0x47e4a2);}),_0x4d9cba[_0x36fb89(0x19e)]&&(await _0x11fed7[_0x36fb89(0x18f)](_0x36fb89(0x183),{'params':{'userIDs':[..._0x4d9cba]}}))[_0x36fb89(0x175)]['users']['forEach'](_0x2f5f93=>{const _0x3a38e1=_0x36fb89;_0x2f5f93&&_0x19ae31[_0x3a38e1(0x1ae)](_0x2f5f93);});};var $=Object[_0x4273bd(0x1b8)],E=(_0x4bf83a,_0x2a48c5,_0x42bc98,_0x2fc269)=>{const _0x3a769d=_0x4273bd;for(var _0xafc864=_0x2fc269>0x1?void 0x0:_0x2fc269?$(_0x2a48c5,_0x42bc98):_0x2a48c5,_0x57594f=_0x4bf83a[_0x3a769d(0x1a6)]-0x1,_0x541465;_0x57594f>=0x0;_0x57594f--)(_0x541465=_0x4bf83a[_0x57594f])&&(_0xafc864=_0x541465(_0xafc864)||_0xafc864);return _0xafc864;},S=(_0x44fc3f,_0x4852ba)=>(_0x19cdcf,_0x33ab5b)=>_0x4852ba(_0x19cdcf,_0x33ab5b,_0x44fc3f);let p=class extends c['Disposable']{constructor(_0x264886,_0x1061f3,_0x48eb89,_0x1df609){const _0x57795b=_0x4273bd;super(),this[_0x57795b(0x17c)]=_0x264886,this[_0x57795b(0x1aa)]=_0x1061f3,this['_userService']=_0x48eb89,this['_injector']=_0x1df609,this[_0x57795b(0x16e)](),this['_initUserSync']();}[_0x4273bd(0x153)](){const _0x2b11ca=_0x4273bd;this['disposeWithMe'](this[_0x2b11ca(0x1aa)][_0x2b11ca(0x180)][_0x2b11ca(0x18a)](w[_0x2b11ca(0x16d)](0x10))[_0x2b11ca(0x179)](_0x115cd3=>{const _0x35e97a=_0x2b11ca,_0x2a8831=new Set();_0x115cd3[_0x35e97a(0x162)](_0x532699=>{const _0x4e0ff6=_0x35e97a;switch(_0x532699[_0x4e0ff6(0x19b)]){case _0x4e0ff6(0x1a2):{const _0x44ffd3=_0x532699['payload'][_0x4e0ff6(0x15b)];_0x2a8831[_0x4e0ff6(0x1a2)](_0x44ffd3);break;}}}),R(this[_0x35e97a(0x15f)],_0x2a8831);}));}[_0x4273bd(0x16e)](){const _0xd0d3e1=_0x4273bd;this[_0xd0d3e1(0x17b)](this[_0xd0d3e1(0x17c)][_0xd0d3e1(0x180)][_0xd0d3e1(0x179)](async _0x19d04a=>{const _0x74aaba=_0xd0d3e1;var _0x1149c7,_0x3553ea,_0x1d705f,_0x5480a4;const _0x37be08=(_0x1149c7=this[_0x74aaba(0x1aa)][_0x74aaba(0x171)](_0x19d04a[_0x74aaba(0x198)])[_0x74aaba(0x16c)](_0x5d3c96=>_0x5d3c96[_0x74aaba(0x194)]===_0x19d04a[_0x74aaba(0x194)]))==null?void 0x0:_0x1149c7[_0x74aaba(0x159)];if(!_0x37be08)return;const {unitId:_0x1a8772,subUnitId:_0x18443a}=_0x37be08;switch(_0x19d04a[_0x74aaba(0x140)]&&this[_0x74aaba(0x166)][_0x74aaba(0x1ae)](_0x19d04a[_0x74aaba(0x140)]),_0x19d04a[_0x74aaba(0x19b)]){case v['Add']:break;case v[_0x74aaba(0x1b4)]:{this['_threadCommentModel'][_0x74aaba(0x13e)](_0x1a8772,_0x18443a,{'unitId':_0x1a8772,'subUnitId':_0x18443a,'ref':'','id':_0x19d04a[_0x74aaba(0x1b2)],'dT':f(+_0x19d04a['createTimestamp']),'threadId':_0x19d04a['threadId'],'personId':(_0x1d705f=(_0x3553ea=_0x19d04a[_0x74aaba(0x140)])==null?void 0x0:_0x3553ea[_0x74aaba(0x1b0)])!=null?_0x1d705f:_0x19d04a[_0x74aaba(0x161)],'text':JSON['parse'](_0x19d04a[_0x74aaba(0x1a5)]),'parentId':_0x37be08['id']});break;}case v[_0x74aaba(0x151)]:{const _0x3c6d6a=this['_threadCommentModel'][_0x74aaba(0x13b)](_0x1a8772,_0x18443a,_0x19d04a[_0x74aaba(0x1b2)]);_0x3c6d6a&&_0x3c6d6a['parentId']&&this[_0x74aaba(0x1aa)][_0x74aaba(0x13a)](_0x1a8772,_0x18443a,_0x19d04a[_0x74aaba(0x1b2)]);break;}case v[_0x74aaba(0x169)]:{this[_0x74aaba(0x1aa)][_0x74aaba(0x199)](_0x1a8772,_0x18443a,{'commentId':_0x19d04a[_0x74aaba(0x1b2)],'text':JSON[_0x74aaba(0x154)](_0x19d04a[_0x74aaba(0x1a5)])});break;}case v[_0x74aaba(0x13d)]:{const _0x479c2a=(_0x5480a4=this[_0x74aaba(0x1aa)][_0x74aaba(0x171)](_0x19d04a[_0x74aaba(0x198)])[_0x74aaba(0x16c)](_0x4bea40=>_0x4bea40[_0x74aaba(0x194)]===_0x19d04a['threadId']))==null?void 0x0:_0x5480a4[_0x74aaba(0x159)];_0x479c2a&&this[_0x74aaba(0x1aa)][_0x74aaba(0x14b)](_0x1a8772,_0x18443a,_0x479c2a['id'],_0x19d04a[_0x74aaba(0x16b)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x4273bd(0x145)](b[_0x4273bd(0x190)])),S(0x1,c['Inject'](M['ThreadCommentModel'])),S(0x2,c[_0x4273bd(0x145)](c[_0x4273bd(0x155)])),S(0x3,c[_0x4273bd(0x145)](c[_0x4273bd(0x157)]))],p);const q=_0x4273bd(0x19d),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x468ad3,_0x392c31,_0x274bea,_0x32493d)=>{const _0x2a0b14=_0x4273bd;for(var _0x6fe643=_0x32493d>0x1?void 0x0:_0x32493d?A(_0x392c31,_0x274bea):_0x392c31,_0x2eebe1=_0x468ad3[_0x2a0b14(0x1a6)]-0x1,_0x22217f;_0x2eebe1>=0x0;_0x2eebe1--)(_0x22217f=_0x468ad3[_0x2eebe1])&&(_0x6fe643=_0x22217f(_0x6fe643)||_0x6fe643);return _0x6fe643;},_=(_0x5a1818,_0x13defc)=>(_0x3ae528,_0xa1c54c)=>_0x13defc(_0x3ae528,_0xa1c54c,_0x5a1818);function Y(_0x5bc337,_0x5d4108){const _0x44a02f=_0x4273bd,_0xf1f264=_0x5bc337[_0x44a02f(0x191)][0x0];return{..._0x5d4108,'id':_0xf1f264[_0x44a02f(0x1b2)],'resolved':_0x5bc337['solved']===0x1,'dT':f(_0xf1f264[_0x44a02f(0x176)]),'personId':_0xf1f264[_0x44a02f(0x161)],'threadId':_0xf1f264[_0x44a02f(0x194)]};}function G(_0x23e508,_0xad24cd,_0x37a589){const _0x2b55ef=_0x4273bd;var _0x12cd8b,_0x17fead;if(((_0x17fead=(_0x12cd8b=_0x23e508==null?void 0x0:_0x23e508[_0x2b55ef(0x191)])==null?void 0x0:_0x12cd8b['length'])!=null?_0x17fead:0x0)>0x0){const _0x593c7a=(_0x58b718,_0x7d408b)=>({'id':_0x58b718[_0x2b55ef(0x1b2)],'threadId':_0x58b718['threadId'],'dT':f(_0x58b718[_0x2b55ef(0x176)]),'personId':_0x58b718[_0x2b55ef(0x161)],'resolved':_0x23e508[_0x2b55ef(0x16b)]===I[_0x2b55ef(0x1b9)],'unitId':_0xad24cd,'subUnitId':_0x37a589,'text':JSON[_0x2b55ef(0x154)](_0x58b718[_0x2b55ef(0x1a5)]),'parentId':_0x7d408b}),_0x8b9e48=_0x593c7a(_0x23e508[_0x2b55ef(0x191)][0x0]);return{..._0x8b9e48,'children':_0x23e508['replies'][_0x2b55ef(0x1a9)](0x1)[_0x2b55ef(0x164)](_0x284e00=>_0x593c7a(_0x284e00,_0x8b9e48['id']))};}return null;}let g=class{constructor(_0x2a456d,_0x249a61,_0x5771c6,_0x4e62c2){const _0x215154=_0x4273bd;this[_0x215154(0x18d)]=_0x2a456d,this[_0x215154(0x166)]=_0x249a61,this[_0x215154(0x16a)]=_0x5771c6,this[_0x215154(0x15f)]=_0x4e62c2;}async['addComment'](_0x2e8cef){const _0x26b1ec=_0x4273bd;var _0x577014,_0x3ee63c;const {parentId:_0x4f7f9f,unitId:_0x38c36c,text:_0x1c2e21,threadId:_0x57a25b}=_0x2e8cef,_0x1938fb=(_0x3ee63c=(_0x577014=_0x1c2e21[_0x26b1ec(0x141)])==null?void 0x0:_0x577014[_0x26b1ec(0x14c)](_0x15f923=>_0x15f923['rangeType']===c[_0x26b1ec(0x19f)][_0x26b1ec(0x1b3)])['map'](_0x1c65f4=>_0x1c65f4['rangeId']))!=null?_0x3ee63c:[],_0x224608=JSON[_0x26b1ec(0x1a8)](_0x1c2e21),_0x4d3e72=(await this[_0x26b1ec(0x16a)][_0x26b1ec(0x186)](_0x38c36c))[_0x26b1ec(0x152)]();if(_0x4f7f9f){const _0xdd3ea8={'memberId':_0x4d3e72,'unitId':_0x38c36c,'content':_0x224608,'mention':_0x1938fb,'threadId':_0x57a25b},_0x3126c3=(await this[_0x26b1ec(0x18d)]['post'](_0x26b1ec(0x19a)+_0x38c36c+_0x26b1ec(0x13c),{'body':_0xdd3ea8}))['body'][_0x26b1ec(0x146)];return{..._0x2e8cef,'id':_0x3126c3[_0x26b1ec(0x1b2)],'dT':c['dayjs'](+_0x3126c3[_0x26b1ec(0x176)])[_0x26b1ec(0x1ad)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3126c3[_0x26b1ec(0x161)]};}else{const _0x55b603={'memberId':_0x4d3e72,'unitId':_0x38c36c,'content':_0x224608,'mention':_0x1938fb},_0x51b327=await this[_0x26b1ec(0x18d)][_0x26b1ec(0x1a3)]('/universer-api/comment/unit/'+_0x38c36c+_0x26b1ec(0x1af),{'body':_0x55b603});return Y(_0x51b327[_0x26b1ec(0x175)][_0x26b1ec(0x182)],_0x2e8cef);}}async[_0x4273bd(0x199)](_0x403483){const _0x177b82=_0x4273bd;var _0x24e9ac,_0x45df38;const {text:_0x2a8d1b,unitId:_0x1ba52d}=_0x403483,_0x315fc7=(_0x45df38=(_0x24e9ac=_0x2a8d1b[_0x177b82(0x141)])==null?void 0x0:_0x24e9ac[_0x177b82(0x14c)](_0x2e710d=>_0x2e710d['rangeType']===c[_0x177b82(0x19f)][_0x177b82(0x1b3)])[_0x177b82(0x164)](_0x22c69e=>_0x22c69e[_0x177b82(0x1b6)]))!=null?_0x45df38:[],_0xfcff2c=JSON[_0x177b82(0x1a8)](_0x2a8d1b),_0x2bc939=_0x403483[_0x177b82(0x194)],_0x4f6e0a=_0x403483['id'],_0x10405={'memberId':(await this[_0x177b82(0x16a)][_0x177b82(0x186)](_0x1ba52d))[_0x177b82(0x152)](),'unitId':_0x1ba52d,'threadId':_0x2bc939,'mention':_0x315fc7,'content':_0xfcff2c,'replyId':_0x4f6e0a},_0x1f9903=await this[_0x177b82(0x18d)][_0x177b82(0x1a3)](_0x177b82(0x19a)+_0x1ba52d+_0x177b82(0x168),{'body':_0x10405});return!_0x1f9903['body'][_0x177b82(0x187)]||_0x1f9903['body'][_0x177b82(0x187)][_0x177b82(0x17e)]===0x1;}async[_0x4273bd(0x14b)](_0x1cbcf2){const _0x11715f=_0x4273bd,{unitId:_0x447ddd}=_0x1cbcf2,_0x3c7d41=_0x1cbcf2[_0x11715f(0x194)],_0x2fb78d={'memberId':this['_userService'][_0x11715f(0x189)]()[_0x11715f(0x1b0)],'unitId':_0x447ddd,'threadId':_0x3c7d41,'solved':_0x1cbcf2['resolved']?I[_0x11715f(0x1b9)]:I[_0x11715f(0x192)]},_0x29bae8=await this[_0x11715f(0x18d)][_0x11715f(0x1a3)](_0x11715f(0x19a)+_0x447ddd+_0x11715f(0x165),{'body':_0x2fb78d});return!_0x29bae8[_0x11715f(0x175)][_0x11715f(0x187)]||_0x29bae8[_0x11715f(0x175)][_0x11715f(0x187)][_0x11715f(0x17e)]===0x1;}async[_0x4273bd(0x13a)](_0x21cd4f,_0x4adb5f,_0x34f2e9,_0x10d016){const _0x52c0f4=_0x4273bd,_0xa677d1={'memberId':(await this[_0x52c0f4(0x16a)]['requireSession'](_0x21cd4f))[_0x52c0f4(0x152)](),'threadId':_0x34f2e9,'replyId':_0x10d016,'unitId':_0x21cd4f},_0x3a1c65=await this[_0x52c0f4(0x18d)]['post']('/universer-api/comment/unit/'+_0x21cd4f+_0x52c0f4(0x185),{'body':_0xa677d1});return!_0x3a1c65[_0x52c0f4(0x175)][_0x52c0f4(0x187)]||_0x3a1c65[_0x52c0f4(0x175)][_0x52c0f4(0x187)][_0x52c0f4(0x17e)]===0x1;}async[_0x4273bd(0x1a4)](_0x2d7023,_0x21a88f,_0x429aeb){const _0x15af0e=_0x4273bd,_0x222050={'unitId':_0x2d7023,'threadId':_0x429aeb},_0x58df2f=await this['_httpService']['post'](_0x15af0e(0x19a)+_0x2d7023+_0x15af0e(0x196),{'body':_0x222050}),_0x383f12=_0x429aeb[_0x15af0e(0x164)](_0x3940c8=>G(_0x58df2f[_0x15af0e(0x175)][_0x15af0e(0x167)][_0x3940c8],_0x2d7023,_0x21a88f))['filter'](Boolean);return Object[_0x15af0e(0x147)](_0x58df2f[_0x15af0e(0x175)][_0x15af0e(0x17d)])[_0x15af0e(0x162)](_0x17aa39=>{const _0xd50f0a=_0x15af0e;this[_0xd50f0a(0x166)][_0xd50f0a(0x1ae)](_0x17aa39);}),_0x383f12;}[_0x4273bd(0x150)](_0x5664a5){const _0x3976ce=_0x4273bd;return{'id':_0x5664a5['id'],'threadId':_0x5664a5[_0x3976ce(0x194)],'ref':_0x5664a5[_0x3976ce(0x174)]};}};g=x([_(0x0,c['Inject'](P[_0x4273bd(0x15d)])),_(0x1,c[_0x4273bd(0x145)](c[_0x4273bd(0x155)])),_(0x2,c[_0x4273bd(0x145)](b[_0x4273bd(0x18e)])),_(0x3,c[_0x4273bd(0x145)](c[_0x4273bd(0x157)]))],g);var H=Object[_0x4273bd(0x1b8)],J=(_0x2d4c5a,_0x1346f6,_0x59959c,_0x57c7c9)=>{const _0x386148=_0x4273bd;for(var _0x527f88=_0x57c7c9>0x1?void 0x0:_0x57c7c9?H(_0x1346f6,_0x59959c):_0x1346f6,_0x470177=_0x2d4c5a[_0x386148(0x1a6)]-0x1,_0x536093;_0x470177>=0x0;_0x470177--)(_0x536093=_0x2d4c5a[_0x470177])&&(_0x527f88=_0x536093(_0x527f88)||_0x527f88);return _0x527f88;},y=(_0x23f083,_0x118a7b)=>(_0x2a12dc,_0x23789f)=>_0x118a7b(_0x2a12dc,_0x23789f,_0x23f083);let C=class extends c[_0x4273bd(0x14f)]{constructor(_0x5cf0f7,_0x1ef115){const _0xa669b7=_0x4273bd;super(),this[_0xa669b7(0x15c)]=_0x5cf0f7,this[_0xa669b7(0x1ac)]=_0x1ef115,this[_0xa669b7(0x181)]();}[_0x4273bd(0x181)](){const _0x55a005=_0x4273bd;this['_threadCommentDataSourceService'][_0x55a005(0x144)]=this[_0x55a005(0x1ac)],this[_0x55a005(0x15c)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x4273bd(0x1b5)]),y(0x1,c[_0x4273bd(0x145)](g))],C);var F=Object[_0x4273bd(0x1ab)],L=Object['getOwnPropertyDescriptor'],Z=(_0x44b245,_0xf05778,_0x3f2f95)=>_0xf05778 in _0x44b245?F(_0x44b245,_0xf05778,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3f2f95}):_0x44b245[_0xf05778]=_0x3f2f95,W=(_0x3a2a48,_0x2e6c7d,_0x6224ae,_0x52ed1c)=>{const _0x51eb37=_0x4273bd;for(var _0x199fe1=_0x52ed1c>0x1?void 0x0:_0x52ed1c?L(_0x2e6c7d,_0x6224ae):_0x2e6c7d,_0x210c62=_0x3a2a48[_0x51eb37(0x1a6)]-0x1,_0x2fb75e;_0x210c62>=0x0;_0x210c62--)(_0x2fb75e=_0x3a2a48[_0x210c62])&&(_0x199fe1=_0x2fb75e(_0x199fe1)||_0x199fe1);return _0x199fe1;},O=(_0x32b971,_0x20afa0)=>(_0x27169c,_0x4ad8c9)=>_0x20afa0(_0x27169c,_0x4ad8c9,_0x32b971),N=(_0x2fed45,_0x39c880,_0x440ab7)=>Z(_0x2fed45,typeof _0x39c880!=_0x4273bd(0x178)?_0x39c880+'':_0x39c880,_0x440ab7);exports[_0x4273bd(0x188)]=class extends c['Plugin']{constructor(_0x1a8e45=D,_0x1bb74e,_0x40b548){const _0x44e55a=_0x4273bd;super(),this['_config']=_0x1a8e45,this[_0x44e55a(0x15f)]=_0x1bb74e,this[_0x44e55a(0x14e)]=_0x40b548;const {..._0x5688df}=c[_0x44e55a(0x149)]({},D,this['_config']);this['_configService'][_0x44e55a(0x170)](q,_0x5688df);}[_0x4273bd(0x156)](){const _0x535a00=_0x4273bd;[[g],[C],[p]][_0x535a00(0x162)](_0x32ec85=>{const _0x4a16b7=_0x535a00;this[_0x4a16b7(0x15f)]['add'](_0x32ec85);});}[_0x4273bd(0x18c)](){const _0x235d4d=_0x4273bd;this[_0x235d4d(0x15f)]['get'](C),this[_0x235d4d(0x15f)][_0x235d4d(0x18f)](p);}},N(exports[_0x4273bd(0x188)],_0x4273bd(0x1a1),U),N(exports[_0x4273bd(0x188)],_0x4273bd(0x19b),c[_0x4273bd(0x1b1)]['UNIVER_UNKNOWN']),exports[_0x4273bd(0x188)]=W([c['DependentOn'](j[_0x4273bd(0x14d)],b[_0x4273bd(0x1a7)],T['UniverLicensePlugin']),O(0x1,c[_0x4273bd(0x145)](c[_0x4273bd(0x157)])),O(0x2,c['IConfigService'])],exports[_0x4273bd(0x188)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x20a74b=_0x20e2;(function(_0x50c362,_0x5d1171){const _0x4f2de7=_0x20e2,_0x40f97e=_0x50c362();while(!![]){try{const _0xc5fd90=parseInt(_0x4f2de7(0xab))/0x1+parseInt(_0x4f2de7(0x113))/0x2+-parseInt(_0x4f2de7(0xd1))/0x3*(-parseInt(_0x4f2de7(0x10b))/0x4)+parseInt(_0x4f2de7(0xee))/0x5*(-parseInt(_0x4f2de7(0xdd))/0x6)+parseInt(_0x4f2de7(0xdc))/0x7*(parseInt(_0x4f2de7(0xbe))/0x8)+parseInt(_0x4f2de7(0xf0))/0x9*(parseInt(_0x4f2de7(0xfd))/0xa)+-parseInt(_0x4f2de7(0xc5))/0xb;if(_0xc5fd90===_0x5d1171)break;else _0x40f97e['push'](_0x40f97e['shift']());}catch(_0x490544){_0x40f97e['push'](_0x40f97e['shift']());}}}(_0x3bf6,0xd0b0d));import{CommentService as _0x4b75b4,CollaborationSessionService as _0x3be614,UniverCollaborationClientPlugin as _0x4b6bbf}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x246c8d}from'@univerjs-pro/license';import{dayjs as _0x3f8ed8,UserManagerService as _0x22c1d2,Inject as _0x1fa967,Injector as _0x431ef2,Disposable as _0x3d60b0,CustomRangeType as _0x4b5707,UniverInstanceType as _0x454787,DependentOn as _0x1cbc9c,IConfigService as _0x23eb6d,Plugin as _0x2ea3db,merge as _0xaf4b09}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x16c093}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2a53f2,IThreadCommentDataSourceService as _0x1124fa}from'@univerjs/thread-comment';import{bufferTime as _0x154957}from'rxjs';import{HTTPService as _0xfd84bc}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3d7035=>(_0x3d7035[_0x3d7035[_0x20a74b(0x100)]=0x0]=_0x20a74b(0x100),_0x3d7035[_0x3d7035[_0x20a74b(0xbd)]=0x1]=_0x20a74b(0xbd),_0x3d7035[_0x3d7035[_0x20a74b(0xcc)]=-0x1]=_0x20a74b(0xcc),_0x3d7035))(I||{}),v=(_0x1ec714=>(_0x1ec714[_0x1ec714[_0x20a74b(0xe3)]=0x0]=_0x20a74b(0xe3),_0x1ec714[_0x1ec714[_0x20a74b(0xb6)]=0x1]=_0x20a74b(0xb6),_0x1ec714[_0x1ec714['Reply']=0x2]=_0x20a74b(0xba),_0x1ec714[_0x1ec714[_0x20a74b(0xac)]=0x3]=_0x20a74b(0xac),_0x1ec714[_0x1ec714[_0x20a74b(0xfa)]=0x4]=_0x20a74b(0xfa),_0x1ec714[_0x1ec714[_0x20a74b(0xe4)]=0x5]='Solve',_0x1ec714[_0x1ec714[_0x20a74b(0xcc)]=-0x1]=_0x20a74b(0xcc),_0x1ec714))(v||{});const D=_0x103b51=>_0x3f8ed8(new Date(+_0x103b51))[_0x20a74b(0x109)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x126f72,_0x433dcc)=>{const _0x3d8352=_0x20a74b,_0xa6af42=_0x126f72[_0x3d8352(0xd9)](_0x22c1d2),_0x5b812d=_0x126f72[_0x3d8352(0xd9)](_0xfd84bc);_0x433dcc[_0x3d8352(0xc1)](_0x33d590=>{const _0x1261f4=_0x3d8352;_0xa6af42['getUser'](_0x33d590)&&_0x433dcc[_0x1261f4(0xbc)](_0x33d590);}),_0x433dcc[_0x3d8352(0xc3)]&&(await _0x5b812d['get'](_0x3d8352(0xf5),{'params':{'userIDs':[..._0x433dcc]}}))[_0x3d8352(0xd5)][_0x3d8352(0x10f)][_0x3d8352(0xc1)](_0x14b55d=>{_0x14b55d&&_0xa6af42['addUser'](_0x14b55d);});};var K=Object[_0x20a74b(0xb4)],V=(_0x3deab4,_0x31e6c5,_0x5bf38d,_0x527fd7)=>{const _0x388a68=_0x20a74b;for(var _0x5d2f20=_0x527fd7>0x1?void 0x0:_0x527fd7?K(_0x31e6c5,_0x5bf38d):_0x31e6c5,_0x3e8017=_0x3deab4[_0x388a68(0xb7)]-0x1,_0x46d868;_0x3e8017>=0x0;_0x3e8017--)(_0x46d868=_0x3deab4[_0x3e8017])&&(_0x5d2f20=_0x46d868(_0x5d2f20)||_0x5d2f20);return _0x5d2f20;},p=(_0x2e83aa,_0x200eab)=>(_0x41faec,_0x2635a3)=>_0x200eab(_0x41faec,_0x2635a3,_0x2e83aa);let S=class extends _0x3d60b0{constructor(_0x5f1116,_0x2a8635,_0xb2b2e5,_0x5d7ada){const _0x2d4695=_0x20a74b;super(),this[_0x2d4695(0xc0)]=_0x5f1116,this[_0x2d4695(0xea)]=_0x2a8635,this[_0x2d4695(0xe1)]=_0xb2b2e5,this['_injector']=_0x5d7ada,this[_0x2d4695(0xfb)](),this[_0x2d4695(0x101)]();}[_0x20a74b(0x101)](){const _0xf6a835=_0x20a74b;this['disposeWithMe'](this['_threadCommentModel'][_0xf6a835(0x110)][_0xf6a835(0xef)](_0x154957(0x10))[_0xf6a835(0xc6)](_0x53a388=>{const _0x17178e=_0xf6a835,_0x310dc2=new Set();_0x53a388['forEach'](_0x505776=>{const _0x22a5ae=_0x20e2;switch(_0x505776['type']){case _0x22a5ae(0x102):{const _0x5482c4=_0x505776['payload'][_0x22a5ae(0xec)];_0x310dc2[_0x22a5ae(0x102)](_0x5482c4);break;}}}),B(this[_0x17178e(0xd7)],_0x310dc2);}));}[_0x20a74b(0xfb)](){const _0x344999=_0x20a74b;this[_0x344999(0xe9)](this[_0x344999(0xc0)]['commentUpdate$'][_0x344999(0xc6)](async _0x5ed248=>{const _0x9326ce=_0x344999;var _0x2e5fed,_0x232999,_0x1ad7ab,_0x2e7ead;const _0x18518e=(_0x2e5fed=this['_threadCommentModel'][_0x9326ce(0xae)](_0x5ed248[_0x9326ce(0x10a)])['find'](_0x7cec4f=>_0x7cec4f[_0x9326ce(0x103)]===_0x5ed248[_0x9326ce(0x103)]))==null?void 0x0:_0x2e5fed[_0x9326ce(0xf2)];if(!_0x18518e)return;const {unitId:_0x438602,subUnitId:_0x79c642}=_0x18518e;switch(_0x5ed248['user']&&this['_userService'][_0x9326ce(0x105)](_0x5ed248[_0x9326ce(0xd8)]),_0x5ed248[_0x9326ce(0xf1)]){case v[_0x9326ce(0xb6)]:break;case v[_0x9326ce(0xba)]:{this[_0x9326ce(0xea)]['addComment'](_0x438602,_0x79c642,{'unitId':_0x438602,'subUnitId':_0x79c642,'ref':'','id':_0x5ed248[_0x9326ce(0xd3)],'dT':D(+_0x5ed248[_0x9326ce(0xdf)]),'threadId':_0x5ed248[_0x9326ce(0x103)],'personId':(_0x1ad7ab=(_0x232999=_0x5ed248[_0x9326ce(0xd8)])==null?void 0x0:_0x232999['userID'])!=null?_0x1ad7ab:_0x5ed248[_0x9326ce(0xe6)],'text':JSON[_0x9326ce(0x10d)](_0x5ed248[_0x9326ce(0xd2)]),'parentId':_0x18518e['id']});break;}case v[_0x9326ce(0xfa)]:{const _0x548fab=this['_threadCommentModel'][_0x9326ce(0xc2)](_0x438602,_0x79c642,_0x5ed248[_0x9326ce(0xd3)]);_0x548fab&&_0x548fab[_0x9326ce(0xde)]&&this[_0x9326ce(0xea)][_0x9326ce(0xca)](_0x438602,_0x79c642,_0x5ed248[_0x9326ce(0xd3)]);break;}case v[_0x9326ce(0xac)]:{this[_0x9326ce(0xea)][_0x9326ce(0x106)](_0x438602,_0x79c642,{'commentId':_0x5ed248[_0x9326ce(0xd3)],'text':JSON[_0x9326ce(0x10d)](_0x5ed248[_0x9326ce(0xd2)])});break;}case v[_0x9326ce(0xe4)]:{const _0x1ea945=(_0x2e7ead=this[_0x9326ce(0xea)][_0x9326ce(0xae)](_0x5ed248[_0x9326ce(0x10a)])[_0x9326ce(0xda)](_0x3a0e0b=>_0x3a0e0b[_0x9326ce(0x103)]===_0x5ed248[_0x9326ce(0x103)]))==null?void 0x0:_0x2e7ead['root'];_0x1ea945&&this[_0x9326ce(0xea)][_0x9326ce(0xb5)](_0x438602,_0x79c642,_0x1ea945['id'],_0x5ed248['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x1fa967(_0x4b75b4)),p(0x1,_0x1fa967(_0x2a53f2)),p(0x2,_0x1fa967(_0x22c1d2)),p(0x3,_0x1fa967(_0x431ef2))],S);const z=_0x20a74b(0xe5),M={};var k=Object[_0x20a74b(0xb4)],Q=(_0x4ce085,_0x3bc272,_0x52001e,_0x1f20fc)=>{const _0x504c43=_0x20a74b;for(var _0x33e08b=_0x1f20fc>0x1?void 0x0:_0x1f20fc?k(_0x3bc272,_0x52001e):_0x3bc272,_0x5b4510=_0x4ce085[_0x504c43(0xb7)]-0x1,_0x4000ed;_0x5b4510>=0x0;_0x5b4510--)(_0x4000ed=_0x4ce085[_0x5b4510])&&(_0x33e08b=_0x4000ed(_0x33e08b)||_0x33e08b);return _0x33e08b;},_=(_0x429273,_0x130b78)=>(_0x5b8944,_0x1c7ed0)=>_0x130b78(_0x5b8944,_0x1c7ed0,_0x429273);function X(_0x585887,_0x2a7387){const _0x2c9241=_0x20a74b,_0x451b84=_0x585887[_0x2c9241(0xc8)][0x0];return{..._0x2a7387,'id':_0x451b84[_0x2c9241(0xd3)],'resolved':_0x585887[_0x2c9241(0xdb)]===0x1,'dT':D(_0x451b84['createTimestamp']),'personId':_0x451b84[_0x2c9241(0xe6)],'threadId':_0x451b84[_0x2c9241(0x103)]};}function ee(_0x49efdc,_0x5d2c1b,_0x571212){const _0x5e529c=_0x20a74b;var _0x35fd65,_0x367b8d;if(((_0x367b8d=(_0x35fd65=_0x49efdc==null?void 0x0:_0x49efdc[_0x5e529c(0xc8)])==null?void 0x0:_0x35fd65[_0x5e529c(0xb7)])!=null?_0x367b8d:0x0)>0x0){const _0x1a66cb=(_0x718e91,_0x103512)=>({'id':_0x718e91['replyId'],'threadId':_0x718e91['threadId'],'dT':D(_0x718e91[_0x5e529c(0xdf)]),'personId':_0x718e91[_0x5e529c(0xe6)],'resolved':_0x49efdc[_0x5e529c(0xdb)]===I[_0x5e529c(0xbd)],'unitId':_0x5d2c1b,'subUnitId':_0x571212,'text':JSON['parse'](_0x718e91[_0x5e529c(0xd2)]),'parentId':_0x103512}),_0x507c2b=_0x1a66cb(_0x49efdc['replies'][0x0]);return{..._0x507c2b,'children':_0x49efdc['replies'][_0x5e529c(0xe2)](0x1)[_0x5e529c(0xe0)](_0x5c6960=>_0x1a66cb(_0x5c6960,_0x507c2b['id']))};}return null;}let f=class{constructor(_0x376eba,_0xdc15e4,_0x27a540,_0x3a4107){const _0x506a44=_0x20a74b;this[_0x506a44(0xf6)]=_0x376eba,this['_userService']=_0xdc15e4,this['_sessionService']=_0x27a540,this[_0x506a44(0xd7)]=_0x3a4107;}async[_0x20a74b(0xb1)](_0x333fb0){const _0x20d2d4=_0x20a74b;var _0x14f27d,_0x3d9b21;const {parentId:_0x1db62d,unitId:_0x2f5824,text:_0x39b829,threadId:_0x52f32d}=_0x333fb0,_0x284372=(_0x3d9b21=(_0x14f27d=_0x39b829[_0x20d2d4(0xb2)])==null?void 0x0:_0x14f27d[_0x20d2d4(0xce)](_0x31b4e6=>_0x31b4e6['rangeType']===_0x4b5707[_0x20d2d4(0xb3)])['map'](_0x499e5d=>_0x499e5d['rangeId']))!=null?_0x3d9b21:[],_0x33d721=JSON['stringify'](_0x39b829),_0xa757b8=(await this[_0x20d2d4(0xf3)]['requireSession'](_0x2f5824))[_0x20d2d4(0xff)]();if(_0x1db62d){const _0x3d93db={'memberId':_0xa757b8,'unitId':_0x2f5824,'content':_0x33d721,'mention':_0x284372,'threadId':_0x52f32d},_0x4b9625=(await this['_httpService'][_0x20d2d4(0xad)](_0x20d2d4(0x112)+_0x2f5824+_0x20d2d4(0xf7),{'body':_0x3d93db}))[_0x20d2d4(0xd5)][_0x20d2d4(0xb0)];return{..._0x333fb0,'id':_0x4b9625[_0x20d2d4(0xd3)],'dT':_0x3f8ed8(+_0x4b9625['createTimestamp'])[_0x20d2d4(0x109)](_0x20d2d4(0xbb)),'personId':_0x4b9625[_0x20d2d4(0xe6)]};}else{const _0x17ae30={'memberId':_0xa757b8,'unitId':_0x2f5824,'content':_0x33d721,'mention':_0x284372},_0x43ce5d=await this[_0x20d2d4(0xf6)][_0x20d2d4(0xad)]('/universer-api/comment/unit/'+_0x2f5824+'/add',{'body':_0x17ae30});return X(_0x43ce5d[_0x20d2d4(0xd5)][_0x20d2d4(0xaf)],_0x333fb0);}}async['updateComment'](_0x45b2fa){const _0x54c534=_0x20a74b;var _0x1975a6,_0x2291a9;const {text:_0x4b3ab9,unitId:_0x1a7e96}=_0x45b2fa,_0x5d870a=(_0x2291a9=(_0x1975a6=_0x4b3ab9[_0x54c534(0xb2)])==null?void 0x0:_0x1975a6['filter'](_0x115aaa=>_0x115aaa[_0x54c534(0xed)]===_0x4b5707[_0x54c534(0xb3)])[_0x54c534(0xe0)](_0x175c58=>_0x175c58[_0x54c534(0x107)]))!=null?_0x2291a9:[],_0x1c5990=JSON[_0x54c534(0xfc)](_0x4b3ab9),_0xd2c4aa=_0x45b2fa['threadId'],_0x1c8246=_0x45b2fa['id'],_0x8f1249={'memberId':(await this[_0x54c534(0xf3)][_0x54c534(0x111)](_0x1a7e96))['getMemberID'](),'unitId':_0x1a7e96,'threadId':_0xd2c4aa,'mention':_0x5d870a,'content':_0x1c5990,'replyId':_0x1c8246},_0x4116e4=await this['_httpService'][_0x54c534(0xad)](_0x54c534(0x112)+_0x1a7e96+_0x54c534(0xc4),{'body':_0x8f1249});return!_0x4116e4['body'][_0x54c534(0x10c)]||_0x4116e4[_0x54c534(0xd5)][_0x54c534(0x10c)][_0x54c534(0x108)]===0x1;}async[_0x20a74b(0xb5)](_0x2d5d51){const _0x446402=_0x20a74b,{unitId:_0x3b3db2}=_0x2d5d51,_0x2c4b99=_0x2d5d51[_0x446402(0x103)],_0x574527={'memberId':this['_userService'][_0x446402(0xe7)]()[_0x446402(0xcd)],'unitId':_0x3b3db2,'threadId':_0x2c4b99,'solved':_0x2d5d51[_0x446402(0xb9)]?I[_0x446402(0xbd)]:I['OpenOrReOpen']},_0x5b06be=await this[_0x446402(0xf6)][_0x446402(0xad)](_0x446402(0x112)+_0x3b3db2+_0x446402(0x104),{'body':_0x574527});return!_0x5b06be['body'][_0x446402(0x10c)]||_0x5b06be[_0x446402(0xd5)][_0x446402(0x10c)]['code']===0x1;}async['deleteComment'](_0x531d5e,_0x3b6e18,_0x9c1de3,_0x304a42){const _0x528b40=_0x20a74b,_0x5fe773={'memberId':(await this[_0x528b40(0xf3)][_0x528b40(0x111)](_0x531d5e))[_0x528b40(0xff)](),'threadId':_0x9c1de3,'replyId':_0x304a42,'unitId':_0x531d5e},_0x1ea861=await this[_0x528b40(0xf6)][_0x528b40(0xad)](_0x528b40(0x112)+_0x531d5e+'/delete',{'body':_0x5fe773});return!_0x1ea861['body'][_0x528b40(0x10c)]||_0x1ea861[_0x528b40(0xd5)][_0x528b40(0x10c)]['code']===0x1;}async[_0x20a74b(0xcb)](_0x2e466c,_0x51471e,_0x199329){const _0x438a31=_0x20a74b,_0xac976a={'unitId':_0x2e466c,'threadId':_0x199329},_0x4837cf=await this[_0x438a31(0xf6)][_0x438a31(0xad)](_0x438a31(0x112)+_0x2e466c+_0x438a31(0xb8),{'body':_0xac976a}),_0x4ca61a=_0x199329[_0x438a31(0xe0)](_0x4463a0=>ee(_0x4837cf[_0x438a31(0xd5)][_0x438a31(0xeb)][_0x4463a0],_0x2e466c,_0x51471e))[_0x438a31(0xce)](Boolean);return Object['values'](_0x4837cf[_0x438a31(0xd5)][_0x438a31(0x10f)])[_0x438a31(0xc1)](_0x1cf3bc=>{const _0x5449ab=_0x438a31;this['_userService'][_0x5449ab(0x105)](_0x1cf3bc);}),_0x4ca61a;}['saveCommentToSnapshot'](_0x1725af){const _0x3bbef9=_0x20a74b;return{'id':_0x1725af['id'],'threadId':_0x1725af[_0x3bbef9(0x103)],'ref':_0x1725af[_0x3bbef9(0xd4)]};}};function _0x3bf6(){const _0xe03d6d=['rangeId','code','format','unitId','146088pQxdwH','error','parse','_threadCommentDataSourceService','users','commentUpdate$','requireSession','/universer-api/comment/unit/','495602pFoiju','459815ATPUMT','Edit','post','getUnit','comment','reply','addComment','customRanges','COMMENT','getOwnPropertyDescriptor','resolveComment','Add','length','/list','resolved','Reply','YYYY/MM/DD\x20HH:mm','delete','Solved','8glTgdb','onReady','_commentService','forEach','getComment','size','/edit','16363149xfPmMV','subscribe','_initDataSource','replies','_config','deleteComment','listComments','UNRECOGNIZED','userID','filter','_threadCommentDataSource','dataSource','123UDNfEx','content','replyId','ref','body','syncUpdateMutationToColla','_injector','user','get','find','solved','6576773HqCaVR','982968myMRkw','parentId','createTimestamp','map','_userService','slice','Unknown','Solve','thread-comment-data-source.config','userId','getCurrentUser','pluginName','disposeWithMe','_threadCommentModel','comments','personId','rangeType','30WXkuGq','pipe','1467InGCRl','type','root','_sessionService','setConfig','/universer-api/user/list','_httpService','/reply','_configService','defineProperty','Delete','_init','stringify','11090pSZcaW','onStarting','getMemberID','OpenOrReOpen','_initUserSync','add','threadId','/solved','addUser','updateComment'];_0x3bf6=function(){return _0xe03d6d;};return _0x3bf6();}f=Q([_(0x0,_0x1fa967(_0xfd84bc)),_(0x1,_0x1fa967(_0x22c1d2)),_(0x2,_0x1fa967(_0x3be614)),_(0x3,_0x1fa967(_0x431ef2))],f);var re=Object[_0x20a74b(0xb4)],te=(_0x52b38e,_0x3a0aea,_0x10d979,_0x2f7597)=>{const _0x39e152=_0x20a74b;for(var _0x1b75e8=_0x2f7597>0x1?void 0x0:_0x2f7597?re(_0x3a0aea,_0x10d979):_0x3a0aea,_0x447c5b=_0x52b38e[_0x39e152(0xb7)]-0x1,_0x4cddae;_0x447c5b>=0x0;_0x447c5b--)(_0x4cddae=_0x52b38e[_0x447c5b])&&(_0x1b75e8=_0x4cddae(_0x1b75e8)||_0x1b75e8);return _0x1b75e8;},N=(_0x24700d,_0x1706f2)=>(_0x5ce26e,_0x182a81)=>_0x1706f2(_0x5ce26e,_0x182a81,_0x24700d);let g=class extends _0x3d60b0{constructor(_0x1a940d,_0x38bb2f){const _0x1b14a3=_0x20a74b;super(),this[_0x1b14a3(0x10e)]=_0x1a940d,this[_0x1b14a3(0xcf)]=_0x38bb2f,this['_initDataSource']();}[_0x20a74b(0xc7)](){const _0x12df49=_0x20a74b;this['_threadCommentDataSourceService'][_0x12df49(0xd0)]=this[_0x12df49(0xcf)],this[_0x12df49(0x10e)][_0x12df49(0xd6)]=!0x1;}};g=te([N(0x0,_0x1124fa),N(0x1,_0x1fa967(f))],g);var se=Object[_0x20a74b(0xf9)],oe=Object[_0x20a74b(0xb4)],ne=(_0x1db562,_0x4616a8,_0x5e2aee)=>_0x4616a8 in _0x1db562?se(_0x1db562,_0x4616a8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5e2aee}):_0x1db562[_0x4616a8]=_0x5e2aee,ie=(_0x1da722,_0x1ce987,_0x297a3c,_0x33ca64)=>{const _0x12f017=_0x20a74b;for(var _0x3ec87e=_0x33ca64>0x1?void 0x0:_0x33ca64?oe(_0x1ce987,_0x297a3c):_0x1ce987,_0x1d4b7f=_0x1da722[_0x12f017(0xb7)]-0x1,_0x170c80;_0x1d4b7f>=0x0;_0x1d4b7f--)(_0x170c80=_0x1da722[_0x1d4b7f])&&(_0x3ec87e=_0x170c80(_0x3ec87e)||_0x3ec87e);return _0x3ec87e;},w=(_0x73f80b,_0x330487)=>(_0xa4bbf2,_0x208b23)=>_0x330487(_0xa4bbf2,_0x208b23,_0x73f80b),$=(_0xb9a2f4,_0x367c23,_0x1c2117)=>ne(_0xb9a2f4,typeof _0x367c23!='symbol'?_0x367c23+'':_0x367c23,_0x1c2117);function _0x20e2(_0x589365,_0x52130a){const _0x3bf635=_0x3bf6();return _0x20e2=function(_0x20e279,_0x2ea4f9){_0x20e279=_0x20e279-0xab;let _0x27577d=_0x3bf635[_0x20e279];return _0x27577d;},_0x20e2(_0x589365,_0x52130a);}let b=class extends _0x2ea3db{constructor(_0x2206b3=M,_0x2d1697,_0x4eec9e){const _0x4cbd21=_0x20a74b;super(),this[_0x4cbd21(0xc9)]=_0x2206b3,this['_injector']=_0x2d1697,this[_0x4cbd21(0xf8)]=_0x4eec9e;const {..._0x5de503}=_0xaf4b09({},M,this[_0x4cbd21(0xc9)]);this[_0x4cbd21(0xf8)][_0x4cbd21(0xf4)](z,_0x5de503);}[_0x20a74b(0xfe)](){const _0x4ce2f1=_0x20a74b;[[f],[g],[S]][_0x4ce2f1(0xc1)](_0x3f8881=>{const _0x1b2ee7=_0x4ce2f1;this[_0x1b2ee7(0xd7)][_0x1b2ee7(0x102)](_0x3f8881);});}[_0x20a74b(0xbf)](){const _0x1c117b=_0x20a74b;this[_0x1c117b(0xd7)][_0x1c117b(0xd9)](g),this[_0x1c117b(0xd7)]['get'](S);}};$(b,_0x20a74b(0xe8),W),$(b,'type',_0x454787['UNIVER_UNKNOWN']),b=ie([_0x1cbc9c(_0x16c093,_0x4b6bbf,_0x246c8d),w(0x1,_0x1fa967(_0x431ef2)),w(0x2,_0x23eb6d)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x1a9525=_0x281e;(function(_0x29b3a3,_0x2d8e36){const _0x292153=_0x281e,_0x500b2b=_0x29b3a3();while(!![]){try{const _0x4e0f9e=-parseInt(_0x292153(0x150))/0x1*(-parseInt(_0x292153(0x152))/0x2)+parseInt(_0x292153(0x186))/0x3*(parseInt(_0x292153(0x149))/0x4)+-parseInt(_0x292153(0x15b))/0x5*(parseInt(_0x292153(0x191))/0x6)+parseInt(_0x292153(0x192))/0x7+-parseInt(_0x292153(0x14c))/0x8*(-parseInt(_0x292153(0x154))/0x9)+-parseInt(_0x292153(0x16b))/0xa*(parseInt(_0x292153(0x165))/0xb)+parseInt(_0x292153(0x188))/0xc*(-parseInt(_0x292153(0x160))/0xd);if(_0x4e0f9e===_0x2d8e36)break;else _0x500b2b['push'](_0x500b2b['shift']());}catch(_0x57215d){_0x500b2b['push'](_0x500b2b['shift']());}}}(_0x5a97,0x32e0f));import{CommentService as _0x40c369,CollaborationSessionService as _0xb5f0f6,UniverCollaborationClientPlugin as _0x156a54}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x44c437}from'@univerjs-pro/license';import{dayjs as _0x8d8ae0,UserManagerService as _0x3744cb,Inject as _0x22e7e9,Injector as _0x5645be,Disposable as _0x52e380,CustomRangeType as _0x3fa89b,UniverInstanceType as _0x5c86df,DependentOn as _0x3c4a67,IConfigService as _0x23818b,Plugin as _0x14760f,merge as _0x3fdcf6}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5d7089}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x94249b,IThreadCommentDataSourceService as _0x14199e}from'@univerjs/thread-comment';import{bufferTime as _0x3dfed0}from'rxjs';function _0x281e(_0x5d54cf,_0x37828b){const _0x5a97c4=_0x5a97();return _0x281e=function(_0x281e15,_0xaeb5d7){_0x281e15=_0x281e15-0x13f;let _0x375546=_0x5a97c4[_0x281e15];return _0x375546;},_0x281e(_0x5d54cf,_0x37828b);}import{HTTPService as _0x207092}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2854b3=>(_0x2854b3[_0x2854b3[_0x1a9525(0x157)]=0x0]=_0x1a9525(0x157),_0x2854b3[_0x2854b3[_0x1a9525(0x184)]=0x1]=_0x1a9525(0x184),_0x2854b3[_0x2854b3['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2854b3))(I||{}),v=(_0xa6053e=>(_0xa6053e[_0xa6053e[_0x1a9525(0x198)]=0x0]=_0x1a9525(0x198),_0xa6053e[_0xa6053e[_0x1a9525(0x13f)]=0x1]='Add',_0xa6053e[_0xa6053e['Reply']=0x2]=_0x1a9525(0x143),_0xa6053e[_0xa6053e[_0x1a9525(0x159)]=0x3]=_0x1a9525(0x159),_0xa6053e[_0xa6053e[_0x1a9525(0x190)]=0x4]=_0x1a9525(0x190),_0xa6053e[_0xa6053e[_0x1a9525(0x18f)]=0x5]=_0x1a9525(0x18f),_0xa6053e[_0xa6053e[_0x1a9525(0x17f)]=-0x1]=_0x1a9525(0x17f),_0xa6053e))(v||{});const D=_0x2f9ac0=>_0x8d8ae0(new Date(+_0x2f9ac0))[_0x1a9525(0x187)](_0x1a9525(0x17a)),B=async(_0x466682,_0x4ba6fc)=>{const _0x43f220=_0x1a9525,_0x451675=_0x466682[_0x43f220(0x167)](_0x3744cb),_0x16c8b0=_0x466682['get'](_0x207092);_0x4ba6fc['forEach'](_0x295762=>{const _0x57bd28=_0x43f220;_0x451675[_0x57bd28(0x140)](_0x295762)&&_0x4ba6fc[_0x57bd28(0x15c)](_0x295762);}),_0x4ba6fc[_0x43f220(0x1a8)]&&(await _0x16c8b0[_0x43f220(0x167)](_0x43f220(0x166),{'params':{'userIDs':[..._0x4ba6fc]}}))[_0x43f220(0x144)][_0x43f220(0x155)][_0x43f220(0x14d)](_0x34e0ea=>{const _0x2c12a1=_0x43f220;_0x34e0ea&&_0x451675[_0x2c12a1(0x175)](_0x34e0ea);});};var K=Object[_0x1a9525(0x151)],V=(_0x41501a,_0x359580,_0x2a9c4b,_0x3a0312)=>{const _0x158f61=_0x1a9525;for(var _0x30e415=_0x3a0312>0x1?void 0x0:_0x3a0312?K(_0x359580,_0x2a9c4b):_0x359580,_0x292757=_0x41501a[_0x158f61(0x16f)]-0x1,_0x2adb6d;_0x292757>=0x0;_0x292757--)(_0x2adb6d=_0x41501a[_0x292757])&&(_0x30e415=_0x2adb6d(_0x30e415)||_0x30e415);return _0x30e415;},p=(_0x29f0e2,_0x1e5c94)=>(_0x54c32f,_0x591cff)=>_0x1e5c94(_0x54c32f,_0x591cff,_0x29f0e2);let S=class extends _0x52e380{constructor(_0x9ae7ac,_0x52ac7a,_0x1fd2f4,_0x1a70e8){const _0x15073c=_0x1a9525;super(),this[_0x15073c(0x18c)]=_0x9ae7ac,this[_0x15073c(0x19a)]=_0x52ac7a,this[_0x15073c(0x179)]=_0x1fd2f4,this['_injector']=_0x1a70e8,this[_0x15073c(0x1ab)](),this[_0x15073c(0x195)]();}['_initUserSync'](){const _0x43b798=_0x1a9525;this[_0x43b798(0x1a5)](this[_0x43b798(0x19a)][_0x43b798(0x145)][_0x43b798(0x19c)](_0x3dfed0(0x10))['subscribe'](_0x565d36=>{const _0x5414a9=_0x43b798,_0x873893=new Set();_0x565d36[_0x5414a9(0x14d)](_0x452d1d=>{const _0x3b75af=_0x5414a9;switch(_0x452d1d[_0x3b75af(0x1a2)]){case'add':{const _0x246373=_0x452d1d[_0x3b75af(0x161)][_0x3b75af(0x181)];_0x873893[_0x3b75af(0x156)](_0x246373);break;}}}),B(this[_0x5414a9(0x15f)],_0x873893);}));}[_0x1a9525(0x1ab)](){const _0x50dd4e=_0x1a9525;this[_0x50dd4e(0x1a5)](this[_0x50dd4e(0x18c)][_0x50dd4e(0x145)][_0x50dd4e(0x176)](async _0xdfa244=>{const _0x433fcc=_0x50dd4e;var _0x3cd55e,_0x24f8b8,_0x5480fc,_0x4487f4;const _0x383e74=(_0x3cd55e=this[_0x433fcc(0x19a)][_0x433fcc(0x1a6)](_0xdfa244[_0x433fcc(0x158)])[_0x433fcc(0x1a7)](_0x55b7a3=>_0x55b7a3[_0x433fcc(0x142)]===_0xdfa244[_0x433fcc(0x142)]))==null?void 0x0:_0x3cd55e['root'];if(!_0x383e74)return;const {unitId:_0x385c67,subUnitId:_0x55b27a}=_0x383e74;switch(_0xdfa244[_0x433fcc(0x1a4)]&&this[_0x433fcc(0x179)][_0x433fcc(0x175)](_0xdfa244['user']),_0xdfa244[_0x433fcc(0x1a2)]){case v[_0x433fcc(0x13f)]:break;case v[_0x433fcc(0x143)]:{this[_0x433fcc(0x19a)][_0x433fcc(0x15a)](_0x385c67,_0x55b27a,{'unitId':_0x385c67,'subUnitId':_0x55b27a,'ref':'','id':_0xdfa244[_0x433fcc(0x162)],'dT':D(+_0xdfa244[_0x433fcc(0x153)]),'threadId':_0xdfa244['threadId'],'personId':(_0x5480fc=(_0x24f8b8=_0xdfa244[_0x433fcc(0x1a4)])==null?void 0x0:_0x24f8b8['userID'])!=null?_0x5480fc:_0xdfa244['userId'],'text':JSON[_0x433fcc(0x14a)](_0xdfa244[_0x433fcc(0x17c)]),'parentId':_0x383e74['id']});break;}case v[_0x433fcc(0x190)]:{const _0x3644f6=this[_0x433fcc(0x19a)][_0x433fcc(0x168)](_0x385c67,_0x55b27a,_0xdfa244[_0x433fcc(0x162)]);_0x3644f6&&_0x3644f6[_0x433fcc(0x18a)]&&this[_0x433fcc(0x19a)][_0x433fcc(0x1a1)](_0x385c67,_0x55b27a,_0xdfa244[_0x433fcc(0x162)]);break;}case v[_0x433fcc(0x159)]:{this[_0x433fcc(0x19a)]['updateComment'](_0x385c67,_0x55b27a,{'commentId':_0xdfa244[_0x433fcc(0x162)],'text':JSON[_0x433fcc(0x14a)](_0xdfa244[_0x433fcc(0x17c)])});break;}case v[_0x433fcc(0x18f)]:{const _0x4edcd5=(_0x4487f4=this['_threadCommentModel'][_0x433fcc(0x1a6)](_0xdfa244[_0x433fcc(0x158)])[_0x433fcc(0x1a7)](_0x31b569=>_0x31b569[_0x433fcc(0x142)]===_0xdfa244[_0x433fcc(0x142)]))==null?void 0x0:_0x4487f4['root'];_0x4edcd5&&this[_0x433fcc(0x19a)][_0x433fcc(0x14f)](_0x385c67,_0x55b27a,_0x4edcd5['id'],_0xdfa244[_0x433fcc(0x14e)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x22e7e9(_0x40c369)),p(0x1,_0x22e7e9(_0x94249b)),p(0x2,_0x22e7e9(_0x3744cb)),p(0x3,_0x22e7e9(_0x5645be))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x1a9525(0x151)],Q=(_0x415310,_0x5a4bd2,_0xe1fd49,_0x4f86c3)=>{const _0x33407d=_0x1a9525;for(var _0x5830e7=_0x4f86c3>0x1?void 0x0:_0x4f86c3?k(_0x5a4bd2,_0xe1fd49):_0x5a4bd2,_0x99997b=_0x415310[_0x33407d(0x16f)]-0x1,_0x5038eb;_0x99997b>=0x0;_0x99997b--)(_0x5038eb=_0x415310[_0x99997b])&&(_0x5830e7=_0x5038eb(_0x5830e7)||_0x5830e7);return _0x5830e7;},_=(_0x56b842,_0x531499)=>(_0x41b231,_0x5b228e)=>_0x531499(_0x41b231,_0x5b228e,_0x56b842);function X(_0x1dc29f,_0x55b3e8){const _0x283aea=_0x1a9525,_0x5ba95d=_0x1dc29f[_0x283aea(0x178)][0x0];return{..._0x55b3e8,'id':_0x5ba95d[_0x283aea(0x162)],'resolved':_0x1dc29f[_0x283aea(0x14e)]===0x1,'dT':D(_0x5ba95d[_0x283aea(0x153)]),'personId':_0x5ba95d[_0x283aea(0x163)],'threadId':_0x5ba95d[_0x283aea(0x142)]};}function ee(_0xf45a16,_0x380eb4,_0x556894){const _0x1f9b87=_0x1a9525;var _0x463bb7,_0x5908a9;if(((_0x5908a9=(_0x463bb7=_0xf45a16==null?void 0x0:_0xf45a16[_0x1f9b87(0x178)])==null?void 0x0:_0x463bb7[_0x1f9b87(0x16f)])!=null?_0x5908a9:0x0)>0x0){const _0x1be153=(_0x2f8038,_0x2fe42e)=>({'id':_0x2f8038[_0x1f9b87(0x162)],'threadId':_0x2f8038['threadId'],'dT':D(_0x2f8038['createTimestamp']),'personId':_0x2f8038[_0x1f9b87(0x163)],'resolved':_0xf45a16[_0x1f9b87(0x14e)]===I[_0x1f9b87(0x184)],'unitId':_0x380eb4,'subUnitId':_0x556894,'text':JSON[_0x1f9b87(0x14a)](_0x2f8038[_0x1f9b87(0x17c)]),'parentId':_0x2fe42e}),_0x15a128=_0x1be153(_0xf45a16[_0x1f9b87(0x178)][0x0]);return{..._0x15a128,'children':_0xf45a16[_0x1f9b87(0x178)][_0x1f9b87(0x17b)](0x1)[_0x1f9b87(0x185)](_0xb4aa20=>_0x1be153(_0xb4aa20,_0x15a128['id']))};}return null;}let f=class{constructor(_0x170bb6,_0x36beb0,_0x28ed81,_0x41427a){const _0x5d54ec=_0x1a9525;this[_0x5d54ec(0x173)]=_0x170bb6,this[_0x5d54ec(0x179)]=_0x36beb0,this[_0x5d54ec(0x17e)]=_0x28ed81,this[_0x5d54ec(0x15f)]=_0x41427a;}async[_0x1a9525(0x15a)](_0x170fb8){const _0x5eb96b=_0x1a9525;var _0x4c0deb,_0x3bcdf4;const {parentId:_0x484456,unitId:_0x3df598,text:_0x38a5a8,threadId:_0x53931a}=_0x170fb8,_0x304d2e=(_0x3bcdf4=(_0x4c0deb=_0x38a5a8[_0x5eb96b(0x17d)])==null?void 0x0:_0x4c0deb[_0x5eb96b(0x15d)](_0x392cf3=>_0x392cf3[_0x5eb96b(0x19d)]===_0x3fa89b[_0x5eb96b(0x15e)])[_0x5eb96b(0x185)](_0x149650=>_0x149650[_0x5eb96b(0x19b)]))!=null?_0x3bcdf4:[],_0x37b017=JSON[_0x5eb96b(0x164)](_0x38a5a8),_0x3fe66f=(await this[_0x5eb96b(0x17e)]['requireSession'](_0x3df598))['getMemberID']();if(_0x484456){const _0x4da751={'memberId':_0x3fe66f,'unitId':_0x3df598,'content':_0x37b017,'mention':_0x304d2e,'threadId':_0x53931a},_0x8dc241=(await this[_0x5eb96b(0x173)][_0x5eb96b(0x19e)]('/universer-api/comment/unit/'+_0x3df598+_0x5eb96b(0x171),{'body':_0x4da751}))[_0x5eb96b(0x144)][_0x5eb96b(0x1a0)];return{..._0x170fb8,'id':_0x8dc241[_0x5eb96b(0x162)],'dT':_0x8d8ae0(+_0x8dc241['createTimestamp'])[_0x5eb96b(0x187)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x8dc241[_0x5eb96b(0x163)]};}else{const _0xd0b960={'memberId':_0x3fe66f,'unitId':_0x3df598,'content':_0x37b017,'mention':_0x304d2e},_0x5b586c=await this['_httpService'][_0x5eb96b(0x19e)]('/universer-api/comment/unit/'+_0x3df598+_0x5eb96b(0x147),{'body':_0xd0b960});return X(_0x5b586c['body'][_0x5eb96b(0x1a3)],_0x170fb8);}}async[_0x1a9525(0x18e)](_0x147bb9){const _0x16c9a1=_0x1a9525;var _0x2f7eca,_0xd942d6;const {text:_0x39bce1,unitId:_0x5c0973}=_0x147bb9,_0x1a0660=(_0xd942d6=(_0x2f7eca=_0x39bce1['customRanges'])==null?void 0x0:_0x2f7eca[_0x16c9a1(0x15d)](_0x43eff0=>_0x43eff0['rangeType']===_0x3fa89b[_0x16c9a1(0x15e)])[_0x16c9a1(0x185)](_0x2f20cb=>_0x2f20cb[_0x16c9a1(0x19b)]))!=null?_0xd942d6:[],_0x37828c=JSON['stringify'](_0x39bce1),_0x443d5e=_0x147bb9['threadId'],_0x4dd1d1=_0x147bb9['id'],_0x5c4fe1={'memberId':(await this['_sessionService'][_0x16c9a1(0x193)](_0x5c0973))[_0x16c9a1(0x183)](),'unitId':_0x5c0973,'threadId':_0x443d5e,'mention':_0x1a0660,'content':_0x37828c,'replyId':_0x4dd1d1},_0x49e4a8=await this[_0x16c9a1(0x173)][_0x16c9a1(0x19e)]('/universer-api/comment/unit/'+_0x5c0973+_0x16c9a1(0x194),{'body':_0x5c4fe1});return!_0x49e4a8[_0x16c9a1(0x144)]['error']||_0x49e4a8['body']['error'][_0x16c9a1(0x196)]===0x1;}async['resolveComment'](_0x223bdd){const _0x2d163a=_0x1a9525,{unitId:_0x659991}=_0x223bdd,_0x20c221=_0x223bdd[_0x2d163a(0x142)],_0x43ba23={'memberId':this['_userService'][_0x2d163a(0x1a9)]()[_0x2d163a(0x182)],'unitId':_0x659991,'threadId':_0x20c221,'solved':_0x223bdd[_0x2d163a(0x1aa)]?I[_0x2d163a(0x184)]:I[_0x2d163a(0x157)]},_0x3e663d=await this[_0x2d163a(0x173)][_0x2d163a(0x19e)](_0x2d163a(0x16a)+_0x659991+'/solved',{'body':_0x43ba23});return!_0x3e663d[_0x2d163a(0x144)]['error']||_0x3e663d['body']['error'][_0x2d163a(0x196)]===0x1;}async['deleteComment'](_0x31c426,_0x109a50,_0x5221d3,_0x54f231){const _0x1163cc=_0x1a9525,_0x4f28d4={'memberId':(await this[_0x1163cc(0x17e)][_0x1163cc(0x193)](_0x31c426))[_0x1163cc(0x183)](),'threadId':_0x5221d3,'replyId':_0x54f231,'unitId':_0x31c426},_0x4ec5f4=await this[_0x1163cc(0x173)][_0x1163cc(0x19e)]('/universer-api/comment/unit/'+_0x31c426+'/delete',{'body':_0x4f28d4});return!_0x4ec5f4[_0x1163cc(0x144)][_0x1163cc(0x16c)]||_0x4ec5f4['body'][_0x1163cc(0x16c)][_0x1163cc(0x196)]===0x1;}async[_0x1a9525(0x18b)](_0x2c8eb7,_0x15bdd5,_0x2516e5){const _0x3b03d9=_0x1a9525,_0x287236={'unitId':_0x2c8eb7,'threadId':_0x2516e5},_0x4d9369=await this[_0x3b03d9(0x173)]['post'](_0x3b03d9(0x16a)+_0x2c8eb7+_0x3b03d9(0x172),{'body':_0x287236}),_0x2a38fd=_0x2516e5[_0x3b03d9(0x185)](_0x22e9f5=>ee(_0x4d9369[_0x3b03d9(0x144)][_0x3b03d9(0x169)][_0x22e9f5],_0x2c8eb7,_0x15bdd5))[_0x3b03d9(0x15d)](Boolean);return Object[_0x3b03d9(0x174)](_0x4d9369[_0x3b03d9(0x144)]['users'])[_0x3b03d9(0x14d)](_0x23253f=>{const _0x472c18=_0x3b03d9;this[_0x472c18(0x179)][_0x472c18(0x175)](_0x23253f);}),_0x2a38fd;}[_0x1a9525(0x16d)](_0x25fdeb){const _0xfeeeb2=_0x1a9525;return{'id':_0x25fdeb['id'],'threadId':_0x25fdeb[_0xfeeeb2(0x142)],'ref':_0x25fdeb[_0xfeeeb2(0x141)]};}};f=Q([_(0x0,_0x22e7e9(_0x207092)),_(0x1,_0x22e7e9(_0x3744cb)),_(0x2,_0x22e7e9(_0xb5f0f6)),_(0x3,_0x22e7e9(_0x5645be))],f);var re=Object[_0x1a9525(0x151)],te=(_0x1b5106,_0x165841,_0x58a085,_0x1c1e4a)=>{const _0x289f95=_0x1a9525;for(var _0x59ce3c=_0x1c1e4a>0x1?void 0x0:_0x1c1e4a?re(_0x165841,_0x58a085):_0x165841,_0x26c42e=_0x1b5106[_0x289f95(0x16f)]-0x1,_0x3adca6;_0x26c42e>=0x0;_0x26c42e--)(_0x3adca6=_0x1b5106[_0x26c42e])&&(_0x59ce3c=_0x3adca6(_0x59ce3c)||_0x59ce3c);return _0x59ce3c;},N=(_0x44988c,_0x577d11)=>(_0x1886a8,_0x20115d)=>_0x577d11(_0x1886a8,_0x20115d,_0x44988c);let g=class extends _0x52e380{constructor(_0x44cee3,_0x1d1169){const _0x487315=_0x1a9525;super(),this['_threadCommentDataSourceService']=_0x44cee3,this[_0x487315(0x197)]=_0x1d1169,this[_0x487315(0x19f)]();}[_0x1a9525(0x19f)](){const _0x1c2763=_0x1a9525;this[_0x1c2763(0x148)]['dataSource']=this[_0x1c2763(0x197)],this[_0x1c2763(0x148)]['syncUpdateMutationToColla']=!0x1;}};function _0x5a97(){const _0x388fcc=['/reply','/list','_httpService','values','addUser','subscribe','onStarting','replies','_userService','YYYY/MM/DD\x20HH:mm','slice','content','customRanges','_sessionService','UNRECOGNIZED','onReady','personId','userID','getMemberID','Solved','map','30dqSJtM','format','12ZUlxxC','_configService','parentId','listComments','_commentService','defineProperty','updateComment','Solve','Delete','84594QkklsI','415359pfXLZg','requireSession','/edit','_initUserSync','code','_threadCommentDataSource','Unknown','UNIVER_UNKNOWN','_threadCommentModel','rangeId','pipe','rangeType','post','_initDataSource','reply','deleteComment','type','comment','user','disposeWithMe','getUnit','find','size','getCurrentUser','resolved','_init','Add','getUser','ref','threadId','Reply','body','commentUpdate$','pluginName','/add','_threadCommentDataSourceService','42848KIIVhZ','parse','symbol','93016LpNQPu','forEach','solved','resolveComment','3GLkCms','getOwnPropertyDescriptor','83724tyetAg','createTimestamp','198hsLCgw','users','add','OpenOrReOpen','unitId','Edit','addComment','5uJGKoi','delete','filter','COMMENT','_injector','1666262hyvytS','payload','replyId','userId','stringify','46145XMJNCM','/universer-api/user/list','get','getComment','comments','/universer-api/comment/unit/','470RkjJYY','error','saveCommentToSnapshot','_config','length','setConfig'];_0x5a97=function(){return _0x388fcc;};return _0x5a97();}g=te([N(0x0,_0x14199e),N(0x1,_0x22e7e9(f))],g);var se=Object[_0x1a9525(0x18d)],oe=Object[_0x1a9525(0x151)],ne=(_0xe30eee,_0x4ea96f,_0x59f59f)=>_0x4ea96f in _0xe30eee?se(_0xe30eee,_0x4ea96f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x59f59f}):_0xe30eee[_0x4ea96f]=_0x59f59f,ie=(_0x5bdcb7,_0x3ce996,_0x1266c5,_0x13d61c)=>{for(var _0x5507c9=_0x13d61c>0x1?void 0x0:_0x13d61c?oe(_0x3ce996,_0x1266c5):_0x3ce996,_0x5a7208=_0x5bdcb7['length']-0x1,_0x459d35;_0x5a7208>=0x0;_0x5a7208--)(_0x459d35=_0x5bdcb7[_0x5a7208])&&(_0x5507c9=_0x459d35(_0x5507c9)||_0x5507c9);return _0x5507c9;},w=(_0x55efcf,_0x5cd973)=>(_0x378872,_0x44783b)=>_0x5cd973(_0x378872,_0x44783b,_0x55efcf),$=(_0x1dc2ff,_0xee071e,_0x4524eb)=>ne(_0x1dc2ff,typeof _0xee071e!=_0x1a9525(0x14b)?_0xee071e+'':_0xee071e,_0x4524eb);let b=class extends _0x14760f{constructor(_0x686d3f=M,_0x3e7257,_0x4dc320){const _0x3714ad=_0x1a9525;super(),this[_0x3714ad(0x16e)]=_0x686d3f,this[_0x3714ad(0x15f)]=_0x3e7257,this[_0x3714ad(0x189)]=_0x4dc320;const {..._0x12bc84}=_0x3fdcf6({},M,this[_0x3714ad(0x16e)]);this[_0x3714ad(0x189)][_0x3714ad(0x170)](z,_0x12bc84);}[_0x1a9525(0x177)](){const _0x4828e3=_0x1a9525;[[f],[g],[S]][_0x4828e3(0x14d)](_0x5416d7=>{const _0x1f6d7b=_0x4828e3;this[_0x1f6d7b(0x15f)][_0x1f6d7b(0x156)](_0x5416d7);});}[_0x1a9525(0x180)](){const _0x60ccf5=_0x1a9525;this['_injector'][_0x60ccf5(0x167)](g),this[_0x60ccf5(0x15f)]['get'](S);}};$(b,_0x1a9525(0x146),W),$(b,_0x1a9525(0x1a2),_0x5c86df[_0x1a9525(0x199)]),b=ie([_0x3c4a67(_0x5d7089,_0x156a54,_0x44c437),w(0x1,_0x22e7e9(_0x5645be)),w(0x2,_0x23818b)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x20a74b=_0x20e2;(function(_0x50c362,_0x5d1171){const _0x4f2de7=_0x20e2,_0x40f97e=_0x50c362();while(!![]){try{const _0xc5fd90=parseInt(_0x4f2de7(0xab))/0x1+parseInt(_0x4f2de7(0x113))/0x2+-parseInt(_0x4f2de7(0xd1))/0x3*(-parseInt(_0x4f2de7(0x10b))/0x4)+parseInt(_0x4f2de7(0xee))/0x5*(-parseInt(_0x4f2de7(0xdd))/0x6)+parseInt(_0x4f2de7(0xdc))/0x7*(parseInt(_0x4f2de7(0xbe))/0x8)+parseInt(_0x4f2de7(0xf0))/0x9*(parseInt(_0x4f2de7(0xfd))/0xa)+-parseInt(_0x4f2de7(0xc5))/0xb;if(_0xc5fd90===_0x5d1171)break;else _0x40f97e['push'](_0x40f97e['shift']());}catch(_0x490544){_0x40f97e['push'](_0x40f97e['shift']());}}}(_0x3bf6,0xd0b0d));import{CommentService as _0x4b75b4,CollaborationSessionService as _0x3be614,UniverCollaborationClientPlugin as _0x4b6bbf}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x246c8d}from'@univerjs-pro/license';import{dayjs as _0x3f8ed8,UserManagerService as _0x22c1d2,Inject as _0x1fa967,Injector as _0x431ef2,Disposable as _0x3d60b0,CustomRangeType as _0x4b5707,UniverInstanceType as _0x454787,DependentOn as _0x1cbc9c,IConfigService as _0x23eb6d,Plugin as _0x2ea3db,merge as _0xaf4b09}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x16c093}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2a53f2,IThreadCommentDataSourceService as _0x1124fa}from'@univerjs/thread-comment';import{bufferTime as _0x154957}from'rxjs';import{HTTPService as _0xfd84bc}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3d7035=>(_0x3d7035[_0x3d7035[_0x20a74b(0x100)]=0x0]=_0x20a74b(0x100),_0x3d7035[_0x3d7035[_0x20a74b(0xbd)]=0x1]=_0x20a74b(0xbd),_0x3d7035[_0x3d7035[_0x20a74b(0xcc)]=-0x1]=_0x20a74b(0xcc),_0x3d7035))(I||{}),v=(_0x1ec714=>(_0x1ec714[_0x1ec714[_0x20a74b(0xe3)]=0x0]=_0x20a74b(0xe3),_0x1ec714[_0x1ec714[_0x20a74b(0xb6)]=0x1]=_0x20a74b(0xb6),_0x1ec714[_0x1ec714['Reply']=0x2]=_0x20a74b(0xba),_0x1ec714[_0x1ec714[_0x20a74b(0xac)]=0x3]=_0x20a74b(0xac),_0x1ec714[_0x1ec714[_0x20a74b(0xfa)]=0x4]=_0x20a74b(0xfa),_0x1ec714[_0x1ec714[_0x20a74b(0xe4)]=0x5]='Solve',_0x1ec714[_0x1ec714[_0x20a74b(0xcc)]=-0x1]=_0x20a74b(0xcc),_0x1ec714))(v||{});const D=_0x103b51=>_0x3f8ed8(new Date(+_0x103b51))[_0x20a74b(0x109)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x126f72,_0x433dcc)=>{const _0x3d8352=_0x20a74b,_0xa6af42=_0x126f72[_0x3d8352(0xd9)](_0x22c1d2),_0x5b812d=_0x126f72[_0x3d8352(0xd9)](_0xfd84bc);_0x433dcc[_0x3d8352(0xc1)](_0x33d590=>{const _0x1261f4=_0x3d8352;_0xa6af42['getUser'](_0x33d590)&&_0x433dcc[_0x1261f4(0xbc)](_0x33d590);}),_0x433dcc[_0x3d8352(0xc3)]&&(await _0x5b812d['get'](_0x3d8352(0xf5),{'params':{'userIDs':[..._0x433dcc]}}))[_0x3d8352(0xd5)][_0x3d8352(0x10f)][_0x3d8352(0xc1)](_0x14b55d=>{_0x14b55d&&_0xa6af42['addUser'](_0x14b55d);});};var K=Object[_0x20a74b(0xb4)],V=(_0x3deab4,_0x31e6c5,_0x5bf38d,_0x527fd7)=>{const _0x388a68=_0x20a74b;for(var _0x5d2f20=_0x527fd7>0x1?void 0x0:_0x527fd7?K(_0x31e6c5,_0x5bf38d):_0x31e6c5,_0x3e8017=_0x3deab4[_0x388a68(0xb7)]-0x1,_0x46d868;_0x3e8017>=0x0;_0x3e8017--)(_0x46d868=_0x3deab4[_0x3e8017])&&(_0x5d2f20=_0x46d868(_0x5d2f20)||_0x5d2f20);return _0x5d2f20;},p=(_0x2e83aa,_0x200eab)=>(_0x41faec,_0x2635a3)=>_0x200eab(_0x41faec,_0x2635a3,_0x2e83aa);let S=class extends _0x3d60b0{constructor(_0x5f1116,_0x2a8635,_0xb2b2e5,_0x5d7ada){const _0x2d4695=_0x20a74b;super(),this[_0x2d4695(0xc0)]=_0x5f1116,this[_0x2d4695(0xea)]=_0x2a8635,this[_0x2d4695(0xe1)]=_0xb2b2e5,this['_injector']=_0x5d7ada,this[_0x2d4695(0xfb)](),this[_0x2d4695(0x101)]();}[_0x20a74b(0x101)](){const _0xf6a835=_0x20a74b;this['disposeWithMe'](this['_threadCommentModel'][_0xf6a835(0x110)][_0xf6a835(0xef)](_0x154957(0x10))[_0xf6a835(0xc6)](_0x53a388=>{const _0x17178e=_0xf6a835,_0x310dc2=new Set();_0x53a388['forEach'](_0x505776=>{const _0x22a5ae=_0x20e2;switch(_0x505776['type']){case _0x22a5ae(0x102):{const _0x5482c4=_0x505776['payload'][_0x22a5ae(0xec)];_0x310dc2[_0x22a5ae(0x102)](_0x5482c4);break;}}}),B(this[_0x17178e(0xd7)],_0x310dc2);}));}[_0x20a74b(0xfb)](){const _0x344999=_0x20a74b;this[_0x344999(0xe9)](this[_0x344999(0xc0)]['commentUpdate$'][_0x344999(0xc6)](async _0x5ed248=>{const _0x9326ce=_0x344999;var _0x2e5fed,_0x232999,_0x1ad7ab,_0x2e7ead;const _0x18518e=(_0x2e5fed=this['_threadCommentModel'][_0x9326ce(0xae)](_0x5ed248[_0x9326ce(0x10a)])['find'](_0x7cec4f=>_0x7cec4f[_0x9326ce(0x103)]===_0x5ed248[_0x9326ce(0x103)]))==null?void 0x0:_0x2e5fed[_0x9326ce(0xf2)];if(!_0x18518e)return;const {unitId:_0x438602,subUnitId:_0x79c642}=_0x18518e;switch(_0x5ed248['user']&&this['_userService'][_0x9326ce(0x105)](_0x5ed248[_0x9326ce(0xd8)]),_0x5ed248[_0x9326ce(0xf1)]){case v[_0x9326ce(0xb6)]:break;case v[_0x9326ce(0xba)]:{this[_0x9326ce(0xea)]['addComment'](_0x438602,_0x79c642,{'unitId':_0x438602,'subUnitId':_0x79c642,'ref':'','id':_0x5ed248[_0x9326ce(0xd3)],'dT':D(+_0x5ed248[_0x9326ce(0xdf)]),'threadId':_0x5ed248[_0x9326ce(0x103)],'personId':(_0x1ad7ab=(_0x232999=_0x5ed248[_0x9326ce(0xd8)])==null?void 0x0:_0x232999['userID'])!=null?_0x1ad7ab:_0x5ed248[_0x9326ce(0xe6)],'text':JSON[_0x9326ce(0x10d)](_0x5ed248[_0x9326ce(0xd2)]),'parentId':_0x18518e['id']});break;}case v[_0x9326ce(0xfa)]:{const _0x548fab=this['_threadCommentModel'][_0x9326ce(0xc2)](_0x438602,_0x79c642,_0x5ed248[_0x9326ce(0xd3)]);_0x548fab&&_0x548fab[_0x9326ce(0xde)]&&this[_0x9326ce(0xea)][_0x9326ce(0xca)](_0x438602,_0x79c642,_0x5ed248[_0x9326ce(0xd3)]);break;}case v[_0x9326ce(0xac)]:{this[_0x9326ce(0xea)][_0x9326ce(0x106)](_0x438602,_0x79c642,{'commentId':_0x5ed248[_0x9326ce(0xd3)],'text':JSON[_0x9326ce(0x10d)](_0x5ed248[_0x9326ce(0xd2)])});break;}case v[_0x9326ce(0xe4)]:{const _0x1ea945=(_0x2e7ead=this[_0x9326ce(0xea)][_0x9326ce(0xae)](_0x5ed248[_0x9326ce(0x10a)])[_0x9326ce(0xda)](_0x3a0e0b=>_0x3a0e0b[_0x9326ce(0x103)]===_0x5ed248[_0x9326ce(0x103)]))==null?void 0x0:_0x2e7ead['root'];_0x1ea945&&this[_0x9326ce(0xea)][_0x9326ce(0xb5)](_0x438602,_0x79c642,_0x1ea945['id'],_0x5ed248['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x1fa967(_0x4b75b4)),p(0x1,_0x1fa967(_0x2a53f2)),p(0x2,_0x1fa967(_0x22c1d2)),p(0x3,_0x1fa967(_0x431ef2))],S);const z=_0x20a74b(0xe5),M={};var k=Object[_0x20a74b(0xb4)],Q=(_0x4ce085,_0x3bc272,_0x52001e,_0x1f20fc)=>{const _0x504c43=_0x20a74b;for(var _0x33e08b=_0x1f20fc>0x1?void 0x0:_0x1f20fc?k(_0x3bc272,_0x52001e):_0x3bc272,_0x5b4510=_0x4ce085[_0x504c43(0xb7)]-0x1,_0x4000ed;_0x5b4510>=0x0;_0x5b4510--)(_0x4000ed=_0x4ce085[_0x5b4510])&&(_0x33e08b=_0x4000ed(_0x33e08b)||_0x33e08b);return _0x33e08b;},_=(_0x429273,_0x130b78)=>(_0x5b8944,_0x1c7ed0)=>_0x130b78(_0x5b8944,_0x1c7ed0,_0x429273);function X(_0x585887,_0x2a7387){const _0x2c9241=_0x20a74b,_0x451b84=_0x585887[_0x2c9241(0xc8)][0x0];return{..._0x2a7387,'id':_0x451b84[_0x2c9241(0xd3)],'resolved':_0x585887[_0x2c9241(0xdb)]===0x1,'dT':D(_0x451b84['createTimestamp']),'personId':_0x451b84[_0x2c9241(0xe6)],'threadId':_0x451b84[_0x2c9241(0x103)]};}function ee(_0x49efdc,_0x5d2c1b,_0x571212){const _0x5e529c=_0x20a74b;var _0x35fd65,_0x367b8d;if(((_0x367b8d=(_0x35fd65=_0x49efdc==null?void 0x0:_0x49efdc[_0x5e529c(0xc8)])==null?void 0x0:_0x35fd65[_0x5e529c(0xb7)])!=null?_0x367b8d:0x0)>0x0){const _0x1a66cb=(_0x718e91,_0x103512)=>({'id':_0x718e91['replyId'],'threadId':_0x718e91['threadId'],'dT':D(_0x718e91[_0x5e529c(0xdf)]),'personId':_0x718e91[_0x5e529c(0xe6)],'resolved':_0x49efdc[_0x5e529c(0xdb)]===I[_0x5e529c(0xbd)],'unitId':_0x5d2c1b,'subUnitId':_0x571212,'text':JSON['parse'](_0x718e91[_0x5e529c(0xd2)]),'parentId':_0x103512}),_0x507c2b=_0x1a66cb(_0x49efdc['replies'][0x0]);return{..._0x507c2b,'children':_0x49efdc['replies'][_0x5e529c(0xe2)](0x1)[_0x5e529c(0xe0)](_0x5c6960=>_0x1a66cb(_0x5c6960,_0x507c2b['id']))};}return null;}let f=class{constructor(_0x376eba,_0xdc15e4,_0x27a540,_0x3a4107){const _0x506a44=_0x20a74b;this[_0x506a44(0xf6)]=_0x376eba,this['_userService']=_0xdc15e4,this['_sessionService']=_0x27a540,this[_0x506a44(0xd7)]=_0x3a4107;}async[_0x20a74b(0xb1)](_0x333fb0){const _0x20d2d4=_0x20a74b;var _0x14f27d,_0x3d9b21;const {parentId:_0x1db62d,unitId:_0x2f5824,text:_0x39b829,threadId:_0x52f32d}=_0x333fb0,_0x284372=(_0x3d9b21=(_0x14f27d=_0x39b829[_0x20d2d4(0xb2)])==null?void 0x0:_0x14f27d[_0x20d2d4(0xce)](_0x31b4e6=>_0x31b4e6['rangeType']===_0x4b5707[_0x20d2d4(0xb3)])['map'](_0x499e5d=>_0x499e5d['rangeId']))!=null?_0x3d9b21:[],_0x33d721=JSON['stringify'](_0x39b829),_0xa757b8=(await this[_0x20d2d4(0xf3)]['requireSession'](_0x2f5824))[_0x20d2d4(0xff)]();if(_0x1db62d){const _0x3d93db={'memberId':_0xa757b8,'unitId':_0x2f5824,'content':_0x33d721,'mention':_0x284372,'threadId':_0x52f32d},_0x4b9625=(await this['_httpService'][_0x20d2d4(0xad)](_0x20d2d4(0x112)+_0x2f5824+_0x20d2d4(0xf7),{'body':_0x3d93db}))[_0x20d2d4(0xd5)][_0x20d2d4(0xb0)];return{..._0x333fb0,'id':_0x4b9625[_0x20d2d4(0xd3)],'dT':_0x3f8ed8(+_0x4b9625['createTimestamp'])[_0x20d2d4(0x109)](_0x20d2d4(0xbb)),'personId':_0x4b9625[_0x20d2d4(0xe6)]};}else{const _0x17ae30={'memberId':_0xa757b8,'unitId':_0x2f5824,'content':_0x33d721,'mention':_0x284372},_0x43ce5d=await this[_0x20d2d4(0xf6)][_0x20d2d4(0xad)]('/universer-api/comment/unit/'+_0x2f5824+'/add',{'body':_0x17ae30});return X(_0x43ce5d[_0x20d2d4(0xd5)][_0x20d2d4(0xaf)],_0x333fb0);}}async['updateComment'](_0x45b2fa){const _0x54c534=_0x20a74b;var _0x1975a6,_0x2291a9;const {text:_0x4b3ab9,unitId:_0x1a7e96}=_0x45b2fa,_0x5d870a=(_0x2291a9=(_0x1975a6=_0x4b3ab9[_0x54c534(0xb2)])==null?void 0x0:_0x1975a6['filter'](_0x115aaa=>_0x115aaa[_0x54c534(0xed)]===_0x4b5707[_0x54c534(0xb3)])[_0x54c534(0xe0)](_0x175c58=>_0x175c58[_0x54c534(0x107)]))!=null?_0x2291a9:[],_0x1c5990=JSON[_0x54c534(0xfc)](_0x4b3ab9),_0xd2c4aa=_0x45b2fa['threadId'],_0x1c8246=_0x45b2fa['id'],_0x8f1249={'memberId':(await this[_0x54c534(0xf3)][_0x54c534(0x111)](_0x1a7e96))['getMemberID'](),'unitId':_0x1a7e96,'threadId':_0xd2c4aa,'mention':_0x5d870a,'content':_0x1c5990,'replyId':_0x1c8246},_0x4116e4=await this['_httpService'][_0x54c534(0xad)](_0x54c534(0x112)+_0x1a7e96+_0x54c534(0xc4),{'body':_0x8f1249});return!_0x4116e4['body'][_0x54c534(0x10c)]||_0x4116e4[_0x54c534(0xd5)][_0x54c534(0x10c)][_0x54c534(0x108)]===0x1;}async[_0x20a74b(0xb5)](_0x2d5d51){const _0x446402=_0x20a74b,{unitId:_0x3b3db2}=_0x2d5d51,_0x2c4b99=_0x2d5d51[_0x446402(0x103)],_0x574527={'memberId':this['_userService'][_0x446402(0xe7)]()[_0x446402(0xcd)],'unitId':_0x3b3db2,'threadId':_0x2c4b99,'solved':_0x2d5d51[_0x446402(0xb9)]?I[_0x446402(0xbd)]:I['OpenOrReOpen']},_0x5b06be=await this[_0x446402(0xf6)][_0x446402(0xad)](_0x446402(0x112)+_0x3b3db2+_0x446402(0x104),{'body':_0x574527});return!_0x5b06be['body'][_0x446402(0x10c)]||_0x5b06be[_0x446402(0xd5)][_0x446402(0x10c)]['code']===0x1;}async['deleteComment'](_0x531d5e,_0x3b6e18,_0x9c1de3,_0x304a42){const _0x528b40=_0x20a74b,_0x5fe773={'memberId':(await this[_0x528b40(0xf3)][_0x528b40(0x111)](_0x531d5e))[_0x528b40(0xff)](),'threadId':_0x9c1de3,'replyId':_0x304a42,'unitId':_0x531d5e},_0x1ea861=await this[_0x528b40(0xf6)][_0x528b40(0xad)](_0x528b40(0x112)+_0x531d5e+'/delete',{'body':_0x5fe773});return!_0x1ea861['body'][_0x528b40(0x10c)]||_0x1ea861[_0x528b40(0xd5)][_0x528b40(0x10c)]['code']===0x1;}async[_0x20a74b(0xcb)](_0x2e466c,_0x51471e,_0x199329){const _0x438a31=_0x20a74b,_0xac976a={'unitId':_0x2e466c,'threadId':_0x199329},_0x4837cf=await this[_0x438a31(0xf6)][_0x438a31(0xad)](_0x438a31(0x112)+_0x2e466c+_0x438a31(0xb8),{'body':_0xac976a}),_0x4ca61a=_0x199329[_0x438a31(0xe0)](_0x4463a0=>ee(_0x4837cf[_0x438a31(0xd5)][_0x438a31(0xeb)][_0x4463a0],_0x2e466c,_0x51471e))[_0x438a31(0xce)](Boolean);return Object['values'](_0x4837cf[_0x438a31(0xd5)][_0x438a31(0x10f)])[_0x438a31(0xc1)](_0x1cf3bc=>{const _0x5449ab=_0x438a31;this['_userService'][_0x5449ab(0x105)](_0x1cf3bc);}),_0x4ca61a;}['saveCommentToSnapshot'](_0x1725af){const _0x3bbef9=_0x20a74b;return{'id':_0x1725af['id'],'threadId':_0x1725af[_0x3bbef9(0x103)],'ref':_0x1725af[_0x3bbef9(0xd4)]};}};function _0x3bf6(){const _0xe03d6d=['rangeId','code','format','unitId','146088pQxdwH','error','parse','_threadCommentDataSourceService','users','commentUpdate$','requireSession','/universer-api/comment/unit/','495602pFoiju','459815ATPUMT','Edit','post','getUnit','comment','reply','addComment','customRanges','COMMENT','getOwnPropertyDescriptor','resolveComment','Add','length','/list','resolved','Reply','YYYY/MM/DD\x20HH:mm','delete','Solved','8glTgdb','onReady','_commentService','forEach','getComment','size','/edit','16363149xfPmMV','subscribe','_initDataSource','replies','_config','deleteComment','listComments','UNRECOGNIZED','userID','filter','_threadCommentDataSource','dataSource','123UDNfEx','content','replyId','ref','body','syncUpdateMutationToColla','_injector','user','get','find','solved','6576773HqCaVR','982968myMRkw','parentId','createTimestamp','map','_userService','slice','Unknown','Solve','thread-comment-data-source.config','userId','getCurrentUser','pluginName','disposeWithMe','_threadCommentModel','comments','personId','rangeType','30WXkuGq','pipe','1467InGCRl','type','root','_sessionService','setConfig','/universer-api/user/list','_httpService','/reply','_configService','defineProperty','Delete','_init','stringify','11090pSZcaW','onStarting','getMemberID','OpenOrReOpen','_initUserSync','add','threadId','/solved','addUser','updateComment'];_0x3bf6=function(){return _0xe03d6d;};return _0x3bf6();}f=Q([_(0x0,_0x1fa967(_0xfd84bc)),_(0x1,_0x1fa967(_0x22c1d2)),_(0x2,_0x1fa967(_0x3be614)),_(0x3,_0x1fa967(_0x431ef2))],f);var re=Object[_0x20a74b(0xb4)],te=(_0x52b38e,_0x3a0aea,_0x10d979,_0x2f7597)=>{const _0x39e152=_0x20a74b;for(var _0x1b75e8=_0x2f7597>0x1?void 0x0:_0x2f7597?re(_0x3a0aea,_0x10d979):_0x3a0aea,_0x447c5b=_0x52b38e[_0x39e152(0xb7)]-0x1,_0x4cddae;_0x447c5b>=0x0;_0x447c5b--)(_0x4cddae=_0x52b38e[_0x447c5b])&&(_0x1b75e8=_0x4cddae(_0x1b75e8)||_0x1b75e8);return _0x1b75e8;},N=(_0x24700d,_0x1706f2)=>(_0x5ce26e,_0x182a81)=>_0x1706f2(_0x5ce26e,_0x182a81,_0x24700d);let g=class extends _0x3d60b0{constructor(_0x1a940d,_0x38bb2f){const _0x1b14a3=_0x20a74b;super(),this[_0x1b14a3(0x10e)]=_0x1a940d,this[_0x1b14a3(0xcf)]=_0x38bb2f,this['_initDataSource']();}[_0x20a74b(0xc7)](){const _0x12df49=_0x20a74b;this['_threadCommentDataSourceService'][_0x12df49(0xd0)]=this[_0x12df49(0xcf)],this[_0x12df49(0x10e)][_0x12df49(0xd6)]=!0x1;}};g=te([N(0x0,_0x1124fa),N(0x1,_0x1fa967(f))],g);var se=Object[_0x20a74b(0xf9)],oe=Object[_0x20a74b(0xb4)],ne=(_0x1db562,_0x4616a8,_0x5e2aee)=>_0x4616a8 in _0x1db562?se(_0x1db562,_0x4616a8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5e2aee}):_0x1db562[_0x4616a8]=_0x5e2aee,ie=(_0x1da722,_0x1ce987,_0x297a3c,_0x33ca64)=>{const _0x12f017=_0x20a74b;for(var _0x3ec87e=_0x33ca64>0x1?void 0x0:_0x33ca64?oe(_0x1ce987,_0x297a3c):_0x1ce987,_0x1d4b7f=_0x1da722[_0x12f017(0xb7)]-0x1,_0x170c80;_0x1d4b7f>=0x0;_0x1d4b7f--)(_0x170c80=_0x1da722[_0x1d4b7f])&&(_0x3ec87e=_0x170c80(_0x3ec87e)||_0x3ec87e);return _0x3ec87e;},w=(_0x73f80b,_0x330487)=>(_0xa4bbf2,_0x208b23)=>_0x330487(_0xa4bbf2,_0x208b23,_0x73f80b),$=(_0xb9a2f4,_0x367c23,_0x1c2117)=>ne(_0xb9a2f4,typeof _0x367c23!='symbol'?_0x367c23+'':_0x367c23,_0x1c2117);function _0x20e2(_0x589365,_0x52130a){const _0x3bf635=_0x3bf6();return _0x20e2=function(_0x20e279,_0x2ea4f9){_0x20e279=_0x20e279-0xab;let _0x27577d=_0x3bf635[_0x20e279];return _0x27577d;},_0x20e2(_0x589365,_0x52130a);}let b=class extends _0x2ea3db{constructor(_0x2206b3=M,_0x2d1697,_0x4eec9e){const _0x4cbd21=_0x20a74b;super(),this[_0x4cbd21(0xc9)]=_0x2206b3,this['_injector']=_0x2d1697,this[_0x4cbd21(0xf8)]=_0x4eec9e;const {..._0x5de503}=_0xaf4b09({},M,this[_0x4cbd21(0xc9)]);this[_0x4cbd21(0xf8)][_0x4cbd21(0xf4)](z,_0x5de503);}[_0x20a74b(0xfe)](){const _0x4ce2f1=_0x20a74b;[[f],[g],[S]][_0x4ce2f1(0xc1)](_0x3f8881=>{const _0x1b2ee7=_0x4ce2f1;this[_0x1b2ee7(0xd7)][_0x1b2ee7(0x102)](_0x3f8881);});}[_0x20a74b(0xbf)](){const _0x1c117b=_0x20a74b;this[_0x1c117b(0xd7)][_0x1c117b(0xd9)](g),this[_0x1c117b(0xd7)]['get'](S);}};$(b,_0x20a74b(0xe8),W),$(b,'type',_0x454787['UNIVER_UNKNOWN']),b=ie([_0x1cbc9c(_0x16c093,_0x4b6bbf,_0x246c8d),w(0x1,_0x1fa967(_0x431ef2)),w(0x2,_0x23eb6d)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x1a9525=_0x281e;(function(_0x29b3a3,_0x2d8e36){const _0x292153=_0x281e,_0x500b2b=_0x29b3a3();while(!![]){try{const _0x4e0f9e=-parseInt(_0x292153(0x150))/0x1*(-parseInt(_0x292153(0x152))/0x2)+parseInt(_0x292153(0x186))/0x3*(parseInt(_0x292153(0x149))/0x4)+-parseInt(_0x292153(0x15b))/0x5*(parseInt(_0x292153(0x191))/0x6)+parseInt(_0x292153(0x192))/0x7+-parseInt(_0x292153(0x14c))/0x8*(-parseInt(_0x292153(0x154))/0x9)+-parseInt(_0x292153(0x16b))/0xa*(parseInt(_0x292153(0x165))/0xb)+parseInt(_0x292153(0x188))/0xc*(-parseInt(_0x292153(0x160))/0xd);if(_0x4e0f9e===_0x2d8e36)break;else _0x500b2b['push'](_0x500b2b['shift']());}catch(_0x57215d){_0x500b2b['push'](_0x500b2b['shift']());}}}(_0x5a97,0x32e0f));import{CommentService as _0x40c369,CollaborationSessionService as _0xb5f0f6,UniverCollaborationClientPlugin as _0x156a54}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x44c437}from'@univerjs-pro/license';import{dayjs as _0x8d8ae0,UserManagerService as _0x3744cb,Inject as _0x22e7e9,Injector as _0x5645be,Disposable as _0x52e380,CustomRangeType as _0x3fa89b,UniverInstanceType as _0x5c86df,DependentOn as _0x3c4a67,IConfigService as _0x23818b,Plugin as _0x14760f,merge as _0x3fdcf6}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5d7089}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x94249b,IThreadCommentDataSourceService as _0x14199e}from'@univerjs/thread-comment';import{bufferTime as _0x3dfed0}from'rxjs';function _0x281e(_0x5d54cf,_0x37828b){const _0x5a97c4=_0x5a97();return _0x281e=function(_0x281e15,_0xaeb5d7){_0x281e15=_0x281e15-0x13f;let _0x375546=_0x5a97c4[_0x281e15];return _0x375546;},_0x281e(_0x5d54cf,_0x37828b);}import{HTTPService as _0x207092}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2854b3=>(_0x2854b3[_0x2854b3[_0x1a9525(0x157)]=0x0]=_0x1a9525(0x157),_0x2854b3[_0x2854b3[_0x1a9525(0x184)]=0x1]=_0x1a9525(0x184),_0x2854b3[_0x2854b3['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2854b3))(I||{}),v=(_0xa6053e=>(_0xa6053e[_0xa6053e[_0x1a9525(0x198)]=0x0]=_0x1a9525(0x198),_0xa6053e[_0xa6053e[_0x1a9525(0x13f)]=0x1]='Add',_0xa6053e[_0xa6053e['Reply']=0x2]=_0x1a9525(0x143),_0xa6053e[_0xa6053e[_0x1a9525(0x159)]=0x3]=_0x1a9525(0x159),_0xa6053e[_0xa6053e[_0x1a9525(0x190)]=0x4]=_0x1a9525(0x190),_0xa6053e[_0xa6053e[_0x1a9525(0x18f)]=0x5]=_0x1a9525(0x18f),_0xa6053e[_0xa6053e[_0x1a9525(0x17f)]=-0x1]=_0x1a9525(0x17f),_0xa6053e))(v||{});const D=_0x2f9ac0=>_0x8d8ae0(new Date(+_0x2f9ac0))[_0x1a9525(0x187)](_0x1a9525(0x17a)),B=async(_0x466682,_0x4ba6fc)=>{const _0x43f220=_0x1a9525,_0x451675=_0x466682[_0x43f220(0x167)](_0x3744cb),_0x16c8b0=_0x466682['get'](_0x207092);_0x4ba6fc['forEach'](_0x295762=>{const _0x57bd28=_0x43f220;_0x451675[_0x57bd28(0x140)](_0x295762)&&_0x4ba6fc[_0x57bd28(0x15c)](_0x295762);}),_0x4ba6fc[_0x43f220(0x1a8)]&&(await _0x16c8b0[_0x43f220(0x167)](_0x43f220(0x166),{'params':{'userIDs':[..._0x4ba6fc]}}))[_0x43f220(0x144)][_0x43f220(0x155)][_0x43f220(0x14d)](_0x34e0ea=>{const _0x2c12a1=_0x43f220;_0x34e0ea&&_0x451675[_0x2c12a1(0x175)](_0x34e0ea);});};var K=Object[_0x1a9525(0x151)],V=(_0x41501a,_0x359580,_0x2a9c4b,_0x3a0312)=>{const _0x158f61=_0x1a9525;for(var _0x30e415=_0x3a0312>0x1?void 0x0:_0x3a0312?K(_0x359580,_0x2a9c4b):_0x359580,_0x292757=_0x41501a[_0x158f61(0x16f)]-0x1,_0x2adb6d;_0x292757>=0x0;_0x292757--)(_0x2adb6d=_0x41501a[_0x292757])&&(_0x30e415=_0x2adb6d(_0x30e415)||_0x30e415);return _0x30e415;},p=(_0x29f0e2,_0x1e5c94)=>(_0x54c32f,_0x591cff)=>_0x1e5c94(_0x54c32f,_0x591cff,_0x29f0e2);let S=class extends _0x52e380{constructor(_0x9ae7ac,_0x52ac7a,_0x1fd2f4,_0x1a70e8){const _0x15073c=_0x1a9525;super(),this[_0x15073c(0x18c)]=_0x9ae7ac,this[_0x15073c(0x19a)]=_0x52ac7a,this[_0x15073c(0x179)]=_0x1fd2f4,this['_injector']=_0x1a70e8,this[_0x15073c(0x1ab)](),this[_0x15073c(0x195)]();}['_initUserSync'](){const _0x43b798=_0x1a9525;this[_0x43b798(0x1a5)](this[_0x43b798(0x19a)][_0x43b798(0x145)][_0x43b798(0x19c)](_0x3dfed0(0x10))['subscribe'](_0x565d36=>{const _0x5414a9=_0x43b798,_0x873893=new Set();_0x565d36[_0x5414a9(0x14d)](_0x452d1d=>{const _0x3b75af=_0x5414a9;switch(_0x452d1d[_0x3b75af(0x1a2)]){case'add':{const _0x246373=_0x452d1d[_0x3b75af(0x161)][_0x3b75af(0x181)];_0x873893[_0x3b75af(0x156)](_0x246373);break;}}}),B(this[_0x5414a9(0x15f)],_0x873893);}));}[_0x1a9525(0x1ab)](){const _0x50dd4e=_0x1a9525;this[_0x50dd4e(0x1a5)](this[_0x50dd4e(0x18c)][_0x50dd4e(0x145)][_0x50dd4e(0x176)](async _0xdfa244=>{const _0x433fcc=_0x50dd4e;var _0x3cd55e,_0x24f8b8,_0x5480fc,_0x4487f4;const _0x383e74=(_0x3cd55e=this[_0x433fcc(0x19a)][_0x433fcc(0x1a6)](_0xdfa244[_0x433fcc(0x158)])[_0x433fcc(0x1a7)](_0x55b7a3=>_0x55b7a3[_0x433fcc(0x142)]===_0xdfa244[_0x433fcc(0x142)]))==null?void 0x0:_0x3cd55e['root'];if(!_0x383e74)return;const {unitId:_0x385c67,subUnitId:_0x55b27a}=_0x383e74;switch(_0xdfa244[_0x433fcc(0x1a4)]&&this[_0x433fcc(0x179)][_0x433fcc(0x175)](_0xdfa244['user']),_0xdfa244[_0x433fcc(0x1a2)]){case v[_0x433fcc(0x13f)]:break;case v[_0x433fcc(0x143)]:{this[_0x433fcc(0x19a)][_0x433fcc(0x15a)](_0x385c67,_0x55b27a,{'unitId':_0x385c67,'subUnitId':_0x55b27a,'ref':'','id':_0xdfa244[_0x433fcc(0x162)],'dT':D(+_0xdfa244[_0x433fcc(0x153)]),'threadId':_0xdfa244['threadId'],'personId':(_0x5480fc=(_0x24f8b8=_0xdfa244[_0x433fcc(0x1a4)])==null?void 0x0:_0x24f8b8['userID'])!=null?_0x5480fc:_0xdfa244['userId'],'text':JSON[_0x433fcc(0x14a)](_0xdfa244[_0x433fcc(0x17c)]),'parentId':_0x383e74['id']});break;}case v[_0x433fcc(0x190)]:{const _0x3644f6=this[_0x433fcc(0x19a)][_0x433fcc(0x168)](_0x385c67,_0x55b27a,_0xdfa244[_0x433fcc(0x162)]);_0x3644f6&&_0x3644f6[_0x433fcc(0x18a)]&&this[_0x433fcc(0x19a)][_0x433fcc(0x1a1)](_0x385c67,_0x55b27a,_0xdfa244[_0x433fcc(0x162)]);break;}case v[_0x433fcc(0x159)]:{this[_0x433fcc(0x19a)]['updateComment'](_0x385c67,_0x55b27a,{'commentId':_0xdfa244[_0x433fcc(0x162)],'text':JSON[_0x433fcc(0x14a)](_0xdfa244[_0x433fcc(0x17c)])});break;}case v[_0x433fcc(0x18f)]:{const _0x4edcd5=(_0x4487f4=this['_threadCommentModel'][_0x433fcc(0x1a6)](_0xdfa244[_0x433fcc(0x158)])[_0x433fcc(0x1a7)](_0x31b569=>_0x31b569[_0x433fcc(0x142)]===_0xdfa244[_0x433fcc(0x142)]))==null?void 0x0:_0x4487f4['root'];_0x4edcd5&&this[_0x433fcc(0x19a)][_0x433fcc(0x14f)](_0x385c67,_0x55b27a,_0x4edcd5['id'],_0xdfa244[_0x433fcc(0x14e)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x22e7e9(_0x40c369)),p(0x1,_0x22e7e9(_0x94249b)),p(0x2,_0x22e7e9(_0x3744cb)),p(0x3,_0x22e7e9(_0x5645be))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x1a9525(0x151)],Q=(_0x415310,_0x5a4bd2,_0xe1fd49,_0x4f86c3)=>{const _0x33407d=_0x1a9525;for(var _0x5830e7=_0x4f86c3>0x1?void 0x0:_0x4f86c3?k(_0x5a4bd2,_0xe1fd49):_0x5a4bd2,_0x99997b=_0x415310[_0x33407d(0x16f)]-0x1,_0x5038eb;_0x99997b>=0x0;_0x99997b--)(_0x5038eb=_0x415310[_0x99997b])&&(_0x5830e7=_0x5038eb(_0x5830e7)||_0x5830e7);return _0x5830e7;},_=(_0x56b842,_0x531499)=>(_0x41b231,_0x5b228e)=>_0x531499(_0x41b231,_0x5b228e,_0x56b842);function X(_0x1dc29f,_0x55b3e8){const _0x283aea=_0x1a9525,_0x5ba95d=_0x1dc29f[_0x283aea(0x178)][0x0];return{..._0x55b3e8,'id':_0x5ba95d[_0x283aea(0x162)],'resolved':_0x1dc29f[_0x283aea(0x14e)]===0x1,'dT':D(_0x5ba95d[_0x283aea(0x153)]),'personId':_0x5ba95d[_0x283aea(0x163)],'threadId':_0x5ba95d[_0x283aea(0x142)]};}function ee(_0xf45a16,_0x380eb4,_0x556894){const _0x1f9b87=_0x1a9525;var _0x463bb7,_0x5908a9;if(((_0x5908a9=(_0x463bb7=_0xf45a16==null?void 0x0:_0xf45a16[_0x1f9b87(0x178)])==null?void 0x0:_0x463bb7[_0x1f9b87(0x16f)])!=null?_0x5908a9:0x0)>0x0){const _0x1be153=(_0x2f8038,_0x2fe42e)=>({'id':_0x2f8038[_0x1f9b87(0x162)],'threadId':_0x2f8038['threadId'],'dT':D(_0x2f8038['createTimestamp']),'personId':_0x2f8038[_0x1f9b87(0x163)],'resolved':_0xf45a16[_0x1f9b87(0x14e)]===I[_0x1f9b87(0x184)],'unitId':_0x380eb4,'subUnitId':_0x556894,'text':JSON[_0x1f9b87(0x14a)](_0x2f8038[_0x1f9b87(0x17c)]),'parentId':_0x2fe42e}),_0x15a128=_0x1be153(_0xf45a16[_0x1f9b87(0x178)][0x0]);return{..._0x15a128,'children':_0xf45a16[_0x1f9b87(0x178)][_0x1f9b87(0x17b)](0x1)[_0x1f9b87(0x185)](_0xb4aa20=>_0x1be153(_0xb4aa20,_0x15a128['id']))};}return null;}let f=class{constructor(_0x170bb6,_0x36beb0,_0x28ed81,_0x41427a){const _0x5d54ec=_0x1a9525;this[_0x5d54ec(0x173)]=_0x170bb6,this[_0x5d54ec(0x179)]=_0x36beb0,this[_0x5d54ec(0x17e)]=_0x28ed81,this[_0x5d54ec(0x15f)]=_0x41427a;}async[_0x1a9525(0x15a)](_0x170fb8){const _0x5eb96b=_0x1a9525;var _0x4c0deb,_0x3bcdf4;const {parentId:_0x484456,unitId:_0x3df598,text:_0x38a5a8,threadId:_0x53931a}=_0x170fb8,_0x304d2e=(_0x3bcdf4=(_0x4c0deb=_0x38a5a8[_0x5eb96b(0x17d)])==null?void 0x0:_0x4c0deb[_0x5eb96b(0x15d)](_0x392cf3=>_0x392cf3[_0x5eb96b(0x19d)]===_0x3fa89b[_0x5eb96b(0x15e)])[_0x5eb96b(0x185)](_0x149650=>_0x149650[_0x5eb96b(0x19b)]))!=null?_0x3bcdf4:[],_0x37b017=JSON[_0x5eb96b(0x164)](_0x38a5a8),_0x3fe66f=(await this[_0x5eb96b(0x17e)]['requireSession'](_0x3df598))['getMemberID']();if(_0x484456){const _0x4da751={'memberId':_0x3fe66f,'unitId':_0x3df598,'content':_0x37b017,'mention':_0x304d2e,'threadId':_0x53931a},_0x8dc241=(await this[_0x5eb96b(0x173)][_0x5eb96b(0x19e)]('/universer-api/comment/unit/'+_0x3df598+_0x5eb96b(0x171),{'body':_0x4da751}))[_0x5eb96b(0x144)][_0x5eb96b(0x1a0)];return{..._0x170fb8,'id':_0x8dc241[_0x5eb96b(0x162)],'dT':_0x8d8ae0(+_0x8dc241['createTimestamp'])[_0x5eb96b(0x187)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x8dc241[_0x5eb96b(0x163)]};}else{const _0xd0b960={'memberId':_0x3fe66f,'unitId':_0x3df598,'content':_0x37b017,'mention':_0x304d2e},_0x5b586c=await this['_httpService'][_0x5eb96b(0x19e)]('/universer-api/comment/unit/'+_0x3df598+_0x5eb96b(0x147),{'body':_0xd0b960});return X(_0x5b586c['body'][_0x5eb96b(0x1a3)],_0x170fb8);}}async[_0x1a9525(0x18e)](_0x147bb9){const _0x16c9a1=_0x1a9525;var _0x2f7eca,_0xd942d6;const {text:_0x39bce1,unitId:_0x5c0973}=_0x147bb9,_0x1a0660=(_0xd942d6=(_0x2f7eca=_0x39bce1['customRanges'])==null?void 0x0:_0x2f7eca[_0x16c9a1(0x15d)](_0x43eff0=>_0x43eff0['rangeType']===_0x3fa89b[_0x16c9a1(0x15e)])[_0x16c9a1(0x185)](_0x2f20cb=>_0x2f20cb[_0x16c9a1(0x19b)]))!=null?_0xd942d6:[],_0x37828c=JSON['stringify'](_0x39bce1),_0x443d5e=_0x147bb9['threadId'],_0x4dd1d1=_0x147bb9['id'],_0x5c4fe1={'memberId':(await this['_sessionService'][_0x16c9a1(0x193)](_0x5c0973))[_0x16c9a1(0x183)](),'unitId':_0x5c0973,'threadId':_0x443d5e,'mention':_0x1a0660,'content':_0x37828c,'replyId':_0x4dd1d1},_0x49e4a8=await this[_0x16c9a1(0x173)][_0x16c9a1(0x19e)]('/universer-api/comment/unit/'+_0x5c0973+_0x16c9a1(0x194),{'body':_0x5c4fe1});return!_0x49e4a8[_0x16c9a1(0x144)]['error']||_0x49e4a8['body']['error'][_0x16c9a1(0x196)]===0x1;}async['resolveComment'](_0x223bdd){const _0x2d163a=_0x1a9525,{unitId:_0x659991}=_0x223bdd,_0x20c221=_0x223bdd[_0x2d163a(0x142)],_0x43ba23={'memberId':this['_userService'][_0x2d163a(0x1a9)]()[_0x2d163a(0x182)],'unitId':_0x659991,'threadId':_0x20c221,'solved':_0x223bdd[_0x2d163a(0x1aa)]?I[_0x2d163a(0x184)]:I[_0x2d163a(0x157)]},_0x3e663d=await this[_0x2d163a(0x173)][_0x2d163a(0x19e)](_0x2d163a(0x16a)+_0x659991+'/solved',{'body':_0x43ba23});return!_0x3e663d[_0x2d163a(0x144)]['error']||_0x3e663d['body']['error'][_0x2d163a(0x196)]===0x1;}async['deleteComment'](_0x31c426,_0x109a50,_0x5221d3,_0x54f231){const _0x1163cc=_0x1a9525,_0x4f28d4={'memberId':(await this[_0x1163cc(0x17e)][_0x1163cc(0x193)](_0x31c426))[_0x1163cc(0x183)](),'threadId':_0x5221d3,'replyId':_0x54f231,'unitId':_0x31c426},_0x4ec5f4=await this[_0x1163cc(0x173)][_0x1163cc(0x19e)]('/universer-api/comment/unit/'+_0x31c426+'/delete',{'body':_0x4f28d4});return!_0x4ec5f4[_0x1163cc(0x144)][_0x1163cc(0x16c)]||_0x4ec5f4['body'][_0x1163cc(0x16c)][_0x1163cc(0x196)]===0x1;}async[_0x1a9525(0x18b)](_0x2c8eb7,_0x15bdd5,_0x2516e5){const _0x3b03d9=_0x1a9525,_0x287236={'unitId':_0x2c8eb7,'threadId':_0x2516e5},_0x4d9369=await this[_0x3b03d9(0x173)]['post'](_0x3b03d9(0x16a)+_0x2c8eb7+_0x3b03d9(0x172),{'body':_0x287236}),_0x2a38fd=_0x2516e5[_0x3b03d9(0x185)](_0x22e9f5=>ee(_0x4d9369[_0x3b03d9(0x144)][_0x3b03d9(0x169)][_0x22e9f5],_0x2c8eb7,_0x15bdd5))[_0x3b03d9(0x15d)](Boolean);return Object[_0x3b03d9(0x174)](_0x4d9369[_0x3b03d9(0x144)]['users'])[_0x3b03d9(0x14d)](_0x23253f=>{const _0x472c18=_0x3b03d9;this[_0x472c18(0x179)][_0x472c18(0x175)](_0x23253f);}),_0x2a38fd;}[_0x1a9525(0x16d)](_0x25fdeb){const _0xfeeeb2=_0x1a9525;return{'id':_0x25fdeb['id'],'threadId':_0x25fdeb[_0xfeeeb2(0x142)],'ref':_0x25fdeb[_0xfeeeb2(0x141)]};}};f=Q([_(0x0,_0x22e7e9(_0x207092)),_(0x1,_0x22e7e9(_0x3744cb)),_(0x2,_0x22e7e9(_0xb5f0f6)),_(0x3,_0x22e7e9(_0x5645be))],f);var re=Object[_0x1a9525(0x151)],te=(_0x1b5106,_0x165841,_0x58a085,_0x1c1e4a)=>{const _0x289f95=_0x1a9525;for(var _0x59ce3c=_0x1c1e4a>0x1?void 0x0:_0x1c1e4a?re(_0x165841,_0x58a085):_0x165841,_0x26c42e=_0x1b5106[_0x289f95(0x16f)]-0x1,_0x3adca6;_0x26c42e>=0x0;_0x26c42e--)(_0x3adca6=_0x1b5106[_0x26c42e])&&(_0x59ce3c=_0x3adca6(_0x59ce3c)||_0x59ce3c);return _0x59ce3c;},N=(_0x44988c,_0x577d11)=>(_0x1886a8,_0x20115d)=>_0x577d11(_0x1886a8,_0x20115d,_0x44988c);let g=class extends _0x52e380{constructor(_0x44cee3,_0x1d1169){const _0x487315=_0x1a9525;super(),this['_threadCommentDataSourceService']=_0x44cee3,this[_0x487315(0x197)]=_0x1d1169,this[_0x487315(0x19f)]();}[_0x1a9525(0x19f)](){const _0x1c2763=_0x1a9525;this[_0x1c2763(0x148)]['dataSource']=this[_0x1c2763(0x197)],this[_0x1c2763(0x148)]['syncUpdateMutationToColla']=!0x1;}};function _0x5a97(){const _0x388fcc=['/reply','/list','_httpService','values','addUser','subscribe','onStarting','replies','_userService','YYYY/MM/DD\x20HH:mm','slice','content','customRanges','_sessionService','UNRECOGNIZED','onReady','personId','userID','getMemberID','Solved','map','30dqSJtM','format','12ZUlxxC','_configService','parentId','listComments','_commentService','defineProperty','updateComment','Solve','Delete','84594QkklsI','415359pfXLZg','requireSession','/edit','_initUserSync','code','_threadCommentDataSource','Unknown','UNIVER_UNKNOWN','_threadCommentModel','rangeId','pipe','rangeType','post','_initDataSource','reply','deleteComment','type','comment','user','disposeWithMe','getUnit','find','size','getCurrentUser','resolved','_init','Add','getUser','ref','threadId','Reply','body','commentUpdate$','pluginName','/add','_threadCommentDataSourceService','42848KIIVhZ','parse','symbol','93016LpNQPu','forEach','solved','resolveComment','3GLkCms','getOwnPropertyDescriptor','83724tyetAg','createTimestamp','198hsLCgw','users','add','OpenOrReOpen','unitId','Edit','addComment','5uJGKoi','delete','filter','COMMENT','_injector','1666262hyvytS','payload','replyId','userId','stringify','46145XMJNCM','/universer-api/user/list','get','getComment','comments','/universer-api/comment/unit/','470RkjJYY','error','saveCommentToSnapshot','_config','length','setConfig'];_0x5a97=function(){return _0x388fcc;};return _0x5a97();}g=te([N(0x0,_0x14199e),N(0x1,_0x22e7e9(f))],g);var se=Object[_0x1a9525(0x18d)],oe=Object[_0x1a9525(0x151)],ne=(_0xe30eee,_0x4ea96f,_0x59f59f)=>_0x4ea96f in _0xe30eee?se(_0xe30eee,_0x4ea96f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x59f59f}):_0xe30eee[_0x4ea96f]=_0x59f59f,ie=(_0x5bdcb7,_0x3ce996,_0x1266c5,_0x13d61c)=>{for(var _0x5507c9=_0x13d61c>0x1?void 0x0:_0x13d61c?oe(_0x3ce996,_0x1266c5):_0x3ce996,_0x5a7208=_0x5bdcb7['length']-0x1,_0x459d35;_0x5a7208>=0x0;_0x5a7208--)(_0x459d35=_0x5bdcb7[_0x5a7208])&&(_0x5507c9=_0x459d35(_0x5507c9)||_0x5507c9);return _0x5507c9;},w=(_0x55efcf,_0x5cd973)=>(_0x378872,_0x44783b)=>_0x5cd973(_0x378872,_0x44783b,_0x55efcf),$=(_0x1dc2ff,_0xee071e,_0x4524eb)=>ne(_0x1dc2ff,typeof _0xee071e!=_0x1a9525(0x14b)?_0xee071e+'':_0xee071e,_0x4524eb);let b=class extends _0x14760f{constructor(_0x686d3f=M,_0x3e7257,_0x4dc320){const _0x3714ad=_0x1a9525;super(),this[_0x3714ad(0x16e)]=_0x686d3f,this[_0x3714ad(0x15f)]=_0x3e7257,this[_0x3714ad(0x189)]=_0x4dc320;const {..._0x12bc84}=_0x3fdcf6({},M,this[_0x3714ad(0x16e)]);this[_0x3714ad(0x189)][_0x3714ad(0x170)](z,_0x12bc84);}[_0x1a9525(0x177)](){const _0x4828e3=_0x1a9525;[[f],[g],[S]][_0x4828e3(0x14d)](_0x5416d7=>{const _0x1f6d7b=_0x4828e3;this[_0x1f6d7b(0x15f)][_0x1f6d7b(0x156)](_0x5416d7);});}[_0x1a9525(0x180)](){const _0x60ccf5=_0x1a9525;this['_injector'][_0x60ccf5(0x167)](g),this[_0x60ccf5(0x15f)]['get'](S);}};$(b,_0x1a9525(0x146),W),$(b,_0x1a9525(0x1a2),_0x5c86df[_0x1a9525(0x199)]),b=ie([_0x3c4a67(_0x5d7089,_0x156a54,_0x44c437),w(0x1,_0x22e7e9(_0x5645be)),w(0x2,_0x23818b)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x56b9(){const _0x13a584=['380886oBPFqa','user','312hjMENb','HTTPService','getMemberID','50aquCam','post','@univerjs-pro/license','replies','dataSource','Add','UserManagerService','ThreadCommentModel','disposeWithMe','stringify','syncUpdateMutationToColla','type','add','_initUserSync','saveCommentToSnapshot','replyId','13RWfqpb','getUser','_commentService','/universer-api/comment/unit/','_initDataSource','amd','Injector','map','pluginName','DependentOn','payload','object','find','Unknown','@univerjs/network','error','userId','parse','Reply','commentUpdate$','updateComment','getOwnPropertyDescriptor','ref','function','dayjs','UniverProThreadCommentDatasource','901923JRVLoX','UniverLicensePlugin','comment','format','Disposable','_threadCommentDataSourceService','deleteComment','pipe','@univerjs/core','_injector','7224600SlzxKV','/list','resolveComment','bufferTime','onReady','UniverThreadCommentUi','COMMENT','4446595VJxhwG','_init','get','reply','CustomRangeType','@univerjs/thread-comment-ui','79964DIosbF','_threadCommentDataSource','YYYY/MM/DD\x20HH:mm','707769erzdXJ','content','_config','slice','subscribe','comments','rangeId','UniverThreadComment','/delete','/solved','addComment','body','_userService','Delete','@univerjs/thread-comment','UniverCore','rangeType','Inject','UniverThreadCommentDataSourcePlugin','_sessionService','UniverCollaborationClientPlugin','Module','UNRECOGNIZED','toStringTag','CollaborationSessionService','addUser','/add','/universer-api/user/list','_httpService','root','thread-comment-data-source.config','forEach','parentId','values','getCurrentUser','getUnit','filter','_configService','setConfig','IConfigService','symbol','resolved','exports','Solve','rxjs','onStarting','getComment','28KTMexo','2996gMwHyk','code','Solved','customRanges','createTimestamp','Edit','length','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentModel','threadId','@univerjs-pro/collaboration-client','IThreadCommentDataSourceService','OpenOrReOpen','userID','merge','unitId','1848pLWAHS','defineProperty','solved'];_0x56b9=function(){return _0x13a584;};return _0x56b9();}function _0x5fed(_0xd77ba0,_0x1b3610){const _0x56b981=_0x56b9();return _0x5fed=function(_0x5fedd5,_0x915de3){_0x5fedd5=_0x5fedd5-0x1f2;let _0x7b2af3=_0x56b981[_0x5fedd5];return _0x7b2af3;},_0x5fed(_0xd77ba0,_0x1b3610);}(function(_0x56f21f,_0x355826){const _0x4c8047=_0x5fed,_0x1acb09=_0x56f21f();while(!![]){try{const _0xbd38be=-parseInt(_0x4c8047(0x20f))/0x1*(parseInt(_0x4c8047(0x240))/0x2)+parseInt(_0x4c8047(0x1f7))/0x3*(-parseInt(_0x4c8047(0x273))/0x4)+parseInt(_0x4c8047(0x23a))/0x5+-parseInt(_0x4c8047(0x1fa))/0x6*(parseInt(_0x4c8047(0x272))/0x7)+-parseInt(_0x4c8047(0x233))/0x8+-parseInt(_0x4c8047(0x243))/0x9*(parseInt(_0x4c8047(0x1ff))/0xa)+parseInt(_0x4c8047(0x229))/0xb*(parseInt(_0x4c8047(0x1fc))/0xc);if(_0xbd38be===_0x355826)break;else _0x1acb09['push'](_0x1acb09['shift']());}catch(_0x43bec4){_0x1acb09['push'](_0x1acb09['shift']());}}}(_0x56b9,0x77937),function(_0x514283,_0x186073){const _0x988d83=_0x5fed;typeof exports==_0x988d83(0x21a)&&typeof module<'u'?_0x186073(exports,require(_0x988d83(0x27d)),require(_0x988d83(0x201)),require(_0x988d83(0x231)),require(_0x988d83(0x23f)),require(_0x988d83(0x251)),require('rxjs'),require(_0x988d83(0x21d))):typeof define==_0x988d83(0x226)&&define[_0x988d83(0x214)]?define([_0x988d83(0x26d),_0x988d83(0x27d),_0x988d83(0x201),'@univerjs/core','@univerjs/thread-comment-ui',_0x988d83(0x251),_0x988d83(0x26f),_0x988d83(0x21d)],_0x186073):(_0x514283=typeof globalThis<'u'?globalThis:_0x514283||self,_0x186073(_0x514283[_0x988d83(0x228)]={},_0x514283['UniverProCollaborationClient'],_0x514283['UniverProLicense'],_0x514283[_0x988d83(0x252)],_0x514283[_0x988d83(0x238)],_0x514283[_0x988d83(0x24a)],_0x514283[_0x988d83(0x26f)],_0x514283['UniverNetwork']));}(this,function(_0x34ee26,_0x47ed44,_0x548b13,_0x34ed44,_0x27f39b,_0x2e5696,_0xd9897d,_0x33792c){'use strict';const _0x4466c0=_0x5fed;const _0x15989d=_0x4466c0(0x27a);var _0x30b7e=(_0x4d940d=>(_0x4d940d[_0x4d940d['OpenOrReOpen']=0x0]=_0x4466c0(0x1f3),_0x4d940d[_0x4d940d[_0x4466c0(0x275)]=0x1]=_0x4466c0(0x275),_0x4d940d[_0x4d940d[_0x4466c0(0x259)]=-0x1]='UNRECOGNIZED',_0x4d940d))(_0x30b7e||{}),_0x437d5a=(_0x1c33ba=>(_0x1c33ba[_0x1c33ba['Unknown']=0x0]=_0x4466c0(0x21c),_0x1c33ba[_0x1c33ba[_0x4466c0(0x204)]=0x1]=_0x4466c0(0x204),_0x1c33ba[_0x1c33ba[_0x4466c0(0x221)]=0x2]=_0x4466c0(0x221),_0x1c33ba[_0x1c33ba[_0x4466c0(0x278)]=0x3]=_0x4466c0(0x278),_0x1c33ba[_0x1c33ba[_0x4466c0(0x250)]=0x4]=_0x4466c0(0x250),_0x1c33ba[_0x1c33ba[_0x4466c0(0x26e)]=0x5]=_0x4466c0(0x26e),_0x1c33ba[_0x1c33ba[_0x4466c0(0x259)]=-0x1]=_0x4466c0(0x259),_0x1c33ba))(_0x437d5a||{});const _0x3ca302=_0x4ed857=>_0x34ed44[_0x4466c0(0x227)](new Date(+_0x4ed857))[_0x4466c0(0x22c)](_0x4466c0(0x242)),_0x2ffccd=async(_0x3b8383,_0x1f6ec9)=>{const _0x56e221=_0x4466c0,_0x5ac1e1=_0x3b8383[_0x56e221(0x23c)](_0x34ed44[_0x56e221(0x205)]),_0x5530c2=_0x3b8383['get'](_0x33792c[_0x56e221(0x1fd)]);_0x1f6ec9[_0x56e221(0x262)](_0x2d68e8=>{const _0x141b53=_0x56e221;_0x5ac1e1[_0x141b53(0x210)](_0x2d68e8)&&_0x1f6ec9['delete'](_0x2d68e8);}),_0x1f6ec9['size']&&(await _0x5530c2[_0x56e221(0x23c)](_0x56e221(0x25e),{'params':{'userIDs':[..._0x1f6ec9]}}))[_0x56e221(0x24e)]['users']['forEach'](_0x118849=>{const _0x330fde=_0x56e221;_0x118849&&_0x5ac1e1[_0x330fde(0x25c)](_0x118849);});};var _0x528f71=Object[_0x4466c0(0x224)],_0x19264c=(_0x408fa7,_0xd476ea,_0x51e4ab,_0x2fe8cd)=>{const _0x4ab307=_0x4466c0;for(var _0x59827f=_0x2fe8cd>0x1?void 0x0:_0x2fe8cd?_0x528f71(_0xd476ea,_0x51e4ab):_0xd476ea,_0xd72731=_0x408fa7[_0x4ab307(0x279)]-0x1,_0xe57e51;_0xd72731>=0x0;_0xd72731--)(_0xe57e51=_0x408fa7[_0xd72731])&&(_0x59827f=_0xe57e51(_0x59827f)||_0x59827f);return _0x59827f;},_0x5acdb0=(_0x580b7d,_0x58d8b0)=>(_0x3e07ba,_0x2632ef)=>_0x58d8b0(_0x3e07ba,_0x2632ef,_0x580b7d);let _0x18854b=class extends _0x34ed44[_0x4466c0(0x22d)]{constructor(_0x29f6eb,_0x510054,_0x57eefb,_0x30d5a2){const _0x333739=_0x4466c0;super(),this[_0x333739(0x211)]=_0x29f6eb,this[_0x333739(0x27b)]=_0x510054,this[_0x333739(0x24f)]=_0x57eefb,this[_0x333739(0x232)]=_0x30d5a2,this[_0x333739(0x23b)](),this[_0x333739(0x20c)]();}[_0x4466c0(0x20c)](){const _0x4335d2=_0x4466c0;this[_0x4335d2(0x207)](this[_0x4335d2(0x27b)][_0x4335d2(0x222)][_0x4335d2(0x230)](_0xd9897d[_0x4335d2(0x236)](0x10))['subscribe'](_0x3e73e5=>{const _0x4616d1=_0x4335d2,_0x4d0c3f=new Set();_0x3e73e5[_0x4616d1(0x262)](_0x288b10=>{const _0x29746f=_0x4616d1;switch(_0x288b10[_0x29746f(0x20a)]){case _0x29746f(0x20b):{const _0x9d0ecb=_0x288b10[_0x29746f(0x219)]['personId'];_0x4d0c3f[_0x29746f(0x20b)](_0x9d0ecb);break;}}}),_0x2ffccd(this['_injector'],_0x4d0c3f);}));}[_0x4466c0(0x23b)](){const _0x507317=_0x4466c0;this[_0x507317(0x207)](this['_commentService']['commentUpdate$'][_0x507317(0x247)](async _0x4b055f=>{const _0x5d2c01=_0x507317;var _0x4747f0,_0x3256cc,_0x1cfb10,_0x5555d9;const _0x33d02e=(_0x4747f0=this[_0x5d2c01(0x27b)][_0x5d2c01(0x266)](_0x4b055f['unitId'])[_0x5d2c01(0x21b)](_0x3a5884=>_0x3a5884[_0x5d2c01(0x27c)]===_0x4b055f['threadId']))==null?void 0x0:_0x4747f0[_0x5d2c01(0x260)];if(!_0x33d02e)return;const {unitId:_0xa950fc,subUnitId:_0x3a035a}=_0x33d02e;switch(_0x4b055f['user']&&this[_0x5d2c01(0x24f)][_0x5d2c01(0x25c)](_0x4b055f['user']),_0x4b055f[_0x5d2c01(0x20a)]){case _0x437d5a['Add']:break;case _0x437d5a[_0x5d2c01(0x221)]:{this[_0x5d2c01(0x27b)][_0x5d2c01(0x24d)](_0xa950fc,_0x3a035a,{'unitId':_0xa950fc,'subUnitId':_0x3a035a,'ref':'','id':_0x4b055f[_0x5d2c01(0x20e)],'dT':_0x3ca302(+_0x4b055f[_0x5d2c01(0x277)]),'threadId':_0x4b055f['threadId'],'personId':(_0x1cfb10=(_0x3256cc=_0x4b055f[_0x5d2c01(0x1fb)])==null?void 0x0:_0x3256cc['userID'])!=null?_0x1cfb10:_0x4b055f[_0x5d2c01(0x21f)],'text':JSON[_0x5d2c01(0x220)](_0x4b055f['content']),'parentId':_0x33d02e['id']});break;}case _0x437d5a['Delete']:{const _0x49ee3c=this[_0x5d2c01(0x27b)][_0x5d2c01(0x271)](_0xa950fc,_0x3a035a,_0x4b055f['replyId']);_0x49ee3c&&_0x49ee3c[_0x5d2c01(0x263)]&&this['_threadCommentModel'][_0x5d2c01(0x22f)](_0xa950fc,_0x3a035a,_0x4b055f[_0x5d2c01(0x20e)]);break;}case _0x437d5a[_0x5d2c01(0x278)]:{this[_0x5d2c01(0x27b)][_0x5d2c01(0x223)](_0xa950fc,_0x3a035a,{'commentId':_0x4b055f['replyId'],'text':JSON['parse'](_0x4b055f[_0x5d2c01(0x244)])});break;}case _0x437d5a[_0x5d2c01(0x26e)]:{const _0x3c455a=(_0x5555d9=this[_0x5d2c01(0x27b)][_0x5d2c01(0x266)](_0x4b055f[_0x5d2c01(0x1f6)])[_0x5d2c01(0x21b)](_0x5a9755=>_0x5a9755['threadId']===_0x4b055f['threadId']))==null?void 0x0:_0x5555d9[_0x5d2c01(0x260)];_0x3c455a&&this['_threadCommentModel'][_0x5d2c01(0x235)](_0xa950fc,_0x3a035a,_0x3c455a['id'],_0x4b055f[_0x5d2c01(0x1f9)]===_0x30b7e[_0x5d2c01(0x275)]);break;}}}));}};_0x18854b=_0x19264c([_0x5acdb0(0x0,_0x34ed44['Inject'](_0x47ed44['CommentService'])),_0x5acdb0(0x1,_0x34ed44[_0x4466c0(0x254)](_0x2e5696[_0x4466c0(0x206)])),_0x5acdb0(0x2,_0x34ed44[_0x4466c0(0x254)](_0x34ed44[_0x4466c0(0x205)])),_0x5acdb0(0x3,_0x34ed44[_0x4466c0(0x254)](_0x34ed44[_0x4466c0(0x215)]))],_0x18854b);const _0x2e445e=_0x4466c0(0x261),_0x3d0790={};var _0x245183=Object['getOwnPropertyDescriptor'],_0x1fba1b=(_0x4cb269,_0x48238b,_0x5b7c86,_0x2832f0)=>{for(var _0x32872b=_0x2832f0>0x1?void 0x0:_0x2832f0?_0x245183(_0x48238b,_0x5b7c86):_0x48238b,_0x1ad54e=_0x4cb269['length']-0x1,_0x493f1d;_0x1ad54e>=0x0;_0x1ad54e--)(_0x493f1d=_0x4cb269[_0x1ad54e])&&(_0x32872b=_0x493f1d(_0x32872b)||_0x32872b);return _0x32872b;},_0x332f54=(_0x1a0d8d,_0x504592)=>(_0x3524e7,_0xd039fe)=>_0x504592(_0x3524e7,_0xd039fe,_0x1a0d8d);function _0x385989(_0x4d02a8,_0x14dcf5){const _0x2d1ab9=_0x4466c0,_0x58ce93=_0x4d02a8['replies'][0x0];return{..._0x14dcf5,'id':_0x58ce93[_0x2d1ab9(0x20e)],'resolved':_0x4d02a8[_0x2d1ab9(0x1f9)]===0x1,'dT':_0x3ca302(_0x58ce93[_0x2d1ab9(0x277)]),'personId':_0x58ce93[_0x2d1ab9(0x21f)],'threadId':_0x58ce93[_0x2d1ab9(0x27c)]};}function _0x5a7f15(_0x279443,_0xf8659e,_0x455712){const _0x462f37=_0x4466c0;var _0x158453,_0x35e31a;if(((_0x35e31a=(_0x158453=_0x279443==null?void 0x0:_0x279443[_0x462f37(0x202)])==null?void 0x0:_0x158453[_0x462f37(0x279)])!=null?_0x35e31a:0x0)>0x0){const _0x456bfa=(_0x43d148,_0x40a69e)=>({'id':_0x43d148[_0x462f37(0x20e)],'threadId':_0x43d148[_0x462f37(0x27c)],'dT':_0x3ca302(_0x43d148['createTimestamp']),'personId':_0x43d148[_0x462f37(0x21f)],'resolved':_0x279443['solved']===_0x30b7e[_0x462f37(0x275)],'unitId':_0xf8659e,'subUnitId':_0x455712,'text':JSON[_0x462f37(0x220)](_0x43d148['content']),'parentId':_0x40a69e}),_0x1c16e8=_0x456bfa(_0x279443[_0x462f37(0x202)][0x0]);return{..._0x1c16e8,'children':_0x279443[_0x462f37(0x202)][_0x462f37(0x246)](0x1)[_0x462f37(0x216)](_0x2ce57d=>_0x456bfa(_0x2ce57d,_0x1c16e8['id']))};}return null;}let _0x204ff0=class{constructor(_0x5ddecc,_0x324da1,_0x577576,_0x5b81ce){const _0x4552de=_0x4466c0;this['_httpService']=_0x5ddecc,this[_0x4552de(0x24f)]=_0x324da1,this['_sessionService']=_0x577576,this[_0x4552de(0x232)]=_0x5b81ce;}async['addComment'](_0x377c87){const _0x1b6862=_0x4466c0;var _0x1a4ab7,_0xa6153f;const {parentId:_0x3944e4,unitId:_0x5d828b,text:_0x526e80,threadId:_0x2810aa}=_0x377c87,_0x61a261=(_0xa6153f=(_0x1a4ab7=_0x526e80[_0x1b6862(0x276)])==null?void 0x0:_0x1a4ab7[_0x1b6862(0x267)](_0x4ea433=>_0x4ea433[_0x1b6862(0x253)]===_0x34ed44[_0x1b6862(0x23e)][_0x1b6862(0x239)])[_0x1b6862(0x216)](_0x17da15=>_0x17da15[_0x1b6862(0x249)]))!=null?_0xa6153f:[],_0x44dfda=JSON[_0x1b6862(0x208)](_0x526e80),_0x1e7a62=(await this[_0x1b6862(0x256)]['requireSession'](_0x5d828b))[_0x1b6862(0x1fe)]();if(_0x3944e4){const _0x1f8b3e={'memberId':_0x1e7a62,'unitId':_0x5d828b,'content':_0x44dfda,'mention':_0x61a261,'threadId':_0x2810aa},_0x319771=(await this[_0x1b6862(0x25f)][_0x1b6862(0x200)](_0x1b6862(0x212)+_0x5d828b+'/reply',{'body':_0x1f8b3e}))[_0x1b6862(0x24e)][_0x1b6862(0x23d)];return{..._0x377c87,'id':_0x319771[_0x1b6862(0x20e)],'dT':_0x34ed44['dayjs'](+_0x319771[_0x1b6862(0x277)])[_0x1b6862(0x22c)](_0x1b6862(0x242)),'personId':_0x319771['userId']};}else{const _0x2f1900={'memberId':_0x1e7a62,'unitId':_0x5d828b,'content':_0x44dfda,'mention':_0x61a261},_0x3805e1=await this[_0x1b6862(0x25f)]['post'](_0x1b6862(0x212)+_0x5d828b+_0x1b6862(0x25d),{'body':_0x2f1900});return _0x385989(_0x3805e1['body'][_0x1b6862(0x22b)],_0x377c87);}}async[_0x4466c0(0x223)](_0x18496d){const _0x4ccca9=_0x4466c0;var _0x404a54,_0x2c408f;const {text:_0x54f196,unitId:_0x7b45b5}=_0x18496d,_0x395d1e=(_0x2c408f=(_0x404a54=_0x54f196['customRanges'])==null?void 0x0:_0x404a54['filter'](_0x289979=>_0x289979[_0x4ccca9(0x253)]===_0x34ed44[_0x4ccca9(0x23e)][_0x4ccca9(0x239)])[_0x4ccca9(0x216)](_0x1dd339=>_0x1dd339['rangeId']))!=null?_0x2c408f:[],_0x5ed0ff=JSON['stringify'](_0x54f196),_0x3a9c0a=_0x18496d[_0x4ccca9(0x27c)],_0x23e51e=_0x18496d['id'],_0x5be17c={'memberId':(await this[_0x4ccca9(0x256)]['requireSession'](_0x7b45b5))['getMemberID'](),'unitId':_0x7b45b5,'threadId':_0x3a9c0a,'mention':_0x395d1e,'content':_0x5ed0ff,'replyId':_0x23e51e},_0x5612aa=await this[_0x4ccca9(0x25f)][_0x4ccca9(0x200)](_0x4ccca9(0x212)+_0x7b45b5+'/edit',{'body':_0x5be17c});return!_0x5612aa[_0x4ccca9(0x24e)][_0x4ccca9(0x21e)]||_0x5612aa[_0x4ccca9(0x24e)][_0x4ccca9(0x21e)]['code']===0x1;}async[_0x4466c0(0x235)](_0x302e75){const _0x308a8a=_0x4466c0,{unitId:_0x4256af}=_0x302e75,_0x1eaded=_0x302e75['threadId'],_0x17c92f={'memberId':this['_userService'][_0x308a8a(0x265)]()[_0x308a8a(0x1f4)],'unitId':_0x4256af,'threadId':_0x1eaded,'solved':_0x302e75[_0x308a8a(0x26c)]?_0x30b7e[_0x308a8a(0x275)]:_0x30b7e['OpenOrReOpen']},_0x4d1855=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x4256af+_0x308a8a(0x24c),{'body':_0x17c92f});return!_0x4d1855['body']['error']||_0x4d1855['body'][_0x308a8a(0x21e)][_0x308a8a(0x274)]===0x1;}async['deleteComment'](_0x7c801d,_0x4272f3,_0x33ac22,_0x5cea74){const _0x3c7c18=_0x4466c0,_0x5459c9={'memberId':(await this[_0x3c7c18(0x256)]['requireSession'](_0x7c801d))['getMemberID'](),'threadId':_0x33ac22,'replyId':_0x5cea74,'unitId':_0x7c801d},_0xcf664d=await this['_httpService'][_0x3c7c18(0x200)](_0x3c7c18(0x212)+_0x7c801d+_0x3c7c18(0x24b),{'body':_0x5459c9});return!_0xcf664d[_0x3c7c18(0x24e)][_0x3c7c18(0x21e)]||_0xcf664d['body'][_0x3c7c18(0x21e)]['code']===0x1;}async['listComments'](_0x2f7165,_0x28ba7f,_0x4c5442){const _0x34c455=_0x4466c0,_0x20ca38={'unitId':_0x2f7165,'threadId':_0x4c5442},_0x12c0f2=await this[_0x34c455(0x25f)][_0x34c455(0x200)](_0x34c455(0x212)+_0x2f7165+_0x34c455(0x234),{'body':_0x20ca38}),_0x5a9349=_0x4c5442[_0x34c455(0x216)](_0x3ab723=>_0x5a7f15(_0x12c0f2[_0x34c455(0x24e)][_0x34c455(0x248)][_0x3ab723],_0x2f7165,_0x28ba7f))[_0x34c455(0x267)](Boolean);return Object[_0x34c455(0x264)](_0x12c0f2['body']['users'])[_0x34c455(0x262)](_0x121909=>{this['_userService']['addUser'](_0x121909);}),_0x5a9349;}[_0x4466c0(0x20d)](_0x4cd464){const _0x382f8c=_0x4466c0;return{'id':_0x4cd464['id'],'threadId':_0x4cd464[_0x382f8c(0x27c)],'ref':_0x4cd464[_0x382f8c(0x225)]};}};_0x204ff0=_0x1fba1b([_0x332f54(0x0,_0x34ed44[_0x4466c0(0x254)](_0x33792c[_0x4466c0(0x1fd)])),_0x332f54(0x1,_0x34ed44['Inject'](_0x34ed44[_0x4466c0(0x205)])),_0x332f54(0x2,_0x34ed44[_0x4466c0(0x254)](_0x47ed44[_0x4466c0(0x25b)])),_0x332f54(0x3,_0x34ed44['Inject'](_0x34ed44[_0x4466c0(0x215)]))],_0x204ff0);var _0xdaa962=Object[_0x4466c0(0x224)],_0x2fdaf5=(_0x5ea6d1,_0x508d66,_0x5383f4,_0x36b953)=>{const _0x12493a=_0x4466c0;for(var _0x2f1409=_0x36b953>0x1?void 0x0:_0x36b953?_0xdaa962(_0x508d66,_0x5383f4):_0x508d66,_0x29bf33=_0x5ea6d1[_0x12493a(0x279)]-0x1,_0x30a47d;_0x29bf33>=0x0;_0x29bf33--)(_0x30a47d=_0x5ea6d1[_0x29bf33])&&(_0x2f1409=_0x30a47d(_0x2f1409)||_0x2f1409);return _0x2f1409;},_0x56e7bb=(_0x5e8c2b,_0x2a58a6)=>(_0x299b02,_0x127f55)=>_0x2a58a6(_0x299b02,_0x127f55,_0x5e8c2b);let _0xaf347d=class extends _0x34ed44[_0x4466c0(0x22d)]{constructor(_0x240548,_0x583191){const _0x4c8f7b=_0x4466c0;super(),this[_0x4c8f7b(0x22e)]=_0x240548,this[_0x4c8f7b(0x241)]=_0x583191,this[_0x4c8f7b(0x213)]();}[_0x4466c0(0x213)](){const _0x54ee72=_0x4466c0;this[_0x54ee72(0x22e)][_0x54ee72(0x203)]=this['_threadCommentDataSource'],this[_0x54ee72(0x22e)][_0x54ee72(0x209)]=!0x1;}};_0xaf347d=_0x2fdaf5([_0x56e7bb(0x0,_0x2e5696[_0x4466c0(0x1f2)]),_0x56e7bb(0x1,_0x34ed44[_0x4466c0(0x254)](_0x204ff0))],_0xaf347d);var _0x3d8962=Object[_0x4466c0(0x1f8)],_0x573edf=Object[_0x4466c0(0x224)],_0x43c6a1=(_0x35882f,_0x5c1038,_0x1a79d7)=>_0x5c1038 in _0x35882f?_0x3d8962(_0x35882f,_0x5c1038,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1a79d7}):_0x35882f[_0x5c1038]=_0x1a79d7,_0x12f90f=(_0x58d8d9,_0x246f78,_0x50a2d8,_0x342703)=>{const _0x456900=_0x4466c0;for(var _0x5e874f=_0x342703>0x1?void 0x0:_0x342703?_0x573edf(_0x246f78,_0x50a2d8):_0x246f78,_0x4bc97d=_0x58d8d9[_0x456900(0x279)]-0x1,_0x422584;_0x4bc97d>=0x0;_0x4bc97d--)(_0x422584=_0x58d8d9[_0x4bc97d])&&(_0x5e874f=_0x422584(_0x5e874f)||_0x5e874f);return _0x5e874f;},_0x4003e4=(_0x2d21bd,_0x169b4a)=>(_0x31e37c,_0x4f151f)=>_0x169b4a(_0x31e37c,_0x4f151f,_0x2d21bd),_0x1ec9d4=(_0x50ccae,_0x700142,_0x20560c)=>_0x43c6a1(_0x50ccae,typeof _0x700142!=_0x4466c0(0x26b)?_0x700142+'':_0x700142,_0x20560c);_0x34ee26['UniverThreadCommentDataSourcePlugin']=class extends _0x34ed44['Plugin']{constructor(_0x422667=_0x3d0790,_0x150b20,_0x3f3f2c){const _0x18efdb=_0x4466c0;super(),this[_0x18efdb(0x245)]=_0x422667,this[_0x18efdb(0x232)]=_0x150b20,this[_0x18efdb(0x268)]=_0x3f3f2c;const {..._0x42a13a}=_0x34ed44[_0x18efdb(0x1f5)]({},_0x3d0790,this[_0x18efdb(0x245)]);this[_0x18efdb(0x268)][_0x18efdb(0x269)](_0x2e445e,_0x42a13a);}[_0x4466c0(0x270)](){[[_0x204ff0],[_0xaf347d],[_0x18854b]]['forEach'](_0xbdcc61=>{const _0x3093c7=_0x5fed;this['_injector'][_0x3093c7(0x20b)](_0xbdcc61);});}[_0x4466c0(0x237)](){const _0x1c22e4=_0x4466c0;this['_injector'][_0x1c22e4(0x23c)](_0xaf347d),this[_0x1c22e4(0x232)][_0x1c22e4(0x23c)](_0x18854b);}},_0x1ec9d4(_0x34ee26[_0x4466c0(0x255)],_0x4466c0(0x217),_0x15989d),_0x1ec9d4(_0x34ee26[_0x4466c0(0x255)],_0x4466c0(0x20a),_0x34ed44['UniverInstanceType']['UNIVER_UNKNOWN']),_0x34ee26['UniverThreadCommentDataSourcePlugin']=_0x12f90f([_0x34ed44[_0x4466c0(0x218)](_0x27f39b['UniverThreadCommentUIPlugin'],_0x47ed44[_0x4466c0(0x257)],_0x548b13[_0x4466c0(0x22a)]),_0x4003e4(0x1,_0x34ed44[_0x4466c0(0x254)](_0x34ed44['Injector'])),_0x4003e4(0x2,_0x34ed44[_0x4466c0(0x26a)])],_0x34ee26[_0x4466c0(0x255)]),Object['defineProperty'](_0x34ee26,Symbol[_0x4466c0(0x25a)],{'value':_0x4466c0(0x258)});}));
|
|
1
|
+
function _0x4eca(_0x34fa58,_0xf5b468){const _0x11d81d=_0x11d8();return _0x4eca=function(_0x4eca21,_0x4b2832){_0x4eca21=_0x4eca21-0x7d;let _0x59270b=_0x11d81d[_0x4eca21];return _0x59270b;},_0x4eca(_0x34fa58,_0xf5b468);}function _0x11d8(){const _0x42e031=['/edit','/universer-api/user/list','_initUserSync','length','211073nhOHYa','ref','root','_threadCommentDataSourceService','pluginName','solved','_httpService','Delete','userId','stringify','resolveComment','2010584LOgIHc','3222486ndozNI','map','threadId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverCore','commentUpdate$','Inject','UserManagerService','@univerjs/network','Disposable','getUnit','UniverNetwork','comment','_initDataSource','_injector','merge','disposeWithMe','payload','exports','userID','OpenOrReOpen','size','toStringTag','defineProperty','filter','_configService','10eFlLHO','UniverLicensePlugin','get','values','replyId','2689785guTgGi','/reply','_commentService','Solved','Edit','rangeId','UniverProThreadCommentDatasource','/delete','content','_sessionService','@univerjs-pro/license','_threadCommentModel','UNIVER_UNKNOWN','rangeType','unitId','CommentService','forEach','UniverProCollaborationClient','error','format','onReady','@univerjs-pro/collaboration-client','subscribe','Module','Injector','UniverThreadCommentUi','Add','135492JNDXCi','UniverThreadCommentDataSourcePlugin','thread-comment-data-source.config','getOwnPropertyDescriptor','getUser','addComment','body','addUser','getMemberID','rxjs','6qWktUz','@univerjs/thread-comment','parentId','onStarting','dayjs','_init','Plugin','COMMENT','getComment','parse','users','UniverCollaborationClientPlugin','HTTPService','listComments','UNRECOGNIZED','requireSession','UniverProLicense','/universer-api/comment/unit/','_userService','syncUpdateMutationToColla','Reply','bufferTime','YYYY/MM/DD\x20HH:mm','createTimestamp','CustomRangeType','code','saveCommentToSnapshot','find','35nEfPjc','_config','1136241BnqeUl','updateComment','user','post','UniverInstanceType','ThreadCommentModel','symbol','amd','/list','add','IConfigService','1070996SFHObn','Unknown','UniverThreadComment','getCurrentUser','Solve','@univerjs/thread-comment-ui','type','@univerjs/core','deleteComment','replies','setConfig'];_0x11d8=function(){return _0x42e031;};return _0x11d8();}(function(_0x322a3a,_0x2aebe){const _0xe2f5d2=_0x4eca,_0x53b4d5=_0x322a3a();while(!![]){try{const _0x586fc4=parseInt(_0xe2f5d2(0x104))/0x1+-parseInt(_0xe2f5d2(0xf5))/0x2+-parseInt(_0xe2f5d2(0xea))/0x3+parseInt(_0xe2f5d2(0xc2))/0x4*(parseInt(_0xe2f5d2(0xe8))/0x5)+-parseInt(_0xe2f5d2(0xcc))/0x6*(-parseInt(_0xe2f5d2(0xa7))/0x7)+parseInt(_0xe2f5d2(0x87))/0x8+-parseInt(_0xe2f5d2(0x88))/0x9*(-parseInt(_0xe2f5d2(0xa2))/0xa);if(_0x586fc4===_0x2aebe)break;else _0x53b4d5['push'](_0x53b4d5['shift']());}catch(_0x47a6e1){_0x53b4d5['push'](_0x53b4d5['shift']());}}}(_0x11d8,0x80cd3),function(_0x593c7e,_0x522d16){const _0x461ab2=_0x4eca;typeof exports=='object'&&typeof module<'u'?_0x522d16(exports,require(_0x461ab2(0xbc)),require(_0x461ab2(0xb1)),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require(_0x461ab2(0xcd)),require(_0x461ab2(0xcb)),require(_0x461ab2(0x90))):typeof define=='function'&&define[_0x461ab2(0xf1)]?define([_0x461ab2(0x9a),_0x461ab2(0xbc),_0x461ab2(0xb1),_0x461ab2(0xfc),_0x461ab2(0xfa),_0x461ab2(0xcd),'rxjs',_0x461ab2(0x90)],_0x522d16):(_0x593c7e=typeof globalThis<'u'?globalThis:_0x593c7e||self,_0x522d16(_0x593c7e[_0x461ab2(0xad)]={},_0x593c7e[_0x461ab2(0xb8)],_0x593c7e[_0x461ab2(0xdc)],_0x593c7e[_0x461ab2(0x8c)],_0x593c7e[_0x461ab2(0xc0)],_0x593c7e[_0x461ab2(0xf7)],_0x593c7e['rxjs'],_0x593c7e[_0x461ab2(0x93)]));}(this,function(_0x1285c5,_0x42ac7c,_0x331109,_0xe19bdc,_0x3d9925,_0x48b03f,_0x1ca3a4,_0x240138){'use strict';const _0x3ecfc6=_0x4eca;const _0x4320c7=_0x3ecfc6(0x8b);var _0x3c6c6a=(_0x2ed066=>(_0x2ed066[_0x2ed066[_0x3ecfc6(0x9c)]=0x0]=_0x3ecfc6(0x9c),_0x2ed066[_0x2ed066[_0x3ecfc6(0xaa)]=0x1]=_0x3ecfc6(0xaa),_0x2ed066[_0x2ed066[_0x3ecfc6(0xda)]=-0x1]=_0x3ecfc6(0xda),_0x2ed066))(_0x3c6c6a||{}),_0x126599=(_0x3cd0f3=>(_0x3cd0f3[_0x3cd0f3[_0x3ecfc6(0xf6)]=0x0]=_0x3ecfc6(0xf6),_0x3cd0f3[_0x3cd0f3[_0x3ecfc6(0xc1)]=0x1]=_0x3ecfc6(0xc1),_0x3cd0f3[_0x3cd0f3[_0x3ecfc6(0xe0)]=0x2]=_0x3ecfc6(0xe0),_0x3cd0f3[_0x3cd0f3['Edit']=0x3]=_0x3ecfc6(0xab),_0x3cd0f3[_0x3cd0f3[_0x3ecfc6(0x83)]=0x4]='Delete',_0x3cd0f3[_0x3cd0f3[_0x3ecfc6(0xf9)]=0x5]='Solve',_0x3cd0f3[_0x3cd0f3[_0x3ecfc6(0xda)]=-0x1]=_0x3ecfc6(0xda),_0x3cd0f3))(_0x126599||{});const _0x41f94d=_0x7512e2=>_0xe19bdc['dayjs'](new Date(+_0x7512e2))['format'](_0x3ecfc6(0xe2)),_0x5b122b=async(_0x524e44,_0x5733ad)=>{const _0x1fb942=_0x3ecfc6,_0x5ed1a1=_0x524e44[_0x1fb942(0xa4)](_0xe19bdc[_0x1fb942(0x8f)]),_0x58f846=_0x524e44['get'](_0x240138['HTTPService']);_0x5733ad[_0x1fb942(0xb7)](_0x126365=>{const _0x4c9976=_0x1fb942;_0x5ed1a1[_0x4c9976(0xc6)](_0x126365)&&_0x5733ad['delete'](_0x126365);}),_0x5733ad[_0x1fb942(0x9d)]&&(await _0x58f846[_0x1fb942(0xa4)](_0x1fb942(0x101),{'params':{'userIDs':[..._0x5733ad]}}))['body'][_0x1fb942(0xd6)][_0x1fb942(0xb7)](_0xea531d=>{const _0x3bd979=_0x1fb942;_0xea531d&&_0x5ed1a1[_0x3bd979(0xc9)](_0xea531d);});};var _0x2900b6=Object[_0x3ecfc6(0xc5)],_0x2b0e65=(_0x377e4c,_0x2f400b,_0x1f36f7,_0x1f2127)=>{for(var _0x2a0466=_0x1f2127>0x1?void 0x0:_0x1f2127?_0x2900b6(_0x2f400b,_0x1f36f7):_0x2f400b,_0x204e3f=_0x377e4c['length']-0x1,_0x58ca82;_0x204e3f>=0x0;_0x204e3f--)(_0x58ca82=_0x377e4c[_0x204e3f])&&(_0x2a0466=_0x58ca82(_0x2a0466)||_0x2a0466);return _0x2a0466;},_0x462b4c=(_0x35fc37,_0x70c0ed)=>(_0x69be17,_0x274cab)=>_0x70c0ed(_0x69be17,_0x274cab,_0x35fc37);let _0x44cf48=class extends _0xe19bdc['Disposable']{constructor(_0x4ff232,_0x77b183,_0x55771b,_0x442f60){const _0x579fb6=_0x3ecfc6;super(),this[_0x579fb6(0xa9)]=_0x4ff232,this['_threadCommentModel']=_0x77b183,this[_0x579fb6(0xde)]=_0x55771b,this[_0x579fb6(0x96)]=_0x442f60,this[_0x579fb6(0xd1)](),this[_0x579fb6(0x102)]();}[_0x3ecfc6(0x102)](){const _0x562d30=_0x3ecfc6;this[_0x562d30(0x98)](this[_0x562d30(0xb2)][_0x562d30(0x8d)]['pipe'](_0x1ca3a4[_0x562d30(0xe1)](0x10))[_0x562d30(0xbd)](_0x4c1c2e=>{const _0x3990f5=_0x562d30,_0x19d5ae=new Set();_0x4c1c2e[_0x3990f5(0xb7)](_0x5e85eb=>{const _0x5dc5cd=_0x3990f5;switch(_0x5e85eb[_0x5dc5cd(0xfb)]){case _0x5dc5cd(0xf3):{const _0x34be63=_0x5e85eb[_0x5dc5cd(0x99)]['personId'];_0x19d5ae['add'](_0x34be63);break;}}}),_0x5b122b(this[_0x3990f5(0x96)],_0x19d5ae);}));}[_0x3ecfc6(0xd1)](){const _0x347b11=_0x3ecfc6;this[_0x347b11(0x98)](this[_0x347b11(0xa9)]['commentUpdate$'][_0x347b11(0xbd)](async _0x3b7b13=>{const _0x44593b=_0x347b11;var _0x92457e,_0x1bf9cd,_0x43f4cc,_0x16d269;const _0xbeed1b=(_0x92457e=this['_threadCommentModel']['getUnit'](_0x3b7b13['unitId'])[_0x44593b(0xe7)](_0x1d76fe=>_0x1d76fe[_0x44593b(0x8a)]===_0x3b7b13['threadId']))==null?void 0x0:_0x92457e[_0x44593b(0x7e)];if(!_0xbeed1b)return;const {unitId:_0x48733a,subUnitId:_0x4def0d}=_0xbeed1b;switch(_0x3b7b13[_0x44593b(0xec)]&&this[_0x44593b(0xde)][_0x44593b(0xc9)](_0x3b7b13[_0x44593b(0xec)]),_0x3b7b13[_0x44593b(0xfb)]){case _0x126599['Add']:break;case _0x126599[_0x44593b(0xe0)]:{this[_0x44593b(0xb2)][_0x44593b(0xc7)](_0x48733a,_0x4def0d,{'unitId':_0x48733a,'subUnitId':_0x4def0d,'ref':'','id':_0x3b7b13[_0x44593b(0xa6)],'dT':_0x41f94d(+_0x3b7b13[_0x44593b(0xe3)]),'threadId':_0x3b7b13[_0x44593b(0x8a)],'personId':(_0x43f4cc=(_0x1bf9cd=_0x3b7b13['user'])==null?void 0x0:_0x1bf9cd[_0x44593b(0x9b)])!=null?_0x43f4cc:_0x3b7b13[_0x44593b(0x84)],'text':JSON[_0x44593b(0xd5)](_0x3b7b13['content']),'parentId':_0xbeed1b['id']});break;}case _0x126599[_0x44593b(0x83)]:{const _0x365702=this[_0x44593b(0xb2)][_0x44593b(0xd4)](_0x48733a,_0x4def0d,_0x3b7b13[_0x44593b(0xa6)]);_0x365702&&_0x365702[_0x44593b(0xce)]&&this['_threadCommentModel']['deleteComment'](_0x48733a,_0x4def0d,_0x3b7b13[_0x44593b(0xa6)]);break;}case _0x126599[_0x44593b(0xab)]:{this[_0x44593b(0xb2)][_0x44593b(0xeb)](_0x48733a,_0x4def0d,{'commentId':_0x3b7b13[_0x44593b(0xa6)],'text':JSON[_0x44593b(0xd5)](_0x3b7b13[_0x44593b(0xaf)])});break;}case _0x126599['Solve']:{const _0x58317b=(_0x16d269=this['_threadCommentModel'][_0x44593b(0x92)](_0x3b7b13[_0x44593b(0xb5)])[_0x44593b(0xe7)](_0x4337a3=>_0x4337a3['threadId']===_0x3b7b13[_0x44593b(0x8a)]))==null?void 0x0:_0x16d269[_0x44593b(0x7e)];_0x58317b&&this[_0x44593b(0xb2)][_0x44593b(0x86)](_0x48733a,_0x4def0d,_0x58317b['id'],_0x3b7b13[_0x44593b(0x81)]===_0x3c6c6a[_0x44593b(0xaa)]);break;}}}));}};_0x44cf48=_0x2b0e65([_0x462b4c(0x0,_0xe19bdc[_0x3ecfc6(0x8e)](_0x42ac7c[_0x3ecfc6(0xb6)])),_0x462b4c(0x1,_0xe19bdc[_0x3ecfc6(0x8e)](_0x48b03f[_0x3ecfc6(0xef)])),_0x462b4c(0x2,_0xe19bdc[_0x3ecfc6(0x8e)](_0xe19bdc['UserManagerService'])),_0x462b4c(0x3,_0xe19bdc[_0x3ecfc6(0x8e)](_0xe19bdc['Injector']))],_0x44cf48);const _0x39cf89=_0x3ecfc6(0xc4),_0xa038f5={};var _0x2080b7=Object['getOwnPropertyDescriptor'],_0x590b87=(_0x5f4aa0,_0x283aa4,_0x23b549,_0x380cb1)=>{const _0x8c04a4=_0x3ecfc6;for(var _0x3d7915=_0x380cb1>0x1?void 0x0:_0x380cb1?_0x2080b7(_0x283aa4,_0x23b549):_0x283aa4,_0x2b64bd=_0x5f4aa0[_0x8c04a4(0x103)]-0x1,_0x516463;_0x2b64bd>=0x0;_0x2b64bd--)(_0x516463=_0x5f4aa0[_0x2b64bd])&&(_0x3d7915=_0x516463(_0x3d7915)||_0x3d7915);return _0x3d7915;},_0x38591f=(_0x2e4948,_0x55d888)=>(_0x38f5b0,_0x307ca2)=>_0x55d888(_0x38f5b0,_0x307ca2,_0x2e4948);function _0x51d544(_0x83065d,_0x2301e2){const _0x25467b=_0x3ecfc6,_0x2120b6=_0x83065d[_0x25467b(0xfe)][0x0];return{..._0x2301e2,'id':_0x2120b6[_0x25467b(0xa6)],'resolved':_0x83065d['solved']===0x1,'dT':_0x41f94d(_0x2120b6[_0x25467b(0xe3)]),'personId':_0x2120b6[_0x25467b(0x84)],'threadId':_0x2120b6[_0x25467b(0x8a)]};}function _0x3aebd2(_0x360c45,_0x454b6f,_0x7c9e9a){const _0x851f89=_0x3ecfc6;var _0x2ad367,_0x258762;if(((_0x258762=(_0x2ad367=_0x360c45==null?void 0x0:_0x360c45[_0x851f89(0xfe)])==null?void 0x0:_0x2ad367[_0x851f89(0x103)])!=null?_0x258762:0x0)>0x0){const _0x38826e=(_0x1ec1b2,_0x2d6a74)=>({'id':_0x1ec1b2[_0x851f89(0xa6)],'threadId':_0x1ec1b2[_0x851f89(0x8a)],'dT':_0x41f94d(_0x1ec1b2['createTimestamp']),'personId':_0x1ec1b2[_0x851f89(0x84)],'resolved':_0x360c45[_0x851f89(0x81)]===_0x3c6c6a[_0x851f89(0xaa)],'unitId':_0x454b6f,'subUnitId':_0x7c9e9a,'text':JSON[_0x851f89(0xd5)](_0x1ec1b2['content']),'parentId':_0x2d6a74}),_0x4778b1=_0x38826e(_0x360c45[_0x851f89(0xfe)][0x0]);return{..._0x4778b1,'children':_0x360c45['replies']['slice'](0x1)[_0x851f89(0x89)](_0x58b574=>_0x38826e(_0x58b574,_0x4778b1['id']))};}return null;}let _0x3e92a6=class{constructor(_0x54aa4e,_0x55f44d,_0x379886,_0xa101a6){const _0x3de947=_0x3ecfc6;this[_0x3de947(0x82)]=_0x54aa4e,this['_userService']=_0x55f44d,this[_0x3de947(0xb0)]=_0x379886,this[_0x3de947(0x96)]=_0xa101a6;}async[_0x3ecfc6(0xc7)](_0x52429a){const _0xd267e2=_0x3ecfc6;var _0x27b5d0,_0x16e07f;const {parentId:_0x259e7d,unitId:_0x5b087f,text:_0x5d24e6,threadId:_0xb20cf5}=_0x52429a,_0x228e3e=(_0x16e07f=(_0x27b5d0=_0x5d24e6['customRanges'])==null?void 0x0:_0x27b5d0[_0xd267e2(0xa0)](_0x3881ee=>_0x3881ee[_0xd267e2(0xb4)]===_0xe19bdc[_0xd267e2(0xe4)][_0xd267e2(0xd3)])[_0xd267e2(0x89)](_0x5a9a96=>_0x5a9a96[_0xd267e2(0xac)]))!=null?_0x16e07f:[],_0x1ce385=JSON[_0xd267e2(0x85)](_0x5d24e6),_0x24a185=(await this['_sessionService'][_0xd267e2(0xdb)](_0x5b087f))['getMemberID']();if(_0x259e7d){const _0x39ba1c={'memberId':_0x24a185,'unitId':_0x5b087f,'content':_0x1ce385,'mention':_0x228e3e,'threadId':_0xb20cf5},_0x2f32ae=(await this['_httpService'][_0xd267e2(0xed)](_0xd267e2(0xdd)+_0x5b087f+_0xd267e2(0xa8),{'body':_0x39ba1c}))[_0xd267e2(0xc8)]['reply'];return{..._0x52429a,'id':_0x2f32ae['replyId'],'dT':_0xe19bdc[_0xd267e2(0xd0)](+_0x2f32ae['createTimestamp'])[_0xd267e2(0xba)](_0xd267e2(0xe2)),'personId':_0x2f32ae['userId']};}else{const _0x532c3f={'memberId':_0x24a185,'unitId':_0x5b087f,'content':_0x1ce385,'mention':_0x228e3e},_0x4dda61=await this[_0xd267e2(0x82)][_0xd267e2(0xed)](_0xd267e2(0xdd)+_0x5b087f+'/add',{'body':_0x532c3f});return _0x51d544(_0x4dda61[_0xd267e2(0xc8)][_0xd267e2(0x94)],_0x52429a);}}async[_0x3ecfc6(0xeb)](_0x4f99c4){const _0x4234e9=_0x3ecfc6;var _0x2c7cc3,_0x4bb915;const {text:_0x40fe80,unitId:_0x3d8bd3}=_0x4f99c4,_0x316937=(_0x4bb915=(_0x2c7cc3=_0x40fe80['customRanges'])==null?void 0x0:_0x2c7cc3['filter'](_0x395933=>_0x395933[_0x4234e9(0xb4)]===_0xe19bdc['CustomRangeType'][_0x4234e9(0xd3)])['map'](_0x337fb8=>_0x337fb8[_0x4234e9(0xac)]))!=null?_0x4bb915:[],_0x3ef974=JSON[_0x4234e9(0x85)](_0x40fe80),_0x11b4d2=_0x4f99c4[_0x4234e9(0x8a)],_0x53f1bb=_0x4f99c4['id'],_0x5ee485={'memberId':(await this[_0x4234e9(0xb0)][_0x4234e9(0xdb)](_0x3d8bd3))[_0x4234e9(0xca)](),'unitId':_0x3d8bd3,'threadId':_0x11b4d2,'mention':_0x316937,'content':_0x3ef974,'replyId':_0x53f1bb},_0x1b4622=await this[_0x4234e9(0x82)][_0x4234e9(0xed)](_0x4234e9(0xdd)+_0x3d8bd3+_0x4234e9(0x100),{'body':_0x5ee485});return!_0x1b4622[_0x4234e9(0xc8)][_0x4234e9(0xb9)]||_0x1b4622['body'][_0x4234e9(0xb9)][_0x4234e9(0xe5)]===0x1;}async['resolveComment'](_0x24693a){const _0xb1945e=_0x3ecfc6,{unitId:_0x404101}=_0x24693a,_0x2e27ab=_0x24693a[_0xb1945e(0x8a)],_0x33ec05={'memberId':this[_0xb1945e(0xde)][_0xb1945e(0xf8)]()[_0xb1945e(0x9b)],'unitId':_0x404101,'threadId':_0x2e27ab,'solved':_0x24693a['resolved']?_0x3c6c6a[_0xb1945e(0xaa)]:_0x3c6c6a[_0xb1945e(0x9c)]},_0x8f5e84=await this[_0xb1945e(0x82)][_0xb1945e(0xed)](_0xb1945e(0xdd)+_0x404101+'/solved',{'body':_0x33ec05});return!_0x8f5e84[_0xb1945e(0xc8)][_0xb1945e(0xb9)]||_0x8f5e84[_0xb1945e(0xc8)]['error'][_0xb1945e(0xe5)]===0x1;}async[_0x3ecfc6(0xfd)](_0x1badd3,_0x49d44c,_0x4eca3d,_0x2a43e3){const _0x5e1dd8=_0x3ecfc6,_0x2fbf68={'memberId':(await this[_0x5e1dd8(0xb0)][_0x5e1dd8(0xdb)](_0x1badd3))['getMemberID'](),'threadId':_0x4eca3d,'replyId':_0x2a43e3,'unitId':_0x1badd3},_0x4c3cfe=await this[_0x5e1dd8(0x82)][_0x5e1dd8(0xed)](_0x5e1dd8(0xdd)+_0x1badd3+_0x5e1dd8(0xae),{'body':_0x2fbf68});return!_0x4c3cfe[_0x5e1dd8(0xc8)][_0x5e1dd8(0xb9)]||_0x4c3cfe[_0x5e1dd8(0xc8)][_0x5e1dd8(0xb9)][_0x5e1dd8(0xe5)]===0x1;}async[_0x3ecfc6(0xd9)](_0x3f424e,_0x197c6b,_0x3f5448){const _0x4d612b=_0x3ecfc6,_0x5612f8={'unitId':_0x3f424e,'threadId':_0x3f5448},_0x32c609=await this[_0x4d612b(0x82)][_0x4d612b(0xed)]('/universer-api/comment/unit/'+_0x3f424e+_0x4d612b(0xf2),{'body':_0x5612f8}),_0x20374=_0x3f5448[_0x4d612b(0x89)](_0x34d9ce=>_0x3aebd2(_0x32c609[_0x4d612b(0xc8)]['comments'][_0x34d9ce],_0x3f424e,_0x197c6b))[_0x4d612b(0xa0)](Boolean);return Object[_0x4d612b(0xa5)](_0x32c609[_0x4d612b(0xc8)][_0x4d612b(0xd6)])[_0x4d612b(0xb7)](_0x1f0b45=>{const _0x245e51=_0x4d612b;this[_0x245e51(0xde)][_0x245e51(0xc9)](_0x1f0b45);}),_0x20374;}[_0x3ecfc6(0xe6)](_0x7186b5){const _0x1c76c3=_0x3ecfc6;return{'id':_0x7186b5['id'],'threadId':_0x7186b5[_0x1c76c3(0x8a)],'ref':_0x7186b5[_0x1c76c3(0x7d)]};}};_0x3e92a6=_0x590b87([_0x38591f(0x0,_0xe19bdc['Inject'](_0x240138[_0x3ecfc6(0xd8)])),_0x38591f(0x1,_0xe19bdc[_0x3ecfc6(0x8e)](_0xe19bdc[_0x3ecfc6(0x8f)])),_0x38591f(0x2,_0xe19bdc['Inject'](_0x42ac7c['CollaborationSessionService'])),_0x38591f(0x3,_0xe19bdc[_0x3ecfc6(0x8e)](_0xe19bdc[_0x3ecfc6(0xbf)]))],_0x3e92a6);var _0x19a746=Object[_0x3ecfc6(0xc5)],_0x48d7d8=(_0x975b71,_0x57a3a7,_0x12500d,_0x500f91)=>{const _0x48a84e=_0x3ecfc6;for(var _0x231d6b=_0x500f91>0x1?void 0x0:_0x500f91?_0x19a746(_0x57a3a7,_0x12500d):_0x57a3a7,_0x3970f8=_0x975b71[_0x48a84e(0x103)]-0x1,_0x3f33ff;_0x3970f8>=0x0;_0x3970f8--)(_0x3f33ff=_0x975b71[_0x3970f8])&&(_0x231d6b=_0x3f33ff(_0x231d6b)||_0x231d6b);return _0x231d6b;},_0x2095e7=(_0x57a947,_0x34b9b6)=>(_0x29a9b5,_0x5b502b)=>_0x34b9b6(_0x29a9b5,_0x5b502b,_0x57a947);let _0x435457=class extends _0xe19bdc[_0x3ecfc6(0x91)]{constructor(_0x33c791,_0x5d37d9){const _0x22fd8b=_0x3ecfc6;super(),this[_0x22fd8b(0x7f)]=_0x33c791,this['_threadCommentDataSource']=_0x5d37d9,this[_0x22fd8b(0x95)]();}[_0x3ecfc6(0x95)](){const _0x3072ea=_0x3ecfc6;this[_0x3072ea(0x7f)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x3072ea(0xdf)]=!0x1;}};_0x435457=_0x48d7d8([_0x2095e7(0x0,_0x48b03f['IThreadCommentDataSourceService']),_0x2095e7(0x1,_0xe19bdc[_0x3ecfc6(0x8e)](_0x3e92a6))],_0x435457);var _0x1ebdb8=Object['defineProperty'],_0xa6bd07=Object['getOwnPropertyDescriptor'],_0x57c022=(_0x394866,_0x46f1e0,_0x8783bd)=>_0x46f1e0 in _0x394866?_0x1ebdb8(_0x394866,_0x46f1e0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x8783bd}):_0x394866[_0x46f1e0]=_0x8783bd,_0xf3f16d=(_0x2ecb46,_0x2f6e21,_0x595f90,_0x2b07f0)=>{for(var _0x4695af=_0x2b07f0>0x1?void 0x0:_0x2b07f0?_0xa6bd07(_0x2f6e21,_0x595f90):_0x2f6e21,_0xf4733c=_0x2ecb46['length']-0x1,_0x4c74e5;_0xf4733c>=0x0;_0xf4733c--)(_0x4c74e5=_0x2ecb46[_0xf4733c])&&(_0x4695af=_0x4c74e5(_0x4695af)||_0x4695af);return _0x4695af;},_0x20deea=(_0x232c8d,_0x3b32ce)=>(_0x241533,_0x2ca6fe)=>_0x3b32ce(_0x241533,_0x2ca6fe,_0x232c8d),_0x4307bc=(_0x3e8e35,_0x486fe0,_0x2011f8)=>_0x57c022(_0x3e8e35,typeof _0x486fe0!=_0x3ecfc6(0xf0)?_0x486fe0+'':_0x486fe0,_0x2011f8);_0x1285c5[_0x3ecfc6(0xc3)]=class extends _0xe19bdc[_0x3ecfc6(0xd2)]{constructor(_0x228de5=_0xa038f5,_0x3082b4,_0x84d2d7){const _0x3a3753=_0x3ecfc6;super(),this[_0x3a3753(0xe9)]=_0x228de5,this[_0x3a3753(0x96)]=_0x3082b4,this['_configService']=_0x84d2d7;const {..._0x4ba125}=_0xe19bdc[_0x3a3753(0x97)]({},_0xa038f5,this['_config']);this[_0x3a3753(0xa1)][_0x3a3753(0xff)](_0x39cf89,_0x4ba125);}[_0x3ecfc6(0xcf)](){const _0x23e4eb=_0x3ecfc6;[[_0x3e92a6],[_0x435457],[_0x44cf48]][_0x23e4eb(0xb7)](_0x2c1906=>{const _0x1db15c=_0x23e4eb;this[_0x1db15c(0x96)][_0x1db15c(0xf3)](_0x2c1906);});}[_0x3ecfc6(0xbb)](){const _0x44b80c=_0x3ecfc6;this['_injector'][_0x44b80c(0xa4)](_0x435457),this[_0x44b80c(0x96)][_0x44b80c(0xa4)](_0x44cf48);}},_0x4307bc(_0x1285c5[_0x3ecfc6(0xc3)],_0x3ecfc6(0x80),_0x4320c7),_0x4307bc(_0x1285c5[_0x3ecfc6(0xc3)],_0x3ecfc6(0xfb),_0xe19bdc[_0x3ecfc6(0xee)][_0x3ecfc6(0xb3)]),_0x1285c5[_0x3ecfc6(0xc3)]=_0xf3f16d([_0xe19bdc['DependentOn'](_0x3d9925['UniverThreadCommentUIPlugin'],_0x42ac7c[_0x3ecfc6(0xd7)],_0x331109[_0x3ecfc6(0xa3)]),_0x20deea(0x1,_0xe19bdc[_0x3ecfc6(0x8e)](_0xe19bdc[_0x3ecfc6(0xbf)])),_0x20deea(0x2,_0xe19bdc[_0x3ecfc6(0xf4)])],_0x1285c5['UniverThreadCommentDataSourcePlugin']),Object[_0x3ecfc6(0x9f)](_0x1285c5,Symbol[_0x3ecfc6(0x9e)],{'value':_0x3ecfc6(0xbe)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.8.1-nightly.
|
|
3
|
+
"version": "0.8.1-nightly.202506151606",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.8.1-nightly.
|
|
49
|
-
"@univerjs-pro/license": "0.8.1-nightly.
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.8.1-nightly.202506151606",
|
|
49
|
+
"@univerjs-pro/license": "0.8.1-nightly.202506151606",
|
|
50
|
+
"@univerjs/core": "0.8.1-nightly.202506151606",
|
|
51
|
+
"@univerjs/network": "0.8.1-nightly.202506151606",
|
|
50
52
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/thread-comment": "0.8.1-nightly.
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.8.1-nightly.202506131607",
|
|
54
|
-
"@univerjs/core": "0.8.1-nightly.202506131607"
|
|
53
|
+
"@univerjs/thread-comment": "0.8.1-nightly.202506151606",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.8.1-nightly.202506151606"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|