@univerjs-pro/thread-comment-datasource 0.8.1-nightly.202506131607 → 0.8.1-nightly.202506141606
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 _0x34c9d3=_0x1012;(function(_0x42e8ea,_0x2f22a7){const _0xf7b0d=_0x1012,_0x300649=_0x42e8ea();while(!![]){try{const _0x38d2bb=parseInt(_0xf7b0d(0x225))/0x1+parseInt(_0xf7b0d(0x1de))/0x2*(parseInt(_0xf7b0d(0x1ea))/0x3)+-parseInt(_0xf7b0d(0x1da))/0x4*(parseInt(_0xf7b0d(0x20f))/0x5)+-parseInt(_0xf7b0d(0x208))/0x6*(-parseInt(_0xf7b0d(0x1fc))/0x7)+-parseInt(_0xf7b0d(0x214))/0x8+-parseInt(_0xf7b0d(0x1e1))/0x9*(parseInt(_0xf7b0d(0x1ec))/0xa)+parseInt(_0xf7b0d(0x1c1))/0xb;if(_0x38d2bb===_0x2f22a7)break;else _0x300649['push'](_0x300649['shift']());}catch(_0x51d758){_0x300649['push'](_0x300649['shift']());}}}(_0x289e,0xe45c8));Object[_0x34c9d3(0x1dc)](exports,Symbol['toStringTag'],{'value':_0x34c9d3(0x1b7)});const b=require(_0x34c9d3(0x228)),T=require(_0x34c9d3(0x1f4)),c=require('@univerjs/core'),j=require(_0x34c9d3(0x1bb)),M=require(_0x34c9d3(0x213)),w=require(_0x34c9d3(0x207)),P=require('@univerjs/network'),U=_0x34c9d3(0x1c8);function _0x1012(_0x1d639f,_0x3af2de){const _0x289e25=_0x289e();return _0x1012=function(_0x1012f8,_0x3da381){_0x1012f8=_0x1012f8-0x1b3;let _0x444c90=_0x289e25[_0x1012f8];return _0x444c90;},_0x1012(_0x1d639f,_0x3af2de);}var I=(_0x24083d=>(_0x24083d[_0x24083d[_0x34c9d3(0x1dd)]=0x0]=_0x34c9d3(0x1dd),_0x24083d[_0x24083d[_0x34c9d3(0x202)]=0x1]='Solved',_0x24083d[_0x24083d[_0x34c9d3(0x1f7)]=-0x1]=_0x34c9d3(0x1f7),_0x24083d))(I||{}),v=(_0x257672=>(_0x257672[_0x257672[_0x34c9d3(0x1c0)]=0x0]='Unknown',_0x257672[_0x257672[_0x34c9d3(0x20b)]=0x1]=_0x34c9d3(0x20b),_0x257672[_0x257672[_0x34c9d3(0x21a)]=0x2]=_0x34c9d3(0x21a),_0x257672[_0x257672[_0x34c9d3(0x1f9)]=0x3]=_0x34c9d3(0x1f9),_0x257672[_0x257672[_0x34c9d3(0x1ed)]=0x4]=_0x34c9d3(0x1ed),_0x257672[_0x257672[_0x34c9d3(0x1bf)]=0x5]='Solve',_0x257672[_0x257672[_0x34c9d3(0x1f7)]=-0x1]=_0x34c9d3(0x1f7),_0x257672))(v||{});const f=_0x252ac2=>c[_0x34c9d3(0x221)](new Date(+_0x252ac2))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x229240,_0x2181f6)=>{const _0x33a30b=_0x34c9d3,_0x206b83=_0x229240[_0x33a30b(0x1c7)](c[_0x33a30b(0x22c)]),_0x2100cb=_0x229240['get'](P[_0x33a30b(0x203)]);_0x2181f6[_0x33a30b(0x1ef)](_0x344aff=>{const _0x1c58e6=_0x33a30b;_0x206b83['getUser'](_0x344aff)&&_0x2181f6[_0x1c58e6(0x1c4)](_0x344aff);}),_0x2181f6['size']&&(await _0x2100cb[_0x33a30b(0x1c7)](_0x33a30b(0x1cc),{'params':{'userIDs':[..._0x2181f6]}}))[_0x33a30b(0x224)][_0x33a30b(0x1d1)][_0x33a30b(0x1ef)](_0x49dcec=>{const _0x5e1751=_0x33a30b;_0x49dcec&&_0x206b83[_0x5e1751(0x231)](_0x49dcec);});};var $=Object[_0x34c9d3(0x1c6)],E=(_0x4f253c,_0x3efce2,_0x13fd0c,_0x29d451)=>{const _0x5a2fae=_0x34c9d3;for(var _0xb88696=_0x29d451>0x1?void 0x0:_0x29d451?$(_0x3efce2,_0x13fd0c):_0x3efce2,_0xe82e3e=_0x4f253c[_0x5a2fae(0x212)]-0x1,_0x5a3bf4;_0xe82e3e>=0x0;_0xe82e3e--)(_0x5a3bf4=_0x4f253c[_0xe82e3e])&&(_0xb88696=_0x5a3bf4(_0xb88696)||_0xb88696);return _0xb88696;},S=(_0x3b80df,_0x4fa89f)=>(_0x4f93d,_0x3fa97c)=>_0x4fa89f(_0x4f93d,_0x3fa97c,_0x3b80df);let p=class extends c['Disposable']{constructor(_0x4d6931,_0x36f65e,_0xdffb34,_0x40ed09){const _0x661e9a=_0x34c9d3;super(),this[_0x661e9a(0x234)]=_0x4d6931,this['_threadCommentModel']=_0x36f65e,this[_0x661e9a(0x1f3)]=_0xdffb34,this[_0x661e9a(0x1b5)]=_0x40ed09,this['_init'](),this[_0x661e9a(0x1e3)]();}['_initUserSync'](){const _0x37a837=_0x34c9d3;this[_0x37a837(0x1e8)](this['_threadCommentModel'][_0x37a837(0x1ce)][_0x37a837(0x1d2)](w[_0x37a837(0x216)](0x10))[_0x37a837(0x22e)](_0x172899=>{const _0x44393b=_0x37a837,_0xf093f5=new Set();_0x172899['forEach'](_0x58d908=>{const _0x20cc59=_0x1012;switch(_0x58d908[_0x20cc59(0x1cf)]){case _0x20cc59(0x223):{const _0x3db0dc=_0x58d908['payload'][_0x20cc59(0x1d0)];_0xf093f5[_0x20cc59(0x223)](_0x3db0dc);break;}}}),R(this[_0x44393b(0x1b5)],_0xf093f5);}));}[_0x34c9d3(0x21f)](){const _0x58fba3=_0x34c9d3;this[_0x58fba3(0x1e8)](this[_0x58fba3(0x234)][_0x58fba3(0x1ce)][_0x58fba3(0x22e)](async _0x300010=>{const _0x115ed6=_0x58fba3;var _0x366762,_0x5f4cd2,_0x5e003e,_0x33685f;const _0x321e80=(_0x366762=this[_0x115ed6(0x1bc)]['getUnit'](_0x300010['unitId'])[_0x115ed6(0x21e)](_0x37d584=>_0x37d584[_0x115ed6(0x1fb)]===_0x300010['threadId']))==null?void 0x0:_0x366762[_0x115ed6(0x206)];if(!_0x321e80)return;const {unitId:_0x111fc5,subUnitId:_0x45849d}=_0x321e80;switch(_0x300010[_0x115ed6(0x1c2)]&&this['_userService'][_0x115ed6(0x231)](_0x300010[_0x115ed6(0x1c2)]),_0x300010[_0x115ed6(0x1cf)]){case v['Add']:break;case v[_0x115ed6(0x21a)]:{this[_0x115ed6(0x1bc)][_0x115ed6(0x210)](_0x111fc5,_0x45849d,{'unitId':_0x111fc5,'subUnitId':_0x45849d,'ref':'','id':_0x300010[_0x115ed6(0x205)],'dT':f(+_0x300010[_0x115ed6(0x1d7)]),'threadId':_0x300010[_0x115ed6(0x1fb)],'personId':(_0x5e003e=(_0x5f4cd2=_0x300010[_0x115ed6(0x1c2)])==null?void 0x0:_0x5f4cd2[_0x115ed6(0x20d)])!=null?_0x5e003e:_0x300010['userId'],'text':JSON[_0x115ed6(0x1e0)](_0x300010[_0x115ed6(0x1d5)]),'parentId':_0x321e80['id']});break;}case v[_0x115ed6(0x1ed)]:{const _0xcabfc3=this[_0x115ed6(0x1bc)][_0x115ed6(0x1b6)](_0x111fc5,_0x45849d,_0x300010[_0x115ed6(0x205)]);_0xcabfc3&&_0xcabfc3[_0x115ed6(0x1d6)]&&this['_threadCommentModel'][_0x115ed6(0x1eb)](_0x111fc5,_0x45849d,_0x300010[_0x115ed6(0x205)]);break;}case v[_0x115ed6(0x1f9)]:{this[_0x115ed6(0x1bc)]['updateComment'](_0x111fc5,_0x45849d,{'commentId':_0x300010[_0x115ed6(0x205)],'text':JSON['parse'](_0x300010[_0x115ed6(0x1d5)])});break;}case v[_0x115ed6(0x1bf)]:{const _0x175c6e=(_0x33685f=this[_0x115ed6(0x1bc)][_0x115ed6(0x1bd)](_0x300010[_0x115ed6(0x1db)])[_0x115ed6(0x21e)](_0x503e9f=>_0x503e9f[_0x115ed6(0x1fb)]===_0x300010[_0x115ed6(0x1fb)]))==null?void 0x0:_0x33685f[_0x115ed6(0x206)];_0x175c6e&&this[_0x115ed6(0x1bc)][_0x115ed6(0x1fe)](_0x111fc5,_0x45849d,_0x175c6e['id'],_0x300010['solved']===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x34c9d3(0x1e2)](b[_0x34c9d3(0x1d9)])),S(0x1,c[_0x34c9d3(0x1e2)](M[_0x34c9d3(0x1c3)])),S(0x2,c[_0x34c9d3(0x1e2)](c[_0x34c9d3(0x22c)])),S(0x3,c[_0x34c9d3(0x1e2)](c[_0x34c9d3(0x1df)]))],p);const q=_0x34c9d3(0x22a),D={};var A=Object[_0x34c9d3(0x1c6)],x=(_0x379452,_0x4e4f0f,_0x56743d,_0x4310ef)=>{const _0x1d4c7e=_0x34c9d3;for(var _0x369920=_0x4310ef>0x1?void 0x0:_0x4310ef?A(_0x4e4f0f,_0x56743d):_0x4e4f0f,_0x2ea787=_0x379452[_0x1d4c7e(0x212)]-0x1,_0x16b3f3;_0x2ea787>=0x0;_0x2ea787--)(_0x16b3f3=_0x379452[_0x2ea787])&&(_0x369920=_0x16b3f3(_0x369920)||_0x369920);return _0x369920;},_=(_0x553b3d,_0x3fcdd6)=>(_0x5dec22,_0x940576)=>_0x3fcdd6(_0x5dec22,_0x940576,_0x553b3d);function Y(_0x4f884a,_0xd0bd13){const _0x1e3f18=_0x34c9d3,_0x251c8c=_0x4f884a[_0x1e3f18(0x1cd)][0x0];return{..._0xd0bd13,'id':_0x251c8c[_0x1e3f18(0x205)],'resolved':_0x4f884a[_0x1e3f18(0x1ca)]===0x1,'dT':f(_0x251c8c[_0x1e3f18(0x1d7)]),'personId':_0x251c8c[_0x1e3f18(0x21c)],'threadId':_0x251c8c[_0x1e3f18(0x1fb)]};}function _0x289e(){const _0x183ea7=['syncUpdateMutationToColla','resolveComment','COMMENT','IThreadCommentDataSourceService','CollaborationSessionService','Solved','HTTPService','UniverLicensePlugin','replyId','root','rxjs','3951978lCvTRJ','comments','_httpService','Add','onReady','userID','filter','7435jNLGXW','addComment','ref','length','@univerjs/thread-comment','12523584IKJKQW','dataSource','bufferTime','CustomRangeType','UNIVER_UNKNOWN','onStarting','Reply','resolved','userId','/reply','find','_init','map','dayjs','/edit','add','body','1572119KkzitM','slice','pluginName','@univerjs-pro/collaboration-client','DependentOn','thread-comment-data-source.config','UniverCollaborationClientPlugin','UserManagerService','/add','subscribe','symbol','/delete','addUser','_sessionService','getCurrentUser','_commentService','/universer-api/comment/unit/','comment','format','_injector','getComment','Module','updateComment','merge','stringify','@univerjs/thread-comment-ui','_threadCommentModel','getUnit','requireSession','Solve','Unknown','16882547WPbRVz','user','ThreadCommentModel','delete','_initDataSource','getOwnPropertyDescriptor','get','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverThreadCommentDataSourcePlugin','solved','_config','/universer-api/user/list','replies','commentUpdate$','type','personId','users','pipe','listComments','getMemberID','content','parentId','createTimestamp','values','CommentService','3876dVvrWn','unitId','defineProperty','OpenOrReOpen','6TNFTnj','Injector','parse','54GQoBSI','Inject','_initUserSync','customRanges','IConfigService','rangeType','reply','disposeWithMe','/list','1774314TSQCgY','deleteComment','2663590CBGFFh','Delete','_configService','forEach','Disposable','rangeId','code','_userService','@univerjs-pro/license','_threadCommentDataSource','error','UNRECOGNIZED','post','Edit','_threadCommentDataSourceService','threadId','7mxJIIT'];_0x289e=function(){return _0x183ea7;};return _0x289e();}function G(_0x4aec79,_0x36a157,_0x487d2f){const _0x452633=_0x34c9d3;var _0x47edbe,_0x5de2f3;if(((_0x5de2f3=(_0x47edbe=_0x4aec79==null?void 0x0:_0x4aec79[_0x452633(0x1cd)])==null?void 0x0:_0x47edbe[_0x452633(0x212)])!=null?_0x5de2f3:0x0)>0x0){const _0x2cbc4a=(_0x1c056b,_0x2ff5d0)=>({'id':_0x1c056b[_0x452633(0x205)],'threadId':_0x1c056b[_0x452633(0x1fb)],'dT':f(_0x1c056b['createTimestamp']),'personId':_0x1c056b[_0x452633(0x21c)],'resolved':_0x4aec79[_0x452633(0x1ca)]===I[_0x452633(0x202)],'unitId':_0x36a157,'subUnitId':_0x487d2f,'text':JSON[_0x452633(0x1e0)](_0x1c056b[_0x452633(0x1d5)]),'parentId':_0x2ff5d0}),_0x2a35ab=_0x2cbc4a(_0x4aec79[_0x452633(0x1cd)][0x0]);return{..._0x2a35ab,'children':_0x4aec79[_0x452633(0x1cd)][_0x452633(0x226)](0x1)['map'](_0x2e8d71=>_0x2cbc4a(_0x2e8d71,_0x2a35ab['id']))};}return null;}let g=class{constructor(_0x367ebc,_0x1943da,_0x39cd4f,_0x39e7bf){const _0x171b70=_0x34c9d3;this['_httpService']=_0x367ebc,this[_0x171b70(0x1f3)]=_0x1943da,this[_0x171b70(0x232)]=_0x39cd4f,this['_injector']=_0x39e7bf;}async[_0x34c9d3(0x210)](_0x45915a){const _0x2fb839=_0x34c9d3;var _0x92bdc1,_0x535fb9;const {parentId:_0x34e78d,unitId:_0x77dbb1,text:_0x263a49,threadId:_0x47e800}=_0x45915a,_0x16ddb6=(_0x535fb9=(_0x92bdc1=_0x263a49[_0x2fb839(0x1e4)])==null?void 0x0:_0x92bdc1[_0x2fb839(0x20e)](_0x15e588=>_0x15e588[_0x2fb839(0x1e6)]===c[_0x2fb839(0x217)][_0x2fb839(0x1ff)])['map'](_0xf56af8=>_0xf56af8[_0x2fb839(0x1f1)]))!=null?_0x535fb9:[],_0xcf4396=JSON[_0x2fb839(0x1ba)](_0x263a49),_0x78f452=(await this[_0x2fb839(0x232)][_0x2fb839(0x1be)](_0x77dbb1))[_0x2fb839(0x1d4)]();if(_0x34e78d){const _0x3fbe93={'memberId':_0x78f452,'unitId':_0x77dbb1,'content':_0xcf4396,'mention':_0x16ddb6,'threadId':_0x47e800},_0x109fdb=(await this['_httpService'][_0x2fb839(0x1f8)](_0x2fb839(0x235)+_0x77dbb1+_0x2fb839(0x21d),{'body':_0x3fbe93}))[_0x2fb839(0x224)][_0x2fb839(0x1e7)];return{..._0x45915a,'id':_0x109fdb['replyId'],'dT':c['dayjs'](+_0x109fdb[_0x2fb839(0x1d7)])[_0x2fb839(0x1b4)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x109fdb[_0x2fb839(0x21c)]};}else{const _0x41d972={'memberId':_0x78f452,'unitId':_0x77dbb1,'content':_0xcf4396,'mention':_0x16ddb6},_0x29b9df=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x77dbb1+_0x2fb839(0x22d),{'body':_0x41d972});return Y(_0x29b9df[_0x2fb839(0x224)][_0x2fb839(0x1b3)],_0x45915a);}}async[_0x34c9d3(0x1b8)](_0x45e56d){const _0xb1b234=_0x34c9d3;var _0x16040b,_0x3df359;const {text:_0x11e502,unitId:_0x3d7f3a}=_0x45e56d,_0x4e7da5=(_0x3df359=(_0x16040b=_0x11e502['customRanges'])==null?void 0x0:_0x16040b['filter'](_0x1f759e=>_0x1f759e[_0xb1b234(0x1e6)]===c[_0xb1b234(0x217)]['COMMENT'])[_0xb1b234(0x220)](_0x520d0c=>_0x520d0c[_0xb1b234(0x1f1)]))!=null?_0x3df359:[],_0x2d9e12=JSON['stringify'](_0x11e502),_0x53f67d=_0x45e56d[_0xb1b234(0x1fb)],_0xfbb47=_0x45e56d['id'],_0x121de6={'memberId':(await this['_sessionService'][_0xb1b234(0x1be)](_0x3d7f3a))[_0xb1b234(0x1d4)](),'unitId':_0x3d7f3a,'threadId':_0x53f67d,'mention':_0x4e7da5,'content':_0x2d9e12,'replyId':_0xfbb47},_0x40ab00=await this['_httpService'][_0xb1b234(0x1f8)](_0xb1b234(0x235)+_0x3d7f3a+_0xb1b234(0x222),{'body':_0x121de6});return!_0x40ab00[_0xb1b234(0x224)]['error']||_0x40ab00[_0xb1b234(0x224)][_0xb1b234(0x1f6)][_0xb1b234(0x1f2)]===0x1;}async[_0x34c9d3(0x1fe)](_0x660ed4){const _0x3dc4d7=_0x34c9d3,{unitId:_0x4432a0}=_0x660ed4,_0x12cd23=_0x660ed4['threadId'],_0x3761e7={'memberId':this[_0x3dc4d7(0x1f3)][_0x3dc4d7(0x233)]()[_0x3dc4d7(0x20d)],'unitId':_0x4432a0,'threadId':_0x12cd23,'solved':_0x660ed4[_0x3dc4d7(0x21b)]?I['Solved']:I['OpenOrReOpen']},_0x11350e=await this[_0x3dc4d7(0x20a)][_0x3dc4d7(0x1f8)](_0x3dc4d7(0x235)+_0x4432a0+'/solved',{'body':_0x3761e7});return!_0x11350e['body'][_0x3dc4d7(0x1f6)]||_0x11350e[_0x3dc4d7(0x224)]['error']['code']===0x1;}async[_0x34c9d3(0x1eb)](_0x20fd5a,_0x3616c2,_0x43ea44,_0x1351b1){const _0x319a03=_0x34c9d3,_0x1695c9={'memberId':(await this[_0x319a03(0x232)][_0x319a03(0x1be)](_0x20fd5a))[_0x319a03(0x1d4)](),'threadId':_0x43ea44,'replyId':_0x1351b1,'unitId':_0x20fd5a},_0x125bcc=await this[_0x319a03(0x20a)]['post'](_0x319a03(0x235)+_0x20fd5a+_0x319a03(0x230),{'body':_0x1695c9});return!_0x125bcc[_0x319a03(0x224)][_0x319a03(0x1f6)]||_0x125bcc[_0x319a03(0x224)]['error']['code']===0x1;}async[_0x34c9d3(0x1d3)](_0x3e1300,_0x162693,_0x11f347){const _0x4073c6=_0x34c9d3,_0x592dbd={'unitId':_0x3e1300,'threadId':_0x11f347},_0x49e150=await this[_0x4073c6(0x20a)]['post'](_0x4073c6(0x235)+_0x3e1300+_0x4073c6(0x1e9),{'body':_0x592dbd}),_0x72ef08=_0x11f347['map'](_0x410c5b=>G(_0x49e150[_0x4073c6(0x224)][_0x4073c6(0x209)][_0x410c5b],_0x3e1300,_0x162693))[_0x4073c6(0x20e)](Boolean);return Object[_0x4073c6(0x1d8)](_0x49e150['body']['users'])['forEach'](_0x58cbd8=>{const _0x39f56a=_0x4073c6;this[_0x39f56a(0x1f3)]['addUser'](_0x58cbd8);}),_0x72ef08;}['saveCommentToSnapshot'](_0x36823c){const _0x166abc=_0x34c9d3;return{'id':_0x36823c['id'],'threadId':_0x36823c[_0x166abc(0x1fb)],'ref':_0x36823c[_0x166abc(0x211)]};}};g=x([_(0x0,c['Inject'](P[_0x34c9d3(0x203)])),_(0x1,c[_0x34c9d3(0x1e2)](c[_0x34c9d3(0x22c)])),_(0x2,c[_0x34c9d3(0x1e2)](b[_0x34c9d3(0x201)])),_(0x3,c[_0x34c9d3(0x1e2)](c[_0x34c9d3(0x1df)]))],g);var H=Object[_0x34c9d3(0x1c6)],J=(_0x14f027,_0x1e5ffa,_0x689dfc,_0x1dcdde)=>{const _0x3de6bd=_0x34c9d3;for(var _0x57b34d=_0x1dcdde>0x1?void 0x0:_0x1dcdde?H(_0x1e5ffa,_0x689dfc):_0x1e5ffa,_0x3b0168=_0x14f027[_0x3de6bd(0x212)]-0x1,_0x340d03;_0x3b0168>=0x0;_0x3b0168--)(_0x340d03=_0x14f027[_0x3b0168])&&(_0x57b34d=_0x340d03(_0x57b34d)||_0x57b34d);return _0x57b34d;},y=(_0x480305,_0x3dad4e)=>(_0x107c72,_0x6b88e0)=>_0x3dad4e(_0x107c72,_0x6b88e0,_0x480305);let C=class extends c[_0x34c9d3(0x1f0)]{constructor(_0x2b51d6,_0x2483fa){const _0x2ce469=_0x34c9d3;super(),this['_threadCommentDataSourceService']=_0x2b51d6,this[_0x2ce469(0x1f5)]=_0x2483fa,this[_0x2ce469(0x1c5)]();}[_0x34c9d3(0x1c5)](){const _0x1c7934=_0x34c9d3;this[_0x1c7934(0x1fa)][_0x1c7934(0x215)]=this[_0x1c7934(0x1f5)],this[_0x1c7934(0x1fa)][_0x1c7934(0x1fd)]=!0x1;}};C=J([y(0x0,M[_0x34c9d3(0x200)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x34c9d3(0x1dc)],L=Object[_0x34c9d3(0x1c6)],Z=(_0x196b8a,_0x4d0d8e,_0x1e1cfb)=>_0x4d0d8e in _0x196b8a?F(_0x196b8a,_0x4d0d8e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1e1cfb}):_0x196b8a[_0x4d0d8e]=_0x1e1cfb,W=(_0x56b858,_0x3a0fd3,_0xbf323e,_0x2a3c07)=>{const _0x441eed=_0x34c9d3;for(var _0x6b97ff=_0x2a3c07>0x1?void 0x0:_0x2a3c07?L(_0x3a0fd3,_0xbf323e):_0x3a0fd3,_0x3f21b0=_0x56b858[_0x441eed(0x212)]-0x1,_0x3a6c63;_0x3f21b0>=0x0;_0x3f21b0--)(_0x3a6c63=_0x56b858[_0x3f21b0])&&(_0x6b97ff=_0x3a6c63(_0x6b97ff)||_0x6b97ff);return _0x6b97ff;},O=(_0x5c6b74,_0x2233ec)=>(_0x513270,_0x402655)=>_0x2233ec(_0x513270,_0x402655,_0x5c6b74),N=(_0x4c9118,_0x4d7b7d,_0x1c5dc6)=>Z(_0x4c9118,typeof _0x4d7b7d!=_0x34c9d3(0x22f)?_0x4d7b7d+'':_0x4d7b7d,_0x1c5dc6);exports[_0x34c9d3(0x1c9)]=class extends c['Plugin']{constructor(_0x562ae3=D,_0x513023,_0x365f54){const _0x3ade65=_0x34c9d3;super(),this[_0x3ade65(0x1cb)]=_0x562ae3,this[_0x3ade65(0x1b5)]=_0x513023,this[_0x3ade65(0x1ee)]=_0x365f54;const {..._0xbea690}=c[_0x3ade65(0x1b9)]({},D,this['_config']);this[_0x3ade65(0x1ee)]['setConfig'](q,_0xbea690);}[_0x34c9d3(0x219)](){[[g],[C],[p]]['forEach'](_0x3ef8ca=>{const _0x25ab1a=_0x1012;this[_0x25ab1a(0x1b5)]['add'](_0x3ef8ca);});}[_0x34c9d3(0x20c)](){const _0x1ee295=_0x34c9d3;this['_injector'][_0x1ee295(0x1c7)](C),this[_0x1ee295(0x1b5)][_0x1ee295(0x1c7)](p);}},N(exports[_0x34c9d3(0x1c9)],_0x34c9d3(0x227),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x34c9d3(0x1cf),c['UniverInstanceType'][_0x34c9d3(0x218)]),exports[_0x34c9d3(0x1c9)]=W([c[_0x34c9d3(0x229)](j['UniverThreadCommentUIPlugin'],b[_0x34c9d3(0x22b)],T[_0x34c9d3(0x204)]),O(0x1,c[_0x34c9d3(0x1e2)](c[_0x34c9d3(0x1df)])),O(0x2,c[_0x34c9d3(0x1e5)])],exports[_0x34c9d3(0x1c9)]);
|
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 _0x9cf832=_0x5690;(function(_0x1ab0f5,_0x582785){const _0x14f229=_0x5690,_0x571315=_0x1ab0f5();while(!![]){try{const _0x4a90d3=-parseInt(_0x14f229(0x106))/0x1*(-parseInt(_0x14f229(0xa3))/0x2)+parseInt(_0x14f229(0xe9))/0x3*(parseInt(_0x14f229(0xe2))/0x4)+-parseInt(_0x14f229(0xf1))/0x5*(parseInt(_0x14f229(0xb1))/0x6)+-parseInt(_0x14f229(0x102))/0x7*(parseInt(_0x14f229(0xc5))/0x8)+-parseInt(_0x14f229(0xc9))/0x9+-parseInt(_0x14f229(0xcb))/0xa+-parseInt(_0x14f229(0xb3))/0xb*(-parseInt(_0x14f229(0xd2))/0xc);if(_0x4a90d3===_0x582785)break;else _0x571315['push'](_0x571315['shift']());}catch(_0x2b9612){_0x571315['push'](_0x571315['shift']());}}}(_0x51a8,0x5c1fb));import{CommentService as _0x1803a,CollaborationSessionService as _0x1c6622,UniverCollaborationClientPlugin as _0x5befe3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x37b1f9}from'@univerjs-pro/license';import{dayjs as _0x33b739,UserManagerService as _0xe8fcb1,Inject as _0x2f174f,Injector as _0x27970a,Disposable as _0xd71482,CustomRangeType as _0xf31c67,UniverInstanceType as _0x2a1993,DependentOn as _0x215ab7,IConfigService as _0x1acffc,Plugin as _0x5527d6,merge as _0x42355d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1f6f25}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x23f12b,IThreadCommentDataSourceService as _0x412e5d}from'@univerjs/thread-comment';import{bufferTime as _0x5d7449}from'rxjs';import{HTTPService as _0x1a1c91}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0x5690(_0x35ec36,_0x3e9002){const _0x51a8f0=_0x51a8();return _0x5690=function(_0x569008,_0x5d4623){_0x569008=_0x569008-0x9f;let _0x40fe07=_0x51a8f0[_0x569008];return _0x40fe07;},_0x5690(_0x35ec36,_0x3e9002);}var I=(_0x53c897=>(_0x53c897[_0x53c897[_0x9cf832(0xf4)]=0x0]=_0x9cf832(0xf4),_0x53c897[_0x53c897[_0x9cf832(0xba)]=0x1]=_0x9cf832(0xba),_0x53c897[_0x53c897[_0x9cf832(0xff)]=-0x1]='UNRECOGNIZED',_0x53c897))(I||{}),v=(_0x292077=>(_0x292077[_0x292077[_0x9cf832(0xdd)]=0x0]=_0x9cf832(0xdd),_0x292077[_0x292077[_0x9cf832(0xfd)]=0x1]=_0x9cf832(0xfd),_0x292077[_0x292077[_0x9cf832(0xef)]=0x2]='Reply',_0x292077[_0x292077[_0x9cf832(0xc7)]=0x3]=_0x9cf832(0xc7),_0x292077[_0x292077['Delete']=0x4]=_0x9cf832(0xca),_0x292077[_0x292077[_0x9cf832(0xa0)]=0x5]=_0x9cf832(0xa0),_0x292077[_0x292077[_0x9cf832(0xff)]=-0x1]='UNRECOGNIZED',_0x292077))(v||{});const D=_0x16630a=>_0x33b739(new Date(+_0x16630a))[_0x9cf832(0xc3)](_0x9cf832(0xb6)),B=async(_0x3658d2,_0x5bff7d)=>{const _0xfc86d9=_0x9cf832,_0x533b58=_0x3658d2[_0xfc86d9(0xb9)](_0xe8fcb1),_0x5e7eb9=_0x3658d2['get'](_0x1a1c91);_0x5bff7d['forEach'](_0x4babe3=>{const _0x35c76d=_0xfc86d9;_0x533b58[_0x35c76d(0x100)](_0x4babe3)&&_0x5bff7d[_0x35c76d(0xae)](_0x4babe3);}),_0x5bff7d['size']&&(await _0x5e7eb9[_0xfc86d9(0xb9)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5bff7d]}}))[_0xfc86d9(0xd5)][_0xfc86d9(0xc6)]['forEach'](_0xbb79bb=>{const _0x37fc30=_0xfc86d9;_0xbb79bb&&_0x533b58[_0x37fc30(0xa4)](_0xbb79bb);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x369613,_0x5b7093,_0x1abaf1,_0x5328cc)=>{const _0x42748e=_0x9cf832;for(var _0x2c4c14=_0x5328cc>0x1?void 0x0:_0x5328cc?K(_0x5b7093,_0x1abaf1):_0x5b7093,_0x112d1e=_0x369613[_0x42748e(0xd1)]-0x1,_0x2f86d3;_0x112d1e>=0x0;_0x112d1e--)(_0x2f86d3=_0x369613[_0x112d1e])&&(_0x2c4c14=_0x2f86d3(_0x2c4c14)||_0x2c4c14);return _0x2c4c14;},p=(_0x44e692,_0x476b91)=>(_0x2a1a2f,_0x500e43)=>_0x476b91(_0x2a1a2f,_0x500e43,_0x44e692);let S=class extends _0xd71482{constructor(_0x42dc89,_0x459ac4,_0x499a45,_0x17175d){const _0x2a2f0e=_0x9cf832;super(),this[_0x2a2f0e(0xe6)]=_0x42dc89,this[_0x2a2f0e(0xe1)]=_0x459ac4,this['_userService']=_0x499a45,this[_0x2a2f0e(0xf5)]=_0x17175d,this[_0x2a2f0e(0x103)](),this[_0x2a2f0e(0xcf)]();}['_initUserSync'](){const _0x4d21d4=_0x9cf832;this[_0x4d21d4(0xea)](this['_threadCommentModel']['commentUpdate$'][_0x4d21d4(0xb5)](_0x5d7449(0x10))[_0x4d21d4(0xbd)](_0x3baf25=>{const _0x1e9cac=_0x4d21d4,_0x3a8832=new Set();_0x3baf25[_0x1e9cac(0xf7)](_0x288485=>{const _0x487d9b=_0x1e9cac;switch(_0x288485[_0x487d9b(0xd6)]){case _0x487d9b(0xee):{const _0x1c5945=_0x288485['payload'][_0x487d9b(0xeb)];_0x3a8832['add'](_0x1c5945);break;}}}),B(this['_injector'],_0x3a8832);}));}[_0x9cf832(0x103)](){const _0x2120eb=_0x9cf832;this[_0x2120eb(0xea)](this[_0x2120eb(0xe6)][_0x2120eb(0xe4)][_0x2120eb(0xbd)](async _0x36a911=>{const _0x32e7aa=_0x2120eb;var _0xfe6098,_0x3dca27,_0x1791e1,_0x205790;const _0x365e16=(_0xfe6098=this[_0x32e7aa(0xe1)][_0x32e7aa(0xad)](_0x36a911[_0x32e7aa(0xf9)])['find'](_0x35025b=>_0x35025b['threadId']===_0x36a911[_0x32e7aa(0xda)]))==null?void 0x0:_0xfe6098[_0x32e7aa(0xd4)];if(!_0x365e16)return;const {unitId:_0x1b19d4,subUnitId:_0x358367}=_0x365e16;switch(_0x36a911[_0x32e7aa(0xed)]&&this[_0x32e7aa(0xb2)][_0x32e7aa(0xa4)](_0x36a911['user']),_0x36a911[_0x32e7aa(0xd6)]){case v[_0x32e7aa(0xfd)]:break;case v[_0x32e7aa(0xef)]:{this[_0x32e7aa(0xe1)][_0x32e7aa(0xf3)](_0x1b19d4,_0x358367,{'unitId':_0x1b19d4,'subUnitId':_0x358367,'ref':'','id':_0x36a911[_0x32e7aa(0xfb)],'dT':D(+_0x36a911[_0x32e7aa(0xdf)]),'threadId':_0x36a911[_0x32e7aa(0xda)],'personId':(_0x1791e1=(_0x3dca27=_0x36a911[_0x32e7aa(0xed)])==null?void 0x0:_0x3dca27[_0x32e7aa(0xa6)])!=null?_0x1791e1:_0x36a911[_0x32e7aa(0x9f)],'text':JSON[_0x32e7aa(0xd9)](_0x36a911[_0x32e7aa(0xfc)]),'parentId':_0x365e16['id']});break;}case v[_0x32e7aa(0xca)]:{const _0x35fd2b=this[_0x32e7aa(0xe1)]['getComment'](_0x1b19d4,_0x358367,_0x36a911[_0x32e7aa(0xfb)]);_0x35fd2b&&_0x35fd2b[_0x32e7aa(0xd3)]&&this[_0x32e7aa(0xe1)]['deleteComment'](_0x1b19d4,_0x358367,_0x36a911['replyId']);break;}case v[_0x32e7aa(0xc7)]:{this[_0x32e7aa(0xe1)][_0x32e7aa(0xf0)](_0x1b19d4,_0x358367,{'commentId':_0x36a911[_0x32e7aa(0xfb)],'text':JSON[_0x32e7aa(0xd9)](_0x36a911['content'])});break;}case v[_0x32e7aa(0xa0)]:{const _0x4e6bf9=(_0x205790=this[_0x32e7aa(0xe1)]['getUnit'](_0x36a911[_0x32e7aa(0xf9)])[_0x32e7aa(0xe7)](_0x43fe88=>_0x43fe88['threadId']===_0x36a911[_0x32e7aa(0xda)]))==null?void 0x0:_0x205790['root'];_0x4e6bf9&&this[_0x32e7aa(0xe1)]['resolveComment'](_0x1b19d4,_0x358367,_0x4e6bf9['id'],_0x36a911[_0x32e7aa(0xce)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x2f174f(_0x1803a)),p(0x1,_0x2f174f(_0x23f12b)),p(0x2,_0x2f174f(_0xe8fcb1)),p(0x3,_0x2f174f(_0x27970a))],S);const z=_0x9cf832(0xbc),M={};var k=Object[_0x9cf832(0xa8)],Q=(_0x29fb58,_0x2df8e7,_0x19864c,_0x2eea02)=>{const _0x65470=_0x9cf832;for(var _0x390171=_0x2eea02>0x1?void 0x0:_0x2eea02?k(_0x2df8e7,_0x19864c):_0x2df8e7,_0x52fcbb=_0x29fb58[_0x65470(0xd1)]-0x1,_0x5c3641;_0x52fcbb>=0x0;_0x52fcbb--)(_0x5c3641=_0x29fb58[_0x52fcbb])&&(_0x390171=_0x5c3641(_0x390171)||_0x390171);return _0x390171;},_=(_0x14a6dd,_0x573134)=>(_0x1da04d,_0x502cb8)=>_0x573134(_0x1da04d,_0x502cb8,_0x14a6dd);function X(_0x5c6cbd,_0x2d4c44){const _0xd2abdb=_0x9cf832,_0x5a60e1=_0x5c6cbd[_0xd2abdb(0xbb)][0x0];return{..._0x2d4c44,'id':_0x5a60e1[_0xd2abdb(0xfb)],'resolved':_0x5c6cbd[_0xd2abdb(0xce)]===0x1,'dT':D(_0x5a60e1['createTimestamp']),'personId':_0x5a60e1['userId'],'threadId':_0x5a60e1[_0xd2abdb(0xda)]};}function ee(_0x57bf54,_0x17ef8e,_0x42ff45){const _0x2a3786=_0x9cf832;var _0x29f0e6,_0xbeaf73;if(((_0xbeaf73=(_0x29f0e6=_0x57bf54==null?void 0x0:_0x57bf54[_0x2a3786(0xbb)])==null?void 0x0:_0x29f0e6[_0x2a3786(0xd1)])!=null?_0xbeaf73:0x0)>0x0){const _0x456bb8=(_0x3e804f,_0x21a111)=>({'id':_0x3e804f[_0x2a3786(0xfb)],'threadId':_0x3e804f['threadId'],'dT':D(_0x3e804f[_0x2a3786(0xdf)]),'personId':_0x3e804f['userId'],'resolved':_0x57bf54['solved']===I['Solved'],'unitId':_0x17ef8e,'subUnitId':_0x42ff45,'text':JSON[_0x2a3786(0xd9)](_0x3e804f['content']),'parentId':_0x21a111}),_0x5e24d5=_0x456bb8(_0x57bf54['replies'][0x0]);return{..._0x5e24d5,'children':_0x57bf54[_0x2a3786(0xbb)]['slice'](0x1)[_0x2a3786(0xa7)](_0x5f395e=>_0x456bb8(_0x5f395e,_0x5e24d5['id']))};}return null;}let f=class{constructor(_0x17967e,_0x358e58,_0x53d44b,_0x427289){const _0x3da1d1=_0x9cf832;this[_0x3da1d1(0xb8)]=_0x17967e,this[_0x3da1d1(0xb2)]=_0x358e58,this[_0x3da1d1(0xd0)]=_0x53d44b,this[_0x3da1d1(0xf5)]=_0x427289;}async['addComment'](_0x2c1f76){const _0x26a539=_0x9cf832;var _0x1403b4,_0x105841;const {parentId:_0x69ee58,unitId:_0x48e4ec,text:_0x3b3c8e,threadId:_0x51104a}=_0x2c1f76,_0x216412=(_0x105841=(_0x1403b4=_0x3b3c8e['customRanges'])==null?void 0x0:_0x1403b4[_0x26a539(0xcc)](_0x1cb298=>_0x1cb298[_0x26a539(0xc1)]===_0xf31c67['COMMENT'])[_0x26a539(0xa7)](_0x2e69df=>_0x2e69df[_0x26a539(0xbf)]))!=null?_0x105841:[],_0x5b1ede=JSON['stringify'](_0x3b3c8e),_0x94f4d=(await this[_0x26a539(0xd0)][_0x26a539(0xcd)](_0x48e4ec))[_0x26a539(0xaf)]();if(_0x69ee58){const _0x37ca21={'memberId':_0x94f4d,'unitId':_0x48e4ec,'content':_0x5b1ede,'mention':_0x216412,'threadId':_0x51104a},_0x1bad8=(await this['_httpService'][_0x26a539(0xac)](_0x26a539(0x101)+_0x48e4ec+_0x26a539(0xfa),{'body':_0x37ca21}))['body'][_0x26a539(0xb7)];return{..._0x2c1f76,'id':_0x1bad8[_0x26a539(0xfb)],'dT':_0x33b739(+_0x1bad8[_0x26a539(0xdf)])['format'](_0x26a539(0xb6)),'personId':_0x1bad8['userId']};}else{const _0xa9085b={'memberId':_0x94f4d,'unitId':_0x48e4ec,'content':_0x5b1ede,'mention':_0x216412},_0x518383=await this[_0x26a539(0xb8)][_0x26a539(0xac)](_0x26a539(0x101)+_0x48e4ec+_0x26a539(0xbe),{'body':_0xa9085b});return X(_0x518383['body'][_0x26a539(0xdb)],_0x2c1f76);}}async['updateComment'](_0x1a2966){const _0x104744=_0x9cf832;var _0x82ebde,_0x16fa86;const {text:_0x2358d0,unitId:_0x2c9bbe}=_0x1a2966,_0x2bbcf7=(_0x16fa86=(_0x82ebde=_0x2358d0[_0x104744(0xa5)])==null?void 0x0:_0x82ebde['filter'](_0x57af91=>_0x57af91[_0x104744(0xc1)]===_0xf31c67[_0x104744(0xa1)])[_0x104744(0xa7)](_0x20f280=>_0x20f280[_0x104744(0xbf)]))!=null?_0x16fa86:[],_0x14bad6=JSON['stringify'](_0x2358d0),_0x34ec8e=_0x1a2966[_0x104744(0xda)],_0x25c00e=_0x1a2966['id'],_0xdd12bf={'memberId':(await this[_0x104744(0xd0)][_0x104744(0xcd)](_0x2c9bbe))[_0x104744(0xaf)](),'unitId':_0x2c9bbe,'threadId':_0x34ec8e,'mention':_0x2bbcf7,'content':_0x14bad6,'replyId':_0x25c00e},_0x2d1b1d=await this[_0x104744(0xb8)][_0x104744(0xac)](_0x104744(0x101)+_0x2c9bbe+_0x104744(0xdc),{'body':_0xdd12bf});return!_0x2d1b1d[_0x104744(0xd5)][_0x104744(0xa9)]||_0x2d1b1d[_0x104744(0xd5)]['error'][_0x104744(0xc8)]===0x1;}async[_0x9cf832(0xe8)](_0xee1eaa){const _0x18e094=_0x9cf832,{unitId:_0xd74435}=_0xee1eaa,_0x29742b=_0xee1eaa[_0x18e094(0xda)],_0x3af91c={'memberId':this['_userService'][_0x18e094(0xde)]()[_0x18e094(0xa6)],'unitId':_0xd74435,'threadId':_0x29742b,'solved':_0xee1eaa[_0x18e094(0xe5)]?I[_0x18e094(0xba)]:I[_0x18e094(0xf4)]},_0x29ae6b=await this[_0x18e094(0xb8)][_0x18e094(0xac)](_0x18e094(0x101)+_0xd74435+'/solved',{'body':_0x3af91c});return!_0x29ae6b[_0x18e094(0xd5)][_0x18e094(0xa9)]||_0x29ae6b['body'][_0x18e094(0xa9)][_0x18e094(0xc8)]===0x1;}async['deleteComment'](_0x5d1d4a,_0x1b598c,_0x2d84d4,_0x4bf9a7){const _0x4c53ff=_0x9cf832,_0x4e3af8={'memberId':(await this[_0x4c53ff(0xd0)][_0x4c53ff(0xcd)](_0x5d1d4a))['getMemberID'](),'threadId':_0x2d84d4,'replyId':_0x4bf9a7,'unitId':_0x5d1d4a},_0x1f13b9=await this[_0x4c53ff(0xb8)]['post'](_0x4c53ff(0x101)+_0x5d1d4a+_0x4c53ff(0xb4),{'body':_0x4e3af8});return!_0x1f13b9[_0x4c53ff(0xd5)][_0x4c53ff(0xa9)]||_0x1f13b9[_0x4c53ff(0xd5)][_0x4c53ff(0xa9)][_0x4c53ff(0xc8)]===0x1;}async['listComments'](_0x19d652,_0x5a6e43,_0x463926){const _0x171732=_0x9cf832,_0x209ef8={'unitId':_0x19d652,'threadId':_0x463926},_0x3a4225=await this[_0x171732(0xb8)][_0x171732(0xac)]('/universer-api/comment/unit/'+_0x19d652+_0x171732(0xe3),{'body':_0x209ef8}),_0x1efe12=_0x463926[_0x171732(0xa7)](_0x324576=>ee(_0x3a4225[_0x171732(0xd5)][_0x171732(0xb0)][_0x324576],_0x19d652,_0x5a6e43))[_0x171732(0xcc)](Boolean);return Object[_0x171732(0xc0)](_0x3a4225[_0x171732(0xd5)]['users'])[_0x171732(0xf7)](_0xaf8059=>{const _0x399552=_0x171732;this[_0x399552(0xb2)][_0x399552(0xa4)](_0xaf8059);}),_0x1efe12;}[_0x9cf832(0xf6)](_0x5b8d2b){const _0x312c0a=_0x9cf832;return{'id':_0x5b8d2b['id'],'threadId':_0x5b8d2b[_0x312c0a(0xda)],'ref':_0x5b8d2b[_0x312c0a(0x105)]};}};f=Q([_(0x0,_0x2f174f(_0x1a1c91)),_(0x1,_0x2f174f(_0xe8fcb1)),_(0x2,_0x2f174f(_0x1c6622)),_(0x3,_0x2f174f(_0x27970a))],f);var re=Object[_0x9cf832(0xa8)],te=(_0xf8ff33,_0x56c733,_0x79fe51,_0x13f505)=>{for(var _0x5b5691=_0x13f505>0x1?void 0x0:_0x13f505?re(_0x56c733,_0x79fe51):_0x56c733,_0x4ff544=_0xf8ff33['length']-0x1,_0x1cc6d4;_0x4ff544>=0x0;_0x4ff544--)(_0x1cc6d4=_0xf8ff33[_0x4ff544])&&(_0x5b5691=_0x1cc6d4(_0x5b5691)||_0x5b5691);return _0x5b5691;},N=(_0x353cc4,_0xc74858)=>(_0x42f8e1,_0x495577)=>_0xc74858(_0x42f8e1,_0x495577,_0x353cc4);let g=class extends _0xd71482{constructor(_0x552596,_0x20fb93){const _0x5b3343=_0x9cf832;super(),this['_threadCommentDataSourceService']=_0x552596,this[_0x5b3343(0xc2)]=_0x20fb93,this[_0x5b3343(0xf2)]();}['_initDataSource'](){const _0x1c2436=_0x9cf832;this[_0x1c2436(0xfe)][_0x1c2436(0xe0)]=this[_0x1c2436(0xc2)],this[_0x1c2436(0xfe)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x412e5d),N(0x1,_0x2f174f(f))],g);var se=Object[_0x9cf832(0xec)],oe=Object[_0x9cf832(0xa8)],ne=(_0x2246e4,_0x20db14,_0x94feec)=>_0x20db14 in _0x2246e4?se(_0x2246e4,_0x20db14,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x94feec}):_0x2246e4[_0x20db14]=_0x94feec,ie=(_0x46194e,_0x2fe6c9,_0x169a73,_0xee9fa5)=>{for(var _0x30d07a=_0xee9fa5>0x1?void 0x0:_0xee9fa5?oe(_0x2fe6c9,_0x169a73):_0x2fe6c9,_0x4c9e3a=_0x46194e['length']-0x1,_0x4dd80e;_0x4c9e3a>=0x0;_0x4c9e3a--)(_0x4dd80e=_0x46194e[_0x4c9e3a])&&(_0x30d07a=_0x4dd80e(_0x30d07a)||_0x30d07a);return _0x30d07a;},w=(_0x1e0a4d,_0x40efec)=>(_0x1506ef,_0x4755c0)=>_0x40efec(_0x1506ef,_0x4755c0,_0x1e0a4d),$=(_0x3ff6db,_0x3da789,_0x26215b)=>ne(_0x3ff6db,typeof _0x3da789!=_0x9cf832(0xd7)?_0x3da789+'':_0x3da789,_0x26215b);let b=class extends _0x5527d6{constructor(_0x5000b5=M,_0x23d008,_0x54bb8b){const _0x4d33e8=_0x9cf832;super(),this[_0x4d33e8(0xf8)]=_0x5000b5,this[_0x4d33e8(0xf5)]=_0x23d008,this[_0x4d33e8(0xd8)]=_0x54bb8b;const {..._0x43ad84}=_0x42355d({},M,this[_0x4d33e8(0xf8)]);this[_0x4d33e8(0xd8)][_0x4d33e8(0xc4)](z,_0x43ad84);}[_0x9cf832(0xab)](){const _0x3cd1a2=_0x9cf832;[[f],[g],[S]][_0x3cd1a2(0xf7)](_0xbc4b2a=>{const _0xb4cedd=_0x3cd1a2;this[_0xb4cedd(0xf5)][_0xb4cedd(0xee)](_0xbc4b2a);});}[_0x9cf832(0xa2)](){const _0xd54bb6=_0x9cf832;this[_0xd54bb6(0xf5)][_0xd54bb6(0xb9)](g),this[_0xd54bb6(0xf5)][_0xd54bb6(0xb9)](S);}};$(b,_0x9cf832(0xaa),W),$(b,_0x9cf832(0xd6),_0x2a1993[_0x9cf832(0x104)]),b=ie([_0x215ab7(_0x1f6f25,_0x5befe3,_0x37b1f9),w(0x1,_0x2f174f(_0x27970a)),w(0x2,_0x1acffc)],b);function _0x51a8(){const _0x1ae353=['code','4697037rcVAuM','Delete','7369950IYEWOv','filter','requireSession','solved','_initUserSync','_sessionService','length','1110084bLQrge','parentId','root','body','type','symbol','_configService','parse','threadId','comment','/edit','Unknown','getCurrentUser','createTimestamp','dataSource','_threadCommentModel','172jgjqPa','/list','commentUpdate$','resolved','_commentService','find','resolveComment','46923HLrEsy','disposeWithMe','personId','defineProperty','user','add','Reply','updateComment','582445vfuzjI','_initDataSource','addComment','OpenOrReOpen','_injector','saveCommentToSnapshot','forEach','_config','unitId','/reply','replyId','content','Add','_threadCommentDataSourceService','UNRECOGNIZED','getUser','/universer-api/comment/unit/','2681ihyEeK','_init','UNIVER_UNKNOWN','ref','2692hqiMlW','userId','Solve','COMMENT','onReady','136bGfjmw','addUser','customRanges','userID','map','getOwnPropertyDescriptor','error','pluginName','onStarting','post','getUnit','delete','getMemberID','comments','18PnThkn','_userService','198BKCTRC','/delete','pipe','YYYY/MM/DD\x20HH:mm','reply','_httpService','get','Solved','replies','thread-comment-data-source.config','subscribe','/add','rangeId','values','rangeType','_threadCommentDataSource','format','setConfig','11176XIWmaD','users','Edit'];_0x51a8=function(){return _0x1ae353;};return _0x51a8();}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 _0x9cf832=_0x5690;(function(_0x1ab0f5,_0x582785){const _0x14f229=_0x5690,_0x571315=_0x1ab0f5();while(!![]){try{const _0x4a90d3=-parseInt(_0x14f229(0x106))/0x1*(-parseInt(_0x14f229(0xa3))/0x2)+parseInt(_0x14f229(0xe9))/0x3*(parseInt(_0x14f229(0xe2))/0x4)+-parseInt(_0x14f229(0xf1))/0x5*(parseInt(_0x14f229(0xb1))/0x6)+-parseInt(_0x14f229(0x102))/0x7*(parseInt(_0x14f229(0xc5))/0x8)+-parseInt(_0x14f229(0xc9))/0x9+-parseInt(_0x14f229(0xcb))/0xa+-parseInt(_0x14f229(0xb3))/0xb*(-parseInt(_0x14f229(0xd2))/0xc);if(_0x4a90d3===_0x582785)break;else _0x571315['push'](_0x571315['shift']());}catch(_0x2b9612){_0x571315['push'](_0x571315['shift']());}}}(_0x51a8,0x5c1fb));import{CommentService as _0x1803a,CollaborationSessionService as _0x1c6622,UniverCollaborationClientPlugin as _0x5befe3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x37b1f9}from'@univerjs-pro/license';import{dayjs as _0x33b739,UserManagerService as _0xe8fcb1,Inject as _0x2f174f,Injector as _0x27970a,Disposable as _0xd71482,CustomRangeType as _0xf31c67,UniverInstanceType as _0x2a1993,DependentOn as _0x215ab7,IConfigService as _0x1acffc,Plugin as _0x5527d6,merge as _0x42355d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1f6f25}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x23f12b,IThreadCommentDataSourceService as _0x412e5d}from'@univerjs/thread-comment';import{bufferTime as _0x5d7449}from'rxjs';import{HTTPService as _0x1a1c91}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0x5690(_0x35ec36,_0x3e9002){const _0x51a8f0=_0x51a8();return _0x5690=function(_0x569008,_0x5d4623){_0x569008=_0x569008-0x9f;let _0x40fe07=_0x51a8f0[_0x569008];return _0x40fe07;},_0x5690(_0x35ec36,_0x3e9002);}var I=(_0x53c897=>(_0x53c897[_0x53c897[_0x9cf832(0xf4)]=0x0]=_0x9cf832(0xf4),_0x53c897[_0x53c897[_0x9cf832(0xba)]=0x1]=_0x9cf832(0xba),_0x53c897[_0x53c897[_0x9cf832(0xff)]=-0x1]='UNRECOGNIZED',_0x53c897))(I||{}),v=(_0x292077=>(_0x292077[_0x292077[_0x9cf832(0xdd)]=0x0]=_0x9cf832(0xdd),_0x292077[_0x292077[_0x9cf832(0xfd)]=0x1]=_0x9cf832(0xfd),_0x292077[_0x292077[_0x9cf832(0xef)]=0x2]='Reply',_0x292077[_0x292077[_0x9cf832(0xc7)]=0x3]=_0x9cf832(0xc7),_0x292077[_0x292077['Delete']=0x4]=_0x9cf832(0xca),_0x292077[_0x292077[_0x9cf832(0xa0)]=0x5]=_0x9cf832(0xa0),_0x292077[_0x292077[_0x9cf832(0xff)]=-0x1]='UNRECOGNIZED',_0x292077))(v||{});const D=_0x16630a=>_0x33b739(new Date(+_0x16630a))[_0x9cf832(0xc3)](_0x9cf832(0xb6)),B=async(_0x3658d2,_0x5bff7d)=>{const _0xfc86d9=_0x9cf832,_0x533b58=_0x3658d2[_0xfc86d9(0xb9)](_0xe8fcb1),_0x5e7eb9=_0x3658d2['get'](_0x1a1c91);_0x5bff7d['forEach'](_0x4babe3=>{const _0x35c76d=_0xfc86d9;_0x533b58[_0x35c76d(0x100)](_0x4babe3)&&_0x5bff7d[_0x35c76d(0xae)](_0x4babe3);}),_0x5bff7d['size']&&(await _0x5e7eb9[_0xfc86d9(0xb9)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5bff7d]}}))[_0xfc86d9(0xd5)][_0xfc86d9(0xc6)]['forEach'](_0xbb79bb=>{const _0x37fc30=_0xfc86d9;_0xbb79bb&&_0x533b58[_0x37fc30(0xa4)](_0xbb79bb);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x369613,_0x5b7093,_0x1abaf1,_0x5328cc)=>{const _0x42748e=_0x9cf832;for(var _0x2c4c14=_0x5328cc>0x1?void 0x0:_0x5328cc?K(_0x5b7093,_0x1abaf1):_0x5b7093,_0x112d1e=_0x369613[_0x42748e(0xd1)]-0x1,_0x2f86d3;_0x112d1e>=0x0;_0x112d1e--)(_0x2f86d3=_0x369613[_0x112d1e])&&(_0x2c4c14=_0x2f86d3(_0x2c4c14)||_0x2c4c14);return _0x2c4c14;},p=(_0x44e692,_0x476b91)=>(_0x2a1a2f,_0x500e43)=>_0x476b91(_0x2a1a2f,_0x500e43,_0x44e692);let S=class extends _0xd71482{constructor(_0x42dc89,_0x459ac4,_0x499a45,_0x17175d){const _0x2a2f0e=_0x9cf832;super(),this[_0x2a2f0e(0xe6)]=_0x42dc89,this[_0x2a2f0e(0xe1)]=_0x459ac4,this['_userService']=_0x499a45,this[_0x2a2f0e(0xf5)]=_0x17175d,this[_0x2a2f0e(0x103)](),this[_0x2a2f0e(0xcf)]();}['_initUserSync'](){const _0x4d21d4=_0x9cf832;this[_0x4d21d4(0xea)](this['_threadCommentModel']['commentUpdate$'][_0x4d21d4(0xb5)](_0x5d7449(0x10))[_0x4d21d4(0xbd)](_0x3baf25=>{const _0x1e9cac=_0x4d21d4,_0x3a8832=new Set();_0x3baf25[_0x1e9cac(0xf7)](_0x288485=>{const _0x487d9b=_0x1e9cac;switch(_0x288485[_0x487d9b(0xd6)]){case _0x487d9b(0xee):{const _0x1c5945=_0x288485['payload'][_0x487d9b(0xeb)];_0x3a8832['add'](_0x1c5945);break;}}}),B(this['_injector'],_0x3a8832);}));}[_0x9cf832(0x103)](){const _0x2120eb=_0x9cf832;this[_0x2120eb(0xea)](this[_0x2120eb(0xe6)][_0x2120eb(0xe4)][_0x2120eb(0xbd)](async _0x36a911=>{const _0x32e7aa=_0x2120eb;var _0xfe6098,_0x3dca27,_0x1791e1,_0x205790;const _0x365e16=(_0xfe6098=this[_0x32e7aa(0xe1)][_0x32e7aa(0xad)](_0x36a911[_0x32e7aa(0xf9)])['find'](_0x35025b=>_0x35025b['threadId']===_0x36a911[_0x32e7aa(0xda)]))==null?void 0x0:_0xfe6098[_0x32e7aa(0xd4)];if(!_0x365e16)return;const {unitId:_0x1b19d4,subUnitId:_0x358367}=_0x365e16;switch(_0x36a911[_0x32e7aa(0xed)]&&this[_0x32e7aa(0xb2)][_0x32e7aa(0xa4)](_0x36a911['user']),_0x36a911[_0x32e7aa(0xd6)]){case v[_0x32e7aa(0xfd)]:break;case v[_0x32e7aa(0xef)]:{this[_0x32e7aa(0xe1)][_0x32e7aa(0xf3)](_0x1b19d4,_0x358367,{'unitId':_0x1b19d4,'subUnitId':_0x358367,'ref':'','id':_0x36a911[_0x32e7aa(0xfb)],'dT':D(+_0x36a911[_0x32e7aa(0xdf)]),'threadId':_0x36a911[_0x32e7aa(0xda)],'personId':(_0x1791e1=(_0x3dca27=_0x36a911[_0x32e7aa(0xed)])==null?void 0x0:_0x3dca27[_0x32e7aa(0xa6)])!=null?_0x1791e1:_0x36a911[_0x32e7aa(0x9f)],'text':JSON[_0x32e7aa(0xd9)](_0x36a911[_0x32e7aa(0xfc)]),'parentId':_0x365e16['id']});break;}case v[_0x32e7aa(0xca)]:{const _0x35fd2b=this[_0x32e7aa(0xe1)]['getComment'](_0x1b19d4,_0x358367,_0x36a911[_0x32e7aa(0xfb)]);_0x35fd2b&&_0x35fd2b[_0x32e7aa(0xd3)]&&this[_0x32e7aa(0xe1)]['deleteComment'](_0x1b19d4,_0x358367,_0x36a911['replyId']);break;}case v[_0x32e7aa(0xc7)]:{this[_0x32e7aa(0xe1)][_0x32e7aa(0xf0)](_0x1b19d4,_0x358367,{'commentId':_0x36a911[_0x32e7aa(0xfb)],'text':JSON[_0x32e7aa(0xd9)](_0x36a911['content'])});break;}case v[_0x32e7aa(0xa0)]:{const _0x4e6bf9=(_0x205790=this[_0x32e7aa(0xe1)]['getUnit'](_0x36a911[_0x32e7aa(0xf9)])[_0x32e7aa(0xe7)](_0x43fe88=>_0x43fe88['threadId']===_0x36a911[_0x32e7aa(0xda)]))==null?void 0x0:_0x205790['root'];_0x4e6bf9&&this[_0x32e7aa(0xe1)]['resolveComment'](_0x1b19d4,_0x358367,_0x4e6bf9['id'],_0x36a911[_0x32e7aa(0xce)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x2f174f(_0x1803a)),p(0x1,_0x2f174f(_0x23f12b)),p(0x2,_0x2f174f(_0xe8fcb1)),p(0x3,_0x2f174f(_0x27970a))],S);const z=_0x9cf832(0xbc),M={};var k=Object[_0x9cf832(0xa8)],Q=(_0x29fb58,_0x2df8e7,_0x19864c,_0x2eea02)=>{const _0x65470=_0x9cf832;for(var _0x390171=_0x2eea02>0x1?void 0x0:_0x2eea02?k(_0x2df8e7,_0x19864c):_0x2df8e7,_0x52fcbb=_0x29fb58[_0x65470(0xd1)]-0x1,_0x5c3641;_0x52fcbb>=0x0;_0x52fcbb--)(_0x5c3641=_0x29fb58[_0x52fcbb])&&(_0x390171=_0x5c3641(_0x390171)||_0x390171);return _0x390171;},_=(_0x14a6dd,_0x573134)=>(_0x1da04d,_0x502cb8)=>_0x573134(_0x1da04d,_0x502cb8,_0x14a6dd);function X(_0x5c6cbd,_0x2d4c44){const _0xd2abdb=_0x9cf832,_0x5a60e1=_0x5c6cbd[_0xd2abdb(0xbb)][0x0];return{..._0x2d4c44,'id':_0x5a60e1[_0xd2abdb(0xfb)],'resolved':_0x5c6cbd[_0xd2abdb(0xce)]===0x1,'dT':D(_0x5a60e1['createTimestamp']),'personId':_0x5a60e1['userId'],'threadId':_0x5a60e1[_0xd2abdb(0xda)]};}function ee(_0x57bf54,_0x17ef8e,_0x42ff45){const _0x2a3786=_0x9cf832;var _0x29f0e6,_0xbeaf73;if(((_0xbeaf73=(_0x29f0e6=_0x57bf54==null?void 0x0:_0x57bf54[_0x2a3786(0xbb)])==null?void 0x0:_0x29f0e6[_0x2a3786(0xd1)])!=null?_0xbeaf73:0x0)>0x0){const _0x456bb8=(_0x3e804f,_0x21a111)=>({'id':_0x3e804f[_0x2a3786(0xfb)],'threadId':_0x3e804f['threadId'],'dT':D(_0x3e804f[_0x2a3786(0xdf)]),'personId':_0x3e804f['userId'],'resolved':_0x57bf54['solved']===I['Solved'],'unitId':_0x17ef8e,'subUnitId':_0x42ff45,'text':JSON[_0x2a3786(0xd9)](_0x3e804f['content']),'parentId':_0x21a111}),_0x5e24d5=_0x456bb8(_0x57bf54['replies'][0x0]);return{..._0x5e24d5,'children':_0x57bf54[_0x2a3786(0xbb)]['slice'](0x1)[_0x2a3786(0xa7)](_0x5f395e=>_0x456bb8(_0x5f395e,_0x5e24d5['id']))};}return null;}let f=class{constructor(_0x17967e,_0x358e58,_0x53d44b,_0x427289){const _0x3da1d1=_0x9cf832;this[_0x3da1d1(0xb8)]=_0x17967e,this[_0x3da1d1(0xb2)]=_0x358e58,this[_0x3da1d1(0xd0)]=_0x53d44b,this[_0x3da1d1(0xf5)]=_0x427289;}async['addComment'](_0x2c1f76){const _0x26a539=_0x9cf832;var _0x1403b4,_0x105841;const {parentId:_0x69ee58,unitId:_0x48e4ec,text:_0x3b3c8e,threadId:_0x51104a}=_0x2c1f76,_0x216412=(_0x105841=(_0x1403b4=_0x3b3c8e['customRanges'])==null?void 0x0:_0x1403b4[_0x26a539(0xcc)](_0x1cb298=>_0x1cb298[_0x26a539(0xc1)]===_0xf31c67['COMMENT'])[_0x26a539(0xa7)](_0x2e69df=>_0x2e69df[_0x26a539(0xbf)]))!=null?_0x105841:[],_0x5b1ede=JSON['stringify'](_0x3b3c8e),_0x94f4d=(await this[_0x26a539(0xd0)][_0x26a539(0xcd)](_0x48e4ec))[_0x26a539(0xaf)]();if(_0x69ee58){const _0x37ca21={'memberId':_0x94f4d,'unitId':_0x48e4ec,'content':_0x5b1ede,'mention':_0x216412,'threadId':_0x51104a},_0x1bad8=(await this['_httpService'][_0x26a539(0xac)](_0x26a539(0x101)+_0x48e4ec+_0x26a539(0xfa),{'body':_0x37ca21}))['body'][_0x26a539(0xb7)];return{..._0x2c1f76,'id':_0x1bad8[_0x26a539(0xfb)],'dT':_0x33b739(+_0x1bad8[_0x26a539(0xdf)])['format'](_0x26a539(0xb6)),'personId':_0x1bad8['userId']};}else{const _0xa9085b={'memberId':_0x94f4d,'unitId':_0x48e4ec,'content':_0x5b1ede,'mention':_0x216412},_0x518383=await this[_0x26a539(0xb8)][_0x26a539(0xac)](_0x26a539(0x101)+_0x48e4ec+_0x26a539(0xbe),{'body':_0xa9085b});return X(_0x518383['body'][_0x26a539(0xdb)],_0x2c1f76);}}async['updateComment'](_0x1a2966){const _0x104744=_0x9cf832;var _0x82ebde,_0x16fa86;const {text:_0x2358d0,unitId:_0x2c9bbe}=_0x1a2966,_0x2bbcf7=(_0x16fa86=(_0x82ebde=_0x2358d0[_0x104744(0xa5)])==null?void 0x0:_0x82ebde['filter'](_0x57af91=>_0x57af91[_0x104744(0xc1)]===_0xf31c67[_0x104744(0xa1)])[_0x104744(0xa7)](_0x20f280=>_0x20f280[_0x104744(0xbf)]))!=null?_0x16fa86:[],_0x14bad6=JSON['stringify'](_0x2358d0),_0x34ec8e=_0x1a2966[_0x104744(0xda)],_0x25c00e=_0x1a2966['id'],_0xdd12bf={'memberId':(await this[_0x104744(0xd0)][_0x104744(0xcd)](_0x2c9bbe))[_0x104744(0xaf)](),'unitId':_0x2c9bbe,'threadId':_0x34ec8e,'mention':_0x2bbcf7,'content':_0x14bad6,'replyId':_0x25c00e},_0x2d1b1d=await this[_0x104744(0xb8)][_0x104744(0xac)](_0x104744(0x101)+_0x2c9bbe+_0x104744(0xdc),{'body':_0xdd12bf});return!_0x2d1b1d[_0x104744(0xd5)][_0x104744(0xa9)]||_0x2d1b1d[_0x104744(0xd5)]['error'][_0x104744(0xc8)]===0x1;}async[_0x9cf832(0xe8)](_0xee1eaa){const _0x18e094=_0x9cf832,{unitId:_0xd74435}=_0xee1eaa,_0x29742b=_0xee1eaa[_0x18e094(0xda)],_0x3af91c={'memberId':this['_userService'][_0x18e094(0xde)]()[_0x18e094(0xa6)],'unitId':_0xd74435,'threadId':_0x29742b,'solved':_0xee1eaa[_0x18e094(0xe5)]?I[_0x18e094(0xba)]:I[_0x18e094(0xf4)]},_0x29ae6b=await this[_0x18e094(0xb8)][_0x18e094(0xac)](_0x18e094(0x101)+_0xd74435+'/solved',{'body':_0x3af91c});return!_0x29ae6b[_0x18e094(0xd5)][_0x18e094(0xa9)]||_0x29ae6b['body'][_0x18e094(0xa9)][_0x18e094(0xc8)]===0x1;}async['deleteComment'](_0x5d1d4a,_0x1b598c,_0x2d84d4,_0x4bf9a7){const _0x4c53ff=_0x9cf832,_0x4e3af8={'memberId':(await this[_0x4c53ff(0xd0)][_0x4c53ff(0xcd)](_0x5d1d4a))['getMemberID'](),'threadId':_0x2d84d4,'replyId':_0x4bf9a7,'unitId':_0x5d1d4a},_0x1f13b9=await this[_0x4c53ff(0xb8)]['post'](_0x4c53ff(0x101)+_0x5d1d4a+_0x4c53ff(0xb4),{'body':_0x4e3af8});return!_0x1f13b9[_0x4c53ff(0xd5)][_0x4c53ff(0xa9)]||_0x1f13b9[_0x4c53ff(0xd5)][_0x4c53ff(0xa9)][_0x4c53ff(0xc8)]===0x1;}async['listComments'](_0x19d652,_0x5a6e43,_0x463926){const _0x171732=_0x9cf832,_0x209ef8={'unitId':_0x19d652,'threadId':_0x463926},_0x3a4225=await this[_0x171732(0xb8)][_0x171732(0xac)]('/universer-api/comment/unit/'+_0x19d652+_0x171732(0xe3),{'body':_0x209ef8}),_0x1efe12=_0x463926[_0x171732(0xa7)](_0x324576=>ee(_0x3a4225[_0x171732(0xd5)][_0x171732(0xb0)][_0x324576],_0x19d652,_0x5a6e43))[_0x171732(0xcc)](Boolean);return Object[_0x171732(0xc0)](_0x3a4225[_0x171732(0xd5)]['users'])[_0x171732(0xf7)](_0xaf8059=>{const _0x399552=_0x171732;this[_0x399552(0xb2)][_0x399552(0xa4)](_0xaf8059);}),_0x1efe12;}[_0x9cf832(0xf6)](_0x5b8d2b){const _0x312c0a=_0x9cf832;return{'id':_0x5b8d2b['id'],'threadId':_0x5b8d2b[_0x312c0a(0xda)],'ref':_0x5b8d2b[_0x312c0a(0x105)]};}};f=Q([_(0x0,_0x2f174f(_0x1a1c91)),_(0x1,_0x2f174f(_0xe8fcb1)),_(0x2,_0x2f174f(_0x1c6622)),_(0x3,_0x2f174f(_0x27970a))],f);var re=Object[_0x9cf832(0xa8)],te=(_0xf8ff33,_0x56c733,_0x79fe51,_0x13f505)=>{for(var _0x5b5691=_0x13f505>0x1?void 0x0:_0x13f505?re(_0x56c733,_0x79fe51):_0x56c733,_0x4ff544=_0xf8ff33['length']-0x1,_0x1cc6d4;_0x4ff544>=0x0;_0x4ff544--)(_0x1cc6d4=_0xf8ff33[_0x4ff544])&&(_0x5b5691=_0x1cc6d4(_0x5b5691)||_0x5b5691);return _0x5b5691;},N=(_0x353cc4,_0xc74858)=>(_0x42f8e1,_0x495577)=>_0xc74858(_0x42f8e1,_0x495577,_0x353cc4);let g=class extends _0xd71482{constructor(_0x552596,_0x20fb93){const _0x5b3343=_0x9cf832;super(),this['_threadCommentDataSourceService']=_0x552596,this[_0x5b3343(0xc2)]=_0x20fb93,this[_0x5b3343(0xf2)]();}['_initDataSource'](){const _0x1c2436=_0x9cf832;this[_0x1c2436(0xfe)][_0x1c2436(0xe0)]=this[_0x1c2436(0xc2)],this[_0x1c2436(0xfe)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x412e5d),N(0x1,_0x2f174f(f))],g);var se=Object[_0x9cf832(0xec)],oe=Object[_0x9cf832(0xa8)],ne=(_0x2246e4,_0x20db14,_0x94feec)=>_0x20db14 in _0x2246e4?se(_0x2246e4,_0x20db14,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x94feec}):_0x2246e4[_0x20db14]=_0x94feec,ie=(_0x46194e,_0x2fe6c9,_0x169a73,_0xee9fa5)=>{for(var _0x30d07a=_0xee9fa5>0x1?void 0x0:_0xee9fa5?oe(_0x2fe6c9,_0x169a73):_0x2fe6c9,_0x4c9e3a=_0x46194e['length']-0x1,_0x4dd80e;_0x4c9e3a>=0x0;_0x4c9e3a--)(_0x4dd80e=_0x46194e[_0x4c9e3a])&&(_0x30d07a=_0x4dd80e(_0x30d07a)||_0x30d07a);return _0x30d07a;},w=(_0x1e0a4d,_0x40efec)=>(_0x1506ef,_0x4755c0)=>_0x40efec(_0x1506ef,_0x4755c0,_0x1e0a4d),$=(_0x3ff6db,_0x3da789,_0x26215b)=>ne(_0x3ff6db,typeof _0x3da789!=_0x9cf832(0xd7)?_0x3da789+'':_0x3da789,_0x26215b);let b=class extends _0x5527d6{constructor(_0x5000b5=M,_0x23d008,_0x54bb8b){const _0x4d33e8=_0x9cf832;super(),this[_0x4d33e8(0xf8)]=_0x5000b5,this[_0x4d33e8(0xf5)]=_0x23d008,this[_0x4d33e8(0xd8)]=_0x54bb8b;const {..._0x43ad84}=_0x42355d({},M,this[_0x4d33e8(0xf8)]);this[_0x4d33e8(0xd8)][_0x4d33e8(0xc4)](z,_0x43ad84);}[_0x9cf832(0xab)](){const _0x3cd1a2=_0x9cf832;[[f],[g],[S]][_0x3cd1a2(0xf7)](_0xbc4b2a=>{const _0xb4cedd=_0x3cd1a2;this[_0xb4cedd(0xf5)][_0xb4cedd(0xee)](_0xbc4b2a);});}[_0x9cf832(0xa2)](){const _0xd54bb6=_0x9cf832;this[_0xd54bb6(0xf5)][_0xd54bb6(0xb9)](g),this[_0xd54bb6(0xf5)][_0xd54bb6(0xb9)](S);}};$(b,_0x9cf832(0xaa),W),$(b,_0x9cf832(0xd6),_0x2a1993[_0x9cf832(0x104)]),b=ie([_0x215ab7(_0x1f6f25,_0x5befe3,_0x37b1f9),w(0x1,_0x2f174f(_0x27970a)),w(0x2,_0x1acffc)],b);function _0x51a8(){const _0x1ae353=['code','4697037rcVAuM','Delete','7369950IYEWOv','filter','requireSession','solved','_initUserSync','_sessionService','length','1110084bLQrge','parentId','root','body','type','symbol','_configService','parse','threadId','comment','/edit','Unknown','getCurrentUser','createTimestamp','dataSource','_threadCommentModel','172jgjqPa','/list','commentUpdate$','resolved','_commentService','find','resolveComment','46923HLrEsy','disposeWithMe','personId','defineProperty','user','add','Reply','updateComment','582445vfuzjI','_initDataSource','addComment','OpenOrReOpen','_injector','saveCommentToSnapshot','forEach','_config','unitId','/reply','replyId','content','Add','_threadCommentDataSourceService','UNRECOGNIZED','getUser','/universer-api/comment/unit/','2681ihyEeK','_init','UNIVER_UNKNOWN','ref','2692hqiMlW','userId','Solve','COMMENT','onReady','136bGfjmw','addUser','customRanges','userID','map','getOwnPropertyDescriptor','error','pluginName','onStarting','post','getUnit','delete','getMemberID','comments','18PnThkn','_userService','198BKCTRC','/delete','pipe','YYYY/MM/DD\x20HH:mm','reply','_httpService','get','Solved','replies','thread-comment-data-source.config','subscribe','/add','rangeId','values','rangeType','_threadCommentDataSource','format','setConfig','11176XIWmaD','users','Edit'];_0x51a8=function(){return _0x1ae353;};return _0x51a8();}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(_0x399842,_0x678b65){const _0x349275=_0x48db,_0xa9a1bb=_0x399842();while(!![]){try{const _0x39f9f7=-parseInt(_0x349275(0x16c))/0x1*(-parseInt(_0x349275(0x1b3))/0x2)+-parseInt(_0x349275(0x190))/0x3+-parseInt(_0x349275(0x19a))/0x4*(parseInt(_0x349275(0x1a9))/0x5)+parseInt(_0x349275(0x177))/0x6*(parseInt(_0x349275(0x15c))/0x7)+parseInt(_0x349275(0x18b))/0x8+parseInt(_0x349275(0x12d))/0x9+parseInt(_0x349275(0x141))/0xa*(-parseInt(_0x349275(0x1ad))/0xb);if(_0x39f9f7===_0x678b65)break;else _0xa9a1bb['push'](_0xa9a1bb['shift']());}catch(_0x3cf7b5){_0xa9a1bb['push'](_0xa9a1bb['shift']());}}}(_0x55dd,0x9bf2f),function(_0x54cc7a,_0x3ff013){const _0x552634=_0x48db;typeof exports==_0x552634(0x156)&&typeof module<'u'?_0x3ff013(exports,require(_0x552634(0x1a6)),require('@univerjs-pro/license'),require(_0x552634(0x185)),require(_0x552634(0x163)),require(_0x552634(0x133)),require(_0x552634(0x1ae)),require('@univerjs/network')):typeof define==_0x552634(0x158)&&define['amd']?define([_0x552634(0x1b9),_0x552634(0x1a6),_0x552634(0x140),'@univerjs/core','@univerjs/thread-comment-ui',_0x552634(0x133),_0x552634(0x1ae),_0x552634(0x169)],_0x3ff013):(_0x54cc7a=typeof globalThis<'u'?globalThis:_0x54cc7a||self,_0x3ff013(_0x54cc7a[_0x552634(0x155)]={},_0x54cc7a[_0x552634(0x18c)],_0x54cc7a[_0x552634(0x171)],_0x54cc7a[_0x552634(0x191)],_0x54cc7a[_0x552634(0x17e)],_0x54cc7a[_0x552634(0x166)],_0x54cc7a[_0x552634(0x1ae)],_0x54cc7a['UniverNetwork']));}(this,function(_0x2fd347,_0x23a190,_0x450f12,_0x31b5ed,_0x1cf185,_0x4be181,_0x5ea329,_0x1acb3){'use strict';const _0x3c1854=_0x48db;const _0x5f4667=_0x3c1854(0x152);var _0x58a685=(_0x2c42da=>(_0x2c42da[_0x2c42da[_0x3c1854(0x12b)]=0x0]=_0x3c1854(0x12b),_0x2c42da[_0x2c42da[_0x3c1854(0x170)]=0x1]=_0x3c1854(0x170),_0x2c42da[_0x2c42da[_0x3c1854(0x149)]=-0x1]=_0x3c1854(0x149),_0x2c42da))(_0x58a685||{}),_0x303ad1=(_0x125df2=>(_0x125df2[_0x125df2[_0x3c1854(0x159)]=0x0]='Unknown',_0x125df2[_0x125df2[_0x3c1854(0x1a7)]=0x1]='Add',_0x125df2[_0x125df2['Reply']=0x2]=_0x3c1854(0x1b7),_0x125df2[_0x125df2[_0x3c1854(0x178)]=0x3]=_0x3c1854(0x178),_0x125df2[_0x125df2[_0x3c1854(0x184)]=0x4]=_0x3c1854(0x184),_0x125df2[_0x125df2[_0x3c1854(0x196)]=0x5]=_0x3c1854(0x196),_0x125df2[_0x125df2[_0x3c1854(0x149)]=-0x1]=_0x3c1854(0x149),_0x125df2))(_0x303ad1||{});const _0x14753e=_0x1184d1=>_0x31b5ed[_0x3c1854(0x161)](new Date(+_0x1184d1))[_0x3c1854(0x18d)](_0x3c1854(0x13c)),_0x5472eb=async(_0x5db649,_0x303d49)=>{const _0x3a1594=_0x3c1854,_0x510118=_0x5db649[_0x3a1594(0x15a)](_0x31b5ed[_0x3a1594(0x135)]),_0x45836c=_0x5db649[_0x3a1594(0x15a)](_0x1acb3[_0x3a1594(0x15b)]);_0x303d49['forEach'](_0x569e18=>{const _0xa620f8=_0x3a1594;_0x510118[_0xa620f8(0x147)](_0x569e18)&&_0x303d49[_0xa620f8(0x19f)](_0x569e18);}),_0x303d49['size']&&(await _0x45836c[_0x3a1594(0x15a)](_0x3a1594(0x16b),{'params':{'userIDs':[..._0x303d49]}}))[_0x3a1594(0x197)][_0x3a1594(0x1b8)][_0x3a1594(0x16f)](_0x4d2760=>{_0x4d2760&&_0x510118['addUser'](_0x4d2760);});};var _0x343e00=Object[_0x3c1854(0x148)],_0x24381b=(_0x182179,_0x3d1fc8,_0x5b731f,_0x32286e)=>{const _0x36983b=_0x3c1854;for(var _0x9ba9b8=_0x32286e>0x1?void 0x0:_0x32286e?_0x343e00(_0x3d1fc8,_0x5b731f):_0x3d1fc8,_0x211770=_0x182179[_0x36983b(0x13a)]-0x1,_0x2a691c;_0x211770>=0x0;_0x211770--)(_0x2a691c=_0x182179[_0x211770])&&(_0x9ba9b8=_0x2a691c(_0x9ba9b8)||_0x9ba9b8);return _0x9ba9b8;},_0x2c86d3=(_0x2b85aa,_0x4e3fd2)=>(_0x424968,_0x337e1c)=>_0x4e3fd2(_0x424968,_0x337e1c,_0x2b85aa);let _0x39bcf5=class extends _0x31b5ed['Disposable']{constructor(_0x217376,_0x26996a,_0x46e95c,_0x8a353c){const _0x3510b0=_0x3c1854;super(),this[_0x3510b0(0x199)]=_0x217376,this[_0x3510b0(0x1b2)]=_0x26996a,this[_0x3510b0(0x168)]=_0x46e95c,this[_0x3510b0(0x189)]=_0x8a353c,this[_0x3510b0(0x130)](),this[_0x3510b0(0x145)]();}[_0x3c1854(0x145)](){const _0x425e60=_0x3c1854;this[_0x425e60(0x17d)](this[_0x425e60(0x1b2)][_0x425e60(0x176)][_0x425e60(0x18e)](_0x5ea329[_0x425e60(0x192)](0x10))[_0x425e60(0x1b1)](_0x3ef80a=>{const _0x42ab36=_0x425e60,_0x5eb31e=new Set();_0x3ef80a[_0x42ab36(0x16f)](_0x3b829e=>{const _0xdd7dd4=_0x42ab36;switch(_0x3b829e[_0xdd7dd4(0x134)]){case _0xdd7dd4(0x12e):{const _0x5f3ac8=_0x3b829e[_0xdd7dd4(0x17b)][_0xdd7dd4(0x14e)];_0x5eb31e[_0xdd7dd4(0x12e)](_0x5f3ac8);break;}}}),_0x5472eb(this[_0x42ab36(0x189)],_0x5eb31e);}));}[_0x3c1854(0x130)](){const _0x2e320a=_0x3c1854;this[_0x2e320a(0x17d)](this[_0x2e320a(0x199)][_0x2e320a(0x176)][_0x2e320a(0x1b1)](async _0x2fd2f7=>{const _0x4c60dd=_0x2e320a;var _0x2da656,_0x91ef1b,_0x247494,_0x5d2257;const _0x1608c6=(_0x2da656=this['_threadCommentModel'][_0x4c60dd(0x19d)](_0x2fd2f7[_0x4c60dd(0x17c)])['find'](_0x508dcf=>_0x508dcf['threadId']===_0x2fd2f7['threadId']))==null?void 0x0:_0x2da656[_0x4c60dd(0x146)];if(!_0x1608c6)return;const {unitId:_0xbe1311,subUnitId:_0x13b6c}=_0x1608c6;switch(_0x2fd2f7[_0x4c60dd(0x188)]&&this['_userService']['addUser'](_0x2fd2f7['user']),_0x2fd2f7[_0x4c60dd(0x134)]){case _0x303ad1[_0x4c60dd(0x1a7)]:break;case _0x303ad1[_0x4c60dd(0x1b7)]:{this[_0x4c60dd(0x1b2)][_0x4c60dd(0x16a)](_0xbe1311,_0x13b6c,{'unitId':_0xbe1311,'subUnitId':_0x13b6c,'ref':'','id':_0x2fd2f7[_0x4c60dd(0x162)],'dT':_0x14753e(+_0x2fd2f7[_0x4c60dd(0x19b)]),'threadId':_0x2fd2f7[_0x4c60dd(0x1a4)],'personId':(_0x247494=(_0x91ef1b=_0x2fd2f7['user'])==null?void 0x0:_0x91ef1b['userID'])!=null?_0x247494:_0x2fd2f7['userId'],'text':JSON[_0x4c60dd(0x15f)](_0x2fd2f7[_0x4c60dd(0x137)]),'parentId':_0x1608c6['id']});break;}case _0x303ad1[_0x4c60dd(0x184)]:{const _0x5530c9=this[_0x4c60dd(0x1b2)][_0x4c60dd(0x19c)](_0xbe1311,_0x13b6c,_0x2fd2f7['replyId']);_0x5530c9&&_0x5530c9[_0x4c60dd(0x160)]&&this[_0x4c60dd(0x1b2)][_0x4c60dd(0x1a0)](_0xbe1311,_0x13b6c,_0x2fd2f7[_0x4c60dd(0x162)]);break;}case _0x303ad1[_0x4c60dd(0x178)]:{this[_0x4c60dd(0x1b2)]['updateComment'](_0xbe1311,_0x13b6c,{'commentId':_0x2fd2f7[_0x4c60dd(0x162)],'text':JSON['parse'](_0x2fd2f7[_0x4c60dd(0x137)])});break;}case _0x303ad1[_0x4c60dd(0x196)]:{const _0x124bb7=(_0x5d2257=this[_0x4c60dd(0x1b2)][_0x4c60dd(0x19d)](_0x2fd2f7[_0x4c60dd(0x17c)])[_0x4c60dd(0x173)](_0x72b413=>_0x72b413['threadId']===_0x2fd2f7[_0x4c60dd(0x1a4)]))==null?void 0x0:_0x5d2257[_0x4c60dd(0x146)];_0x124bb7&&this[_0x4c60dd(0x1b2)]['resolveComment'](_0xbe1311,_0x13b6c,_0x124bb7['id'],_0x2fd2f7[_0x4c60dd(0x14b)]===_0x58a685[_0x4c60dd(0x170)]);break;}}}));}};_0x39bcf5=_0x24381b([_0x2c86d3(0x0,_0x31b5ed[_0x3c1854(0x12c)](_0x23a190[_0x3c1854(0x13f)])),_0x2c86d3(0x1,_0x31b5ed[_0x3c1854(0x12c)](_0x4be181[_0x3c1854(0x13b)])),_0x2c86d3(0x2,_0x31b5ed[_0x3c1854(0x12c)](_0x31b5ed['UserManagerService'])),_0x2c86d3(0x3,_0x31b5ed[_0x3c1854(0x12c)](_0x31b5ed['Injector']))],_0x39bcf5);const _0x4181c5=_0x3c1854(0x172),_0x1e063c={};var _0x4a23e3=Object[_0x3c1854(0x148)],_0x1d0e4b=(_0x81d9b5,_0x436413,_0x55ca19,_0x25fe95)=>{const _0x24bc8d=_0x3c1854;for(var _0x534a61=_0x25fe95>0x1?void 0x0:_0x25fe95?_0x4a23e3(_0x436413,_0x55ca19):_0x436413,_0x3a03a8=_0x81d9b5[_0x24bc8d(0x13a)]-0x1,_0x145c8a;_0x3a03a8>=0x0;_0x3a03a8--)(_0x145c8a=_0x81d9b5[_0x3a03a8])&&(_0x534a61=_0x145c8a(_0x534a61)||_0x534a61);return _0x534a61;},_0x26aded=(_0x2d7910,_0x5ae583)=>(_0x585d56,_0x5c12bc)=>_0x5ae583(_0x585d56,_0x5c12bc,_0x2d7910);function _0x438791(_0x59c7d3,_0x9897fc){const _0x2445f5=_0x3c1854,_0x3ef798=_0x59c7d3[_0x2445f5(0x139)][0x0];return{..._0x9897fc,'id':_0x3ef798[_0x2445f5(0x162)],'resolved':_0x59c7d3['solved']===0x1,'dT':_0x14753e(_0x3ef798[_0x2445f5(0x19b)]),'personId':_0x3ef798[_0x2445f5(0x186)],'threadId':_0x3ef798[_0x2445f5(0x1a4)]};}function _0x28440b(_0x4953c1,_0x5163f9,_0x3d8607){const _0x21476=_0x3c1854;var _0x1ac6e9,_0x4e6b60;if(((_0x4e6b60=(_0x1ac6e9=_0x4953c1==null?void 0x0:_0x4953c1['replies'])==null?void 0x0:_0x1ac6e9[_0x21476(0x13a)])!=null?_0x4e6b60:0x0)>0x0){const _0x50ad0b=(_0x4ea1ab,_0x474187)=>({'id':_0x4ea1ab[_0x21476(0x162)],'threadId':_0x4ea1ab['threadId'],'dT':_0x14753e(_0x4ea1ab[_0x21476(0x19b)]),'personId':_0x4ea1ab[_0x21476(0x186)],'resolved':_0x4953c1['solved']===_0x58a685[_0x21476(0x170)],'unitId':_0x5163f9,'subUnitId':_0x3d8607,'text':JSON[_0x21476(0x15f)](_0x4ea1ab[_0x21476(0x137)]),'parentId':_0x474187}),_0x5b06cd=_0x50ad0b(_0x4953c1[_0x21476(0x139)][0x0]);return{..._0x5b06cd,'children':_0x4953c1[_0x21476(0x139)][_0x21476(0x1a5)](0x1)[_0x21476(0x182)](_0x2bbb49=>_0x50ad0b(_0x2bbb49,_0x5b06cd['id']))};}return null;}let _0x35de67=class{constructor(_0x59b516,_0x499013,_0x4563ea,_0x25e3c9){const _0x47594e=_0x3c1854;this['_httpService']=_0x59b516,this[_0x47594e(0x168)]=_0x499013,this['_sessionService']=_0x4563ea,this[_0x47594e(0x189)]=_0x25e3c9;}async[_0x3c1854(0x16a)](_0x5c085e){const _0xa79f1a=_0x3c1854;var _0x2d64e8,_0x3f1da8;const {parentId:_0x1c2317,unitId:_0x2cdcdd,text:_0x5744b2,threadId:_0x149cab}=_0x5c085e,_0x3129f4=(_0x3f1da8=(_0x2d64e8=_0x5744b2[_0xa79f1a(0x175)])==null?void 0x0:_0x2d64e8[_0xa79f1a(0x15e)](_0x57aaaf=>_0x57aaaf['rangeType']===_0x31b5ed[_0xa79f1a(0x14f)]['COMMENT'])[_0xa79f1a(0x182)](_0x3f3b6d=>_0x3f3b6d[_0xa79f1a(0x19e)]))!=null?_0x3f1da8:[],_0x181d9c=JSON[_0xa79f1a(0x16e)](_0x5744b2),_0x27d9cf=(await this[_0xa79f1a(0x165)][_0xa79f1a(0x183)](_0x2cdcdd))[_0xa79f1a(0x142)]();if(_0x1c2317){const _0x453bc8={'memberId':_0x27d9cf,'unitId':_0x2cdcdd,'content':_0x181d9c,'mention':_0x3129f4,'threadId':_0x149cab},_0x3c5dc6=(await this['_httpService'][_0xa79f1a(0x14d)]('/universer-api/comment/unit/'+_0x2cdcdd+_0xa79f1a(0x14c),{'body':_0x453bc8}))[_0xa79f1a(0x197)][_0xa79f1a(0x1a2)];return{..._0x5c085e,'id':_0x3c5dc6[_0xa79f1a(0x162)],'dT':_0x31b5ed[_0xa79f1a(0x161)](+_0x3c5dc6[_0xa79f1a(0x19b)])[_0xa79f1a(0x18d)](_0xa79f1a(0x13c)),'personId':_0x3c5dc6[_0xa79f1a(0x186)]};}else{const _0x45a774={'memberId':_0x27d9cf,'unitId':_0x2cdcdd,'content':_0x181d9c,'mention':_0x3129f4},_0x229231=await this[_0xa79f1a(0x167)][_0xa79f1a(0x14d)](_0xa79f1a(0x154)+_0x2cdcdd+_0xa79f1a(0x1a3),{'body':_0x45a774});return _0x438791(_0x229231[_0xa79f1a(0x197)][_0xa79f1a(0x15d)],_0x5c085e);}}async['updateComment'](_0x48bd5b){const _0x3971bf=_0x3c1854;var _0x2d47a0,_0x182aa6;const {text:_0x3c6cbb,unitId:_0xfa845c}=_0x48bd5b,_0x416bc6=(_0x182aa6=(_0x2d47a0=_0x3c6cbb[_0x3971bf(0x175)])==null?void 0x0:_0x2d47a0['filter'](_0x8c26ca=>_0x8c26ca[_0x3971bf(0x198)]===_0x31b5ed[_0x3971bf(0x14f)][_0x3971bf(0x17a)])[_0x3971bf(0x182)](_0x198d9f=>_0x198d9f['rangeId']))!=null?_0x182aa6:[],_0x59d1b2=JSON[_0x3971bf(0x16e)](_0x3c6cbb),_0x283b84=_0x48bd5b['threadId'],_0x38e2a8=_0x48bd5b['id'],_0x2987b3={'memberId':(await this[_0x3971bf(0x165)][_0x3971bf(0x183)](_0xfa845c))[_0x3971bf(0x142)](),'unitId':_0xfa845c,'threadId':_0x283b84,'mention':_0x416bc6,'content':_0x59d1b2,'replyId':_0x38e2a8},_0x51bb2a=await this['_httpService']['post'](_0x3971bf(0x154)+_0xfa845c+_0x3971bf(0x1a1),{'body':_0x2987b3});return!_0x51bb2a[_0x3971bf(0x197)][_0x3971bf(0x13d)]||_0x51bb2a['body'][_0x3971bf(0x13d)][_0x3971bf(0x143)]===0x1;}async[_0x3c1854(0x138)](_0x3fd858){const _0x5c62ce=_0x3c1854,{unitId:_0x444221}=_0x3fd858,_0x1b51fd=_0x3fd858[_0x5c62ce(0x1a4)],_0x3a0f40={'memberId':this['_userService'][_0x5c62ce(0x151)]()[_0x5c62ce(0x1b5)],'unitId':_0x444221,'threadId':_0x1b51fd,'solved':_0x3fd858[_0x5c62ce(0x1af)]?_0x58a685[_0x5c62ce(0x170)]:_0x58a685[_0x5c62ce(0x12b)]},_0x5251bb=await this[_0x5c62ce(0x167)][_0x5c62ce(0x14d)](_0x5c62ce(0x154)+_0x444221+_0x5c62ce(0x136),{'body':_0x3a0f40});return!_0x5251bb[_0x5c62ce(0x197)][_0x5c62ce(0x13d)]||_0x5251bb[_0x5c62ce(0x197)][_0x5c62ce(0x13d)][_0x5c62ce(0x143)]===0x1;}async['deleteComment'](_0x187ca5,_0xd4397b,_0x427a5e,_0x2f2f44){const _0x1ae570=_0x3c1854,_0x47f304={'memberId':(await this[_0x1ae570(0x165)][_0x1ae570(0x183)](_0x187ca5))[_0x1ae570(0x142)](),'threadId':_0x427a5e,'replyId':_0x2f2f44,'unitId':_0x187ca5},_0x3320f6=await this[_0x1ae570(0x167)][_0x1ae570(0x14d)](_0x1ae570(0x154)+_0x187ca5+_0x1ae570(0x193),{'body':_0x47f304});return!_0x3320f6['body'][_0x1ae570(0x13d)]||_0x3320f6[_0x1ae570(0x197)][_0x1ae570(0x13d)][_0x1ae570(0x143)]===0x1;}async[_0x3c1854(0x194)](_0x544894,_0xa6d5b4,_0x174bdb){const _0x1d8e56=_0x3c1854,_0x1a45a0={'unitId':_0x544894,'threadId':_0x174bdb},_0x2fe925=await this[_0x1d8e56(0x167)][_0x1d8e56(0x14d)]('/universer-api/comment/unit/'+_0x544894+_0x1d8e56(0x180),{'body':_0x1a45a0}),_0x4aa752=_0x174bdb[_0x1d8e56(0x182)](_0x118adb=>_0x28440b(_0x2fe925['body'][_0x1d8e56(0x132)][_0x118adb],_0x544894,_0xa6d5b4))['filter'](Boolean);return Object[_0x1d8e56(0x150)](_0x2fe925['body'][_0x1d8e56(0x1b8)])['forEach'](_0x841bce=>{const _0x17d0ea=_0x1d8e56;this[_0x17d0ea(0x168)][_0x17d0ea(0x195)](_0x841bce);}),_0x4aa752;}[_0x3c1854(0x1ba)](_0xfacb39){const _0x21eee2=_0x3c1854;return{'id':_0xfacb39['id'],'threadId':_0xfacb39[_0x21eee2(0x1a4)],'ref':_0xfacb39[_0x21eee2(0x179)]};}};_0x35de67=_0x1d0e4b([_0x26aded(0x0,_0x31b5ed[_0x3c1854(0x12c)](_0x1acb3[_0x3c1854(0x15b)])),_0x26aded(0x1,_0x31b5ed[_0x3c1854(0x12c)](_0x31b5ed[_0x3c1854(0x135)])),_0x26aded(0x2,_0x31b5ed[_0x3c1854(0x12c)](_0x23a190[_0x3c1854(0x1aa)])),_0x26aded(0x3,_0x31b5ed[_0x3c1854(0x12c)](_0x31b5ed[_0x3c1854(0x13e)]))],_0x35de67);var _0x204296=Object['getOwnPropertyDescriptor'],_0x5ad891=(_0x184abf,_0x288700,_0x222bb5,_0x3752c7)=>{const _0x4d11cb=_0x3c1854;for(var _0x4af454=_0x3752c7>0x1?void 0x0:_0x3752c7?_0x204296(_0x288700,_0x222bb5):_0x288700,_0x59d982=_0x184abf[_0x4d11cb(0x13a)]-0x1,_0x299281;_0x59d982>=0x0;_0x59d982--)(_0x299281=_0x184abf[_0x59d982])&&(_0x4af454=_0x299281(_0x4af454)||_0x4af454);return _0x4af454;},_0x313e1f=(_0x239ec1,_0x1884e2)=>(_0x11f0f3,_0x51bd37)=>_0x1884e2(_0x11f0f3,_0x51bd37,_0x239ec1);let _0x422b03=class extends _0x31b5ed[_0x3c1854(0x1ac)]{constructor(_0x7365fb,_0x8b25f0){const _0x1e2450=_0x3c1854;super(),this[_0x1e2450(0x1a8)]=_0x7365fb,this['_threadCommentDataSource']=_0x8b25f0,this['_initDataSource']();}[_0x3c1854(0x1ab)](){const _0x281760=_0x3c1854;this[_0x281760(0x1a8)]['dataSource']=this[_0x281760(0x131)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x422b03=_0x5ad891([_0x313e1f(0x0,_0x4be181[_0x3c1854(0x16d)]),_0x313e1f(0x1,_0x31b5ed['Inject'](_0x35de67))],_0x422b03);var _0x55ed3c=Object[_0x3c1854(0x164)],_0x29e6ed=Object[_0x3c1854(0x148)],_0x3028c0=(_0x303be0,_0x4a2aa2,_0x1d6fd8)=>_0x4a2aa2 in _0x303be0?_0x55ed3c(_0x303be0,_0x4a2aa2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1d6fd8}):_0x303be0[_0x4a2aa2]=_0x1d6fd8,_0x42f70c=(_0x104b6f,_0x52cc55,_0x1db5b4,_0x367080)=>{const _0x2de97e=_0x3c1854;for(var _0x23cbc4=_0x367080>0x1?void 0x0:_0x367080?_0x29e6ed(_0x52cc55,_0x1db5b4):_0x52cc55,_0x19db4e=_0x104b6f[_0x2de97e(0x13a)]-0x1,_0x43f490;_0x19db4e>=0x0;_0x19db4e--)(_0x43f490=_0x104b6f[_0x19db4e])&&(_0x23cbc4=_0x43f490(_0x23cbc4)||_0x23cbc4);return _0x23cbc4;},_0x3a4ad8=(_0x10949e,_0x515292)=>(_0x5ae607,_0x1b5c44)=>_0x515292(_0x5ae607,_0x1b5c44,_0x10949e),_0xc8db96=(_0x175bb8,_0x3ce3ea,_0xcaa187)=>_0x3028c0(_0x175bb8,typeof _0x3ce3ea!='symbol'?_0x3ce3ea+'':_0x3ce3ea,_0xcaa187);_0x2fd347['UniverThreadCommentDataSourcePlugin']=class extends _0x31b5ed[_0x3c1854(0x14a)]{constructor(_0x10800c=_0x1e063c,_0x5a1b6a,_0x470a96){const _0x1ad798=_0x3c1854;super(),this[_0x1ad798(0x187)]=_0x10800c,this[_0x1ad798(0x189)]=_0x5a1b6a,this[_0x1ad798(0x1b4)]=_0x470a96;const {..._0xc96025}=_0x31b5ed['merge']({},_0x1e063c,this['_config']);this[_0x1ad798(0x1b4)]['setConfig'](_0x4181c5,_0xc96025);}[_0x3c1854(0x157)](){const _0x4a7814=_0x3c1854;[[_0x35de67],[_0x422b03],[_0x39bcf5]][_0x4a7814(0x16f)](_0x191175=>{const _0x24afe1=_0x4a7814;this['_injector'][_0x24afe1(0x12e)](_0x191175);});}[_0x3c1854(0x17f)](){const _0x1c9351=_0x3c1854;this['_injector'][_0x1c9351(0x15a)](_0x422b03),this[_0x1c9351(0x189)][_0x1c9351(0x15a)](_0x39bcf5);}},_0xc8db96(_0x2fd347[_0x3c1854(0x153)],_0x3c1854(0x18a),_0x5f4667),_0xc8db96(_0x2fd347[_0x3c1854(0x153)],_0x3c1854(0x134),_0x31b5ed['UniverInstanceType'][_0x3c1854(0x12f)]),_0x2fd347[_0x3c1854(0x153)]=_0x42f70c([_0x31b5ed[_0x3c1854(0x18f)](_0x1cf185[_0x3c1854(0x1b0)],_0x23a190[_0x3c1854(0x1b6)],_0x450f12['UniverLicensePlugin']),_0x3a4ad8(0x1,_0x31b5ed['Inject'](_0x31b5ed['Injector'])),_0x3a4ad8(0x2,_0x31b5ed[_0x3c1854(0x144)])],_0x2fd347['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x2fd347,Symbol[_0x3c1854(0x174)],{'value':_0x3c1854(0x181)});}));function _0x48db(_0x17f3c3,_0x456988){const _0x55dd9e=_0x55dd();return _0x48db=function(_0x48dbab,_0x2d901a){_0x48dbab=_0x48dbab-0x12b;let _0xf0f8e=_0x55dd9e[_0x48dbab];return _0xf0f8e;},_0x48db(_0x17f3c3,_0x456988);}function _0x55dd(){const _0x46068c=['_initUserSync','root','getUser','getOwnPropertyDescriptor','UNRECOGNIZED','Plugin','solved','/reply','post','personId','CustomRangeType','values','getCurrentUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverThreadCommentDataSourcePlugin','/universer-api/comment/unit/','UniverProThreadCommentDatasource','object','onStarting','function','Unknown','get','HTTPService','98QmqpLQ','comment','filter','parse','parentId','dayjs','replyId','@univerjs/thread-comment-ui','defineProperty','_sessionService','UniverThreadComment','_httpService','_userService','@univerjs/network','addComment','/universer-api/user/list','245842BVoOqQ','IThreadCommentDataSourceService','stringify','forEach','Solved','UniverProLicense','thread-comment-data-source.config','find','toStringTag','customRanges','commentUpdate$','447654EBWXiv','Edit','ref','COMMENT','payload','unitId','disposeWithMe','UniverThreadCommentUi','onReady','/list','Module','map','requireSession','Delete','@univerjs/core','userId','_config','user','_injector','pluginName','8585328ONQEHG','UniverProCollaborationClient','format','pipe','DependentOn','2297919bCMUqP','UniverCore','bufferTime','/delete','listComments','addUser','Solve','body','rangeType','_commentService','8OnKxTG','createTimestamp','getComment','getUnit','rangeId','delete','deleteComment','/edit','reply','/add','threadId','slice','@univerjs-pro/collaboration-client','Add','_threadCommentDataSourceService','896840EEHYdE','CollaborationSessionService','_initDataSource','Disposable','15464086qSCojv','rxjs','resolved','UniverThreadCommentUIPlugin','subscribe','_threadCommentModel','10SIUFNJ','_configService','userID','UniverCollaborationClientPlugin','Reply','users','exports','saveCommentToSnapshot','OpenOrReOpen','Inject','11054034qJBijR','add','UNIVER_UNKNOWN','_init','_threadCommentDataSource','comments','@univerjs/thread-comment','type','UserManagerService','/solved','content','resolveComment','replies','length','ThreadCommentModel','YYYY/MM/DD\x20HH:mm','error','Injector','CommentService','@univerjs-pro/license','20CzXvlc','getMemberID','code','IConfigService'];_0x55dd=function(){return _0x46068c;};return _0x55dd();}
|
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.202506141606",
|
|
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.202506141606",
|
|
49
|
+
"@univerjs-pro/license": "0.8.1-nightly.202506141606",
|
|
50
50
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
51
|
-
"@univerjs/network": "0.8.1-nightly.
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment
|
|
54
|
-
"@univerjs/
|
|
51
|
+
"@univerjs/network": "0.8.1-nightly.202506141606",
|
|
52
|
+
"@univerjs/core": "0.8.1-nightly.202506141606",
|
|
53
|
+
"@univerjs/thread-comment": "0.8.1-nightly.202506141606",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.8.1-nightly.202506141606"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|