@univerjs-pro/thread-comment-datasource 0.8.0-nightly.202506051607 → 0.8.0-nightly.202506061607
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 +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x49bf79=_0x5489;(function(_0x6c18d3,_0x29b2e2){const _0x449b9d=_0x5489,_0x342e7e=_0x6c18d3();while(!![]){try{const _0x1dc4bf=-parseInt(_0x449b9d(0x15e))/0x1*(parseInt(_0x449b9d(0x1c1))/0x2)+parseInt(_0x449b9d(0x17c))/0x3*(-parseInt(_0x449b9d(0x1ab))/0x4)+parseInt(_0x449b9d(0x1ae))/0x5+-parseInt(_0x449b9d(0x16a))/0x6*(parseInt(_0x449b9d(0x187))/0x7)+-parseInt(_0x449b9d(0x19b))/0x8+-parseInt(_0x449b9d(0x174))/0x9+parseInt(_0x449b9d(0x182))/0xa*(parseInt(_0x449b9d(0x166))/0xb);if(_0x1dc4bf===_0x29b2e2)break;else _0x342e7e['push'](_0x342e7e['shift']());}catch(_0x5e6b5f){_0x342e7e['push'](_0x342e7e['shift']());}}}(_0xa642,0x7edf2));Object[_0x49bf79(0x167)](exports,Symbol[_0x49bf79(0x176)],{'value':_0x49bf79(0x15f)});const b=require(_0x49bf79(0x1a5)),T=require(_0x49bf79(0x1bd)),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require(_0x49bf79(0x18e)),w=require(_0x49bf79(0x1a8)),P=require('@univerjs/network'),U=_0x49bf79(0x1b0);var I=(_0x38e964=>(_0x38e964[_0x38e964['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x38e964[_0x38e964[_0x49bf79(0x19d)]=0x1]=_0x49bf79(0x19d),_0x38e964[_0x38e964['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x38e964))(I||{}),v=(_0xe4ba6=>(_0xe4ba6[_0xe4ba6['Unknown']=0x0]=_0x49bf79(0x1a7),_0xe4ba6[_0xe4ba6[_0x49bf79(0x158)]=0x1]=_0x49bf79(0x158),_0xe4ba6[_0xe4ba6['Reply']=0x2]=_0x49bf79(0x177),_0xe4ba6[_0xe4ba6[_0x49bf79(0x179)]=0x3]=_0x49bf79(0x179),_0xe4ba6[_0xe4ba6[_0x49bf79(0x19e)]=0x4]=_0x49bf79(0x19e),_0xe4ba6[_0xe4ba6[_0x49bf79(0x1d1)]=0x5]=_0x49bf79(0x1d1),_0xe4ba6[_0xe4ba6[_0x49bf79(0x184)]=-0x1]=_0x49bf79(0x184),_0xe4ba6))(v||{});const f=_0x4ed036=>c[_0x49bf79(0x1c9)](new Date(+_0x4ed036))[_0x49bf79(0x1c7)](_0x49bf79(0x178)),R=async(_0x4f5c5b,_0x5a88de)=>{const _0x572cff=_0x49bf79,_0x4edbd1=_0x4f5c5b[_0x572cff(0x175)](c['UserManagerService']),_0x10d2a3=_0x4f5c5b[_0x572cff(0x175)](P[_0x572cff(0x1bf)]);_0x5a88de['forEach'](_0x313809=>{const _0x48e5e8=_0x572cff;_0x4edbd1[_0x48e5e8(0x1a4)](_0x313809)&&_0x5a88de[_0x48e5e8(0x1a6)](_0x313809);}),_0x5a88de[_0x572cff(0x15b)]&&(await _0x10d2a3['get'](_0x572cff(0x18c),{'params':{'userIDs':[..._0x5a88de]}}))['body'][_0x572cff(0x1c2)][_0x572cff(0x19f)](_0x4c971a=>{const _0x2a93e3=_0x572cff;_0x4c971a&&_0x4edbd1[_0x2a93e3(0x1be)](_0x4c971a);});};var $=Object[_0x49bf79(0x1b8)],E=(_0x7a6f7a,_0x2d5116,_0x141701,_0x5d6f66)=>{for(var _0x4bf9b9=_0x5d6f66>0x1?void 0x0:_0x5d6f66?$(_0x2d5116,_0x141701):_0x2d5116,_0x25fddb=_0x7a6f7a['length']-0x1,_0x5aca6c;_0x25fddb>=0x0;_0x25fddb--)(_0x5aca6c=_0x7a6f7a[_0x25fddb])&&(_0x4bf9b9=_0x5aca6c(_0x4bf9b9)||_0x4bf9b9);return _0x4bf9b9;},S=(_0x2c38ee,_0x57a98e)=>(_0x49388c,_0x467204)=>_0x57a98e(_0x49388c,_0x467204,_0x2c38ee);let p=class extends c[_0x49bf79(0x15c)]{constructor(_0x324b42,_0xd93f0,_0x17e19c,_0x58698c){const _0x3d7b9b=_0x49bf79;super(),this[_0x3d7b9b(0x193)]=_0x324b42,this[_0x3d7b9b(0x1aa)]=_0xd93f0,this[_0x3d7b9b(0x1c4)]=_0x17e19c,this[_0x3d7b9b(0x15d)]=_0x58698c,this[_0x3d7b9b(0x1b3)](),this[_0x3d7b9b(0x188)]();}['_initUserSync'](){const _0x1c2782=_0x49bf79;this[_0x1c2782(0x17e)](this[_0x1c2782(0x1aa)][_0x1c2782(0x197)][_0x1c2782(0x1ba)](w[_0x1c2782(0x168)](0x10))[_0x1c2782(0x1ca)](_0x5e685a=>{const _0x28c71c=_0x1c2782,_0x3c5662=new Set();_0x5e685a['forEach'](_0x3b2651=>{const _0x2eee86=_0x5489;switch(_0x3b2651[_0x2eee86(0x1d0)]){case _0x2eee86(0x1a2):{const _0x148e02=_0x3b2651[_0x2eee86(0x1bc)][_0x2eee86(0x19c)];_0x3c5662[_0x2eee86(0x1a2)](_0x148e02);break;}}}),R(this[_0x28c71c(0x15d)],_0x3c5662);}));}[_0x49bf79(0x1b3)](){const _0x103b3c=_0x49bf79;this[_0x103b3c(0x17e)](this[_0x103b3c(0x193)]['commentUpdate$'][_0x103b3c(0x1ca)](async _0x38082b=>{const _0x2ca6c6=_0x103b3c;var _0x35e6cf,_0x37ce1d,_0x1ec242,_0x23aee1;const _0x11f7c2=(_0x35e6cf=this[_0x2ca6c6(0x1aa)][_0x2ca6c6(0x1a1)](_0x38082b['unitId'])[_0x2ca6c6(0x163)](_0x4aa590=>_0x4aa590[_0x2ca6c6(0x153)]===_0x38082b[_0x2ca6c6(0x153)]))==null?void 0x0:_0x35e6cf[_0x2ca6c6(0x190)];if(!_0x11f7c2)return;const {unitId:_0x49a31f,subUnitId:_0x16ec4c}=_0x11f7c2;switch(_0x38082b[_0x2ca6c6(0x186)]&&this[_0x2ca6c6(0x1c4)][_0x2ca6c6(0x1be)](_0x38082b[_0x2ca6c6(0x186)]),_0x38082b[_0x2ca6c6(0x1d0)]){case v[_0x2ca6c6(0x158)]:break;case v[_0x2ca6c6(0x177)]:{this[_0x2ca6c6(0x1aa)][_0x2ca6c6(0x1c8)](_0x49a31f,_0x16ec4c,{'unitId':_0x49a31f,'subUnitId':_0x16ec4c,'ref':'','id':_0x38082b['replyId'],'dT':f(+_0x38082b['createTimestamp']),'threadId':_0x38082b[_0x2ca6c6(0x153)],'personId':(_0x1ec242=(_0x37ce1d=_0x38082b['user'])==null?void 0x0:_0x37ce1d[_0x2ca6c6(0x196)])!=null?_0x1ec242:_0x38082b[_0x2ca6c6(0x1cf)],'text':JSON['parse'](_0x38082b['content']),'parentId':_0x11f7c2['id']});break;}case v['Delete']:{const _0x51d9b7=this[_0x2ca6c6(0x1aa)]['getComment'](_0x49a31f,_0x16ec4c,_0x38082b[_0x2ca6c6(0x1cc)]);_0x51d9b7&&_0x51d9b7[_0x2ca6c6(0x18f)]&&this[_0x2ca6c6(0x1aa)][_0x2ca6c6(0x1b7)](_0x49a31f,_0x16ec4c,_0x38082b[_0x2ca6c6(0x1cc)]);break;}case v['Edit']:{this[_0x2ca6c6(0x1aa)]['updateComment'](_0x49a31f,_0x16ec4c,{'commentId':_0x38082b[_0x2ca6c6(0x1cc)],'text':JSON[_0x2ca6c6(0x152)](_0x38082b[_0x2ca6c6(0x1bb)])});break;}case v['Solve']:{const _0x21c236=(_0x23aee1=this[_0x2ca6c6(0x1aa)][_0x2ca6c6(0x1a1)](_0x38082b[_0x2ca6c6(0x1ce)])['find'](_0x44d1d6=>_0x44d1d6[_0x2ca6c6(0x153)]===_0x38082b[_0x2ca6c6(0x153)]))==null?void 0x0:_0x23aee1[_0x2ca6c6(0x190)];_0x21c236&&this[_0x2ca6c6(0x1aa)]['resolveComment'](_0x49a31f,_0x16ec4c,_0x21c236['id'],_0x38082b[_0x2ca6c6(0x17b)]===I[_0x2ca6c6(0x19d)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x49bf79(0x156)])),S(0x1,c[_0x49bf79(0x171)](M[_0x49bf79(0x191)])),S(0x2,c['Inject'](c[_0x49bf79(0x1af)])),S(0x3,c['Inject'](c[_0x49bf79(0x16f)]))],p);function _0xa642(){const _0x3539db=['solved','2880534DgCNvE','body','disposeWithMe','setConfig','updateComment','listComments','35720340fpPZxv','createTimestamp','UNRECOGNIZED','/reply','user','91azMjdc','_initUserSync','map','UNIVER_UNKNOWN','/add','/universer-api/user/list','/edit','@univerjs/thread-comment','parentId','root','ThreadCommentModel','OpenOrReOpen','_commentService','code','filter','userID','commentUpdate$','getMemberID','merge','rangeType','7403256VeQTCU','personId','Solved','Delete','forEach','customRanges','getUnit','add','post','getUser','@univerjs-pro/collaboration-client','delete','Unknown','rxjs','Plugin','_threadCommentModel','4BafgKz','DependentOn','_config','1645445UuAGlH','UserManagerService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','symbol','replies','_init','saveCommentToSnapshot','_initDataSource','_httpService','deleteComment','getOwnPropertyDescriptor','UniverCollaborationClientPlugin','pipe','content','payload','@univerjs-pro/license','addUser','HTTPService','resolveComment','2174ETQCgG','users','dataSource','_userService','thread-comment-data-source.config','COMMENT','format','addComment','dayjs','subscribe','requireSession','replyId','stringify','unitId','userId','type','Solve','comment','parse','threadId','/list','values','CommentService','_configService','Add','_threadCommentDataSourceService','comments','size','Disposable','_injector','11KrVmlt','Module','/solved','resolved','error','find','onStarting','/universer-api/comment/unit/','11PrtQlT','defineProperty','bufferTime','IConfigService','320964oCKYkG','CollaborationSessionService','length','_threadCommentDataSource','syncUpdateMutationToColla','Injector','_sessionService','Inject','rangeId','UniverThreadCommentDataSourcePlugin','7096437qBfpBa','get','toStringTag','Reply','YYYY/MM/DD\x20HH:mm','Edit','CustomRangeType'];_0xa642=function(){return _0x3539db;};return _0xa642();}const q=_0x49bf79(0x1c5),D={};var A=Object[_0x49bf79(0x1b8)],x=(_0x16c6db,_0x36ef4b,_0xd3ce05,_0x4c472d)=>{const _0x3be883=_0x49bf79;for(var _0x39b0ce=_0x4c472d>0x1?void 0x0:_0x4c472d?A(_0x36ef4b,_0xd3ce05):_0x36ef4b,_0x3d956e=_0x16c6db[_0x3be883(0x16c)]-0x1,_0x2acffe;_0x3d956e>=0x0;_0x3d956e--)(_0x2acffe=_0x16c6db[_0x3d956e])&&(_0x39b0ce=_0x2acffe(_0x39b0ce)||_0x39b0ce);return _0x39b0ce;},_=(_0x3b69ca,_0xbd5201)=>(_0x2af689,_0x22b10b)=>_0xbd5201(_0x2af689,_0x22b10b,_0x3b69ca);function Y(_0x23e02d,_0x3c343d){const _0x42047f=_0x49bf79,_0x595a74=_0x23e02d['replies'][0x0];return{..._0x3c343d,'id':_0x595a74[_0x42047f(0x1cc)],'resolved':_0x23e02d[_0x42047f(0x17b)]===0x1,'dT':f(_0x595a74[_0x42047f(0x183)]),'personId':_0x595a74[_0x42047f(0x1cf)],'threadId':_0x595a74[_0x42047f(0x153)]};}function _0x5489(_0x312ba7,_0x38f43a){const _0xa642c0=_0xa642();return _0x5489=function(_0x548909,_0x3aafe4){_0x548909=_0x548909-0x152;let _0x42cc36=_0xa642c0[_0x548909];return _0x42cc36;},_0x5489(_0x312ba7,_0x38f43a);}function G(_0x15ad7b,_0x4fbb54,_0x52a905){const _0xb143f3=_0x49bf79;var _0x2107a1,_0x37f167;if(((_0x37f167=(_0x2107a1=_0x15ad7b==null?void 0x0:_0x15ad7b[_0xb143f3(0x1b2)])==null?void 0x0:_0x2107a1[_0xb143f3(0x16c)])!=null?_0x37f167:0x0)>0x0){const _0x5ddac2=(_0x289d93,_0xdb74c9)=>({'id':_0x289d93['replyId'],'threadId':_0x289d93[_0xb143f3(0x153)],'dT':f(_0x289d93['createTimestamp']),'personId':_0x289d93[_0xb143f3(0x1cf)],'resolved':_0x15ad7b[_0xb143f3(0x17b)]===I[_0xb143f3(0x19d)],'unitId':_0x4fbb54,'subUnitId':_0x52a905,'text':JSON['parse'](_0x289d93[_0xb143f3(0x1bb)]),'parentId':_0xdb74c9}),_0x308f2d=_0x5ddac2(_0x15ad7b[_0xb143f3(0x1b2)][0x0]);return{..._0x308f2d,'children':_0x15ad7b[_0xb143f3(0x1b2)]['slice'](0x1)[_0xb143f3(0x189)](_0x5e7fee=>_0x5ddac2(_0x5e7fee,_0x308f2d['id']))};}return null;}let g=class{constructor(_0x17e694,_0x3f28d2,_0x41240c,_0x2489e8){const _0x48548b=_0x49bf79;this[_0x48548b(0x1b6)]=_0x17e694,this[_0x48548b(0x1c4)]=_0x3f28d2,this['_sessionService']=_0x41240c,this[_0x48548b(0x15d)]=_0x2489e8;}async[_0x49bf79(0x1c8)](_0x467af6){const _0x42bc4b=_0x49bf79;var _0x35c88d,_0xe90a92;const {parentId:_0x5ae672,unitId:_0x190e9d,text:_0x1be383,threadId:_0x2e8c7f}=_0x467af6,_0xfb6cc8=(_0xe90a92=(_0x35c88d=_0x1be383['customRanges'])==null?void 0x0:_0x35c88d[_0x42bc4b(0x195)](_0x5c2dc0=>_0x5c2dc0[_0x42bc4b(0x19a)]===c['CustomRangeType']['COMMENT'])['map'](_0x2a8146=>_0x2a8146[_0x42bc4b(0x172)]))!=null?_0xe90a92:[],_0x2b7689=JSON[_0x42bc4b(0x1cd)](_0x1be383),_0x5cfd29=(await this[_0x42bc4b(0x170)]['requireSession'](_0x190e9d))[_0x42bc4b(0x198)]();if(_0x5ae672){const _0x608079={'memberId':_0x5cfd29,'unitId':_0x190e9d,'content':_0x2b7689,'mention':_0xfb6cc8,'threadId':_0x2e8c7f},_0x2bb2ec=(await this[_0x42bc4b(0x1b6)][_0x42bc4b(0x1a3)]('/universer-api/comment/unit/'+_0x190e9d+_0x42bc4b(0x185),{'body':_0x608079}))[_0x42bc4b(0x17d)]['reply'];return{..._0x467af6,'id':_0x2bb2ec[_0x42bc4b(0x1cc)],'dT':c['dayjs'](+_0x2bb2ec[_0x42bc4b(0x183)])['format'](_0x42bc4b(0x178)),'personId':_0x2bb2ec[_0x42bc4b(0x1cf)]};}else{const _0x49339a={'memberId':_0x5cfd29,'unitId':_0x190e9d,'content':_0x2b7689,'mention':_0xfb6cc8},_0x4bb5a1=await this[_0x42bc4b(0x1b6)][_0x42bc4b(0x1a3)](_0x42bc4b(0x165)+_0x190e9d+_0x42bc4b(0x18b),{'body':_0x49339a});return Y(_0x4bb5a1[_0x42bc4b(0x17d)][_0x42bc4b(0x1d2)],_0x467af6);}}async[_0x49bf79(0x180)](_0x29ae4e){const _0x2b7a51=_0x49bf79;var _0x3282b8,_0x24d1d1;const {text:_0x434528,unitId:_0x19d106}=_0x29ae4e,_0x39d97b=(_0x24d1d1=(_0x3282b8=_0x434528[_0x2b7a51(0x1a0)])==null?void 0x0:_0x3282b8[_0x2b7a51(0x195)](_0x17be82=>_0x17be82[_0x2b7a51(0x19a)]===c[_0x2b7a51(0x17a)][_0x2b7a51(0x1c6)])[_0x2b7a51(0x189)](_0x1d3c95=>_0x1d3c95[_0x2b7a51(0x172)]))!=null?_0x24d1d1:[],_0x25b5bf=JSON[_0x2b7a51(0x1cd)](_0x434528),_0x3898ab=_0x29ae4e[_0x2b7a51(0x153)],_0x599a5f=_0x29ae4e['id'],_0xa9c9e7={'memberId':(await this['_sessionService'][_0x2b7a51(0x1cb)](_0x19d106))[_0x2b7a51(0x198)](),'unitId':_0x19d106,'threadId':_0x3898ab,'mention':_0x39d97b,'content':_0x25b5bf,'replyId':_0x599a5f},_0x3e1797=await this[_0x2b7a51(0x1b6)][_0x2b7a51(0x1a3)](_0x2b7a51(0x165)+_0x19d106+_0x2b7a51(0x18d),{'body':_0xa9c9e7});return!_0x3e1797[_0x2b7a51(0x17d)][_0x2b7a51(0x162)]||_0x3e1797['body'][_0x2b7a51(0x162)][_0x2b7a51(0x194)]===0x1;}async[_0x49bf79(0x1c0)](_0x32a0ec){const _0x557f2f=_0x49bf79,{unitId:_0x15df81}=_0x32a0ec,_0x44296e=_0x32a0ec[_0x557f2f(0x153)],_0x35475b={'memberId':this['_userService']['getCurrentUser']()[_0x557f2f(0x196)],'unitId':_0x15df81,'threadId':_0x44296e,'solved':_0x32a0ec[_0x557f2f(0x161)]?I[_0x557f2f(0x19d)]:I[_0x557f2f(0x192)]},_0x34fdb8=await this[_0x557f2f(0x1b6)][_0x557f2f(0x1a3)](_0x557f2f(0x165)+_0x15df81+_0x557f2f(0x160),{'body':_0x35475b});return!_0x34fdb8[_0x557f2f(0x17d)][_0x557f2f(0x162)]||_0x34fdb8[_0x557f2f(0x17d)][_0x557f2f(0x162)][_0x557f2f(0x194)]===0x1;}async['deleteComment'](_0x56761c,_0x1c7a30,_0x2031cd,_0x46b83d){const _0x8af501=_0x49bf79,_0x2f04f6={'memberId':(await this[_0x8af501(0x170)]['requireSession'](_0x56761c))[_0x8af501(0x198)](),'threadId':_0x2031cd,'replyId':_0x46b83d,'unitId':_0x56761c},_0x28ced5=await this[_0x8af501(0x1b6)][_0x8af501(0x1a3)](_0x8af501(0x165)+_0x56761c+'/delete',{'body':_0x2f04f6});return!_0x28ced5[_0x8af501(0x17d)][_0x8af501(0x162)]||_0x28ced5[_0x8af501(0x17d)][_0x8af501(0x162)][_0x8af501(0x194)]===0x1;}async[_0x49bf79(0x181)](_0x48dd50,_0x24b38c,_0x5265df){const _0x2a9f12=_0x49bf79,_0x3cd3ae={'unitId':_0x48dd50,'threadId':_0x5265df},_0x593deb=await this[_0x2a9f12(0x1b6)]['post'](_0x2a9f12(0x165)+_0x48dd50+_0x2a9f12(0x154),{'body':_0x3cd3ae}),_0x3b29d6=_0x5265df[_0x2a9f12(0x189)](_0x210e7c=>G(_0x593deb[_0x2a9f12(0x17d)][_0x2a9f12(0x15a)][_0x210e7c],_0x48dd50,_0x24b38c))[_0x2a9f12(0x195)](Boolean);return Object[_0x2a9f12(0x155)](_0x593deb[_0x2a9f12(0x17d)][_0x2a9f12(0x1c2)])['forEach'](_0x86ba8a=>{const _0x46188c=_0x2a9f12;this['_userService'][_0x46188c(0x1be)](_0x86ba8a);}),_0x3b29d6;}[_0x49bf79(0x1b4)](_0x108c28){const _0x165461=_0x49bf79;return{'id':_0x108c28['id'],'threadId':_0x108c28[_0x165461(0x153)],'ref':_0x108c28['ref']};}};g=x([_(0x0,c['Inject'](P[_0x49bf79(0x1bf)])),_(0x1,c[_0x49bf79(0x171)](c[_0x49bf79(0x1af)])),_(0x2,c['Inject'](b[_0x49bf79(0x16b)])),_(0x3,c[_0x49bf79(0x171)](c[_0x49bf79(0x16f)]))],g);var H=Object[_0x49bf79(0x1b8)],J=(_0x2365e9,_0x534419,_0x38a1ea,_0x5eef0e)=>{const _0x559e6a=_0x49bf79;for(var _0x8ab899=_0x5eef0e>0x1?void 0x0:_0x5eef0e?H(_0x534419,_0x38a1ea):_0x534419,_0x22492f=_0x2365e9[_0x559e6a(0x16c)]-0x1,_0x10d669;_0x22492f>=0x0;_0x22492f--)(_0x10d669=_0x2365e9[_0x22492f])&&(_0x8ab899=_0x10d669(_0x8ab899)||_0x8ab899);return _0x8ab899;},y=(_0x3801ff,_0x3465f6)=>(_0x4b8de3,_0x11bd5a)=>_0x3465f6(_0x4b8de3,_0x11bd5a,_0x3801ff);let C=class extends c[_0x49bf79(0x15c)]{constructor(_0x3beeea,_0x416d8c){const _0x5cb63c=_0x49bf79;super(),this[_0x5cb63c(0x159)]=_0x3beeea,this[_0x5cb63c(0x16d)]=_0x416d8c,this[_0x5cb63c(0x1b5)]();}[_0x49bf79(0x1b5)](){const _0xc28f4c=_0x49bf79;this['_threadCommentDataSourceService'][_0xc28f4c(0x1c3)]=this[_0xc28f4c(0x16d)],this[_0xc28f4c(0x159)][_0xc28f4c(0x16e)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x49bf79(0x171)](g))],C);var F=Object[_0x49bf79(0x167)],L=Object[_0x49bf79(0x1b8)],Z=(_0x5c8b97,_0x2e74eb,_0x38b8fa)=>_0x2e74eb in _0x5c8b97?F(_0x5c8b97,_0x2e74eb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x38b8fa}):_0x5c8b97[_0x2e74eb]=_0x38b8fa,W=(_0x5a2e9e,_0x3272a4,_0x17d428,_0x334678)=>{const _0x1df8c1=_0x49bf79;for(var _0x3156db=_0x334678>0x1?void 0x0:_0x334678?L(_0x3272a4,_0x17d428):_0x3272a4,_0x5a4b86=_0x5a2e9e[_0x1df8c1(0x16c)]-0x1,_0x27b9d8;_0x5a4b86>=0x0;_0x5a4b86--)(_0x27b9d8=_0x5a2e9e[_0x5a4b86])&&(_0x3156db=_0x27b9d8(_0x3156db)||_0x3156db);return _0x3156db;},O=(_0x410afd,_0x4dc964)=>(_0x54ab73,_0x561597)=>_0x4dc964(_0x54ab73,_0x561597,_0x410afd),N=(_0x294e27,_0x2b2fd2,_0x4f6104)=>Z(_0x294e27,typeof _0x2b2fd2!=_0x49bf79(0x1b1)?_0x2b2fd2+'':_0x2b2fd2,_0x4f6104);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x49bf79(0x1a9)]{constructor(_0x151a1b=D,_0x53c1a4,_0x437dc2){const _0x16fd4b=_0x49bf79;super(),this[_0x16fd4b(0x1ad)]=_0x151a1b,this[_0x16fd4b(0x15d)]=_0x53c1a4,this[_0x16fd4b(0x157)]=_0x437dc2;const {..._0x4f59ab}=c[_0x16fd4b(0x199)]({},D,this['_config']);this[_0x16fd4b(0x157)][_0x16fd4b(0x17f)](q,_0x4f59ab);}[_0x49bf79(0x164)](){const _0x49bd7b=_0x49bf79;[[g],[C],[p]][_0x49bd7b(0x19f)](_0xcaea74=>{const _0x3e9c73=_0x49bd7b;this[_0x3e9c73(0x15d)][_0x3e9c73(0x1a2)](_0xcaea74);});}['onReady'](){const _0x31e791=_0x49bf79;this[_0x31e791(0x15d)][_0x31e791(0x175)](C),this[_0x31e791(0x15d)]['get'](p);}},N(exports[_0x49bf79(0x173)],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x49bf79(0x1d0),c['UniverInstanceType'][_0x49bf79(0x18a)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x49bf79(0x1ac)](j['UniverThreadCommentUIPlugin'],b[_0x49bf79(0x1b9)],T['UniverLicensePlugin']),O(0x1,c['Inject'](c[_0x49bf79(0x16f)])),O(0x2,c[_0x49bf79(0x169)])],exports[_0x49bf79(0x173)]);
|
|
1
|
+
'use strict';function _0x4d64(_0x5612df,_0x1548c3){const _0x545ae6=_0x545a();return _0x4d64=function(_0x4d640c,_0x2c78e8){_0x4d640c=_0x4d640c-0x78;let _0x190aed=_0x545ae6[_0x4d640c];return _0x190aed;},_0x4d64(_0x5612df,_0x1548c3);}const _0x1fee72=_0x4d64;(function(_0x372cff,_0x2cf33f){const _0x4e0952=_0x4d64,_0x52dade=_0x372cff();while(!![]){try{const _0x492590=-parseInt(_0x4e0952(0xaf))/0x1*(parseInt(_0x4e0952(0x87))/0x2)+-parseInt(_0x4e0952(0x96))/0x3+-parseInt(_0x4e0952(0xee))/0x4*(parseInt(_0x4e0952(0xa4))/0x5)+parseInt(_0x4e0952(0xdf))/0x6*(parseInt(_0x4e0952(0xe4))/0x7)+parseInt(_0x4e0952(0x99))/0x8+parseInt(_0x4e0952(0xb9))/0x9*(parseInt(_0x4e0952(0xdb))/0xa)+parseInt(_0x4e0952(0xd3))/0xb;if(_0x492590===_0x2cf33f)break;else _0x52dade['push'](_0x52dade['shift']());}catch(_0x4a0643){_0x52dade['push'](_0x52dade['shift']());}}}(_0x545a,0x3f350));Object['defineProperty'](exports,Symbol[_0x1fee72(0x7a)],{'value':'Module'});const b=require(_0x1fee72(0xef)),T=require(_0x1fee72(0xc9)),c=require(_0x1fee72(0x88)),j=require(_0x1fee72(0x7b)),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require(_0x1fee72(0xca)),U=_0x1fee72(0x9c);var I=(_0xb8f9ff=>(_0xb8f9ff[_0xb8f9ff['OpenOrReOpen']=0x0]=_0x1fee72(0xc6),_0xb8f9ff[_0xb8f9ff[_0x1fee72(0xf1)]=0x1]=_0x1fee72(0xf1),_0xb8f9ff[_0xb8f9ff[_0x1fee72(0xc7)]=-0x1]=_0x1fee72(0xc7),_0xb8f9ff))(I||{}),v=(_0x6cbab7=>(_0x6cbab7[_0x6cbab7['Unknown']=0x0]='Unknown',_0x6cbab7[_0x6cbab7[_0x1fee72(0xc8)]=0x1]=_0x1fee72(0xc8),_0x6cbab7[_0x6cbab7['Reply']=0x2]='Reply',_0x6cbab7[_0x6cbab7['Edit']=0x3]='Edit',_0x6cbab7[_0x6cbab7[_0x1fee72(0xec)]=0x4]=_0x1fee72(0xec),_0x6cbab7[_0x6cbab7['Solve']=0x5]=_0x1fee72(0x93),_0x6cbab7[_0x6cbab7['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x6cbab7))(v||{});const f=_0x14bc72=>c[_0x1fee72(0x9b)](new Date(+_0x14bc72))['format'](_0x1fee72(0xcb)),R=async(_0x20adf2,_0x2e4f43)=>{const _0x465355=_0x1fee72,_0x1838fd=_0x20adf2[_0x465355(0xf4)](c[_0x465355(0xc1)]),_0xbd3a86=_0x20adf2[_0x465355(0xf4)](P[_0x465355(0xc3)]);_0x2e4f43[_0x465355(0xde)](_0x34ec71=>{const _0x46d7f7=_0x465355;_0x1838fd[_0x46d7f7(0x7c)](_0x34ec71)&&_0x2e4f43[_0x46d7f7(0x94)](_0x34ec71);}),_0x2e4f43[_0x465355(0xa0)]&&(await _0xbd3a86[_0x465355(0xf4)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2e4f43]}}))[_0x465355(0xa7)][_0x465355(0xd5)][_0x465355(0xde)](_0x12dc6a=>{const _0xf16297=_0x465355;_0x12dc6a&&_0x1838fd[_0xf16297(0xbb)](_0x12dc6a);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x2a990b,_0x51e95d,_0x406fa7,_0x15f585)=>{const _0x4e4e19=_0x1fee72;for(var _0x93c94e=_0x15f585>0x1?void 0x0:_0x15f585?$(_0x51e95d,_0x406fa7):_0x51e95d,_0x5b2126=_0x2a990b[_0x4e4e19(0xc0)]-0x1,_0x539622;_0x5b2126>=0x0;_0x5b2126--)(_0x539622=_0x2a990b[_0x5b2126])&&(_0x93c94e=_0x539622(_0x93c94e)||_0x93c94e);return _0x93c94e;},S=(_0x1ff8e0,_0x533cb8)=>(_0x41a7ff,_0x5bf81b)=>_0x533cb8(_0x41a7ff,_0x5bf81b,_0x1ff8e0);let p=class extends c[_0x1fee72(0xac)]{constructor(_0x50e9b2,_0x59caeb,_0x12320c,_0x3cdcc3){const _0x155a10=_0x1fee72;super(),this[_0x155a10(0xed)]=_0x50e9b2,this[_0x155a10(0xce)]=_0x59caeb,this[_0x155a10(0xae)]=_0x12320c,this[_0x155a10(0xd6)]=_0x3cdcc3,this[_0x155a10(0x8e)](),this[_0x155a10(0xcc)]();}['_initUserSync'](){const _0x4c9ecc=_0x1fee72;this[_0x4c9ecc(0x9f)](this['_threadCommentModel'][_0x4c9ecc(0xcf)][_0x4c9ecc(0xe2)](w[_0x4c9ecc(0xa5)](0x10))['subscribe'](_0x1c8586=>{const _0x1914e1=_0x4c9ecc,_0x11f3e5=new Set();_0x1c8586[_0x1914e1(0xde)](_0x287cdc=>{const _0x51cd26=_0x1914e1;switch(_0x287cdc[_0x51cd26(0x91)]){case _0x51cd26(0x83):{const _0x4b1291=_0x287cdc['payload'][_0x51cd26(0x8c)];_0x11f3e5[_0x51cd26(0x83)](_0x4b1291);break;}}}),R(this[_0x1914e1(0xd6)],_0x11f3e5);}));}[_0x1fee72(0x8e)](){const _0x476632=_0x1fee72;this[_0x476632(0x9f)](this[_0x476632(0xed)][_0x476632(0xcf)]['subscribe'](async _0xa16c05=>{const _0x318884=_0x476632;var _0x4c7f43,_0x3cefbe,_0x55cf9c,_0x1c4d27;const _0x3b1879=(_0x4c7f43=this[_0x318884(0xce)][_0x318884(0xdc)](_0xa16c05[_0x318884(0xf3)])[_0x318884(0xf0)](_0x26b291=>_0x26b291[_0x318884(0xd0)]===_0xa16c05[_0x318884(0xd0)]))==null?void 0x0:_0x4c7f43['root'];if(!_0x3b1879)return;const {unitId:_0x56a05d,subUnitId:_0x13af28}=_0x3b1879;switch(_0xa16c05['user']&&this['_userService']['addUser'](_0xa16c05[_0x318884(0xc2)]),_0xa16c05[_0x318884(0x91)]){case v['Add']:break;case v[_0x318884(0xbd)]:{this[_0x318884(0xce)]['addComment'](_0x56a05d,_0x13af28,{'unitId':_0x56a05d,'subUnitId':_0x13af28,'ref':'','id':_0xa16c05[_0x318884(0x81)],'dT':f(+_0xa16c05[_0x318884(0xd1)]),'threadId':_0xa16c05['threadId'],'personId':(_0x55cf9c=(_0x3cefbe=_0xa16c05[_0x318884(0xc2)])==null?void 0x0:_0x3cefbe[_0x318884(0xb0)])!=null?_0x55cf9c:_0xa16c05[_0x318884(0xc5)],'text':JSON[_0x318884(0xe3)](_0xa16c05[_0x318884(0x7f)]),'parentId':_0x3b1879['id']});break;}case v[_0x318884(0xec)]:{const _0x25d160=this[_0x318884(0xce)]['getComment'](_0x56a05d,_0x13af28,_0xa16c05['replyId']);_0x25d160&&_0x25d160[_0x318884(0xf2)]&&this['_threadCommentModel'][_0x318884(0xe9)](_0x56a05d,_0x13af28,_0xa16c05[_0x318884(0x81)]);break;}case v['Edit']:{this[_0x318884(0xce)][_0x318884(0xe5)](_0x56a05d,_0x13af28,{'commentId':_0xa16c05['replyId'],'text':JSON[_0x318884(0xe3)](_0xa16c05[_0x318884(0x7f)])});break;}case v['Solve']:{const _0xe3550b=(_0x1c4d27=this[_0x318884(0xce)]['getUnit'](_0xa16c05[_0x318884(0xf3)])[_0x318884(0xf0)](_0x5e3d46=>_0x5e3d46[_0x318884(0xd0)]===_0xa16c05[_0x318884(0xd0)]))==null?void 0x0:_0x1c4d27[_0x318884(0xda)];_0xe3550b&&this['_threadCommentModel'][_0x318884(0xd2)](_0x56a05d,_0x13af28,_0xe3550b['id'],_0xa16c05[_0x318884(0xd4)]===I[_0x318884(0xf1)]);break;}}}));}};p=E([S(0x0,c[_0x1fee72(0xb8)](b[_0x1fee72(0x98)])),S(0x1,c[_0x1fee72(0xb8)](M[_0x1fee72(0xbc)])),S(0x2,c[_0x1fee72(0xb8)](c[_0x1fee72(0xc1)])),S(0x3,c['Inject'](c[_0x1fee72(0xea)]))],p);const q=_0x1fee72(0xbf),D={};var A=Object[_0x1fee72(0xb6)],x=(_0x443679,_0x25631f,_0x69580c,_0xa860fd)=>{for(var _0x463fbc=_0xa860fd>0x1?void 0x0:_0xa860fd?A(_0x25631f,_0x69580c):_0x25631f,_0x570a73=_0x443679['length']-0x1,_0xb6bc01;_0x570a73>=0x0;_0x570a73--)(_0xb6bc01=_0x443679[_0x570a73])&&(_0x463fbc=_0xb6bc01(_0x463fbc)||_0x463fbc);return _0x463fbc;},_=(_0x3221d4,_0x1d852e)=>(_0xf86f7b,_0x355424)=>_0x1d852e(_0xf86f7b,_0x355424,_0x3221d4);function _0x545a(){const _0x5a4f3c=['_userService','22bKLmQu','userID','_config','_sessionService','error','customRanges','_threadCommentDataSourceService','getOwnPropertyDescriptor','/universer-api/comment/unit/','Inject','18IGyozh','/list','addUser','ThreadCommentModel','Reply','requireSession','thread-comment-data-source.config','length','UserManagerService','user','HTTPService','comment','userId','OpenOrReOpen','UNRECOGNIZED','Add','@univerjs-pro/license','@univerjs/network','YYYY/MM/DD\x20HH:mm','_initUserSync','dataSource','_threadCommentModel','commentUpdate$','threadId','createTimestamp','resolveComment','4336156kaviAU','solved','users','_injector','UniverThreadCommentUIPlugin','_httpService','slice','root','851030SmCXbs','getUnit','symbol','forEach','6yadqyU','values','setConfig','pipe','parse','1666007xUIyIn','updateComment','getCurrentUser','reply','map','deleteComment','Injector','format','Delete','_commentService','900148kIteXV','@univerjs-pro/collaboration-client','find','Solved','parentId','unitId','get','/edit','rangeType','UniverThreadCommentDataSourcePlugin','toStringTag','@univerjs/thread-comment-ui','getUser','filter','DependentOn','content','IConfigService','replyId','/delete','add','resolved','post','COMMENT','26498pgXOtT','@univerjs/core','getMemberID','Plugin','_configService','personId','_initDataSource','_init','syncUpdateMutationToColla','_threadCommentDataSource','type','UNIVER_UNKNOWN','Solve','delete','defineProperty','282822dBTtEx','merge','CommentService','538256eKVXCs','saveCommentToSnapshot','dayjs','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','ref','code','disposeWithMe','size','stringify','UniverLicensePlugin','rangeId','5YjaWcz','bufferTime','listComments','body','CollaborationSessionService','pluginName','IThreadCommentDataSourceService','UniverInstanceType','Disposable','replies'];_0x545a=function(){return _0x5a4f3c;};return _0x545a();}function Y(_0x10fb7d,_0xe42f9e){const _0x47a1f1=_0x1fee72,_0x4fe8ac=_0x10fb7d['replies'][0x0];return{..._0xe42f9e,'id':_0x4fe8ac[_0x47a1f1(0x81)],'resolved':_0x10fb7d[_0x47a1f1(0xd4)]===0x1,'dT':f(_0x4fe8ac[_0x47a1f1(0xd1)]),'personId':_0x4fe8ac['userId'],'threadId':_0x4fe8ac[_0x47a1f1(0xd0)]};}function G(_0x2b9f62,_0x4a9ca0,_0x1950e0){const _0x27c734=_0x1fee72;var _0x5add47,_0x1ec1f9;if(((_0x1ec1f9=(_0x5add47=_0x2b9f62==null?void 0x0:_0x2b9f62[_0x27c734(0xad)])==null?void 0x0:_0x5add47[_0x27c734(0xc0)])!=null?_0x1ec1f9:0x0)>0x0){const _0x1763fe=(_0x3de04a,_0x5d912f)=>({'id':_0x3de04a[_0x27c734(0x81)],'threadId':_0x3de04a[_0x27c734(0xd0)],'dT':f(_0x3de04a[_0x27c734(0xd1)]),'personId':_0x3de04a[_0x27c734(0xc5)],'resolved':_0x2b9f62[_0x27c734(0xd4)]===I[_0x27c734(0xf1)],'unitId':_0x4a9ca0,'subUnitId':_0x1950e0,'text':JSON[_0x27c734(0xe3)](_0x3de04a[_0x27c734(0x7f)]),'parentId':_0x5d912f}),_0x1d2338=_0x1763fe(_0x2b9f62[_0x27c734(0xad)][0x0]);return{..._0x1d2338,'children':_0x2b9f62[_0x27c734(0xad)][_0x27c734(0xd9)](0x1)['map'](_0x63f852=>_0x1763fe(_0x63f852,_0x1d2338['id']))};}return null;}let g=class{constructor(_0x8fef9c,_0x5ceb17,_0x368e16,_0x54559c){const _0xdccd22=_0x1fee72;this['_httpService']=_0x8fef9c,this['_userService']=_0x5ceb17,this[_0xdccd22(0xb2)]=_0x368e16,this[_0xdccd22(0xd6)]=_0x54559c;}async['addComment'](_0x576d66){const _0x7ef470=_0x1fee72;var _0x1034ec,_0x3e409d;const {parentId:_0x5c5611,unitId:_0x35e64f,text:_0x235ce9,threadId:_0x4e6d53}=_0x576d66,_0x59d91e=(_0x3e409d=(_0x1034ec=_0x235ce9[_0x7ef470(0xb4)])==null?void 0x0:_0x1034ec['filter'](_0x4fd6f6=>_0x4fd6f6['rangeType']===c['CustomRangeType'][_0x7ef470(0x86)])['map'](_0x3c3b82=>_0x3c3b82[_0x7ef470(0xa3)]))!=null?_0x3e409d:[],_0x410d20=JSON[_0x7ef470(0xa1)](_0x235ce9),_0x3ee789=(await this[_0x7ef470(0xb2)][_0x7ef470(0xbe)](_0x35e64f))[_0x7ef470(0x89)]();if(_0x5c5611){const _0x467740={'memberId':_0x3ee789,'unitId':_0x35e64f,'content':_0x410d20,'mention':_0x59d91e,'threadId':_0x4e6d53},_0x12de3a=(await this['_httpService']['post'](_0x7ef470(0xb7)+_0x35e64f+'/reply',{'body':_0x467740}))[_0x7ef470(0xa7)][_0x7ef470(0xe7)];return{..._0x576d66,'id':_0x12de3a[_0x7ef470(0x81)],'dT':c['dayjs'](+_0x12de3a['createTimestamp'])[_0x7ef470(0xeb)](_0x7ef470(0xcb)),'personId':_0x12de3a[_0x7ef470(0xc5)]};}else{const _0x5d95b8={'memberId':_0x3ee789,'unitId':_0x35e64f,'content':_0x410d20,'mention':_0x59d91e},_0x32fd23=await this['_httpService'][_0x7ef470(0x85)](_0x7ef470(0xb7)+_0x35e64f+'/add',{'body':_0x5d95b8});return Y(_0x32fd23[_0x7ef470(0xa7)][_0x7ef470(0xc4)],_0x576d66);}}async[_0x1fee72(0xe5)](_0x4548b6){const _0x1e0c05=_0x1fee72;var _0x27200b,_0x15498f;const {text:_0x142ea3,unitId:_0xacea29}=_0x4548b6,_0x2e1eed=(_0x15498f=(_0x27200b=_0x142ea3[_0x1e0c05(0xb4)])==null?void 0x0:_0x27200b[_0x1e0c05(0x7d)](_0x512a9e=>_0x512a9e[_0x1e0c05(0x78)]===c['CustomRangeType'][_0x1e0c05(0x86)])['map'](_0x1fa72f=>_0x1fa72f['rangeId']))!=null?_0x15498f:[],_0x33b5cd=JSON[_0x1e0c05(0xa1)](_0x142ea3),_0x402242=_0x4548b6[_0x1e0c05(0xd0)],_0x3f5f35=_0x4548b6['id'],_0x3c1026={'memberId':(await this[_0x1e0c05(0xb2)][_0x1e0c05(0xbe)](_0xacea29))[_0x1e0c05(0x89)](),'unitId':_0xacea29,'threadId':_0x402242,'mention':_0x2e1eed,'content':_0x33b5cd,'replyId':_0x3f5f35},_0x598b60=await this['_httpService'][_0x1e0c05(0x85)](_0x1e0c05(0xb7)+_0xacea29+_0x1e0c05(0xf5),{'body':_0x3c1026});return!_0x598b60['body']['error']||_0x598b60[_0x1e0c05(0xa7)][_0x1e0c05(0xb3)]['code']===0x1;}async[_0x1fee72(0xd2)](_0x12ede5){const _0x42dc52=_0x1fee72,{unitId:_0x17ab2f}=_0x12ede5,_0x205e64=_0x12ede5[_0x42dc52(0xd0)],_0xca40f={'memberId':this[_0x42dc52(0xae)][_0x42dc52(0xe6)]()[_0x42dc52(0xb0)],'unitId':_0x17ab2f,'threadId':_0x205e64,'solved':_0x12ede5[_0x42dc52(0x84)]?I[_0x42dc52(0xf1)]:I[_0x42dc52(0xc6)]},_0x2aa7d0=await this[_0x42dc52(0xd8)][_0x42dc52(0x85)](_0x42dc52(0xb7)+_0x17ab2f+'/solved',{'body':_0xca40f});return!_0x2aa7d0[_0x42dc52(0xa7)]['error']||_0x2aa7d0['body'][_0x42dc52(0xb3)][_0x42dc52(0x9e)]===0x1;}async[_0x1fee72(0xe9)](_0x205b57,_0x18489e,_0x2ddc0b,_0x32eb63){const _0x1f386b=_0x1fee72,_0x3add72={'memberId':(await this[_0x1f386b(0xb2)][_0x1f386b(0xbe)](_0x205b57))['getMemberID'](),'threadId':_0x2ddc0b,'replyId':_0x32eb63,'unitId':_0x205b57},_0xc04490=await this[_0x1f386b(0xd8)]['post'](_0x1f386b(0xb7)+_0x205b57+_0x1f386b(0x82),{'body':_0x3add72});return!_0xc04490[_0x1f386b(0xa7)][_0x1f386b(0xb3)]||_0xc04490[_0x1f386b(0xa7)][_0x1f386b(0xb3)][_0x1f386b(0x9e)]===0x1;}async[_0x1fee72(0xa6)](_0x438ca8,_0x2b0261,_0x4b21c8){const _0x26e9bb=_0x1fee72,_0xa7c4ad={'unitId':_0x438ca8,'threadId':_0x4b21c8},_0x34cc72=await this[_0x26e9bb(0xd8)][_0x26e9bb(0x85)]('/universer-api/comment/unit/'+_0x438ca8+_0x26e9bb(0xba),{'body':_0xa7c4ad}),_0x2accf3=_0x4b21c8[_0x26e9bb(0xe8)](_0x59c2c4=>G(_0x34cc72[_0x26e9bb(0xa7)]['comments'][_0x59c2c4],_0x438ca8,_0x2b0261))[_0x26e9bb(0x7d)](Boolean);return Object[_0x26e9bb(0xe0)](_0x34cc72[_0x26e9bb(0xa7)][_0x26e9bb(0xd5)])[_0x26e9bb(0xde)](_0x4ba9d8=>{const _0x1448c5=_0x26e9bb;this[_0x1448c5(0xae)]['addUser'](_0x4ba9d8);}),_0x2accf3;}[_0x1fee72(0x9a)](_0x1e2b6d){const _0x41782b=_0x1fee72;return{'id':_0x1e2b6d['id'],'threadId':_0x1e2b6d['threadId'],'ref':_0x1e2b6d[_0x41782b(0x9d)]};}};g=x([_(0x0,c[_0x1fee72(0xb8)](P['HTTPService'])),_(0x1,c[_0x1fee72(0xb8)](c[_0x1fee72(0xc1)])),_(0x2,c['Inject'](b[_0x1fee72(0xa8)])),_(0x3,c['Inject'](c[_0x1fee72(0xea)]))],g);var H=Object[_0x1fee72(0xb6)],J=(_0x10d8c9,_0x3a55d9,_0x3844c5,_0x48bc73)=>{const _0x4f4e03=_0x1fee72;for(var _0xe9722=_0x48bc73>0x1?void 0x0:_0x48bc73?H(_0x3a55d9,_0x3844c5):_0x3a55d9,_0x35b6bb=_0x10d8c9[_0x4f4e03(0xc0)]-0x1,_0x4ce478;_0x35b6bb>=0x0;_0x35b6bb--)(_0x4ce478=_0x10d8c9[_0x35b6bb])&&(_0xe9722=_0x4ce478(_0xe9722)||_0xe9722);return _0xe9722;},y=(_0x3e09a3,_0x4eeea0)=>(_0x29477f,_0x2ca6c2)=>_0x4eeea0(_0x29477f,_0x2ca6c2,_0x3e09a3);let C=class extends c[_0x1fee72(0xac)]{constructor(_0x88a75d,_0x1c1332){const _0x5eedf5=_0x1fee72;super(),this[_0x5eedf5(0xb5)]=_0x88a75d,this[_0x5eedf5(0x90)]=_0x1c1332,this[_0x5eedf5(0x8d)]();}[_0x1fee72(0x8d)](){const _0x3e8d2d=_0x1fee72;this[_0x3e8d2d(0xb5)][_0x3e8d2d(0xcd)]=this[_0x3e8d2d(0x90)],this[_0x3e8d2d(0xb5)][_0x3e8d2d(0x8f)]=!0x1;}};C=J([y(0x0,M[_0x1fee72(0xaa)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x1fee72(0x95)],L=Object[_0x1fee72(0xb6)],Z=(_0x16dddf,_0x67aeaa,_0x3dfe7a)=>_0x67aeaa in _0x16dddf?F(_0x16dddf,_0x67aeaa,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3dfe7a}):_0x16dddf[_0x67aeaa]=_0x3dfe7a,W=(_0x553ce,_0x3ebfb8,_0x2f0173,_0x5558a0)=>{for(var _0x5f5206=_0x5558a0>0x1?void 0x0:_0x5558a0?L(_0x3ebfb8,_0x2f0173):_0x3ebfb8,_0x4280ac=_0x553ce['length']-0x1,_0x33f2c2;_0x4280ac>=0x0;_0x4280ac--)(_0x33f2c2=_0x553ce[_0x4280ac])&&(_0x5f5206=_0x33f2c2(_0x5f5206)||_0x5f5206);return _0x5f5206;},O=(_0x46f091,_0x1e36d7)=>(_0x310203,_0x426711)=>_0x1e36d7(_0x310203,_0x426711,_0x46f091),N=(_0x9e3d13,_0x52be39,_0x507673)=>Z(_0x9e3d13,typeof _0x52be39!=_0x1fee72(0xdd)?_0x52be39+'':_0x52be39,_0x507673);exports[_0x1fee72(0x79)]=class extends c[_0x1fee72(0x8a)]{constructor(_0x1f63a6=D,_0x2ecadb,_0x1c67f1){const _0x51535e=_0x1fee72;super(),this[_0x51535e(0xb1)]=_0x1f63a6,this[_0x51535e(0xd6)]=_0x2ecadb,this['_configService']=_0x1c67f1;const {..._0x2c11bf}=c[_0x51535e(0x97)]({},D,this[_0x51535e(0xb1)]);this[_0x51535e(0x8b)][_0x51535e(0xe1)](q,_0x2c11bf);}['onStarting'](){const _0x4fdbba=_0x1fee72;[[g],[C],[p]][_0x4fdbba(0xde)](_0x5da1d7=>{this['_injector']['add'](_0x5da1d7);});}['onReady'](){const _0x2aef12=_0x1fee72;this[_0x2aef12(0xd6)][_0x2aef12(0xf4)](C),this[_0x2aef12(0xd6)]['get'](p);}},N(exports[_0x1fee72(0x79)],_0x1fee72(0xa9),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x1fee72(0x91),c[_0x1fee72(0xab)][_0x1fee72(0x92)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x1fee72(0x7e)](j[_0x1fee72(0xd7)],b['UniverCollaborationClientPlugin'],T[_0x1fee72(0xa2)]),O(0x1,c['Inject'](c[_0x1fee72(0xea)])),O(0x2,c[_0x1fee72(0x80)])],exports[_0x1fee72(0x79)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x15a028=_0x6018;(function(_0x344545,_0x54bf3c){const _0x5091a7=_0x6018,_0x3c2b54=_0x344545();while(!![]){try{const _0x109cc9=-parseInt(_0x5091a7(0x1e8))/0x1*(-parseInt(_0x5091a7(0x203))/0x2)+-parseInt(_0x5091a7(0x24e))/0x3*(-parseInt(_0x5091a7(0x1ed))/0x4)+parseInt(_0x5091a7(0x1ef))/0x5+parseInt(_0x5091a7(0x1ff))/0x6+-parseInt(_0x5091a7(0x234))/0x7+parseInt(_0x5091a7(0x21e))/0x8*(parseInt(_0x5091a7(0x1fd))/0x9)+-parseInt(_0x5091a7(0x1fb))/0xa;if(_0x109cc9===_0x54bf3c)break;else _0x3c2b54['push'](_0x3c2b54['shift']());}catch(_0x3da37d){_0x3c2b54['push'](_0x3c2b54['shift']());}}}(_0x3d91,0xccfa3));import{CommentService as _0x253c4f,CollaborationSessionService as _0x8a85c4,UniverCollaborationClientPlugin as _0x267342}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1782a3}from'@univerjs-pro/license';import{dayjs as _0x35743c,UserManagerService as _0x1f607e,Inject as _0x5cfd2a,Injector as _0x4e2d06,Disposable as _0x4ffcbe,CustomRangeType as _0xe13e7a,UniverInstanceType as _0x4632e5,DependentOn as _0x3b7993,IConfigService as _0x58de89,Plugin as _0x46fc63,merge as _0x5609b0}from'@univerjs/core';function _0x6018(_0x1bc6fa,_0x1311fc){const _0x3d917a=_0x3d91();return _0x6018=function(_0x6018a5,_0x5eff06){_0x6018a5=_0x6018a5-0x1e8;let _0x1b0f32=_0x3d917a[_0x6018a5];return _0x1b0f32;},_0x6018(_0x1bc6fa,_0x1311fc);}import{UniverThreadCommentUIPlugin as _0x3dd618}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x48a5cd,IThreadCommentDataSourceService as _0x34f453}from'@univerjs/thread-comment';import{bufferTime as _0x4ff96d}from'rxjs';import{HTTPService as _0xeb8e79}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x532dc6=>(_0x532dc6[_0x532dc6[_0x15a028(0x232)]=0x0]=_0x15a028(0x232),_0x532dc6[_0x532dc6[_0x15a028(0x241)]=0x1]=_0x15a028(0x241),_0x532dc6[_0x532dc6[_0x15a028(0x224)]=-0x1]=_0x15a028(0x224),_0x532dc6))(I||{}),v=(_0x50ff93=>(_0x50ff93[_0x50ff93['Unknown']=0x0]=_0x15a028(0x1f7),_0x50ff93[_0x50ff93[_0x15a028(0x247)]=0x1]='Add',_0x50ff93[_0x50ff93[_0x15a028(0x218)]=0x2]=_0x15a028(0x218),_0x50ff93[_0x50ff93[_0x15a028(0x23b)]=0x3]=_0x15a028(0x23b),_0x50ff93[_0x50ff93['Delete']=0x4]='Delete',_0x50ff93[_0x50ff93[_0x15a028(0x204)]=0x5]=_0x15a028(0x204),_0x50ff93[_0x50ff93[_0x15a028(0x224)]=-0x1]=_0x15a028(0x224),_0x50ff93))(v||{});const D=_0x122c5b=>_0x35743c(new Date(+_0x122c5b))[_0x15a028(0x1f0)](_0x15a028(0x208)),B=async(_0x37953a,_0x25e775)=>{const _0x139966=_0x15a028,_0x428f4c=_0x37953a[_0x139966(0x222)](_0x1f607e),_0x1dc018=_0x37953a[_0x139966(0x222)](_0xeb8e79);_0x25e775[_0x139966(0x20e)](_0x5b11fe=>{const _0x4a3b7b=_0x139966;_0x428f4c[_0x4a3b7b(0x23d)](_0x5b11fe)&&_0x25e775[_0x4a3b7b(0x242)](_0x5b11fe);}),_0x25e775[_0x139966(0x24d)]&&(await _0x1dc018['get'](_0x139966(0x231),{'params':{'userIDs':[..._0x25e775]}}))[_0x139966(0x220)][_0x139966(0x244)][_0x139966(0x20e)](_0x257f4d=>{const _0x1d2422=_0x139966;_0x257f4d&&_0x428f4c[_0x1d2422(0x239)](_0x257f4d);});};var K=Object[_0x15a028(0x214)],V=(_0x134347,_0x3af775,_0x2bc25b,_0x45798d)=>{for(var _0x47ea62=_0x45798d>0x1?void 0x0:_0x45798d?K(_0x3af775,_0x2bc25b):_0x3af775,_0x1dd33e=_0x134347['length']-0x1,_0x35c777;_0x1dd33e>=0x0;_0x1dd33e--)(_0x35c777=_0x134347[_0x1dd33e])&&(_0x47ea62=_0x35c777(_0x47ea62)||_0x47ea62);return _0x47ea62;},p=(_0x494ebc,_0x526f45)=>(_0x2ac6f2,_0x3c4ff4)=>_0x526f45(_0x2ac6f2,_0x3c4ff4,_0x494ebc);let S=class extends _0x4ffcbe{constructor(_0x452dcd,_0x4e478b,_0x24a489,_0x4f790c){const _0x260497=_0x15a028;super(),this[_0x260497(0x24a)]=_0x452dcd,this[_0x260497(0x205)]=_0x4e478b,this[_0x260497(0x1f6)]=_0x24a489,this[_0x260497(0x206)]=_0x4f790c,this[_0x260497(0x20b)](),this[_0x260497(0x22d)]();}[_0x15a028(0x22d)](){const _0xb98b1f=_0x15a028;this[_0xb98b1f(0x20a)](this['_threadCommentModel'][_0xb98b1f(0x211)]['pipe'](_0x4ff96d(0x10))[_0xb98b1f(0x1e9)](_0x319130=>{const _0x5b53a8=_0xb98b1f,_0x14fbde=new Set();_0x319130['forEach'](_0x4c6202=>{const _0x4a39e3=_0x6018;switch(_0x4c6202[_0x4a39e3(0x229)]){case'add':{const _0x2bf500=_0x4c6202['payload']['personId'];_0x14fbde[_0x4a39e3(0x20c)](_0x2bf500);break;}}}),B(this[_0x5b53a8(0x206)],_0x14fbde);}));}[_0x15a028(0x20b)](){const _0x1db84e=_0x15a028;this[_0x1db84e(0x20a)](this['_commentService'][_0x1db84e(0x211)][_0x1db84e(0x1e9)](async _0x21a53e=>{const _0x4f62eb=_0x1db84e;var _0x4094ea,_0x4359e3,_0x24c7e1,_0x47c369;const _0x558fdc=(_0x4094ea=this[_0x4f62eb(0x205)][_0x4f62eb(0x21a)](_0x21a53e[_0x4f62eb(0x1f8)])[_0x4f62eb(0x219)](_0xab5002=>_0xab5002[_0x4f62eb(0x236)]===_0x21a53e[_0x4f62eb(0x236)]))==null?void 0x0:_0x4094ea['root'];if(!_0x558fdc)return;const {unitId:_0x3223c3,subUnitId:_0x38affb}=_0x558fdc;switch(_0x21a53e[_0x4f62eb(0x1f4)]&&this[_0x4f62eb(0x1f6)][_0x4f62eb(0x239)](_0x21a53e['user']),_0x21a53e['type']){case v[_0x4f62eb(0x247)]:break;case v[_0x4f62eb(0x218)]:{this[_0x4f62eb(0x205)][_0x4f62eb(0x21c)](_0x3223c3,_0x38affb,{'unitId':_0x3223c3,'subUnitId':_0x38affb,'ref':'','id':_0x21a53e[_0x4f62eb(0x1f9)],'dT':D(+_0x21a53e[_0x4f62eb(0x243)]),'threadId':_0x21a53e['threadId'],'personId':(_0x24c7e1=(_0x4359e3=_0x21a53e[_0x4f62eb(0x1f4)])==null?void 0x0:_0x4359e3[_0x4f62eb(0x21d)])!=null?_0x24c7e1:_0x21a53e[_0x4f62eb(0x1fa)],'text':JSON[_0x4f62eb(0x22e)](_0x21a53e[_0x4f62eb(0x215)]),'parentId':_0x558fdc['id']});break;}case v[_0x4f62eb(0x233)]:{const _0x1768b8=this[_0x4f62eb(0x205)][_0x4f62eb(0x207)](_0x3223c3,_0x38affb,_0x21a53e[_0x4f62eb(0x1f9)]);_0x1768b8&&_0x1768b8['parentId']&&this[_0x4f62eb(0x205)][_0x4f62eb(0x23e)](_0x3223c3,_0x38affb,_0x21a53e[_0x4f62eb(0x1f9)]);break;}case v[_0x4f62eb(0x23b)]:{this[_0x4f62eb(0x205)][_0x4f62eb(0x23f)](_0x3223c3,_0x38affb,{'commentId':_0x21a53e[_0x4f62eb(0x1f9)],'text':JSON['parse'](_0x21a53e[_0x4f62eb(0x215)])});break;}case v[_0x4f62eb(0x204)]:{const _0x262cca=(_0x47c369=this[_0x4f62eb(0x205)][_0x4f62eb(0x21a)](_0x21a53e[_0x4f62eb(0x1f8)])['find'](_0x210123=>_0x210123['threadId']===_0x21a53e[_0x4f62eb(0x236)]))==null?void 0x0:_0x47c369[_0x4f62eb(0x210)];_0x262cca&&this[_0x4f62eb(0x205)][_0x4f62eb(0x22f)](_0x3223c3,_0x38affb,_0x262cca['id'],_0x21a53e['solved']===I[_0x4f62eb(0x241)]);break;}}}));}};S=V([p(0x0,_0x5cfd2a(_0x253c4f)),p(0x1,_0x5cfd2a(_0x48a5cd)),p(0x2,_0x5cfd2a(_0x1f607e)),p(0x3,_0x5cfd2a(_0x4e2d06))],S);const z=_0x15a028(0x235),M={};var k=Object[_0x15a028(0x214)],Q=(_0x2dc919,_0x595483,_0x31b92e,_0x39ee5d)=>{const _0xa8dd0b=_0x15a028;for(var _0x37271b=_0x39ee5d>0x1?void 0x0:_0x39ee5d?k(_0x595483,_0x31b92e):_0x595483,_0x5dd6fe=_0x2dc919[_0xa8dd0b(0x227)]-0x1,_0x2623ad;_0x5dd6fe>=0x0;_0x5dd6fe--)(_0x2623ad=_0x2dc919[_0x5dd6fe])&&(_0x37271b=_0x2623ad(_0x37271b)||_0x37271b);return _0x37271b;},_=(_0x1a1b32,_0x45abf3)=>(_0x5d4e69,_0x58729a)=>_0x45abf3(_0x5d4e69,_0x58729a,_0x1a1b32);function X(_0x2471bc,_0xa5d22e){const _0x3cd42b=_0x15a028,_0x571d38=_0x2471bc[_0x3cd42b(0x1f5)][0x0];return{..._0xa5d22e,'id':_0x571d38[_0x3cd42b(0x1f9)],'resolved':_0x2471bc[_0x3cd42b(0x20d)]===0x1,'dT':D(_0x571d38[_0x3cd42b(0x243)]),'personId':_0x571d38[_0x3cd42b(0x1fa)],'threadId':_0x571d38[_0x3cd42b(0x236)]};}function ee(_0x3d672b,_0x29dee3,_0x281431){const _0xfa2551=_0x15a028;var _0x29f862,_0x5a473d;if(((_0x5a473d=(_0x29f862=_0x3d672b==null?void 0x0:_0x3d672b[_0xfa2551(0x1f5)])==null?void 0x0:_0x29f862[_0xfa2551(0x227)])!=null?_0x5a473d:0x0)>0x0){const _0x33acaa=(_0x5f3be4,_0x501372)=>({'id':_0x5f3be4[_0xfa2551(0x1f9)],'threadId':_0x5f3be4[_0xfa2551(0x236)],'dT':D(_0x5f3be4['createTimestamp']),'personId':_0x5f3be4[_0xfa2551(0x1fa)],'resolved':_0x3d672b[_0xfa2551(0x20d)]===I[_0xfa2551(0x241)],'unitId':_0x29dee3,'subUnitId':_0x281431,'text':JSON[_0xfa2551(0x22e)](_0x5f3be4[_0xfa2551(0x215)]),'parentId':_0x501372}),_0x2593e7=_0x33acaa(_0x3d672b[_0xfa2551(0x1f5)][0x0]);return{..._0x2593e7,'children':_0x3d672b[_0xfa2551(0x1f5)]['slice'](0x1)[_0xfa2551(0x230)](_0x15c981=>_0x33acaa(_0x15c981,_0x2593e7['id']))};}return null;}let f=class{constructor(_0x46a7b0,_0x4cf54d,_0x4d1150,_0x3e173f){const _0x1096e3=_0x15a028;this['_httpService']=_0x46a7b0,this[_0x1096e3(0x1f6)]=_0x4cf54d,this[_0x1096e3(0x225)]=_0x4d1150,this['_injector']=_0x3e173f;}async[_0x15a028(0x21c)](_0x1e62d1){const _0x2bc2a2=_0x15a028;var _0x4a6d9c,_0x58cd3f;const {parentId:_0x56762d,unitId:_0x3d17cd,text:_0x32e94d,threadId:_0x1b8ef0}=_0x1e62d1,_0x275e47=(_0x58cd3f=(_0x4a6d9c=_0x32e94d[_0x2bc2a2(0x216)])==null?void 0x0:_0x4a6d9c[_0x2bc2a2(0x202)](_0x142278=>_0x142278[_0x2bc2a2(0x238)]===_0xe13e7a[_0x2bc2a2(0x248)])[_0x2bc2a2(0x230)](_0xbe00bd=>_0xbe00bd[_0x2bc2a2(0x249)]))!=null?_0x58cd3f:[],_0x470e43=JSON[_0x2bc2a2(0x23a)](_0x32e94d),_0x4cdfa5=(await this[_0x2bc2a2(0x225)][_0x2bc2a2(0x228)](_0x3d17cd))['getMemberID']();if(_0x56762d){const _0x5c4a95={'memberId':_0x4cdfa5,'unitId':_0x3d17cd,'content':_0x470e43,'mention':_0x275e47,'threadId':_0x1b8ef0},_0x162044=(await this[_0x2bc2a2(0x1ee)][_0x2bc2a2(0x1eb)]('/universer-api/comment/unit/'+_0x3d17cd+_0x2bc2a2(0x201),{'body':_0x5c4a95}))[_0x2bc2a2(0x220)][_0x2bc2a2(0x1fe)];return{..._0x1e62d1,'id':_0x162044[_0x2bc2a2(0x1f9)],'dT':_0x35743c(+_0x162044[_0x2bc2a2(0x243)])['format'](_0x2bc2a2(0x208)),'personId':_0x162044[_0x2bc2a2(0x1fa)]};}else{const _0x3e9f6d={'memberId':_0x4cdfa5,'unitId':_0x3d17cd,'content':_0x470e43,'mention':_0x275e47},_0x40cf21=await this[_0x2bc2a2(0x1ee)][_0x2bc2a2(0x1eb)](_0x2bc2a2(0x246)+_0x3d17cd+'/add',{'body':_0x3e9f6d});return X(_0x40cf21['body'][_0x2bc2a2(0x212)],_0x1e62d1);}}async['updateComment'](_0x1540be){const _0x506d55=_0x15a028;var _0xd41fd8,_0x30ed62;const {text:_0xd55881,unitId:_0x42ed27}=_0x1540be,_0x3c9b3e=(_0x30ed62=(_0xd41fd8=_0xd55881[_0x506d55(0x216)])==null?void 0x0:_0xd41fd8[_0x506d55(0x202)](_0x143cba=>_0x143cba[_0x506d55(0x238)]===_0xe13e7a[_0x506d55(0x248)])[_0x506d55(0x230)](_0x155e31=>_0x155e31['rangeId']))!=null?_0x30ed62:[],_0x5ef6ef=JSON['stringify'](_0xd55881),_0x5b6e85=_0x1540be[_0x506d55(0x236)],_0x247a28=_0x1540be['id'],_0x3ce71c={'memberId':(await this[_0x506d55(0x225)][_0x506d55(0x228)](_0x42ed27))['getMemberID'](),'unitId':_0x42ed27,'threadId':_0x5b6e85,'mention':_0x3c9b3e,'content':_0x5ef6ef,'replyId':_0x247a28},_0x3ee3b1=await this[_0x506d55(0x1ee)][_0x506d55(0x1eb)]('/universer-api/comment/unit/'+_0x42ed27+_0x506d55(0x209),{'body':_0x3ce71c});return!_0x3ee3b1[_0x506d55(0x220)][_0x506d55(0x217)]||_0x3ee3b1[_0x506d55(0x220)][_0x506d55(0x217)][_0x506d55(0x24b)]===0x1;}async[_0x15a028(0x22f)](_0x47e431){const _0x1bac14=_0x15a028,{unitId:_0x349677}=_0x47e431,_0x35a8cd=_0x47e431['threadId'],_0xf401f6={'memberId':this[_0x1bac14(0x1f6)][_0x1bac14(0x20f)]()[_0x1bac14(0x21d)],'unitId':_0x349677,'threadId':_0x35a8cd,'solved':_0x47e431[_0x1bac14(0x22a)]?I[_0x1bac14(0x241)]:I[_0x1bac14(0x232)]},_0x10ede0=await this['_httpService'][_0x1bac14(0x1eb)](_0x1bac14(0x246)+_0x349677+_0x1bac14(0x240),{'body':_0xf401f6});return!_0x10ede0[_0x1bac14(0x220)][_0x1bac14(0x217)]||_0x10ede0['body'][_0x1bac14(0x217)]['code']===0x1;}async[_0x15a028(0x23e)](_0x13b291,_0x547e19,_0x24df7a,_0x505396){const _0x34822c=_0x15a028,_0x2bd46c={'memberId':(await this['_sessionService'][_0x34822c(0x228)](_0x13b291))[_0x34822c(0x24c)](),'threadId':_0x24df7a,'replyId':_0x505396,'unitId':_0x13b291},_0x18983b=await this['_httpService'][_0x34822c(0x1eb)](_0x34822c(0x246)+_0x13b291+_0x34822c(0x1f3),{'body':_0x2bd46c});return!_0x18983b['body'][_0x34822c(0x217)]||_0x18983b['body'][_0x34822c(0x217)][_0x34822c(0x24b)]===0x1;}async[_0x15a028(0x21b)](_0x4fb704,_0x55465e,_0x4e6b7d){const _0x44e10c=_0x15a028,_0x451e1f={'unitId':_0x4fb704,'threadId':_0x4e6b7d},_0xaae836=await this[_0x44e10c(0x1ee)][_0x44e10c(0x1eb)](_0x44e10c(0x246)+_0x4fb704+_0x44e10c(0x213),{'body':_0x451e1f}),_0x599682=_0x4e6b7d[_0x44e10c(0x230)](_0x2f8663=>ee(_0xaae836['body'][_0x44e10c(0x226)][_0x2f8663],_0x4fb704,_0x55465e))[_0x44e10c(0x202)](Boolean);return Object[_0x44e10c(0x245)](_0xaae836[_0x44e10c(0x220)][_0x44e10c(0x244)])[_0x44e10c(0x20e)](_0x39fce7=>{const _0x4a95bf=_0x44e10c;this['_userService'][_0x4a95bf(0x239)](_0x39fce7);}),_0x599682;}[_0x15a028(0x1f1)](_0x136eea){const _0x49a926=_0x15a028;return{'id':_0x136eea['id'],'threadId':_0x136eea[_0x49a926(0x236)],'ref':_0x136eea[_0x49a926(0x22c)]};}};f=Q([_(0x0,_0x5cfd2a(_0xeb8e79)),_(0x1,_0x5cfd2a(_0x1f607e)),_(0x2,_0x5cfd2a(_0x8a85c4)),_(0x3,_0x5cfd2a(_0x4e2d06))],f);var re=Object[_0x15a028(0x214)],te=(_0x297f5a,_0x383edc,_0x21f41f,_0x44bff1)=>{const _0x372a4a=_0x15a028;for(var _0x3d0fe6=_0x44bff1>0x1?void 0x0:_0x44bff1?re(_0x383edc,_0x21f41f):_0x383edc,_0x1deb8a=_0x297f5a[_0x372a4a(0x227)]-0x1,_0x5bfacc;_0x1deb8a>=0x0;_0x1deb8a--)(_0x5bfacc=_0x297f5a[_0x1deb8a])&&(_0x3d0fe6=_0x5bfacc(_0x3d0fe6)||_0x3d0fe6);return _0x3d0fe6;},N=(_0x42a13c,_0x5afb17)=>(_0x5991b9,_0x30b8d6)=>_0x5afb17(_0x5991b9,_0x30b8d6,_0x42a13c);let g=class extends _0x4ffcbe{constructor(_0xac065,_0x2d5f9a){const _0x3fc0d7=_0x15a028;super(),this[_0x3fc0d7(0x22b)]=_0xac065,this[_0x3fc0d7(0x1f2)]=_0x2d5f9a,this[_0x3fc0d7(0x23c)]();}[_0x15a028(0x23c)](){const _0x390636=_0x15a028;this['_threadCommentDataSourceService'][_0x390636(0x221)]=this[_0x390636(0x1f2)],this[_0x390636(0x22b)][_0x390636(0x21f)]=!0x1;}};g=te([N(0x0,_0x34f453),N(0x1,_0x5cfd2a(f))],g);var se=Object[_0x15a028(0x223)],oe=Object[_0x15a028(0x214)],ne=(_0x4caba2,_0xf1668f,_0x50b268)=>_0xf1668f in _0x4caba2?se(_0x4caba2,_0xf1668f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x50b268}):_0x4caba2[_0xf1668f]=_0x50b268,ie=(_0x4a9327,_0x231092,_0x203039,_0x210d85)=>{const _0x384c27=_0x15a028;for(var _0x4db634=_0x210d85>0x1?void 0x0:_0x210d85?oe(_0x231092,_0x203039):_0x231092,_0x4c5760=_0x4a9327[_0x384c27(0x227)]-0x1,_0x41b266;_0x4c5760>=0x0;_0x4c5760--)(_0x41b266=_0x4a9327[_0x4c5760])&&(_0x4db634=_0x41b266(_0x4db634)||_0x4db634);return _0x4db634;},w=(_0x51bf6b,_0x359e15)=>(_0x2a48bf,_0x4f82e9)=>_0x359e15(_0x2a48bf,_0x4f82e9,_0x51bf6b),$=(_0x36deb2,_0x4a3c14,_0x54282c)=>ne(_0x36deb2,typeof _0x4a3c14!=_0x15a028(0x1ea)?_0x4a3c14+'':_0x4a3c14,_0x54282c);let b=class extends _0x46fc63{constructor(_0x208264=M,_0x383125,_0x12c1ee){const _0x5e708c=_0x15a028;super(),this[_0x5e708c(0x1ec)]=_0x208264,this[_0x5e708c(0x206)]=_0x383125,this[_0x5e708c(0x237)]=_0x12c1ee;const {..._0x204bc9}=_0x5609b0({},M,this[_0x5e708c(0x1ec)]);this[_0x5e708c(0x237)]['setConfig'](z,_0x204bc9);}[_0x15a028(0x1fc)](){const _0x343e31=_0x15a028;[[f],[g],[S]][_0x343e31(0x20e)](_0x17c3fb=>{const _0x3b3475=_0x343e31;this[_0x3b3475(0x206)]['add'](_0x17c3fb);});}['onReady'](){const _0x555ca7=_0x15a028;this[_0x555ca7(0x206)]['get'](g),this[_0x555ca7(0x206)][_0x555ca7(0x222)](S);}};$(b,'pluginName',W),$(b,_0x15a028(0x229),_0x4632e5[_0x15a028(0x200)]),b=ie([_0x3b7993(_0x3dd618,_0x267342,_0x1782a3),w(0x1,_0x5cfd2a(_0x4e2d06)),w(0x2,_0x58de89)],b);function _0x3d91(){const _0x2a5ca8=['60XKBcEi','_httpService','6312770ThZRQA','format','saveCommentToSnapshot','_threadCommentDataSource','/delete','user','replies','_userService','Unknown','unitId','replyId','userId','30147620cxmuVf','onStarting','6102KmNmPP','reply','6702282XfFiIl','UNIVER_UNKNOWN','/reply','filter','2MqYPUF','Solve','_threadCommentModel','_injector','getComment','YYYY/MM/DD\x20HH:mm','/edit','disposeWithMe','_init','add','solved','forEach','getCurrentUser','root','commentUpdate$','comment','/list','getOwnPropertyDescriptor','content','customRanges','error','Reply','find','getUnit','listComments','addComment','userID','6128nhZOdV','syncUpdateMutationToColla','body','dataSource','get','defineProperty','UNRECOGNIZED','_sessionService','comments','length','requireSession','type','resolved','_threadCommentDataSourceService','ref','_initUserSync','parse','resolveComment','map','/universer-api/user/list','OpenOrReOpen','Delete','1138032zoXGOq','thread-comment-data-source.config','threadId','_configService','rangeType','addUser','stringify','Edit','_initDataSource','getUser','deleteComment','updateComment','/solved','Solved','delete','createTimestamp','users','values','/universer-api/comment/unit/','Add','COMMENT','rangeId','_commentService','code','getMemberID','size','185937OQYARM','188291ezGVyn','subscribe','symbol','post','_config'];_0x3d91=function(){return _0x2a5ca8;};return _0x3d91();}export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x2feed8=_0x2a60;(function(_0x7fdb15,_0x3526ac){const _0x2934c9=_0x2a60,_0xa0563f=_0x7fdb15();while(!![]){try{const _0x5160ec=parseInt(_0x2934c9(0xae))/0x1*(parseInt(_0x2934c9(0x85))/0x2)+-parseInt(_0x2934c9(0xb2))/0x3*(parseInt(_0x2934c9(0x88))/0x4)+parseInt(_0x2934c9(0xcd))/0x5+-parseInt(_0x2934c9(0xe5))/0x6*(-parseInt(_0x2934c9(0xe4))/0x7)+-parseInt(_0x2934c9(0xe7))/0x8+parseInt(_0x2934c9(0xa3))/0x9+parseInt(_0x2934c9(0x9a))/0xa*(parseInt(_0x2934c9(0xc7))/0xb);if(_0x5160ec===_0x3526ac)break;else _0xa0563f['push'](_0xa0563f['shift']());}catch(_0x3ce4ed){_0xa0563f['push'](_0xa0563f['shift']());}}}(_0x4351,0x30e15));import{CommentService as _0x5a2656,CollaborationSessionService as _0x2f0330,UniverCollaborationClientPlugin as _0x2dcecf}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4d02c6}from'@univerjs-pro/license';import{dayjs as _0x4e076,UserManagerService as _0x291cc2,Inject as _0x54b547,Injector as _0x384bd7,Disposable as _0x4047dc,CustomRangeType as _0x377b33,UniverInstanceType as _0x5accf4,DependentOn as _0x1d2fba,IConfigService as _0x1edf32,Plugin as _0x2b2314,merge as _0x22d1b9}from'@univerjs/core';function _0x2a60(_0x1b8a47,_0x32daa3){const _0x435106=_0x4351();return _0x2a60=function(_0x2a6039,_0x202f71){_0x2a6039=_0x2a6039-0x82;let _0x2fb238=_0x435106[_0x2a6039];return _0x2fb238;},_0x2a60(_0x1b8a47,_0x32daa3);}import{UniverThreadCommentUIPlugin as _0x45d87a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4b30f9,IThreadCommentDataSourceService as _0x565532}from'@univerjs/thread-comment';import{bufferTime as _0x552255}from'rxjs';import{HTTPService as _0x14f5c7}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xbea222=>(_0xbea222[_0xbea222['OpenOrReOpen']=0x0]=_0x2feed8(0xd1),_0xbea222[_0xbea222[_0x2feed8(0x9c)]=0x1]=_0x2feed8(0x9c),_0xbea222[_0xbea222[_0x2feed8(0xac)]=-0x1]=_0x2feed8(0xac),_0xbea222))(I||{}),v=(_0x598372=>(_0x598372[_0x598372['Unknown']=0x0]=_0x2feed8(0xc4),_0x598372[_0x598372[_0x2feed8(0xca)]=0x1]='Add',_0x598372[_0x598372[_0x2feed8(0xcb)]=0x2]=_0x2feed8(0xcb),_0x598372[_0x598372[_0x2feed8(0x8e)]=0x3]=_0x2feed8(0x8e),_0x598372[_0x598372[_0x2feed8(0xa6)]=0x4]=_0x2feed8(0xa6),_0x598372[_0x598372[_0x2feed8(0xc5)]=0x5]=_0x2feed8(0xc5),_0x598372[_0x598372[_0x2feed8(0xac)]=-0x1]=_0x2feed8(0xac),_0x598372))(v||{});const D=_0xb3e74f=>_0x4e076(new Date(+_0xb3e74f))[_0x2feed8(0x98)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x18046d,_0x376c60)=>{const _0x5ce614=_0x2feed8,_0x211240=_0x18046d[_0x5ce614(0x90)](_0x291cc2),_0x4bcdca=_0x18046d[_0x5ce614(0x90)](_0x14f5c7);_0x376c60['forEach'](_0x3260fd=>{const _0x24e318=_0x5ce614;_0x211240['getUser'](_0x3260fd)&&_0x376c60[_0x24e318(0xa5)](_0x3260fd);}),_0x376c60['size']&&(await _0x4bcdca[_0x5ce614(0x90)](_0x5ce614(0x89),{'params':{'userIDs':[..._0x376c60]}}))[_0x5ce614(0xbe)][_0x5ce614(0xde)][_0x5ce614(0xb3)](_0x4c8d00=>{const _0x10a24d=_0x5ce614;_0x4c8d00&&_0x211240[_0x10a24d(0x9f)](_0x4c8d00);});};var K=Object[_0x2feed8(0x86)],V=(_0x1a8a70,_0x31485f,_0x170fea,_0x38f566)=>{const _0x430e03=_0x2feed8;for(var _0x585e33=_0x38f566>0x1?void 0x0:_0x38f566?K(_0x31485f,_0x170fea):_0x31485f,_0x25315f=_0x1a8a70[_0x430e03(0xbd)]-0x1,_0x1680ba;_0x25315f>=0x0;_0x25315f--)(_0x1680ba=_0x1a8a70[_0x25315f])&&(_0x585e33=_0x1680ba(_0x585e33)||_0x585e33);return _0x585e33;},p=(_0x26b951,_0x2b41f4)=>(_0x4e2f93,_0x30f46)=>_0x2b41f4(_0x4e2f93,_0x30f46,_0x26b951);let S=class extends _0x4047dc{constructor(_0x588d53,_0x52babf,_0x1d6a0c,_0x4d62f7){const _0x5eac6c=_0x2feed8;super(),this[_0x5eac6c(0x8f)]=_0x588d53,this['_threadCommentModel']=_0x52babf,this['_userService']=_0x1d6a0c,this[_0x5eac6c(0xd2)]=_0x4d62f7,this[_0x5eac6c(0x96)](),this[_0x5eac6c(0xe6)]();}[_0x2feed8(0xe6)](){const _0x56cdfb=_0x2feed8;this['disposeWithMe'](this[_0x56cdfb(0x83)][_0x56cdfb(0xdd)][_0x56cdfb(0xb8)](_0x552255(0x10))[_0x56cdfb(0xb6)](_0xb16343=>{const _0x18c978=_0x56cdfb,_0x57743f=new Set();_0xb16343[_0x18c978(0xb3)](_0xa583b2=>{const _0x44d436=_0x18c978;switch(_0xa583b2[_0x44d436(0xc6)]){case _0x44d436(0xc8):{const _0x33ff68=_0xa583b2[_0x44d436(0x91)][_0x44d436(0xdb)];_0x57743f[_0x44d436(0xc8)](_0x33ff68);break;}}}),B(this[_0x18c978(0xd2)],_0x57743f);}));}['_init'](){const _0x2fd0b9=_0x2feed8;this[_0x2fd0b9(0xd0)](this[_0x2fd0b9(0x8f)]['commentUpdate$'][_0x2fd0b9(0xb6)](async _0x2aef85=>{const _0x8e06c4=_0x2fd0b9;var _0x216195,_0x421d70,_0x53c674,_0x220ea3;const _0x502cd0=(_0x216195=this[_0x8e06c4(0x83)][_0x8e06c4(0xad)](_0x2aef85[_0x8e06c4(0x8c)])[_0x8e06c4(0x8b)](_0x19ef31=>_0x19ef31['threadId']===_0x2aef85[_0x8e06c4(0x8d)]))==null?void 0x0:_0x216195[_0x8e06c4(0xcf)];if(!_0x502cd0)return;const {unitId:_0x2b3fd9,subUnitId:_0x2ff9ab}=_0x502cd0;switch(_0x2aef85[_0x8e06c4(0xc1)]&&this[_0x8e06c4(0xdf)]['addUser'](_0x2aef85['user']),_0x2aef85[_0x8e06c4(0xc6)]){case v[_0x8e06c4(0xca)]:break;case v['Reply']:{this[_0x8e06c4(0x83)][_0x8e06c4(0xa8)](_0x2b3fd9,_0x2ff9ab,{'unitId':_0x2b3fd9,'subUnitId':_0x2ff9ab,'ref':'','id':_0x2aef85[_0x8e06c4(0xd3)],'dT':D(+_0x2aef85[_0x8e06c4(0xb7)]),'threadId':_0x2aef85[_0x8e06c4(0x8d)],'personId':(_0x53c674=(_0x421d70=_0x2aef85[_0x8e06c4(0xc1)])==null?void 0x0:_0x421d70[_0x8e06c4(0xc2)])!=null?_0x53c674:_0x2aef85[_0x8e06c4(0xb1)],'text':JSON['parse'](_0x2aef85[_0x8e06c4(0xe3)]),'parentId':_0x502cd0['id']});break;}case v[_0x8e06c4(0xa6)]:{const _0x570b22=this['_threadCommentModel'][_0x8e06c4(0xa0)](_0x2b3fd9,_0x2ff9ab,_0x2aef85[_0x8e06c4(0xd3)]);_0x570b22&&_0x570b22[_0x8e06c4(0x87)]&&this['_threadCommentModel'][_0x8e06c4(0xba)](_0x2b3fd9,_0x2ff9ab,_0x2aef85[_0x8e06c4(0xd3)]);break;}case v[_0x8e06c4(0x8e)]:{this[_0x8e06c4(0x83)][_0x8e06c4(0xda)](_0x2b3fd9,_0x2ff9ab,{'commentId':_0x2aef85[_0x8e06c4(0xd3)],'text':JSON[_0x8e06c4(0xb5)](_0x2aef85['content'])});break;}case v[_0x8e06c4(0xc5)]:{const _0x45b97a=(_0x220ea3=this[_0x8e06c4(0x83)][_0x8e06c4(0xad)](_0x2aef85['unitId'])['find'](_0x2924f3=>_0x2924f3['threadId']===_0x2aef85[_0x8e06c4(0x8d)]))==null?void 0x0:_0x220ea3[_0x8e06c4(0xcf)];_0x45b97a&&this[_0x8e06c4(0x83)][_0x8e06c4(0xe0)](_0x2b3fd9,_0x2ff9ab,_0x45b97a['id'],_0x2aef85[_0x8e06c4(0x82)]===I[_0x8e06c4(0x9c)]);break;}}}));}};S=V([p(0x0,_0x54b547(_0x5a2656)),p(0x1,_0x54b547(_0x4b30f9)),p(0x2,_0x54b547(_0x291cc2)),p(0x3,_0x54b547(_0x384bd7))],S);const z=_0x2feed8(0xa1),M={};function _0x4351(){const _0x935751=['getMemberID','length','body','filter','/edit','user','userID','YYYY/MM/DD\x20HH:mm','Unknown','Solve','type','615252hQqndQ','add','error','Add','Reply','values','112150WmVQvt','reply','root','disposeWithMe','OpenOrReOpen','_injector','replyId','/reply','map','_configService','resolved','listComments','_initDataSource','updateComment','personId','requireSession','commentUpdate$','users','_userService','resolveComment','comments','rangeType','content','872165aSQcWN','6arjOGR','_initUserSync','2828224fsrsuh','solved','_threadCommentModel','symbol','3830qOWmTP','getOwnPropertyDescriptor','parentId','32PvrtbB','/universer-api/user/list','UNIVER_UNKNOWN','find','unitId','threadId','Edit','_commentService','get','payload','code','comment','saveCommentToSnapshot','rangeId','_init','_config','format','ref','40ScHZAm','post','Solved','_sessionService','syncUpdateMutationToColla','addUser','getComment','thread-comment-data-source.config','setConfig','2276586GRFUYV','replies','delete','Delete','_httpService','addComment','getCurrentUser','COMMENT','_threadCommentDataSourceService','UNRECOGNIZED','getUnit','110CtxiaH','stringify','onStarting','userId','105231RDyLJm','forEach','customRanges','parse','subscribe','createTimestamp','pipe','pluginName','deleteComment','/universer-api/comment/unit/'];_0x4351=function(){return _0x935751;};return _0x4351();}var k=Object['getOwnPropertyDescriptor'],Q=(_0x2aedc3,_0x59a3b9,_0x47527d,_0x4e3f07)=>{const _0x163bb6=_0x2feed8;for(var _0x2a9616=_0x4e3f07>0x1?void 0x0:_0x4e3f07?k(_0x59a3b9,_0x47527d):_0x59a3b9,_0x6b13a=_0x2aedc3[_0x163bb6(0xbd)]-0x1,_0x5cfccd;_0x6b13a>=0x0;_0x6b13a--)(_0x5cfccd=_0x2aedc3[_0x6b13a])&&(_0x2a9616=_0x5cfccd(_0x2a9616)||_0x2a9616);return _0x2a9616;},_=(_0x25e7d6,_0x34fcf4)=>(_0x23d8af,_0x4b5f41)=>_0x34fcf4(_0x23d8af,_0x4b5f41,_0x25e7d6);function X(_0x9c281f,_0x572910){const _0x59e95a=_0x2feed8,_0x867b4=_0x9c281f[_0x59e95a(0xa4)][0x0];return{..._0x572910,'id':_0x867b4[_0x59e95a(0xd3)],'resolved':_0x9c281f['solved']===0x1,'dT':D(_0x867b4[_0x59e95a(0xb7)]),'personId':_0x867b4['userId'],'threadId':_0x867b4[_0x59e95a(0x8d)]};}function ee(_0x575844,_0x398e93,_0x393516){const _0x2dfa51=_0x2feed8;var _0x16aa30,_0x4eb052;if(((_0x4eb052=(_0x16aa30=_0x575844==null?void 0x0:_0x575844['replies'])==null?void 0x0:_0x16aa30['length'])!=null?_0x4eb052:0x0)>0x0){const _0x52330b=(_0x529097,_0x5dae17)=>({'id':_0x529097[_0x2dfa51(0xd3)],'threadId':_0x529097[_0x2dfa51(0x8d)],'dT':D(_0x529097[_0x2dfa51(0xb7)]),'personId':_0x529097['userId'],'resolved':_0x575844['solved']===I['Solved'],'unitId':_0x398e93,'subUnitId':_0x393516,'text':JSON[_0x2dfa51(0xb5)](_0x529097['content']),'parentId':_0x5dae17}),_0xe699e8=_0x52330b(_0x575844[_0x2dfa51(0xa4)][0x0]);return{..._0xe699e8,'children':_0x575844[_0x2dfa51(0xa4)]['slice'](0x1)[_0x2dfa51(0xd5)](_0x5e75af=>_0x52330b(_0x5e75af,_0xe699e8['id']))};}return null;}let f=class{constructor(_0x303c09,_0x173239,_0x5a8dca,_0x1722e0){const _0x2f9b9c=_0x2feed8;this[_0x2f9b9c(0xa7)]=_0x303c09,this[_0x2f9b9c(0xdf)]=_0x173239,this[_0x2f9b9c(0x9d)]=_0x5a8dca,this[_0x2f9b9c(0xd2)]=_0x1722e0;}async[_0x2feed8(0xa8)](_0x401d60){const _0x3f0322=_0x2feed8;var _0x5e66b2,_0x37ff68;const {parentId:_0x48486b,unitId:_0x257766,text:_0xa4bcc1,threadId:_0x4bc5d1}=_0x401d60,_0x12a499=(_0x37ff68=(_0x5e66b2=_0xa4bcc1[_0x3f0322(0xb4)])==null?void 0x0:_0x5e66b2['filter'](_0x537a9f=>_0x537a9f['rangeType']===_0x377b33[_0x3f0322(0xaa)])[_0x3f0322(0xd5)](_0x168b62=>_0x168b62[_0x3f0322(0x95)]))!=null?_0x37ff68:[],_0x2ed0f3=JSON[_0x3f0322(0xaf)](_0xa4bcc1),_0x42a02a=(await this[_0x3f0322(0x9d)][_0x3f0322(0xdc)](_0x257766))[_0x3f0322(0xbc)]();if(_0x48486b){const _0xd8bc64={'memberId':_0x42a02a,'unitId':_0x257766,'content':_0x2ed0f3,'mention':_0x12a499,'threadId':_0x4bc5d1},_0x207a2e=(await this[_0x3f0322(0xa7)][_0x3f0322(0x9b)](_0x3f0322(0xbb)+_0x257766+_0x3f0322(0xd4),{'body':_0xd8bc64}))[_0x3f0322(0xbe)][_0x3f0322(0xce)];return{..._0x401d60,'id':_0x207a2e[_0x3f0322(0xd3)],'dT':_0x4e076(+_0x207a2e[_0x3f0322(0xb7)])[_0x3f0322(0x98)](_0x3f0322(0xc3)),'personId':_0x207a2e[_0x3f0322(0xb1)]};}else{const _0x17666c={'memberId':_0x42a02a,'unitId':_0x257766,'content':_0x2ed0f3,'mention':_0x12a499},_0x5205be=await this['_httpService'][_0x3f0322(0x9b)](_0x3f0322(0xbb)+_0x257766+'/add',{'body':_0x17666c});return X(_0x5205be[_0x3f0322(0xbe)][_0x3f0322(0x93)],_0x401d60);}}async[_0x2feed8(0xda)](_0x42f97f){const _0x8421f6=_0x2feed8;var _0x1bf642,_0x19522b;const {text:_0x1d9105,unitId:_0x493233}=_0x42f97f,_0x2d68ec=(_0x19522b=(_0x1bf642=_0x1d9105['customRanges'])==null?void 0x0:_0x1bf642[_0x8421f6(0xbf)](_0x5c28ff=>_0x5c28ff[_0x8421f6(0xe2)]===_0x377b33[_0x8421f6(0xaa)])[_0x8421f6(0xd5)](_0xb432d9=>_0xb432d9[_0x8421f6(0x95)]))!=null?_0x19522b:[],_0x2424f5=JSON[_0x8421f6(0xaf)](_0x1d9105),_0x4f1221=_0x42f97f[_0x8421f6(0x8d)],_0x8ec8f6=_0x42f97f['id'],_0x39c3f2={'memberId':(await this[_0x8421f6(0x9d)][_0x8421f6(0xdc)](_0x493233))['getMemberID'](),'unitId':_0x493233,'threadId':_0x4f1221,'mention':_0x2d68ec,'content':_0x2424f5,'replyId':_0x8ec8f6},_0x5a6932=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x493233+_0x8421f6(0xc0),{'body':_0x39c3f2});return!_0x5a6932[_0x8421f6(0xbe)][_0x8421f6(0xc9)]||_0x5a6932[_0x8421f6(0xbe)][_0x8421f6(0xc9)][_0x8421f6(0x92)]===0x1;}async[_0x2feed8(0xe0)](_0x1b21d7){const _0x5c8778=_0x2feed8,{unitId:_0x316769}=_0x1b21d7,_0x1129f8=_0x1b21d7[_0x5c8778(0x8d)],_0x534868={'memberId':this[_0x5c8778(0xdf)][_0x5c8778(0xa9)]()[_0x5c8778(0xc2)],'unitId':_0x316769,'threadId':_0x1129f8,'solved':_0x1b21d7[_0x5c8778(0xd7)]?I[_0x5c8778(0x9c)]:I[_0x5c8778(0xd1)]},_0x17147d=await this[_0x5c8778(0xa7)][_0x5c8778(0x9b)]('/universer-api/comment/unit/'+_0x316769+'/solved',{'body':_0x534868});return!_0x17147d['body'][_0x5c8778(0xc9)]||_0x17147d[_0x5c8778(0xbe)][_0x5c8778(0xc9)]['code']===0x1;}async[_0x2feed8(0xba)](_0x2d3247,_0x12bf58,_0x518f7f,_0x5750c5){const _0x5aaab1=_0x2feed8,_0x23f640={'memberId':(await this['_sessionService'][_0x5aaab1(0xdc)](_0x2d3247))[_0x5aaab1(0xbc)](),'threadId':_0x518f7f,'replyId':_0x5750c5,'unitId':_0x2d3247},_0x9dc52c=await this[_0x5aaab1(0xa7)][_0x5aaab1(0x9b)]('/universer-api/comment/unit/'+_0x2d3247+'/delete',{'body':_0x23f640});return!_0x9dc52c['body'][_0x5aaab1(0xc9)]||_0x9dc52c[_0x5aaab1(0xbe)][_0x5aaab1(0xc9)][_0x5aaab1(0x92)]===0x1;}async[_0x2feed8(0xd8)](_0x1affdc,_0x220a7a,_0x18918e){const _0xf68fba=_0x2feed8,_0x5f27a7={'unitId':_0x1affdc,'threadId':_0x18918e},_0x504561=await this[_0xf68fba(0xa7)]['post'](_0xf68fba(0xbb)+_0x1affdc+'/list',{'body':_0x5f27a7}),_0x541393=_0x18918e[_0xf68fba(0xd5)](_0x3150ce=>ee(_0x504561['body'][_0xf68fba(0xe1)][_0x3150ce],_0x1affdc,_0x220a7a))[_0xf68fba(0xbf)](Boolean);return Object[_0xf68fba(0xcc)](_0x504561[_0xf68fba(0xbe)][_0xf68fba(0xde)])[_0xf68fba(0xb3)](_0x231657=>{const _0x5557f1=_0xf68fba;this[_0x5557f1(0xdf)][_0x5557f1(0x9f)](_0x231657);}),_0x541393;}[_0x2feed8(0x94)](_0x1a9fa7){const _0x35532c=_0x2feed8;return{'id':_0x1a9fa7['id'],'threadId':_0x1a9fa7['threadId'],'ref':_0x1a9fa7[_0x35532c(0x99)]};}};f=Q([_(0x0,_0x54b547(_0x14f5c7)),_(0x1,_0x54b547(_0x291cc2)),_(0x2,_0x54b547(_0x2f0330)),_(0x3,_0x54b547(_0x384bd7))],f);var re=Object[_0x2feed8(0x86)],te=(_0x28c9ba,_0x12440a,_0x42355e,_0x278fcc)=>{const _0x3b62a3=_0x2feed8;for(var _0x4fc92a=_0x278fcc>0x1?void 0x0:_0x278fcc?re(_0x12440a,_0x42355e):_0x12440a,_0x3e6f29=_0x28c9ba[_0x3b62a3(0xbd)]-0x1,_0x2e5ca4;_0x3e6f29>=0x0;_0x3e6f29--)(_0x2e5ca4=_0x28c9ba[_0x3e6f29])&&(_0x4fc92a=_0x2e5ca4(_0x4fc92a)||_0x4fc92a);return _0x4fc92a;},N=(_0x5169db,_0x48cf87)=>(_0x376115,_0x1e8bfb)=>_0x48cf87(_0x376115,_0x1e8bfb,_0x5169db);let g=class extends _0x4047dc{constructor(_0x3c9d78,_0x17dcde){const _0x2fb7b6=_0x2feed8;super(),this[_0x2fb7b6(0xab)]=_0x3c9d78,this['_threadCommentDataSource']=_0x17dcde,this[_0x2fb7b6(0xd9)]();}[_0x2feed8(0xd9)](){const _0x31f800=_0x2feed8;this[_0x31f800(0xab)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x31f800(0x9e)]=!0x1;}};g=te([N(0x0,_0x565532),N(0x1,_0x54b547(f))],g);var se=Object['defineProperty'],oe=Object[_0x2feed8(0x86)],ne=(_0xab68f5,_0x4a1cf2,_0x40cd4e)=>_0x4a1cf2 in _0xab68f5?se(_0xab68f5,_0x4a1cf2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x40cd4e}):_0xab68f5[_0x4a1cf2]=_0x40cd4e,ie=(_0x552fbf,_0xcc4d30,_0x337a28,_0x3c4178)=>{const _0x510033=_0x2feed8;for(var _0x57ce91=_0x3c4178>0x1?void 0x0:_0x3c4178?oe(_0xcc4d30,_0x337a28):_0xcc4d30,_0x28ae3d=_0x552fbf[_0x510033(0xbd)]-0x1,_0x3dec37;_0x28ae3d>=0x0;_0x28ae3d--)(_0x3dec37=_0x552fbf[_0x28ae3d])&&(_0x57ce91=_0x3dec37(_0x57ce91)||_0x57ce91);return _0x57ce91;},w=(_0x501066,_0x7e3906)=>(_0x573cda,_0x501475)=>_0x7e3906(_0x573cda,_0x501475,_0x501066),$=(_0x1595a3,_0x50f633,_0x4cfd0d)=>ne(_0x1595a3,typeof _0x50f633!=_0x2feed8(0x84)?_0x50f633+'':_0x50f633,_0x4cfd0d);let b=class extends _0x2b2314{constructor(_0x536fc7=M,_0x370212,_0x1bbdc9){const _0x4c2fdd=_0x2feed8;super(),this[_0x4c2fdd(0x97)]=_0x536fc7,this[_0x4c2fdd(0xd2)]=_0x370212,this['_configService']=_0x1bbdc9;const {..._0x441adb}=_0x22d1b9({},M,this[_0x4c2fdd(0x97)]);this[_0x4c2fdd(0xd6)][_0x4c2fdd(0xa2)](z,_0x441adb);}[_0x2feed8(0xb0)](){const _0xefbef1=_0x2feed8;[[f],[g],[S]][_0xefbef1(0xb3)](_0x19177b=>{const _0x17c533=_0xefbef1;this['_injector'][_0x17c533(0xc8)](_0x19177b);});}['onReady'](){const _0x9990ff=_0x2feed8;this[_0x9990ff(0xd2)][_0x9990ff(0x90)](g),this[_0x9990ff(0xd2)][_0x9990ff(0x90)](S);}};$(b,_0x2feed8(0xb9),W),$(b,_0x2feed8(0xc6),_0x5accf4[_0x2feed8(0x8a)]),b=ie([_0x1d2fba(_0x45d87a,_0x2dcecf,_0x4d02c6),w(0x1,_0x54b547(_0x384bd7)),w(0x2,_0x1edf32)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x15a028=_0x6018;(function(_0x344545,_0x54bf3c){const _0x5091a7=_0x6018,_0x3c2b54=_0x344545();while(!![]){try{const _0x109cc9=-parseInt(_0x5091a7(0x1e8))/0x1*(-parseInt(_0x5091a7(0x203))/0x2)+-parseInt(_0x5091a7(0x24e))/0x3*(-parseInt(_0x5091a7(0x1ed))/0x4)+parseInt(_0x5091a7(0x1ef))/0x5+parseInt(_0x5091a7(0x1ff))/0x6+-parseInt(_0x5091a7(0x234))/0x7+parseInt(_0x5091a7(0x21e))/0x8*(parseInt(_0x5091a7(0x1fd))/0x9)+-parseInt(_0x5091a7(0x1fb))/0xa;if(_0x109cc9===_0x54bf3c)break;else _0x3c2b54['push'](_0x3c2b54['shift']());}catch(_0x3da37d){_0x3c2b54['push'](_0x3c2b54['shift']());}}}(_0x3d91,0xccfa3));import{CommentService as _0x253c4f,CollaborationSessionService as _0x8a85c4,UniverCollaborationClientPlugin as _0x267342}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1782a3}from'@univerjs-pro/license';import{dayjs as _0x35743c,UserManagerService as _0x1f607e,Inject as _0x5cfd2a,Injector as _0x4e2d06,Disposable as _0x4ffcbe,CustomRangeType as _0xe13e7a,UniverInstanceType as _0x4632e5,DependentOn as _0x3b7993,IConfigService as _0x58de89,Plugin as _0x46fc63,merge as _0x5609b0}from'@univerjs/core';function _0x6018(_0x1bc6fa,_0x1311fc){const _0x3d917a=_0x3d91();return _0x6018=function(_0x6018a5,_0x5eff06){_0x6018a5=_0x6018a5-0x1e8;let _0x1b0f32=_0x3d917a[_0x6018a5];return _0x1b0f32;},_0x6018(_0x1bc6fa,_0x1311fc);}import{UniverThreadCommentUIPlugin as _0x3dd618}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x48a5cd,IThreadCommentDataSourceService as _0x34f453}from'@univerjs/thread-comment';import{bufferTime as _0x4ff96d}from'rxjs';import{HTTPService as _0xeb8e79}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x532dc6=>(_0x532dc6[_0x532dc6[_0x15a028(0x232)]=0x0]=_0x15a028(0x232),_0x532dc6[_0x532dc6[_0x15a028(0x241)]=0x1]=_0x15a028(0x241),_0x532dc6[_0x532dc6[_0x15a028(0x224)]=-0x1]=_0x15a028(0x224),_0x532dc6))(I||{}),v=(_0x50ff93=>(_0x50ff93[_0x50ff93['Unknown']=0x0]=_0x15a028(0x1f7),_0x50ff93[_0x50ff93[_0x15a028(0x247)]=0x1]='Add',_0x50ff93[_0x50ff93[_0x15a028(0x218)]=0x2]=_0x15a028(0x218),_0x50ff93[_0x50ff93[_0x15a028(0x23b)]=0x3]=_0x15a028(0x23b),_0x50ff93[_0x50ff93['Delete']=0x4]='Delete',_0x50ff93[_0x50ff93[_0x15a028(0x204)]=0x5]=_0x15a028(0x204),_0x50ff93[_0x50ff93[_0x15a028(0x224)]=-0x1]=_0x15a028(0x224),_0x50ff93))(v||{});const D=_0x122c5b=>_0x35743c(new Date(+_0x122c5b))[_0x15a028(0x1f0)](_0x15a028(0x208)),B=async(_0x37953a,_0x25e775)=>{const _0x139966=_0x15a028,_0x428f4c=_0x37953a[_0x139966(0x222)](_0x1f607e),_0x1dc018=_0x37953a[_0x139966(0x222)](_0xeb8e79);_0x25e775[_0x139966(0x20e)](_0x5b11fe=>{const _0x4a3b7b=_0x139966;_0x428f4c[_0x4a3b7b(0x23d)](_0x5b11fe)&&_0x25e775[_0x4a3b7b(0x242)](_0x5b11fe);}),_0x25e775[_0x139966(0x24d)]&&(await _0x1dc018['get'](_0x139966(0x231),{'params':{'userIDs':[..._0x25e775]}}))[_0x139966(0x220)][_0x139966(0x244)][_0x139966(0x20e)](_0x257f4d=>{const _0x1d2422=_0x139966;_0x257f4d&&_0x428f4c[_0x1d2422(0x239)](_0x257f4d);});};var K=Object[_0x15a028(0x214)],V=(_0x134347,_0x3af775,_0x2bc25b,_0x45798d)=>{for(var _0x47ea62=_0x45798d>0x1?void 0x0:_0x45798d?K(_0x3af775,_0x2bc25b):_0x3af775,_0x1dd33e=_0x134347['length']-0x1,_0x35c777;_0x1dd33e>=0x0;_0x1dd33e--)(_0x35c777=_0x134347[_0x1dd33e])&&(_0x47ea62=_0x35c777(_0x47ea62)||_0x47ea62);return _0x47ea62;},p=(_0x494ebc,_0x526f45)=>(_0x2ac6f2,_0x3c4ff4)=>_0x526f45(_0x2ac6f2,_0x3c4ff4,_0x494ebc);let S=class extends _0x4ffcbe{constructor(_0x452dcd,_0x4e478b,_0x24a489,_0x4f790c){const _0x260497=_0x15a028;super(),this[_0x260497(0x24a)]=_0x452dcd,this[_0x260497(0x205)]=_0x4e478b,this[_0x260497(0x1f6)]=_0x24a489,this[_0x260497(0x206)]=_0x4f790c,this[_0x260497(0x20b)](),this[_0x260497(0x22d)]();}[_0x15a028(0x22d)](){const _0xb98b1f=_0x15a028;this[_0xb98b1f(0x20a)](this['_threadCommentModel'][_0xb98b1f(0x211)]['pipe'](_0x4ff96d(0x10))[_0xb98b1f(0x1e9)](_0x319130=>{const _0x5b53a8=_0xb98b1f,_0x14fbde=new Set();_0x319130['forEach'](_0x4c6202=>{const _0x4a39e3=_0x6018;switch(_0x4c6202[_0x4a39e3(0x229)]){case'add':{const _0x2bf500=_0x4c6202['payload']['personId'];_0x14fbde[_0x4a39e3(0x20c)](_0x2bf500);break;}}}),B(this[_0x5b53a8(0x206)],_0x14fbde);}));}[_0x15a028(0x20b)](){const _0x1db84e=_0x15a028;this[_0x1db84e(0x20a)](this['_commentService'][_0x1db84e(0x211)][_0x1db84e(0x1e9)](async _0x21a53e=>{const _0x4f62eb=_0x1db84e;var _0x4094ea,_0x4359e3,_0x24c7e1,_0x47c369;const _0x558fdc=(_0x4094ea=this[_0x4f62eb(0x205)][_0x4f62eb(0x21a)](_0x21a53e[_0x4f62eb(0x1f8)])[_0x4f62eb(0x219)](_0xab5002=>_0xab5002[_0x4f62eb(0x236)]===_0x21a53e[_0x4f62eb(0x236)]))==null?void 0x0:_0x4094ea['root'];if(!_0x558fdc)return;const {unitId:_0x3223c3,subUnitId:_0x38affb}=_0x558fdc;switch(_0x21a53e[_0x4f62eb(0x1f4)]&&this[_0x4f62eb(0x1f6)][_0x4f62eb(0x239)](_0x21a53e['user']),_0x21a53e['type']){case v[_0x4f62eb(0x247)]:break;case v[_0x4f62eb(0x218)]:{this[_0x4f62eb(0x205)][_0x4f62eb(0x21c)](_0x3223c3,_0x38affb,{'unitId':_0x3223c3,'subUnitId':_0x38affb,'ref':'','id':_0x21a53e[_0x4f62eb(0x1f9)],'dT':D(+_0x21a53e[_0x4f62eb(0x243)]),'threadId':_0x21a53e['threadId'],'personId':(_0x24c7e1=(_0x4359e3=_0x21a53e[_0x4f62eb(0x1f4)])==null?void 0x0:_0x4359e3[_0x4f62eb(0x21d)])!=null?_0x24c7e1:_0x21a53e[_0x4f62eb(0x1fa)],'text':JSON[_0x4f62eb(0x22e)](_0x21a53e[_0x4f62eb(0x215)]),'parentId':_0x558fdc['id']});break;}case v[_0x4f62eb(0x233)]:{const _0x1768b8=this[_0x4f62eb(0x205)][_0x4f62eb(0x207)](_0x3223c3,_0x38affb,_0x21a53e[_0x4f62eb(0x1f9)]);_0x1768b8&&_0x1768b8['parentId']&&this[_0x4f62eb(0x205)][_0x4f62eb(0x23e)](_0x3223c3,_0x38affb,_0x21a53e[_0x4f62eb(0x1f9)]);break;}case v[_0x4f62eb(0x23b)]:{this[_0x4f62eb(0x205)][_0x4f62eb(0x23f)](_0x3223c3,_0x38affb,{'commentId':_0x21a53e[_0x4f62eb(0x1f9)],'text':JSON['parse'](_0x21a53e[_0x4f62eb(0x215)])});break;}case v[_0x4f62eb(0x204)]:{const _0x262cca=(_0x47c369=this[_0x4f62eb(0x205)][_0x4f62eb(0x21a)](_0x21a53e[_0x4f62eb(0x1f8)])['find'](_0x210123=>_0x210123['threadId']===_0x21a53e[_0x4f62eb(0x236)]))==null?void 0x0:_0x47c369[_0x4f62eb(0x210)];_0x262cca&&this[_0x4f62eb(0x205)][_0x4f62eb(0x22f)](_0x3223c3,_0x38affb,_0x262cca['id'],_0x21a53e['solved']===I[_0x4f62eb(0x241)]);break;}}}));}};S=V([p(0x0,_0x5cfd2a(_0x253c4f)),p(0x1,_0x5cfd2a(_0x48a5cd)),p(0x2,_0x5cfd2a(_0x1f607e)),p(0x3,_0x5cfd2a(_0x4e2d06))],S);const z=_0x15a028(0x235),M={};var k=Object[_0x15a028(0x214)],Q=(_0x2dc919,_0x595483,_0x31b92e,_0x39ee5d)=>{const _0xa8dd0b=_0x15a028;for(var _0x37271b=_0x39ee5d>0x1?void 0x0:_0x39ee5d?k(_0x595483,_0x31b92e):_0x595483,_0x5dd6fe=_0x2dc919[_0xa8dd0b(0x227)]-0x1,_0x2623ad;_0x5dd6fe>=0x0;_0x5dd6fe--)(_0x2623ad=_0x2dc919[_0x5dd6fe])&&(_0x37271b=_0x2623ad(_0x37271b)||_0x37271b);return _0x37271b;},_=(_0x1a1b32,_0x45abf3)=>(_0x5d4e69,_0x58729a)=>_0x45abf3(_0x5d4e69,_0x58729a,_0x1a1b32);function X(_0x2471bc,_0xa5d22e){const _0x3cd42b=_0x15a028,_0x571d38=_0x2471bc[_0x3cd42b(0x1f5)][0x0];return{..._0xa5d22e,'id':_0x571d38[_0x3cd42b(0x1f9)],'resolved':_0x2471bc[_0x3cd42b(0x20d)]===0x1,'dT':D(_0x571d38[_0x3cd42b(0x243)]),'personId':_0x571d38[_0x3cd42b(0x1fa)],'threadId':_0x571d38[_0x3cd42b(0x236)]};}function ee(_0x3d672b,_0x29dee3,_0x281431){const _0xfa2551=_0x15a028;var _0x29f862,_0x5a473d;if(((_0x5a473d=(_0x29f862=_0x3d672b==null?void 0x0:_0x3d672b[_0xfa2551(0x1f5)])==null?void 0x0:_0x29f862[_0xfa2551(0x227)])!=null?_0x5a473d:0x0)>0x0){const _0x33acaa=(_0x5f3be4,_0x501372)=>({'id':_0x5f3be4[_0xfa2551(0x1f9)],'threadId':_0x5f3be4[_0xfa2551(0x236)],'dT':D(_0x5f3be4['createTimestamp']),'personId':_0x5f3be4[_0xfa2551(0x1fa)],'resolved':_0x3d672b[_0xfa2551(0x20d)]===I[_0xfa2551(0x241)],'unitId':_0x29dee3,'subUnitId':_0x281431,'text':JSON[_0xfa2551(0x22e)](_0x5f3be4[_0xfa2551(0x215)]),'parentId':_0x501372}),_0x2593e7=_0x33acaa(_0x3d672b[_0xfa2551(0x1f5)][0x0]);return{..._0x2593e7,'children':_0x3d672b[_0xfa2551(0x1f5)]['slice'](0x1)[_0xfa2551(0x230)](_0x15c981=>_0x33acaa(_0x15c981,_0x2593e7['id']))};}return null;}let f=class{constructor(_0x46a7b0,_0x4cf54d,_0x4d1150,_0x3e173f){const _0x1096e3=_0x15a028;this['_httpService']=_0x46a7b0,this[_0x1096e3(0x1f6)]=_0x4cf54d,this[_0x1096e3(0x225)]=_0x4d1150,this['_injector']=_0x3e173f;}async[_0x15a028(0x21c)](_0x1e62d1){const _0x2bc2a2=_0x15a028;var _0x4a6d9c,_0x58cd3f;const {parentId:_0x56762d,unitId:_0x3d17cd,text:_0x32e94d,threadId:_0x1b8ef0}=_0x1e62d1,_0x275e47=(_0x58cd3f=(_0x4a6d9c=_0x32e94d[_0x2bc2a2(0x216)])==null?void 0x0:_0x4a6d9c[_0x2bc2a2(0x202)](_0x142278=>_0x142278[_0x2bc2a2(0x238)]===_0xe13e7a[_0x2bc2a2(0x248)])[_0x2bc2a2(0x230)](_0xbe00bd=>_0xbe00bd[_0x2bc2a2(0x249)]))!=null?_0x58cd3f:[],_0x470e43=JSON[_0x2bc2a2(0x23a)](_0x32e94d),_0x4cdfa5=(await this[_0x2bc2a2(0x225)][_0x2bc2a2(0x228)](_0x3d17cd))['getMemberID']();if(_0x56762d){const _0x5c4a95={'memberId':_0x4cdfa5,'unitId':_0x3d17cd,'content':_0x470e43,'mention':_0x275e47,'threadId':_0x1b8ef0},_0x162044=(await this[_0x2bc2a2(0x1ee)][_0x2bc2a2(0x1eb)]('/universer-api/comment/unit/'+_0x3d17cd+_0x2bc2a2(0x201),{'body':_0x5c4a95}))[_0x2bc2a2(0x220)][_0x2bc2a2(0x1fe)];return{..._0x1e62d1,'id':_0x162044[_0x2bc2a2(0x1f9)],'dT':_0x35743c(+_0x162044[_0x2bc2a2(0x243)])['format'](_0x2bc2a2(0x208)),'personId':_0x162044[_0x2bc2a2(0x1fa)]};}else{const _0x3e9f6d={'memberId':_0x4cdfa5,'unitId':_0x3d17cd,'content':_0x470e43,'mention':_0x275e47},_0x40cf21=await this[_0x2bc2a2(0x1ee)][_0x2bc2a2(0x1eb)](_0x2bc2a2(0x246)+_0x3d17cd+'/add',{'body':_0x3e9f6d});return X(_0x40cf21['body'][_0x2bc2a2(0x212)],_0x1e62d1);}}async['updateComment'](_0x1540be){const _0x506d55=_0x15a028;var _0xd41fd8,_0x30ed62;const {text:_0xd55881,unitId:_0x42ed27}=_0x1540be,_0x3c9b3e=(_0x30ed62=(_0xd41fd8=_0xd55881[_0x506d55(0x216)])==null?void 0x0:_0xd41fd8[_0x506d55(0x202)](_0x143cba=>_0x143cba[_0x506d55(0x238)]===_0xe13e7a[_0x506d55(0x248)])[_0x506d55(0x230)](_0x155e31=>_0x155e31['rangeId']))!=null?_0x30ed62:[],_0x5ef6ef=JSON['stringify'](_0xd55881),_0x5b6e85=_0x1540be[_0x506d55(0x236)],_0x247a28=_0x1540be['id'],_0x3ce71c={'memberId':(await this[_0x506d55(0x225)][_0x506d55(0x228)](_0x42ed27))['getMemberID'](),'unitId':_0x42ed27,'threadId':_0x5b6e85,'mention':_0x3c9b3e,'content':_0x5ef6ef,'replyId':_0x247a28},_0x3ee3b1=await this[_0x506d55(0x1ee)][_0x506d55(0x1eb)]('/universer-api/comment/unit/'+_0x42ed27+_0x506d55(0x209),{'body':_0x3ce71c});return!_0x3ee3b1[_0x506d55(0x220)][_0x506d55(0x217)]||_0x3ee3b1[_0x506d55(0x220)][_0x506d55(0x217)][_0x506d55(0x24b)]===0x1;}async[_0x15a028(0x22f)](_0x47e431){const _0x1bac14=_0x15a028,{unitId:_0x349677}=_0x47e431,_0x35a8cd=_0x47e431['threadId'],_0xf401f6={'memberId':this[_0x1bac14(0x1f6)][_0x1bac14(0x20f)]()[_0x1bac14(0x21d)],'unitId':_0x349677,'threadId':_0x35a8cd,'solved':_0x47e431[_0x1bac14(0x22a)]?I[_0x1bac14(0x241)]:I[_0x1bac14(0x232)]},_0x10ede0=await this['_httpService'][_0x1bac14(0x1eb)](_0x1bac14(0x246)+_0x349677+_0x1bac14(0x240),{'body':_0xf401f6});return!_0x10ede0[_0x1bac14(0x220)][_0x1bac14(0x217)]||_0x10ede0['body'][_0x1bac14(0x217)]['code']===0x1;}async[_0x15a028(0x23e)](_0x13b291,_0x547e19,_0x24df7a,_0x505396){const _0x34822c=_0x15a028,_0x2bd46c={'memberId':(await this['_sessionService'][_0x34822c(0x228)](_0x13b291))[_0x34822c(0x24c)](),'threadId':_0x24df7a,'replyId':_0x505396,'unitId':_0x13b291},_0x18983b=await this['_httpService'][_0x34822c(0x1eb)](_0x34822c(0x246)+_0x13b291+_0x34822c(0x1f3),{'body':_0x2bd46c});return!_0x18983b['body'][_0x34822c(0x217)]||_0x18983b['body'][_0x34822c(0x217)][_0x34822c(0x24b)]===0x1;}async[_0x15a028(0x21b)](_0x4fb704,_0x55465e,_0x4e6b7d){const _0x44e10c=_0x15a028,_0x451e1f={'unitId':_0x4fb704,'threadId':_0x4e6b7d},_0xaae836=await this[_0x44e10c(0x1ee)][_0x44e10c(0x1eb)](_0x44e10c(0x246)+_0x4fb704+_0x44e10c(0x213),{'body':_0x451e1f}),_0x599682=_0x4e6b7d[_0x44e10c(0x230)](_0x2f8663=>ee(_0xaae836['body'][_0x44e10c(0x226)][_0x2f8663],_0x4fb704,_0x55465e))[_0x44e10c(0x202)](Boolean);return Object[_0x44e10c(0x245)](_0xaae836[_0x44e10c(0x220)][_0x44e10c(0x244)])[_0x44e10c(0x20e)](_0x39fce7=>{const _0x4a95bf=_0x44e10c;this['_userService'][_0x4a95bf(0x239)](_0x39fce7);}),_0x599682;}[_0x15a028(0x1f1)](_0x136eea){const _0x49a926=_0x15a028;return{'id':_0x136eea['id'],'threadId':_0x136eea[_0x49a926(0x236)],'ref':_0x136eea[_0x49a926(0x22c)]};}};f=Q([_(0x0,_0x5cfd2a(_0xeb8e79)),_(0x1,_0x5cfd2a(_0x1f607e)),_(0x2,_0x5cfd2a(_0x8a85c4)),_(0x3,_0x5cfd2a(_0x4e2d06))],f);var re=Object[_0x15a028(0x214)],te=(_0x297f5a,_0x383edc,_0x21f41f,_0x44bff1)=>{const _0x372a4a=_0x15a028;for(var _0x3d0fe6=_0x44bff1>0x1?void 0x0:_0x44bff1?re(_0x383edc,_0x21f41f):_0x383edc,_0x1deb8a=_0x297f5a[_0x372a4a(0x227)]-0x1,_0x5bfacc;_0x1deb8a>=0x0;_0x1deb8a--)(_0x5bfacc=_0x297f5a[_0x1deb8a])&&(_0x3d0fe6=_0x5bfacc(_0x3d0fe6)||_0x3d0fe6);return _0x3d0fe6;},N=(_0x42a13c,_0x5afb17)=>(_0x5991b9,_0x30b8d6)=>_0x5afb17(_0x5991b9,_0x30b8d6,_0x42a13c);let g=class extends _0x4ffcbe{constructor(_0xac065,_0x2d5f9a){const _0x3fc0d7=_0x15a028;super(),this[_0x3fc0d7(0x22b)]=_0xac065,this[_0x3fc0d7(0x1f2)]=_0x2d5f9a,this[_0x3fc0d7(0x23c)]();}[_0x15a028(0x23c)](){const _0x390636=_0x15a028;this['_threadCommentDataSourceService'][_0x390636(0x221)]=this[_0x390636(0x1f2)],this[_0x390636(0x22b)][_0x390636(0x21f)]=!0x1;}};g=te([N(0x0,_0x34f453),N(0x1,_0x5cfd2a(f))],g);var se=Object[_0x15a028(0x223)],oe=Object[_0x15a028(0x214)],ne=(_0x4caba2,_0xf1668f,_0x50b268)=>_0xf1668f in _0x4caba2?se(_0x4caba2,_0xf1668f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x50b268}):_0x4caba2[_0xf1668f]=_0x50b268,ie=(_0x4a9327,_0x231092,_0x203039,_0x210d85)=>{const _0x384c27=_0x15a028;for(var _0x4db634=_0x210d85>0x1?void 0x0:_0x210d85?oe(_0x231092,_0x203039):_0x231092,_0x4c5760=_0x4a9327[_0x384c27(0x227)]-0x1,_0x41b266;_0x4c5760>=0x0;_0x4c5760--)(_0x41b266=_0x4a9327[_0x4c5760])&&(_0x4db634=_0x41b266(_0x4db634)||_0x4db634);return _0x4db634;},w=(_0x51bf6b,_0x359e15)=>(_0x2a48bf,_0x4f82e9)=>_0x359e15(_0x2a48bf,_0x4f82e9,_0x51bf6b),$=(_0x36deb2,_0x4a3c14,_0x54282c)=>ne(_0x36deb2,typeof _0x4a3c14!=_0x15a028(0x1ea)?_0x4a3c14+'':_0x4a3c14,_0x54282c);let b=class extends _0x46fc63{constructor(_0x208264=M,_0x383125,_0x12c1ee){const _0x5e708c=_0x15a028;super(),this[_0x5e708c(0x1ec)]=_0x208264,this[_0x5e708c(0x206)]=_0x383125,this[_0x5e708c(0x237)]=_0x12c1ee;const {..._0x204bc9}=_0x5609b0({},M,this[_0x5e708c(0x1ec)]);this[_0x5e708c(0x237)]['setConfig'](z,_0x204bc9);}[_0x15a028(0x1fc)](){const _0x343e31=_0x15a028;[[f],[g],[S]][_0x343e31(0x20e)](_0x17c3fb=>{const _0x3b3475=_0x343e31;this[_0x3b3475(0x206)]['add'](_0x17c3fb);});}['onReady'](){const _0x555ca7=_0x15a028;this[_0x555ca7(0x206)]['get'](g),this[_0x555ca7(0x206)][_0x555ca7(0x222)](S);}};$(b,'pluginName',W),$(b,_0x15a028(0x229),_0x4632e5[_0x15a028(0x200)]),b=ie([_0x3b7993(_0x3dd618,_0x267342,_0x1782a3),w(0x1,_0x5cfd2a(_0x4e2d06)),w(0x2,_0x58de89)],b);function _0x3d91(){const _0x2a5ca8=['60XKBcEi','_httpService','6312770ThZRQA','format','saveCommentToSnapshot','_threadCommentDataSource','/delete','user','replies','_userService','Unknown','unitId','replyId','userId','30147620cxmuVf','onStarting','6102KmNmPP','reply','6702282XfFiIl','UNIVER_UNKNOWN','/reply','filter','2MqYPUF','Solve','_threadCommentModel','_injector','getComment','YYYY/MM/DD\x20HH:mm','/edit','disposeWithMe','_init','add','solved','forEach','getCurrentUser','root','commentUpdate$','comment','/list','getOwnPropertyDescriptor','content','customRanges','error','Reply','find','getUnit','listComments','addComment','userID','6128nhZOdV','syncUpdateMutationToColla','body','dataSource','get','defineProperty','UNRECOGNIZED','_sessionService','comments','length','requireSession','type','resolved','_threadCommentDataSourceService','ref','_initUserSync','parse','resolveComment','map','/universer-api/user/list','OpenOrReOpen','Delete','1138032zoXGOq','thread-comment-data-source.config','threadId','_configService','rangeType','addUser','stringify','Edit','_initDataSource','getUser','deleteComment','updateComment','/solved','Solved','delete','createTimestamp','users','values','/universer-api/comment/unit/','Add','COMMENT','rangeId','_commentService','code','getMemberID','size','185937OQYARM','188291ezGVyn','subscribe','symbol','post','_config'];_0x3d91=function(){return _0x2a5ca8;};return _0x3d91();}export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x2feed8=_0x2a60;(function(_0x7fdb15,_0x3526ac){const _0x2934c9=_0x2a60,_0xa0563f=_0x7fdb15();while(!![]){try{const _0x5160ec=parseInt(_0x2934c9(0xae))/0x1*(parseInt(_0x2934c9(0x85))/0x2)+-parseInt(_0x2934c9(0xb2))/0x3*(parseInt(_0x2934c9(0x88))/0x4)+parseInt(_0x2934c9(0xcd))/0x5+-parseInt(_0x2934c9(0xe5))/0x6*(-parseInt(_0x2934c9(0xe4))/0x7)+-parseInt(_0x2934c9(0xe7))/0x8+parseInt(_0x2934c9(0xa3))/0x9+parseInt(_0x2934c9(0x9a))/0xa*(parseInt(_0x2934c9(0xc7))/0xb);if(_0x5160ec===_0x3526ac)break;else _0xa0563f['push'](_0xa0563f['shift']());}catch(_0x3ce4ed){_0xa0563f['push'](_0xa0563f['shift']());}}}(_0x4351,0x30e15));import{CommentService as _0x5a2656,CollaborationSessionService as _0x2f0330,UniverCollaborationClientPlugin as _0x2dcecf}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4d02c6}from'@univerjs-pro/license';import{dayjs as _0x4e076,UserManagerService as _0x291cc2,Inject as _0x54b547,Injector as _0x384bd7,Disposable as _0x4047dc,CustomRangeType as _0x377b33,UniverInstanceType as _0x5accf4,DependentOn as _0x1d2fba,IConfigService as _0x1edf32,Plugin as _0x2b2314,merge as _0x22d1b9}from'@univerjs/core';function _0x2a60(_0x1b8a47,_0x32daa3){const _0x435106=_0x4351();return _0x2a60=function(_0x2a6039,_0x202f71){_0x2a6039=_0x2a6039-0x82;let _0x2fb238=_0x435106[_0x2a6039];return _0x2fb238;},_0x2a60(_0x1b8a47,_0x32daa3);}import{UniverThreadCommentUIPlugin as _0x45d87a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4b30f9,IThreadCommentDataSourceService as _0x565532}from'@univerjs/thread-comment';import{bufferTime as _0x552255}from'rxjs';import{HTTPService as _0x14f5c7}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xbea222=>(_0xbea222[_0xbea222['OpenOrReOpen']=0x0]=_0x2feed8(0xd1),_0xbea222[_0xbea222[_0x2feed8(0x9c)]=0x1]=_0x2feed8(0x9c),_0xbea222[_0xbea222[_0x2feed8(0xac)]=-0x1]=_0x2feed8(0xac),_0xbea222))(I||{}),v=(_0x598372=>(_0x598372[_0x598372['Unknown']=0x0]=_0x2feed8(0xc4),_0x598372[_0x598372[_0x2feed8(0xca)]=0x1]='Add',_0x598372[_0x598372[_0x2feed8(0xcb)]=0x2]=_0x2feed8(0xcb),_0x598372[_0x598372[_0x2feed8(0x8e)]=0x3]=_0x2feed8(0x8e),_0x598372[_0x598372[_0x2feed8(0xa6)]=0x4]=_0x2feed8(0xa6),_0x598372[_0x598372[_0x2feed8(0xc5)]=0x5]=_0x2feed8(0xc5),_0x598372[_0x598372[_0x2feed8(0xac)]=-0x1]=_0x2feed8(0xac),_0x598372))(v||{});const D=_0xb3e74f=>_0x4e076(new Date(+_0xb3e74f))[_0x2feed8(0x98)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x18046d,_0x376c60)=>{const _0x5ce614=_0x2feed8,_0x211240=_0x18046d[_0x5ce614(0x90)](_0x291cc2),_0x4bcdca=_0x18046d[_0x5ce614(0x90)](_0x14f5c7);_0x376c60['forEach'](_0x3260fd=>{const _0x24e318=_0x5ce614;_0x211240['getUser'](_0x3260fd)&&_0x376c60[_0x24e318(0xa5)](_0x3260fd);}),_0x376c60['size']&&(await _0x4bcdca[_0x5ce614(0x90)](_0x5ce614(0x89),{'params':{'userIDs':[..._0x376c60]}}))[_0x5ce614(0xbe)][_0x5ce614(0xde)][_0x5ce614(0xb3)](_0x4c8d00=>{const _0x10a24d=_0x5ce614;_0x4c8d00&&_0x211240[_0x10a24d(0x9f)](_0x4c8d00);});};var K=Object[_0x2feed8(0x86)],V=(_0x1a8a70,_0x31485f,_0x170fea,_0x38f566)=>{const _0x430e03=_0x2feed8;for(var _0x585e33=_0x38f566>0x1?void 0x0:_0x38f566?K(_0x31485f,_0x170fea):_0x31485f,_0x25315f=_0x1a8a70[_0x430e03(0xbd)]-0x1,_0x1680ba;_0x25315f>=0x0;_0x25315f--)(_0x1680ba=_0x1a8a70[_0x25315f])&&(_0x585e33=_0x1680ba(_0x585e33)||_0x585e33);return _0x585e33;},p=(_0x26b951,_0x2b41f4)=>(_0x4e2f93,_0x30f46)=>_0x2b41f4(_0x4e2f93,_0x30f46,_0x26b951);let S=class extends _0x4047dc{constructor(_0x588d53,_0x52babf,_0x1d6a0c,_0x4d62f7){const _0x5eac6c=_0x2feed8;super(),this[_0x5eac6c(0x8f)]=_0x588d53,this['_threadCommentModel']=_0x52babf,this['_userService']=_0x1d6a0c,this[_0x5eac6c(0xd2)]=_0x4d62f7,this[_0x5eac6c(0x96)](),this[_0x5eac6c(0xe6)]();}[_0x2feed8(0xe6)](){const _0x56cdfb=_0x2feed8;this['disposeWithMe'](this[_0x56cdfb(0x83)][_0x56cdfb(0xdd)][_0x56cdfb(0xb8)](_0x552255(0x10))[_0x56cdfb(0xb6)](_0xb16343=>{const _0x18c978=_0x56cdfb,_0x57743f=new Set();_0xb16343[_0x18c978(0xb3)](_0xa583b2=>{const _0x44d436=_0x18c978;switch(_0xa583b2[_0x44d436(0xc6)]){case _0x44d436(0xc8):{const _0x33ff68=_0xa583b2[_0x44d436(0x91)][_0x44d436(0xdb)];_0x57743f[_0x44d436(0xc8)](_0x33ff68);break;}}}),B(this[_0x18c978(0xd2)],_0x57743f);}));}['_init'](){const _0x2fd0b9=_0x2feed8;this[_0x2fd0b9(0xd0)](this[_0x2fd0b9(0x8f)]['commentUpdate$'][_0x2fd0b9(0xb6)](async _0x2aef85=>{const _0x8e06c4=_0x2fd0b9;var _0x216195,_0x421d70,_0x53c674,_0x220ea3;const _0x502cd0=(_0x216195=this[_0x8e06c4(0x83)][_0x8e06c4(0xad)](_0x2aef85[_0x8e06c4(0x8c)])[_0x8e06c4(0x8b)](_0x19ef31=>_0x19ef31['threadId']===_0x2aef85[_0x8e06c4(0x8d)]))==null?void 0x0:_0x216195[_0x8e06c4(0xcf)];if(!_0x502cd0)return;const {unitId:_0x2b3fd9,subUnitId:_0x2ff9ab}=_0x502cd0;switch(_0x2aef85[_0x8e06c4(0xc1)]&&this[_0x8e06c4(0xdf)]['addUser'](_0x2aef85['user']),_0x2aef85[_0x8e06c4(0xc6)]){case v[_0x8e06c4(0xca)]:break;case v['Reply']:{this[_0x8e06c4(0x83)][_0x8e06c4(0xa8)](_0x2b3fd9,_0x2ff9ab,{'unitId':_0x2b3fd9,'subUnitId':_0x2ff9ab,'ref':'','id':_0x2aef85[_0x8e06c4(0xd3)],'dT':D(+_0x2aef85[_0x8e06c4(0xb7)]),'threadId':_0x2aef85[_0x8e06c4(0x8d)],'personId':(_0x53c674=(_0x421d70=_0x2aef85[_0x8e06c4(0xc1)])==null?void 0x0:_0x421d70[_0x8e06c4(0xc2)])!=null?_0x53c674:_0x2aef85[_0x8e06c4(0xb1)],'text':JSON['parse'](_0x2aef85[_0x8e06c4(0xe3)]),'parentId':_0x502cd0['id']});break;}case v[_0x8e06c4(0xa6)]:{const _0x570b22=this['_threadCommentModel'][_0x8e06c4(0xa0)](_0x2b3fd9,_0x2ff9ab,_0x2aef85[_0x8e06c4(0xd3)]);_0x570b22&&_0x570b22[_0x8e06c4(0x87)]&&this['_threadCommentModel'][_0x8e06c4(0xba)](_0x2b3fd9,_0x2ff9ab,_0x2aef85[_0x8e06c4(0xd3)]);break;}case v[_0x8e06c4(0x8e)]:{this[_0x8e06c4(0x83)][_0x8e06c4(0xda)](_0x2b3fd9,_0x2ff9ab,{'commentId':_0x2aef85[_0x8e06c4(0xd3)],'text':JSON[_0x8e06c4(0xb5)](_0x2aef85['content'])});break;}case v[_0x8e06c4(0xc5)]:{const _0x45b97a=(_0x220ea3=this[_0x8e06c4(0x83)][_0x8e06c4(0xad)](_0x2aef85['unitId'])['find'](_0x2924f3=>_0x2924f3['threadId']===_0x2aef85[_0x8e06c4(0x8d)]))==null?void 0x0:_0x220ea3[_0x8e06c4(0xcf)];_0x45b97a&&this[_0x8e06c4(0x83)][_0x8e06c4(0xe0)](_0x2b3fd9,_0x2ff9ab,_0x45b97a['id'],_0x2aef85[_0x8e06c4(0x82)]===I[_0x8e06c4(0x9c)]);break;}}}));}};S=V([p(0x0,_0x54b547(_0x5a2656)),p(0x1,_0x54b547(_0x4b30f9)),p(0x2,_0x54b547(_0x291cc2)),p(0x3,_0x54b547(_0x384bd7))],S);const z=_0x2feed8(0xa1),M={};function _0x4351(){const _0x935751=['getMemberID','length','body','filter','/edit','user','userID','YYYY/MM/DD\x20HH:mm','Unknown','Solve','type','615252hQqndQ','add','error','Add','Reply','values','112150WmVQvt','reply','root','disposeWithMe','OpenOrReOpen','_injector','replyId','/reply','map','_configService','resolved','listComments','_initDataSource','updateComment','personId','requireSession','commentUpdate$','users','_userService','resolveComment','comments','rangeType','content','872165aSQcWN','6arjOGR','_initUserSync','2828224fsrsuh','solved','_threadCommentModel','symbol','3830qOWmTP','getOwnPropertyDescriptor','parentId','32PvrtbB','/universer-api/user/list','UNIVER_UNKNOWN','find','unitId','threadId','Edit','_commentService','get','payload','code','comment','saveCommentToSnapshot','rangeId','_init','_config','format','ref','40ScHZAm','post','Solved','_sessionService','syncUpdateMutationToColla','addUser','getComment','thread-comment-data-source.config','setConfig','2276586GRFUYV','replies','delete','Delete','_httpService','addComment','getCurrentUser','COMMENT','_threadCommentDataSourceService','UNRECOGNIZED','getUnit','110CtxiaH','stringify','onStarting','userId','105231RDyLJm','forEach','customRanges','parse','subscribe','createTimestamp','pipe','pluginName','deleteComment','/universer-api/comment/unit/'];_0x4351=function(){return _0x935751;};return _0x4351();}var k=Object['getOwnPropertyDescriptor'],Q=(_0x2aedc3,_0x59a3b9,_0x47527d,_0x4e3f07)=>{const _0x163bb6=_0x2feed8;for(var _0x2a9616=_0x4e3f07>0x1?void 0x0:_0x4e3f07?k(_0x59a3b9,_0x47527d):_0x59a3b9,_0x6b13a=_0x2aedc3[_0x163bb6(0xbd)]-0x1,_0x5cfccd;_0x6b13a>=0x0;_0x6b13a--)(_0x5cfccd=_0x2aedc3[_0x6b13a])&&(_0x2a9616=_0x5cfccd(_0x2a9616)||_0x2a9616);return _0x2a9616;},_=(_0x25e7d6,_0x34fcf4)=>(_0x23d8af,_0x4b5f41)=>_0x34fcf4(_0x23d8af,_0x4b5f41,_0x25e7d6);function X(_0x9c281f,_0x572910){const _0x59e95a=_0x2feed8,_0x867b4=_0x9c281f[_0x59e95a(0xa4)][0x0];return{..._0x572910,'id':_0x867b4[_0x59e95a(0xd3)],'resolved':_0x9c281f['solved']===0x1,'dT':D(_0x867b4[_0x59e95a(0xb7)]),'personId':_0x867b4['userId'],'threadId':_0x867b4[_0x59e95a(0x8d)]};}function ee(_0x575844,_0x398e93,_0x393516){const _0x2dfa51=_0x2feed8;var _0x16aa30,_0x4eb052;if(((_0x4eb052=(_0x16aa30=_0x575844==null?void 0x0:_0x575844['replies'])==null?void 0x0:_0x16aa30['length'])!=null?_0x4eb052:0x0)>0x0){const _0x52330b=(_0x529097,_0x5dae17)=>({'id':_0x529097[_0x2dfa51(0xd3)],'threadId':_0x529097[_0x2dfa51(0x8d)],'dT':D(_0x529097[_0x2dfa51(0xb7)]),'personId':_0x529097['userId'],'resolved':_0x575844['solved']===I['Solved'],'unitId':_0x398e93,'subUnitId':_0x393516,'text':JSON[_0x2dfa51(0xb5)](_0x529097['content']),'parentId':_0x5dae17}),_0xe699e8=_0x52330b(_0x575844[_0x2dfa51(0xa4)][0x0]);return{..._0xe699e8,'children':_0x575844[_0x2dfa51(0xa4)]['slice'](0x1)[_0x2dfa51(0xd5)](_0x5e75af=>_0x52330b(_0x5e75af,_0xe699e8['id']))};}return null;}let f=class{constructor(_0x303c09,_0x173239,_0x5a8dca,_0x1722e0){const _0x2f9b9c=_0x2feed8;this[_0x2f9b9c(0xa7)]=_0x303c09,this[_0x2f9b9c(0xdf)]=_0x173239,this[_0x2f9b9c(0x9d)]=_0x5a8dca,this[_0x2f9b9c(0xd2)]=_0x1722e0;}async[_0x2feed8(0xa8)](_0x401d60){const _0x3f0322=_0x2feed8;var _0x5e66b2,_0x37ff68;const {parentId:_0x48486b,unitId:_0x257766,text:_0xa4bcc1,threadId:_0x4bc5d1}=_0x401d60,_0x12a499=(_0x37ff68=(_0x5e66b2=_0xa4bcc1[_0x3f0322(0xb4)])==null?void 0x0:_0x5e66b2['filter'](_0x537a9f=>_0x537a9f['rangeType']===_0x377b33[_0x3f0322(0xaa)])[_0x3f0322(0xd5)](_0x168b62=>_0x168b62[_0x3f0322(0x95)]))!=null?_0x37ff68:[],_0x2ed0f3=JSON[_0x3f0322(0xaf)](_0xa4bcc1),_0x42a02a=(await this[_0x3f0322(0x9d)][_0x3f0322(0xdc)](_0x257766))[_0x3f0322(0xbc)]();if(_0x48486b){const _0xd8bc64={'memberId':_0x42a02a,'unitId':_0x257766,'content':_0x2ed0f3,'mention':_0x12a499,'threadId':_0x4bc5d1},_0x207a2e=(await this[_0x3f0322(0xa7)][_0x3f0322(0x9b)](_0x3f0322(0xbb)+_0x257766+_0x3f0322(0xd4),{'body':_0xd8bc64}))[_0x3f0322(0xbe)][_0x3f0322(0xce)];return{..._0x401d60,'id':_0x207a2e[_0x3f0322(0xd3)],'dT':_0x4e076(+_0x207a2e[_0x3f0322(0xb7)])[_0x3f0322(0x98)](_0x3f0322(0xc3)),'personId':_0x207a2e[_0x3f0322(0xb1)]};}else{const _0x17666c={'memberId':_0x42a02a,'unitId':_0x257766,'content':_0x2ed0f3,'mention':_0x12a499},_0x5205be=await this['_httpService'][_0x3f0322(0x9b)](_0x3f0322(0xbb)+_0x257766+'/add',{'body':_0x17666c});return X(_0x5205be[_0x3f0322(0xbe)][_0x3f0322(0x93)],_0x401d60);}}async[_0x2feed8(0xda)](_0x42f97f){const _0x8421f6=_0x2feed8;var _0x1bf642,_0x19522b;const {text:_0x1d9105,unitId:_0x493233}=_0x42f97f,_0x2d68ec=(_0x19522b=(_0x1bf642=_0x1d9105['customRanges'])==null?void 0x0:_0x1bf642[_0x8421f6(0xbf)](_0x5c28ff=>_0x5c28ff[_0x8421f6(0xe2)]===_0x377b33[_0x8421f6(0xaa)])[_0x8421f6(0xd5)](_0xb432d9=>_0xb432d9[_0x8421f6(0x95)]))!=null?_0x19522b:[],_0x2424f5=JSON[_0x8421f6(0xaf)](_0x1d9105),_0x4f1221=_0x42f97f[_0x8421f6(0x8d)],_0x8ec8f6=_0x42f97f['id'],_0x39c3f2={'memberId':(await this[_0x8421f6(0x9d)][_0x8421f6(0xdc)](_0x493233))['getMemberID'](),'unitId':_0x493233,'threadId':_0x4f1221,'mention':_0x2d68ec,'content':_0x2424f5,'replyId':_0x8ec8f6},_0x5a6932=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x493233+_0x8421f6(0xc0),{'body':_0x39c3f2});return!_0x5a6932[_0x8421f6(0xbe)][_0x8421f6(0xc9)]||_0x5a6932[_0x8421f6(0xbe)][_0x8421f6(0xc9)][_0x8421f6(0x92)]===0x1;}async[_0x2feed8(0xe0)](_0x1b21d7){const _0x5c8778=_0x2feed8,{unitId:_0x316769}=_0x1b21d7,_0x1129f8=_0x1b21d7[_0x5c8778(0x8d)],_0x534868={'memberId':this[_0x5c8778(0xdf)][_0x5c8778(0xa9)]()[_0x5c8778(0xc2)],'unitId':_0x316769,'threadId':_0x1129f8,'solved':_0x1b21d7[_0x5c8778(0xd7)]?I[_0x5c8778(0x9c)]:I[_0x5c8778(0xd1)]},_0x17147d=await this[_0x5c8778(0xa7)][_0x5c8778(0x9b)]('/universer-api/comment/unit/'+_0x316769+'/solved',{'body':_0x534868});return!_0x17147d['body'][_0x5c8778(0xc9)]||_0x17147d[_0x5c8778(0xbe)][_0x5c8778(0xc9)]['code']===0x1;}async[_0x2feed8(0xba)](_0x2d3247,_0x12bf58,_0x518f7f,_0x5750c5){const _0x5aaab1=_0x2feed8,_0x23f640={'memberId':(await this['_sessionService'][_0x5aaab1(0xdc)](_0x2d3247))[_0x5aaab1(0xbc)](),'threadId':_0x518f7f,'replyId':_0x5750c5,'unitId':_0x2d3247},_0x9dc52c=await this[_0x5aaab1(0xa7)][_0x5aaab1(0x9b)]('/universer-api/comment/unit/'+_0x2d3247+'/delete',{'body':_0x23f640});return!_0x9dc52c['body'][_0x5aaab1(0xc9)]||_0x9dc52c[_0x5aaab1(0xbe)][_0x5aaab1(0xc9)][_0x5aaab1(0x92)]===0x1;}async[_0x2feed8(0xd8)](_0x1affdc,_0x220a7a,_0x18918e){const _0xf68fba=_0x2feed8,_0x5f27a7={'unitId':_0x1affdc,'threadId':_0x18918e},_0x504561=await this[_0xf68fba(0xa7)]['post'](_0xf68fba(0xbb)+_0x1affdc+'/list',{'body':_0x5f27a7}),_0x541393=_0x18918e[_0xf68fba(0xd5)](_0x3150ce=>ee(_0x504561['body'][_0xf68fba(0xe1)][_0x3150ce],_0x1affdc,_0x220a7a))[_0xf68fba(0xbf)](Boolean);return Object[_0xf68fba(0xcc)](_0x504561[_0xf68fba(0xbe)][_0xf68fba(0xde)])[_0xf68fba(0xb3)](_0x231657=>{const _0x5557f1=_0xf68fba;this[_0x5557f1(0xdf)][_0x5557f1(0x9f)](_0x231657);}),_0x541393;}[_0x2feed8(0x94)](_0x1a9fa7){const _0x35532c=_0x2feed8;return{'id':_0x1a9fa7['id'],'threadId':_0x1a9fa7['threadId'],'ref':_0x1a9fa7[_0x35532c(0x99)]};}};f=Q([_(0x0,_0x54b547(_0x14f5c7)),_(0x1,_0x54b547(_0x291cc2)),_(0x2,_0x54b547(_0x2f0330)),_(0x3,_0x54b547(_0x384bd7))],f);var re=Object[_0x2feed8(0x86)],te=(_0x28c9ba,_0x12440a,_0x42355e,_0x278fcc)=>{const _0x3b62a3=_0x2feed8;for(var _0x4fc92a=_0x278fcc>0x1?void 0x0:_0x278fcc?re(_0x12440a,_0x42355e):_0x12440a,_0x3e6f29=_0x28c9ba[_0x3b62a3(0xbd)]-0x1,_0x2e5ca4;_0x3e6f29>=0x0;_0x3e6f29--)(_0x2e5ca4=_0x28c9ba[_0x3e6f29])&&(_0x4fc92a=_0x2e5ca4(_0x4fc92a)||_0x4fc92a);return _0x4fc92a;},N=(_0x5169db,_0x48cf87)=>(_0x376115,_0x1e8bfb)=>_0x48cf87(_0x376115,_0x1e8bfb,_0x5169db);let g=class extends _0x4047dc{constructor(_0x3c9d78,_0x17dcde){const _0x2fb7b6=_0x2feed8;super(),this[_0x2fb7b6(0xab)]=_0x3c9d78,this['_threadCommentDataSource']=_0x17dcde,this[_0x2fb7b6(0xd9)]();}[_0x2feed8(0xd9)](){const _0x31f800=_0x2feed8;this[_0x31f800(0xab)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x31f800(0x9e)]=!0x1;}};g=te([N(0x0,_0x565532),N(0x1,_0x54b547(f))],g);var se=Object['defineProperty'],oe=Object[_0x2feed8(0x86)],ne=(_0xab68f5,_0x4a1cf2,_0x40cd4e)=>_0x4a1cf2 in _0xab68f5?se(_0xab68f5,_0x4a1cf2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x40cd4e}):_0xab68f5[_0x4a1cf2]=_0x40cd4e,ie=(_0x552fbf,_0xcc4d30,_0x337a28,_0x3c4178)=>{const _0x510033=_0x2feed8;for(var _0x57ce91=_0x3c4178>0x1?void 0x0:_0x3c4178?oe(_0xcc4d30,_0x337a28):_0xcc4d30,_0x28ae3d=_0x552fbf[_0x510033(0xbd)]-0x1,_0x3dec37;_0x28ae3d>=0x0;_0x28ae3d--)(_0x3dec37=_0x552fbf[_0x28ae3d])&&(_0x57ce91=_0x3dec37(_0x57ce91)||_0x57ce91);return _0x57ce91;},w=(_0x501066,_0x7e3906)=>(_0x573cda,_0x501475)=>_0x7e3906(_0x573cda,_0x501475,_0x501066),$=(_0x1595a3,_0x50f633,_0x4cfd0d)=>ne(_0x1595a3,typeof _0x50f633!=_0x2feed8(0x84)?_0x50f633+'':_0x50f633,_0x4cfd0d);let b=class extends _0x2b2314{constructor(_0x536fc7=M,_0x370212,_0x1bbdc9){const _0x4c2fdd=_0x2feed8;super(),this[_0x4c2fdd(0x97)]=_0x536fc7,this[_0x4c2fdd(0xd2)]=_0x370212,this['_configService']=_0x1bbdc9;const {..._0x441adb}=_0x22d1b9({},M,this[_0x4c2fdd(0x97)]);this[_0x4c2fdd(0xd6)][_0x4c2fdd(0xa2)](z,_0x441adb);}[_0x2feed8(0xb0)](){const _0xefbef1=_0x2feed8;[[f],[g],[S]][_0xefbef1(0xb3)](_0x19177b=>{const _0x17c533=_0xefbef1;this['_injector'][_0x17c533(0xc8)](_0x19177b);});}['onReady'](){const _0x9990ff=_0x2feed8;this[_0x9990ff(0xd2)][_0x9990ff(0x90)](g),this[_0x9990ff(0xd2)][_0x9990ff(0x90)](S);}};$(b,_0x2feed8(0xb9),W),$(b,_0x2feed8(0xc6),_0x5accf4[_0x2feed8(0x8a)]),b=ie([_0x1d2fba(_0x45d87a,_0x2dcecf,_0x4d02c6),w(0x1,_0x54b547(_0x384bd7)),w(0x2,_0x1edf32)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x19dcb5,_0x5003c7){const _0x4f641a=_0xd8b8,_0x29b86c=_0x19dcb5();while(!![]){try{const _0x5b989c=parseInt(_0x4f641a(0x15d))/0x1+parseInt(_0x4f641a(0x104))/0x2*(-parseInt(_0x4f641a(0x10b))/0x3)+parseInt(_0x4f641a(0x135))/0x4+parseInt(_0x4f641a(0x169))/0x5+parseInt(_0x4f641a(0x16d))/0x6*(parseInt(_0x4f641a(0x122))/0x7)+parseInt(_0x4f641a(0x129))/0x8+-parseInt(_0x4f641a(0x109))/0x9;if(_0x5b989c===_0x5003c7)break;else _0x29b86c['push'](_0x29b86c['shift']());}catch(_0x24ad45){_0x29b86c['push'](_0x29b86c['shift']());}}}(_0x5cfd,0x1afba),function(_0x12f55c,_0x43c4f8){const _0x13f89a=_0xd8b8;typeof exports==_0x13f89a(0x147)&&typeof module<'u'?_0x43c4f8(exports,require(_0x13f89a(0x113)),require(_0x13f89a(0x11e)),require(_0x13f89a(0x138)),require(_0x13f89a(0x126)),require(_0x13f89a(0x178)),require(_0x13f89a(0x12b)),require(_0x13f89a(0x127))):typeof define==_0x13f89a(0x10c)&&define['amd']?define(['exports',_0x13f89a(0x113),'@univerjs-pro/license',_0x13f89a(0x138),_0x13f89a(0x126),'@univerjs/thread-comment',_0x13f89a(0x12b),'@univerjs/network'],_0x43c4f8):(_0x12f55c=typeof globalThis<'u'?globalThis:_0x12f55c||self,_0x43c4f8(_0x12f55c['UniverProThreadCommentDatasource']={},_0x12f55c[_0x13f89a(0xfa)],_0x12f55c['UniverProLicense'],_0x12f55c[_0x13f89a(0x118)],_0x12f55c[_0x13f89a(0x106)],_0x12f55c[_0x13f89a(0xfb)],_0x12f55c[_0x13f89a(0x12b)],_0x12f55c[_0x13f89a(0x157)]));}(this,function(_0x5c21b9,_0x1a8adc,_0x4ce85d,_0x383e05,_0x2ba6e9,_0x3587e2,_0x3d9b0e,_0x1cf243){'use strict';const _0x161f25=_0xd8b8;const _0x5bcb87=_0x161f25(0x11a);var _0x5a7e30=(_0x11939d=>(_0x11939d[_0x11939d[_0x161f25(0x168)]=0x0]=_0x161f25(0x168),_0x11939d[_0x11939d['Solved']=0x1]=_0x161f25(0x12f),_0x11939d[_0x11939d[_0x161f25(0x10d)]=-0x1]=_0x161f25(0x10d),_0x11939d))(_0x5a7e30||{}),_0x4df7a0=(_0x27d005=>(_0x27d005[_0x27d005['Unknown']=0x0]='Unknown',_0x27d005[_0x27d005[_0x161f25(0x15e)]=0x1]=_0x161f25(0x15e),_0x27d005[_0x27d005['Reply']=0x2]=_0x161f25(0x155),_0x27d005[_0x27d005['Edit']=0x3]=_0x161f25(0x16b),_0x27d005[_0x27d005[_0x161f25(0x16f)]=0x4]='Delete',_0x27d005[_0x27d005[_0x161f25(0x179)]=0x5]='Solve',_0x27d005[_0x27d005[_0x161f25(0x10d)]=-0x1]='UNRECOGNIZED',_0x27d005))(_0x4df7a0||{});const _0x40085c=_0x18871d=>_0x383e05[_0x161f25(0x144)](new Date(+_0x18871d))[_0x161f25(0x145)](_0x161f25(0x14c)),_0x12bed1=async(_0x492122,_0x40ff47)=>{const _0x1d5b2f=_0x161f25,_0x330f1f=_0x492122['get'](_0x383e05[_0x1d5b2f(0x100)]),_0x21beda=_0x492122[_0x1d5b2f(0x165)](_0x1cf243[_0x1d5b2f(0x177)]);_0x40ff47['forEach'](_0x5105b0=>{const _0x526268=_0x1d5b2f;_0x330f1f[_0x526268(0x153)](_0x5105b0)&&_0x40ff47[_0x526268(0x173)](_0x5105b0);}),_0x40ff47['size']&&(await _0x21beda[_0x1d5b2f(0x165)]('/universer-api/user/list',{'params':{'userIDs':[..._0x40ff47]}}))[_0x1d5b2f(0x137)][_0x1d5b2f(0x151)][_0x1d5b2f(0x132)](_0x7cc756=>{const _0x3300e8=_0x1d5b2f;_0x7cc756&&_0x330f1f[_0x3300e8(0x12d)](_0x7cc756);});};var _0x2bf5c5=Object[_0x161f25(0x11d)],_0x75b723=(_0x458d03,_0x4c9d82,_0x43a57e,_0x44911b)=>{for(var _0xe1fe61=_0x44911b>0x1?void 0x0:_0x44911b?_0x2bf5c5(_0x4c9d82,_0x43a57e):_0x4c9d82,_0x1a0ea8=_0x458d03['length']-0x1,_0x529559;_0x1a0ea8>=0x0;_0x1a0ea8--)(_0x529559=_0x458d03[_0x1a0ea8])&&(_0xe1fe61=_0x529559(_0xe1fe61)||_0xe1fe61);return _0xe1fe61;},_0xf6834f=(_0xf3474,_0x3dacb3)=>(_0x493086,_0x5520bb)=>_0x3dacb3(_0x493086,_0x5520bb,_0xf3474);let _0x19f978=class extends _0x383e05[_0x161f25(0x14a)]{constructor(_0x166168,_0x323c41,_0x3d1f13,_0x3565b1){const _0x2be80c=_0x161f25;super(),this[_0x2be80c(0x111)]=_0x166168,this['_threadCommentModel']=_0x323c41,this[_0x2be80c(0x13c)]=_0x3d1f13,this[_0x2be80c(0x152)]=_0x3565b1,this[_0x2be80c(0x164)](),this['_initUserSync']();}[_0x161f25(0x176)](){const _0x56d4a0=_0x161f25;this[_0x56d4a0(0x123)](this[_0x56d4a0(0x16a)][_0x56d4a0(0x13b)]['pipe'](_0x3d9b0e['bufferTime'](0x10))[_0x56d4a0(0x136)](_0xa2430b=>{const _0x1af93c=_0x56d4a0,_0x1eb58e=new Set();_0xa2430b[_0x1af93c(0x132)](_0x1ea280=>{const _0x1edc0f=_0x1af93c;switch(_0x1ea280[_0x1edc0f(0x128)]){case _0x1edc0f(0xff):{const _0x5ee0e1=_0x1ea280[_0x1edc0f(0x10f)][_0x1edc0f(0x10e)];_0x1eb58e[_0x1edc0f(0xff)](_0x5ee0e1);break;}}}),_0x12bed1(this[_0x1af93c(0x152)],_0x1eb58e);}));}[_0x161f25(0x164)](){const _0x2a16ef=_0x161f25;this[_0x2a16ef(0x123)](this[_0x2a16ef(0x111)][_0x2a16ef(0x13b)][_0x2a16ef(0x136)](async _0x23bf23=>{const _0x184f43=_0x2a16ef;var _0x17668d,_0x31884a,_0x29f10a,_0x55dcad;const _0x88996e=(_0x17668d=this[_0x184f43(0x16a)][_0x184f43(0x120)](_0x23bf23[_0x184f43(0x146)])[_0x184f43(0x163)](_0x24517a=>_0x24517a[_0x184f43(0x13d)]===_0x23bf23[_0x184f43(0x13d)]))==null?void 0x0:_0x17668d['root'];if(!_0x88996e)return;const {unitId:_0x14f308,subUnitId:_0x431d3d}=_0x88996e;switch(_0x23bf23[_0x184f43(0x130)]&&this['_userService'][_0x184f43(0x12d)](_0x23bf23['user']),_0x23bf23['type']){case _0x4df7a0['Add']:break;case _0x4df7a0['Reply']:{this[_0x184f43(0x16a)][_0x184f43(0xfe)](_0x14f308,_0x431d3d,{'unitId':_0x14f308,'subUnitId':_0x431d3d,'ref':'','id':_0x23bf23[_0x184f43(0x116)],'dT':_0x40085c(+_0x23bf23[_0x184f43(0x108)]),'threadId':_0x23bf23[_0x184f43(0x13d)],'personId':(_0x29f10a=(_0x31884a=_0x23bf23[_0x184f43(0x130)])==null?void 0x0:_0x31884a['userID'])!=null?_0x29f10a:_0x23bf23[_0x184f43(0x103)],'text':JSON[_0x184f43(0x10a)](_0x23bf23[_0x184f43(0x13a)]),'parentId':_0x88996e['id']});break;}case _0x4df7a0[_0x184f43(0x16f)]:{const _0x5322c2=this[_0x184f43(0x16a)]['getComment'](_0x14f308,_0x431d3d,_0x23bf23[_0x184f43(0x116)]);_0x5322c2&&_0x5322c2['parentId']&&this[_0x184f43(0x16a)][_0x184f43(0x172)](_0x14f308,_0x431d3d,_0x23bf23[_0x184f43(0x116)]);break;}case _0x4df7a0[_0x184f43(0x16b)]:{this[_0x184f43(0x16a)]['updateComment'](_0x14f308,_0x431d3d,{'commentId':_0x23bf23['replyId'],'text':JSON[_0x184f43(0x10a)](_0x23bf23[_0x184f43(0x13a)])});break;}case _0x4df7a0[_0x184f43(0x179)]:{const _0x7f02b1=(_0x55dcad=this[_0x184f43(0x16a)][_0x184f43(0x120)](_0x23bf23[_0x184f43(0x146)])['find'](_0xf06458=>_0xf06458[_0x184f43(0x13d)]===_0x23bf23['threadId']))==null?void 0x0:_0x55dcad['root'];_0x7f02b1&&this['_threadCommentModel'][_0x184f43(0x12e)](_0x14f308,_0x431d3d,_0x7f02b1['id'],_0x23bf23[_0x184f43(0x142)]===_0x5a7e30['Solved']);break;}}}));}};_0x19f978=_0x75b723([_0xf6834f(0x0,_0x383e05[_0x161f25(0x102)](_0x1a8adc[_0x161f25(0x161)])),_0xf6834f(0x1,_0x383e05[_0x161f25(0x102)](_0x3587e2['ThreadCommentModel'])),_0xf6834f(0x2,_0x383e05['Inject'](_0x383e05['UserManagerService'])),_0xf6834f(0x3,_0x383e05[_0x161f25(0x102)](_0x383e05[_0x161f25(0x124)]))],_0x19f978);const _0xb78c8e='thread-comment-data-source.config',_0x1be899={};var _0x1a92e3=Object['getOwnPropertyDescriptor'],_0x4657c8=(_0x189540,_0x3167d4,_0x283627,_0x46a4be)=>{const _0xa6992a=_0x161f25;for(var _0x193640=_0x46a4be>0x1?void 0x0:_0x46a4be?_0x1a92e3(_0x3167d4,_0x283627):_0x3167d4,_0x4dd968=_0x189540[_0xa6992a(0x162)]-0x1,_0x4832e2;_0x4dd968>=0x0;_0x4dd968--)(_0x4832e2=_0x189540[_0x4dd968])&&(_0x193640=_0x4832e2(_0x193640)||_0x193640);return _0x193640;},_0x1d05fe=(_0x34e74f,_0x594343)=>(_0x4f5397,_0xba05b3)=>_0x594343(_0x4f5397,_0xba05b3,_0x34e74f);function _0x483b39(_0x4ec857,_0x4f616a){const _0x420c75=_0x161f25,_0x25fd10=_0x4ec857[_0x420c75(0x131)][0x0];return{..._0x4f616a,'id':_0x25fd10[_0x420c75(0x116)],'resolved':_0x4ec857[_0x420c75(0x142)]===0x1,'dT':_0x40085c(_0x25fd10['createTimestamp']),'personId':_0x25fd10[_0x420c75(0x103)],'threadId':_0x25fd10[_0x420c75(0x13d)]};}function _0x11e7e9(_0xce931d,_0x43772e,_0x1a23b8){const _0xbeab23=_0x161f25;var _0x154852,_0x1e4b75;if(((_0x1e4b75=(_0x154852=_0xce931d==null?void 0x0:_0xce931d['replies'])==null?void 0x0:_0x154852[_0xbeab23(0x162)])!=null?_0x1e4b75:0x0)>0x0){const _0x5be567=(_0x512f60,_0x21fb42)=>({'id':_0x512f60['replyId'],'threadId':_0x512f60['threadId'],'dT':_0x40085c(_0x512f60[_0xbeab23(0x108)]),'personId':_0x512f60[_0xbeab23(0x103)],'resolved':_0xce931d[_0xbeab23(0x142)]===_0x5a7e30[_0xbeab23(0x12f)],'unitId':_0x43772e,'subUnitId':_0x1a23b8,'text':JSON[_0xbeab23(0x10a)](_0x512f60[_0xbeab23(0x13a)]),'parentId':_0x21fb42}),_0x2e381e=_0x5be567(_0xce931d[_0xbeab23(0x131)][0x0]);return{..._0x2e381e,'children':_0xce931d['replies'][_0xbeab23(0x159)](0x1)['map'](_0x4372cd=>_0x5be567(_0x4372cd,_0x2e381e['id']))};}return null;}let _0x1a6ec0=class{constructor(_0x30553e,_0x138299,_0x6e20a6,_0x60ced8){const _0x2bce5c=_0x161f25;this[_0x2bce5c(0x13f)]=_0x30553e,this[_0x2bce5c(0x13c)]=_0x138299,this[_0x2bce5c(0x115)]=_0x6e20a6,this[_0x2bce5c(0x152)]=_0x60ced8;}async[_0x161f25(0xfe)](_0x5da4a1){const _0x55afee=_0x161f25;var _0x56e4c0,_0x276f3b;const {parentId:_0x16f94e,unitId:_0x2f602f,text:_0x21aca8,threadId:_0x453526}=_0x5da4a1,_0x5f4468=(_0x276f3b=(_0x56e4c0=_0x21aca8[_0x55afee(0xfd)])==null?void 0x0:_0x56e4c0[_0x55afee(0x174)](_0x10f5d8=>_0x10f5d8[_0x55afee(0x166)]===_0x383e05[_0x55afee(0x156)][_0x55afee(0x119)])[_0x55afee(0x12c)](_0x1e4378=>_0x1e4378[_0x55afee(0x15b)]))!=null?_0x276f3b:[],_0x3557c8=JSON[_0x55afee(0x158)](_0x21aca8),_0x365a82=(await this['_sessionService'][_0x55afee(0x15a)](_0x2f602f))[_0x55afee(0x139)]();if(_0x16f94e){const _0x36aca4={'memberId':_0x365a82,'unitId':_0x2f602f,'content':_0x3557c8,'mention':_0x5f4468,'threadId':_0x453526},_0x3ffa56=(await this['_httpService'][_0x55afee(0x15f)](_0x55afee(0x14e)+_0x2f602f+'/reply',{'body':_0x36aca4}))[_0x55afee(0x137)][_0x55afee(0x141)];return{..._0x5da4a1,'id':_0x3ffa56[_0x55afee(0x116)],'dT':_0x383e05[_0x55afee(0x144)](+_0x3ffa56['createTimestamp'])[_0x55afee(0x145)](_0x55afee(0x14c)),'personId':_0x3ffa56['userId']};}else{const _0x1d17a8={'memberId':_0x365a82,'unitId':_0x2f602f,'content':_0x3557c8,'mention':_0x5f4468},_0x3a4691=await this['_httpService'][_0x55afee(0x15f)](_0x55afee(0x14e)+_0x2f602f+_0x55afee(0x13e),{'body':_0x1d17a8});return _0x483b39(_0x3a4691['body'][_0x55afee(0x14f)],_0x5da4a1);}}async['updateComment'](_0x5c0097){const _0xa847ad=_0x161f25;var _0x4b2fc4,_0x45c551;const {text:_0xff7475,unitId:_0x4d3436}=_0x5c0097,_0x4bc1e4=(_0x45c551=(_0x4b2fc4=_0xff7475[_0xa847ad(0xfd)])==null?void 0x0:_0x4b2fc4[_0xa847ad(0x174)](_0x4a7414=>_0x4a7414['rangeType']===_0x383e05[_0xa847ad(0x156)][_0xa847ad(0x119)])['map'](_0x29c931=>_0x29c931['rangeId']))!=null?_0x45c551:[],_0x7920b6=JSON[_0xa847ad(0x158)](_0xff7475),_0x330541=_0x5c0097[_0xa847ad(0x13d)],_0xb0e858=_0x5c0097['id'],_0x446224={'memberId':(await this[_0xa847ad(0x115)]['requireSession'](_0x4d3436))[_0xa847ad(0x139)](),'unitId':_0x4d3436,'threadId':_0x330541,'mention':_0x4bc1e4,'content':_0x7920b6,'replyId':_0xb0e858},_0xb9821b=await this[_0xa847ad(0x13f)]['post'](_0xa847ad(0x14e)+_0x4d3436+'/edit',{'body':_0x446224});return!_0xb9821b[_0xa847ad(0x137)]['error']||_0xb9821b[_0xa847ad(0x137)][_0xa847ad(0x101)]['code']===0x1;}async[_0x161f25(0x12e)](_0x1ac5c1){const _0x1d9859=_0x161f25,{unitId:_0x556f22}=_0x1ac5c1,_0x2ac2a9=_0x1ac5c1[_0x1d9859(0x13d)],_0x268b40={'memberId':this[_0x1d9859(0x13c)][_0x1d9859(0x112)]()[_0x1d9859(0x171)],'unitId':_0x556f22,'threadId':_0x2ac2a9,'solved':_0x1ac5c1[_0x1d9859(0x15c)]?_0x5a7e30['Solved']:_0x5a7e30[_0x1d9859(0x168)]},_0x403035=await this[_0x1d9859(0x13f)][_0x1d9859(0x15f)](_0x1d9859(0x14e)+_0x556f22+'/solved',{'body':_0x268b40});return!_0x403035['body'][_0x1d9859(0x101)]||_0x403035['body'][_0x1d9859(0x101)]['code']===0x1;}async[_0x161f25(0x172)](_0x1a6488,_0x4f063d,_0x4b5f49,_0x2cb2b1){const _0x513941=_0x161f25,_0x53b86c={'memberId':(await this['_sessionService'][_0x513941(0x15a)](_0x1a6488))['getMemberID'](),'threadId':_0x4b5f49,'replyId':_0x2cb2b1,'unitId':_0x1a6488},_0x1e8d70=await this[_0x513941(0x13f)][_0x513941(0x15f)](_0x513941(0x14e)+_0x1a6488+_0x513941(0x110),{'body':_0x53b86c});return!_0x1e8d70[_0x513941(0x137)][_0x513941(0x101)]||_0x1e8d70[_0x513941(0x137)][_0x513941(0x101)]['code']===0x1;}async['listComments'](_0x404b5f,_0x59bc4f,_0x2acad2){const _0x5af83d=_0x161f25,_0x341f98={'unitId':_0x404b5f,'threadId':_0x2acad2},_0x5d2d54=await this[_0x5af83d(0x13f)]['post'](_0x5af83d(0x14e)+_0x404b5f+'/list',{'body':_0x341f98}),_0x35bf45=_0x2acad2[_0x5af83d(0x12c)](_0x43530c=>_0x11e7e9(_0x5d2d54[_0x5af83d(0x137)][_0x5af83d(0x140)][_0x43530c],_0x404b5f,_0x59bc4f))[_0x5af83d(0x174)](Boolean);return Object[_0x5af83d(0x149)](_0x5d2d54[_0x5af83d(0x137)][_0x5af83d(0x151)])[_0x5af83d(0x132)](_0x221990=>{const _0x561ffe=_0x5af83d;this[_0x561ffe(0x13c)][_0x561ffe(0x12d)](_0x221990);}),_0x35bf45;}[_0x161f25(0x16e)](_0x3b1468){const _0x373431=_0x161f25;return{'id':_0x3b1468['id'],'threadId':_0x3b1468[_0x373431(0x13d)],'ref':_0x3b1468[_0x373431(0xfc)]};}};_0x1a6ec0=_0x4657c8([_0x1d05fe(0x0,_0x383e05['Inject'](_0x1cf243[_0x161f25(0x177)])),_0x1d05fe(0x1,_0x383e05[_0x161f25(0x102)](_0x383e05[_0x161f25(0x100)])),_0x1d05fe(0x2,_0x383e05[_0x161f25(0x102)](_0x1a8adc[_0x161f25(0x150)])),_0x1d05fe(0x3,_0x383e05[_0x161f25(0x102)](_0x383e05[_0x161f25(0x124)]))],_0x1a6ec0);var _0x594411=Object['getOwnPropertyDescriptor'],_0x2777ed=(_0x303caa,_0x1d67ee,_0x1fa75d,_0x160319)=>{const _0x37ea89=_0x161f25;for(var _0xf9ac50=_0x160319>0x1?void 0x0:_0x160319?_0x594411(_0x1d67ee,_0x1fa75d):_0x1d67ee,_0x712dbe=_0x303caa[_0x37ea89(0x162)]-0x1,_0x2f0093;_0x712dbe>=0x0;_0x712dbe--)(_0x2f0093=_0x303caa[_0x712dbe])&&(_0xf9ac50=_0x2f0093(_0xf9ac50)||_0xf9ac50);return _0xf9ac50;},_0x30e29a=(_0x29336b,_0x51c9f1)=>(_0x3b8d5f,_0x40313d)=>_0x51c9f1(_0x3b8d5f,_0x40313d,_0x29336b);let _0x53c45d=class extends _0x383e05['Disposable']{constructor(_0x453851,_0x1ad0d7){const _0x5e9948=_0x161f25;super(),this[_0x5e9948(0x133)]=_0x453851,this[_0x5e9948(0x107)]=_0x1ad0d7,this[_0x5e9948(0x105)]();}[_0x161f25(0x105)](){const _0x5cf4c2=_0x161f25;this[_0x5cf4c2(0x133)][_0x5cf4c2(0x12a)]=this['_threadCommentDataSource'],this[_0x5cf4c2(0x133)][_0x5cf4c2(0x16c)]=!0x1;}};_0x53c45d=_0x2777ed([_0x30e29a(0x0,_0x3587e2[_0x161f25(0x11c)]),_0x30e29a(0x1,_0x383e05[_0x161f25(0x102)](_0x1a6ec0))],_0x53c45d);var _0x23e2b0=Object[_0x161f25(0x117)],_0x1074aa=Object[_0x161f25(0x11d)],_0xefd8d5=(_0x1da67e,_0x21fe53,_0x2507e1)=>_0x21fe53 in _0x1da67e?_0x23e2b0(_0x1da67e,_0x21fe53,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2507e1}):_0x1da67e[_0x21fe53]=_0x2507e1,_0x1ec4a3=(_0xaeef33,_0x530bbc,_0x3b7154,_0x14232a)=>{for(var _0x3369dd=_0x14232a>0x1?void 0x0:_0x14232a?_0x1074aa(_0x530bbc,_0x3b7154):_0x530bbc,_0x321c2a=_0xaeef33['length']-0x1,_0x162e8a;_0x321c2a>=0x0;_0x321c2a--)(_0x162e8a=_0xaeef33[_0x321c2a])&&(_0x3369dd=_0x162e8a(_0x3369dd)||_0x3369dd);return _0x3369dd;},_0x3bb426=(_0x715390,_0x304e75)=>(_0x2075a9,_0x3c4c91)=>_0x304e75(_0x2075a9,_0x3c4c91,_0x715390),_0x3b36cd=(_0x9283e8,_0x471066,_0x6ece6c)=>_0xefd8d5(_0x9283e8,typeof _0x471066!='symbol'?_0x471066+'':_0x471066,_0x6ece6c);_0x5c21b9[_0x161f25(0x134)]=class extends _0x383e05[_0x161f25(0x11f)]{constructor(_0x4b8b21=_0x1be899,_0x328df4,_0xd935e4){const _0x1f206=_0x161f25;super(),this[_0x1f206(0x14d)]=_0x4b8b21,this[_0x1f206(0x152)]=_0x328df4,this['_configService']=_0xd935e4;const {..._0x393109}=_0x383e05[_0x1f206(0x125)]({},_0x1be899,this[_0x1f206(0x14d)]);this[_0x1f206(0x143)]['setConfig'](_0xb78c8e,_0x393109);}[_0x161f25(0x121)](){const _0x434961=_0x161f25;[[_0x1a6ec0],[_0x53c45d],[_0x19f978]][_0x434961(0x132)](_0x21fe9c=>{const _0x4e0fbb=_0x434961;this[_0x4e0fbb(0x152)][_0x4e0fbb(0xff)](_0x21fe9c);});}[_0x161f25(0x148)](){const _0x3c35fa=_0x161f25;this[_0x3c35fa(0x152)]['get'](_0x53c45d),this[_0x3c35fa(0x152)][_0x3c35fa(0x165)](_0x19f978);}},_0x3b36cd(_0x5c21b9[_0x161f25(0x134)],_0x161f25(0x170),_0x5bcb87),_0x3b36cd(_0x5c21b9[_0x161f25(0x134)],_0x161f25(0x128),_0x383e05['UniverInstanceType'][_0x161f25(0x14b)]),_0x5c21b9['UniverThreadCommentDataSourcePlugin']=_0x1ec4a3([_0x383e05['DependentOn'](_0x2ba6e9[_0x161f25(0x11b)],_0x1a8adc[_0x161f25(0x154)],_0x4ce85d[_0x161f25(0x175)]),_0x3bb426(0x1,_0x383e05[_0x161f25(0x102)](_0x383e05[_0x161f25(0x124)])),_0x3bb426(0x2,_0x383e05[_0x161f25(0x167)])],_0x5c21b9[_0x161f25(0x134)]),Object[_0x161f25(0x117)](_0x5c21b9,Symbol[_0x161f25(0x160)],{'value':_0x161f25(0x114)});}));function _0xd8b8(_0x47285c,_0x4d0857){const _0x5cfd8a=_0x5cfd();return _0xd8b8=function(_0xd8b827,_0x202e3f){_0xd8b827=_0xd8b827-0xfa;let _0x4c4e53=_0x5cfd8a[_0xd8b827];return _0x4c4e53;},_0xd8b8(_0x47285c,_0x4d0857);}function _0x5cfd(){const _0x413871=['_commentService','getCurrentUser','@univerjs-pro/collaboration-client','Module','_sessionService','replyId','defineProperty','UniverCore','COMMENT','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverThreadCommentUIPlugin','IThreadCommentDataSourceService','getOwnPropertyDescriptor','@univerjs-pro/license','Plugin','getUnit','onStarting','7AXPssr','disposeWithMe','Injector','merge','@univerjs/thread-comment-ui','@univerjs/network','type','68960DSeCKM','dataSource','rxjs','map','addUser','resolveComment','Solved','user','replies','forEach','_threadCommentDataSourceService','UniverThreadCommentDataSourcePlugin','287328oBFOch','subscribe','body','@univerjs/core','getMemberID','content','commentUpdate$','_userService','threadId','/add','_httpService','comments','reply','solved','_configService','dayjs','format','unitId','object','onReady','values','Disposable','UNIVER_UNKNOWN','YYYY/MM/DD\x20HH:mm','_config','/universer-api/comment/unit/','comment','CollaborationSessionService','users','_injector','getUser','UniverCollaborationClientPlugin','Reply','CustomRangeType','UniverNetwork','stringify','slice','requireSession','rangeId','resolved','80651adwlVh','Add','post','toStringTag','CommentService','length','find','_init','get','rangeType','IConfigService','OpenOrReOpen','805085FwnQzw','_threadCommentModel','Edit','syncUpdateMutationToColla','1253634pixIkM','saveCommentToSnapshot','Delete','pluginName','userID','deleteComment','delete','filter','UniverLicensePlugin','_initUserSync','HTTPService','@univerjs/thread-comment','Solve','UniverProCollaborationClient','UniverThreadComment','ref','customRanges','addComment','add','UserManagerService','error','Inject','userId','490oRAwUx','_initDataSource','UniverThreadCommentUi','_threadCommentDataSource','createTimestamp','3690018mGWSOX','parse','129KALhUb','function','UNRECOGNIZED','personId','payload','/delete'];_0x5cfd=function(){return _0x413871;};return _0x5cfd();}
|
|
1
|
+
(function(_0x256a25,_0x139a5f){const _0x206764=_0x10b5,_0x39a8e0=_0x256a25();while(!![]){try{const _0x17b13e=-parseInt(_0x206764(0x80))/0x1+-parseInt(_0x206764(0xe3))/0x2*(-parseInt(_0x206764(0xc3))/0x3)+parseInt(_0x206764(0x93))/0x4*(-parseInt(_0x206764(0xc7))/0x5)+-parseInt(_0x206764(0xf2))/0x6*(-parseInt(_0x206764(0xba))/0x7)+-parseInt(_0x206764(0x7d))/0x8*(-parseInt(_0x206764(0x89))/0x9)+-parseInt(_0x206764(0xa2))/0xa+-parseInt(_0x206764(0x9c))/0xb*(-parseInt(_0x206764(0x84))/0xc);if(_0x17b13e===_0x139a5f)break;else _0x39a8e0['push'](_0x39a8e0['shift']());}catch(_0x39d1e8){_0x39a8e0['push'](_0x39a8e0['shift']());}}}(_0x358f,0x2e057),function(_0x1adeae,_0x3b98bf){const _0x124386=_0x10b5;typeof exports=='object'&&typeof module<'u'?_0x3b98bf(exports,require(_0x124386(0xd8)),require('@univerjs-pro/license'),require('@univerjs/core'),require(_0x124386(0xa7)),require('@univerjs/thread-comment'),require(_0x124386(0xf9)),require(_0x124386(0xf5))):typeof define==_0x124386(0x85)&&define[_0x124386(0xcc)]?define([_0x124386(0x9d),_0x124386(0xd8),'@univerjs-pro/license',_0x124386(0xe7),_0x124386(0xa7),_0x124386(0xea),_0x124386(0xf9),'@univerjs/network'],_0x3b98bf):(_0x1adeae=typeof globalThis<'u'?globalThis:_0x1adeae||self,_0x3b98bf(_0x1adeae[_0x124386(0xdf)]={},_0x1adeae['UniverProCollaborationClient'],_0x1adeae[_0x124386(0xc8)],_0x1adeae[_0x124386(0xb8)],_0x1adeae[_0x124386(0x98)],_0x1adeae[_0x124386(0xed)],_0x1adeae[_0x124386(0xf9)],_0x1adeae['UniverNetwork']));}(this,function(_0x482946,_0x1248a6,_0x1c8814,_0x161faf,_0x4a4d91,_0x2141f3,_0x56b6c7,_0x762715){'use strict';const _0x22c917=_0x10b5;const _0x2ddcb3='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x4d20a8=(_0xacef70=>(_0xacef70[_0xacef70[_0x22c917(0xf4)]=0x0]=_0x22c917(0xf4),_0xacef70[_0xacef70[_0x22c917(0xd4)]=0x1]=_0x22c917(0xd4),_0xacef70[_0xacef70[_0x22c917(0xbc)]=-0x1]=_0x22c917(0xbc),_0xacef70))(_0x4d20a8||{}),_0x2ca181=(_0x421d69=>(_0x421d69[_0x421d69[_0x22c917(0xc6)]=0x0]=_0x22c917(0xc6),_0x421d69[_0x421d69[_0x22c917(0xfa)]=0x1]='Add',_0x421d69[_0x421d69[_0x22c917(0xe5)]=0x2]=_0x22c917(0xe5),_0x421d69[_0x421d69['Edit']=0x3]=_0x22c917(0xd9),_0x421d69[_0x421d69[_0x22c917(0xa5)]=0x4]=_0x22c917(0xa5),_0x421d69[_0x421d69['Solve']=0x5]=_0x22c917(0x9f),_0x421d69[_0x421d69[_0x22c917(0xbc)]=-0x1]=_0x22c917(0xbc),_0x421d69))(_0x2ca181||{});const _0x10278d=_0x4bb8a3=>_0x161faf['dayjs'](new Date(+_0x4bb8a3))[_0x22c917(0xa9)](_0x22c917(0x7c)),_0x5bff71=async(_0xa5a2b2,_0x1a4518)=>{const _0x4442ac=_0x22c917,_0x51b24e=_0xa5a2b2['get'](_0x161faf[_0x4442ac(0xe0)]),_0x3af086=_0xa5a2b2[_0x4442ac(0xbf)](_0x762715['HTTPService']);_0x1a4518[_0x4442ac(0xfc)](_0x47668c=>{const _0x46bbf7=_0x4442ac;_0x51b24e[_0x46bbf7(0xa1)](_0x47668c)&&_0x1a4518[_0x46bbf7(0xbd)](_0x47668c);}),_0x1a4518[_0x4442ac(0xe1)]&&(await _0x3af086[_0x4442ac(0xbf)](_0x4442ac(0xee),{'params':{'userIDs':[..._0x1a4518]}}))[_0x4442ac(0xe8)]['users']['forEach'](_0x14dfd0=>{const _0xfa259=_0x4442ac;_0x14dfd0&&_0x51b24e[_0xfa259(0xc9)](_0x14dfd0);});};var _0x48f6fe=Object[_0x22c917(0xa8)],_0x3ba2e6=(_0x2829c3,_0x201378,_0x105684,_0x584708)=>{for(var _0x304eb0=_0x584708>0x1?void 0x0:_0x584708?_0x48f6fe(_0x201378,_0x105684):_0x201378,_0x27b02f=_0x2829c3['length']-0x1,_0x420857;_0x27b02f>=0x0;_0x27b02f--)(_0x420857=_0x2829c3[_0x27b02f])&&(_0x304eb0=_0x420857(_0x304eb0)||_0x304eb0);return _0x304eb0;},_0x3aa2b8=(_0x3e2943,_0x5cbd18)=>(_0x3d0046,_0x1280d2)=>_0x5cbd18(_0x3d0046,_0x1280d2,_0x3e2943);let _0x50f571=class extends _0x161faf[_0x22c917(0x82)]{constructor(_0x1f45da,_0xe84c94,_0x1cf11c,_0x5db679){const _0x4be104=_0x22c917;super(),this['_commentService']=_0x1f45da,this[_0x4be104(0x9a)]=_0xe84c94,this['_userService']=_0x1cf11c,this[_0x4be104(0x8f)]=_0x5db679,this[_0x4be104(0x9e)](),this[_0x4be104(0x7f)]();}[_0x22c917(0x7f)](){const _0x1fac08=_0x22c917;this[_0x1fac08(0xaa)](this[_0x1fac08(0x9a)][_0x1fac08(0xc0)][_0x1fac08(0x87)](_0x56b6c7['bufferTime'](0x10))['subscribe'](_0x3a2de1=>{const _0x5e417f=_0x1fac08,_0x16eb12=new Set();_0x3a2de1[_0x5e417f(0xfc)](_0xaca53=>{const _0x3fad0a=_0x5e417f;switch(_0xaca53[_0x3fad0a(0xf6)]){case _0x3fad0a(0xd1):{const _0x4a906b=_0xaca53[_0x3fad0a(0xca)]['personId'];_0x16eb12[_0x3fad0a(0xd1)](_0x4a906b);break;}}}),_0x5bff71(this[_0x5e417f(0x8f)],_0x16eb12);}));}[_0x22c917(0x9e)](){const _0xc2bd5a=_0x22c917;this[_0xc2bd5a(0xaa)](this[_0xc2bd5a(0xd5)][_0xc2bd5a(0xc0)][_0xc2bd5a(0xb5)](async _0x31d9ea=>{const _0x2737f1=_0xc2bd5a;var _0x1298d5,_0x324db3,_0x37c0d3,_0x2f639e;const _0x1c7f6a=(_0x1298d5=this['_threadCommentModel'][_0x2737f1(0xad)](_0x31d9ea['unitId'])[_0x2737f1(0xfd)](_0x5c8c02=>_0x5c8c02[_0x2737f1(0xbe)]===_0x31d9ea[_0x2737f1(0xbe)]))==null?void 0x0:_0x1298d5[_0x2737f1(0xcb)];if(!_0x1c7f6a)return;const {unitId:_0x2fa4c6,subUnitId:_0x4a741e}=_0x1c7f6a;switch(_0x31d9ea[_0x2737f1(0xe9)]&&this[_0x2737f1(0x8b)][_0x2737f1(0xc9)](_0x31d9ea[_0x2737f1(0xe9)]),_0x31d9ea['type']){case _0x2ca181[_0x2737f1(0xfa)]:break;case _0x2ca181[_0x2737f1(0xe5)]:{this[_0x2737f1(0x9a)][_0x2737f1(0xd2)](_0x2fa4c6,_0x4a741e,{'unitId':_0x2fa4c6,'subUnitId':_0x4a741e,'ref':'','id':_0x31d9ea[_0x2737f1(0x8d)],'dT':_0x10278d(+_0x31d9ea[_0x2737f1(0xc2)]),'threadId':_0x31d9ea[_0x2737f1(0xbe)],'personId':(_0x37c0d3=(_0x324db3=_0x31d9ea[_0x2737f1(0xe9)])==null?void 0x0:_0x324db3[_0x2737f1(0xae)])!=null?_0x37c0d3:_0x31d9ea['userId'],'text':JSON['parse'](_0x31d9ea['content']),'parentId':_0x1c7f6a['id']});break;}case _0x2ca181['Delete']:{const _0x1a3aa1=this[_0x2737f1(0x9a)][_0x2737f1(0xd3)](_0x2fa4c6,_0x4a741e,_0x31d9ea[_0x2737f1(0x8d)]);_0x1a3aa1&&_0x1a3aa1['parentId']&&this[_0x2737f1(0x9a)]['deleteComment'](_0x2fa4c6,_0x4a741e,_0x31d9ea[_0x2737f1(0x8d)]);break;}case _0x2ca181[_0x2737f1(0xd9)]:{this[_0x2737f1(0x9a)][_0x2737f1(0x91)](_0x2fa4c6,_0x4a741e,{'commentId':_0x31d9ea['replyId'],'text':JSON[_0x2737f1(0x90)](_0x31d9ea[_0x2737f1(0xa3)])});break;}case _0x2ca181['Solve']:{const _0x2967a7=(_0x2f639e=this[_0x2737f1(0x9a)]['getUnit'](_0x31d9ea[_0x2737f1(0xb7)])[_0x2737f1(0xfd)](_0x540631=>_0x540631[_0x2737f1(0xbe)]===_0x31d9ea[_0x2737f1(0xbe)]))==null?void 0x0:_0x2f639e[_0x2737f1(0xcb)];_0x2967a7&&this[_0x2737f1(0x9a)]['resolveComment'](_0x2fa4c6,_0x4a741e,_0x2967a7['id'],_0x31d9ea[_0x2737f1(0xbb)]===_0x4d20a8['Solved']);break;}}}));}};_0x50f571=_0x3ba2e6([_0x3aa2b8(0x0,_0x161faf[_0x22c917(0x92)](_0x1248a6[_0x22c917(0xef)])),_0x3aa2b8(0x1,_0x161faf[_0x22c917(0x92)](_0x2141f3[_0x22c917(0x88)])),_0x3aa2b8(0x2,_0x161faf[_0x22c917(0x92)](_0x161faf[_0x22c917(0xe0)])),_0x3aa2b8(0x3,_0x161faf[_0x22c917(0x92)](_0x161faf[_0x22c917(0x7e)]))],_0x50f571);const _0x185b74='thread-comment-data-source.config',_0x4c387e={};var _0x58e6ca=Object[_0x22c917(0xa8)],_0x9b199b=(_0x55f0b9,_0x4a7c5f,_0xf34dbc,_0x24b613)=>{const _0x23fd7e=_0x22c917;for(var _0x6453bf=_0x24b613>0x1?void 0x0:_0x24b613?_0x58e6ca(_0x4a7c5f,_0xf34dbc):_0x4a7c5f,_0x30f776=_0x55f0b9[_0x23fd7e(0xe4)]-0x1,_0x323fe8;_0x30f776>=0x0;_0x30f776--)(_0x323fe8=_0x55f0b9[_0x30f776])&&(_0x6453bf=_0x323fe8(_0x6453bf)||_0x6453bf);return _0x6453bf;},_0x1af560=(_0x1fdd61,_0x3ae31d)=>(_0x26d15d,_0x4aa72b)=>_0x3ae31d(_0x26d15d,_0x4aa72b,_0x1fdd61);function _0x213c9b(_0x222d92,_0x4e5ddb){const _0x182f63=_0x22c917,_0x3430e2=_0x222d92[_0x182f63(0xc5)][0x0];return{..._0x4e5ddb,'id':_0x3430e2[_0x182f63(0x8d)],'resolved':_0x222d92[_0x182f63(0xbb)]===0x1,'dT':_0x10278d(_0x3430e2[_0x182f63(0xc2)]),'personId':_0x3430e2[_0x182f63(0x96)],'threadId':_0x3430e2[_0x182f63(0xbe)]};}function _0x95384e(_0x2cbdde,_0x45a844,_0x4107a9){const _0x4bfe47=_0x22c917;var _0x5d2d73,_0x22322d;if(((_0x22322d=(_0x5d2d73=_0x2cbdde==null?void 0x0:_0x2cbdde['replies'])==null?void 0x0:_0x5d2d73['length'])!=null?_0x22322d:0x0)>0x0){const _0x589dda=(_0x253142,_0x141efd)=>({'id':_0x253142[_0x4bfe47(0x8d)],'threadId':_0x253142['threadId'],'dT':_0x10278d(_0x253142['createTimestamp']),'personId':_0x253142[_0x4bfe47(0x96)],'resolved':_0x2cbdde[_0x4bfe47(0xbb)]===_0x4d20a8[_0x4bfe47(0xd4)],'unitId':_0x45a844,'subUnitId':_0x4107a9,'text':JSON[_0x4bfe47(0x90)](_0x253142['content']),'parentId':_0x141efd}),_0x419428=_0x589dda(_0x2cbdde[_0x4bfe47(0xc5)][0x0]);return{..._0x419428,'children':_0x2cbdde[_0x4bfe47(0xc5)][_0x4bfe47(0x94)](0x1)[_0x4bfe47(0x7a)](_0x1ea8e3=>_0x589dda(_0x1ea8e3,_0x419428['id']))};}return null;}let _0x5074db=class{constructor(_0x185dbb,_0x5901b8,_0x5487ce,_0x1463c6){const _0xfe0576=_0x22c917;this[_0xfe0576(0xb6)]=_0x185dbb,this[_0xfe0576(0x8b)]=_0x5901b8,this['_sessionService']=_0x5487ce,this[_0xfe0576(0x8f)]=_0x1463c6;}async[_0x22c917(0xd2)](_0x23da96){const _0x321262=_0x22c917;var _0x3aadf0,_0xb1140f;const {parentId:_0x383e08,unitId:_0xeacd3f,text:_0x2188f7,threadId:_0x40dde2}=_0x23da96,_0x17f284=(_0xb1140f=(_0x3aadf0=_0x2188f7[_0x321262(0xdd)])==null?void 0x0:_0x3aadf0[_0x321262(0xec)](_0x5cec73=>_0x5cec73[_0x321262(0xc1)]===_0x161faf['CustomRangeType'][_0x321262(0xfb)])[_0x321262(0x7a)](_0x3cbc4a=>_0x3cbc4a[_0x321262(0xa4)]))!=null?_0xb1140f:[],_0x3bbad1=JSON[_0x321262(0xf8)](_0x2188f7),_0x1127b0=(await this[_0x321262(0x81)][_0x321262(0xcd)](_0xeacd3f))[_0x321262(0xab)]();if(_0x383e08){const _0xdf548={'memberId':_0x1127b0,'unitId':_0xeacd3f,'content':_0x3bbad1,'mention':_0x17f284,'threadId':_0x40dde2},_0xea1212=(await this['_httpService']['post'](_0x321262(0xaf)+_0xeacd3f+_0x321262(0xe2),{'body':_0xdf548}))[_0x321262(0xe8)][_0x321262(0x7b)];return{..._0x23da96,'id':_0xea1212[_0x321262(0x8d)],'dT':_0x161faf[_0x321262(0xd7)](+_0xea1212['createTimestamp'])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0xea1212[_0x321262(0x96)]};}else{const _0x8851b1={'memberId':_0x1127b0,'unitId':_0xeacd3f,'content':_0x3bbad1,'mention':_0x17f284},_0x495e76=await this[_0x321262(0xb6)][_0x321262(0x8a)]('/universer-api/comment/unit/'+_0xeacd3f+_0x321262(0x78),{'body':_0x8851b1});return _0x213c9b(_0x495e76['body']['comment'],_0x23da96);}}async[_0x22c917(0x91)](_0x15b171){const _0x4f533c=_0x22c917;var _0x2a02d6,_0x292c80;const {text:_0x12518c,unitId:_0x1502ba}=_0x15b171,_0x5c23d4=(_0x292c80=(_0x2a02d6=_0x12518c[_0x4f533c(0xdd)])==null?void 0x0:_0x2a02d6[_0x4f533c(0xec)](_0x5a915b=>_0x5a915b[_0x4f533c(0xc1)]===_0x161faf[_0x4f533c(0x9b)]['COMMENT'])[_0x4f533c(0x7a)](_0x2c3682=>_0x2c3682[_0x4f533c(0xa4)]))!=null?_0x292c80:[],_0x11a12f=JSON[_0x4f533c(0xf8)](_0x12518c),_0x1dc5e8=_0x15b171['threadId'],_0x1f9429=_0x15b171['id'],_0x404d82={'memberId':(await this[_0x4f533c(0x81)][_0x4f533c(0xcd)](_0x1502ba))[_0x4f533c(0xab)](),'unitId':_0x1502ba,'threadId':_0x1dc5e8,'mention':_0x5c23d4,'content':_0x11a12f,'replyId':_0x1f9429},_0xaca9b7=await this[_0x4f533c(0xb6)][_0x4f533c(0x8a)](_0x4f533c(0xaf)+_0x1502ba+'/edit',{'body':_0x404d82});return!_0xaca9b7['body'][_0x4f533c(0xeb)]||_0xaca9b7[_0x4f533c(0xe8)][_0x4f533c(0xeb)]['code']===0x1;}async['resolveComment'](_0x481dc7){const _0x143ba5=_0x22c917,{unitId:_0x33601f}=_0x481dc7,_0x4795a6=_0x481dc7['threadId'],_0x18871e={'memberId':this[_0x143ba5(0x8b)][_0x143ba5(0xf7)]()[_0x143ba5(0xae)],'unitId':_0x33601f,'threadId':_0x4795a6,'solved':_0x481dc7[_0x143ba5(0xcf)]?_0x4d20a8['Solved']:_0x4d20a8['OpenOrReOpen']},_0x50fad0=await this[_0x143ba5(0xb6)]['post']('/universer-api/comment/unit/'+_0x33601f+'/solved',{'body':_0x18871e});return!_0x50fad0['body']['error']||_0x50fad0[_0x143ba5(0xe8)]['error'][_0x143ba5(0xde)]===0x1;}async[_0x22c917(0x83)](_0x37603a,_0x52947e,_0x1f3009,_0x41925f){const _0x283b40=_0x22c917,_0x4ce237={'memberId':(await this[_0x283b40(0x81)]['requireSession'](_0x37603a))['getMemberID'](),'threadId':_0x1f3009,'replyId':_0x41925f,'unitId':_0x37603a},_0x329978=await this['_httpService']['post'](_0x283b40(0xaf)+_0x37603a+_0x283b40(0xc4),{'body':_0x4ce237});return!_0x329978[_0x283b40(0xe8)]['error']||_0x329978[_0x283b40(0xe8)][_0x283b40(0xeb)][_0x283b40(0xde)]===0x1;}async[_0x22c917(0xe6)](_0x3fab48,_0x39225f,_0x52b6c9){const _0x56f55d=_0x22c917,_0x21f3a9={'unitId':_0x3fab48,'threadId':_0x52b6c9},_0x2f636a=await this[_0x56f55d(0xb6)]['post'](_0x56f55d(0xaf)+_0x3fab48+'/list',{'body':_0x21f3a9}),_0x121195=_0x52b6c9['map'](_0x328088=>_0x95384e(_0x2f636a[_0x56f55d(0xe8)][_0x56f55d(0x97)][_0x328088],_0x3fab48,_0x39225f))[_0x56f55d(0xec)](Boolean);return Object['values'](_0x2f636a[_0x56f55d(0xe8)][_0x56f55d(0x8c)])['forEach'](_0x28fc38=>{const _0x30b9b3=_0x56f55d;this[_0x30b9b3(0x8b)][_0x30b9b3(0xc9)](_0x28fc38);}),_0x121195;}[_0x22c917(0xb2)](_0x29d534){const _0x2dff60=_0x22c917;return{'id':_0x29d534['id'],'threadId':_0x29d534[_0x2dff60(0xbe)],'ref':_0x29d534[_0x2dff60(0xa6)]};}};_0x5074db=_0x9b199b([_0x1af560(0x0,_0x161faf[_0x22c917(0x92)](_0x762715[_0x22c917(0x86)])),_0x1af560(0x1,_0x161faf[_0x22c917(0x92)](_0x161faf[_0x22c917(0xe0)])),_0x1af560(0x2,_0x161faf[_0x22c917(0x92)](_0x1248a6[_0x22c917(0xda)])),_0x1af560(0x3,_0x161faf[_0x22c917(0x92)](_0x161faf[_0x22c917(0x7e)]))],_0x5074db);var _0x402a70=Object[_0x22c917(0xa8)],_0x40de80=(_0x4c9d86,_0x16f4ab,_0x231b67,_0x1f0256)=>{for(var _0x1fbee5=_0x1f0256>0x1?void 0x0:_0x1f0256?_0x402a70(_0x16f4ab,_0x231b67):_0x16f4ab,_0x296f13=_0x4c9d86['length']-0x1,_0x162772;_0x296f13>=0x0;_0x296f13--)(_0x162772=_0x4c9d86[_0x296f13])&&(_0x1fbee5=_0x162772(_0x1fbee5)||_0x1fbee5);return _0x1fbee5;},_0x1cd730=(_0x4b2789,_0xf8f89e)=>(_0x7bd0d9,_0x4b038b)=>_0xf8f89e(_0x7bd0d9,_0x4b038b,_0x4b2789);let _0x5f5a13=class extends _0x161faf[_0x22c917(0x82)]{constructor(_0xfae5a3,_0x58d4ea){const _0x196cf9=_0x22c917;super(),this[_0x196cf9(0xb0)]=_0xfae5a3,this['_threadCommentDataSource']=_0x58d4ea,this[_0x196cf9(0x79)]();}[_0x22c917(0x79)](){const _0x4a2a42=_0x22c917;this[_0x4a2a42(0xb0)][_0x4a2a42(0xf3)]=this[_0x4a2a42(0xdc)],this['_threadCommentDataSourceService'][_0x4a2a42(0xb4)]=!0x1;}};_0x5f5a13=_0x40de80([_0x1cd730(0x0,_0x2141f3[_0x22c917(0xb1)]),_0x1cd730(0x1,_0x161faf[_0x22c917(0x92)](_0x5074db))],_0x5f5a13);var _0x381603=Object[_0x22c917(0xdb)],_0x43d464=Object['getOwnPropertyDescriptor'],_0x384e75=(_0x56224b,_0x2962bb,_0x492129)=>_0x2962bb in _0x56224b?_0x381603(_0x56224b,_0x2962bb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x492129}):_0x56224b[_0x2962bb]=_0x492129,_0x289dfe=(_0x1bc143,_0x7022d8,_0x483e77,_0x163d0f)=>{for(var _0x4651ea=_0x163d0f>0x1?void 0x0:_0x163d0f?_0x43d464(_0x7022d8,_0x483e77):_0x7022d8,_0x1a3b87=_0x1bc143['length']-0x1,_0x4af008;_0x1a3b87>=0x0;_0x1a3b87--)(_0x4af008=_0x1bc143[_0x1a3b87])&&(_0x4651ea=_0x4af008(_0x4651ea)||_0x4651ea);return _0x4651ea;},_0x234e02=(_0x214223,_0x18dff1)=>(_0x164101,_0xa24317)=>_0x18dff1(_0x164101,_0xa24317,_0x214223),_0x546cba=(_0x15ae8d,_0x5d7321,_0x27c96f)=>_0x384e75(_0x15ae8d,typeof _0x5d7321!=_0x22c917(0xac)?_0x5d7321+'':_0x5d7321,_0x27c96f);_0x482946['UniverThreadCommentDataSourcePlugin']=class extends _0x161faf[_0x22c917(0x99)]{constructor(_0x5c41b5=_0x4c387e,_0x2628ff,_0x4edc0d){const _0x533369=_0x22c917;super(),this['_config']=_0x5c41b5,this[_0x533369(0x8f)]=_0x2628ff,this['_configService']=_0x4edc0d;const {..._0x34b0d0}=_0x161faf['merge']({},_0x4c387e,this[_0x533369(0x8e)]);this[_0x533369(0xa0)][_0x533369(0xce)](_0x185b74,_0x34b0d0);}[_0x22c917(0xd6)](){const _0x44c08c=_0x22c917;[[_0x5074db],[_0x5f5a13],[_0x50f571]][_0x44c08c(0xfc)](_0xda19cd=>{const _0x5a5dae=_0x44c08c;this['_injector'][_0x5a5dae(0xd1)](_0xda19cd);});}[_0x22c917(0xf0)](){const _0x3ccc68=_0x22c917;this[_0x3ccc68(0x8f)][_0x3ccc68(0xbf)](_0x5f5a13),this[_0x3ccc68(0x8f)][_0x3ccc68(0xbf)](_0x50f571);}},_0x546cba(_0x482946['UniverThreadCommentDataSourcePlugin'],_0x22c917(0xf1),_0x2ddcb3),_0x546cba(_0x482946[_0x22c917(0x95)],_0x22c917(0xf6),_0x161faf[_0x22c917(0xd0)][_0x22c917(0xb3)]),_0x482946[_0x22c917(0x95)]=_0x289dfe([_0x161faf['DependentOn'](_0x4a4d91['UniverThreadCommentUIPlugin'],_0x1248a6['UniverCollaborationClientPlugin'],_0x1c8814['UniverLicensePlugin']),_0x234e02(0x1,_0x161faf[_0x22c917(0x92)](_0x161faf[_0x22c917(0x7e)])),_0x234e02(0x2,_0x161faf['IConfigService'])],_0x482946[_0x22c917(0x95)]),Object[_0x22c917(0xdb)](_0x482946,Symbol[_0x22c917(0xb9)],{'value':'Module'});}));function _0x10b5(_0x10be5,_0x53becf){const _0x358fc3=_0x358f();return _0x10b5=function(_0x10b5ff,_0x52822d){_0x10b5ff=_0x10b5ff-0x78;let _0x136288=_0x358fc3[_0x10b5ff];return _0x136288;},_0x10b5(_0x10be5,_0x53becf);}function _0x358f(){const _0x551816=['_userService','users','replyId','_config','_injector','parse','updateComment','Inject','4ljSmKg','slice','UniverThreadCommentDataSourcePlugin','userId','comments','UniverThreadCommentUi','Plugin','_threadCommentModel','CustomRangeType','41008piquJy','exports','_init','Solve','_configService','getUser','2209020vJqaVh','content','rangeId','Delete','ref','@univerjs/thread-comment-ui','getOwnPropertyDescriptor','format','disposeWithMe','getMemberID','symbol','getUnit','userID','/universer-api/comment/unit/','_threadCommentDataSourceService','IThreadCommentDataSourceService','saveCommentToSnapshot','UNIVER_UNKNOWN','syncUpdateMutationToColla','subscribe','_httpService','unitId','UniverCore','toStringTag','47831zGSUxW','solved','UNRECOGNIZED','delete','threadId','get','commentUpdate$','rangeType','createTimestamp','39864UhOtqu','/delete','replies','Unknown','649310tTfsfc','UniverProLicense','addUser','payload','root','amd','requireSession','setConfig','resolved','UniverInstanceType','add','addComment','getComment','Solved','_commentService','onStarting','dayjs','@univerjs-pro/collaboration-client','Edit','CollaborationSessionService','defineProperty','_threadCommentDataSource','customRanges','code','UniverProThreadCommentDatasource','UserManagerService','size','/reply','6jHDapc','length','Reply','listComments','@univerjs/core','body','user','@univerjs/thread-comment','error','filter','UniverThreadComment','/universer-api/user/list','CommentService','onReady','pluginName','90lXdksH','dataSource','OpenOrReOpen','@univerjs/network','type','getCurrentUser','stringify','rxjs','Add','COMMENT','forEach','find','/add','_initDataSource','map','reply','YYYY/MM/DD\x20HH:mm','110472MQhfMe','Injector','_initUserSync','317765IqzWga','_sessionService','Disposable','deleteComment','2256ArcXUK','function','HTTPService','pipe','ThreadCommentModel','9aJLctt','post'];_0x358f=function(){return _0x551816;};return _0x358f();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.8.0-nightly.
|
|
3
|
+
"version": "0.8.0-nightly.202506061607",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.8.0-nightly.
|
|
49
|
-
"@univerjs
|
|
50
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.8.0-nightly.202506061607",
|
|
49
|
+
"@univerjs/core": "0.8.0-nightly.202506061607",
|
|
50
|
+
"@univerjs-pro/license": "0.8.0-nightly.202506061607",
|
|
51
|
+
"@univerjs/network": "0.8.0-nightly.202506061607",
|
|
51
52
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
52
|
-
"@univerjs/thread-comment": "0.8.0-nightly.
|
|
53
|
-
"@univerjs/
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.8.0-nightly.202506051607"
|
|
53
|
+
"@univerjs/thread-comment": "0.8.0-nightly.202506061607",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.8.0-nightly.202506061607"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.8.3",
|
|
59
59
|
"vite": "^6.3.5",
|
|
60
60
|
"vitest": "^3.2.0",
|
|
61
|
-
"@univerjs-infra/shared": "0.8.0
|
|
61
|
+
"@univerjs-infra/shared": "0.8.0"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|