@univerjs-pro/thread-comment-datasource 0.10.8-nightly.202509200616 → 0.10.9-experimental.20250925-61b61a0
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 _0x34955c=_0x59b8;(function(_0x439ad5,_0x2e32fc){const _0x5b2852=_0x59b8,_0x47ecc2=_0x439ad5();while(!![]){try{const _0x2fdd4a=parseInt(_0x5b2852(0xb7))/0x1+parseInt(_0x5b2852(0x99))/0x2*(parseInt(_0x5b2852(0xb9))/0x3)+parseInt(_0x5b2852(0xe1))/0x4+parseInt(_0x5b2852(0xda))/0x5+-parseInt(_0x5b2852(0x103))/0x6*(-parseInt(_0x5b2852(0xd2))/0x7)+-parseInt(_0x5b2852(0xd0))/0x8*(-parseInt(_0x5b2852(0xcf))/0x9)+-parseInt(_0x5b2852(0xcd))/0xa*(parseInt(_0x5b2852(0xc8))/0xb);if(_0x2fdd4a===_0x2e32fc)break;else _0x47ecc2['push'](_0x47ecc2['shift']());}catch(_0x2564e6){_0x47ecc2['push'](_0x47ecc2['shift']());}}}(_0x4a8a,0x57fa1));Object['defineProperty'](exports,Symbol[_0x34955c(0x10c)],{'value':_0x34955c(0xa9)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x35558d=>(_0x35558d[_0x35558d['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x35558d[_0x35558d[_0x34955c(0xd5)]=0x1]='Solved',_0x35558d[_0x35558d[_0x34955c(0xce)]=-0x1]='UNRECOGNIZED',_0x35558d))(I||{}),v=(_0x36e5d4=>(_0x36e5d4[_0x36e5d4['Unknown']=0x0]=_0x34955c(0x9d),_0x36e5d4[_0x36e5d4[_0x34955c(0xbb)]=0x1]=_0x34955c(0xbb),_0x36e5d4[_0x36e5d4[_0x34955c(0xe8)]=0x2]=_0x34955c(0xe8),_0x36e5d4[_0x36e5d4['Edit']=0x3]=_0x34955c(0xfd),_0x36e5d4[_0x36e5d4[_0x34955c(0xf4)]=0x4]='Delete',_0x36e5d4[_0x36e5d4[_0x34955c(0xc4)]=0x5]=_0x34955c(0xc4),_0x36e5d4[_0x36e5d4[_0x34955c(0xce)]=-0x1]=_0x34955c(0xce),_0x36e5d4))(v||{});function _0x4a8a(){const _0x3d4d64=['Unknown','/add','values','CommentService','UniverLicensePlugin','rangeType','bufferTime','/reply','syncUpdateMutationToColla','getOwnPropertyDescriptor','personId','Inject','Module','pipe','deleteComment','add','_init','user','CollaborationSessionService','ref','getMemberID','replyId','resolveComment','CustomRangeType','UniverCollaborationClientPlugin','map','434698zfAykw','UniverThreadCommentUIPlugin','34377uJsfjM','UniverThreadCommentDataSourcePlugin','Add','body','customRanges','get','resolved','format','Plugin','delete','parentId','Solve','disposeWithMe','unitId','users','17430083tVjSwq','_userService','DependentOn','setConfig','error','10QcXhvT','UNRECOGNIZED','5931018YqZiOu','8ZLGWZK','_injector','6461wlAuRt','commentUpdate$','thread-comment-data-source.config','Solved','code','payload','getUnit','_initDataSource','1962125DnvkhC','_threadCommentDataSourceService','slice','dayjs','/delete','root','UNIVER_UNKNOWN','988752yUJJbA','content','OpenOrReOpen','length','createTimestamp','userId','_commentService','Reply','UserManagerService','onStarting','addUser','_httpService','filter','dataSource','/universer-api/comment/unit/','/edit','replies','_config','_configService','Delete','_sessionService','COMMENT','/universer-api/user/list','Injector','IThreadCommentDataSourceService','updateComment','rangeId','defineProperty','Edit','requireSession','post','comments','userID','_threadCommentModel','1152Gkzdjh','comment','listComments','YYYY/MM/DD\x20HH:mm','parse','Disposable','forEach','threadId','type','toStringTag','getComment','pluginName','solved','stringify','_threadCommentDataSource','6NMhEOt','HTTPService','reply','find'];_0x4a8a=function(){return _0x3d4d64;};return _0x4a8a();}const f=_0x2d483b=>c[_0x34955c(0xdd)](new Date(+_0x2d483b))[_0x34955c(0xc0)](_0x34955c(0x106)),R=async(_0x44f549,_0x5eaf13)=>{const _0x211005=_0x34955c,_0x160f17=_0x44f549[_0x211005(0xbe)](c[_0x211005(0xe9)]),_0x16668c=_0x44f549[_0x211005(0xbe)](P[_0x211005(0x9a)]);_0x5eaf13['forEach'](_0x9d2040=>{const _0x1bb689=_0x211005;_0x160f17['getUser'](_0x9d2040)&&_0x5eaf13[_0x1bb689(0xc2)](_0x9d2040);}),_0x5eaf13['size']&&(await _0x16668c[_0x211005(0xbe)](_0x211005(0xf7),{'params':{'userIDs':[..._0x5eaf13]}}))[_0x211005(0xbc)][_0x211005(0xc7)]['forEach'](_0xdce4f4=>{const _0x22c61b=_0x211005;_0xdce4f4&&_0x160f17[_0x22c61b(0xeb)](_0xdce4f4);});};var $=Object[_0x34955c(0xa6)],E=(_0x3697eb,_0x13d7c5,_0x3c4df2,_0x48caa8)=>{const _0x2e6e8e=_0x34955c;for(var _0x92a2c=_0x48caa8>0x1?void 0x0:_0x48caa8?$(_0x13d7c5,_0x3c4df2):_0x13d7c5,_0x18d92f=_0x3697eb[_0x2e6e8e(0xe4)]-0x1,_0x1d0207;_0x18d92f>=0x0;_0x18d92f--)(_0x1d0207=_0x3697eb[_0x18d92f])&&(_0x92a2c=_0x1d0207(_0x92a2c)||_0x92a2c);return _0x92a2c;},S=(_0x46c42,_0x28cdfe)=>(_0x38ff73,_0xb0c7bb)=>_0x28cdfe(_0x38ff73,_0xb0c7bb,_0x46c42);let _=class extends c[_0x34955c(0x108)]{constructor(_0x45fdc7,_0x4ae8dc,_0x1b5daa,_0x3d7811){const _0x1d7420=_0x34955c;super(),this[_0x1d7420(0xe7)]=_0x45fdc7,this[_0x1d7420(0x102)]=_0x4ae8dc,this[_0x1d7420(0xc9)]=_0x1b5daa,this[_0x1d7420(0xd1)]=_0x3d7811,this[_0x1d7420(0xad)](),this['_initUserSync']();}['_initUserSync'](){const _0x5778ad=_0x34955c;this[_0x5778ad(0xc5)](this[_0x5778ad(0x102)][_0x5778ad(0xd3)][_0x5778ad(0xaa)](j[_0x5778ad(0xa3)](0x10))['subscribe'](_0x507187=>{const _0x125c72=_0x5778ad,_0x2bfa4d=new Set();_0x507187[_0x125c72(0x109)](_0x21a6b1=>{const _0x3cd0c8=_0x125c72;switch(_0x21a6b1['type']){case _0x3cd0c8(0xac):{const _0x4aea26=_0x21a6b1[_0x3cd0c8(0xd7)][_0x3cd0c8(0xa7)];_0x2bfa4d[_0x3cd0c8(0xac)](_0x4aea26);break;}}}),R(this[_0x125c72(0xd1)],_0x2bfa4d);}));}['_init'](){const _0x2e38b0=_0x34955c;this['disposeWithMe'](this['_commentService'][_0x2e38b0(0xd3)]['subscribe'](async _0x122217=>{const _0x349898=_0x2e38b0;var _0x4739df,_0x42dbe4,_0xa6bbd3,_0x3f32ae;const _0x343bf7=(_0x4739df=this[_0x349898(0x102)][_0x349898(0xd8)](_0x122217[_0x349898(0xc6)])[_0x349898(0x9c)](_0x4388c2=>_0x4388c2['threadId']===_0x122217[_0x349898(0x10a)]))==null?void 0x0:_0x4739df[_0x349898(0xdf)];if(!_0x343bf7)return;const {unitId:_0x4c59c0,subUnitId:_0x250b4d}=_0x343bf7;switch(_0x122217[_0x349898(0xae)]&&this['_userService'][_0x349898(0xeb)](_0x122217[_0x349898(0xae)]),_0x122217[_0x349898(0x10b)]){case v[_0x349898(0xbb)]:break;case v['Reply']:{this['_threadCommentModel']['addComment'](_0x4c59c0,_0x250b4d,{'unitId':_0x4c59c0,'subUnitId':_0x250b4d,'ref':'','id':_0x122217[_0x349898(0xb2)],'dT':f(+_0x122217[_0x349898(0xe5)]),'threadId':_0x122217[_0x349898(0x10a)],'personId':(_0xa6bbd3=(_0x42dbe4=_0x122217[_0x349898(0xae)])==null?void 0x0:_0x42dbe4[_0x349898(0x101)])!=null?_0xa6bbd3:_0x122217[_0x349898(0xe6)],'text':JSON['parse'](_0x122217['content']),'parentId':_0x343bf7['id']});break;}case v[_0x349898(0xf4)]:{const _0x1e2d48=this[_0x349898(0x102)][_0x349898(0x10d)](_0x4c59c0,_0x250b4d,_0x122217['replyId']);_0x1e2d48&&_0x1e2d48[_0x349898(0xc3)]&&this['_threadCommentModel']['deleteComment'](_0x4c59c0,_0x250b4d,_0x122217[_0x349898(0xb2)]);break;}case v[_0x349898(0xfd)]:{this[_0x349898(0x102)][_0x349898(0xfa)](_0x4c59c0,_0x250b4d,{'commentId':_0x122217[_0x349898(0xb2)],'text':JSON['parse'](_0x122217[_0x349898(0xe2)])});break;}case v[_0x349898(0xc4)]:{const _0xb2e67e=(_0x3f32ae=this[_0x349898(0x102)]['getUnit'](_0x122217['unitId'])[_0x349898(0x9c)](_0x2ad74c=>_0x2ad74c[_0x349898(0x10a)]===_0x122217['threadId']))==null?void 0x0:_0x3f32ae['root'];_0xb2e67e&&this[_0x349898(0x102)][_0x349898(0xb3)](_0x4c59c0,_0x250b4d,_0xb2e67e['id'],_0x122217[_0x349898(0x10f)]===I[_0x349898(0xd5)]);break;}}}));}};_=E([S(0x0,c[_0x34955c(0xa8)](b[_0x34955c(0xa0)])),S(0x1,c['Inject'](M['ThreadCommentModel'])),S(0x2,c[_0x34955c(0xa8)](c[_0x34955c(0xe9)])),S(0x3,c[_0x34955c(0xa8)](c[_0x34955c(0xf8)]))],_);const q=_0x34955c(0xd4),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x4e65aa,_0x2d4a4f,_0x4ed690,_0x457eba)=>{const _0x1a5187=_0x34955c;for(var _0x4d576c=_0x457eba>0x1?void 0x0:_0x457eba?A(_0x2d4a4f,_0x4ed690):_0x2d4a4f,_0x2fafe8=_0x4e65aa[_0x1a5187(0xe4)]-0x1,_0x10644a;_0x2fafe8>=0x0;_0x2fafe8--)(_0x10644a=_0x4e65aa[_0x2fafe8])&&(_0x4d576c=_0x10644a(_0x4d576c)||_0x4d576c);return _0x4d576c;},C=(_0x1e5473,_0x20bede)=>(_0x498c4e,_0x2accd9)=>_0x20bede(_0x498c4e,_0x2accd9,_0x1e5473);function Y(_0x30905c,_0x3ece0a){const _0x1ab475=_0x34955c,_0x599cb4=_0x30905c['replies'][0x0];return{..._0x3ece0a,'id':_0x599cb4[_0x1ab475(0xb2)],'resolved':_0x30905c['solved']===0x1,'dT':f(_0x599cb4[_0x1ab475(0xe5)]),'personId':_0x599cb4[_0x1ab475(0xe6)],'threadId':_0x599cb4[_0x1ab475(0x10a)]};}function G(_0x233fc5,_0x123d09,_0x20e959){const _0x58df46=_0x34955c;var _0x6136fd,_0x5f5507;if(((_0x5f5507=(_0x6136fd=_0x233fc5==null?void 0x0:_0x233fc5['replies'])==null?void 0x0:_0x6136fd[_0x58df46(0xe4)])!=null?_0x5f5507:0x0)>0x0){const _0x231536=(_0x42f253,_0x58ebfc)=>({'id':_0x42f253['replyId'],'threadId':_0x42f253[_0x58df46(0x10a)],'dT':f(_0x42f253['createTimestamp']),'personId':_0x42f253[_0x58df46(0xe6)],'resolved':_0x233fc5[_0x58df46(0x10f)]===I[_0x58df46(0xd5)],'unitId':_0x123d09,'subUnitId':_0x20e959,'text':JSON[_0x58df46(0x107)](_0x42f253[_0x58df46(0xe2)]),'parentId':_0x58ebfc}),_0x54c080=_0x231536(_0x233fc5[_0x58df46(0xf1)][0x0]);return{..._0x54c080,'children':_0x233fc5[_0x58df46(0xf1)][_0x58df46(0xdc)](0x1)[_0x58df46(0xb6)](_0x1631e1=>_0x231536(_0x1631e1,_0x54c080['id']))};}return null;}let p=class{constructor(_0x19f52b,_0x174884,_0x4d8e89){const _0x2a6820=_0x34955c;this[_0x2a6820(0xec)]=_0x19f52b,this['_userService']=_0x174884,this[_0x2a6820(0xf5)]=_0x4d8e89;}async['addComment'](_0x3bcac6){const _0x36fa67=_0x34955c;var _0x37a8b8,_0x4e48aa;const {parentId:_0x11b28c,unitId:_0x456710,text:_0x29ae6a,threadId:_0xc49340}=_0x3bcac6,_0x2d597e=(_0x4e48aa=(_0x37a8b8=_0x29ae6a[_0x36fa67(0xbd)])==null?void 0x0:_0x37a8b8[_0x36fa67(0xed)](_0x47ebb1=>_0x47ebb1[_0x36fa67(0xa2)]===c[_0x36fa67(0xb4)][_0x36fa67(0xf6)])[_0x36fa67(0xb6)](_0x209b52=>_0x209b52[_0x36fa67(0xfb)]))!=null?_0x4e48aa:[],_0x327125=JSON[_0x36fa67(0x110)](_0x29ae6a),_0x2cedb3=(await this['_sessionService'][_0x36fa67(0xfe)](_0x456710))[_0x36fa67(0xb1)]();if(_0x11b28c){const _0x49fc04={'memberId':_0x2cedb3,'unitId':_0x456710,'content':_0x327125,'mention':_0x2d597e,'threadId':_0xc49340},_0x468717=(await this[_0x36fa67(0xec)][_0x36fa67(0xff)](_0x36fa67(0xef)+_0x456710+_0x36fa67(0xa4),{'body':_0x49fc04}))[_0x36fa67(0xbc)][_0x36fa67(0x9b)];return{..._0x3bcac6,'id':_0x468717[_0x36fa67(0xb2)],'dT':c[_0x36fa67(0xdd)](+_0x468717['createTimestamp'])[_0x36fa67(0xc0)](_0x36fa67(0x106)),'personId':_0x468717['userId']};}else{const _0x3d3c84={'memberId':_0x2cedb3,'unitId':_0x456710,'content':_0x327125,'mention':_0x2d597e},_0x37c864=await this[_0x36fa67(0xec)]['post'](_0x36fa67(0xef)+_0x456710+_0x36fa67(0x9e),{'body':_0x3d3c84});return Y(_0x37c864[_0x36fa67(0xbc)][_0x36fa67(0x104)],_0x3bcac6);}}async[_0x34955c(0xfa)](_0x444b2c){const _0x4ccd0c=_0x34955c;var _0x44e63a,_0xe14e3e;const {text:_0x3d330c,unitId:_0x3b7204}=_0x444b2c,_0x4c424a=(_0xe14e3e=(_0x44e63a=_0x3d330c['customRanges'])==null?void 0x0:_0x44e63a[_0x4ccd0c(0xed)](_0x3c387f=>_0x3c387f[_0x4ccd0c(0xa2)]===c['CustomRangeType']['COMMENT'])[_0x4ccd0c(0xb6)](_0x1e419c=>_0x1e419c[_0x4ccd0c(0xfb)]))!=null?_0xe14e3e:[],_0x529028=JSON[_0x4ccd0c(0x110)](_0x3d330c),_0x2343b3=_0x444b2c['threadId'],_0x14f672=_0x444b2c['id'],_0x34b514={'memberId':(await this[_0x4ccd0c(0xf5)]['requireSession'](_0x3b7204))['getMemberID'](),'unitId':_0x3b7204,'threadId':_0x2343b3,'mention':_0x4c424a,'content':_0x529028,'replyId':_0x14f672},_0xeefd80=await this[_0x4ccd0c(0xec)][_0x4ccd0c(0xff)]('/universer-api/comment/unit/'+_0x3b7204+_0x4ccd0c(0xf0),{'body':_0x34b514});return!_0xeefd80['body'][_0x4ccd0c(0xcc)]||_0xeefd80[_0x4ccd0c(0xbc)][_0x4ccd0c(0xcc)][_0x4ccd0c(0xd6)]===0x1;}async['resolveComment'](_0x3c1b20){const _0x5ef8d8=_0x34955c,{unitId:_0x39b889}=_0x3c1b20,_0x3ad79b=_0x3c1b20['threadId'],_0x3cb8e9={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x39b889,'threadId':_0x3ad79b,'solved':_0x3c1b20[_0x5ef8d8(0xbf)]?I[_0x5ef8d8(0xd5)]:I[_0x5ef8d8(0xe3)]},_0x5d6c72=await this['_httpService'][_0x5ef8d8(0xff)](_0x5ef8d8(0xef)+_0x39b889+'/solved',{'body':_0x3cb8e9});return!_0x5d6c72['body'][_0x5ef8d8(0xcc)]||_0x5d6c72[_0x5ef8d8(0xbc)][_0x5ef8d8(0xcc)]['code']===0x1;}async[_0x34955c(0xab)](_0xea968c,_0xacac14,_0x5bac48,_0x632bce){const _0x30987c=_0x34955c,_0x5a6dd4={'memberId':(await this['_sessionService'][_0x30987c(0xfe)](_0xea968c))['getMemberID'](),'threadId':_0x5bac48,'replyId':_0x632bce,'unitId':_0xea968c},_0x3bfa13=await this[_0x30987c(0xec)][_0x30987c(0xff)](_0x30987c(0xef)+_0xea968c+_0x30987c(0xde),{'body':_0x5a6dd4});return!_0x3bfa13[_0x30987c(0xbc)][_0x30987c(0xcc)]||_0x3bfa13[_0x30987c(0xbc)][_0x30987c(0xcc)][_0x30987c(0xd6)]===0x1;}async[_0x34955c(0x105)](_0x12a35b,_0x4e3f2c,_0x104850){const _0x26d406=_0x34955c,_0x4af286={'unitId':_0x12a35b,'threadId':_0x104850},_0x484d6b=await this['_httpService'][_0x26d406(0xff)](_0x26d406(0xef)+_0x12a35b+'/list',{'body':_0x4af286}),_0x2ecc4c=_0x104850[_0x26d406(0xb6)](_0x41cbbd=>G(_0x484d6b[_0x26d406(0xbc)][_0x26d406(0x100)][_0x41cbbd],_0x12a35b,_0x4e3f2c))[_0x26d406(0xed)](Boolean);return Object[_0x26d406(0x9f)](_0x484d6b[_0x26d406(0xbc)][_0x26d406(0xc7)])[_0x26d406(0x109)](_0x159134=>{const _0x139c79=_0x26d406;this[_0x139c79(0xc9)][_0x139c79(0xeb)](_0x159134);}),_0x2ecc4c;}['saveCommentToSnapshot'](_0x299db2){const _0x5d1b1d=_0x34955c;return{'id':_0x299db2['id'],'threadId':_0x299db2[_0x5d1b1d(0x10a)],'ref':_0x299db2[_0x5d1b1d(0xb0)]};}};p=x([C(0x0,c[_0x34955c(0xa8)](P['HTTPService'])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c[_0x34955c(0xa8)](b[_0x34955c(0xaf)]))],p);var H=Object[_0x34955c(0xa6)],J=(_0x3771b9,_0xf2e13e,_0x1844ca,_0x36c7c6)=>{const _0x1ef16c=_0x34955c;for(var _0x3771a0=_0x36c7c6>0x1?void 0x0:_0x36c7c6?H(_0xf2e13e,_0x1844ca):_0xf2e13e,_0x529443=_0x3771b9[_0x1ef16c(0xe4)]-0x1,_0x1f81ca;_0x529443>=0x0;_0x529443--)(_0x1f81ca=_0x3771b9[_0x529443])&&(_0x3771a0=_0x1f81ca(_0x3771a0)||_0x3771a0);return _0x3771a0;},y=(_0x5fbd76,_0x12bc9c)=>(_0x3e0c28,_0xbe02bc)=>_0x12bc9c(_0x3e0c28,_0xbe02bc,_0x5fbd76);let g=class extends c[_0x34955c(0x108)]{constructor(_0x484f28,_0x393e99){const _0x278b39=_0x34955c;super(),this[_0x278b39(0xdb)]=_0x484f28,this[_0x278b39(0x111)]=_0x393e99,this[_0x278b39(0xd9)]();}[_0x34955c(0xd9)](){const _0x28fa5b=_0x34955c;this['_threadCommentDataSourceService'][_0x28fa5b(0xee)]=this[_0x28fa5b(0x111)],this[_0x28fa5b(0xdb)][_0x28fa5b(0xa5)]=!0x1;}};g=J([y(0x0,M[_0x34955c(0xf9)]),y(0x1,c[_0x34955c(0xa8)](p))],g);function _0x59b8(_0x14d67d,_0x443846){const _0x4a8adc=_0x4a8a();return _0x59b8=function(_0x59b89a,_0x38f162){_0x59b89a=_0x59b89a-0x99;let _0x3950c3=_0x4a8adc[_0x59b89a];return _0x3950c3;},_0x59b8(_0x14d67d,_0x443846);}var F=Object[_0x34955c(0xfc)],L=Object[_0x34955c(0xa6)],Z=(_0x5e2480,_0x5d35e2,_0x400703)=>_0x5d35e2 in _0x5e2480?F(_0x5e2480,_0x5d35e2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x400703}):_0x5e2480[_0x5d35e2]=_0x400703,W=(_0x2c713b,_0x17643e,_0x357325,_0x11c724)=>{const _0x3f57f5=_0x34955c;for(var _0x17cd15=_0x11c724>0x1?void 0x0:_0x11c724?L(_0x17643e,_0x357325):_0x17643e,_0x14a68f=_0x2c713b[_0x3f57f5(0xe4)]-0x1,_0x28e038;_0x14a68f>=0x0;_0x14a68f--)(_0x28e038=_0x2c713b[_0x14a68f])&&(_0x17cd15=_0x28e038(_0x17cd15)||_0x17cd15);return _0x17cd15;},O=(_0x3acd0f,_0x7d9f44)=>(_0x52e922,_0x34332a)=>_0x7d9f44(_0x52e922,_0x34332a,_0x3acd0f),N=(_0x3e9b4c,_0x1d0bbb,_0x29bc16)=>Z(_0x3e9b4c,typeof _0x1d0bbb!='symbol'?_0x1d0bbb+'':_0x1d0bbb,_0x29bc16);exports[_0x34955c(0xba)]=class extends c[_0x34955c(0xc1)]{constructor(_0x545a86=D,_0x5ca42f,_0x48e880){const _0x41b017=_0x34955c;super(),this[_0x41b017(0xf2)]=_0x545a86,this['_injector']=_0x5ca42f,this['_configService']=_0x48e880;const {..._0x185e97}=c['merge']({},D,this[_0x41b017(0xf2)]);this[_0x41b017(0xf3)][_0x41b017(0xcb)](q,_0x185e97);}[_0x34955c(0xea)](){const _0x54917d=_0x34955c;[[p],[g],[_]][_0x54917d(0x109)](_0x3184b8=>{const _0x398803=_0x54917d;this['_injector'][_0x398803(0xac)](_0x3184b8);});}['onReady'](){const _0x31981e=_0x34955c;this[_0x31981e(0xd1)][_0x31981e(0xbe)](g),this[_0x31981e(0xd1)][_0x31981e(0xbe)](_);}},N(exports[_0x34955c(0xba)],_0x34955c(0x10e),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x34955c(0x10b),c['UniverInstanceType'][_0x34955c(0xe0)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x34955c(0xca)](w[_0x34955c(0xb8)],b[_0x34955c(0xb5)],T[_0x34955c(0xa1)]),O(0x1,c[_0x34955c(0xa8)](c['Injector'])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';const _0x451630=_0x25c1;(function(_0x239b95,_0x54639e){const _0x24d413=_0x25c1,_0x455829=_0x239b95();while(!![]){try{const _0x5a8c9d=-parseInt(_0x24d413(0x1ae))/0x1+parseInt(_0x24d413(0x1c8))/0x2*(-parseInt(_0x24d413(0x1d5))/0x3)+parseInt(_0x24d413(0x1b5))/0x4*(-parseInt(_0x24d413(0x1da))/0x5)+parseInt(_0x24d413(0x199))/0x6+parseInt(_0x24d413(0x19e))/0x7+parseInt(_0x24d413(0x18c))/0x8+-parseInt(_0x24d413(0x1dc))/0x9*(-parseInt(_0x24d413(0x19f))/0xa);if(_0x5a8c9d===_0x54639e)break;else _0x455829['push'](_0x455829['shift']());}catch(_0x231b7b){_0x455829['push'](_0x455829['shift']());}}}(_0x160f,0x955c1));Object['defineProperty'](exports,Symbol[_0x451630(0x188)],{'value':_0x451630(0x1a7)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x451630(0x17d);function _0x25c1(_0x451c5a,_0x311d20){const _0x160f33=_0x160f();return _0x25c1=function(_0x25c12f,_0x299ced){_0x25c12f=_0x25c12f-0x16e;let _0x38aed5=_0x160f33[_0x25c12f];return _0x38aed5;},_0x25c1(_0x451c5a,_0x311d20);}var I=(_0x14aa6c=>(_0x14aa6c[_0x14aa6c[_0x451630(0x17c)]=0x0]=_0x451630(0x17c),_0x14aa6c[_0x14aa6c[_0x451630(0x172)]=0x1]=_0x451630(0x172),_0x14aa6c[_0x14aa6c[_0x451630(0x194)]=-0x1]=_0x451630(0x194),_0x14aa6c))(I||{}),v=(_0x58b82d=>(_0x58b82d[_0x58b82d[_0x451630(0x170)]=0x0]=_0x451630(0x170),_0x58b82d[_0x58b82d[_0x451630(0x1c5)]=0x1]=_0x451630(0x1c5),_0x58b82d[_0x58b82d['Reply']=0x2]=_0x451630(0x176),_0x58b82d[_0x58b82d[_0x451630(0x17e)]=0x3]='Edit',_0x58b82d[_0x58b82d[_0x451630(0x19b)]=0x4]=_0x451630(0x19b),_0x58b82d[_0x58b82d[_0x451630(0x1d3)]=0x5]='Solve',_0x58b82d[_0x58b82d[_0x451630(0x194)]=-0x1]=_0x451630(0x194),_0x58b82d))(v||{});const f=_0x54e08e=>c[_0x451630(0x1b9)](new Date(+_0x54e08e))['format'](_0x451630(0x178)),R=async(_0xec9213,_0x453362)=>{const _0x1904be=_0x451630,_0x1753c2=_0xec9213[_0x1904be(0x1c6)](c[_0x1904be(0x19a)]),_0x13f3b4=_0xec9213[_0x1904be(0x1c6)](P[_0x1904be(0x1be)]);_0x453362[_0x1904be(0x1d0)](_0x4956c1=>{const _0x10db5c=_0x1904be;_0x1753c2['getUser'](_0x4956c1)&&_0x453362[_0x10db5c(0x1e5)](_0x4956c1);}),_0x453362[_0x1904be(0x174)]&&(await _0x13f3b4[_0x1904be(0x1c6)](_0x1904be(0x180),{'params':{'userIDs':[..._0x453362]}}))['body']['users'][_0x1904be(0x1d0)](_0x1d4ec9=>{_0x1d4ec9&&_0x1753c2['addUser'](_0x1d4ec9);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x2315a2,_0x4b8bf2,_0x46aba5,_0x1bc121)=>{for(var _0x2ce6e8=_0x1bc121>0x1?void 0x0:_0x1bc121?$(_0x4b8bf2,_0x46aba5):_0x4b8bf2,_0x8cb9d1=_0x2315a2['length']-0x1,_0x2a449c;_0x8cb9d1>=0x0;_0x8cb9d1--)(_0x2a449c=_0x2315a2[_0x8cb9d1])&&(_0x2ce6e8=_0x2a449c(_0x2ce6e8)||_0x2ce6e8);return _0x2ce6e8;},S=(_0x304fe5,_0x1138b6)=>(_0x40fc72,_0x6de31c)=>_0x1138b6(_0x40fc72,_0x6de31c,_0x304fe5);let _=class extends c[_0x451630(0x1a6)]{constructor(_0x486dba,_0x436209,_0x3cd936,_0x32f59d){const _0x171a6d=_0x451630;super(),this[_0x171a6d(0x1e3)]=_0x486dba,this['_threadCommentModel']=_0x436209,this[_0x171a6d(0x1b2)]=_0x3cd936,this[_0x171a6d(0x17a)]=_0x32f59d,this[_0x171a6d(0x1bf)](),this[_0x171a6d(0x1d8)]();}[_0x451630(0x1d8)](){const _0x3808b7=_0x451630;this[_0x3808b7(0x192)](this['_threadCommentModel'][_0x3808b7(0x1e0)][_0x3808b7(0x1d2)](j['bufferTime'](0x10))['subscribe'](_0x6e082b=>{const _0x10196b=_0x3808b7,_0x4acc41=new Set();_0x6e082b[_0x10196b(0x1d0)](_0x29858f=>{const _0x2163a1=_0x10196b;switch(_0x29858f[_0x2163a1(0x185)]){case _0x2163a1(0x1b6):{const _0x2a2c05=_0x29858f[_0x2163a1(0x1bc)]['personId'];_0x4acc41[_0x2163a1(0x1b6)](_0x2a2c05);break;}}}),R(this[_0x10196b(0x17a)],_0x4acc41);}));}[_0x451630(0x1bf)](){const _0x4f3ec9=_0x451630;this[_0x4f3ec9(0x192)](this[_0x4f3ec9(0x1e3)][_0x4f3ec9(0x1e0)][_0x4f3ec9(0x1b4)](async _0x4ee989=>{const _0x3a36fe=_0x4f3ec9;var _0x53f7f6,_0x98e9a4,_0x32a4b4,_0xa05099;const _0x5af848=(_0x53f7f6=this[_0x3a36fe(0x1af)][_0x3a36fe(0x1a9)](_0x4ee989[_0x3a36fe(0x181)])[_0x3a36fe(0x1e1)](_0x41ca4a=>_0x41ca4a[_0x3a36fe(0x1a4)]===_0x4ee989[_0x3a36fe(0x1a4)]))==null?void 0x0:_0x53f7f6[_0x3a36fe(0x186)];if(!_0x5af848)return;const {unitId:_0x144406,subUnitId:_0x3b7ecf}=_0x5af848;switch(_0x4ee989[_0x3a36fe(0x1ab)]&&this[_0x3a36fe(0x1b2)][_0x3a36fe(0x1a3)](_0x4ee989[_0x3a36fe(0x1ab)]),_0x4ee989['type']){case v[_0x3a36fe(0x1c5)]:break;case v['Reply']:{this[_0x3a36fe(0x1af)][_0x3a36fe(0x1c4)](_0x144406,_0x3b7ecf,{'unitId':_0x144406,'subUnitId':_0x3b7ecf,'ref':'','id':_0x4ee989[_0x3a36fe(0x17b)],'dT':f(+_0x4ee989[_0x3a36fe(0x1d7)]),'threadId':_0x4ee989[_0x3a36fe(0x1a4)],'personId':(_0x32a4b4=(_0x98e9a4=_0x4ee989[_0x3a36fe(0x1ab)])==null?void 0x0:_0x98e9a4[_0x3a36fe(0x1d1)])!=null?_0x32a4b4:_0x4ee989['userId'],'text':JSON[_0x3a36fe(0x1c1)](_0x4ee989[_0x3a36fe(0x191)]),'parentId':_0x5af848['id']});break;}case v[_0x3a36fe(0x19b)]:{const _0x18f2b4=this[_0x3a36fe(0x1af)][_0x3a36fe(0x18f)](_0x144406,_0x3b7ecf,_0x4ee989[_0x3a36fe(0x17b)]);_0x18f2b4&&_0x18f2b4[_0x3a36fe(0x198)]&&this[_0x3a36fe(0x1af)][_0x3a36fe(0x193)](_0x144406,_0x3b7ecf,_0x4ee989[_0x3a36fe(0x17b)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x3a36fe(0x1bb)](_0x144406,_0x3b7ecf,{'commentId':_0x4ee989['replyId'],'text':JSON[_0x3a36fe(0x1c1)](_0x4ee989['content'])});break;}case v[_0x3a36fe(0x1d3)]:{const _0x2a557b=(_0xa05099=this['_threadCommentModel'][_0x3a36fe(0x1a9)](_0x4ee989['unitId'])[_0x3a36fe(0x1e1)](_0x958b7a=>_0x958b7a[_0x3a36fe(0x1a4)]===_0x4ee989[_0x3a36fe(0x1a4)]))==null?void 0x0:_0xa05099['root'];_0x2a557b&&this[_0x3a36fe(0x1af)]['resolveComment'](_0x144406,_0x3b7ecf,_0x2a557b['id'],_0x4ee989[_0x3a36fe(0x1df)]===I[_0x3a36fe(0x172)]);break;}}}));}};_=E([S(0x0,c[_0x451630(0x19c)](b[_0x451630(0x1cd)])),S(0x1,c[_0x451630(0x19c)](M[_0x451630(0x1ad)])),S(0x2,c['Inject'](c[_0x451630(0x19a)])),S(0x3,c[_0x451630(0x19c)](c[_0x451630(0x1e6)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x451630(0x1cf)],x=(_0x375e64,_0x22e340,_0x18a080,_0x133369)=>{for(var _0x1f5a3b=_0x133369>0x1?void 0x0:_0x133369?A(_0x22e340,_0x18a080):_0x22e340,_0x37a56e=_0x375e64['length']-0x1,_0x304b39;_0x37a56e>=0x0;_0x37a56e--)(_0x304b39=_0x375e64[_0x37a56e])&&(_0x1f5a3b=_0x304b39(_0x1f5a3b)||_0x1f5a3b);return _0x1f5a3b;},C=(_0x1786e5,_0x282159)=>(_0xa03a76,_0x2e745f)=>_0x282159(_0xa03a76,_0x2e745f,_0x1786e5);function Y(_0x2727a7,_0x568022){const _0x37840f=_0x451630,_0x3ee37d=_0x2727a7[_0x37840f(0x1c2)][0x0];return{..._0x568022,'id':_0x3ee37d['replyId'],'resolved':_0x2727a7[_0x37840f(0x1df)]===0x1,'dT':f(_0x3ee37d[_0x37840f(0x1d7)]),'personId':_0x3ee37d['userId'],'threadId':_0x3ee37d[_0x37840f(0x1a4)]};}function G(_0x388285,_0x1cc5f6,_0x1a20d2){const _0x5afcb2=_0x451630;var _0x3539af,_0x5a1cf4;if(((_0x5a1cf4=(_0x3539af=_0x388285==null?void 0x0:_0x388285[_0x5afcb2(0x1c2)])==null?void 0x0:_0x3539af[_0x5afcb2(0x183)])!=null?_0x5a1cf4:0x0)>0x0){const _0x3e74b5=(_0x549f2b,_0x1b6915)=>({'id':_0x549f2b[_0x5afcb2(0x17b)],'threadId':_0x549f2b[_0x5afcb2(0x1a4)],'dT':f(_0x549f2b[_0x5afcb2(0x1d7)]),'personId':_0x549f2b[_0x5afcb2(0x175)],'resolved':_0x388285['solved']===I[_0x5afcb2(0x172)],'unitId':_0x1cc5f6,'subUnitId':_0x1a20d2,'text':JSON[_0x5afcb2(0x1c1)](_0x549f2b[_0x5afcb2(0x191)]),'parentId':_0x1b6915}),_0x52d788=_0x3e74b5(_0x388285[_0x5afcb2(0x1c2)][0x0]);return{..._0x52d788,'children':_0x388285[_0x5afcb2(0x1c2)]['slice'](0x1)[_0x5afcb2(0x1d9)](_0x2b1d30=>_0x3e74b5(_0x2b1d30,_0x52d788['id']))};}return null;}let p=class{constructor(_0x5bd69b,_0x3307dd,_0x14d96b){const _0x512676=_0x451630;this[_0x512676(0x1c9)]=_0x5bd69b,this[_0x512676(0x1b2)]=_0x3307dd,this['_sessionService']=_0x14d96b;}async[_0x451630(0x1c4)](_0x4be51e){const _0x11c8ed=_0x451630;var _0x216551,_0x225464;const {parentId:_0x29b7e9,unitId:_0x2d9759,text:_0x11373c,threadId:_0x2ea7a4}=_0x4be51e,_0x36758b=(_0x225464=(_0x216551=_0x11373c[_0x11c8ed(0x1e7)])==null?void 0x0:_0x216551[_0x11c8ed(0x1e2)](_0x1adc9a=>_0x1adc9a[_0x11c8ed(0x182)]===c['CustomRangeType'][_0x11c8ed(0x190)])['map'](_0x49e0f9=>_0x49e0f9[_0x11c8ed(0x1e4)]))!=null?_0x225464:[],_0x4f433b=JSON['stringify'](_0x11373c),_0x590df8=(await this[_0x11c8ed(0x1a1)][_0x11c8ed(0x171)](_0x2d9759))['getMemberID']();if(_0x29b7e9){const _0x3eb8b3={'memberId':_0x590df8,'unitId':_0x2d9759,'content':_0x4f433b,'mention':_0x36758b,'threadId':_0x2ea7a4},_0x4f91be=(await this[_0x11c8ed(0x1c9)]['post'](_0x11c8ed(0x1c0)+_0x2d9759+_0x11c8ed(0x1a0),{'body':_0x3eb8b3}))['body'][_0x11c8ed(0x195)];return{..._0x4be51e,'id':_0x4f91be['replyId'],'dT':c[_0x11c8ed(0x1b9)](+_0x4f91be['createTimestamp'])['format'](_0x11c8ed(0x178)),'personId':_0x4f91be['userId']};}else{const _0x3716db={'memberId':_0x590df8,'unitId':_0x2d9759,'content':_0x4f433b,'mention':_0x36758b},_0x530a20=await this[_0x11c8ed(0x1c9)][_0x11c8ed(0x18b)]('/universer-api/comment/unit/'+_0x2d9759+_0x11c8ed(0x18d),{'body':_0x3716db});return Y(_0x530a20[_0x11c8ed(0x1a2)]['comment'],_0x4be51e);}}async['updateComment'](_0x334212){const _0x9e5430=_0x451630;var _0x3a4456,_0x148f46;const {text:_0x45efd6,unitId:_0x2f06ef}=_0x334212,_0x52dba4=(_0x148f46=(_0x3a4456=_0x45efd6[_0x9e5430(0x1e7)])==null?void 0x0:_0x3a4456['filter'](_0xd21157=>_0xd21157[_0x9e5430(0x182)]===c['CustomRangeType'][_0x9e5430(0x190)])[_0x9e5430(0x1d9)](_0x239bfa=>_0x239bfa[_0x9e5430(0x1e4)]))!=null?_0x148f46:[],_0x44da0f=JSON[_0x9e5430(0x16f)](_0x45efd6),_0x5b3a01=_0x334212[_0x9e5430(0x1a4)],_0x57d8ef=_0x334212['id'],_0x586cdc={'memberId':(await this[_0x9e5430(0x1a1)][_0x9e5430(0x171)](_0x2f06ef))[_0x9e5430(0x18a)](),'unitId':_0x2f06ef,'threadId':_0x5b3a01,'mention':_0x52dba4,'content':_0x44da0f,'replyId':_0x57d8ef},_0x5a37a1=await this['_httpService']['post'](_0x9e5430(0x1c0)+_0x2f06ef+'/edit',{'body':_0x586cdc});return!_0x5a37a1[_0x9e5430(0x1a2)][_0x9e5430(0x1ca)]||_0x5a37a1[_0x9e5430(0x1a2)]['error'][_0x9e5430(0x1c7)]===0x1;}async[_0x451630(0x197)](_0x25b7d5){const _0x403d27=_0x451630,{unitId:_0x39061e}=_0x25b7d5,_0x5a19ab=_0x25b7d5[_0x403d27(0x1a4)],_0x11cc05={'memberId':this[_0x403d27(0x1b2)][_0x403d27(0x189)]()['userID'],'unitId':_0x39061e,'threadId':_0x5a19ab,'solved':_0x25b7d5[_0x403d27(0x1db)]?I['Solved']:I[_0x403d27(0x17c)]},_0x4a10ca=await this[_0x403d27(0x1c9)][_0x403d27(0x18b)](_0x403d27(0x1c0)+_0x39061e+_0x403d27(0x1ce),{'body':_0x11cc05});return!_0x4a10ca[_0x403d27(0x1a2)]['error']||_0x4a10ca[_0x403d27(0x1a2)][_0x403d27(0x1ca)]['code']===0x1;}async[_0x451630(0x193)](_0x2b30cd,_0x1dd5ac,_0x34e3b8,_0x357512){const _0x2d3b53=_0x451630,_0x530e6a={'memberId':(await this[_0x2d3b53(0x1a1)][_0x2d3b53(0x171)](_0x2b30cd))[_0x2d3b53(0x18a)](),'threadId':_0x34e3b8,'replyId':_0x357512,'unitId':_0x2b30cd},_0x14cce6=await this[_0x2d3b53(0x1c9)][_0x2d3b53(0x18b)](_0x2d3b53(0x1c0)+_0x2b30cd+_0x2d3b53(0x177),{'body':_0x530e6a});return!_0x14cce6[_0x2d3b53(0x1a2)][_0x2d3b53(0x1ca)]||_0x14cce6[_0x2d3b53(0x1a2)][_0x2d3b53(0x1ca)]['code']===0x1;}async[_0x451630(0x17f)](_0x1f78ff,_0xc1cdbd,_0x3ffcbe){const _0x4ea21d=_0x451630,_0x9e45d3={'unitId':_0x1f78ff,'threadId':_0x3ffcbe},_0x34199a=await this['_httpService'][_0x4ea21d(0x18b)]('/universer-api/comment/unit/'+_0x1f78ff+_0x4ea21d(0x1d4),{'body':_0x9e45d3}),_0x48ebb0=_0x3ffcbe['map'](_0x4a8f50=>G(_0x34199a[_0x4ea21d(0x1a2)][_0x4ea21d(0x173)][_0x4a8f50],_0x1f78ff,_0xc1cdbd))[_0x4ea21d(0x1e2)](Boolean);return Object['values'](_0x34199a[_0x4ea21d(0x1a2)][_0x4ea21d(0x1bd)])[_0x4ea21d(0x1d0)](_0x2593dd=>{const _0x30be4d=_0x4ea21d;this[_0x30be4d(0x1b2)][_0x30be4d(0x1a3)](_0x2593dd);}),_0x48ebb0;}['saveCommentToSnapshot'](_0x369c78){return{'id':_0x369c78['id'],'threadId':_0x369c78['threadId'],'ref':_0x369c78['ref']};}};p=x([C(0x0,c[_0x451630(0x19c)](P[_0x451630(0x1be)])),C(0x1,c[_0x451630(0x19c)](c[_0x451630(0x19a)])),C(0x2,c[_0x451630(0x19c)](b[_0x451630(0x1de)]))],p);var H=Object[_0x451630(0x1cf)],J=(_0x347eb2,_0x2719ad,_0x3f90bd,_0x29db69)=>{const _0x2aaeec=_0x451630;for(var _0x483515=_0x29db69>0x1?void 0x0:_0x29db69?H(_0x2719ad,_0x3f90bd):_0x2719ad,_0x4a5522=_0x347eb2[_0x2aaeec(0x183)]-0x1,_0x2fa05f;_0x4a5522>=0x0;_0x4a5522--)(_0x2fa05f=_0x347eb2[_0x4a5522])&&(_0x483515=_0x2fa05f(_0x483515)||_0x483515);return _0x483515;},y=(_0x57c307,_0xd75915)=>(_0x51d910,_0x1e9649)=>_0xd75915(_0x51d910,_0x1e9649,_0x57c307);let g=class extends c[_0x451630(0x1a6)]{constructor(_0xffea5,_0x201de5){const _0x4c79fe=_0x451630;super(),this[_0x4c79fe(0x196)]=_0xffea5,this[_0x4c79fe(0x179)]=_0x201de5,this[_0x4c79fe(0x1b8)]();}['_initDataSource'](){const _0x2d32d1=_0x451630;this[_0x2d32d1(0x196)][_0x2d32d1(0x1c3)]=this[_0x2d32d1(0x179)],this[_0x2d32d1(0x196)][_0x2d32d1(0x16e)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](p))],g);var F=Object[_0x451630(0x1cb)],L=Object[_0x451630(0x1cf)],Z=(_0x509b3c,_0x3f7af9,_0x4a3ab9)=>_0x3f7af9 in _0x509b3c?F(_0x509b3c,_0x3f7af9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4a3ab9}):_0x509b3c[_0x3f7af9]=_0x4a3ab9,W=(_0x27294e,_0x1bc976,_0x2abc04,_0x39f58a)=>{for(var _0xe58c53=_0x39f58a>0x1?void 0x0:_0x39f58a?L(_0x1bc976,_0x2abc04):_0x1bc976,_0x2ef819=_0x27294e['length']-0x1,_0x4172fb;_0x2ef819>=0x0;_0x2ef819--)(_0x4172fb=_0x27294e[_0x2ef819])&&(_0xe58c53=_0x4172fb(_0xe58c53)||_0xe58c53);return _0xe58c53;},O=(_0x37647e,_0xfe5363)=>(_0xe7e4cc,_0x27b33d)=>_0xfe5363(_0xe7e4cc,_0x27b33d,_0x37647e),N=(_0x450bcf,_0x3498b6,_0x27f641)=>Z(_0x450bcf,typeof _0x3498b6!=_0x451630(0x1cc)?_0x3498b6+'':_0x3498b6,_0x27f641);function _0x160f(){const _0x4be66d=['userID','pipe','Solve','/list','5514lAevBe','UniverCollaborationClientPlugin','createTimestamp','_initUserSync','map','3050hgPJJn','resolved','209448xkwJAs','UniverThreadCommentDataSourcePlugin','CollaborationSessionService','solved','commentUpdate$','find','filter','_commentService','rangeId','delete','Injector','customRanges','syncUpdateMutationToColla','stringify','Unknown','requireSession','Solved','comments','size','userId','Reply','/delete','YYYY/MM/DD\x20HH:mm','_threadCommentDataSource','_injector','replyId','OpenOrReOpen','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','listComments','/universer-api/user/list','unitId','rangeType','length','DependentOn','type','root','onStarting','toStringTag','getCurrentUser','getMemberID','post','6920ubpRQw','/add','UNIVER_UNKNOWN','getComment','COMMENT','content','disposeWithMe','deleteComment','UNRECOGNIZED','reply','_threadCommentDataSourceService','resolveComment','parentId','6703608PNyECY','UserManagerService','Delete','Inject','_configService','5871278OzBYMs','60GyEWAr','/reply','_sessionService','body','addUser','threadId','IConfigService','Disposable','Module','onReady','getUnit','_config','user','UniverLicensePlugin','ThreadCommentModel','489340uxSSZX','_threadCommentModel','UniverInstanceType','pluginName','_userService','UniverThreadCommentUIPlugin','subscribe','3948ieykBW','add','setConfig','_initDataSource','dayjs','merge','updateComment','payload','users','HTTPService','_init','/universer-api/comment/unit/','parse','replies','dataSource','addComment','Add','get','code','428GnorBk','_httpService','error','defineProperty','symbol','CommentService','/solved','getOwnPropertyDescriptor','forEach'];_0x160f=function(){return _0x4be66d;};return _0x160f();}exports[_0x451630(0x1dd)]=class extends c['Plugin']{constructor(_0x35c2ec=D,_0x8045ca,_0x4ccba3){const _0xd274bc=_0x451630;super(),this[_0xd274bc(0x1aa)]=_0x35c2ec,this[_0xd274bc(0x17a)]=_0x8045ca,this[_0xd274bc(0x19d)]=_0x4ccba3;const {..._0x4f0a3f}=c[_0xd274bc(0x1ba)]({},D,this[_0xd274bc(0x1aa)]);this[_0xd274bc(0x19d)][_0xd274bc(0x1b7)](q,_0x4f0a3f);}[_0x451630(0x187)](){const _0x3b09a8=_0x451630;[[p],[g],[_]][_0x3b09a8(0x1d0)](_0x120f83=>{const _0xfd6cba=_0x3b09a8;this['_injector'][_0xfd6cba(0x1b6)](_0x120f83);});}[_0x451630(0x1a8)](){const _0x135789=_0x451630;this['_injector'][_0x135789(0x1c6)](g),this[_0x135789(0x17a)][_0x135789(0x1c6)](_);}},N(exports[_0x451630(0x1dd)],_0x451630(0x1b1),U),N(exports[_0x451630(0x1dd)],_0x451630(0x185),c[_0x451630(0x1b0)][_0x451630(0x18e)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x451630(0x184)](w[_0x451630(0x1b3)],b[_0x451630(0x1d6)],T[_0x451630(0x1ac)]),O(0x1,c['Inject'](c[_0x451630(0x1e6)])),O(0x2,c[_0x451630(0x1a5)])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x426fd8=_0x35e5;(function(_0x5da0cc,_0x1df22f){const _0x5a3916=_0x35e5,_0x2ac6b0=_0x5da0cc();while(!![]){try{const _0xfe74f0=parseInt(_0x5a3916(0x139))/0x1*(parseInt(_0x5a3916(0x116))/0x2)+-parseInt(_0x5a3916(0x179))/0x3*(-parseInt(_0x5a3916(0x16d))/0x4)+parseInt(_0x5a3916(0x17d))/0x5+-parseInt(_0x5a3916(0x158))/0x6+parseInt(_0x5a3916(0x14b))/0x7*(-parseInt(_0x5a3916(0x16b))/0x8)+parseInt(_0x5a3916(0x174))/0x9*(parseInt(_0x5a3916(0x154))/0xa)+parseInt(_0x5a3916(0x166))/0xb*(-parseInt(_0x5a3916(0x129))/0xc);if(_0xfe74f0===_0x1df22f)break;else _0x2ac6b0['push'](_0x2ac6b0['shift']());}catch(_0xb37a07){_0x2ac6b0['push'](_0x2ac6b0['shift']());}}}(_0x1048,0xdb308));import{CommentService as _0x3a15b6,CollaborationSessionService as _0x44c5cb,UniverCollaborationClientPlugin as _0x39432b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3618e3}from'@univerjs-pro/license';import{dayjs as _0xc6ba85,UserManagerService as _0x44cabc,Inject as _0x4ee146,Injector as _0x52b0e2,Disposable as _0x1cb851,CustomRangeType as _0x23dce0,UniverInstanceType as _0x29b4b7,DependentOn as _0x537f52,IConfigService as _0x4f31e8,Plugin as _0x42e39d,merge as _0x2d8dad}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x42ba3c}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xb8419e,IThreadCommentDataSourceService as _0x4fbd0e}from'@univerjs/thread-comment';import{bufferTime as _0x4e28a0}from'rxjs';import{HTTPService as _0x28ab9a}from'@univerjs/network';function _0x35e5(_0x48b50c,_0x6d8e72){const _0x1048ad=_0x1048();return _0x35e5=function(_0x35e517,_0x454aa4){_0x35e517=_0x35e517-0x116;let _0x109e93=_0x1048ad[_0x35e517];return _0x109e93;},_0x35e5(_0x48b50c,_0x6d8e72);}const W=_0x426fd8(0x125);var I=(_0x536bf7=>(_0x536bf7[_0x536bf7[_0x426fd8(0x153)]=0x0]=_0x426fd8(0x153),_0x536bf7[_0x536bf7[_0x426fd8(0x171)]=0x1]=_0x426fd8(0x171),_0x536bf7[_0x536bf7[_0x426fd8(0x168)]=-0x1]=_0x426fd8(0x168),_0x536bf7))(I||{}),v=(_0x4efc0e=>(_0x4efc0e[_0x4efc0e[_0x426fd8(0x160)]=0x0]=_0x426fd8(0x160),_0x4efc0e[_0x4efc0e[_0x426fd8(0x123)]=0x1]=_0x426fd8(0x123),_0x4efc0e[_0x4efc0e[_0x426fd8(0x164)]=0x2]='Reply',_0x4efc0e[_0x4efc0e[_0x426fd8(0x162)]=0x3]=_0x426fd8(0x162),_0x4efc0e[_0x4efc0e[_0x426fd8(0x17b)]=0x4]=_0x426fd8(0x17b),_0x4efc0e[_0x4efc0e[_0x426fd8(0x122)]=0x5]=_0x426fd8(0x122),_0x4efc0e[_0x4efc0e['UNRECOGNIZED']=-0x1]=_0x426fd8(0x168),_0x4efc0e))(v||{});const y=_0x1c4649=>_0xc6ba85(new Date(+_0x1c4649))[_0x426fd8(0x15c)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3b0632,_0x5593e6)=>{const _0x2a22f4=_0x426fd8,_0x355534=_0x3b0632[_0x2a22f4(0x140)](_0x44cabc),_0x1f3894=_0x3b0632['get'](_0x28ab9a);_0x5593e6[_0x2a22f4(0x15a)](_0x2916f3=>{const _0x378335=_0x2a22f4;_0x355534[_0x378335(0x15e)](_0x2916f3)&&_0x5593e6[_0x378335(0x134)](_0x2916f3);}),_0x5593e6['size']&&(await _0x1f3894[_0x2a22f4(0x140)](_0x2a22f4(0x17c),{'params':{'userIDs':[..._0x5593e6]}}))[_0x2a22f4(0x12f)][_0x2a22f4(0x16a)]['forEach'](_0xd97f25=>{_0xd97f25&&_0x355534['addUser'](_0xd97f25);});};var K=Object['getOwnPropertyDescriptor'],V=(_0xe13614,_0xe94754,_0x5599bb,_0x109411)=>{for(var _0x4ad2e3=_0x109411>0x1?void 0x0:_0x109411?K(_0xe94754,_0x5599bb):_0xe94754,_0x439136=_0xe13614['length']-0x1,_0x36f027;_0x439136>=0x0;_0x439136--)(_0x36f027=_0xe13614[_0x439136])&&(_0x4ad2e3=_0x36f027(_0x4ad2e3)||_0x4ad2e3);return _0x4ad2e3;},p=(_0x3f9d2e,_0x554f36)=>(_0x1928b7,_0x186b62)=>_0x554f36(_0x1928b7,_0x186b62,_0x3f9d2e);let _=class extends _0x1cb851{constructor(_0xa2a973,_0x19b392,_0x45daf1,_0x7753c7){const _0x5db985=_0x426fd8;super(),this[_0x5db985(0x152)]=_0xa2a973,this[_0x5db985(0x16c)]=_0x19b392,this[_0x5db985(0x15f)]=_0x45daf1,this[_0x5db985(0x150)]=_0x7753c7,this[_0x5db985(0x149)](),this[_0x5db985(0x12b)]();}['_initUserSync'](){const _0x5d4068=_0x426fd8;this[_0x5d4068(0x151)](this[_0x5d4068(0x16c)][_0x5d4068(0x12e)][_0x5d4068(0x161)](_0x4e28a0(0x10))[_0x5d4068(0x127)](_0x44eeb5=>{const _0x561c0e=_0x5d4068,_0x2b6737=new Set();_0x44eeb5[_0x561c0e(0x15a)](_0xa04051=>{const _0x5d0426=_0x561c0e;switch(_0xa04051[_0x5d0426(0x159)]){case'add':{const _0x1afdf0=_0xa04051[_0x5d0426(0x155)]['personId'];_0x2b6737[_0x5d0426(0x15b)](_0x1afdf0);break;}}}),B(this['_injector'],_0x2b6737);}));}[_0x426fd8(0x149)](){const _0x2fa025=_0x426fd8;this[_0x2fa025(0x151)](this['_commentService']['commentUpdate$'][_0x2fa025(0x127)](async _0xa7df47=>{const _0x1210b6=_0x2fa025;var _0xfcfd8,_0x3f2b15,_0x5e3f48,_0x2174d2;const _0x3d74fe=(_0xfcfd8=this[_0x1210b6(0x16c)][_0x1210b6(0x14d)](_0xa7df47[_0x1210b6(0x13b)])['find'](_0x42a028=>_0x42a028[_0x1210b6(0x173)]===_0xa7df47[_0x1210b6(0x173)]))==null?void 0x0:_0xfcfd8[_0x1210b6(0x133)];if(!_0x3d74fe)return;const {unitId:_0x4b6ce1,subUnitId:_0x572fdd}=_0x3d74fe;switch(_0xa7df47[_0x1210b6(0x136)]&&this['_userService']['addUser'](_0xa7df47[_0x1210b6(0x136)]),_0xa7df47[_0x1210b6(0x159)]){case v[_0x1210b6(0x123)]:break;case v['Reply']:{this[_0x1210b6(0x16c)][_0x1210b6(0x11b)](_0x4b6ce1,_0x572fdd,{'unitId':_0x4b6ce1,'subUnitId':_0x572fdd,'ref':'','id':_0xa7df47['replyId'],'dT':y(+_0xa7df47[_0x1210b6(0x14f)]),'threadId':_0xa7df47[_0x1210b6(0x173)],'personId':(_0x5e3f48=(_0x3f2b15=_0xa7df47[_0x1210b6(0x136)])==null?void 0x0:_0x3f2b15[_0x1210b6(0x14c)])!=null?_0x5e3f48:_0xa7df47['userId'],'text':JSON[_0x1210b6(0x130)](_0xa7df47['content']),'parentId':_0x3d74fe['id']});break;}case v[_0x1210b6(0x17b)]:{const _0x432efd=this[_0x1210b6(0x16c)][_0x1210b6(0x128)](_0x4b6ce1,_0x572fdd,_0xa7df47['replyId']);_0x432efd&&_0x432efd[_0x1210b6(0x11e)]&&this['_threadCommentModel']['deleteComment'](_0x4b6ce1,_0x572fdd,_0xa7df47[_0x1210b6(0x148)]);break;}case v[_0x1210b6(0x162)]:{this[_0x1210b6(0x16c)][_0x1210b6(0x117)](_0x4b6ce1,_0x572fdd,{'commentId':_0xa7df47[_0x1210b6(0x148)],'text':JSON[_0x1210b6(0x130)](_0xa7df47['content'])});break;}case v[_0x1210b6(0x122)]:{const _0x1bf870=(_0x2174d2=this['_threadCommentModel'][_0x1210b6(0x14d)](_0xa7df47[_0x1210b6(0x13b)])[_0x1210b6(0x118)](_0x318d13=>_0x318d13[_0x1210b6(0x173)]===_0xa7df47[_0x1210b6(0x173)]))==null?void 0x0:_0x2174d2['root'];_0x1bf870&&this[_0x1210b6(0x16c)]['resolveComment'](_0x4b6ce1,_0x572fdd,_0x1bf870['id'],_0xa7df47['solved']===I['Solved']);break;}}}));}};_=V([p(0x0,_0x4ee146(_0x3a15b6)),p(0x1,_0x4ee146(_0xb8419e)),p(0x2,_0x4ee146(_0x44cabc)),p(0x3,_0x4ee146(_0x52b0e2))],_);function _0x1048(){const _0x2f6de5=['_threadCommentModel','4TZGKIp','error','/solved','symbol','Solved','UNIVER_UNKNOWN','threadId','9uqpsag','COMMENT','slice','getOwnPropertyDescriptor','/edit','2092509afUKxH','solved','Delete','/universer-api/user/list','4804470WyjOex','requireSession','6sCWnfQ','updateComment','find','getCurrentUser','filter','addComment','addUser','length','parentId','rangeId','_httpService','thread-comment-data-source.config','Solve','Add','saveCommentToSnapshot','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','comments','subscribe','getComment','5126496mVinYO','_config','_initUserSync','resolved','/add','commentUpdate$','body','parse','stringify','userId','root','delete','_sessionService','user','dataSource','ref','388667MJeums','setConfig','unitId','/universer-api/comment/unit/','_threadCommentDataSource','_initDataSource','code','get','YYYY/MM/DD\x20HH:mm','reply','deleteComment','defineProperty','getMemberID','map','onStarting','replyId','_init','rangeType','9427411QohKAT','userID','getUnit','post','createTimestamp','_injector','disposeWithMe','_commentService','OpenOrReOpen','1080110FjlzJi','payload','comment','replies','1563768diwUks','type','forEach','add','format','values','getUser','_userService','Unknown','pipe','Edit','_configService','Reply','_threadCommentDataSourceService','11rLNvVm','/delete','UNRECOGNIZED','/reply','users','8nrdXnY'];_0x1048=function(){return _0x2f6de5;};return _0x1048();}const z=_0x426fd8(0x121),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x4f5c1e,_0x3b8dfc,_0x404569,_0x34deb2)=>{const _0x291939=_0x426fd8;for(var _0x2855e8=_0x34deb2>0x1?void 0x0:_0x34deb2?k(_0x3b8dfc,_0x404569):_0x3b8dfc,_0x293ba3=_0x4f5c1e[_0x291939(0x11d)]-0x1,_0x1b68f3;_0x293ba3>=0x0;_0x293ba3--)(_0x1b68f3=_0x4f5c1e[_0x293ba3])&&(_0x2855e8=_0x1b68f3(_0x2855e8)||_0x2855e8);return _0x2855e8;},b=(_0x2d815e,_0x8cbb2)=>(_0x21a46c,_0x421439)=>_0x8cbb2(_0x21a46c,_0x421439,_0x2d815e);function X(_0x132ece,_0xa54595){const _0x1aa235=_0x426fd8,_0x1dca2c=_0x132ece[_0x1aa235(0x157)][0x0];return{..._0xa54595,'id':_0x1dca2c['replyId'],'resolved':_0x132ece[_0x1aa235(0x17a)]===0x1,'dT':y(_0x1dca2c[_0x1aa235(0x14f)]),'personId':_0x1dca2c[_0x1aa235(0x132)],'threadId':_0x1dca2c[_0x1aa235(0x173)]};}function ee(_0x46f5cd,_0x12f5d2,_0x2c5f2e){const _0xeedfeb=_0x426fd8;var _0x5a1c95,_0x4d1b5e;if(((_0x4d1b5e=(_0x5a1c95=_0x46f5cd==null?void 0x0:_0x46f5cd[_0xeedfeb(0x157)])==null?void 0x0:_0x5a1c95[_0xeedfeb(0x11d)])!=null?_0x4d1b5e:0x0)>0x0){const _0x465a71=(_0x1b385a,_0x33799c)=>({'id':_0x1b385a['replyId'],'threadId':_0x1b385a[_0xeedfeb(0x173)],'dT':y(_0x1b385a[_0xeedfeb(0x14f)]),'personId':_0x1b385a[_0xeedfeb(0x132)],'resolved':_0x46f5cd[_0xeedfeb(0x17a)]===I[_0xeedfeb(0x171)],'unitId':_0x12f5d2,'subUnitId':_0x2c5f2e,'text':JSON[_0xeedfeb(0x130)](_0x1b385a['content']),'parentId':_0x33799c}),_0x19e897=_0x465a71(_0x46f5cd[_0xeedfeb(0x157)][0x0]);return{..._0x19e897,'children':_0x46f5cd[_0xeedfeb(0x157)][_0xeedfeb(0x176)](0x1)[_0xeedfeb(0x146)](_0xe877b9=>_0x465a71(_0xe877b9,_0x19e897['id']))};}return null;}let S=class{constructor(_0x582d0c,_0x3ec22f,_0x38ac2){const _0x55bca0=_0x426fd8;this['_httpService']=_0x582d0c,this[_0x55bca0(0x15f)]=_0x3ec22f,this[_0x55bca0(0x135)]=_0x38ac2;}async['addComment'](_0x16f9fd){const _0x281596=_0x426fd8;var _0x17661d,_0x48e716;const {parentId:_0x13a13d,unitId:_0xd2379a,text:_0x28fbbf,threadId:_0x2eecf1}=_0x16f9fd,_0x103558=(_0x48e716=(_0x17661d=_0x28fbbf['customRanges'])==null?void 0x0:_0x17661d[_0x281596(0x11a)](_0x16bbf1=>_0x16bbf1[_0x281596(0x14a)]===_0x23dce0['COMMENT'])[_0x281596(0x146)](_0x5ad427=>_0x5ad427[_0x281596(0x11f)]))!=null?_0x48e716:[],_0x39d9cd=JSON[_0x281596(0x131)](_0x28fbbf),_0x5a320c=(await this[_0x281596(0x135)][_0x281596(0x17e)](_0xd2379a))[_0x281596(0x145)]();if(_0x13a13d){const _0x52122c={'memberId':_0x5a320c,'unitId':_0xd2379a,'content':_0x39d9cd,'mention':_0x103558,'threadId':_0x2eecf1},_0x4dab53=(await this[_0x281596(0x120)]['post'](_0x281596(0x13c)+_0xd2379a+_0x281596(0x169),{'body':_0x52122c}))[_0x281596(0x12f)][_0x281596(0x142)];return{..._0x16f9fd,'id':_0x4dab53[_0x281596(0x148)],'dT':_0xc6ba85(+_0x4dab53[_0x281596(0x14f)])[_0x281596(0x15c)](_0x281596(0x141)),'personId':_0x4dab53['userId']};}else{const _0x50cb7f={'memberId':_0x5a320c,'unitId':_0xd2379a,'content':_0x39d9cd,'mention':_0x103558},_0x26c423=await this[_0x281596(0x120)]['post'](_0x281596(0x13c)+_0xd2379a+_0x281596(0x12d),{'body':_0x50cb7f});return X(_0x26c423[_0x281596(0x12f)][_0x281596(0x156)],_0x16f9fd);}}async[_0x426fd8(0x117)](_0x289351){const _0x54a752=_0x426fd8;var _0x488b00,_0x4d462f;const {text:_0x2066ac,unitId:_0x3ec9cd}=_0x289351,_0x5ae0c3=(_0x4d462f=(_0x488b00=_0x2066ac['customRanges'])==null?void 0x0:_0x488b00[_0x54a752(0x11a)](_0x1243bb=>_0x1243bb[_0x54a752(0x14a)]===_0x23dce0[_0x54a752(0x175)])['map'](_0x315824=>_0x315824['rangeId']))!=null?_0x4d462f:[],_0x5068be=JSON[_0x54a752(0x131)](_0x2066ac),_0x3b1c54=_0x289351[_0x54a752(0x173)],_0x29bd71=_0x289351['id'],_0x4270a4={'memberId':(await this[_0x54a752(0x135)][_0x54a752(0x17e)](_0x3ec9cd))[_0x54a752(0x145)](),'unitId':_0x3ec9cd,'threadId':_0x3b1c54,'mention':_0x5ae0c3,'content':_0x5068be,'replyId':_0x29bd71},_0x407fe5=await this[_0x54a752(0x120)][_0x54a752(0x14e)](_0x54a752(0x13c)+_0x3ec9cd+_0x54a752(0x178),{'body':_0x4270a4});return!_0x407fe5[_0x54a752(0x12f)]['error']||_0x407fe5[_0x54a752(0x12f)][_0x54a752(0x16e)][_0x54a752(0x13f)]===0x1;}async['resolveComment'](_0x3b3c5d){const _0x1591d1=_0x426fd8,{unitId:_0x5dff18}=_0x3b3c5d,_0x54d35d=_0x3b3c5d['threadId'],_0xddd362={'memberId':this[_0x1591d1(0x15f)][_0x1591d1(0x119)]()[_0x1591d1(0x14c)],'unitId':_0x5dff18,'threadId':_0x54d35d,'solved':_0x3b3c5d[_0x1591d1(0x12c)]?I[_0x1591d1(0x171)]:I[_0x1591d1(0x153)]},_0x19b2bd=await this[_0x1591d1(0x120)][_0x1591d1(0x14e)]('/universer-api/comment/unit/'+_0x5dff18+_0x1591d1(0x16f),{'body':_0xddd362});return!_0x19b2bd[_0x1591d1(0x12f)][_0x1591d1(0x16e)]||_0x19b2bd[_0x1591d1(0x12f)][_0x1591d1(0x16e)][_0x1591d1(0x13f)]===0x1;}async[_0x426fd8(0x143)](_0x489852,_0x4def35,_0x11d4f9,_0x5bf2d7){const _0x35fc3d=_0x426fd8,_0x562f53={'memberId':(await this[_0x35fc3d(0x135)][_0x35fc3d(0x17e)](_0x489852))[_0x35fc3d(0x145)](),'threadId':_0x11d4f9,'replyId':_0x5bf2d7,'unitId':_0x489852},_0x320754=await this[_0x35fc3d(0x120)][_0x35fc3d(0x14e)](_0x35fc3d(0x13c)+_0x489852+_0x35fc3d(0x167),{'body':_0x562f53});return!_0x320754[_0x35fc3d(0x12f)]['error']||_0x320754[_0x35fc3d(0x12f)][_0x35fc3d(0x16e)]['code']===0x1;}async['listComments'](_0x2891af,_0x316a19,_0x219d18){const _0x149cc7=_0x426fd8,_0x2b59a5={'unitId':_0x2891af,'threadId':_0x219d18},_0x153a08=await this['_httpService'][_0x149cc7(0x14e)](_0x149cc7(0x13c)+_0x2891af+'/list',{'body':_0x2b59a5}),_0x478b45=_0x219d18[_0x149cc7(0x146)](_0x2035a3=>ee(_0x153a08[_0x149cc7(0x12f)][_0x149cc7(0x126)][_0x2035a3],_0x2891af,_0x316a19))['filter'](Boolean);return Object[_0x149cc7(0x15d)](_0x153a08[_0x149cc7(0x12f)][_0x149cc7(0x16a)])[_0x149cc7(0x15a)](_0x264ecd=>{const _0x1a0132=_0x149cc7;this[_0x1a0132(0x15f)][_0x1a0132(0x11c)](_0x264ecd);}),_0x478b45;}[_0x426fd8(0x124)](_0x18d8a2){const _0x433338=_0x426fd8;return{'id':_0x18d8a2['id'],'threadId':_0x18d8a2['threadId'],'ref':_0x18d8a2[_0x433338(0x138)]};}};S=Q([b(0x0,_0x4ee146(_0x28ab9a)),b(0x1,_0x4ee146(_0x44cabc)),b(0x2,_0x4ee146(_0x44c5cb))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x26f758,_0x106bb3,_0x45ea78,_0x2a3bfd)=>{const _0x118a55=_0x426fd8;for(var _0xf2e6cb=_0x2a3bfd>0x1?void 0x0:_0x2a3bfd?re(_0x106bb3,_0x45ea78):_0x106bb3,_0x3534cc=_0x26f758[_0x118a55(0x11d)]-0x1,_0x433e19;_0x3534cc>=0x0;_0x3534cc--)(_0x433e19=_0x26f758[_0x3534cc])&&(_0xf2e6cb=_0x433e19(_0xf2e6cb)||_0xf2e6cb);return _0xf2e6cb;},M=(_0x4e72bb,_0x1d0aa4)=>(_0x92c24d,_0x54b819)=>_0x1d0aa4(_0x92c24d,_0x54b819,_0x4e72bb);let f=class extends _0x1cb851{constructor(_0x534207,_0x3a2173){const _0x2de5a7=_0x426fd8;super(),this['_threadCommentDataSourceService']=_0x534207,this[_0x2de5a7(0x13d)]=_0x3a2173,this[_0x2de5a7(0x13e)]();}[_0x426fd8(0x13e)](){const _0x39a406=_0x426fd8;this[_0x39a406(0x165)][_0x39a406(0x137)]=this['_threadCommentDataSource'],this[_0x39a406(0x165)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x4fbd0e),M(0x1,_0x4ee146(S))],f);var se=Object[_0x426fd8(0x144)],oe=Object[_0x426fd8(0x177)],ne=(_0x284618,_0xebc38f,_0x4ee5f9)=>_0xebc38f in _0x284618?se(_0x284618,_0xebc38f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4ee5f9}):_0x284618[_0xebc38f]=_0x4ee5f9,ie=(_0x56b21e,_0x208850,_0x3fb898,_0x16d072)=>{for(var _0x2abac9=_0x16d072>0x1?void 0x0:_0x16d072?oe(_0x208850,_0x3fb898):_0x208850,_0x12b79f=_0x56b21e['length']-0x1,_0x51fb89;_0x12b79f>=0x0;_0x12b79f--)(_0x51fb89=_0x56b21e[_0x12b79f])&&(_0x2abac9=_0x51fb89(_0x2abac9)||_0x2abac9);return _0x2abac9;},N=(_0x23b47c,_0x4c5e7f)=>(_0x58ab05,_0x4c0313)=>_0x4c5e7f(_0x58ab05,_0x4c0313,_0x23b47c),$=(_0x4fdf5c,_0x18f4f6,_0x50dd21)=>ne(_0x4fdf5c,typeof _0x18f4f6!=_0x426fd8(0x170)?_0x18f4f6+'':_0x18f4f6,_0x50dd21);let g=class extends _0x42e39d{constructor(_0x4ce1c4=O,_0x55e41,_0x2666fe){const _0x5194c5=_0x426fd8;super(),this[_0x5194c5(0x12a)]=_0x4ce1c4,this['_injector']=_0x55e41,this[_0x5194c5(0x163)]=_0x2666fe;const {..._0x103b86}=_0x2d8dad({},O,this[_0x5194c5(0x12a)]);this[_0x5194c5(0x163)][_0x5194c5(0x13a)](z,_0x103b86);}[_0x426fd8(0x147)](){const _0x55db13=_0x426fd8;[[S],[f],[_]][_0x55db13(0x15a)](_0x21b936=>{const _0x18d1f0=_0x55db13;this[_0x18d1f0(0x150)][_0x18d1f0(0x15b)](_0x21b936);});}['onReady'](){const _0x588f58=_0x426fd8;this[_0x588f58(0x150)][_0x588f58(0x140)](f),this[_0x588f58(0x150)][_0x588f58(0x140)](_);}};$(g,'pluginName',W),$(g,_0x426fd8(0x159),_0x29b4b7[_0x426fd8(0x172)]),g=ie([_0x537f52(_0x42ba3c,_0x39432b,_0x3618e3),N(0x1,_0x4ee146(_0x52b0e2)),N(0x2,_0x4f31e8)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x378934=_0x4714;(function(_0x39e8c0,_0x2dc381){const _0x7b4ffb=_0x4714,_0x2024eb=_0x39e8c0();while(!![]){try{const _0x3be1e9=-parseInt(_0x7b4ffb(0x97))/0x1+-parseInt(_0x7b4ffb(0xcd))/0x2+parseInt(_0x7b4ffb(0xec))/0x3*(parseInt(_0x7b4ffb(0xd1))/0x4)+parseInt(_0x7b4ffb(0xa9))/0x5+-parseInt(_0x7b4ffb(0xce))/0x6*(parseInt(_0x7b4ffb(0xe1))/0x7)+-parseInt(_0x7b4ffb(0x9f))/0x8+parseInt(_0x7b4ffb(0xc8))/0x9*(parseInt(_0x7b4ffb(0xd8))/0xa);if(_0x3be1e9===_0x2dc381)break;else _0x2024eb['push'](_0x2024eb['shift']());}catch(_0x3c592a){_0x2024eb['push'](_0x2024eb['shift']());}}}(_0x3507,0xd86e0));import{CommentService as _0x2f4cf6,CollaborationSessionService as _0x34723d,UniverCollaborationClientPlugin as _0x4c3b01}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x45bd27}from'@univerjs-pro/license';import{dayjs as _0x2b407b,UserManagerService as _0x2b0b35,Inject as _0x503545,Injector as _0x528f29,Disposable as _0x1b1f13,CustomRangeType as _0x7a80c2,UniverInstanceType as _0x31a0db,DependentOn as _0xe61c2a,IConfigService as _0x4b4a21,Plugin as _0x2e415a,merge as _0x4594c9}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x37845d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1c2a0a,IThreadCommentDataSourceService as _0x4f4afc}from'@univerjs/thread-comment';import{bufferTime as _0x58fc78}from'rxjs';import{HTTPService as _0x301a22}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3413b2=>(_0x3413b2[_0x3413b2[_0x378934(0xee)]=0x0]='OpenOrReOpen',_0x3413b2[_0x3413b2[_0x378934(0xdb)]=0x1]=_0x378934(0xdb),_0x3413b2[_0x3413b2[_0x378934(0xd2)]=-0x1]=_0x378934(0xd2),_0x3413b2))(I||{}),v=(_0x3fb455=>(_0x3fb455[_0x3fb455[_0x378934(0xc0)]=0x0]=_0x378934(0xc0),_0x3fb455[_0x3fb455[_0x378934(0xd4)]=0x1]=_0x378934(0xd4),_0x3fb455[_0x3fb455[_0x378934(0xca)]=0x2]='Reply',_0x3fb455[_0x3fb455[_0x378934(0xc3)]=0x3]=_0x378934(0xc3),_0x3fb455[_0x3fb455[_0x378934(0xbb)]=0x4]='Delete',_0x3fb455[_0x3fb455[_0x378934(0xe5)]=0x5]=_0x378934(0xe5),_0x3fb455[_0x3fb455[_0x378934(0xd2)]=-0x1]=_0x378934(0xd2),_0x3fb455))(v||{});const y=_0x563d4c=>_0x2b407b(new Date(+_0x563d4c))['format'](_0x378934(0x90)),B=async(_0x5afe6f,_0x210ed1)=>{const _0x17f071=_0x378934,_0xde703e=_0x5afe6f[_0x17f071(0xea)](_0x2b0b35),_0x291ceb=_0x5afe6f[_0x17f071(0xea)](_0x301a22);_0x210ed1[_0x17f071(0x94)](_0x4647b4=>{const _0x25527e=_0x17f071;_0xde703e[_0x25527e(0xb8)](_0x4647b4)&&_0x210ed1['delete'](_0x4647b4);}),_0x210ed1['size']&&(await _0x291ceb[_0x17f071(0xea)](_0x17f071(0xa8),{'params':{'userIDs':[..._0x210ed1]}}))['body'][_0x17f071(0xaa)]['forEach'](_0x2fde42=>{const _0x4b0b4f=_0x17f071;_0x2fde42&&_0xde703e[_0x4b0b4f(0xb6)](_0x2fde42);});};var K=Object[_0x378934(0xdf)],V=(_0x3d7b8b,_0x277b91,_0x1a66ab,_0x5f24b9)=>{const _0x3b2642=_0x378934;for(var _0x2b4f5c=_0x5f24b9>0x1?void 0x0:_0x5f24b9?K(_0x277b91,_0x1a66ab):_0x277b91,_0x1bf45a=_0x3d7b8b[_0x3b2642(0xa1)]-0x1,_0x17d8c7;_0x1bf45a>=0x0;_0x1bf45a--)(_0x17d8c7=_0x3d7b8b[_0x1bf45a])&&(_0x2b4f5c=_0x17d8c7(_0x2b4f5c)||_0x2b4f5c);return _0x2b4f5c;},p=(_0x1d9030,_0x30ab8d)=>(_0x2f69c8,_0x97843c)=>_0x30ab8d(_0x2f69c8,_0x97843c,_0x1d9030);let _=class extends _0x1b1f13{constructor(_0x2fa4a5,_0x8e1e83,_0x4cd20f,_0x350207){const _0x41fc6e=_0x378934;super(),this[_0x41fc6e(0xcc)]=_0x2fa4a5,this[_0x41fc6e(0xa7)]=_0x8e1e83,this[_0x41fc6e(0xae)]=_0x4cd20f,this['_injector']=_0x350207,this[_0x41fc6e(0x98)](),this[_0x41fc6e(0xd0)]();}[_0x378934(0xd0)](){const _0x3f1ec1=_0x378934;this[_0x3f1ec1(0xe2)](this['_threadCommentModel'][_0x3f1ec1(0xb1)]['pipe'](_0x58fc78(0x10))[_0x3f1ec1(0x92)](_0xa6bf5b=>{const _0x27af0b=_0x3f1ec1,_0x2ea396=new Set();_0xa6bf5b[_0x27af0b(0x94)](_0x5673a0=>{const _0x48cfa2=_0x27af0b;switch(_0x5673a0[_0x48cfa2(0xc5)]){case _0x48cfa2(0x99):{const _0x370c58=_0x5673a0[_0x48cfa2(0xc4)][_0x48cfa2(0xe3)];_0x2ea396[_0x48cfa2(0x99)](_0x370c58);break;}}}),B(this[_0x27af0b(0xd3)],_0x2ea396);}));}[_0x378934(0x98)](){const _0x59b57e=_0x378934;this[_0x59b57e(0xe2)](this[_0x59b57e(0xcc)][_0x59b57e(0xb1)][_0x59b57e(0x92)](async _0x31627b=>{const _0x3e57ed=_0x59b57e;var _0x14fc7b,_0x5a1f68,_0x3dc74a,_0x462b3e;const _0x238b04=(_0x14fc7b=this[_0x3e57ed(0xa7)][_0x3e57ed(0xe6)](_0x31627b[_0x3e57ed(0xeb)])[_0x3e57ed(0xab)](_0x290c33=>_0x290c33[_0x3e57ed(0x8e)]===_0x31627b['threadId']))==null?void 0x0:_0x14fc7b[_0x3e57ed(0xde)];if(!_0x238b04)return;const {unitId:_0x11eee0,subUnitId:_0x5f1018}=_0x238b04;switch(_0x31627b['user']&&this[_0x3e57ed(0xae)][_0x3e57ed(0xb6)](_0x31627b[_0x3e57ed(0xb7)]),_0x31627b[_0x3e57ed(0xc5)]){case v[_0x3e57ed(0xd4)]:break;case v[_0x3e57ed(0xca)]:{this[_0x3e57ed(0xa7)]['addComment'](_0x11eee0,_0x5f1018,{'unitId':_0x11eee0,'subUnitId':_0x5f1018,'ref':'','id':_0x31627b[_0x3e57ed(0x9c)],'dT':y(+_0x31627b['createTimestamp']),'threadId':_0x31627b['threadId'],'personId':(_0x3dc74a=(_0x5a1f68=_0x31627b[_0x3e57ed(0xb7)])==null?void 0x0:_0x5a1f68[_0x3e57ed(0xb4)])!=null?_0x3dc74a:_0x31627b[_0x3e57ed(0xcf)],'text':JSON[_0x3e57ed(0xa0)](_0x31627b['content']),'parentId':_0x238b04['id']});break;}case v[_0x3e57ed(0xbb)]:{const _0x3a3424=this[_0x3e57ed(0xa7)]['getComment'](_0x11eee0,_0x5f1018,_0x31627b[_0x3e57ed(0x9c)]);_0x3a3424&&_0x3a3424[_0x3e57ed(0xa2)]&&this[_0x3e57ed(0xa7)][_0x3e57ed(0xb3)](_0x11eee0,_0x5f1018,_0x31627b[_0x3e57ed(0x9c)]);break;}case v[_0x3e57ed(0xc3)]:{this['_threadCommentModel'][_0x3e57ed(0xc2)](_0x11eee0,_0x5f1018,{'commentId':_0x31627b['replyId'],'text':JSON['parse'](_0x31627b[_0x3e57ed(0xbe)])});break;}case v['Solve']:{const _0x3707ea=(_0x462b3e=this[_0x3e57ed(0xa7)][_0x3e57ed(0xe6)](_0x31627b['unitId'])[_0x3e57ed(0xab)](_0x21810c=>_0x21810c[_0x3e57ed(0x8e)]===_0x31627b['threadId']))==null?void 0x0:_0x462b3e[_0x3e57ed(0xde)];_0x3707ea&&this['_threadCommentModel'][_0x3e57ed(0xa6)](_0x11eee0,_0x5f1018,_0x3707ea['id'],_0x31627b[_0x3e57ed(0x9d)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x503545(_0x2f4cf6)),p(0x1,_0x503545(_0x1c2a0a)),p(0x2,_0x503545(_0x2b0b35)),p(0x3,_0x503545(_0x528f29))],_);const z=_0x378934(0x9b),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x557443,_0xb25a21,_0x4d8fd4,_0x3851ab)=>{for(var _0x380208=_0x3851ab>0x1?void 0x0:_0x3851ab?k(_0xb25a21,_0x4d8fd4):_0xb25a21,_0x17b082=_0x557443['length']-0x1,_0x330155;_0x17b082>=0x0;_0x17b082--)(_0x330155=_0x557443[_0x17b082])&&(_0x380208=_0x330155(_0x380208)||_0x380208);return _0x380208;},b=(_0x2fe3d0,_0x22bdce)=>(_0x12cca7,_0x42a767)=>_0x22bdce(_0x12cca7,_0x42a767,_0x2fe3d0);function X(_0x15f5c6,_0x108e3f){const _0x25375c=_0x378934,_0x1ed7b7=_0x15f5c6[_0x25375c(0xa4)][0x0];return{..._0x108e3f,'id':_0x1ed7b7[_0x25375c(0x9c)],'resolved':_0x15f5c6['solved']===0x1,'dT':y(_0x1ed7b7[_0x25375c(0xba)]),'personId':_0x1ed7b7[_0x25375c(0xcf)],'threadId':_0x1ed7b7[_0x25375c(0x8e)]};}function ee(_0x9dd82a,_0x36d7aa,_0x344c9e){const _0x1ebd10=_0x378934;var _0x3a87a9,_0x3508be;if(((_0x3508be=(_0x3a87a9=_0x9dd82a==null?void 0x0:_0x9dd82a['replies'])==null?void 0x0:_0x3a87a9[_0x1ebd10(0xa1)])!=null?_0x3508be:0x0)>0x0){const _0xf7008d=(_0x3bc7c9,_0x475d3a)=>({'id':_0x3bc7c9[_0x1ebd10(0x9c)],'threadId':_0x3bc7c9['threadId'],'dT':y(_0x3bc7c9[_0x1ebd10(0xba)]),'personId':_0x3bc7c9['userId'],'resolved':_0x9dd82a[_0x1ebd10(0x9d)]===I['Solved'],'unitId':_0x36d7aa,'subUnitId':_0x344c9e,'text':JSON[_0x1ebd10(0xa0)](_0x3bc7c9[_0x1ebd10(0xbe)]),'parentId':_0x475d3a}),_0x5f2299=_0xf7008d(_0x9dd82a[_0x1ebd10(0xa4)][0x0]);return{..._0x5f2299,'children':_0x9dd82a[_0x1ebd10(0xa4)][_0x1ebd10(0xaf)](0x1)[_0x1ebd10(0xe0)](_0x93936d=>_0xf7008d(_0x93936d,_0x5f2299['id']))};}return null;}let S=class{constructor(_0x17d9a4,_0x190492,_0x1a6b73){const _0x5f0c51=_0x378934;this[_0x5f0c51(0xdd)]=_0x17d9a4,this[_0x5f0c51(0xae)]=_0x190492,this[_0x5f0c51(0xa5)]=_0x1a6b73;}async[_0x378934(0xe7)](_0x31f3e6){const _0x122855=_0x378934;var _0x13e05e,_0x481665;const {parentId:_0x3793cc,unitId:_0x1bb28f,text:_0x2fecde,threadId:_0x59a518}=_0x31f3e6,_0x2b22ef=(_0x481665=(_0x13e05e=_0x2fecde[_0x122855(0xcb)])==null?void 0x0:_0x13e05e[_0x122855(0xac)](_0x112fd4=>_0x112fd4[_0x122855(0xbc)]===_0x7a80c2[_0x122855(0x8f)])[_0x122855(0xe0)](_0x25bb62=>_0x25bb62[_0x122855(0xbd)]))!=null?_0x481665:[],_0x3c5357=JSON[_0x122855(0xb2)](_0x2fecde),_0x2d2e01=(await this[_0x122855(0xa5)]['requireSession'](_0x1bb28f))['getMemberID']();if(_0x3793cc){const _0x3e7e53={'memberId':_0x2d2e01,'unitId':_0x1bb28f,'content':_0x3c5357,'mention':_0x2b22ef,'threadId':_0x59a518},_0x5af444=(await this[_0x122855(0xdd)][_0x122855(0xed)](_0x122855(0xdc)+_0x1bb28f+_0x122855(0xe4),{'body':_0x3e7e53}))[_0x122855(0xbf)][_0x122855(0x95)];return{..._0x31f3e6,'id':_0x5af444[_0x122855(0x9c)],'dT':_0x2b407b(+_0x5af444[_0x122855(0xba)])[_0x122855(0xd7)](_0x122855(0x90)),'personId':_0x5af444[_0x122855(0xcf)]};}else{const _0x58d6c2={'memberId':_0x2d2e01,'unitId':_0x1bb28f,'content':_0x3c5357,'mention':_0x2b22ef},_0x2d41ad=await this['_httpService'][_0x122855(0xed)]('/universer-api/comment/unit/'+_0x1bb28f+'/add',{'body':_0x58d6c2});return X(_0x2d41ad[_0x122855(0xbf)][_0x122855(0xd5)],_0x31f3e6);}}async[_0x378934(0xc2)](_0x5df828){const _0x43907d=_0x378934;var _0x46b493,_0x30c47b;const {text:_0x20086c,unitId:_0x527a45}=_0x5df828,_0x2f0133=(_0x30c47b=(_0x46b493=_0x20086c['customRanges'])==null?void 0x0:_0x46b493[_0x43907d(0xac)](_0x4648a3=>_0x4648a3[_0x43907d(0xbc)]===_0x7a80c2[_0x43907d(0x8f)])['map'](_0x1ce0e2=>_0x1ce0e2[_0x43907d(0xbd)]))!=null?_0x30c47b:[],_0x50bbbf=JSON[_0x43907d(0xb2)](_0x20086c),_0x415f0e=_0x5df828[_0x43907d(0x8e)],_0x2a655f=_0x5df828['id'],_0xbc323={'memberId':(await this['_sessionService']['requireSession'](_0x527a45))[_0x43907d(0xc7)](),'unitId':_0x527a45,'threadId':_0x415f0e,'mention':_0x2f0133,'content':_0x50bbbf,'replyId':_0x2a655f},_0x55c1a4=await this['_httpService'][_0x43907d(0xed)](_0x43907d(0xdc)+_0x527a45+_0x43907d(0xb0),{'body':_0xbc323});return!_0x55c1a4[_0x43907d(0xbf)][_0x43907d(0xda)]||_0x55c1a4[_0x43907d(0xbf)][_0x43907d(0xda)][_0x43907d(0xe8)]===0x1;}async['resolveComment'](_0x3832d6){const _0x102e1c=_0x378934,{unitId:_0x3d69f9}=_0x3832d6,_0x2aab6e=_0x3832d6[_0x102e1c(0x8e)],_0x233f4f={'memberId':this[_0x102e1c(0xae)][_0x102e1c(0xad)]()[_0x102e1c(0xb4)],'unitId':_0x3d69f9,'threadId':_0x2aab6e,'solved':_0x3832d6[_0x102e1c(0x96)]?I[_0x102e1c(0xdb)]:I[_0x102e1c(0xee)]},_0x71caa2=await this[_0x102e1c(0xdd)][_0x102e1c(0xed)]('/universer-api/comment/unit/'+_0x3d69f9+'/solved',{'body':_0x233f4f});return!_0x71caa2[_0x102e1c(0xbf)]['error']||_0x71caa2[_0x102e1c(0xbf)][_0x102e1c(0xda)][_0x102e1c(0xe8)]===0x1;}async['deleteComment'](_0x1b4eed,_0x31ad80,_0x1b2398,_0x22fd58){const _0x37c46f=_0x378934,_0x7c6367={'memberId':(await this['_sessionService'][_0x37c46f(0xb9)](_0x1b4eed))[_0x37c46f(0xc7)](),'threadId':_0x1b2398,'replyId':_0x22fd58,'unitId':_0x1b4eed},_0x5bd9ff=await this[_0x37c46f(0xdd)][_0x37c46f(0xed)](_0x37c46f(0xdc)+_0x1b4eed+'/delete',{'body':_0x7c6367});return!_0x5bd9ff[_0x37c46f(0xbf)][_0x37c46f(0xda)]||_0x5bd9ff[_0x37c46f(0xbf)][_0x37c46f(0xda)][_0x37c46f(0xe8)]===0x1;}async[_0x378934(0xe9)](_0x2c7527,_0x2c91ea,_0x136a0e){const _0x47c9a0=_0x378934,_0x188140={'unitId':_0x2c7527,'threadId':_0x136a0e},_0x4fd48e=await this[_0x47c9a0(0xdd)][_0x47c9a0(0xed)](_0x47c9a0(0xdc)+_0x2c7527+_0x47c9a0(0x9e),{'body':_0x188140}),_0x2c437b=_0x136a0e[_0x47c9a0(0xe0)](_0x1239be=>ee(_0x4fd48e[_0x47c9a0(0xbf)][_0x47c9a0(0xd9)][_0x1239be],_0x2c7527,_0x2c91ea))[_0x47c9a0(0xac)](Boolean);return Object['values'](_0x4fd48e[_0x47c9a0(0xbf)][_0x47c9a0(0xaa)])[_0x47c9a0(0x94)](_0x4f8852=>{const _0x67c6db=_0x47c9a0;this[_0x67c6db(0xae)][_0x67c6db(0xb6)](_0x4f8852);}),_0x2c437b;}['saveCommentToSnapshot'](_0x199663){const _0x3e89b5=_0x378934;return{'id':_0x199663['id'],'threadId':_0x199663[_0x3e89b5(0x8e)],'ref':_0x199663[_0x3e89b5(0xc6)]};}};S=Q([b(0x0,_0x503545(_0x301a22)),b(0x1,_0x503545(_0x2b0b35)),b(0x2,_0x503545(_0x34723d))],S);var re=Object[_0x378934(0xdf)],te=(_0x5e44ea,_0x2c3340,_0x1627c6,_0x27f5ed)=>{const _0x1b773c=_0x378934;for(var _0x208f1f=_0x27f5ed>0x1?void 0x0:_0x27f5ed?re(_0x2c3340,_0x1627c6):_0x2c3340,_0x2100f6=_0x5e44ea[_0x1b773c(0xa1)]-0x1,_0xc058d3;_0x2100f6>=0x0;_0x2100f6--)(_0xc058d3=_0x5e44ea[_0x2100f6])&&(_0x208f1f=_0xc058d3(_0x208f1f)||_0x208f1f);return _0x208f1f;},M=(_0x306fec,_0x2ec8ee)=>(_0xf4dfab,_0x1a35f1)=>_0x2ec8ee(_0xf4dfab,_0x1a35f1,_0x306fec);let f=class extends _0x1b1f13{constructor(_0x883d35,_0x4f0359){const _0x45f045=_0x378934;super(),this[_0x45f045(0x9a)]=_0x883d35,this['_threadCommentDataSource']=_0x4f0359,this[_0x45f045(0xc9)]();}[_0x378934(0xc9)](){const _0x1d9835=_0x378934;this['_threadCommentDataSourceService'][_0x1d9835(0x93)]=this['_threadCommentDataSource'],this[_0x1d9835(0x9a)][_0x1d9835(0xc1)]=!0x1;}};f=te([M(0x0,_0x4f4afc),M(0x1,_0x503545(S))],f);function _0x4714(_0x17301b,_0x2d7b65){const _0x350700=_0x3507();return _0x4714=function(_0x47140d,_0x505e61){_0x47140d=_0x47140d-0x8e;let _0x2a8ea0=_0x350700[_0x47140d];return _0x2a8ea0;},_0x4714(_0x17301b,_0x2d7b65);}var se=Object[_0x378934(0xb5)],oe=Object[_0x378934(0xdf)],ne=(_0x432a7e,_0x3f5786,_0x4141fe)=>_0x3f5786 in _0x432a7e?se(_0x432a7e,_0x3f5786,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4141fe}):_0x432a7e[_0x3f5786]=_0x4141fe,ie=(_0xecab0c,_0x25f61b,_0x3b7150,_0x137c83)=>{const _0x1e5a67=_0x378934;for(var _0x40f9a7=_0x137c83>0x1?void 0x0:_0x137c83?oe(_0x25f61b,_0x3b7150):_0x25f61b,_0x165613=_0xecab0c[_0x1e5a67(0xa1)]-0x1,_0x118e8e;_0x165613>=0x0;_0x165613--)(_0x118e8e=_0xecab0c[_0x165613])&&(_0x40f9a7=_0x118e8e(_0x40f9a7)||_0x40f9a7);return _0x40f9a7;},N=(_0x248f5a,_0xf5abf8)=>(_0x9227ab,_0x4cb9f3)=>_0xf5abf8(_0x9227ab,_0x4cb9f3,_0x248f5a),$=(_0x40f683,_0x31528f,_0x3ee39b)=>ne(_0x40f683,typeof _0x31528f!='symbol'?_0x31528f+'':_0x31528f,_0x3ee39b);let g=class extends _0x2e415a{constructor(_0x34f5d5=O,_0x334e32,_0x3a4edf){const _0x355cd8=_0x378934;super(),this['_config']=_0x34f5d5,this[_0x355cd8(0xd3)]=_0x334e32,this[_0x355cd8(0xd6)]=_0x3a4edf;const {..._0x2135bc}=_0x4594c9({},O,this[_0x355cd8(0x91)]);this[_0x355cd8(0xd6)]['setConfig'](z,_0x2135bc);}[_0x378934(0xa3)](){const _0x4405bc=_0x378934;[[S],[f],[_]][_0x4405bc(0x94)](_0x3ebc38=>{const _0x1623b7=_0x4405bc;this[_0x1623b7(0xd3)][_0x1623b7(0x99)](_0x3ebc38);});}['onReady'](){const _0x27a460=_0x378934;this[_0x27a460(0xd3)][_0x27a460(0xea)](f),this[_0x27a460(0xd3)]['get'](_);}};function _0x3507(){const _0x23bf1d=['getMemberID','29500290lQAseF','_initDataSource','Reply','customRanges','_commentService','1695176olvaIf','6vatvDk','userId','_initUserSync','4zxAvkO','UNRECOGNIZED','_injector','Add','comment','_configService','format','10CaXNSZ','comments','error','Solved','/universer-api/comment/unit/','_httpService','root','getOwnPropertyDescriptor','map','909363imDfgX','disposeWithMe','personId','/reply','Solve','getUnit','addComment','code','listComments','get','unitId','1234182TikvGf','post','OpenOrReOpen','threadId','COMMENT','YYYY/MM/DD\x20HH:mm','_config','subscribe','dataSource','forEach','reply','resolved','1650862xwXFhB','_init','add','_threadCommentDataSourceService','thread-comment-data-source.config','replyId','solved','/list','13415944hwSNmZ','parse','length','parentId','onStarting','replies','_sessionService','resolveComment','_threadCommentModel','/universer-api/user/list','7513220MNOKHA','users','find','filter','getCurrentUser','_userService','slice','/edit','commentUpdate$','stringify','deleteComment','userID','defineProperty','addUser','user','getUser','requireSession','createTimestamp','Delete','rangeType','rangeId','content','body','Unknown','syncUpdateMutationToColla','updateComment','Edit','payload','type','ref'];_0x3507=function(){return _0x23bf1d;};return _0x3507();}$(g,'pluginName',W),$(g,'type',_0x31a0db['UNIVER_UNKNOWN']),g=ie([_0xe61c2a(_0x37845d,_0x4c3b01,_0x45bd27),N(0x1,_0x503545(_0x528f29)),N(0x2,_0x4b4a21)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x426fd8=_0x35e5;(function(_0x5da0cc,_0x1df22f){const _0x5a3916=_0x35e5,_0x2ac6b0=_0x5da0cc();while(!![]){try{const _0xfe74f0=parseInt(_0x5a3916(0x139))/0x1*(parseInt(_0x5a3916(0x116))/0x2)+-parseInt(_0x5a3916(0x179))/0x3*(-parseInt(_0x5a3916(0x16d))/0x4)+parseInt(_0x5a3916(0x17d))/0x5+-parseInt(_0x5a3916(0x158))/0x6+parseInt(_0x5a3916(0x14b))/0x7*(-parseInt(_0x5a3916(0x16b))/0x8)+parseInt(_0x5a3916(0x174))/0x9*(parseInt(_0x5a3916(0x154))/0xa)+parseInt(_0x5a3916(0x166))/0xb*(-parseInt(_0x5a3916(0x129))/0xc);if(_0xfe74f0===_0x1df22f)break;else _0x2ac6b0['push'](_0x2ac6b0['shift']());}catch(_0xb37a07){_0x2ac6b0['push'](_0x2ac6b0['shift']());}}}(_0x1048,0xdb308));import{CommentService as _0x3a15b6,CollaborationSessionService as _0x44c5cb,UniverCollaborationClientPlugin as _0x39432b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3618e3}from'@univerjs-pro/license';import{dayjs as _0xc6ba85,UserManagerService as _0x44cabc,Inject as _0x4ee146,Injector as _0x52b0e2,Disposable as _0x1cb851,CustomRangeType as _0x23dce0,UniverInstanceType as _0x29b4b7,DependentOn as _0x537f52,IConfigService as _0x4f31e8,Plugin as _0x42e39d,merge as _0x2d8dad}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x42ba3c}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xb8419e,IThreadCommentDataSourceService as _0x4fbd0e}from'@univerjs/thread-comment';import{bufferTime as _0x4e28a0}from'rxjs';import{HTTPService as _0x28ab9a}from'@univerjs/network';function _0x35e5(_0x48b50c,_0x6d8e72){const _0x1048ad=_0x1048();return _0x35e5=function(_0x35e517,_0x454aa4){_0x35e517=_0x35e517-0x116;let _0x109e93=_0x1048ad[_0x35e517];return _0x109e93;},_0x35e5(_0x48b50c,_0x6d8e72);}const W=_0x426fd8(0x125);var I=(_0x536bf7=>(_0x536bf7[_0x536bf7[_0x426fd8(0x153)]=0x0]=_0x426fd8(0x153),_0x536bf7[_0x536bf7[_0x426fd8(0x171)]=0x1]=_0x426fd8(0x171),_0x536bf7[_0x536bf7[_0x426fd8(0x168)]=-0x1]=_0x426fd8(0x168),_0x536bf7))(I||{}),v=(_0x4efc0e=>(_0x4efc0e[_0x4efc0e[_0x426fd8(0x160)]=0x0]=_0x426fd8(0x160),_0x4efc0e[_0x4efc0e[_0x426fd8(0x123)]=0x1]=_0x426fd8(0x123),_0x4efc0e[_0x4efc0e[_0x426fd8(0x164)]=0x2]='Reply',_0x4efc0e[_0x4efc0e[_0x426fd8(0x162)]=0x3]=_0x426fd8(0x162),_0x4efc0e[_0x4efc0e[_0x426fd8(0x17b)]=0x4]=_0x426fd8(0x17b),_0x4efc0e[_0x4efc0e[_0x426fd8(0x122)]=0x5]=_0x426fd8(0x122),_0x4efc0e[_0x4efc0e['UNRECOGNIZED']=-0x1]=_0x426fd8(0x168),_0x4efc0e))(v||{});const y=_0x1c4649=>_0xc6ba85(new Date(+_0x1c4649))[_0x426fd8(0x15c)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3b0632,_0x5593e6)=>{const _0x2a22f4=_0x426fd8,_0x355534=_0x3b0632[_0x2a22f4(0x140)](_0x44cabc),_0x1f3894=_0x3b0632['get'](_0x28ab9a);_0x5593e6[_0x2a22f4(0x15a)](_0x2916f3=>{const _0x378335=_0x2a22f4;_0x355534[_0x378335(0x15e)](_0x2916f3)&&_0x5593e6[_0x378335(0x134)](_0x2916f3);}),_0x5593e6['size']&&(await _0x1f3894[_0x2a22f4(0x140)](_0x2a22f4(0x17c),{'params':{'userIDs':[..._0x5593e6]}}))[_0x2a22f4(0x12f)][_0x2a22f4(0x16a)]['forEach'](_0xd97f25=>{_0xd97f25&&_0x355534['addUser'](_0xd97f25);});};var K=Object['getOwnPropertyDescriptor'],V=(_0xe13614,_0xe94754,_0x5599bb,_0x109411)=>{for(var _0x4ad2e3=_0x109411>0x1?void 0x0:_0x109411?K(_0xe94754,_0x5599bb):_0xe94754,_0x439136=_0xe13614['length']-0x1,_0x36f027;_0x439136>=0x0;_0x439136--)(_0x36f027=_0xe13614[_0x439136])&&(_0x4ad2e3=_0x36f027(_0x4ad2e3)||_0x4ad2e3);return _0x4ad2e3;},p=(_0x3f9d2e,_0x554f36)=>(_0x1928b7,_0x186b62)=>_0x554f36(_0x1928b7,_0x186b62,_0x3f9d2e);let _=class extends _0x1cb851{constructor(_0xa2a973,_0x19b392,_0x45daf1,_0x7753c7){const _0x5db985=_0x426fd8;super(),this[_0x5db985(0x152)]=_0xa2a973,this[_0x5db985(0x16c)]=_0x19b392,this[_0x5db985(0x15f)]=_0x45daf1,this[_0x5db985(0x150)]=_0x7753c7,this[_0x5db985(0x149)](),this[_0x5db985(0x12b)]();}['_initUserSync'](){const _0x5d4068=_0x426fd8;this[_0x5d4068(0x151)](this[_0x5d4068(0x16c)][_0x5d4068(0x12e)][_0x5d4068(0x161)](_0x4e28a0(0x10))[_0x5d4068(0x127)](_0x44eeb5=>{const _0x561c0e=_0x5d4068,_0x2b6737=new Set();_0x44eeb5[_0x561c0e(0x15a)](_0xa04051=>{const _0x5d0426=_0x561c0e;switch(_0xa04051[_0x5d0426(0x159)]){case'add':{const _0x1afdf0=_0xa04051[_0x5d0426(0x155)]['personId'];_0x2b6737[_0x5d0426(0x15b)](_0x1afdf0);break;}}}),B(this['_injector'],_0x2b6737);}));}[_0x426fd8(0x149)](){const _0x2fa025=_0x426fd8;this[_0x2fa025(0x151)](this['_commentService']['commentUpdate$'][_0x2fa025(0x127)](async _0xa7df47=>{const _0x1210b6=_0x2fa025;var _0xfcfd8,_0x3f2b15,_0x5e3f48,_0x2174d2;const _0x3d74fe=(_0xfcfd8=this[_0x1210b6(0x16c)][_0x1210b6(0x14d)](_0xa7df47[_0x1210b6(0x13b)])['find'](_0x42a028=>_0x42a028[_0x1210b6(0x173)]===_0xa7df47[_0x1210b6(0x173)]))==null?void 0x0:_0xfcfd8[_0x1210b6(0x133)];if(!_0x3d74fe)return;const {unitId:_0x4b6ce1,subUnitId:_0x572fdd}=_0x3d74fe;switch(_0xa7df47[_0x1210b6(0x136)]&&this['_userService']['addUser'](_0xa7df47[_0x1210b6(0x136)]),_0xa7df47[_0x1210b6(0x159)]){case v[_0x1210b6(0x123)]:break;case v['Reply']:{this[_0x1210b6(0x16c)][_0x1210b6(0x11b)](_0x4b6ce1,_0x572fdd,{'unitId':_0x4b6ce1,'subUnitId':_0x572fdd,'ref':'','id':_0xa7df47['replyId'],'dT':y(+_0xa7df47[_0x1210b6(0x14f)]),'threadId':_0xa7df47[_0x1210b6(0x173)],'personId':(_0x5e3f48=(_0x3f2b15=_0xa7df47[_0x1210b6(0x136)])==null?void 0x0:_0x3f2b15[_0x1210b6(0x14c)])!=null?_0x5e3f48:_0xa7df47['userId'],'text':JSON[_0x1210b6(0x130)](_0xa7df47['content']),'parentId':_0x3d74fe['id']});break;}case v[_0x1210b6(0x17b)]:{const _0x432efd=this[_0x1210b6(0x16c)][_0x1210b6(0x128)](_0x4b6ce1,_0x572fdd,_0xa7df47['replyId']);_0x432efd&&_0x432efd[_0x1210b6(0x11e)]&&this['_threadCommentModel']['deleteComment'](_0x4b6ce1,_0x572fdd,_0xa7df47[_0x1210b6(0x148)]);break;}case v[_0x1210b6(0x162)]:{this[_0x1210b6(0x16c)][_0x1210b6(0x117)](_0x4b6ce1,_0x572fdd,{'commentId':_0xa7df47[_0x1210b6(0x148)],'text':JSON[_0x1210b6(0x130)](_0xa7df47['content'])});break;}case v[_0x1210b6(0x122)]:{const _0x1bf870=(_0x2174d2=this['_threadCommentModel'][_0x1210b6(0x14d)](_0xa7df47[_0x1210b6(0x13b)])[_0x1210b6(0x118)](_0x318d13=>_0x318d13[_0x1210b6(0x173)]===_0xa7df47[_0x1210b6(0x173)]))==null?void 0x0:_0x2174d2['root'];_0x1bf870&&this[_0x1210b6(0x16c)]['resolveComment'](_0x4b6ce1,_0x572fdd,_0x1bf870['id'],_0xa7df47['solved']===I['Solved']);break;}}}));}};_=V([p(0x0,_0x4ee146(_0x3a15b6)),p(0x1,_0x4ee146(_0xb8419e)),p(0x2,_0x4ee146(_0x44cabc)),p(0x3,_0x4ee146(_0x52b0e2))],_);function _0x1048(){const _0x2f6de5=['_threadCommentModel','4TZGKIp','error','/solved','symbol','Solved','UNIVER_UNKNOWN','threadId','9uqpsag','COMMENT','slice','getOwnPropertyDescriptor','/edit','2092509afUKxH','solved','Delete','/universer-api/user/list','4804470WyjOex','requireSession','6sCWnfQ','updateComment','find','getCurrentUser','filter','addComment','addUser','length','parentId','rangeId','_httpService','thread-comment-data-source.config','Solve','Add','saveCommentToSnapshot','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','comments','subscribe','getComment','5126496mVinYO','_config','_initUserSync','resolved','/add','commentUpdate$','body','parse','stringify','userId','root','delete','_sessionService','user','dataSource','ref','388667MJeums','setConfig','unitId','/universer-api/comment/unit/','_threadCommentDataSource','_initDataSource','code','get','YYYY/MM/DD\x20HH:mm','reply','deleteComment','defineProperty','getMemberID','map','onStarting','replyId','_init','rangeType','9427411QohKAT','userID','getUnit','post','createTimestamp','_injector','disposeWithMe','_commentService','OpenOrReOpen','1080110FjlzJi','payload','comment','replies','1563768diwUks','type','forEach','add','format','values','getUser','_userService','Unknown','pipe','Edit','_configService','Reply','_threadCommentDataSourceService','11rLNvVm','/delete','UNRECOGNIZED','/reply','users','8nrdXnY'];_0x1048=function(){return _0x2f6de5;};return _0x1048();}const z=_0x426fd8(0x121),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x4f5c1e,_0x3b8dfc,_0x404569,_0x34deb2)=>{const _0x291939=_0x426fd8;for(var _0x2855e8=_0x34deb2>0x1?void 0x0:_0x34deb2?k(_0x3b8dfc,_0x404569):_0x3b8dfc,_0x293ba3=_0x4f5c1e[_0x291939(0x11d)]-0x1,_0x1b68f3;_0x293ba3>=0x0;_0x293ba3--)(_0x1b68f3=_0x4f5c1e[_0x293ba3])&&(_0x2855e8=_0x1b68f3(_0x2855e8)||_0x2855e8);return _0x2855e8;},b=(_0x2d815e,_0x8cbb2)=>(_0x21a46c,_0x421439)=>_0x8cbb2(_0x21a46c,_0x421439,_0x2d815e);function X(_0x132ece,_0xa54595){const _0x1aa235=_0x426fd8,_0x1dca2c=_0x132ece[_0x1aa235(0x157)][0x0];return{..._0xa54595,'id':_0x1dca2c['replyId'],'resolved':_0x132ece[_0x1aa235(0x17a)]===0x1,'dT':y(_0x1dca2c[_0x1aa235(0x14f)]),'personId':_0x1dca2c[_0x1aa235(0x132)],'threadId':_0x1dca2c[_0x1aa235(0x173)]};}function ee(_0x46f5cd,_0x12f5d2,_0x2c5f2e){const _0xeedfeb=_0x426fd8;var _0x5a1c95,_0x4d1b5e;if(((_0x4d1b5e=(_0x5a1c95=_0x46f5cd==null?void 0x0:_0x46f5cd[_0xeedfeb(0x157)])==null?void 0x0:_0x5a1c95[_0xeedfeb(0x11d)])!=null?_0x4d1b5e:0x0)>0x0){const _0x465a71=(_0x1b385a,_0x33799c)=>({'id':_0x1b385a['replyId'],'threadId':_0x1b385a[_0xeedfeb(0x173)],'dT':y(_0x1b385a[_0xeedfeb(0x14f)]),'personId':_0x1b385a[_0xeedfeb(0x132)],'resolved':_0x46f5cd[_0xeedfeb(0x17a)]===I[_0xeedfeb(0x171)],'unitId':_0x12f5d2,'subUnitId':_0x2c5f2e,'text':JSON[_0xeedfeb(0x130)](_0x1b385a['content']),'parentId':_0x33799c}),_0x19e897=_0x465a71(_0x46f5cd[_0xeedfeb(0x157)][0x0]);return{..._0x19e897,'children':_0x46f5cd[_0xeedfeb(0x157)][_0xeedfeb(0x176)](0x1)[_0xeedfeb(0x146)](_0xe877b9=>_0x465a71(_0xe877b9,_0x19e897['id']))};}return null;}let S=class{constructor(_0x582d0c,_0x3ec22f,_0x38ac2){const _0x55bca0=_0x426fd8;this['_httpService']=_0x582d0c,this[_0x55bca0(0x15f)]=_0x3ec22f,this[_0x55bca0(0x135)]=_0x38ac2;}async['addComment'](_0x16f9fd){const _0x281596=_0x426fd8;var _0x17661d,_0x48e716;const {parentId:_0x13a13d,unitId:_0xd2379a,text:_0x28fbbf,threadId:_0x2eecf1}=_0x16f9fd,_0x103558=(_0x48e716=(_0x17661d=_0x28fbbf['customRanges'])==null?void 0x0:_0x17661d[_0x281596(0x11a)](_0x16bbf1=>_0x16bbf1[_0x281596(0x14a)]===_0x23dce0['COMMENT'])[_0x281596(0x146)](_0x5ad427=>_0x5ad427[_0x281596(0x11f)]))!=null?_0x48e716:[],_0x39d9cd=JSON[_0x281596(0x131)](_0x28fbbf),_0x5a320c=(await this[_0x281596(0x135)][_0x281596(0x17e)](_0xd2379a))[_0x281596(0x145)]();if(_0x13a13d){const _0x52122c={'memberId':_0x5a320c,'unitId':_0xd2379a,'content':_0x39d9cd,'mention':_0x103558,'threadId':_0x2eecf1},_0x4dab53=(await this[_0x281596(0x120)]['post'](_0x281596(0x13c)+_0xd2379a+_0x281596(0x169),{'body':_0x52122c}))[_0x281596(0x12f)][_0x281596(0x142)];return{..._0x16f9fd,'id':_0x4dab53[_0x281596(0x148)],'dT':_0xc6ba85(+_0x4dab53[_0x281596(0x14f)])[_0x281596(0x15c)](_0x281596(0x141)),'personId':_0x4dab53['userId']};}else{const _0x50cb7f={'memberId':_0x5a320c,'unitId':_0xd2379a,'content':_0x39d9cd,'mention':_0x103558},_0x26c423=await this[_0x281596(0x120)]['post'](_0x281596(0x13c)+_0xd2379a+_0x281596(0x12d),{'body':_0x50cb7f});return X(_0x26c423[_0x281596(0x12f)][_0x281596(0x156)],_0x16f9fd);}}async[_0x426fd8(0x117)](_0x289351){const _0x54a752=_0x426fd8;var _0x488b00,_0x4d462f;const {text:_0x2066ac,unitId:_0x3ec9cd}=_0x289351,_0x5ae0c3=(_0x4d462f=(_0x488b00=_0x2066ac['customRanges'])==null?void 0x0:_0x488b00[_0x54a752(0x11a)](_0x1243bb=>_0x1243bb[_0x54a752(0x14a)]===_0x23dce0[_0x54a752(0x175)])['map'](_0x315824=>_0x315824['rangeId']))!=null?_0x4d462f:[],_0x5068be=JSON[_0x54a752(0x131)](_0x2066ac),_0x3b1c54=_0x289351[_0x54a752(0x173)],_0x29bd71=_0x289351['id'],_0x4270a4={'memberId':(await this[_0x54a752(0x135)][_0x54a752(0x17e)](_0x3ec9cd))[_0x54a752(0x145)](),'unitId':_0x3ec9cd,'threadId':_0x3b1c54,'mention':_0x5ae0c3,'content':_0x5068be,'replyId':_0x29bd71},_0x407fe5=await this[_0x54a752(0x120)][_0x54a752(0x14e)](_0x54a752(0x13c)+_0x3ec9cd+_0x54a752(0x178),{'body':_0x4270a4});return!_0x407fe5[_0x54a752(0x12f)]['error']||_0x407fe5[_0x54a752(0x12f)][_0x54a752(0x16e)][_0x54a752(0x13f)]===0x1;}async['resolveComment'](_0x3b3c5d){const _0x1591d1=_0x426fd8,{unitId:_0x5dff18}=_0x3b3c5d,_0x54d35d=_0x3b3c5d['threadId'],_0xddd362={'memberId':this[_0x1591d1(0x15f)][_0x1591d1(0x119)]()[_0x1591d1(0x14c)],'unitId':_0x5dff18,'threadId':_0x54d35d,'solved':_0x3b3c5d[_0x1591d1(0x12c)]?I[_0x1591d1(0x171)]:I[_0x1591d1(0x153)]},_0x19b2bd=await this[_0x1591d1(0x120)][_0x1591d1(0x14e)]('/universer-api/comment/unit/'+_0x5dff18+_0x1591d1(0x16f),{'body':_0xddd362});return!_0x19b2bd[_0x1591d1(0x12f)][_0x1591d1(0x16e)]||_0x19b2bd[_0x1591d1(0x12f)][_0x1591d1(0x16e)][_0x1591d1(0x13f)]===0x1;}async[_0x426fd8(0x143)](_0x489852,_0x4def35,_0x11d4f9,_0x5bf2d7){const _0x35fc3d=_0x426fd8,_0x562f53={'memberId':(await this[_0x35fc3d(0x135)][_0x35fc3d(0x17e)](_0x489852))[_0x35fc3d(0x145)](),'threadId':_0x11d4f9,'replyId':_0x5bf2d7,'unitId':_0x489852},_0x320754=await this[_0x35fc3d(0x120)][_0x35fc3d(0x14e)](_0x35fc3d(0x13c)+_0x489852+_0x35fc3d(0x167),{'body':_0x562f53});return!_0x320754[_0x35fc3d(0x12f)]['error']||_0x320754[_0x35fc3d(0x12f)][_0x35fc3d(0x16e)]['code']===0x1;}async['listComments'](_0x2891af,_0x316a19,_0x219d18){const _0x149cc7=_0x426fd8,_0x2b59a5={'unitId':_0x2891af,'threadId':_0x219d18},_0x153a08=await this['_httpService'][_0x149cc7(0x14e)](_0x149cc7(0x13c)+_0x2891af+'/list',{'body':_0x2b59a5}),_0x478b45=_0x219d18[_0x149cc7(0x146)](_0x2035a3=>ee(_0x153a08[_0x149cc7(0x12f)][_0x149cc7(0x126)][_0x2035a3],_0x2891af,_0x316a19))['filter'](Boolean);return Object[_0x149cc7(0x15d)](_0x153a08[_0x149cc7(0x12f)][_0x149cc7(0x16a)])[_0x149cc7(0x15a)](_0x264ecd=>{const _0x1a0132=_0x149cc7;this[_0x1a0132(0x15f)][_0x1a0132(0x11c)](_0x264ecd);}),_0x478b45;}[_0x426fd8(0x124)](_0x18d8a2){const _0x433338=_0x426fd8;return{'id':_0x18d8a2['id'],'threadId':_0x18d8a2['threadId'],'ref':_0x18d8a2[_0x433338(0x138)]};}};S=Q([b(0x0,_0x4ee146(_0x28ab9a)),b(0x1,_0x4ee146(_0x44cabc)),b(0x2,_0x4ee146(_0x44c5cb))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x26f758,_0x106bb3,_0x45ea78,_0x2a3bfd)=>{const _0x118a55=_0x426fd8;for(var _0xf2e6cb=_0x2a3bfd>0x1?void 0x0:_0x2a3bfd?re(_0x106bb3,_0x45ea78):_0x106bb3,_0x3534cc=_0x26f758[_0x118a55(0x11d)]-0x1,_0x433e19;_0x3534cc>=0x0;_0x3534cc--)(_0x433e19=_0x26f758[_0x3534cc])&&(_0xf2e6cb=_0x433e19(_0xf2e6cb)||_0xf2e6cb);return _0xf2e6cb;},M=(_0x4e72bb,_0x1d0aa4)=>(_0x92c24d,_0x54b819)=>_0x1d0aa4(_0x92c24d,_0x54b819,_0x4e72bb);let f=class extends _0x1cb851{constructor(_0x534207,_0x3a2173){const _0x2de5a7=_0x426fd8;super(),this['_threadCommentDataSourceService']=_0x534207,this[_0x2de5a7(0x13d)]=_0x3a2173,this[_0x2de5a7(0x13e)]();}[_0x426fd8(0x13e)](){const _0x39a406=_0x426fd8;this[_0x39a406(0x165)][_0x39a406(0x137)]=this['_threadCommentDataSource'],this[_0x39a406(0x165)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x4fbd0e),M(0x1,_0x4ee146(S))],f);var se=Object[_0x426fd8(0x144)],oe=Object[_0x426fd8(0x177)],ne=(_0x284618,_0xebc38f,_0x4ee5f9)=>_0xebc38f in _0x284618?se(_0x284618,_0xebc38f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4ee5f9}):_0x284618[_0xebc38f]=_0x4ee5f9,ie=(_0x56b21e,_0x208850,_0x3fb898,_0x16d072)=>{for(var _0x2abac9=_0x16d072>0x1?void 0x0:_0x16d072?oe(_0x208850,_0x3fb898):_0x208850,_0x12b79f=_0x56b21e['length']-0x1,_0x51fb89;_0x12b79f>=0x0;_0x12b79f--)(_0x51fb89=_0x56b21e[_0x12b79f])&&(_0x2abac9=_0x51fb89(_0x2abac9)||_0x2abac9);return _0x2abac9;},N=(_0x23b47c,_0x4c5e7f)=>(_0x58ab05,_0x4c0313)=>_0x4c5e7f(_0x58ab05,_0x4c0313,_0x23b47c),$=(_0x4fdf5c,_0x18f4f6,_0x50dd21)=>ne(_0x4fdf5c,typeof _0x18f4f6!=_0x426fd8(0x170)?_0x18f4f6+'':_0x18f4f6,_0x50dd21);let g=class extends _0x42e39d{constructor(_0x4ce1c4=O,_0x55e41,_0x2666fe){const _0x5194c5=_0x426fd8;super(),this[_0x5194c5(0x12a)]=_0x4ce1c4,this['_injector']=_0x55e41,this[_0x5194c5(0x163)]=_0x2666fe;const {..._0x103b86}=_0x2d8dad({},O,this[_0x5194c5(0x12a)]);this[_0x5194c5(0x163)][_0x5194c5(0x13a)](z,_0x103b86);}[_0x426fd8(0x147)](){const _0x55db13=_0x426fd8;[[S],[f],[_]][_0x55db13(0x15a)](_0x21b936=>{const _0x18d1f0=_0x55db13;this[_0x18d1f0(0x150)][_0x18d1f0(0x15b)](_0x21b936);});}['onReady'](){const _0x588f58=_0x426fd8;this[_0x588f58(0x150)][_0x588f58(0x140)](f),this[_0x588f58(0x150)][_0x588f58(0x140)](_);}};$(g,'pluginName',W),$(g,_0x426fd8(0x159),_0x29b4b7[_0x426fd8(0x172)]),g=ie([_0x537f52(_0x42ba3c,_0x39432b,_0x3618e3),N(0x1,_0x4ee146(_0x52b0e2)),N(0x2,_0x4f31e8)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x378934=_0x4714;(function(_0x39e8c0,_0x2dc381){const _0x7b4ffb=_0x4714,_0x2024eb=_0x39e8c0();while(!![]){try{const _0x3be1e9=-parseInt(_0x7b4ffb(0x97))/0x1+-parseInt(_0x7b4ffb(0xcd))/0x2+parseInt(_0x7b4ffb(0xec))/0x3*(parseInt(_0x7b4ffb(0xd1))/0x4)+parseInt(_0x7b4ffb(0xa9))/0x5+-parseInt(_0x7b4ffb(0xce))/0x6*(parseInt(_0x7b4ffb(0xe1))/0x7)+-parseInt(_0x7b4ffb(0x9f))/0x8+parseInt(_0x7b4ffb(0xc8))/0x9*(parseInt(_0x7b4ffb(0xd8))/0xa);if(_0x3be1e9===_0x2dc381)break;else _0x2024eb['push'](_0x2024eb['shift']());}catch(_0x3c592a){_0x2024eb['push'](_0x2024eb['shift']());}}}(_0x3507,0xd86e0));import{CommentService as _0x2f4cf6,CollaborationSessionService as _0x34723d,UniverCollaborationClientPlugin as _0x4c3b01}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x45bd27}from'@univerjs-pro/license';import{dayjs as _0x2b407b,UserManagerService as _0x2b0b35,Inject as _0x503545,Injector as _0x528f29,Disposable as _0x1b1f13,CustomRangeType as _0x7a80c2,UniverInstanceType as _0x31a0db,DependentOn as _0xe61c2a,IConfigService as _0x4b4a21,Plugin as _0x2e415a,merge as _0x4594c9}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x37845d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1c2a0a,IThreadCommentDataSourceService as _0x4f4afc}from'@univerjs/thread-comment';import{bufferTime as _0x58fc78}from'rxjs';import{HTTPService as _0x301a22}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3413b2=>(_0x3413b2[_0x3413b2[_0x378934(0xee)]=0x0]='OpenOrReOpen',_0x3413b2[_0x3413b2[_0x378934(0xdb)]=0x1]=_0x378934(0xdb),_0x3413b2[_0x3413b2[_0x378934(0xd2)]=-0x1]=_0x378934(0xd2),_0x3413b2))(I||{}),v=(_0x3fb455=>(_0x3fb455[_0x3fb455[_0x378934(0xc0)]=0x0]=_0x378934(0xc0),_0x3fb455[_0x3fb455[_0x378934(0xd4)]=0x1]=_0x378934(0xd4),_0x3fb455[_0x3fb455[_0x378934(0xca)]=0x2]='Reply',_0x3fb455[_0x3fb455[_0x378934(0xc3)]=0x3]=_0x378934(0xc3),_0x3fb455[_0x3fb455[_0x378934(0xbb)]=0x4]='Delete',_0x3fb455[_0x3fb455[_0x378934(0xe5)]=0x5]=_0x378934(0xe5),_0x3fb455[_0x3fb455[_0x378934(0xd2)]=-0x1]=_0x378934(0xd2),_0x3fb455))(v||{});const y=_0x563d4c=>_0x2b407b(new Date(+_0x563d4c))['format'](_0x378934(0x90)),B=async(_0x5afe6f,_0x210ed1)=>{const _0x17f071=_0x378934,_0xde703e=_0x5afe6f[_0x17f071(0xea)](_0x2b0b35),_0x291ceb=_0x5afe6f[_0x17f071(0xea)](_0x301a22);_0x210ed1[_0x17f071(0x94)](_0x4647b4=>{const _0x25527e=_0x17f071;_0xde703e[_0x25527e(0xb8)](_0x4647b4)&&_0x210ed1['delete'](_0x4647b4);}),_0x210ed1['size']&&(await _0x291ceb[_0x17f071(0xea)](_0x17f071(0xa8),{'params':{'userIDs':[..._0x210ed1]}}))['body'][_0x17f071(0xaa)]['forEach'](_0x2fde42=>{const _0x4b0b4f=_0x17f071;_0x2fde42&&_0xde703e[_0x4b0b4f(0xb6)](_0x2fde42);});};var K=Object[_0x378934(0xdf)],V=(_0x3d7b8b,_0x277b91,_0x1a66ab,_0x5f24b9)=>{const _0x3b2642=_0x378934;for(var _0x2b4f5c=_0x5f24b9>0x1?void 0x0:_0x5f24b9?K(_0x277b91,_0x1a66ab):_0x277b91,_0x1bf45a=_0x3d7b8b[_0x3b2642(0xa1)]-0x1,_0x17d8c7;_0x1bf45a>=0x0;_0x1bf45a--)(_0x17d8c7=_0x3d7b8b[_0x1bf45a])&&(_0x2b4f5c=_0x17d8c7(_0x2b4f5c)||_0x2b4f5c);return _0x2b4f5c;},p=(_0x1d9030,_0x30ab8d)=>(_0x2f69c8,_0x97843c)=>_0x30ab8d(_0x2f69c8,_0x97843c,_0x1d9030);let _=class extends _0x1b1f13{constructor(_0x2fa4a5,_0x8e1e83,_0x4cd20f,_0x350207){const _0x41fc6e=_0x378934;super(),this[_0x41fc6e(0xcc)]=_0x2fa4a5,this[_0x41fc6e(0xa7)]=_0x8e1e83,this[_0x41fc6e(0xae)]=_0x4cd20f,this['_injector']=_0x350207,this[_0x41fc6e(0x98)](),this[_0x41fc6e(0xd0)]();}[_0x378934(0xd0)](){const _0x3f1ec1=_0x378934;this[_0x3f1ec1(0xe2)](this['_threadCommentModel'][_0x3f1ec1(0xb1)]['pipe'](_0x58fc78(0x10))[_0x3f1ec1(0x92)](_0xa6bf5b=>{const _0x27af0b=_0x3f1ec1,_0x2ea396=new Set();_0xa6bf5b[_0x27af0b(0x94)](_0x5673a0=>{const _0x48cfa2=_0x27af0b;switch(_0x5673a0[_0x48cfa2(0xc5)]){case _0x48cfa2(0x99):{const _0x370c58=_0x5673a0[_0x48cfa2(0xc4)][_0x48cfa2(0xe3)];_0x2ea396[_0x48cfa2(0x99)](_0x370c58);break;}}}),B(this[_0x27af0b(0xd3)],_0x2ea396);}));}[_0x378934(0x98)](){const _0x59b57e=_0x378934;this[_0x59b57e(0xe2)](this[_0x59b57e(0xcc)][_0x59b57e(0xb1)][_0x59b57e(0x92)](async _0x31627b=>{const _0x3e57ed=_0x59b57e;var _0x14fc7b,_0x5a1f68,_0x3dc74a,_0x462b3e;const _0x238b04=(_0x14fc7b=this[_0x3e57ed(0xa7)][_0x3e57ed(0xe6)](_0x31627b[_0x3e57ed(0xeb)])[_0x3e57ed(0xab)](_0x290c33=>_0x290c33[_0x3e57ed(0x8e)]===_0x31627b['threadId']))==null?void 0x0:_0x14fc7b[_0x3e57ed(0xde)];if(!_0x238b04)return;const {unitId:_0x11eee0,subUnitId:_0x5f1018}=_0x238b04;switch(_0x31627b['user']&&this[_0x3e57ed(0xae)][_0x3e57ed(0xb6)](_0x31627b[_0x3e57ed(0xb7)]),_0x31627b[_0x3e57ed(0xc5)]){case v[_0x3e57ed(0xd4)]:break;case v[_0x3e57ed(0xca)]:{this[_0x3e57ed(0xa7)]['addComment'](_0x11eee0,_0x5f1018,{'unitId':_0x11eee0,'subUnitId':_0x5f1018,'ref':'','id':_0x31627b[_0x3e57ed(0x9c)],'dT':y(+_0x31627b['createTimestamp']),'threadId':_0x31627b['threadId'],'personId':(_0x3dc74a=(_0x5a1f68=_0x31627b[_0x3e57ed(0xb7)])==null?void 0x0:_0x5a1f68[_0x3e57ed(0xb4)])!=null?_0x3dc74a:_0x31627b[_0x3e57ed(0xcf)],'text':JSON[_0x3e57ed(0xa0)](_0x31627b['content']),'parentId':_0x238b04['id']});break;}case v[_0x3e57ed(0xbb)]:{const _0x3a3424=this[_0x3e57ed(0xa7)]['getComment'](_0x11eee0,_0x5f1018,_0x31627b[_0x3e57ed(0x9c)]);_0x3a3424&&_0x3a3424[_0x3e57ed(0xa2)]&&this[_0x3e57ed(0xa7)][_0x3e57ed(0xb3)](_0x11eee0,_0x5f1018,_0x31627b[_0x3e57ed(0x9c)]);break;}case v[_0x3e57ed(0xc3)]:{this['_threadCommentModel'][_0x3e57ed(0xc2)](_0x11eee0,_0x5f1018,{'commentId':_0x31627b['replyId'],'text':JSON['parse'](_0x31627b[_0x3e57ed(0xbe)])});break;}case v['Solve']:{const _0x3707ea=(_0x462b3e=this[_0x3e57ed(0xa7)][_0x3e57ed(0xe6)](_0x31627b['unitId'])[_0x3e57ed(0xab)](_0x21810c=>_0x21810c[_0x3e57ed(0x8e)]===_0x31627b['threadId']))==null?void 0x0:_0x462b3e[_0x3e57ed(0xde)];_0x3707ea&&this['_threadCommentModel'][_0x3e57ed(0xa6)](_0x11eee0,_0x5f1018,_0x3707ea['id'],_0x31627b[_0x3e57ed(0x9d)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x503545(_0x2f4cf6)),p(0x1,_0x503545(_0x1c2a0a)),p(0x2,_0x503545(_0x2b0b35)),p(0x3,_0x503545(_0x528f29))],_);const z=_0x378934(0x9b),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x557443,_0xb25a21,_0x4d8fd4,_0x3851ab)=>{for(var _0x380208=_0x3851ab>0x1?void 0x0:_0x3851ab?k(_0xb25a21,_0x4d8fd4):_0xb25a21,_0x17b082=_0x557443['length']-0x1,_0x330155;_0x17b082>=0x0;_0x17b082--)(_0x330155=_0x557443[_0x17b082])&&(_0x380208=_0x330155(_0x380208)||_0x380208);return _0x380208;},b=(_0x2fe3d0,_0x22bdce)=>(_0x12cca7,_0x42a767)=>_0x22bdce(_0x12cca7,_0x42a767,_0x2fe3d0);function X(_0x15f5c6,_0x108e3f){const _0x25375c=_0x378934,_0x1ed7b7=_0x15f5c6[_0x25375c(0xa4)][0x0];return{..._0x108e3f,'id':_0x1ed7b7[_0x25375c(0x9c)],'resolved':_0x15f5c6['solved']===0x1,'dT':y(_0x1ed7b7[_0x25375c(0xba)]),'personId':_0x1ed7b7[_0x25375c(0xcf)],'threadId':_0x1ed7b7[_0x25375c(0x8e)]};}function ee(_0x9dd82a,_0x36d7aa,_0x344c9e){const _0x1ebd10=_0x378934;var _0x3a87a9,_0x3508be;if(((_0x3508be=(_0x3a87a9=_0x9dd82a==null?void 0x0:_0x9dd82a['replies'])==null?void 0x0:_0x3a87a9[_0x1ebd10(0xa1)])!=null?_0x3508be:0x0)>0x0){const _0xf7008d=(_0x3bc7c9,_0x475d3a)=>({'id':_0x3bc7c9[_0x1ebd10(0x9c)],'threadId':_0x3bc7c9['threadId'],'dT':y(_0x3bc7c9[_0x1ebd10(0xba)]),'personId':_0x3bc7c9['userId'],'resolved':_0x9dd82a[_0x1ebd10(0x9d)]===I['Solved'],'unitId':_0x36d7aa,'subUnitId':_0x344c9e,'text':JSON[_0x1ebd10(0xa0)](_0x3bc7c9[_0x1ebd10(0xbe)]),'parentId':_0x475d3a}),_0x5f2299=_0xf7008d(_0x9dd82a[_0x1ebd10(0xa4)][0x0]);return{..._0x5f2299,'children':_0x9dd82a[_0x1ebd10(0xa4)][_0x1ebd10(0xaf)](0x1)[_0x1ebd10(0xe0)](_0x93936d=>_0xf7008d(_0x93936d,_0x5f2299['id']))};}return null;}let S=class{constructor(_0x17d9a4,_0x190492,_0x1a6b73){const _0x5f0c51=_0x378934;this[_0x5f0c51(0xdd)]=_0x17d9a4,this[_0x5f0c51(0xae)]=_0x190492,this[_0x5f0c51(0xa5)]=_0x1a6b73;}async[_0x378934(0xe7)](_0x31f3e6){const _0x122855=_0x378934;var _0x13e05e,_0x481665;const {parentId:_0x3793cc,unitId:_0x1bb28f,text:_0x2fecde,threadId:_0x59a518}=_0x31f3e6,_0x2b22ef=(_0x481665=(_0x13e05e=_0x2fecde[_0x122855(0xcb)])==null?void 0x0:_0x13e05e[_0x122855(0xac)](_0x112fd4=>_0x112fd4[_0x122855(0xbc)]===_0x7a80c2[_0x122855(0x8f)])[_0x122855(0xe0)](_0x25bb62=>_0x25bb62[_0x122855(0xbd)]))!=null?_0x481665:[],_0x3c5357=JSON[_0x122855(0xb2)](_0x2fecde),_0x2d2e01=(await this[_0x122855(0xa5)]['requireSession'](_0x1bb28f))['getMemberID']();if(_0x3793cc){const _0x3e7e53={'memberId':_0x2d2e01,'unitId':_0x1bb28f,'content':_0x3c5357,'mention':_0x2b22ef,'threadId':_0x59a518},_0x5af444=(await this[_0x122855(0xdd)][_0x122855(0xed)](_0x122855(0xdc)+_0x1bb28f+_0x122855(0xe4),{'body':_0x3e7e53}))[_0x122855(0xbf)][_0x122855(0x95)];return{..._0x31f3e6,'id':_0x5af444[_0x122855(0x9c)],'dT':_0x2b407b(+_0x5af444[_0x122855(0xba)])[_0x122855(0xd7)](_0x122855(0x90)),'personId':_0x5af444[_0x122855(0xcf)]};}else{const _0x58d6c2={'memberId':_0x2d2e01,'unitId':_0x1bb28f,'content':_0x3c5357,'mention':_0x2b22ef},_0x2d41ad=await this['_httpService'][_0x122855(0xed)]('/universer-api/comment/unit/'+_0x1bb28f+'/add',{'body':_0x58d6c2});return X(_0x2d41ad[_0x122855(0xbf)][_0x122855(0xd5)],_0x31f3e6);}}async[_0x378934(0xc2)](_0x5df828){const _0x43907d=_0x378934;var _0x46b493,_0x30c47b;const {text:_0x20086c,unitId:_0x527a45}=_0x5df828,_0x2f0133=(_0x30c47b=(_0x46b493=_0x20086c['customRanges'])==null?void 0x0:_0x46b493[_0x43907d(0xac)](_0x4648a3=>_0x4648a3[_0x43907d(0xbc)]===_0x7a80c2[_0x43907d(0x8f)])['map'](_0x1ce0e2=>_0x1ce0e2[_0x43907d(0xbd)]))!=null?_0x30c47b:[],_0x50bbbf=JSON[_0x43907d(0xb2)](_0x20086c),_0x415f0e=_0x5df828[_0x43907d(0x8e)],_0x2a655f=_0x5df828['id'],_0xbc323={'memberId':(await this['_sessionService']['requireSession'](_0x527a45))[_0x43907d(0xc7)](),'unitId':_0x527a45,'threadId':_0x415f0e,'mention':_0x2f0133,'content':_0x50bbbf,'replyId':_0x2a655f},_0x55c1a4=await this['_httpService'][_0x43907d(0xed)](_0x43907d(0xdc)+_0x527a45+_0x43907d(0xb0),{'body':_0xbc323});return!_0x55c1a4[_0x43907d(0xbf)][_0x43907d(0xda)]||_0x55c1a4[_0x43907d(0xbf)][_0x43907d(0xda)][_0x43907d(0xe8)]===0x1;}async['resolveComment'](_0x3832d6){const _0x102e1c=_0x378934,{unitId:_0x3d69f9}=_0x3832d6,_0x2aab6e=_0x3832d6[_0x102e1c(0x8e)],_0x233f4f={'memberId':this[_0x102e1c(0xae)][_0x102e1c(0xad)]()[_0x102e1c(0xb4)],'unitId':_0x3d69f9,'threadId':_0x2aab6e,'solved':_0x3832d6[_0x102e1c(0x96)]?I[_0x102e1c(0xdb)]:I[_0x102e1c(0xee)]},_0x71caa2=await this[_0x102e1c(0xdd)][_0x102e1c(0xed)]('/universer-api/comment/unit/'+_0x3d69f9+'/solved',{'body':_0x233f4f});return!_0x71caa2[_0x102e1c(0xbf)]['error']||_0x71caa2[_0x102e1c(0xbf)][_0x102e1c(0xda)][_0x102e1c(0xe8)]===0x1;}async['deleteComment'](_0x1b4eed,_0x31ad80,_0x1b2398,_0x22fd58){const _0x37c46f=_0x378934,_0x7c6367={'memberId':(await this['_sessionService'][_0x37c46f(0xb9)](_0x1b4eed))[_0x37c46f(0xc7)](),'threadId':_0x1b2398,'replyId':_0x22fd58,'unitId':_0x1b4eed},_0x5bd9ff=await this[_0x37c46f(0xdd)][_0x37c46f(0xed)](_0x37c46f(0xdc)+_0x1b4eed+'/delete',{'body':_0x7c6367});return!_0x5bd9ff[_0x37c46f(0xbf)][_0x37c46f(0xda)]||_0x5bd9ff[_0x37c46f(0xbf)][_0x37c46f(0xda)][_0x37c46f(0xe8)]===0x1;}async[_0x378934(0xe9)](_0x2c7527,_0x2c91ea,_0x136a0e){const _0x47c9a0=_0x378934,_0x188140={'unitId':_0x2c7527,'threadId':_0x136a0e},_0x4fd48e=await this[_0x47c9a0(0xdd)][_0x47c9a0(0xed)](_0x47c9a0(0xdc)+_0x2c7527+_0x47c9a0(0x9e),{'body':_0x188140}),_0x2c437b=_0x136a0e[_0x47c9a0(0xe0)](_0x1239be=>ee(_0x4fd48e[_0x47c9a0(0xbf)][_0x47c9a0(0xd9)][_0x1239be],_0x2c7527,_0x2c91ea))[_0x47c9a0(0xac)](Boolean);return Object['values'](_0x4fd48e[_0x47c9a0(0xbf)][_0x47c9a0(0xaa)])[_0x47c9a0(0x94)](_0x4f8852=>{const _0x67c6db=_0x47c9a0;this[_0x67c6db(0xae)][_0x67c6db(0xb6)](_0x4f8852);}),_0x2c437b;}['saveCommentToSnapshot'](_0x199663){const _0x3e89b5=_0x378934;return{'id':_0x199663['id'],'threadId':_0x199663[_0x3e89b5(0x8e)],'ref':_0x199663[_0x3e89b5(0xc6)]};}};S=Q([b(0x0,_0x503545(_0x301a22)),b(0x1,_0x503545(_0x2b0b35)),b(0x2,_0x503545(_0x34723d))],S);var re=Object[_0x378934(0xdf)],te=(_0x5e44ea,_0x2c3340,_0x1627c6,_0x27f5ed)=>{const _0x1b773c=_0x378934;for(var _0x208f1f=_0x27f5ed>0x1?void 0x0:_0x27f5ed?re(_0x2c3340,_0x1627c6):_0x2c3340,_0x2100f6=_0x5e44ea[_0x1b773c(0xa1)]-0x1,_0xc058d3;_0x2100f6>=0x0;_0x2100f6--)(_0xc058d3=_0x5e44ea[_0x2100f6])&&(_0x208f1f=_0xc058d3(_0x208f1f)||_0x208f1f);return _0x208f1f;},M=(_0x306fec,_0x2ec8ee)=>(_0xf4dfab,_0x1a35f1)=>_0x2ec8ee(_0xf4dfab,_0x1a35f1,_0x306fec);let f=class extends _0x1b1f13{constructor(_0x883d35,_0x4f0359){const _0x45f045=_0x378934;super(),this[_0x45f045(0x9a)]=_0x883d35,this['_threadCommentDataSource']=_0x4f0359,this[_0x45f045(0xc9)]();}[_0x378934(0xc9)](){const _0x1d9835=_0x378934;this['_threadCommentDataSourceService'][_0x1d9835(0x93)]=this['_threadCommentDataSource'],this[_0x1d9835(0x9a)][_0x1d9835(0xc1)]=!0x1;}};f=te([M(0x0,_0x4f4afc),M(0x1,_0x503545(S))],f);function _0x4714(_0x17301b,_0x2d7b65){const _0x350700=_0x3507();return _0x4714=function(_0x47140d,_0x505e61){_0x47140d=_0x47140d-0x8e;let _0x2a8ea0=_0x350700[_0x47140d];return _0x2a8ea0;},_0x4714(_0x17301b,_0x2d7b65);}var se=Object[_0x378934(0xb5)],oe=Object[_0x378934(0xdf)],ne=(_0x432a7e,_0x3f5786,_0x4141fe)=>_0x3f5786 in _0x432a7e?se(_0x432a7e,_0x3f5786,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4141fe}):_0x432a7e[_0x3f5786]=_0x4141fe,ie=(_0xecab0c,_0x25f61b,_0x3b7150,_0x137c83)=>{const _0x1e5a67=_0x378934;for(var _0x40f9a7=_0x137c83>0x1?void 0x0:_0x137c83?oe(_0x25f61b,_0x3b7150):_0x25f61b,_0x165613=_0xecab0c[_0x1e5a67(0xa1)]-0x1,_0x118e8e;_0x165613>=0x0;_0x165613--)(_0x118e8e=_0xecab0c[_0x165613])&&(_0x40f9a7=_0x118e8e(_0x40f9a7)||_0x40f9a7);return _0x40f9a7;},N=(_0x248f5a,_0xf5abf8)=>(_0x9227ab,_0x4cb9f3)=>_0xf5abf8(_0x9227ab,_0x4cb9f3,_0x248f5a),$=(_0x40f683,_0x31528f,_0x3ee39b)=>ne(_0x40f683,typeof _0x31528f!='symbol'?_0x31528f+'':_0x31528f,_0x3ee39b);let g=class extends _0x2e415a{constructor(_0x34f5d5=O,_0x334e32,_0x3a4edf){const _0x355cd8=_0x378934;super(),this['_config']=_0x34f5d5,this[_0x355cd8(0xd3)]=_0x334e32,this[_0x355cd8(0xd6)]=_0x3a4edf;const {..._0x2135bc}=_0x4594c9({},O,this[_0x355cd8(0x91)]);this[_0x355cd8(0xd6)]['setConfig'](z,_0x2135bc);}[_0x378934(0xa3)](){const _0x4405bc=_0x378934;[[S],[f],[_]][_0x4405bc(0x94)](_0x3ebc38=>{const _0x1623b7=_0x4405bc;this[_0x1623b7(0xd3)][_0x1623b7(0x99)](_0x3ebc38);});}['onReady'](){const _0x27a460=_0x378934;this[_0x27a460(0xd3)][_0x27a460(0xea)](f),this[_0x27a460(0xd3)]['get'](_);}};function _0x3507(){const _0x23bf1d=['getMemberID','29500290lQAseF','_initDataSource','Reply','customRanges','_commentService','1695176olvaIf','6vatvDk','userId','_initUserSync','4zxAvkO','UNRECOGNIZED','_injector','Add','comment','_configService','format','10CaXNSZ','comments','error','Solved','/universer-api/comment/unit/','_httpService','root','getOwnPropertyDescriptor','map','909363imDfgX','disposeWithMe','personId','/reply','Solve','getUnit','addComment','code','listComments','get','unitId','1234182TikvGf','post','OpenOrReOpen','threadId','COMMENT','YYYY/MM/DD\x20HH:mm','_config','subscribe','dataSource','forEach','reply','resolved','1650862xwXFhB','_init','add','_threadCommentDataSourceService','thread-comment-data-source.config','replyId','solved','/list','13415944hwSNmZ','parse','length','parentId','onStarting','replies','_sessionService','resolveComment','_threadCommentModel','/universer-api/user/list','7513220MNOKHA','users','find','filter','getCurrentUser','_userService','slice','/edit','commentUpdate$','stringify','deleteComment','userID','defineProperty','addUser','user','getUser','requireSession','createTimestamp','Delete','rangeType','rangeId','content','body','Unknown','syncUpdateMutationToColla','updateComment','Edit','payload','type','ref'];_0x3507=function(){return _0x23bf1d;};return _0x3507();}$(g,'pluginName',W),$(g,'type',_0x31a0db['UNIVER_UNKNOWN']),g=ie([_0xe61c2a(_0x37845d,_0x4c3b01,_0x45bd27),N(0x1,_0x503545(_0x528f29)),N(0x2,_0x4b4a21)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x32fd(_0x3a0e1b,_0x551dae){const _0x492405=_0x4924();return _0x32fd=function(_0x32fd03,_0x5df114){_0x32fd03=_0x32fd03-0x14e;let _0x525d4d=_0x492405[_0x32fd03];return _0x525d4d;},_0x32fd(_0x3a0e1b,_0x551dae);}function _0x4924(){const _0xd22d5f=['reply','UniverProCollaborationClient','dayjs','size','comments','DependentOn','/reply','users','length','bufferTime','addUser','exports','amd','onStarting','find','body','function','root','customRanges','_config','_injector','6wHUsqB','threadId','_threadCommentDataSourceService','/list','_threadCommentModel','rangeType','CustomRangeType','_threadCommentDataSource','deleteComment','Plugin','createTimestamp','CollaborationSessionService','disposeWithMe','updateComment','_initUserSync','UniverThreadComment','UserManagerService','@univerjs-pro/collaboration-client','6183470kWsHYh','userID','userId','user','replies','IThreadCommentDataSourceService','parentId','Reply','5161482zhMKHK','Solve','@univerjs/core','2847990xtgIyW','308bZnmBF','HTTPService','/universer-api/comment/unit/','getUser','UniverThreadCommentUIPlugin','_userService','Disposable','forEach','_configService','resolveComment','object','UNIVER_UNKNOWN','solved','filter','type','UNRECOGNIZED','Solved','format','listComments','symbol','personId','content','_commentService','1403908MJXkbh','Unknown','add','code','UniverCore','Add','UniverNetwork','getOwnPropertyDescriptor','slice','Delete','getCurrentUser','COMMENT','getComment','IConfigService','ThreadCommentModel','_init','resolved','1342954YwIytH','payload','UniverInstanceType','defineProperty','ref','saveCommentToSnapshot','map','32104vGcIFS','@univerjs/network','OpenOrReOpen','setConfig','comment','pluginName','subscribe','requireSession','UniverThreadCommentUi','getUnit','getMemberID','UniverProLicense','_sessionService','delete','Edit','parse','get','Module','values','@univerjs/thread-comment','replyId','/add','post','3103732zgZMiD','error','addComment','syncUpdateMutationToColla','UniverCollaborationClientPlugin','stringify','toStringTag','CommentService','_httpService','Inject','UniverThreadCommentDataSourcePlugin','30eZCgZM','Injector'];_0x4924=function(){return _0xd22d5f;};return _0x4924();}(function(_0x1eb2a4,_0x30563a){const _0x56acb9=_0x32fd,_0xfd386c=_0x1eb2a4();while(!![]){try{const _0x3cb0fb=parseInt(_0x56acb9(0x1d2))/0x1+-parseInt(_0x56acb9(0x1c1))/0x2+-parseInt(_0x56acb9(0x1a9))/0x3+parseInt(_0x56acb9(0x16a))/0x4+-parseInt(_0x56acb9(0x19e))/0x5*(parseInt(_0x56acb9(0x18c))/0x6)+-parseInt(_0x56acb9(0x1aa))/0x7*(parseInt(_0x56acb9(0x153))/0x8)+-parseInt(_0x56acb9(0x1a6))/0x9*(-parseInt(_0x56acb9(0x175))/0xa);if(_0x3cb0fb===_0x30563a)break;else _0xfd386c['push'](_0xfd386c['shift']());}catch(_0x5a4264){_0xfd386c['push'](_0xfd386c['shift']());}}}(_0x4924,0xbd2af),function(_0x2bf26f,_0x10b764){const _0x3ddfbf=_0x32fd;typeof exports==_0x3ddfbf(0x1b4)&&typeof module<'u'?_0x10b764(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x3ddfbf(0x187)&&define[_0x3ddfbf(0x183)]?define([_0x3ddfbf(0x182),_0x3ddfbf(0x19d),'@univerjs-pro/license',_0x3ddfbf(0x1a8),'@univerjs/thread-comment-ui',_0x3ddfbf(0x166),'rxjs',_0x3ddfbf(0x154)],_0x10b764):(_0x2bf26f=typeof globalThis<'u'?globalThis:_0x2bf26f||self,_0x10b764(_0x2bf26f['UniverProThreadCommentDatasource']={},_0x2bf26f[_0x3ddfbf(0x178)],_0x2bf26f[_0x3ddfbf(0x15e)],_0x2bf26f[_0x3ddfbf(0x1c5)],_0x2bf26f[_0x3ddfbf(0x15b)],_0x2bf26f[_0x3ddfbf(0x19b)],_0x2bf26f['rxjs'],_0x2bf26f[_0x3ddfbf(0x1c7)]));}(this,function(_0x4b43e9,_0x49f4cf,_0xf779f0,_0x116b5f,_0x4c6c64,_0x2b9794,_0x1c3e47,_0x15534f){'use strict';const _0x298fbc=_0x32fd;const _0x14bda9='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x1457a2=(_0x3c308f=>(_0x3c308f[_0x3c308f[_0x298fbc(0x155)]=0x0]=_0x298fbc(0x155),_0x3c308f[_0x3c308f[_0x298fbc(0x1ba)]=0x1]=_0x298fbc(0x1ba),_0x3c308f[_0x3c308f[_0x298fbc(0x1b9)]=-0x1]=_0x298fbc(0x1b9),_0x3c308f))(_0x1457a2||{}),_0x2b90da=(_0x4766d2=>(_0x4766d2[_0x4766d2['Unknown']=0x0]=_0x298fbc(0x1c2),_0x4766d2[_0x4766d2['Add']=0x1]=_0x298fbc(0x1c6),_0x4766d2[_0x4766d2[_0x298fbc(0x1a5)]=0x2]='Reply',_0x4766d2[_0x4766d2['Edit']=0x3]=_0x298fbc(0x161),_0x4766d2[_0x4766d2[_0x298fbc(0x1ca)]=0x4]=_0x298fbc(0x1ca),_0x4766d2[_0x4766d2[_0x298fbc(0x1a7)]=0x5]=_0x298fbc(0x1a7),_0x4766d2[_0x4766d2[_0x298fbc(0x1b9)]=-0x1]=_0x298fbc(0x1b9),_0x4766d2))(_0x2b90da||{});const _0x2c170d=_0x2b7a0a=>_0x116b5f['dayjs'](new Date(+_0x2b7a0a))[_0x298fbc(0x1bb)]('YYYY/MM/DD\x20HH:mm'),_0x198735=async(_0x4c62ba,_0x20d778)=>{const _0xf85d7=_0x298fbc,_0x1bf086=_0x4c62ba[_0xf85d7(0x163)](_0x116b5f[_0xf85d7(0x19c)]),_0x183f9a=_0x4c62ba['get'](_0x15534f[_0xf85d7(0x1ab)]);_0x20d778[_0xf85d7(0x1b1)](_0x55b005=>{const _0x364ae1=_0xf85d7;_0x1bf086[_0x364ae1(0x1ad)](_0x55b005)&&_0x20d778[_0x364ae1(0x160)](_0x55b005);}),_0x20d778[_0xf85d7(0x17a)]&&(await _0x183f9a[_0xf85d7(0x163)]('/universer-api/user/list',{'params':{'userIDs':[..._0x20d778]}}))[_0xf85d7(0x186)]['users'][_0xf85d7(0x1b1)](_0x2ad244=>{const _0x466930=_0xf85d7;_0x2ad244&&_0x1bf086[_0x466930(0x181)](_0x2ad244);});};var _0x438afc=Object[_0x298fbc(0x1c8)],_0x181941=(_0x4892e8,_0xa39b1d,_0x202387,_0x5a39ad)=>{for(var _0x1c67f8=_0x5a39ad>0x1?void 0x0:_0x5a39ad?_0x438afc(_0xa39b1d,_0x202387):_0xa39b1d,_0x16368d=_0x4892e8['length']-0x1,_0x29a5de;_0x16368d>=0x0;_0x16368d--)(_0x29a5de=_0x4892e8[_0x16368d])&&(_0x1c67f8=_0x29a5de(_0x1c67f8)||_0x1c67f8);return _0x1c67f8;},_0x32658a=(_0xaa7374,_0x3ea634)=>(_0x10ebd0,_0x44ace6)=>_0x3ea634(_0x10ebd0,_0x44ace6,_0xaa7374);let _0x5888c0=class extends _0x116b5f['Disposable']{constructor(_0x4a30cf,_0x3e09af,_0x3712e4,_0x13768b){const _0x3b64ba=_0x298fbc;super(),this[_0x3b64ba(0x1c0)]=_0x4a30cf,this['_threadCommentModel']=_0x3e09af,this['_userService']=_0x3712e4,this[_0x3b64ba(0x18b)]=_0x13768b,this['_init'](),this['_initUserSync']();}[_0x298fbc(0x19a)](){const _0x1cb7b8=_0x298fbc;this[_0x1cb7b8(0x198)](this[_0x1cb7b8(0x190)]['commentUpdate$']['pipe'](_0x1c3e47[_0x1cb7b8(0x180)](0x10))[_0x1cb7b8(0x159)](_0x22dc69=>{const _0x17c822=_0x1cb7b8,_0x30000f=new Set();_0x22dc69[_0x17c822(0x1b1)](_0xd069ad=>{const _0x266c4c=_0x17c822;switch(_0xd069ad[_0x266c4c(0x1b8)]){case _0x266c4c(0x1c3):{const _0x21e29b=_0xd069ad[_0x266c4c(0x1d3)][_0x266c4c(0x1be)];_0x30000f[_0x266c4c(0x1c3)](_0x21e29b);break;}}}),_0x198735(this['_injector'],_0x30000f);}));}[_0x298fbc(0x1d0)](){const _0x35b2fa=_0x298fbc;this[_0x35b2fa(0x198)](this['_commentService']['commentUpdate$'][_0x35b2fa(0x159)](async _0xfa32df=>{const _0x56dbf0=_0x35b2fa;var _0x213812,_0x14fd34,_0x49b337,_0x28c733;const _0x1d0ff7=(_0x213812=this[_0x56dbf0(0x190)][_0x56dbf0(0x15c)](_0xfa32df['unitId'])[_0x56dbf0(0x185)](_0x379437=>_0x379437['threadId']===_0xfa32df[_0x56dbf0(0x18d)]))==null?void 0x0:_0x213812['root'];if(!_0x1d0ff7)return;const {unitId:_0x515e4d,subUnitId:_0x7e023}=_0x1d0ff7;switch(_0xfa32df['user']&&this[_0x56dbf0(0x1af)][_0x56dbf0(0x181)](_0xfa32df[_0x56dbf0(0x1a1)]),_0xfa32df[_0x56dbf0(0x1b8)]){case _0x2b90da['Add']:break;case _0x2b90da['Reply']:{this[_0x56dbf0(0x190)][_0x56dbf0(0x16c)](_0x515e4d,_0x7e023,{'unitId':_0x515e4d,'subUnitId':_0x7e023,'ref':'','id':_0xfa32df[_0x56dbf0(0x167)],'dT':_0x2c170d(+_0xfa32df['createTimestamp']),'threadId':_0xfa32df[_0x56dbf0(0x18d)],'personId':(_0x49b337=(_0x14fd34=_0xfa32df[_0x56dbf0(0x1a1)])==null?void 0x0:_0x14fd34[_0x56dbf0(0x19f)])!=null?_0x49b337:_0xfa32df[_0x56dbf0(0x1a0)],'text':JSON[_0x56dbf0(0x162)](_0xfa32df[_0x56dbf0(0x1bf)]),'parentId':_0x1d0ff7['id']});break;}case _0x2b90da[_0x56dbf0(0x1ca)]:{const _0x49c3cd=this[_0x56dbf0(0x190)][_0x56dbf0(0x1cd)](_0x515e4d,_0x7e023,_0xfa32df['replyId']);_0x49c3cd&&_0x49c3cd[_0x56dbf0(0x1a4)]&&this[_0x56dbf0(0x190)][_0x56dbf0(0x194)](_0x515e4d,_0x7e023,_0xfa32df[_0x56dbf0(0x167)]);break;}case _0x2b90da[_0x56dbf0(0x161)]:{this[_0x56dbf0(0x190)][_0x56dbf0(0x199)](_0x515e4d,_0x7e023,{'commentId':_0xfa32df[_0x56dbf0(0x167)],'text':JSON[_0x56dbf0(0x162)](_0xfa32df['content'])});break;}case _0x2b90da[_0x56dbf0(0x1a7)]:{const _0x23efd7=(_0x28c733=this[_0x56dbf0(0x190)][_0x56dbf0(0x15c)](_0xfa32df['unitId'])[_0x56dbf0(0x185)](_0x45ec4d=>_0x45ec4d['threadId']===_0xfa32df['threadId']))==null?void 0x0:_0x28c733[_0x56dbf0(0x188)];_0x23efd7&&this[_0x56dbf0(0x190)][_0x56dbf0(0x1b3)](_0x515e4d,_0x7e023,_0x23efd7['id'],_0xfa32df['solved']===_0x1457a2[_0x56dbf0(0x1ba)]);break;}}}));}};_0x5888c0=_0x181941([_0x32658a(0x0,_0x116b5f['Inject'](_0x49f4cf[_0x298fbc(0x171)])),_0x32658a(0x1,_0x116b5f[_0x298fbc(0x173)](_0x2b9794[_0x298fbc(0x1cf)])),_0x32658a(0x2,_0x116b5f[_0x298fbc(0x173)](_0x116b5f[_0x298fbc(0x19c)])),_0x32658a(0x3,_0x116b5f['Inject'](_0x116b5f[_0x298fbc(0x176)]))],_0x5888c0);const _0x17f5c6='thread-comment-data-source.config',_0x484967={};var _0x204748=Object[_0x298fbc(0x1c8)],_0x55e1c2=(_0x1260f9,_0x384aa6,_0x43de15,_0x333a73)=>{const _0x2328ef=_0x298fbc;for(var _0x1bba46=_0x333a73>0x1?void 0x0:_0x333a73?_0x204748(_0x384aa6,_0x43de15):_0x384aa6,_0x2917b3=_0x1260f9[_0x2328ef(0x17f)]-0x1,_0x581e12;_0x2917b3>=0x0;_0x2917b3--)(_0x581e12=_0x1260f9[_0x2917b3])&&(_0x1bba46=_0x581e12(_0x1bba46)||_0x1bba46);return _0x1bba46;},_0x218554=(_0x2e3a60,_0x15adae)=>(_0x4935d0,_0x1cde26)=>_0x15adae(_0x4935d0,_0x1cde26,_0x2e3a60);function _0x4b5c06(_0x4326cd,_0x5ddf59){const _0x3cddcf=_0x298fbc,_0x1c7f1c=_0x4326cd['replies'][0x0];return{..._0x5ddf59,'id':_0x1c7f1c['replyId'],'resolved':_0x4326cd[_0x3cddcf(0x1b6)]===0x1,'dT':_0x2c170d(_0x1c7f1c[_0x3cddcf(0x196)]),'personId':_0x1c7f1c[_0x3cddcf(0x1a0)],'threadId':_0x1c7f1c[_0x3cddcf(0x18d)]};}function _0x44908a(_0x87d235,_0x415377,_0xad4274){const _0x2b5af6=_0x298fbc;var _0x2b30a2,_0x4930c6;if(((_0x4930c6=(_0x2b30a2=_0x87d235==null?void 0x0:_0x87d235[_0x2b5af6(0x1a2)])==null?void 0x0:_0x2b30a2[_0x2b5af6(0x17f)])!=null?_0x4930c6:0x0)>0x0){const _0x5557d4=(_0xe7d64b,_0x10203d)=>({'id':_0xe7d64b[_0x2b5af6(0x167)],'threadId':_0xe7d64b[_0x2b5af6(0x18d)],'dT':_0x2c170d(_0xe7d64b[_0x2b5af6(0x196)]),'personId':_0xe7d64b[_0x2b5af6(0x1a0)],'resolved':_0x87d235[_0x2b5af6(0x1b6)]===_0x1457a2[_0x2b5af6(0x1ba)],'unitId':_0x415377,'subUnitId':_0xad4274,'text':JSON[_0x2b5af6(0x162)](_0xe7d64b['content']),'parentId':_0x10203d}),_0x732659=_0x5557d4(_0x87d235[_0x2b5af6(0x1a2)][0x0]);return{..._0x732659,'children':_0x87d235['replies'][_0x2b5af6(0x1c9)](0x1)[_0x2b5af6(0x152)](_0x1fe430=>_0x5557d4(_0x1fe430,_0x732659['id']))};}return null;}let _0x82a4b9=class{constructor(_0x40cdb1,_0x3221f1,_0x18a20c){const _0x24b8f4=_0x298fbc;this[_0x24b8f4(0x172)]=_0x40cdb1,this[_0x24b8f4(0x1af)]=_0x3221f1,this[_0x24b8f4(0x15f)]=_0x18a20c;}async[_0x298fbc(0x16c)](_0x28684e){const _0x12d67b=_0x298fbc;var _0x4c2428,_0x23eb99;const {parentId:_0x4df686,unitId:_0x14a34f,text:_0x4bd1be,threadId:_0xadb604}=_0x28684e,_0x33d900=(_0x23eb99=(_0x4c2428=_0x4bd1be[_0x12d67b(0x189)])==null?void 0x0:_0x4c2428[_0x12d67b(0x1b7)](_0x58363a=>_0x58363a[_0x12d67b(0x191)]===_0x116b5f[_0x12d67b(0x192)][_0x12d67b(0x1cc)])[_0x12d67b(0x152)](_0x1f0ca8=>_0x1f0ca8['rangeId']))!=null?_0x23eb99:[],_0x3102da=JSON[_0x12d67b(0x16f)](_0x4bd1be),_0x66893f=(await this[_0x12d67b(0x15f)][_0x12d67b(0x15a)](_0x14a34f))[_0x12d67b(0x15d)]();if(_0x4df686){const _0x2379e1={'memberId':_0x66893f,'unitId':_0x14a34f,'content':_0x3102da,'mention':_0x33d900,'threadId':_0xadb604},_0x6f2800=(await this[_0x12d67b(0x172)]['post'](_0x12d67b(0x1ac)+_0x14a34f+_0x12d67b(0x17d),{'body':_0x2379e1}))['body'][_0x12d67b(0x177)];return{..._0x28684e,'id':_0x6f2800['replyId'],'dT':_0x116b5f[_0x12d67b(0x179)](+_0x6f2800[_0x12d67b(0x196)])[_0x12d67b(0x1bb)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x6f2800[_0x12d67b(0x1a0)]};}else{const _0xfc511a={'memberId':_0x66893f,'unitId':_0x14a34f,'content':_0x3102da,'mention':_0x33d900},_0x34c213=await this[_0x12d67b(0x172)][_0x12d67b(0x169)](_0x12d67b(0x1ac)+_0x14a34f+_0x12d67b(0x168),{'body':_0xfc511a});return _0x4b5c06(_0x34c213[_0x12d67b(0x186)][_0x12d67b(0x157)],_0x28684e);}}async[_0x298fbc(0x199)](_0x39cfc){const _0x551b66=_0x298fbc;var _0x5c475f,_0x16220f;const {text:_0xa94c1e,unitId:_0x2e5e3d}=_0x39cfc,_0xd5a1bd=(_0x16220f=(_0x5c475f=_0xa94c1e['customRanges'])==null?void 0x0:_0x5c475f[_0x551b66(0x1b7)](_0x2b2520=>_0x2b2520[_0x551b66(0x191)]===_0x116b5f[_0x551b66(0x192)]['COMMENT'])[_0x551b66(0x152)](_0x242114=>_0x242114['rangeId']))!=null?_0x16220f:[],_0xbe071=JSON['stringify'](_0xa94c1e),_0x5afa32=_0x39cfc[_0x551b66(0x18d)],_0xe09474=_0x39cfc['id'],_0x4a723c={'memberId':(await this[_0x551b66(0x15f)][_0x551b66(0x15a)](_0x2e5e3d))[_0x551b66(0x15d)](),'unitId':_0x2e5e3d,'threadId':_0x5afa32,'mention':_0xd5a1bd,'content':_0xbe071,'replyId':_0xe09474},_0x2d78fc=await this[_0x551b66(0x172)]['post'](_0x551b66(0x1ac)+_0x2e5e3d+'/edit',{'body':_0x4a723c});return!_0x2d78fc[_0x551b66(0x186)][_0x551b66(0x16b)]||_0x2d78fc[_0x551b66(0x186)][_0x551b66(0x16b)]['code']===0x1;}async[_0x298fbc(0x1b3)](_0x348d14){const _0x1eb991=_0x298fbc,{unitId:_0x58d679}=_0x348d14,_0x170f70=_0x348d14[_0x1eb991(0x18d)],_0x4d50c2={'memberId':this['_userService'][_0x1eb991(0x1cb)]()['userID'],'unitId':_0x58d679,'threadId':_0x170f70,'solved':_0x348d14[_0x1eb991(0x1d1)]?_0x1457a2['Solved']:_0x1457a2['OpenOrReOpen']},_0x163cf9=await this[_0x1eb991(0x172)][_0x1eb991(0x169)]('/universer-api/comment/unit/'+_0x58d679+'/solved',{'body':_0x4d50c2});return!_0x163cf9['body'][_0x1eb991(0x16b)]||_0x163cf9[_0x1eb991(0x186)][_0x1eb991(0x16b)][_0x1eb991(0x1c4)]===0x1;}async[_0x298fbc(0x194)](_0x2dc164,_0x363ade,_0x108595,_0x53248c){const _0x3b9fc1=_0x298fbc,_0x2be49f={'memberId':(await this[_0x3b9fc1(0x15f)][_0x3b9fc1(0x15a)](_0x2dc164))[_0x3b9fc1(0x15d)](),'threadId':_0x108595,'replyId':_0x53248c,'unitId':_0x2dc164},_0x3fdf81=await this[_0x3b9fc1(0x172)]['post']('/universer-api/comment/unit/'+_0x2dc164+'/delete',{'body':_0x2be49f});return!_0x3fdf81[_0x3b9fc1(0x186)][_0x3b9fc1(0x16b)]||_0x3fdf81['body'][_0x3b9fc1(0x16b)][_0x3b9fc1(0x1c4)]===0x1;}async[_0x298fbc(0x1bc)](_0x7f1e5,_0x3cf124,_0x425fbd){const _0x5a0e8b=_0x298fbc,_0x15273b={'unitId':_0x7f1e5,'threadId':_0x425fbd},_0x365a20=await this[_0x5a0e8b(0x172)]['post'](_0x5a0e8b(0x1ac)+_0x7f1e5+_0x5a0e8b(0x18f),{'body':_0x15273b}),_0x1edb65=_0x425fbd[_0x5a0e8b(0x152)](_0x902afc=>_0x44908a(_0x365a20[_0x5a0e8b(0x186)][_0x5a0e8b(0x17b)][_0x902afc],_0x7f1e5,_0x3cf124))['filter'](Boolean);return Object[_0x5a0e8b(0x165)](_0x365a20[_0x5a0e8b(0x186)][_0x5a0e8b(0x17e)])['forEach'](_0x247ecc=>{const _0x49eb38=_0x5a0e8b;this[_0x49eb38(0x1af)]['addUser'](_0x247ecc);}),_0x1edb65;}[_0x298fbc(0x151)](_0x45c88d){const _0x3ee717=_0x298fbc;return{'id':_0x45c88d['id'],'threadId':_0x45c88d['threadId'],'ref':_0x45c88d[_0x3ee717(0x150)]};}};_0x82a4b9=_0x55e1c2([_0x218554(0x0,_0x116b5f[_0x298fbc(0x173)](_0x15534f[_0x298fbc(0x1ab)])),_0x218554(0x1,_0x116b5f['Inject'](_0x116b5f[_0x298fbc(0x19c)])),_0x218554(0x2,_0x116b5f['Inject'](_0x49f4cf[_0x298fbc(0x197)]))],_0x82a4b9);var _0x2df7cd=Object[_0x298fbc(0x1c8)],_0x4cdeac=(_0x5621b7,_0x47412d,_0x5d480b,_0x3ae5a8)=>{const _0x544e36=_0x298fbc;for(var _0x4c4558=_0x3ae5a8>0x1?void 0x0:_0x3ae5a8?_0x2df7cd(_0x47412d,_0x5d480b):_0x47412d,_0x212c5b=_0x5621b7[_0x544e36(0x17f)]-0x1,_0x4ee8ce;_0x212c5b>=0x0;_0x212c5b--)(_0x4ee8ce=_0x5621b7[_0x212c5b])&&(_0x4c4558=_0x4ee8ce(_0x4c4558)||_0x4c4558);return _0x4c4558;},_0x337f08=(_0x2b2e50,_0x20020e)=>(_0x3ad10e,_0x4a74b8)=>_0x20020e(_0x3ad10e,_0x4a74b8,_0x2b2e50);let _0x2f4d47=class extends _0x116b5f[_0x298fbc(0x1b0)]{constructor(_0x250f33,_0x460c8d){const _0x55a2c2=_0x298fbc;super(),this[_0x55a2c2(0x18e)]=_0x250f33,this['_threadCommentDataSource']=_0x460c8d,this['_initDataSource']();}['_initDataSource'](){const _0x28ddec=_0x298fbc;this[_0x28ddec(0x18e)]['dataSource']=this[_0x28ddec(0x193)],this['_threadCommentDataSourceService'][_0x28ddec(0x16d)]=!0x1;}};_0x2f4d47=_0x4cdeac([_0x337f08(0x0,_0x2b9794[_0x298fbc(0x1a3)]),_0x337f08(0x1,_0x116b5f[_0x298fbc(0x173)](_0x82a4b9))],_0x2f4d47);var _0x1b088e=Object['defineProperty'],_0x4c8492=Object[_0x298fbc(0x1c8)],_0x2186e6=(_0x357593,_0x571eb0,_0xf03f59)=>_0x571eb0 in _0x357593?_0x1b088e(_0x357593,_0x571eb0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf03f59}):_0x357593[_0x571eb0]=_0xf03f59,_0x133dba=(_0x438795,_0x2adf80,_0x54d091,_0x3c79a7)=>{const _0x4d4642=_0x298fbc;for(var _0xb82c8c=_0x3c79a7>0x1?void 0x0:_0x3c79a7?_0x4c8492(_0x2adf80,_0x54d091):_0x2adf80,_0x4debcb=_0x438795[_0x4d4642(0x17f)]-0x1,_0x1b2b89;_0x4debcb>=0x0;_0x4debcb--)(_0x1b2b89=_0x438795[_0x4debcb])&&(_0xb82c8c=_0x1b2b89(_0xb82c8c)||_0xb82c8c);return _0xb82c8c;},_0x458f2b=(_0x3ab1b5,_0x179cf9)=>(_0x10f0a0,_0xb1141b)=>_0x179cf9(_0x10f0a0,_0xb1141b,_0x3ab1b5),_0x58a21b=(_0x4b612c,_0x4e2392,_0x51261c)=>_0x2186e6(_0x4b612c,typeof _0x4e2392!=_0x298fbc(0x1bd)?_0x4e2392+'':_0x4e2392,_0x51261c);_0x4b43e9[_0x298fbc(0x174)]=class extends _0x116b5f[_0x298fbc(0x195)]{constructor(_0xfbfe9e=_0x484967,_0x38ea94,_0x43fd4f){const _0x4e2b57=_0x298fbc;super(),this[_0x4e2b57(0x18a)]=_0xfbfe9e,this[_0x4e2b57(0x18b)]=_0x38ea94,this[_0x4e2b57(0x1b2)]=_0x43fd4f;const {..._0x6720d3}=_0x116b5f['merge']({},_0x484967,this['_config']);this['_configService'][_0x4e2b57(0x156)](_0x17f5c6,_0x6720d3);}[_0x298fbc(0x184)](){const _0x3f8c71=_0x298fbc;[[_0x82a4b9],[_0x2f4d47],[_0x5888c0]][_0x3f8c71(0x1b1)](_0x413251=>{const _0x5676ce=_0x3f8c71;this[_0x5676ce(0x18b)]['add'](_0x413251);});}['onReady'](){const _0x58261b=_0x298fbc;this[_0x58261b(0x18b)][_0x58261b(0x163)](_0x2f4d47),this[_0x58261b(0x18b)][_0x58261b(0x163)](_0x5888c0);}},_0x58a21b(_0x4b43e9[_0x298fbc(0x174)],_0x298fbc(0x158),_0x14bda9),_0x58a21b(_0x4b43e9[_0x298fbc(0x174)],_0x298fbc(0x1b8),_0x116b5f[_0x298fbc(0x14e)][_0x298fbc(0x1b5)]),_0x4b43e9[_0x298fbc(0x174)]=_0x133dba([_0x116b5f[_0x298fbc(0x17c)](_0x4c6c64[_0x298fbc(0x1ae)],_0x49f4cf[_0x298fbc(0x16e)],_0xf779f0['UniverLicensePlugin']),_0x458f2b(0x1,_0x116b5f[_0x298fbc(0x173)](_0x116b5f[_0x298fbc(0x176)])),_0x458f2b(0x2,_0x116b5f[_0x298fbc(0x1ce)])],_0x4b43e9[_0x298fbc(0x174)]),Object[_0x298fbc(0x14f)](_0x4b43e9,Symbol[_0x298fbc(0x170)],{'value':_0x298fbc(0x164)});}));
|
|
1
|
+
function _0x32b3(_0x30bb78,_0x1dcf05){const _0x3ee7d2=_0x3ee7();return _0x32b3=function(_0x32b339,_0x59d799){_0x32b339=_0x32b339-0x74;let _0xec5028=_0x3ee7d2[_0x32b339];return _0xec5028;},_0x32b3(_0x30bb78,_0x1dcf05);}function _0x3ee7(){const _0x1b58f2=['onStarting','YYYY/MM/DD\x20HH:mm','symbol','root','Injector','_init','IConfigService','code','UniverProLicense','type','UserManagerService','202257ZzUlUX','384148CDvlyn','Solve','_threadCommentDataSource','resolveComment','customRanges','unitId','CustomRangeType','format','_configService','comment','UniverProCollaborationClient','saveCommentToSnapshot','_threadCommentModel','_initUserSync','/add','delete','Edit','/universer-api/comment/unit/','@univerjs/network','forEach','getOwnPropertyDescriptor','UNIVER_UNKNOWN','355950bSFkQA','updateComment','comments','defineProperty','exports','IThreadCommentDataSourceService','3mfLoIt','filter','Disposable','_threadCommentDataSourceService','slice','UniverProThreadCommentDatasource','Add','UniverCollaborationClientPlugin','object','UniverThreadCommentDataSourcePlugin','Plugin','Module','getMemberID','HTTPService','threadId','ThreadCommentModel','solved','/delete','/list','Delete','_initDataSource','UniverCore','addComment','map','UniverNetwork','onReady','UniverThreadCommentUi','size','rangeType','amd','find','commentUpdate$','30GqvwSL','Unknown','body','length','2GLGWKA','createTimestamp','118893DwVtpP','disposeWithMe','DependentOn','getUnit','4034176HIXlTh','dayjs','replies','COMMENT','function','/edit','Solved','personId','parse','subscribe','thread-comment-data-source.config','_httpService','userID','/universer-api/user/list','userId','253065oQYJqK','add','addUser','requireSession','content','/reply','getUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','rxjs','9489519edGHOQ','UNRECOGNIZED','replyId','rangeId','users','getCurrentUser','ref','getComment','@univerjs-pro/collaboration-client','_config','_sessionService','_userService','1130aFbGjL','bufferTime','error','user','stringify','_injector','reply','/solved','Reply','post','@univerjs/core','OpenOrReOpen','get','Inject','payload','resolved'];_0x3ee7=function(){return _0x1b58f2;};return _0x3ee7();}(function(_0x44c817,_0x36044c){const _0x4535f7=_0x32b3,_0x33c57e=_0x44c817();while(!![]){try{const _0x3b7a86=-parseInt(_0x4535f7(0x7b))/0x1*(-parseInt(_0x4535f7(0x79))/0x2)+-parseInt(_0x4535f7(0xdb))/0x3*(-parseInt(_0x4535f7(0xbf))/0x4)+-parseInt(_0x4535f7(0x8e))/0x5*(-parseInt(_0x4535f7(0x75))/0x6)+-parseInt(_0x4535f7(0xd5))/0x7+-parseInt(_0x4535f7(0x7f))/0x8+-parseInt(_0x4535f7(0x97))/0x9+parseInt(_0x4535f7(0xa3))/0xa*(parseInt(_0x4535f7(0xbe))/0xb);if(_0x3b7a86===_0x36044c)break;else _0x33c57e['push'](_0x33c57e['shift']());}catch(_0x250fea){_0x33c57e['push'](_0x33c57e['shift']());}}}(_0x3ee7,0xe4915),function(_0x3e612f,_0x2d37ac){const _0x40178f=_0x32b3;typeof exports==_0x40178f(0xe3)&&typeof module<'u'?_0x2d37ac(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x40178f(0x83)&&define[_0x40178f(0xf8)]?define([_0x40178f(0xd9),_0x40178f(0x9f),'@univerjs-pro/license',_0x40178f(0xad),'@univerjs/thread-comment-ui','@univerjs/thread-comment',_0x40178f(0x96),_0x40178f(0xd1)],_0x2d37ac):(_0x3e612f=typeof globalThis<'u'?globalThis:_0x3e612f||self,_0x2d37ac(_0x3e612f[_0x40178f(0xe0)]={},_0x3e612f[_0x40178f(0xc9)],_0x3e612f[_0x40178f(0xbb)],_0x3e612f[_0x40178f(0xf0)],_0x3e612f[_0x40178f(0xf5)],_0x3e612f['UniverThreadComment'],_0x3e612f[_0x40178f(0x96)],_0x3e612f[_0x40178f(0xf3)]));}(this,function(_0x4497e1,_0x542e59,_0x2c0350,_0x582308,_0x293aa9,_0x3374ad,_0x1a6882,_0x25abab){'use strict';const _0x1722f2=_0x32b3;const _0x57a9eb=_0x1722f2(0x95);var _0x24e05e=(_0xb882e1=>(_0xb882e1[_0xb882e1[_0x1722f2(0xae)]=0x0]='OpenOrReOpen',_0xb882e1[_0xb882e1[_0x1722f2(0x85)]=0x1]='Solved',_0xb882e1[_0xb882e1['UNRECOGNIZED']=-0x1]=_0x1722f2(0x98),_0xb882e1))(_0x24e05e||{}),_0x917b55=(_0x56af69=>(_0x56af69[_0x56af69[_0x1722f2(0x76)]=0x0]=_0x1722f2(0x76),_0x56af69[_0x56af69['Add']=0x1]=_0x1722f2(0xe1),_0x56af69[_0x56af69[_0x1722f2(0xab)]=0x2]=_0x1722f2(0xab),_0x56af69[_0x56af69['Edit']=0x3]=_0x1722f2(0xcf),_0x56af69[_0x56af69[_0x1722f2(0xee)]=0x4]=_0x1722f2(0xee),_0x56af69[_0x56af69['Solve']=0x5]=_0x1722f2(0xc0),_0x56af69[_0x56af69[_0x1722f2(0x98)]=-0x1]=_0x1722f2(0x98),_0x56af69))(_0x917b55||{});const _0x383a8f=_0x13cbfa=>_0x582308['dayjs'](new Date(+_0x13cbfa))[_0x1722f2(0xc6)](_0x1722f2(0xb4)),_0x456d32=async(_0x280f20,_0x51e0dc)=>{const _0x563f97=_0x1722f2,_0x5b8b1e=_0x280f20['get'](_0x582308['UserManagerService']),_0x29f3e6=_0x280f20[_0x563f97(0xaf)](_0x25abab[_0x563f97(0xe8)]);_0x51e0dc[_0x563f97(0xd2)](_0x4be187=>{const _0x5cbde2=_0x563f97;_0x5b8b1e[_0x5cbde2(0x94)](_0x4be187)&&_0x51e0dc[_0x5cbde2(0xce)](_0x4be187);}),_0x51e0dc[_0x563f97(0xf6)]&&(await _0x29f3e6[_0x563f97(0xaf)](_0x563f97(0x8c),{'params':{'userIDs':[..._0x51e0dc]}}))['body'][_0x563f97(0x9b)][_0x563f97(0xd2)](_0x316de9=>{_0x316de9&&_0x5b8b1e['addUser'](_0x316de9);});};var _0x316567=Object[_0x1722f2(0xd3)],_0x4ed89e=(_0x47f65a,_0x1fe104,_0x4c5c11,_0xb950cd)=>{const _0x502800=_0x1722f2;for(var _0x148376=_0xb950cd>0x1?void 0x0:_0xb950cd?_0x316567(_0x1fe104,_0x4c5c11):_0x1fe104,_0x5a368d=_0x47f65a[_0x502800(0x78)]-0x1,_0x445f5d;_0x5a368d>=0x0;_0x5a368d--)(_0x445f5d=_0x47f65a[_0x5a368d])&&(_0x148376=_0x445f5d(_0x148376)||_0x148376);return _0x148376;},_0xc94003=(_0x28378e,_0x5bd7e4)=>(_0x5f3161,_0x57d3aa)=>_0x5bd7e4(_0x5f3161,_0x57d3aa,_0x28378e);let _0x2a706e=class extends _0x582308[_0x1722f2(0xdd)]{constructor(_0x322c98,_0x279205,_0x2687c5,_0x3a017b){const _0x240e00=_0x1722f2;super(),this['_commentService']=_0x322c98,this[_0x240e00(0xcb)]=_0x279205,this['_userService']=_0x2687c5,this[_0x240e00(0xa8)]=_0x3a017b,this['_init'](),this[_0x240e00(0xcc)]();}['_initUserSync'](){const _0x3d2bd=_0x1722f2;this[_0x3d2bd(0x7c)](this[_0x3d2bd(0xcb)]['commentUpdate$']['pipe'](_0x1a6882[_0x3d2bd(0xa4)](0x10))[_0x3d2bd(0x88)](_0x4a42de=>{const _0x10db80=_0x3d2bd,_0x286ab9=new Set();_0x4a42de[_0x10db80(0xd2)](_0x59fc7d=>{const _0x2f5a38=_0x10db80;switch(_0x59fc7d[_0x2f5a38(0xbc)]){case _0x2f5a38(0x8f):{const _0xfe6c50=_0x59fc7d[_0x2f5a38(0xb1)][_0x2f5a38(0x86)];_0x286ab9['add'](_0xfe6c50);break;}}}),_0x456d32(this[_0x10db80(0xa8)],_0x286ab9);}));}[_0x1722f2(0xb8)](){const _0x1c69d5=_0x1722f2;this[_0x1c69d5(0x7c)](this['_commentService'][_0x1c69d5(0x74)]['subscribe'](async _0x5c07f6=>{const _0x608ef6=_0x1c69d5;var _0x36a004,_0x51ab44,_0x10de20,_0x7088df;const _0x3b476c=(_0x36a004=this[_0x608ef6(0xcb)][_0x608ef6(0x7e)](_0x5c07f6[_0x608ef6(0xc4)])[_0x608ef6(0xf9)](_0x2b6e4c=>_0x2b6e4c['threadId']===_0x5c07f6[_0x608ef6(0xe9)]))==null?void 0x0:_0x36a004[_0x608ef6(0xb6)];if(!_0x3b476c)return;const {unitId:_0x19a38d,subUnitId:_0x3a14b8}=_0x3b476c;switch(_0x5c07f6['user']&&this[_0x608ef6(0xa2)]['addUser'](_0x5c07f6[_0x608ef6(0xa6)]),_0x5c07f6[_0x608ef6(0xbc)]){case _0x917b55[_0x608ef6(0xe1)]:break;case _0x917b55[_0x608ef6(0xab)]:{this['_threadCommentModel']['addComment'](_0x19a38d,_0x3a14b8,{'unitId':_0x19a38d,'subUnitId':_0x3a14b8,'ref':'','id':_0x5c07f6[_0x608ef6(0x99)],'dT':_0x383a8f(+_0x5c07f6[_0x608ef6(0x7a)]),'threadId':_0x5c07f6[_0x608ef6(0xe9)],'personId':(_0x10de20=(_0x51ab44=_0x5c07f6[_0x608ef6(0xa6)])==null?void 0x0:_0x51ab44[_0x608ef6(0x8b)])!=null?_0x10de20:_0x5c07f6[_0x608ef6(0x8d)],'text':JSON[_0x608ef6(0x87)](_0x5c07f6['content']),'parentId':_0x3b476c['id']});break;}case _0x917b55[_0x608ef6(0xee)]:{const _0x416e22=this[_0x608ef6(0xcb)][_0x608ef6(0x9e)](_0x19a38d,_0x3a14b8,_0x5c07f6[_0x608ef6(0x99)]);_0x416e22&&_0x416e22['parentId']&&this[_0x608ef6(0xcb)]['deleteComment'](_0x19a38d,_0x3a14b8,_0x5c07f6[_0x608ef6(0x99)]);break;}case _0x917b55[_0x608ef6(0xcf)]:{this['_threadCommentModel']['updateComment'](_0x19a38d,_0x3a14b8,{'commentId':_0x5c07f6[_0x608ef6(0x99)],'text':JSON[_0x608ef6(0x87)](_0x5c07f6[_0x608ef6(0x92)])});break;}case _0x917b55['Solve']:{const _0x462db4=(_0x7088df=this['_threadCommentModel']['getUnit'](_0x5c07f6[_0x608ef6(0xc4)])[_0x608ef6(0xf9)](_0x3a8d0a=>_0x3a8d0a[_0x608ef6(0xe9)]===_0x5c07f6['threadId']))==null?void 0x0:_0x7088df[_0x608ef6(0xb6)];_0x462db4&&this['_threadCommentModel'][_0x608ef6(0xc2)](_0x19a38d,_0x3a14b8,_0x462db4['id'],_0x5c07f6[_0x608ef6(0xeb)]===_0x24e05e['Solved']);break;}}}));}};_0x2a706e=_0x4ed89e([_0xc94003(0x0,_0x582308['Inject'](_0x542e59['CommentService'])),_0xc94003(0x1,_0x582308[_0x1722f2(0xb0)](_0x3374ad[_0x1722f2(0xea)])),_0xc94003(0x2,_0x582308['Inject'](_0x582308['UserManagerService'])),_0xc94003(0x3,_0x582308[_0x1722f2(0xb0)](_0x582308[_0x1722f2(0xb7)]))],_0x2a706e);const _0x869d17=_0x1722f2(0x89),_0x5587b0={};var _0x172980=Object['getOwnPropertyDescriptor'],_0x483da2=(_0x50ccde,_0xaff1b8,_0x40dfb0,_0x532d7d)=>{for(var _0x31a593=_0x532d7d>0x1?void 0x0:_0x532d7d?_0x172980(_0xaff1b8,_0x40dfb0):_0xaff1b8,_0x1d4707=_0x50ccde['length']-0x1,_0x3cd9ab;_0x1d4707>=0x0;_0x1d4707--)(_0x3cd9ab=_0x50ccde[_0x1d4707])&&(_0x31a593=_0x3cd9ab(_0x31a593)||_0x31a593);return _0x31a593;},_0x10d8f2=(_0x38ba49,_0x52dc44)=>(_0x1675c8,_0x49a6a8)=>_0x52dc44(_0x1675c8,_0x49a6a8,_0x38ba49);function _0x50a7d6(_0x1969ee,_0x5ee3c0){const _0xe4e29d=_0x1722f2,_0x5862d9=_0x1969ee['replies'][0x0];return{..._0x5ee3c0,'id':_0x5862d9['replyId'],'resolved':_0x1969ee['solved']===0x1,'dT':_0x383a8f(_0x5862d9[_0xe4e29d(0x7a)]),'personId':_0x5862d9['userId'],'threadId':_0x5862d9[_0xe4e29d(0xe9)]};}function _0x494330(_0x2c1b74,_0xa24adb,_0x39d50f){const _0x24ad99=_0x1722f2;var _0x249957,_0x5ee120;if(((_0x5ee120=(_0x249957=_0x2c1b74==null?void 0x0:_0x2c1b74[_0x24ad99(0x81)])==null?void 0x0:_0x249957[_0x24ad99(0x78)])!=null?_0x5ee120:0x0)>0x0){const _0x4bada0=(_0x728559,_0x4f5f31)=>({'id':_0x728559['replyId'],'threadId':_0x728559[_0x24ad99(0xe9)],'dT':_0x383a8f(_0x728559[_0x24ad99(0x7a)]),'personId':_0x728559['userId'],'resolved':_0x2c1b74['solved']===_0x24e05e[_0x24ad99(0x85)],'unitId':_0xa24adb,'subUnitId':_0x39d50f,'text':JSON['parse'](_0x728559['content']),'parentId':_0x4f5f31}),_0x23d5a1=_0x4bada0(_0x2c1b74[_0x24ad99(0x81)][0x0]);return{..._0x23d5a1,'children':_0x2c1b74[_0x24ad99(0x81)][_0x24ad99(0xdf)](0x1)['map'](_0x4f6b6f=>_0x4bada0(_0x4f6b6f,_0x23d5a1['id']))};}return null;}let _0x3cd7d0=class{constructor(_0x5be7bb,_0x701059,_0x2dc8e2){const _0x2f4c5f=_0x1722f2;this[_0x2f4c5f(0x8a)]=_0x5be7bb,this['_userService']=_0x701059,this[_0x2f4c5f(0xa1)]=_0x2dc8e2;}async[_0x1722f2(0xf1)](_0x4950f3){const _0x572a59=_0x1722f2;var _0x547955,_0x1ea053;const {parentId:_0x48586a,unitId:_0x2dc873,text:_0x1b1272,threadId:_0x397c69}=_0x4950f3,_0x143278=(_0x1ea053=(_0x547955=_0x1b1272[_0x572a59(0xc3)])==null?void 0x0:_0x547955[_0x572a59(0xdc)](_0x16bb61=>_0x16bb61[_0x572a59(0xf7)]===_0x582308[_0x572a59(0xc5)]['COMMENT'])['map'](_0x57ddbd=>_0x57ddbd[_0x572a59(0x9a)]))!=null?_0x1ea053:[],_0x3ef9e3=JSON[_0x572a59(0xa7)](_0x1b1272),_0x50c178=(await this['_sessionService'][_0x572a59(0x91)](_0x2dc873))[_0x572a59(0xe7)]();if(_0x48586a){const _0x1638ec={'memberId':_0x50c178,'unitId':_0x2dc873,'content':_0x3ef9e3,'mention':_0x143278,'threadId':_0x397c69},_0x486971=(await this[_0x572a59(0x8a)]['post'](_0x572a59(0xd0)+_0x2dc873+_0x572a59(0x93),{'body':_0x1638ec}))['body'][_0x572a59(0xa9)];return{..._0x4950f3,'id':_0x486971['replyId'],'dT':_0x582308[_0x572a59(0x80)](+_0x486971[_0x572a59(0x7a)])[_0x572a59(0xc6)](_0x572a59(0xb4)),'personId':_0x486971[_0x572a59(0x8d)]};}else{const _0x3343ce={'memberId':_0x50c178,'unitId':_0x2dc873,'content':_0x3ef9e3,'mention':_0x143278},_0x28c6fc=await this[_0x572a59(0x8a)][_0x572a59(0xac)](_0x572a59(0xd0)+_0x2dc873+_0x572a59(0xcd),{'body':_0x3343ce});return _0x50a7d6(_0x28c6fc[_0x572a59(0x77)][_0x572a59(0xc8)],_0x4950f3);}}async[_0x1722f2(0xd6)](_0x8fca4a){const _0x11aa06=_0x1722f2;var _0x4ad3fb,_0x58c9e7;const {text:_0x507806,unitId:_0x2c6e38}=_0x8fca4a,_0x43e383=(_0x58c9e7=(_0x4ad3fb=_0x507806[_0x11aa06(0xc3)])==null?void 0x0:_0x4ad3fb[_0x11aa06(0xdc)](_0x35c873=>_0x35c873[_0x11aa06(0xf7)]===_0x582308['CustomRangeType'][_0x11aa06(0x82)])['map'](_0x32e930=>_0x32e930[_0x11aa06(0x9a)]))!=null?_0x58c9e7:[],_0x2c4fa1=JSON[_0x11aa06(0xa7)](_0x507806),_0x4cf622=_0x8fca4a['threadId'],_0x13ce97=_0x8fca4a['id'],_0x1dbe74={'memberId':(await this['_sessionService'][_0x11aa06(0x91)](_0x2c6e38))[_0x11aa06(0xe7)](),'unitId':_0x2c6e38,'threadId':_0x4cf622,'mention':_0x43e383,'content':_0x2c4fa1,'replyId':_0x13ce97},_0x471a47=await this[_0x11aa06(0x8a)]['post'](_0x11aa06(0xd0)+_0x2c6e38+_0x11aa06(0x84),{'body':_0x1dbe74});return!_0x471a47[_0x11aa06(0x77)][_0x11aa06(0xa5)]||_0x471a47[_0x11aa06(0x77)][_0x11aa06(0xa5)]['code']===0x1;}async[_0x1722f2(0xc2)](_0x571860){const _0xb8f0ca=_0x1722f2,{unitId:_0x1e4fe7}=_0x571860,_0x51ac8c=_0x571860[_0xb8f0ca(0xe9)],_0x9977ed={'memberId':this[_0xb8f0ca(0xa2)][_0xb8f0ca(0x9c)]()[_0xb8f0ca(0x8b)],'unitId':_0x1e4fe7,'threadId':_0x51ac8c,'solved':_0x571860[_0xb8f0ca(0xb2)]?_0x24e05e[_0xb8f0ca(0x85)]:_0x24e05e[_0xb8f0ca(0xae)]},_0x2a8fe0=await this[_0xb8f0ca(0x8a)][_0xb8f0ca(0xac)](_0xb8f0ca(0xd0)+_0x1e4fe7+_0xb8f0ca(0xaa),{'body':_0x9977ed});return!_0x2a8fe0['body'][_0xb8f0ca(0xa5)]||_0x2a8fe0[_0xb8f0ca(0x77)]['error']['code']===0x1;}async['deleteComment'](_0x29a83d,_0x562a28,_0x3daad1,_0x3b1331){const _0x130752=_0x1722f2,_0x5b25d4={'memberId':(await this['_sessionService'][_0x130752(0x91)](_0x29a83d))[_0x130752(0xe7)](),'threadId':_0x3daad1,'replyId':_0x3b1331,'unitId':_0x29a83d},_0x110009=await this['_httpService'][_0x130752(0xac)](_0x130752(0xd0)+_0x29a83d+_0x130752(0xec),{'body':_0x5b25d4});return!_0x110009[_0x130752(0x77)][_0x130752(0xa5)]||_0x110009[_0x130752(0x77)][_0x130752(0xa5)][_0x130752(0xba)]===0x1;}async['listComments'](_0x12bdbf,_0x1f39a8,_0x3ed350){const _0x313d06=_0x1722f2,_0x4265fc={'unitId':_0x12bdbf,'threadId':_0x3ed350},_0x432aee=await this[_0x313d06(0x8a)][_0x313d06(0xac)](_0x313d06(0xd0)+_0x12bdbf+_0x313d06(0xed),{'body':_0x4265fc}),_0xbd4cad=_0x3ed350[_0x313d06(0xf2)](_0x38f200=>_0x494330(_0x432aee[_0x313d06(0x77)][_0x313d06(0xd7)][_0x38f200],_0x12bdbf,_0x1f39a8))[_0x313d06(0xdc)](Boolean);return Object['values'](_0x432aee[_0x313d06(0x77)][_0x313d06(0x9b)])[_0x313d06(0xd2)](_0x151f35=>{const _0x4d2f85=_0x313d06;this[_0x4d2f85(0xa2)][_0x4d2f85(0x90)](_0x151f35);}),_0xbd4cad;}[_0x1722f2(0xca)](_0x47a765){const _0x5d5599=_0x1722f2;return{'id':_0x47a765['id'],'threadId':_0x47a765[_0x5d5599(0xe9)],'ref':_0x47a765[_0x5d5599(0x9d)]};}};_0x3cd7d0=_0x483da2([_0x10d8f2(0x0,_0x582308[_0x1722f2(0xb0)](_0x25abab['HTTPService'])),_0x10d8f2(0x1,_0x582308[_0x1722f2(0xb0)](_0x582308[_0x1722f2(0xbd)])),_0x10d8f2(0x2,_0x582308[_0x1722f2(0xb0)](_0x542e59['CollaborationSessionService']))],_0x3cd7d0);var _0x2751a3=Object['getOwnPropertyDescriptor'],_0xa28ab3=(_0x4f638b,_0x56083,_0x4138f4,_0x5bed1b)=>{const _0x1c05a0=_0x1722f2;for(var _0x2678ec=_0x5bed1b>0x1?void 0x0:_0x5bed1b?_0x2751a3(_0x56083,_0x4138f4):_0x56083,_0x1193b4=_0x4f638b[_0x1c05a0(0x78)]-0x1,_0x221645;_0x1193b4>=0x0;_0x1193b4--)(_0x221645=_0x4f638b[_0x1193b4])&&(_0x2678ec=_0x221645(_0x2678ec)||_0x2678ec);return _0x2678ec;},_0x4b5bf0=(_0x563db6,_0x4e5a74)=>(_0x4fad3e,_0x48f816)=>_0x4e5a74(_0x4fad3e,_0x48f816,_0x563db6);let _0x27b309=class extends _0x582308[_0x1722f2(0xdd)]{constructor(_0x473acd,_0x492860){const _0x115cf7=_0x1722f2;super(),this[_0x115cf7(0xde)]=_0x473acd,this['_threadCommentDataSource']=_0x492860,this['_initDataSource']();}[_0x1722f2(0xef)](){const _0x3e7692=_0x1722f2;this[_0x3e7692(0xde)]['dataSource']=this[_0x3e7692(0xc1)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x27b309=_0xa28ab3([_0x4b5bf0(0x0,_0x3374ad[_0x1722f2(0xda)]),_0x4b5bf0(0x1,_0x582308['Inject'](_0x3cd7d0))],_0x27b309);var _0xd087cf=Object[_0x1722f2(0xd8)],_0x542bc8=Object[_0x1722f2(0xd3)],_0x25915b=(_0x5533f5,_0x5afda9,_0x2f1797)=>_0x5afda9 in _0x5533f5?_0xd087cf(_0x5533f5,_0x5afda9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2f1797}):_0x5533f5[_0x5afda9]=_0x2f1797,_0x332e3a=(_0x2e5d9e,_0x4f1161,_0x1ae8a1,_0x12dcaf)=>{const _0x24cc23=_0x1722f2;for(var _0x2e700f=_0x12dcaf>0x1?void 0x0:_0x12dcaf?_0x542bc8(_0x4f1161,_0x1ae8a1):_0x4f1161,_0xb205bd=_0x2e5d9e[_0x24cc23(0x78)]-0x1,_0x2e11cd;_0xb205bd>=0x0;_0xb205bd--)(_0x2e11cd=_0x2e5d9e[_0xb205bd])&&(_0x2e700f=_0x2e11cd(_0x2e700f)||_0x2e700f);return _0x2e700f;},_0x509638=(_0x42c727,_0x556645)=>(_0x1c2d60,_0x1bbc7f)=>_0x556645(_0x1c2d60,_0x1bbc7f,_0x42c727),_0x4d9bd2=(_0x5d31c6,_0x185436,_0x463eea)=>_0x25915b(_0x5d31c6,typeof _0x185436!=_0x1722f2(0xb5)?_0x185436+'':_0x185436,_0x463eea);_0x4497e1[_0x1722f2(0xe4)]=class extends _0x582308[_0x1722f2(0xe5)]{constructor(_0x15e15f=_0x5587b0,_0x109cbe,_0x24cf9f){const _0x2db695=_0x1722f2;super(),this[_0x2db695(0xa0)]=_0x15e15f,this['_injector']=_0x109cbe,this[_0x2db695(0xc7)]=_0x24cf9f;const {..._0x5c83d9}=_0x582308['merge']({},_0x5587b0,this[_0x2db695(0xa0)]);this['_configService']['setConfig'](_0x869d17,_0x5c83d9);}[_0x1722f2(0xb3)](){const _0x3eea18=_0x1722f2;[[_0x3cd7d0],[_0x27b309],[_0x2a706e]][_0x3eea18(0xd2)](_0x4cdc55=>{const _0x598f54=_0x3eea18;this[_0x598f54(0xa8)][_0x598f54(0x8f)](_0x4cdc55);});}[_0x1722f2(0xf4)](){const _0xc263f2=_0x1722f2;this['_injector'][_0xc263f2(0xaf)](_0x27b309),this[_0xc263f2(0xa8)][_0xc263f2(0xaf)](_0x2a706e);}},_0x4d9bd2(_0x4497e1[_0x1722f2(0xe4)],'pluginName',_0x57a9eb),_0x4d9bd2(_0x4497e1[_0x1722f2(0xe4)],_0x1722f2(0xbc),_0x582308['UniverInstanceType'][_0x1722f2(0xd4)]),_0x4497e1[_0x1722f2(0xe4)]=_0x332e3a([_0x582308[_0x1722f2(0x7d)](_0x293aa9['UniverThreadCommentUIPlugin'],_0x542e59[_0x1722f2(0xe2)],_0x2c0350['UniverLicensePlugin']),_0x509638(0x1,_0x582308[_0x1722f2(0xb0)](_0x582308[_0x1722f2(0xb7)])),_0x509638(0x2,_0x582308[_0x1722f2(0xb9)])],_0x4497e1[_0x1722f2(0xe4)]),Object['defineProperty'](_0x4497e1,Symbol['toStringTag'],{'value':_0x1722f2(0xe6)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.9-experimental.20250925-61b61a0",
|
|
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.10.
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs
|
|
51
|
-
"@univerjs/network": "0.10.
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.10.9-experimental.20250925-61b61a0",
|
|
49
|
+
"@univerjs-pro/license": "0.10.9-experimental.20250925-61b61a0",
|
|
50
|
+
"@univerjs/core": "0.10.9-experimental.20250925-61b61a0",
|
|
51
|
+
"@univerjs/network": "0.10.9-experimental.20250925-61b61a0",
|
|
52
52
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
53
|
-
"@univerjs/thread-comment": "0.10.
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.10.
|
|
53
|
+
"@univerjs/thread-comment": "0.10.9-experimental.20250925-61b61a0",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.10.9-experimental.20250925-61b61a0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.9.2",
|
|
59
59
|
"vite": "^7.1.3",
|
|
60
60
|
"vitest": "^3.2.4",
|
|
61
|
-
"@univerjs-infra/shared": "0.10.
|
|
61
|
+
"@univerjs-infra/shared": "0.10.9"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|