@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202505121607 → 0.7.0-nightly.202505141607
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 _0x1a1030=_0x428a;(function(_0x1ef0fe,_0x546022){const _0x5a031c=_0x428a,_0x50d066=_0x1ef0fe();while(!![]){try{const _0x5f0265=parseInt(_0x5a031c(0x11a))/0x1+-parseInt(_0x5a031c(0x189))/0x2*(parseInt(_0x5a031c(0x161))/0x3)+-parseInt(_0x5a031c(0x17a))/0x4+parseInt(_0x5a031c(0x158))/0x5*(parseInt(_0x5a031c(0x15c))/0x6)+parseInt(_0x5a031c(0x16f))/0x7+parseInt(_0x5a031c(0x125))/0x8+-parseInt(_0x5a031c(0x176))/0x9;if(_0x5f0265===_0x546022)break;else _0x50d066['push'](_0x50d066['shift']());}catch(_0x822738){_0x50d066['push'](_0x50d066['shift']());}}}(_0x4fc6,0x39efd));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x1a1030(0x152)});function _0x4fc6(){const _0x1a853a=['679848rgcKSO','customRanges','updateComment','@univerjs/thread-comment-ui','replyId','/add','UniverLicensePlugin','symbol','comments','Edit','Plugin','/list','_httpService','@univerjs-pro/license','map','333786njOtsi','users','/universer-api/comment/unit/','_commentService','/reply','YYYY/MM/DD\x20HH:mm','Inject','UniverCollaborationClientPlugin','setConfig','Add','personId','deleteComment','commentUpdate$','CommentService','223077NYzbaf','/delete','getCurrentUser','dataSource','_init','IThreadCommentDataSourceService','delete','length','CustomRangeType','UniverThreadCommentDataSourcePlugin','/solved','1789528XErIci','_initUserSync','post','_sessionService','merge','Reply','getUser','getUnit','getMemberID','body','/edit','payload','UserManagerService','UNIVER_UNKNOWN','onStarting','size','onReady','userId','user','add','_initDataSource','rangeId','userID','COMMENT','CollaborationSessionService','stringify','UNRECOGNIZED','_userService','values','_threadCommentDataSource','parse','UniverThreadCommentUIPlugin','pluginName','Unknown','rangeType','find','parentId','OpenOrReOpen','pipe','getOwnPropertyDescriptor','threadId','get','_config','_threadCommentDataSourceService','unitId','Module','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','subscribe','_configService','_threadCommentModel','UniverInstanceType','340XyVvrS','listComments','type','slice','30462aovnMG','ThreadCommentModel','Injector','error','root','3swqxJM','format','code','content','requireSession','disposeWithMe','Solved','solved','Delete','Solve','replies','addComment','HTTPService','filter','654948PpyfRQ','Disposable','@univerjs/network','forEach','createTimestamp','thread-comment-data-source.config','syncUpdateMutationToColla','2802636LVoKaK','resolveComment','_injector','reply'];_0x4fc6=function(){return _0x1a853a;};return _0x4fc6();}const b=require('@univerjs-pro/collaboration-client'),T=require(_0x1a1030(0x187)),c=require('@univerjs/core'),j=require(_0x1a1030(0x17d)),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require(_0x1a1030(0x171)),U=_0x1a1030(0x153);function _0x428a(_0x3229ed,_0x523355){const _0x4fc6f7=_0x4fc6();return _0x428a=function(_0x428a87,_0x30704b){_0x428a87=_0x428a87-0x111;let _0x1ace59=_0x4fc6f7[_0x428a87];return _0x1ace59;},_0x428a(_0x3229ed,_0x523355);}var I=(_0xbbfb20=>(_0xbbfb20[_0xbbfb20[_0x1a1030(0x14a)]=0x0]=_0x1a1030(0x14a),_0xbbfb20[_0xbbfb20[_0x1a1030(0x167)]=0x1]=_0x1a1030(0x167),_0xbbfb20[_0xbbfb20[_0x1a1030(0x13f)]=-0x1]=_0x1a1030(0x13f),_0xbbfb20))(I||{}),v=(_0x29b682=>(_0x29b682[_0x29b682[_0x1a1030(0x146)]=0x0]=_0x1a1030(0x146),_0x29b682[_0x29b682[_0x1a1030(0x115)]=0x1]='Add',_0x29b682[_0x29b682[_0x1a1030(0x12a)]=0x2]=_0x1a1030(0x12a),_0x29b682[_0x29b682['Edit']=0x3]=_0x1a1030(0x183),_0x29b682[_0x29b682[_0x1a1030(0x169)]=0x4]=_0x1a1030(0x169),_0x29b682[_0x29b682[_0x1a1030(0x16a)]=0x5]=_0x1a1030(0x16a),_0x29b682[_0x29b682[_0x1a1030(0x13f)]=-0x1]=_0x1a1030(0x13f),_0x29b682))(v||{});const f=_0x258112=>c['dayjs'](new Date(+_0x258112))[_0x1a1030(0x162)](_0x1a1030(0x111)),R=async(_0x5e95c1,_0x51e35d)=>{const _0x155133=_0x1a1030,_0x2a068b=_0x5e95c1['get'](c[_0x155133(0x131)]),_0x22bb05=_0x5e95c1['get'](P[_0x155133(0x16d)]);_0x51e35d[_0x155133(0x172)](_0x5e5120=>{const _0x4d8740=_0x155133;_0x2a068b[_0x4d8740(0x12b)](_0x5e5120)&&_0x51e35d[_0x4d8740(0x120)](_0x5e5120);}),_0x51e35d[_0x155133(0x134)]&&(await _0x22bb05[_0x155133(0x14e)]('/universer-api/user/list',{'params':{'userIDs':[..._0x51e35d]}}))[_0x155133(0x12e)]['users'][_0x155133(0x172)](_0xbc885b=>{_0xbc885b&&_0x2a068b['addUser'](_0xbc885b);});};var $=Object[_0x1a1030(0x14c)],E=(_0x3d029f,_0x59cbab,_0x4ec347,_0x57c013)=>{const _0x211f10=_0x1a1030;for(var _0x28e789=_0x57c013>0x1?void 0x0:_0x57c013?$(_0x59cbab,_0x4ec347):_0x59cbab,_0x1227c9=_0x3d029f[_0x211f10(0x121)]-0x1,_0x285c4b;_0x1227c9>=0x0;_0x1227c9--)(_0x285c4b=_0x3d029f[_0x1227c9])&&(_0x28e789=_0x285c4b(_0x28e789)||_0x28e789);return _0x28e789;},S=(_0x1bd01e,_0x59671a)=>(_0x38565e,_0x219328)=>_0x59671a(_0x38565e,_0x219328,_0x1bd01e);let p=class extends c[_0x1a1030(0x170)]{constructor(_0x351039,_0x376ccb,_0x46c0fd,_0x366226){const _0xfa981e=_0x1a1030;super(),this[_0xfa981e(0x18c)]=_0x351039,this[_0xfa981e(0x156)]=_0x376ccb,this[_0xfa981e(0x140)]=_0x46c0fd,this[_0xfa981e(0x178)]=_0x366226,this[_0xfa981e(0x11e)](),this[_0xfa981e(0x126)]();}['_initUserSync'](){const _0x414b59=_0x1a1030;this[_0x414b59(0x166)](this[_0x414b59(0x156)][_0x414b59(0x118)][_0x414b59(0x14b)](w['bufferTime'](0x10))[_0x414b59(0x154)](_0x45272d=>{const _0x872a47=_0x414b59,_0x5c6c1f=new Set();_0x45272d[_0x872a47(0x172)](_0x5ac2fa=>{const _0x106ffd=_0x872a47;switch(_0x5ac2fa[_0x106ffd(0x15a)]){case'add':{const _0x3e0d81=_0x5ac2fa[_0x106ffd(0x130)][_0x106ffd(0x116)];_0x5c6c1f[_0x106ffd(0x138)](_0x3e0d81);break;}}}),R(this[_0x872a47(0x178)],_0x5c6c1f);}));}['_init'](){const _0x3ec11d=_0x1a1030;this[_0x3ec11d(0x166)](this[_0x3ec11d(0x18c)][_0x3ec11d(0x118)]['subscribe'](async _0x1a482d=>{const _0x49a30f=_0x3ec11d;var _0x5ecee0,_0x200137,_0x4153da,_0x5f1aa7;const _0x1c3f5e=(_0x5ecee0=this['_threadCommentModel'][_0x49a30f(0x12c)](_0x1a482d['unitId'])[_0x49a30f(0x148)](_0x5f0318=>_0x5f0318['threadId']===_0x1a482d['threadId']))==null?void 0x0:_0x5ecee0[_0x49a30f(0x160)];if(!_0x1c3f5e)return;const {unitId:_0x431db3,subUnitId:_0x5b95c0}=_0x1c3f5e;switch(_0x1a482d['user']&&this[_0x49a30f(0x140)]['addUser'](_0x1a482d['user']),_0x1a482d[_0x49a30f(0x15a)]){case v[_0x49a30f(0x115)]:break;case v[_0x49a30f(0x12a)]:{this[_0x49a30f(0x156)]['addComment'](_0x431db3,_0x5b95c0,{'unitId':_0x431db3,'subUnitId':_0x5b95c0,'ref':'','id':_0x1a482d[_0x49a30f(0x17e)],'dT':f(+_0x1a482d[_0x49a30f(0x173)]),'threadId':_0x1a482d[_0x49a30f(0x14d)],'personId':(_0x4153da=(_0x200137=_0x1a482d[_0x49a30f(0x137)])==null?void 0x0:_0x200137[_0x49a30f(0x13b)])!=null?_0x4153da:_0x1a482d['userId'],'text':JSON[_0x49a30f(0x143)](_0x1a482d[_0x49a30f(0x164)]),'parentId':_0x1c3f5e['id']});break;}case v[_0x49a30f(0x169)]:{const _0x26cb38=this[_0x49a30f(0x156)]['getComment'](_0x431db3,_0x5b95c0,_0x1a482d['replyId']);_0x26cb38&&_0x26cb38[_0x49a30f(0x149)]&&this['_threadCommentModel'][_0x49a30f(0x117)](_0x431db3,_0x5b95c0,_0x1a482d[_0x49a30f(0x17e)]);break;}case v[_0x49a30f(0x183)]:{this[_0x49a30f(0x156)][_0x49a30f(0x17c)](_0x431db3,_0x5b95c0,{'commentId':_0x1a482d[_0x49a30f(0x17e)],'text':JSON[_0x49a30f(0x143)](_0x1a482d[_0x49a30f(0x164)])});break;}case v['Solve']:{const _0x49e35a=(_0x5f1aa7=this['_threadCommentModel'][_0x49a30f(0x12c)](_0x1a482d[_0x49a30f(0x151)])[_0x49a30f(0x148)](_0x5816e6=>_0x5816e6['threadId']===_0x1a482d[_0x49a30f(0x14d)]))==null?void 0x0:_0x5f1aa7['root'];_0x49e35a&&this[_0x49a30f(0x156)][_0x49a30f(0x177)](_0x431db3,_0x5b95c0,_0x49e35a['id'],_0x1a482d['solved']===I['Solved']);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x1a1030(0x119)])),S(0x1,c[_0x1a1030(0x112)](M[_0x1a1030(0x15d)])),S(0x2,c['Inject'](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x1a1030(0x15e)]))],p);const q=_0x1a1030(0x174),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x57248b,_0x319dfc,_0x4a30bc,_0x26519c)=>{const _0x113799=_0x1a1030;for(var _0x387b7f=_0x26519c>0x1?void 0x0:_0x26519c?A(_0x319dfc,_0x4a30bc):_0x319dfc,_0x466d32=_0x57248b[_0x113799(0x121)]-0x1,_0xe28a66;_0x466d32>=0x0;_0x466d32--)(_0xe28a66=_0x57248b[_0x466d32])&&(_0x387b7f=_0xe28a66(_0x387b7f)||_0x387b7f);return _0x387b7f;},_=(_0x1f5a08,_0x4fa508)=>(_0x5be2cc,_0x13125f)=>_0x4fa508(_0x5be2cc,_0x13125f,_0x1f5a08);function Y(_0xd5d793,_0x132761){const _0xa1cdad=_0x1a1030,_0x1ffcc4=_0xd5d793['replies'][0x0];return{..._0x132761,'id':_0x1ffcc4[_0xa1cdad(0x17e)],'resolved':_0xd5d793[_0xa1cdad(0x168)]===0x1,'dT':f(_0x1ffcc4[_0xa1cdad(0x173)]),'personId':_0x1ffcc4['userId'],'threadId':_0x1ffcc4[_0xa1cdad(0x14d)]};}function G(_0x2e1431,_0x3765a4,_0x3cd16f){const _0x201214=_0x1a1030;var _0x2882e4,_0x555baf;if(((_0x555baf=(_0x2882e4=_0x2e1431==null?void 0x0:_0x2e1431[_0x201214(0x16b)])==null?void 0x0:_0x2882e4[_0x201214(0x121)])!=null?_0x555baf:0x0)>0x0){const _0x445995=(_0x52db64,_0x2a6401)=>({'id':_0x52db64[_0x201214(0x17e)],'threadId':_0x52db64[_0x201214(0x14d)],'dT':f(_0x52db64[_0x201214(0x173)]),'personId':_0x52db64[_0x201214(0x136)],'resolved':_0x2e1431[_0x201214(0x168)]===I[_0x201214(0x167)],'unitId':_0x3765a4,'subUnitId':_0x3cd16f,'text':JSON[_0x201214(0x143)](_0x52db64['content']),'parentId':_0x2a6401}),_0x2bc8bd=_0x445995(_0x2e1431['replies'][0x0]);return{..._0x2bc8bd,'children':_0x2e1431[_0x201214(0x16b)][_0x201214(0x15b)](0x1)[_0x201214(0x188)](_0x54a3e0=>_0x445995(_0x54a3e0,_0x2bc8bd['id']))};}return null;}let g=class{constructor(_0x1ef6ba,_0x4d7365,_0x8f38f5,_0x596111){const _0x48454a=_0x1a1030;this[_0x48454a(0x186)]=_0x1ef6ba,this[_0x48454a(0x140)]=_0x4d7365,this[_0x48454a(0x128)]=_0x8f38f5,this[_0x48454a(0x178)]=_0x596111;}async[_0x1a1030(0x16c)](_0x32c25e){const _0x27ada3=_0x1a1030;var _0x16ced3,_0x4d98b7;const {parentId:_0x357084,unitId:_0x4e59f2,text:_0x34df88,threadId:_0x37eed2}=_0x32c25e,_0xc55285=(_0x4d98b7=(_0x16ced3=_0x34df88[_0x27ada3(0x17b)])==null?void 0x0:_0x16ced3['filter'](_0x3a1e5d=>_0x3a1e5d[_0x27ada3(0x147)]===c[_0x27ada3(0x122)][_0x27ada3(0x13c)])['map'](_0x368ae6=>_0x368ae6[_0x27ada3(0x13a)]))!=null?_0x4d98b7:[],_0x2d52be=JSON[_0x27ada3(0x13e)](_0x34df88),_0x42564d=(await this[_0x27ada3(0x128)]['requireSession'](_0x4e59f2))['getMemberID']();if(_0x357084){const _0x29500b={'memberId':_0x42564d,'unitId':_0x4e59f2,'content':_0x2d52be,'mention':_0xc55285,'threadId':_0x37eed2},_0x1a502e=(await this['_httpService'][_0x27ada3(0x127)](_0x27ada3(0x18b)+_0x4e59f2+_0x27ada3(0x18d),{'body':_0x29500b}))[_0x27ada3(0x12e)][_0x27ada3(0x179)];return{..._0x32c25e,'id':_0x1a502e['replyId'],'dT':c['dayjs'](+_0x1a502e[_0x27ada3(0x173)])[_0x27ada3(0x162)](_0x27ada3(0x111)),'personId':_0x1a502e[_0x27ada3(0x136)]};}else{const _0x5e87cd={'memberId':_0x42564d,'unitId':_0x4e59f2,'content':_0x2d52be,'mention':_0xc55285},_0x4f90d2=await this['_httpService'][_0x27ada3(0x127)](_0x27ada3(0x18b)+_0x4e59f2+_0x27ada3(0x17f),{'body':_0x5e87cd});return Y(_0x4f90d2[_0x27ada3(0x12e)]['comment'],_0x32c25e);}}async[_0x1a1030(0x17c)](_0x234d77){const _0xb8cd0e=_0x1a1030;var _0x417bd4,_0x33bbb1;const {text:_0x375892,unitId:_0x104dbd}=_0x234d77,_0x5290fc=(_0x33bbb1=(_0x417bd4=_0x375892[_0xb8cd0e(0x17b)])==null?void 0x0:_0x417bd4[_0xb8cd0e(0x16e)](_0x5bad5b=>_0x5bad5b[_0xb8cd0e(0x147)]===c[_0xb8cd0e(0x122)]['COMMENT'])[_0xb8cd0e(0x188)](_0x197585=>_0x197585[_0xb8cd0e(0x13a)]))!=null?_0x33bbb1:[],_0x287b31=JSON[_0xb8cd0e(0x13e)](_0x375892),_0x2c5d22=_0x234d77['threadId'],_0x7f6c6c=_0x234d77['id'],_0x145fca={'memberId':(await this[_0xb8cd0e(0x128)][_0xb8cd0e(0x165)](_0x104dbd))[_0xb8cd0e(0x12d)](),'unitId':_0x104dbd,'threadId':_0x2c5d22,'mention':_0x5290fc,'content':_0x287b31,'replyId':_0x7f6c6c},_0x3ab238=await this[_0xb8cd0e(0x186)]['post'](_0xb8cd0e(0x18b)+_0x104dbd+_0xb8cd0e(0x12f),{'body':_0x145fca});return!_0x3ab238[_0xb8cd0e(0x12e)]['error']||_0x3ab238[_0xb8cd0e(0x12e)]['error'][_0xb8cd0e(0x163)]===0x1;}async['resolveComment'](_0x57a4aa){const _0x3c7a32=_0x1a1030,{unitId:_0x4fb85d}=_0x57a4aa,_0x5ae9aa=_0x57a4aa[_0x3c7a32(0x14d)],_0xe8dc10={'memberId':this[_0x3c7a32(0x140)][_0x3c7a32(0x11c)]()[_0x3c7a32(0x13b)],'unitId':_0x4fb85d,'threadId':_0x5ae9aa,'solved':_0x57a4aa['resolved']?I[_0x3c7a32(0x167)]:I[_0x3c7a32(0x14a)]},_0x4146b1=await this[_0x3c7a32(0x186)][_0x3c7a32(0x127)](_0x3c7a32(0x18b)+_0x4fb85d+_0x3c7a32(0x124),{'body':_0xe8dc10});return!_0x4146b1['body']['error']||_0x4146b1[_0x3c7a32(0x12e)]['error'][_0x3c7a32(0x163)]===0x1;}async[_0x1a1030(0x117)](_0x264bb3,_0x3d5080,_0xd93d32,_0x547dde){const _0x211657=_0x1a1030,_0x35b179={'memberId':(await this[_0x211657(0x128)][_0x211657(0x165)](_0x264bb3))[_0x211657(0x12d)](),'threadId':_0xd93d32,'replyId':_0x547dde,'unitId':_0x264bb3},_0x95f292=await this[_0x211657(0x186)]['post'](_0x211657(0x18b)+_0x264bb3+_0x211657(0x11b),{'body':_0x35b179});return!_0x95f292[_0x211657(0x12e)][_0x211657(0x15f)]||_0x95f292[_0x211657(0x12e)][_0x211657(0x15f)][_0x211657(0x163)]===0x1;}async[_0x1a1030(0x159)](_0xbc48b6,_0x5dbb41,_0x57e252){const _0x3b7d74=_0x1a1030,_0xeec34={'unitId':_0xbc48b6,'threadId':_0x57e252},_0x5301ef=await this['_httpService'][_0x3b7d74(0x127)](_0x3b7d74(0x18b)+_0xbc48b6+_0x3b7d74(0x185),{'body':_0xeec34}),_0x47ebbb=_0x57e252[_0x3b7d74(0x188)](_0x4a5f4d=>G(_0x5301ef[_0x3b7d74(0x12e)][_0x3b7d74(0x182)][_0x4a5f4d],_0xbc48b6,_0x5dbb41))['filter'](Boolean);return Object[_0x3b7d74(0x141)](_0x5301ef[_0x3b7d74(0x12e)][_0x3b7d74(0x18a)])[_0x3b7d74(0x172)](_0x3be9d7=>{const _0x247a29=_0x3b7d74;this[_0x247a29(0x140)]['addUser'](_0x3be9d7);}),_0x47ebbb;}['saveCommentToSnapshot'](_0x3ac8d9){const _0x205c2b=_0x1a1030;return{'id':_0x3ac8d9['id'],'threadId':_0x3ac8d9[_0x205c2b(0x14d)],'ref':_0x3ac8d9['ref']};}};g=x([_(0x0,c[_0x1a1030(0x112)](P[_0x1a1030(0x16d)])),_(0x1,c[_0x1a1030(0x112)](c['UserManagerService'])),_(0x2,c[_0x1a1030(0x112)](b[_0x1a1030(0x13d)])),_(0x3,c[_0x1a1030(0x112)](c[_0x1a1030(0x15e)]))],g);var H=Object[_0x1a1030(0x14c)],J=(_0xf738dd,_0x1ba1ae,_0x52d6a1,_0x35dfbb)=>{const _0x5f28dd=_0x1a1030;for(var _0x57d8bc=_0x35dfbb>0x1?void 0x0:_0x35dfbb?H(_0x1ba1ae,_0x52d6a1):_0x1ba1ae,_0x39d5a8=_0xf738dd[_0x5f28dd(0x121)]-0x1,_0x212917;_0x39d5a8>=0x0;_0x39d5a8--)(_0x212917=_0xf738dd[_0x39d5a8])&&(_0x57d8bc=_0x212917(_0x57d8bc)||_0x57d8bc);return _0x57d8bc;},y=(_0x4f7cf1,_0x3358e2)=>(_0x4b00f3,_0x5e7695)=>_0x3358e2(_0x4b00f3,_0x5e7695,_0x4f7cf1);let C=class extends c[_0x1a1030(0x170)]{constructor(_0x3880cd,_0x186589){const _0x493847=_0x1a1030;super(),this['_threadCommentDataSourceService']=_0x3880cd,this[_0x493847(0x142)]=_0x186589,this[_0x493847(0x139)]();}[_0x1a1030(0x139)](){const _0x10531c=_0x1a1030;this[_0x10531c(0x150)][_0x10531c(0x11d)]=this[_0x10531c(0x142)],this[_0x10531c(0x150)][_0x10531c(0x175)]=!0x1;}};C=J([y(0x0,M[_0x1a1030(0x11f)]),y(0x1,c['Inject'](g))],C);var F=Object['defineProperty'],L=Object[_0x1a1030(0x14c)],Z=(_0x3305ca,_0x9dbaa3,_0x2953cd)=>_0x9dbaa3 in _0x3305ca?F(_0x3305ca,_0x9dbaa3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2953cd}):_0x3305ca[_0x9dbaa3]=_0x2953cd,W=(_0x3067b3,_0x3a7658,_0x4c8e95,_0x3daf97)=>{const _0x39f9c1=_0x1a1030;for(var _0x49071d=_0x3daf97>0x1?void 0x0:_0x3daf97?L(_0x3a7658,_0x4c8e95):_0x3a7658,_0x391a5a=_0x3067b3[_0x39f9c1(0x121)]-0x1,_0x323bcb;_0x391a5a>=0x0;_0x391a5a--)(_0x323bcb=_0x3067b3[_0x391a5a])&&(_0x49071d=_0x323bcb(_0x49071d)||_0x49071d);return _0x49071d;},O=(_0x4f8101,_0x73850e)=>(_0xebb4fe,_0x4921f9)=>_0x73850e(_0xebb4fe,_0x4921f9,_0x4f8101),N=(_0x2ce280,_0x5e5110,_0x5f1cf6)=>Z(_0x2ce280,typeof _0x5e5110!=_0x1a1030(0x181)?_0x5e5110+'':_0x5e5110,_0x5f1cf6);exports[_0x1a1030(0x123)]=class extends c[_0x1a1030(0x184)]{constructor(_0x479847=D,_0x4cb67b,_0x47dd66){const _0x1307d7=_0x1a1030;super(),this[_0x1307d7(0x14f)]=_0x479847,this[_0x1307d7(0x178)]=_0x4cb67b,this[_0x1307d7(0x155)]=_0x47dd66;const {..._0x2d614a}=c[_0x1307d7(0x129)]({},D,this['_config']);this[_0x1307d7(0x155)][_0x1307d7(0x114)](q,_0x2d614a);}[_0x1a1030(0x133)](){const _0x3564fd=_0x1a1030;[[g],[C],[p]][_0x3564fd(0x172)](_0x28d6b5=>{const _0x10e30d=_0x3564fd;this[_0x10e30d(0x178)][_0x10e30d(0x138)](_0x28d6b5);});}[_0x1a1030(0x135)](){const _0x10699b=_0x1a1030;this['_injector']['get'](C),this['_injector'][_0x10699b(0x14e)](p);}},N(exports[_0x1a1030(0x123)],_0x1a1030(0x145),U),N(exports[_0x1a1030(0x123)],'type',c[_0x1a1030(0x157)][_0x1a1030(0x132)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](j[_0x1a1030(0x144)],b[_0x1a1030(0x113)],T[_0x1a1030(0x180)]),O(0x1,c[_0x1a1030(0x112)](c['Injector'])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';const _0x46c713=_0x28d5;(function(_0x4ba4e3,_0x403e98){const _0x552bcf=_0x28d5,_0x203ada=_0x4ba4e3();while(!![]){try{const _0x493087=-parseInt(_0x552bcf(0x1c9))/0x1*(-parseInt(_0x552bcf(0x1ef))/0x2)+-parseInt(_0x552bcf(0x1a5))/0x3*(parseInt(_0x552bcf(0x1f2))/0x4)+parseInt(_0x552bcf(0x1a8))/0x5*(-parseInt(_0x552bcf(0x18b))/0x6)+-parseInt(_0x552bcf(0x1fe))/0x7+-parseInt(_0x552bcf(0x1df))/0x8+-parseInt(_0x552bcf(0x1ae))/0x9*(-parseInt(_0x552bcf(0x1e3))/0xa)+parseInt(_0x552bcf(0x1b9))/0xb*(parseInt(_0x552bcf(0x1e4))/0xc);if(_0x493087===_0x403e98)break;else _0x203ada['push'](_0x203ada['shift']());}catch(_0x2de66a){_0x203ada['push'](_0x203ada['shift']());}}}(_0x2031,0xc94de));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x46c713(0x1bc)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require(_0x46c713(0x202)),j=require(_0x46c713(0x1c5)),M=require(_0x46c713(0x1c4)),w=require('rxjs'),P=require(_0x46c713(0x1dd)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3bfd70=>(_0x3bfd70[_0x3bfd70['OpenOrReOpen']=0x0]=_0x46c713(0x1b2),_0x3bfd70[_0x3bfd70[_0x46c713(0x204)]=0x1]=_0x46c713(0x204),_0x3bfd70[_0x3bfd70['UNRECOGNIZED']=-0x1]=_0x46c713(0x19a),_0x3bfd70))(I||{}),v=(_0x413cb0=>(_0x413cb0[_0x413cb0[_0x46c713(0x1f9)]=0x0]=_0x46c713(0x1f9),_0x413cb0[_0x413cb0[_0x46c713(0x1b6)]=0x1]=_0x46c713(0x1b6),_0x413cb0[_0x413cb0[_0x46c713(0x190)]=0x2]='Reply',_0x413cb0[_0x413cb0['Edit']=0x3]=_0x46c713(0x194),_0x413cb0[_0x413cb0['Delete']=0x4]=_0x46c713(0x1d7),_0x413cb0[_0x413cb0[_0x46c713(0x1de)]=0x5]=_0x46c713(0x1de),_0x413cb0[_0x413cb0[_0x46c713(0x19a)]=-0x1]=_0x46c713(0x19a),_0x413cb0))(v||{});const f=_0x268dd6=>c['dayjs'](new Date(+_0x268dd6))[_0x46c713(0x196)](_0x46c713(0x1e9)),R=async(_0x5ba07b,_0x4ec5fb)=>{const _0x295717=_0x46c713,_0x26e70b=_0x5ba07b['get'](c['UserManagerService']),_0x521f34=_0x5ba07b['get'](P[_0x295717(0x1dc)]);_0x4ec5fb['forEach'](_0x555757=>{const _0x16de65=_0x295717;_0x26e70b[_0x16de65(0x1f4)](_0x555757)&&_0x4ec5fb[_0x16de65(0x1c8)](_0x555757);}),_0x4ec5fb[_0x295717(0x199)]&&(await _0x521f34['get'](_0x295717(0x1d9),{'params':{'userIDs':[..._0x4ec5fb]}}))[_0x295717(0x1e8)]['users'][_0x295717(0x1d1)](_0x28a319=>{const _0x131039=_0x295717;_0x28a319&&_0x26e70b[_0x131039(0x1b4)](_0x28a319);});};var $=Object['getOwnPropertyDescriptor'],E=(_0xa91494,_0x47c401,_0x541901,_0x574439)=>{const _0x2b0245=_0x46c713;for(var _0x2882e4=_0x574439>0x1?void 0x0:_0x574439?$(_0x47c401,_0x541901):_0x47c401,_0x596f2a=_0xa91494[_0x2b0245(0x1b5)]-0x1,_0x214d75;_0x596f2a>=0x0;_0x596f2a--)(_0x214d75=_0xa91494[_0x596f2a])&&(_0x2882e4=_0x214d75(_0x2882e4)||_0x2882e4);return _0x2882e4;},S=(_0x128fa4,_0x4391c8)=>(_0x5604a1,_0x57d907)=>_0x4391c8(_0x5604a1,_0x57d907,_0x128fa4);let p=class extends c[_0x46c713(0x1e6)]{constructor(_0x5353c9,_0x2478e9,_0xdbbcc4,_0x4cbaf8){const _0x2386c5=_0x46c713;super(),this['_commentService']=_0x5353c9,this[_0x2386c5(0x1ea)]=_0x2478e9,this[_0x2386c5(0x191)]=_0xdbbcc4,this['_injector']=_0x4cbaf8,this[_0x2386c5(0x1fc)](),this['_initUserSync']();}[_0x46c713(0x1a1)](){const _0x3b1b96=_0x46c713;this[_0x3b1b96(0x1f7)](this[_0x3b1b96(0x1ea)][_0x3b1b96(0x20b)][_0x3b1b96(0x1d6)](w[_0x3b1b96(0x1c0)](0x10))[_0x3b1b96(0x195)](_0x53dbc9=>{const _0x11124c=_0x3b1b96,_0x4b1ec0=new Set();_0x53dbc9[_0x11124c(0x1d1)](_0x18dbb7=>{const _0x1daf66=_0x11124c;switch(_0x18dbb7['type']){case _0x1daf66(0x201):{const _0xecb1e4=_0x18dbb7[_0x1daf66(0x1a3)]['personId'];_0x4b1ec0[_0x1daf66(0x201)](_0xecb1e4);break;}}}),R(this[_0x11124c(0x1b3)],_0x4b1ec0);}));}['_init'](){const _0x52a874=_0x46c713;this[_0x52a874(0x1f7)](this['_commentService']['commentUpdate$']['subscribe'](async _0x85d5bf=>{const _0x3f7029=_0x52a874;var _0x1b6474,_0x5e9602,_0x55bae7,_0x39ed10;const _0x37ae8c=(_0x1b6474=this[_0x3f7029(0x1ea)]['getUnit'](_0x85d5bf[_0x3f7029(0x1d8)])[_0x3f7029(0x1c3)](_0x332542=>_0x332542[_0x3f7029(0x1a4)]===_0x85d5bf[_0x3f7029(0x1a4)]))==null?void 0x0:_0x1b6474[_0x3f7029(0x1c6)];if(!_0x37ae8c)return;const {unitId:_0x492446,subUnitId:_0x5ae43f}=_0x37ae8c;switch(_0x85d5bf['user']&&this['_userService'][_0x3f7029(0x1b4)](_0x85d5bf[_0x3f7029(0x1be)]),_0x85d5bf[_0x3f7029(0x1f0)]){case v[_0x3f7029(0x1b6)]:break;case v[_0x3f7029(0x190)]:{this['_threadCommentModel'][_0x3f7029(0x209)](_0x492446,_0x5ae43f,{'unitId':_0x492446,'subUnitId':_0x5ae43f,'ref':'','id':_0x85d5bf[_0x3f7029(0x1c2)],'dT':f(+_0x85d5bf['createTimestamp']),'threadId':_0x85d5bf['threadId'],'personId':(_0x55bae7=(_0x5e9602=_0x85d5bf[_0x3f7029(0x1be)])==null?void 0x0:_0x5e9602[_0x3f7029(0x207)])!=null?_0x55bae7:_0x85d5bf[_0x3f7029(0x1b0)],'text':JSON[_0x3f7029(0x20c)](_0x85d5bf[_0x3f7029(0x1a2)]),'parentId':_0x37ae8c['id']});break;}case v['Delete']:{const _0x1e6956=this[_0x3f7029(0x1ea)][_0x3f7029(0x1e0)](_0x492446,_0x5ae43f,_0x85d5bf['replyId']);_0x1e6956&&_0x1e6956[_0x3f7029(0x200)]&&this[_0x3f7029(0x1ea)][_0x3f7029(0x208)](_0x492446,_0x5ae43f,_0x85d5bf['replyId']);break;}case v[_0x3f7029(0x194)]:{this[_0x3f7029(0x1ea)][_0x3f7029(0x18f)](_0x492446,_0x5ae43f,{'commentId':_0x85d5bf['replyId'],'text':JSON[_0x3f7029(0x20c)](_0x85d5bf[_0x3f7029(0x1a2)])});break;}case v['Solve']:{const _0xc3c6b4=(_0x39ed10=this[_0x3f7029(0x1ea)]['getUnit'](_0x85d5bf[_0x3f7029(0x1d8)])['find'](_0x547622=>_0x547622['threadId']===_0x85d5bf[_0x3f7029(0x1a4)]))==null?void 0x0:_0x39ed10[_0x3f7029(0x1c6)];_0xc3c6b4&&this[_0x3f7029(0x1ea)][_0x3f7029(0x1fb)](_0x492446,_0x5ae43f,_0xc3c6b4['id'],_0x85d5bf[_0x3f7029(0x1e7)]===I[_0x3f7029(0x204)]);break;}}}));}};p=E([S(0x0,c['Inject'](b['CommentService'])),S(0x1,c[_0x46c713(0x1cb)](M[_0x46c713(0x1e2)])),S(0x2,c['Inject'](c[_0x46c713(0x1ce)])),S(0x3,c[_0x46c713(0x1cb)](c['Injector']))],p);const q=_0x46c713(0x193),D={};var A=Object[_0x46c713(0x1ee)],x=(_0x35d6c6,_0x2c0dbf,_0x463c5f,_0x21e3ff)=>{const _0x1634f2=_0x46c713;for(var _0x4fe36f=_0x21e3ff>0x1?void 0x0:_0x21e3ff?A(_0x2c0dbf,_0x463c5f):_0x2c0dbf,_0x3bc71c=_0x35d6c6[_0x1634f2(0x1b5)]-0x1,_0x39362;_0x3bc71c>=0x0;_0x3bc71c--)(_0x39362=_0x35d6c6[_0x3bc71c])&&(_0x4fe36f=_0x39362(_0x4fe36f)||_0x4fe36f);return _0x4fe36f;},_=(_0x54847d,_0x5299d8)=>(_0x4a71a2,_0x130667)=>_0x5299d8(_0x4a71a2,_0x130667,_0x54847d);function Y(_0x2bdfbc,_0x41213){const _0x5ed997=_0x46c713,_0x5d974d=_0x2bdfbc['replies'][0x0];return{..._0x41213,'id':_0x5d974d[_0x5ed997(0x1c2)],'resolved':_0x2bdfbc['solved']===0x1,'dT':f(_0x5d974d[_0x5ed997(0x1cc)]),'personId':_0x5d974d[_0x5ed997(0x1b0)],'threadId':_0x5d974d[_0x5ed997(0x1a4)]};}function G(_0x19ede5,_0x1257c2,_0x16b1b0){const _0x5825e2=_0x46c713;var _0x4102cb,_0x55379a;if(((_0x55379a=(_0x4102cb=_0x19ede5==null?void 0x0:_0x19ede5[_0x5825e2(0x205)])==null?void 0x0:_0x4102cb[_0x5825e2(0x1b5)])!=null?_0x55379a:0x0)>0x0){const _0x4ac20b=(_0x547e1a,_0x573541)=>({'id':_0x547e1a[_0x5825e2(0x1c2)],'threadId':_0x547e1a[_0x5825e2(0x1a4)],'dT':f(_0x547e1a['createTimestamp']),'personId':_0x547e1a[_0x5825e2(0x1b0)],'resolved':_0x19ede5[_0x5825e2(0x1e7)]===I[_0x5825e2(0x204)],'unitId':_0x1257c2,'subUnitId':_0x16b1b0,'text':JSON[_0x5825e2(0x20c)](_0x547e1a['content']),'parentId':_0x573541}),_0x4163eb=_0x4ac20b(_0x19ede5[_0x5825e2(0x205)][0x0]);return{..._0x4163eb,'children':_0x19ede5['replies']['slice'](0x1)[_0x5825e2(0x19f)](_0x3e3093=>_0x4ac20b(_0x3e3093,_0x4163eb['id']))};}return null;}let g=class{constructor(_0x3de644,_0x397f4c,_0x502bdd,_0x36d59c){const _0x5f45d9=_0x46c713;this[_0x5f45d9(0x1ff)]=_0x3de644,this[_0x5f45d9(0x191)]=_0x397f4c,this[_0x5f45d9(0x1f6)]=_0x502bdd,this['_injector']=_0x36d59c;}async[_0x46c713(0x209)](_0x41833a){const _0x280a0d=_0x46c713;var _0x446ecd,_0x4ccc59;const {parentId:_0x3529c7,unitId:_0x4eb209,text:_0x43c267,threadId:_0x5c06fc}=_0x41833a,_0x16b365=(_0x4ccc59=(_0x446ecd=_0x43c267[_0x280a0d(0x19e)])==null?void 0x0:_0x446ecd[_0x280a0d(0x192)](_0x2ac561=>_0x2ac561[_0x280a0d(0x1b8)]===c['CustomRangeType']['COMMENT'])[_0x280a0d(0x19f)](_0x532259=>_0x532259[_0x280a0d(0x1ba)]))!=null?_0x4ccc59:[],_0x51c747=JSON[_0x280a0d(0x20a)](_0x43c267),_0x1da014=(await this['_sessionService'][_0x280a0d(0x1d2)](_0x4eb209))['getMemberID']();if(_0x3529c7){const _0x4bd421={'memberId':_0x1da014,'unitId':_0x4eb209,'content':_0x51c747,'mention':_0x16b365,'threadId':_0x5c06fc},_0x16694d=(await this[_0x280a0d(0x1ff)][_0x280a0d(0x1a9)](_0x280a0d(0x1f3)+_0x4eb209+_0x280a0d(0x197),{'body':_0x4bd421}))[_0x280a0d(0x1e8)][_0x280a0d(0x1da)];return{..._0x41833a,'id':_0x16694d['replyId'],'dT':c[_0x280a0d(0x1d0)](+_0x16694d[_0x280a0d(0x1cc)])[_0x280a0d(0x196)](_0x280a0d(0x1e9)),'personId':_0x16694d[_0x280a0d(0x1b0)]};}else{const _0x365557={'memberId':_0x1da014,'unitId':_0x4eb209,'content':_0x51c747,'mention':_0x16b365},_0x3687ef=await this[_0x280a0d(0x1ff)]['post'](_0x280a0d(0x1f3)+_0x4eb209+'/add',{'body':_0x365557});return Y(_0x3687ef['body']['comment'],_0x41833a);}}async[_0x46c713(0x18f)](_0x35b73b){const _0x1fc1cc=_0x46c713;var _0x198893,_0xe00cbb;const {text:_0x52376e,unitId:_0x289f66}=_0x35b73b,_0x1c910a=(_0xe00cbb=(_0x198893=_0x52376e[_0x1fc1cc(0x19e)])==null?void 0x0:_0x198893[_0x1fc1cc(0x192)](_0x2059a3=>_0x2059a3[_0x1fc1cc(0x1b8)]===c[_0x1fc1cc(0x1fa)][_0x1fc1cc(0x1d5)])['map'](_0x87d8f1=>_0x87d8f1[_0x1fc1cc(0x1ba)]))!=null?_0xe00cbb:[],_0x133fa9=JSON['stringify'](_0x52376e),_0x3b164e=_0x35b73b[_0x1fc1cc(0x1a4)],_0x289992=_0x35b73b['id'],_0xe40726={'memberId':(await this[_0x1fc1cc(0x1f6)]['requireSession'](_0x289f66))[_0x1fc1cc(0x1cf)](),'unitId':_0x289f66,'threadId':_0x3b164e,'mention':_0x1c910a,'content':_0x133fa9,'replyId':_0x289992},_0x4e16d1=await this[_0x1fc1cc(0x1ff)][_0x1fc1cc(0x1a9)]('/universer-api/comment/unit/'+_0x289f66+_0x1fc1cc(0x1d4),{'body':_0xe40726});return!_0x4e16d1[_0x1fc1cc(0x1e8)][_0x1fc1cc(0x18e)]||_0x4e16d1[_0x1fc1cc(0x1e8)][_0x1fc1cc(0x18e)][_0x1fc1cc(0x1a6)]===0x1;}async[_0x46c713(0x1fb)](_0x49f589){const _0x1c1046=_0x46c713,{unitId:_0x3c3227}=_0x49f589,_0x276061=_0x49f589['threadId'],_0x53cfc5={'memberId':this[_0x1c1046(0x191)][_0x1c1046(0x1db)]()['userID'],'unitId':_0x3c3227,'threadId':_0x276061,'solved':_0x49f589[_0x1c1046(0x1d3)]?I[_0x1c1046(0x204)]:I[_0x1c1046(0x1b2)]},_0x389e21=await this[_0x1c1046(0x1ff)][_0x1c1046(0x1a9)]('/universer-api/comment/unit/'+_0x3c3227+_0x1c1046(0x198),{'body':_0x53cfc5});return!_0x389e21[_0x1c1046(0x1e8)]['error']||_0x389e21[_0x1c1046(0x1e8)][_0x1c1046(0x18e)][_0x1c1046(0x1a6)]===0x1;}async['deleteComment'](_0x401a1e,_0x36b1d2,_0x48e476,_0x28c9c2){const _0x408cf1=_0x46c713,_0x13c109={'memberId':(await this[_0x408cf1(0x1f6)][_0x408cf1(0x1d2)](_0x401a1e))['getMemberID'](),'threadId':_0x48e476,'replyId':_0x28c9c2,'unitId':_0x401a1e},_0x3b9366=await this[_0x408cf1(0x1ff)][_0x408cf1(0x1a9)](_0x408cf1(0x1f3)+_0x401a1e+_0x408cf1(0x1af),{'body':_0x13c109});return!_0x3b9366[_0x408cf1(0x1e8)][_0x408cf1(0x18e)]||_0x3b9366[_0x408cf1(0x1e8)][_0x408cf1(0x18e)][_0x408cf1(0x1a6)]===0x1;}async[_0x46c713(0x1ac)](_0x5dcef6,_0x5be741,_0x2bfc80){const _0x59a10d=_0x46c713,_0x3be433={'unitId':_0x5dcef6,'threadId':_0x2bfc80},_0x25ef0d=await this[_0x59a10d(0x1ff)][_0x59a10d(0x1a9)](_0x59a10d(0x1f3)+_0x5dcef6+_0x59a10d(0x206),{'body':_0x3be433}),_0x235883=_0x2bfc80['map'](_0x407483=>G(_0x25ef0d[_0x59a10d(0x1e8)][_0x59a10d(0x1f1)][_0x407483],_0x5dcef6,_0x5be741))[_0x59a10d(0x192)](Boolean);return Object[_0x59a10d(0x1fd)](_0x25ef0d['body'][_0x59a10d(0x1ed)])[_0x59a10d(0x1d1)](_0xd4f862=>{const _0x4c4bb0=_0x59a10d;this[_0x4c4bb0(0x191)][_0x4c4bb0(0x1b4)](_0xd4f862);}),_0x235883;}[_0x46c713(0x1c7)](_0x49a53b){const _0x32bddc=_0x46c713;return{'id':_0x49a53b['id'],'threadId':_0x49a53b[_0x32bddc(0x1a4)],'ref':_0x49a53b[_0x32bddc(0x1cd)]};}};g=x([_(0x0,c[_0x46c713(0x1cb)](P[_0x46c713(0x1dc)])),_(0x1,c[_0x46c713(0x1cb)](c['UserManagerService'])),_(0x2,c[_0x46c713(0x1cb)](b[_0x46c713(0x1ab)])),_(0x3,c[_0x46c713(0x1cb)](c['Injector']))],g);var H=Object[_0x46c713(0x1ee)],J=(_0x48abcd,_0x48781a,_0x3773dc,_0x2059e9)=>{for(var _0x572ff=_0x2059e9>0x1?void 0x0:_0x2059e9?H(_0x48781a,_0x3773dc):_0x48781a,_0x11a8bf=_0x48abcd['length']-0x1,_0x5ba9a9;_0x11a8bf>=0x0;_0x11a8bf--)(_0x5ba9a9=_0x48abcd[_0x11a8bf])&&(_0x572ff=_0x5ba9a9(_0x572ff)||_0x572ff);return _0x572ff;},y=(_0x3a356c,_0xfe899a)=>(_0x2c9a30,_0x227abb)=>_0xfe899a(_0x2c9a30,_0x227abb,_0x3a356c);let C=class extends c[_0x46c713(0x1e6)]{constructor(_0x5bda51,_0x10bbec){const _0x4dafd6=_0x46c713;super(),this[_0x4dafd6(0x1e1)]=_0x5bda51,this[_0x4dafd6(0x1a0)]=_0x10bbec,this[_0x4dafd6(0x1aa)]();}[_0x46c713(0x1aa)](){const _0x4911e0=_0x46c713;this['_threadCommentDataSourceService'][_0x4911e0(0x1bb)]=this[_0x4911e0(0x1a0)],this[_0x4911e0(0x1e1)][_0x4911e0(0x1e5)]=!0x1;}};C=J([y(0x0,M[_0x46c713(0x18c)]),y(0x1,c[_0x46c713(0x1cb)](g))],C);function _0x28d5(_0x246c48,_0x589879){const _0x20315a=_0x2031();return _0x28d5=function(_0x28d556,_0x44ddb8){_0x28d556=_0x28d556-0x18b;let _0x502a8b=_0x20315a[_0x28d556];return _0x502a8b;},_0x28d5(_0x246c48,_0x589879);}var F=Object[_0x46c713(0x203)],L=Object[_0x46c713(0x1ee)],Z=(_0xd00cf,_0x410264,_0xec52bc)=>_0x410264 in _0xd00cf?F(_0xd00cf,_0x410264,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xec52bc}):_0xd00cf[_0x410264]=_0xec52bc,W=(_0x46a0ee,_0x58487d,_0x2235cb,_0x4ef758)=>{const _0x2020a5=_0x46c713;for(var _0x3a82a7=_0x4ef758>0x1?void 0x0:_0x4ef758?L(_0x58487d,_0x2235cb):_0x58487d,_0x454493=_0x46a0ee[_0x2020a5(0x1b5)]-0x1,_0x4d10a2;_0x454493>=0x0;_0x454493--)(_0x4d10a2=_0x46a0ee[_0x454493])&&(_0x3a82a7=_0x4d10a2(_0x3a82a7)||_0x3a82a7);return _0x3a82a7;},O=(_0x566455,_0xd73372)=>(_0x2ceb27,_0x95dc3c)=>_0xd73372(_0x2ceb27,_0x95dc3c,_0x566455),N=(_0x4321b4,_0x1d34b8,_0x653fd8)=>Z(_0x4321b4,typeof _0x1d34b8!='symbol'?_0x1d34b8+'':_0x1d34b8,_0x653fd8);function _0x2031(){const _0x16751f=['Unknown','CustomRangeType','resolveComment','_init','values','3043012mwbKbF','_httpService','parentId','add','@univerjs/core','defineProperty','Solved','replies','/list','userID','deleteComment','addComment','stringify','commentUpdate$','parse','264798hQKdDc','IThreadCommentDataSourceService','_configService','error','updateComment','Reply','_userService','filter','thread-comment-data-source.config','Edit','subscribe','format','/reply','/solved','size','UNRECOGNIZED','UniverInstanceType','pluginName','onStarting','customRanges','map','_threadCommentDataSource','_initUserSync','content','payload','threadId','9282oXgZnX','code','UNIVER_UNKNOWN','35YqvCSr','post','_initDataSource','CollaborationSessionService','listComments','IConfigService','9uGlNxh','/delete','userId','setConfig','OpenOrReOpen','_injector','addUser','length','Add','UniverLicensePlugin','rangeType','55uwYHcP','rangeId','dataSource','Module','UniverCollaborationClientPlugin','user','get','bufferTime','DependentOn','replyId','find','@univerjs/thread-comment','@univerjs/thread-comment-ui','root','saveCommentToSnapshot','delete','1292212MfXhfP','_config','Inject','createTimestamp','ref','UserManagerService','getMemberID','dayjs','forEach','requireSession','resolved','/edit','COMMENT','pipe','Delete','unitId','/universer-api/user/list','reply','getCurrentUser','HTTPService','@univerjs/network','Solve','6233064OyYvfP','getComment','_threadCommentDataSourceService','ThreadCommentModel','12456760wxvIDD','3025248vQgMrd','syncUpdateMutationToColla','Disposable','solved','body','YYYY/MM/DD\x20HH:mm','_threadCommentModel','UniverThreadCommentDataSourcePlugin','Injector','users','getOwnPropertyDescriptor','2OLKILC','type','comments','1876sjopmL','/universer-api/comment/unit/','getUser','onReady','_sessionService','disposeWithMe','UniverThreadCommentUIPlugin'];_0x2031=function(){return _0x16751f;};return _0x2031();}exports[_0x46c713(0x1eb)]=class extends c['Plugin']{constructor(_0x117487=D,_0x4ccdc3,_0x48d3a6){const _0x1d329e=_0x46c713;super(),this[_0x1d329e(0x1ca)]=_0x117487,this[_0x1d329e(0x1b3)]=_0x4ccdc3,this[_0x1d329e(0x18d)]=_0x48d3a6;const {..._0x45a2d6}=c['merge']({},D,this[_0x1d329e(0x1ca)]);this[_0x1d329e(0x18d)][_0x1d329e(0x1b1)](q,_0x45a2d6);}[_0x46c713(0x19d)](){[[g],[C],[p]]['forEach'](_0x271424=>{const _0x490710=_0x28d5;this[_0x490710(0x1b3)][_0x490710(0x201)](_0x271424);});}[_0x46c713(0x1f5)](){const _0xb4e60e=_0x46c713;this['_injector']['get'](C),this[_0xb4e60e(0x1b3)][_0xb4e60e(0x1bf)](p);}},N(exports[_0x46c713(0x1eb)],_0x46c713(0x19c),U),N(exports[_0x46c713(0x1eb)],_0x46c713(0x1f0),c[_0x46c713(0x19b)][_0x46c713(0x1a7)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x46c713(0x1c1)](j[_0x46c713(0x1f8)],b[_0x46c713(0x1bd)],T[_0x46c713(0x1b7)]),O(0x1,c['Inject'](c[_0x46c713(0x1ec)])),O(0x2,c[_0x46c713(0x1ad)])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x597f96=_0x5f55;(function(_0x299bf7,_0x2b77b8){const _0x5b4259=_0x5f55,_0x21cc96=_0x299bf7();while(!![]){try{const _0x397444=parseInt(_0x5b4259(0x172))/0x1*(parseInt(_0x5b4259(0x16f))/0x2)+parseInt(_0x5b4259(0x194))/0x3*(-parseInt(_0x5b4259(0x17c))/0x4)+-parseInt(_0x5b4259(0x164))/0x5+parseInt(_0x5b4259(0x14b))/0x6*(parseInt(_0x5b4259(0x15b))/0x7)+-parseInt(_0x5b4259(0x16c))/0x8*(parseInt(_0x5b4259(0x16d))/0x9)+parseInt(_0x5b4259(0x186))/0xa*(parseInt(_0x5b4259(0x184))/0xb)+parseInt(_0x5b4259(0x19e))/0xc;if(_0x397444===_0x2b77b8)break;else _0x21cc96['push'](_0x21cc96['shift']());}catch(_0x418b09){_0x21cc96['push'](_0x21cc96['shift']());}}}(_0x35bf,0x23011));import{CommentService as _0x870a6e,CollaborationSessionService as _0x32baf8,UniverCollaborationClientPlugin as _0x53a35a}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5b5c78}from'@univerjs-pro/license';import{dayjs as _0x3a4c00,UserManagerService as _0x5eb8f1,Inject as _0x3319bd,Injector as _0x2a9806,Disposable as _0x4b16b4,CustomRangeType as _0xc9d637,UniverInstanceType as _0x2a8601,DependentOn as _0x32eefa,IConfigService as _0x2dc9fb,Plugin as _0x2469e2,merge as _0x4f5a3a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1d2348}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xa098e9,IThreadCommentDataSourceService as _0x524bce}from'@univerjs/thread-comment';import{bufferTime as _0x55f664}from'rxjs';import{HTTPService as _0xeee792}from'@univerjs/network';function _0x35bf(){const _0x340636=['map','createTimestamp','_commentService','add','forEach','content','926710TcxCXI','user','getComment','_sessionService','get','/solved','post','code','48376uaZsJd','9EVZyoq','slice','183970KYbNiI','size','_userService','1PmjoYO','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/reply','COMMENT','delete','deleteComment','/list','stringify','customRanges','root','4aNwqoT','OpenOrReOpen','_config','comment','personId','error','getUnit','Reply','96613aFNbfN','Solve','20zmhijx','thread-comment-data-source.config','users','_threadCommentDataSource','parse','defineProperty','_initDataSource','addUser','userId','/universer-api/comment/unit/','disposeWithMe','type','/add','rangeId','127989fZcHHY','filter','listComments','format','_injector','_configService','Add','pipe','solved','replies','2375436jNmUbt','parentId','Delete','Edit','resolveComment','getMemberID','threadId','length','/delete','Unknown','userID','subscribe','_httpService','commentUpdate$','/edit','419550sMPSZJ','requireSession','resolved','UNRECOGNIZED','replyId','saveCommentToSnapshot','_threadCommentDataSourceService','body','_init','YYYY/MM/DD\x20HH:mm','setConfig','_threadCommentModel','symbol','Solved','values','getOwnPropertyDescriptor','7wjJgVf','unitId','_initUserSync'];_0x35bf=function(){return _0x340636;};return _0x35bf();}const W=_0x597f96(0x173);function _0x5f55(_0x4e0e0a,_0x7c0f12){const _0x35bfd2=_0x35bf();return _0x5f55=function(_0x5f554e,_0x4591eb){_0x5f554e=_0x5f554e-0x148;let _0x27154a=_0x35bfd2[_0x5f554e];return _0x27154a;},_0x5f55(_0x4e0e0a,_0x7c0f12);}var I=(_0xb883fe=>(_0xb883fe[_0xb883fe[_0x597f96(0x17d)]=0x0]=_0x597f96(0x17d),_0xb883fe[_0xb883fe[_0x597f96(0x158)]=0x1]=_0x597f96(0x158),_0xb883fe[_0xb883fe[_0x597f96(0x14e)]=-0x1]=_0x597f96(0x14e),_0xb883fe))(I||{}),v=(_0x1e09c6=>(_0x1e09c6[_0x1e09c6[_0x597f96(0x1a7)]=0x0]=_0x597f96(0x1a7),_0x1e09c6[_0x1e09c6[_0x597f96(0x19a)]=0x1]=_0x597f96(0x19a),_0x1e09c6[_0x1e09c6[_0x597f96(0x183)]=0x2]=_0x597f96(0x183),_0x1e09c6[_0x1e09c6[_0x597f96(0x1a1)]=0x3]=_0x597f96(0x1a1),_0x1e09c6[_0x1e09c6[_0x597f96(0x1a0)]=0x4]=_0x597f96(0x1a0),_0x1e09c6[_0x1e09c6['Solve']=0x5]=_0x597f96(0x185),_0x1e09c6[_0x1e09c6[_0x597f96(0x14e)]=-0x1]=_0x597f96(0x14e),_0x1e09c6))(v||{});const D=_0x3591a0=>_0x3a4c00(new Date(+_0x3591a0))[_0x597f96(0x197)](_0x597f96(0x154)),B=async(_0x42e457,_0x30674a)=>{const _0x473a52=_0x597f96,_0x5869a7=_0x42e457[_0x473a52(0x168)](_0x5eb8f1),_0x26300c=_0x42e457['get'](_0xeee792);_0x30674a[_0x473a52(0x162)](_0x5caa43=>{const _0x3829c8=_0x473a52;_0x5869a7['getUser'](_0x5caa43)&&_0x30674a[_0x3829c8(0x176)](_0x5caa43);}),_0x30674a[_0x473a52(0x170)]&&(await _0x26300c['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x30674a]}}))[_0x473a52(0x152)][_0x473a52(0x188)][_0x473a52(0x162)](_0x32b78c=>{const _0xc10422=_0x473a52;_0x32b78c&&_0x5869a7[_0xc10422(0x18d)](_0x32b78c);});};var K=Object[_0x597f96(0x15a)],V=(_0x285199,_0x568b53,_0x17f0ff,_0x62f402)=>{const _0x2f26d5=_0x597f96;for(var _0xd2c762=_0x62f402>0x1?void 0x0:_0x62f402?K(_0x568b53,_0x17f0ff):_0x568b53,_0x1e654d=_0x285199[_0x2f26d5(0x1a5)]-0x1,_0x4d2e64;_0x1e654d>=0x0;_0x1e654d--)(_0x4d2e64=_0x285199[_0x1e654d])&&(_0xd2c762=_0x4d2e64(_0xd2c762)||_0xd2c762);return _0xd2c762;},p=(_0x31ed3b,_0x137a6c)=>(_0x22ef5c,_0x58feb4)=>_0x137a6c(_0x22ef5c,_0x58feb4,_0x31ed3b);let S=class extends _0x4b16b4{constructor(_0x43c20b,_0xf30329,_0x6c99d3,_0x56d514){const _0x40841b=_0x597f96;super(),this[_0x40841b(0x160)]=_0x43c20b,this[_0x40841b(0x156)]=_0xf30329,this[_0x40841b(0x171)]=_0x6c99d3,this['_injector']=_0x56d514,this[_0x40841b(0x153)](),this[_0x40841b(0x15d)]();}[_0x597f96(0x15d)](){const _0xa79a10=_0x597f96;this[_0xa79a10(0x190)](this['_threadCommentModel']['commentUpdate$'][_0xa79a10(0x19b)](_0x55f664(0x10))[_0xa79a10(0x1a9)](_0x2f0b64=>{const _0x55dd1d=_0xa79a10,_0x10ddd1=new Set();_0x2f0b64['forEach'](_0x110dcf=>{const _0x3ac234=_0x5f55;switch(_0x110dcf[_0x3ac234(0x191)]){case'add':{const _0x499f8a=_0x110dcf['payload'][_0x3ac234(0x180)];_0x10ddd1[_0x3ac234(0x161)](_0x499f8a);break;}}}),B(this[_0x55dd1d(0x198)],_0x10ddd1);}));}[_0x597f96(0x153)](){const _0x3d182b=_0x597f96;this[_0x3d182b(0x190)](this[_0x3d182b(0x160)][_0x3d182b(0x149)][_0x3d182b(0x1a9)](async _0x16063c=>{const _0x144ffe=_0x3d182b;var _0x3ce913,_0x414d9f,_0x517bbb,_0x4c2310;const _0x127d08=(_0x3ce913=this['_threadCommentModel'][_0x144ffe(0x182)](_0x16063c['unitId'])['find'](_0x70efa8=>_0x70efa8['threadId']===_0x16063c['threadId']))==null?void 0x0:_0x3ce913['root'];if(!_0x127d08)return;const {unitId:_0x38dcef,subUnitId:_0x4519bc}=_0x127d08;switch(_0x16063c[_0x144ffe(0x165)]&&this['_userService'][_0x144ffe(0x18d)](_0x16063c[_0x144ffe(0x165)]),_0x16063c['type']){case v[_0x144ffe(0x19a)]:break;case v[_0x144ffe(0x183)]:{this[_0x144ffe(0x156)]['addComment'](_0x38dcef,_0x4519bc,{'unitId':_0x38dcef,'subUnitId':_0x4519bc,'ref':'','id':_0x16063c[_0x144ffe(0x14f)],'dT':D(+_0x16063c[_0x144ffe(0x15f)]),'threadId':_0x16063c['threadId'],'personId':(_0x517bbb=(_0x414d9f=_0x16063c['user'])==null?void 0x0:_0x414d9f[_0x144ffe(0x1a8)])!=null?_0x517bbb:_0x16063c[_0x144ffe(0x18e)],'text':JSON[_0x144ffe(0x18a)](_0x16063c[_0x144ffe(0x163)]),'parentId':_0x127d08['id']});break;}case v['Delete']:{const _0x3c14f8=this[_0x144ffe(0x156)][_0x144ffe(0x166)](_0x38dcef,_0x4519bc,_0x16063c[_0x144ffe(0x14f)]);_0x3c14f8&&_0x3c14f8[_0x144ffe(0x19f)]&&this['_threadCommentModel'][_0x144ffe(0x177)](_0x38dcef,_0x4519bc,_0x16063c[_0x144ffe(0x14f)]);break;}case v['Edit']:{this['_threadCommentModel']['updateComment'](_0x38dcef,_0x4519bc,{'commentId':_0x16063c['replyId'],'text':JSON['parse'](_0x16063c[_0x144ffe(0x163)])});break;}case v[_0x144ffe(0x185)]:{const _0x46e105=(_0x4c2310=this['_threadCommentModel'][_0x144ffe(0x182)](_0x16063c[_0x144ffe(0x15c)])['find'](_0x140f7e=>_0x140f7e[_0x144ffe(0x1a4)]===_0x16063c['threadId']))==null?void 0x0:_0x4c2310[_0x144ffe(0x17b)];_0x46e105&&this[_0x144ffe(0x156)]['resolveComment'](_0x38dcef,_0x4519bc,_0x46e105['id'],_0x16063c[_0x144ffe(0x19c)]===I[_0x144ffe(0x158)]);break;}}}));}};S=V([p(0x0,_0x3319bd(_0x870a6e)),p(0x1,_0x3319bd(_0xa098e9)),p(0x2,_0x3319bd(_0x5eb8f1)),p(0x3,_0x3319bd(_0x2a9806))],S);const z=_0x597f96(0x187),M={};var k=Object[_0x597f96(0x15a)],Q=(_0x10532d,_0x59c67e,_0x9c1fe6,_0x543e0b)=>{const _0x2a5bb0=_0x597f96;for(var _0x582c49=_0x543e0b>0x1?void 0x0:_0x543e0b?k(_0x59c67e,_0x9c1fe6):_0x59c67e,_0x52b088=_0x10532d[_0x2a5bb0(0x1a5)]-0x1,_0x558edf;_0x52b088>=0x0;_0x52b088--)(_0x558edf=_0x10532d[_0x52b088])&&(_0x582c49=_0x558edf(_0x582c49)||_0x582c49);return _0x582c49;},_=(_0xde9a76,_0x300404)=>(_0x2f5898,_0x226a7d)=>_0x300404(_0x2f5898,_0x226a7d,_0xde9a76);function X(_0xe3fd93,_0x5f0ac8){const _0x3a4758=_0x597f96,_0x212ad5=_0xe3fd93[_0x3a4758(0x19d)][0x0];return{..._0x5f0ac8,'id':_0x212ad5[_0x3a4758(0x14f)],'resolved':_0xe3fd93[_0x3a4758(0x19c)]===0x1,'dT':D(_0x212ad5[_0x3a4758(0x15f)]),'personId':_0x212ad5['userId'],'threadId':_0x212ad5['threadId']};}function ee(_0x18d791,_0x44d536,_0x55dc40){const _0x3aea06=_0x597f96;var _0x231397,_0x1c43da;if(((_0x1c43da=(_0x231397=_0x18d791==null?void 0x0:_0x18d791[_0x3aea06(0x19d)])==null?void 0x0:_0x231397[_0x3aea06(0x1a5)])!=null?_0x1c43da:0x0)>0x0){const _0x2d5661=(_0x4a6db1,_0xb98591)=>({'id':_0x4a6db1[_0x3aea06(0x14f)],'threadId':_0x4a6db1[_0x3aea06(0x1a4)],'dT':D(_0x4a6db1[_0x3aea06(0x15f)]),'personId':_0x4a6db1[_0x3aea06(0x18e)],'resolved':_0x18d791[_0x3aea06(0x19c)]===I[_0x3aea06(0x158)],'unitId':_0x44d536,'subUnitId':_0x55dc40,'text':JSON[_0x3aea06(0x18a)](_0x4a6db1[_0x3aea06(0x163)]),'parentId':_0xb98591}),_0x206aa8=_0x2d5661(_0x18d791[_0x3aea06(0x19d)][0x0]);return{..._0x206aa8,'children':_0x18d791[_0x3aea06(0x19d)][_0x3aea06(0x16e)](0x1)[_0x3aea06(0x15e)](_0x44bdf9=>_0x2d5661(_0x44bdf9,_0x206aa8['id']))};}return null;}let f=class{constructor(_0x30794d,_0x280658,_0x194daa,_0x463807){const _0x338733=_0x597f96;this[_0x338733(0x148)]=_0x30794d,this[_0x338733(0x171)]=_0x280658,this[_0x338733(0x167)]=_0x194daa,this['_injector']=_0x463807;}async['addComment'](_0x5d8f4d){const _0x2ac765=_0x597f96;var _0x3219c4,_0x3bdaca;const {parentId:_0x25d9dd,unitId:_0x5dcb58,text:_0x217d9b,threadId:_0x6f770b}=_0x5d8f4d,_0x2a4e4c=(_0x3bdaca=(_0x3219c4=_0x217d9b['customRanges'])==null?void 0x0:_0x3219c4[_0x2ac765(0x195)](_0x2872c9=>_0x2872c9['rangeType']===_0xc9d637[_0x2ac765(0x175)])[_0x2ac765(0x15e)](_0x427f35=>_0x427f35[_0x2ac765(0x193)]))!=null?_0x3bdaca:[],_0x11c187=JSON[_0x2ac765(0x179)](_0x217d9b),_0x6d173d=(await this[_0x2ac765(0x167)]['requireSession'](_0x5dcb58))[_0x2ac765(0x1a3)]();if(_0x25d9dd){const _0x4fb426={'memberId':_0x6d173d,'unitId':_0x5dcb58,'content':_0x11c187,'mention':_0x2a4e4c,'threadId':_0x6f770b},_0x4c0835=(await this[_0x2ac765(0x148)][_0x2ac765(0x16a)](_0x2ac765(0x18f)+_0x5dcb58+_0x2ac765(0x174),{'body':_0x4fb426}))['body']['reply'];return{..._0x5d8f4d,'id':_0x4c0835['replyId'],'dT':_0x3a4c00(+_0x4c0835[_0x2ac765(0x15f)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x4c0835[_0x2ac765(0x18e)]};}else{const _0x22181d={'memberId':_0x6d173d,'unitId':_0x5dcb58,'content':_0x11c187,'mention':_0x2a4e4c},_0xd465d5=await this[_0x2ac765(0x148)]['post'](_0x2ac765(0x18f)+_0x5dcb58+_0x2ac765(0x192),{'body':_0x22181d});return X(_0xd465d5['body'][_0x2ac765(0x17f)],_0x5d8f4d);}}async['updateComment'](_0x286a9b){const _0x420817=_0x597f96;var _0x34c9a7,_0x4b3f4e;const {text:_0x3a8bc7,unitId:_0x4aeadd}=_0x286a9b,_0x107907=(_0x4b3f4e=(_0x34c9a7=_0x3a8bc7[_0x420817(0x17a)])==null?void 0x0:_0x34c9a7['filter'](_0x21e0d0=>_0x21e0d0['rangeType']===_0xc9d637[_0x420817(0x175)])[_0x420817(0x15e)](_0x2f6d3a=>_0x2f6d3a[_0x420817(0x193)]))!=null?_0x4b3f4e:[],_0x517a57=JSON[_0x420817(0x179)](_0x3a8bc7),_0x12241f=_0x286a9b[_0x420817(0x1a4)],_0x3d6cb6=_0x286a9b['id'],_0x43f11f={'memberId':(await this[_0x420817(0x167)][_0x420817(0x14c)](_0x4aeadd))['getMemberID'](),'unitId':_0x4aeadd,'threadId':_0x12241f,'mention':_0x107907,'content':_0x517a57,'replyId':_0x3d6cb6},_0x10ae1d=await this[_0x420817(0x148)][_0x420817(0x16a)]('/universer-api/comment/unit/'+_0x4aeadd+_0x420817(0x14a),{'body':_0x43f11f});return!_0x10ae1d[_0x420817(0x152)]['error']||_0x10ae1d[_0x420817(0x152)][_0x420817(0x181)][_0x420817(0x16b)]===0x1;}async[_0x597f96(0x1a2)](_0x2cf37d){const _0x384a16=_0x597f96,{unitId:_0x483f2a}=_0x2cf37d,_0x10e469=_0x2cf37d[_0x384a16(0x1a4)],_0xec4560={'memberId':this[_0x384a16(0x171)]['getCurrentUser']()[_0x384a16(0x1a8)],'unitId':_0x483f2a,'threadId':_0x10e469,'solved':_0x2cf37d[_0x384a16(0x14d)]?I[_0x384a16(0x158)]:I[_0x384a16(0x17d)]},_0x4a6017=await this[_0x384a16(0x148)][_0x384a16(0x16a)](_0x384a16(0x18f)+_0x483f2a+_0x384a16(0x169),{'body':_0xec4560});return!_0x4a6017['body'][_0x384a16(0x181)]||_0x4a6017[_0x384a16(0x152)][_0x384a16(0x181)][_0x384a16(0x16b)]===0x1;}async['deleteComment'](_0x1fe00d,_0x33f6dd,_0x4f2c4c,_0x259f47){const _0x1536bb=_0x597f96,_0x2b3e31={'memberId':(await this['_sessionService']['requireSession'](_0x1fe00d))[_0x1536bb(0x1a3)](),'threadId':_0x4f2c4c,'replyId':_0x259f47,'unitId':_0x1fe00d},_0xbabc2=await this['_httpService'][_0x1536bb(0x16a)](_0x1536bb(0x18f)+_0x1fe00d+_0x1536bb(0x1a6),{'body':_0x2b3e31});return!_0xbabc2[_0x1536bb(0x152)][_0x1536bb(0x181)]||_0xbabc2[_0x1536bb(0x152)][_0x1536bb(0x181)][_0x1536bb(0x16b)]===0x1;}async[_0x597f96(0x196)](_0xa08590,_0x532cfe,_0x24b1c2){const _0x40a35f=_0x597f96,_0x4178d1={'unitId':_0xa08590,'threadId':_0x24b1c2},_0x261a59=await this['_httpService'][_0x40a35f(0x16a)](_0x40a35f(0x18f)+_0xa08590+_0x40a35f(0x178),{'body':_0x4178d1}),_0xe09690=_0x24b1c2[_0x40a35f(0x15e)](_0x54aeec=>ee(_0x261a59['body']['comments'][_0x54aeec],_0xa08590,_0x532cfe))[_0x40a35f(0x195)](Boolean);return Object[_0x40a35f(0x159)](_0x261a59[_0x40a35f(0x152)]['users'])['forEach'](_0xbfb615=>{const _0xc31d2d=_0x40a35f;this[_0xc31d2d(0x171)]['addUser'](_0xbfb615);}),_0xe09690;}[_0x597f96(0x150)](_0x70e505){const _0x1ef39f=_0x597f96;return{'id':_0x70e505['id'],'threadId':_0x70e505[_0x1ef39f(0x1a4)],'ref':_0x70e505['ref']};}};f=Q([_(0x0,_0x3319bd(_0xeee792)),_(0x1,_0x3319bd(_0x5eb8f1)),_(0x2,_0x3319bd(_0x32baf8)),_(0x3,_0x3319bd(_0x2a9806))],f);var re=Object[_0x597f96(0x15a)],te=(_0xda6ae8,_0xafc026,_0x6084be,_0x25b53e)=>{for(var _0x5a10cc=_0x25b53e>0x1?void 0x0:_0x25b53e?re(_0xafc026,_0x6084be):_0xafc026,_0xd1af38=_0xda6ae8['length']-0x1,_0x34b42d;_0xd1af38>=0x0;_0xd1af38--)(_0x34b42d=_0xda6ae8[_0xd1af38])&&(_0x5a10cc=_0x34b42d(_0x5a10cc)||_0x5a10cc);return _0x5a10cc;},N=(_0xaf04b8,_0x46ef6f)=>(_0x575db9,_0x160f09)=>_0x46ef6f(_0x575db9,_0x160f09,_0xaf04b8);let g=class extends _0x4b16b4{constructor(_0x696a20,_0x217382){const _0x55f272=_0x597f96;super(),this[_0x55f272(0x151)]=_0x696a20,this[_0x55f272(0x189)]=_0x217382,this[_0x55f272(0x18c)]();}[_0x597f96(0x18c)](){const _0x416c56=_0x597f96;this['_threadCommentDataSourceService']['dataSource']=this[_0x416c56(0x189)],this[_0x416c56(0x151)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x524bce),N(0x1,_0x3319bd(f))],g);var se=Object[_0x597f96(0x18b)],oe=Object[_0x597f96(0x15a)],ne=(_0x5a1a53,_0x2d9d4e,_0x2d07ec)=>_0x2d9d4e in _0x5a1a53?se(_0x5a1a53,_0x2d9d4e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2d07ec}):_0x5a1a53[_0x2d9d4e]=_0x2d07ec,ie=(_0x2ac3d0,_0x5935b3,_0x12851b,_0x1f4f36)=>{const _0x301a83=_0x597f96;for(var _0x3d8a92=_0x1f4f36>0x1?void 0x0:_0x1f4f36?oe(_0x5935b3,_0x12851b):_0x5935b3,_0x5b01e5=_0x2ac3d0[_0x301a83(0x1a5)]-0x1,_0x417de6;_0x5b01e5>=0x0;_0x5b01e5--)(_0x417de6=_0x2ac3d0[_0x5b01e5])&&(_0x3d8a92=_0x417de6(_0x3d8a92)||_0x3d8a92);return _0x3d8a92;},w=(_0x5f34b8,_0x2d1046)=>(_0x121a8e,_0x14767b)=>_0x2d1046(_0x121a8e,_0x14767b,_0x5f34b8),$=(_0x17e997,_0xd52f66,_0x17d923)=>ne(_0x17e997,typeof _0xd52f66!=_0x597f96(0x157)?_0xd52f66+'':_0xd52f66,_0x17d923);let b=class extends _0x2469e2{constructor(_0x5dd388=M,_0x32acef,_0xe35147){const _0xdb3830=_0x597f96;super(),this[_0xdb3830(0x17e)]=_0x5dd388,this['_injector']=_0x32acef,this[_0xdb3830(0x199)]=_0xe35147;const {..._0x3bc1f7}=_0x4f5a3a({},M,this[_0xdb3830(0x17e)]);this[_0xdb3830(0x199)][_0xdb3830(0x155)](z,_0x3bc1f7);}['onStarting'](){const _0xe0f8c=_0x597f96;[[f],[g],[S]][_0xe0f8c(0x162)](_0x35634b=>{const _0x522e91=_0xe0f8c;this['_injector'][_0x522e91(0x161)](_0x35634b);});}['onReady'](){const _0x43d2ea=_0x597f96;this[_0x43d2ea(0x198)]['get'](g),this[_0x43d2ea(0x198)][_0x43d2ea(0x168)](S);}};$(b,'pluginName',W),$(b,_0x597f96(0x191),_0x2a8601['UNIVER_UNKNOWN']),b=ie([_0x32eefa(_0x1d2348,_0x53a35a,_0x5b5c78),w(0x1,_0x3319bd(_0x2a9806)),w(0x2,_0x2dc9fb)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3d0222=_0x215d;(function(_0x3140fd,_0x3103e7){const _0xd8b334=_0x215d,_0x27c435=_0x3140fd();while(!![]){try{const _0xb05e11=parseInt(_0xd8b334(0x83))/0x1*(-parseInt(_0xd8b334(0xc8))/0x2)+parseInt(_0xd8b334(0xc3))/0x3*(-parseInt(_0xd8b334(0x9b))/0x4)+parseInt(_0xd8b334(0x90))/0x5*(parseInt(_0xd8b334(0xcb))/0x6)+-parseInt(_0xd8b334(0xb1))/0x7*(-parseInt(_0xd8b334(0xc5))/0x8)+-parseInt(_0xd8b334(0xdd))/0x9*(-parseInt(_0xd8b334(0x95))/0xa)+parseInt(_0xd8b334(0xd5))/0xb*(-parseInt(_0xd8b334(0x89))/0xc)+parseInt(_0xd8b334(0xd6))/0xd;if(_0xb05e11===_0x3103e7)break;else _0x27c435['push'](_0x27c435['shift']());}catch(_0x1c113e){_0x27c435['push'](_0x27c435['shift']());}}}(_0x1ae7,0xbc411));import{CommentService as _0x2eedbc,CollaborationSessionService as _0x331714,UniverCollaborationClientPlugin as _0x1d664a}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xd9538b}from'@univerjs-pro/license';import{dayjs as _0x3b7c2,UserManagerService as _0x312b2f,Inject as _0xb50de1,Injector as _0xc1b344,Disposable as _0x4314bc,CustomRangeType as _0xfc942,UniverInstanceType as _0x3f182b,DependentOn as _0x19c23a,IConfigService as _0x4283b9,Plugin as _0x33f723,merge as _0x351827}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x554dd4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x20227f,IThreadCommentDataSourceService as _0x43c8d5}from'@univerjs/thread-comment';function _0x215d(_0x3539ee,_0x25e01d){const _0x1ae716=_0x1ae7();return _0x215d=function(_0x215db4,_0x555a45){_0x215db4=_0x215db4-0x80;let _0x3eb85c=_0x1ae716[_0x215db4];return _0x3eb85c;},_0x215d(_0x3539ee,_0x25e01d);}import{bufferTime as _0x45eeee}from'rxjs';import{HTTPService as _0x40ab69}from'@univerjs/network';const W=_0x3d0222(0x9e);var I=(_0x4af38=>(_0x4af38[_0x4af38['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x4af38[_0x4af38[_0x3d0222(0xd2)]=0x1]=_0x3d0222(0xd2),_0x4af38[_0x4af38[_0x3d0222(0x86)]=-0x1]=_0x3d0222(0x86),_0x4af38))(I||{}),v=(_0x16435d=>(_0x16435d[_0x16435d[_0x3d0222(0xad)]=0x0]=_0x3d0222(0xad),_0x16435d[_0x16435d[_0x3d0222(0x8f)]=0x1]='Add',_0x16435d[_0x16435d[_0x3d0222(0xb5)]=0x2]=_0x3d0222(0xb5),_0x16435d[_0x16435d['Edit']=0x3]=_0x3d0222(0x92),_0x16435d[_0x16435d[_0x3d0222(0x9a)]=0x4]=_0x3d0222(0x9a),_0x16435d[_0x16435d[_0x3d0222(0xba)]=0x5]=_0x3d0222(0xba),_0x16435d[_0x16435d[_0x3d0222(0x86)]=-0x1]=_0x3d0222(0x86),_0x16435d))(v||{});const D=_0x4f0219=>_0x3b7c2(new Date(+_0x4f0219))['format'](_0x3d0222(0xa3)),B=async(_0x2ef99f,_0x28bcc4)=>{const _0xc91faf=_0x3d0222,_0x1b53fd=_0x2ef99f[_0xc91faf(0xd0)](_0x312b2f),_0x4924d4=_0x2ef99f[_0xc91faf(0xd0)](_0x40ab69);_0x28bcc4[_0xc91faf(0xca)](_0x4e3d27=>{const _0x172a5e=_0xc91faf;_0x1b53fd['getUser'](_0x4e3d27)&&_0x28bcc4[_0x172a5e(0xbf)](_0x4e3d27);}),_0x28bcc4['size']&&(await _0x4924d4['get'](_0xc91faf(0xe8),{'params':{'userIDs':[..._0x28bcc4]}}))[_0xc91faf(0xcd)][_0xc91faf(0x88)]['forEach'](_0x2d7c80=>{const _0xe40bf2=_0xc91faf;_0x2d7c80&&_0x1b53fd[_0xe40bf2(0xa2)](_0x2d7c80);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x46a882,_0x6188d,_0x5756cb,_0x16af2c)=>{const _0x38ce41=_0x3d0222;for(var _0x4ea8b3=_0x16af2c>0x1?void 0x0:_0x16af2c?K(_0x6188d,_0x5756cb):_0x6188d,_0x3e4e30=_0x46a882[_0x38ce41(0xe5)]-0x1,_0x4357c5;_0x3e4e30>=0x0;_0x3e4e30--)(_0x4357c5=_0x46a882[_0x3e4e30])&&(_0x4ea8b3=_0x4357c5(_0x4ea8b3)||_0x4ea8b3);return _0x4ea8b3;},p=(_0x296b5b,_0x23b7ba)=>(_0xfe8ff4,_0x5447b8)=>_0x23b7ba(_0xfe8ff4,_0x5447b8,_0x296b5b);let S=class extends _0x4314bc{constructor(_0x1d4d95,_0x45eac5,_0x226d24,_0x1440a0){const _0xba2ced=_0x3d0222;super(),this[_0xba2ced(0xde)]=_0x1d4d95,this[_0xba2ced(0xd9)]=_0x45eac5,this[_0xba2ced(0x82)]=_0x226d24,this[_0xba2ced(0xb9)]=_0x1440a0,this[_0xba2ced(0xac)](),this['_initUserSync']();}[_0x3d0222(0x97)](){const _0x559dbb=_0x3d0222;this[_0x559dbb(0xe3)](this[_0x559dbb(0xd9)]['commentUpdate$'][_0x559dbb(0xdb)](_0x45eeee(0x10))['subscribe'](_0x181efb=>{const _0x2936e1=_0x559dbb,_0x4cee51=new Set();_0x181efb[_0x2936e1(0xca)](_0xda2af6=>{const _0x2b5b13=_0x2936e1;switch(_0xda2af6[_0x2b5b13(0xaa)]){case'add':{const _0x5e38ce=_0xda2af6[_0x2b5b13(0xa4)][_0x2b5b13(0xdc)];_0x4cee51[_0x2b5b13(0xda)](_0x5e38ce);break;}}}),B(this['_injector'],_0x4cee51);}));}[_0x3d0222(0xac)](){const _0x59be15=_0x3d0222;this['disposeWithMe'](this[_0x59be15(0xde)][_0x59be15(0x8e)]['subscribe'](async _0x506e81=>{const _0x22693b=_0x59be15;var _0x3e0df5,_0x25e85e,_0x39480b,_0xd01aa4;const _0x1a6164=(_0x3e0df5=this[_0x22693b(0xd9)]['getUnit'](_0x506e81['unitId'])[_0x22693b(0x96)](_0x3d35fe=>_0x3d35fe[_0x22693b(0x99)]===_0x506e81[_0x22693b(0x99)]))==null?void 0x0:_0x3e0df5[_0x22693b(0x9c)];if(!_0x1a6164)return;const {unitId:_0x82dfa1,subUnitId:_0x5d32a3}=_0x1a6164;switch(_0x506e81[_0x22693b(0xdf)]&&this['_userService'][_0x22693b(0xa2)](_0x506e81[_0x22693b(0xdf)]),_0x506e81[_0x22693b(0xaa)]){case v[_0x22693b(0x8f)]:break;case v[_0x22693b(0xb5)]:{this[_0x22693b(0xd9)][_0x22693b(0x8d)](_0x82dfa1,_0x5d32a3,{'unitId':_0x82dfa1,'subUnitId':_0x5d32a3,'ref':'','id':_0x506e81[_0x22693b(0x8c)],'dT':D(+_0x506e81[_0x22693b(0xbe)]),'threadId':_0x506e81[_0x22693b(0x99)],'personId':(_0x39480b=(_0x25e85e=_0x506e81[_0x22693b(0xdf)])==null?void 0x0:_0x25e85e[_0x22693b(0xa9)])!=null?_0x39480b:_0x506e81[_0x22693b(0x8a)],'text':JSON[_0x22693b(0xb4)](_0x506e81[_0x22693b(0xa7)]),'parentId':_0x1a6164['id']});break;}case v[_0x22693b(0x9a)]:{const _0x397d8a=this[_0x22693b(0xd9)][_0x22693b(0xc6)](_0x82dfa1,_0x5d32a3,_0x506e81[_0x22693b(0x8c)]);_0x397d8a&&_0x397d8a['parentId']&&this['_threadCommentModel']['deleteComment'](_0x82dfa1,_0x5d32a3,_0x506e81[_0x22693b(0x8c)]);break;}case v[_0x22693b(0x92)]:{this['_threadCommentModel'][_0x22693b(0xbb)](_0x82dfa1,_0x5d32a3,{'commentId':_0x506e81[_0x22693b(0x8c)],'text':JSON[_0x22693b(0xb4)](_0x506e81[_0x22693b(0xa7)])});break;}case v[_0x22693b(0xba)]:{const _0x4e576d=(_0xd01aa4=this['_threadCommentModel'][_0x22693b(0xc0)](_0x506e81[_0x22693b(0x9f)])[_0x22693b(0x96)](_0x49dc00=>_0x49dc00[_0x22693b(0x99)]===_0x506e81[_0x22693b(0x99)]))==null?void 0x0:_0xd01aa4[_0x22693b(0x9c)];_0x4e576d&&this[_0x22693b(0xd9)][_0x22693b(0xe6)](_0x82dfa1,_0x5d32a3,_0x4e576d['id'],_0x506e81[_0x22693b(0xe7)]===I[_0x22693b(0xd2)]);break;}}}));}};S=V([p(0x0,_0xb50de1(_0x2eedbc)),p(0x1,_0xb50de1(_0x20227f)),p(0x2,_0xb50de1(_0x312b2f)),p(0x3,_0xb50de1(_0xc1b344))],S);const z=_0x3d0222(0xaf),M={};var k=Object[_0x3d0222(0xcc)],Q=(_0x10058c,_0x1b9c24,_0x43394a,_0x11e3cf)=>{for(var _0x35138e=_0x11e3cf>0x1?void 0x0:_0x11e3cf?k(_0x1b9c24,_0x43394a):_0x1b9c24,_0x331af7=_0x10058c['length']-0x1,_0x3f93f2;_0x331af7>=0x0;_0x331af7--)(_0x3f93f2=_0x10058c[_0x331af7])&&(_0x35138e=_0x3f93f2(_0x35138e)||_0x35138e);return _0x35138e;},_=(_0x2791c3,_0x4c0229)=>(_0x4ac72c,_0x11e90e)=>_0x4c0229(_0x4ac72c,_0x11e90e,_0x2791c3);function X(_0x40c91b,_0x4d83db){const _0x5a4b1c=_0x3d0222,_0x59b46a=_0x40c91b['replies'][0x0];return{..._0x4d83db,'id':_0x59b46a[_0x5a4b1c(0x8c)],'resolved':_0x40c91b[_0x5a4b1c(0xe7)]===0x1,'dT':D(_0x59b46a[_0x5a4b1c(0xbe)]),'personId':_0x59b46a[_0x5a4b1c(0x8a)],'threadId':_0x59b46a[_0x5a4b1c(0x99)]};}function ee(_0x3b4b64,_0x2ac990,_0x729992){const _0x4cbfe7=_0x3d0222;var _0xa41e14,_0x2c182e;if(((_0x2c182e=(_0xa41e14=_0x3b4b64==null?void 0x0:_0x3b4b64[_0x4cbfe7(0xab)])==null?void 0x0:_0xa41e14['length'])!=null?_0x2c182e:0x0)>0x0){const _0x2e01a3=(_0x1b5e80,_0xe75e5d)=>({'id':_0x1b5e80['replyId'],'threadId':_0x1b5e80[_0x4cbfe7(0x99)],'dT':D(_0x1b5e80['createTimestamp']),'personId':_0x1b5e80[_0x4cbfe7(0x8a)],'resolved':_0x3b4b64[_0x4cbfe7(0xe7)]===I[_0x4cbfe7(0xd2)],'unitId':_0x2ac990,'subUnitId':_0x729992,'text':JSON[_0x4cbfe7(0xb4)](_0x1b5e80[_0x4cbfe7(0xa7)]),'parentId':_0xe75e5d}),_0x3e59d7=_0x2e01a3(_0x3b4b64[_0x4cbfe7(0xab)][0x0]);return{..._0x3e59d7,'children':_0x3b4b64['replies'][_0x4cbfe7(0xd3)](0x1)[_0x4cbfe7(0x84)](_0x5abc96=>_0x2e01a3(_0x5abc96,_0x3e59d7['id']))};}return null;}let f=class{constructor(_0x4d307b,_0x334e9f,_0x5d93ce,_0x3efa69){const _0x550a26=_0x3d0222;this[_0x550a26(0x8b)]=_0x4d307b,this[_0x550a26(0x82)]=_0x334e9f,this['_sessionService']=_0x5d93ce,this[_0x550a26(0xb9)]=_0x3efa69;}async[_0x3d0222(0x8d)](_0x64865a){const _0x1ec075=_0x3d0222;var _0x333129,_0x28205e;const {parentId:_0x1886c5,unitId:_0x3e28d7,text:_0x487b95,threadId:_0x1eb36c}=_0x64865a,_0x2172a1=(_0x28205e=(_0x333129=_0x487b95['customRanges'])==null?void 0x0:_0x333129['filter'](_0x2d4a13=>_0x2d4a13[_0x1ec075(0xae)]===_0xfc942[_0x1ec075(0xc7)])[_0x1ec075(0x84)](_0x223472=>_0x223472[_0x1ec075(0xb6)]))!=null?_0x28205e:[],_0x122f88=JSON[_0x1ec075(0xcf)](_0x487b95),_0x4f5e50=(await this[_0x1ec075(0xa0)][_0x1ec075(0x9d)](_0x3e28d7))['getMemberID']();if(_0x1886c5){const _0x534844={'memberId':_0x4f5e50,'unitId':_0x3e28d7,'content':_0x122f88,'mention':_0x2172a1,'threadId':_0x1eb36c},_0x4d9b53=(await this[_0x1ec075(0x8b)][_0x1ec075(0xb0)](_0x1ec075(0xe1)+_0x3e28d7+'/reply',{'body':_0x534844}))[_0x1ec075(0xcd)][_0x1ec075(0xb3)];return{..._0x64865a,'id':_0x4d9b53['replyId'],'dT':_0x3b7c2(+_0x4d9b53[_0x1ec075(0xbe)])[_0x1ec075(0xc1)](_0x1ec075(0xa3)),'personId':_0x4d9b53[_0x1ec075(0x8a)]};}else{const _0xd499b5={'memberId':_0x4f5e50,'unitId':_0x3e28d7,'content':_0x122f88,'mention':_0x2172a1},_0x14b436=await this[_0x1ec075(0x8b)][_0x1ec075(0xb0)](_0x1ec075(0xe1)+_0x3e28d7+'/add',{'body':_0xd499b5});return X(_0x14b436[_0x1ec075(0xcd)]['comment'],_0x64865a);}}async[_0x3d0222(0xbb)](_0x3720e5){const _0x5cd947=_0x3d0222;var _0x5ba954,_0x12fadd;const {text:_0xda9522,unitId:_0x45e44b}=_0x3720e5,_0xdc3f54=(_0x12fadd=(_0x5ba954=_0xda9522[_0x5cd947(0xc2)])==null?void 0x0:_0x5ba954[_0x5cd947(0xa1)](_0x80135c=>_0x80135c[_0x5cd947(0xae)]===_0xfc942['COMMENT'])[_0x5cd947(0x84)](_0x4b7208=>_0x4b7208[_0x5cd947(0xb6)]))!=null?_0x12fadd:[],_0x107725=JSON['stringify'](_0xda9522),_0x4a8eda=_0x3720e5[_0x5cd947(0x99)],_0x2f3a87=_0x3720e5['id'],_0xc1a49f={'memberId':(await this[_0x5cd947(0xa0)][_0x5cd947(0x9d)](_0x45e44b))[_0x5cd947(0xa6)](),'unitId':_0x45e44b,'threadId':_0x4a8eda,'mention':_0xdc3f54,'content':_0x107725,'replyId':_0x2f3a87},_0x2c39ee=await this[_0x5cd947(0x8b)][_0x5cd947(0xb0)](_0x5cd947(0xe1)+_0x45e44b+_0x5cd947(0x94),{'body':_0xc1a49f});return!_0x2c39ee['body']['error']||_0x2c39ee['body'][_0x5cd947(0xb8)][_0x5cd947(0xa5)]===0x1;}async['resolveComment'](_0x568d2f){const _0x144fd3=_0x3d0222,{unitId:_0x50b417}=_0x568d2f,_0x484fac=_0x568d2f[_0x144fd3(0x99)],_0x3d5fe8={'memberId':this[_0x144fd3(0x82)][_0x144fd3(0x81)]()[_0x144fd3(0xa9)],'unitId':_0x50b417,'threadId':_0x484fac,'solved':_0x568d2f[_0x144fd3(0xe4)]?I[_0x144fd3(0xd2)]:I[_0x144fd3(0x80)]},_0x3755e9=await this[_0x144fd3(0x8b)]['post'](_0x144fd3(0xe1)+_0x50b417+_0x144fd3(0x85),{'body':_0x3d5fe8});return!_0x3755e9[_0x144fd3(0xcd)]['error']||_0x3755e9[_0x144fd3(0xcd)]['error'][_0x144fd3(0xa5)]===0x1;}async[_0x3d0222(0xd1)](_0x4868f4,_0x5b36a4,_0x3d16b6,_0x1a19ad){const _0x3f5155=_0x3d0222,_0x41bea9={'memberId':(await this[_0x3f5155(0xa0)][_0x3f5155(0x9d)](_0x4868f4))['getMemberID'](),'threadId':_0x3d16b6,'replyId':_0x1a19ad,'unitId':_0x4868f4},_0x266303=await this['_httpService'][_0x3f5155(0xb0)](_0x3f5155(0xe1)+_0x4868f4+_0x3f5155(0x93),{'body':_0x41bea9});return!_0x266303[_0x3f5155(0xcd)][_0x3f5155(0xb8)]||_0x266303[_0x3f5155(0xcd)]['error'][_0x3f5155(0xa5)]===0x1;}async[_0x3d0222(0xb7)](_0x1c6340,_0x5b9171,_0xff73d9){const _0x3627ba=_0x3d0222,_0x4462cd={'unitId':_0x1c6340,'threadId':_0xff73d9},_0x2d2a71=await this[_0x3627ba(0x8b)][_0x3627ba(0xb0)]('/universer-api/comment/unit/'+_0x1c6340+_0x3627ba(0xce),{'body':_0x4462cd}),_0x31c03a=_0xff73d9[_0x3627ba(0x84)](_0x301d85=>ee(_0x2d2a71['body'][_0x3627ba(0xc9)][_0x301d85],_0x1c6340,_0x5b9171))[_0x3627ba(0xa1)](Boolean);return Object[_0x3627ba(0xd8)](_0x2d2a71['body'][_0x3627ba(0x88)])[_0x3627ba(0xca)](_0x2fe9aa=>{const _0x449b1a=_0x3627ba;this[_0x449b1a(0x82)][_0x449b1a(0xa2)](_0x2fe9aa);}),_0x31c03a;}[_0x3d0222(0xbd)](_0x3cecfc){const _0x49bf80=_0x3d0222;return{'id':_0x3cecfc['id'],'threadId':_0x3cecfc[_0x49bf80(0x99)],'ref':_0x3cecfc['ref']};}};f=Q([_(0x0,_0xb50de1(_0x40ab69)),_(0x1,_0xb50de1(_0x312b2f)),_(0x2,_0xb50de1(_0x331714)),_(0x3,_0xb50de1(_0xc1b344))],f);var re=Object[_0x3d0222(0xcc)],te=(_0x340c9,_0x4aa2ee,_0x49b161,_0x593a88)=>{const _0x50c0d1=_0x3d0222;for(var _0x420459=_0x593a88>0x1?void 0x0:_0x593a88?re(_0x4aa2ee,_0x49b161):_0x4aa2ee,_0x36a67d=_0x340c9[_0x50c0d1(0xe5)]-0x1,_0x1c4c42;_0x36a67d>=0x0;_0x36a67d--)(_0x1c4c42=_0x340c9[_0x36a67d])&&(_0x420459=_0x1c4c42(_0x420459)||_0x420459);return _0x420459;},N=(_0x32d9c6,_0x4bf623)=>(_0x5c2141,_0x2980b2)=>_0x4bf623(_0x5c2141,_0x2980b2,_0x32d9c6);let g=class extends _0x4314bc{constructor(_0x418de9,_0x32c23f){super(),this['_threadCommentDataSourceService']=_0x418de9,this['_threadCommentDataSource']=_0x32c23f,this['_initDataSource']();}[_0x3d0222(0xe0)](){const _0x2e3614=_0x3d0222;this[_0x2e3614(0xa8)][_0x2e3614(0x87)]=this[_0x2e3614(0xbc)],this[_0x2e3614(0xa8)][_0x2e3614(0x98)]=!0x1;}};function _0x1ae7(){const _0x52b082=['_userService','586dvCcgf','map','/solved','UNRECOGNIZED','dataSource','users','180aqdHGH','userId','_httpService','replyId','addComment','commentUpdate$','Add','395FstyHN','_configService','Edit','/delete','/edit','937000hkGEtP','find','_initUserSync','syncUpdateMutationToColla','threadId','Delete','5212OtbjqO','root','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','unitId','_sessionService','filter','addUser','YYYY/MM/DD\x20HH:mm','payload','code','getMemberID','content','_threadCommentDataSourceService','userID','type','replies','_init','Unknown','rangeType','thread-comment-data-source.config','post','7yFdsnJ','defineProperty','reply','parse','Reply','rangeId','listComments','error','_injector','Solve','updateComment','_threadCommentDataSource','saveCommentToSnapshot','createTimestamp','delete','getUnit','format','customRanges','1572OeylcM','UNIVER_UNKNOWN','12245936PqSczY','getComment','COMMENT','3590tHWYWd','comments','forEach','48390MLxJFA','getOwnPropertyDescriptor','body','/list','stringify','get','deleteComment','Solved','slice','onReady','4906ZPVrYh','3260972WvBiQu','_config','values','_threadCommentModel','add','pipe','personId','9QSphko','_commentService','user','_initDataSource','/universer-api/comment/unit/','symbol','disposeWithMe','resolved','length','resolveComment','solved','/universer-api/user/list','OpenOrReOpen','getCurrentUser'];_0x1ae7=function(){return _0x52b082;};return _0x1ae7();}g=te([N(0x0,_0x43c8d5),N(0x1,_0xb50de1(f))],g);var se=Object[_0x3d0222(0xb2)],oe=Object[_0x3d0222(0xcc)],ne=(_0x5e632d,_0x4d7829,_0xd5531a)=>_0x4d7829 in _0x5e632d?se(_0x5e632d,_0x4d7829,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd5531a}):_0x5e632d[_0x4d7829]=_0xd5531a,ie=(_0x55f43e,_0x24a442,_0x4c5758,_0x262485)=>{const _0x58e45f=_0x3d0222;for(var _0x2d7c02=_0x262485>0x1?void 0x0:_0x262485?oe(_0x24a442,_0x4c5758):_0x24a442,_0x48c0b4=_0x55f43e[_0x58e45f(0xe5)]-0x1,_0x43c453;_0x48c0b4>=0x0;_0x48c0b4--)(_0x43c453=_0x55f43e[_0x48c0b4])&&(_0x2d7c02=_0x43c453(_0x2d7c02)||_0x2d7c02);return _0x2d7c02;},w=(_0x6073e9,_0x595dcb)=>(_0x5e5eee,_0x528be8)=>_0x595dcb(_0x5e5eee,_0x528be8,_0x6073e9),$=(_0x3c32e1,_0x54998a,_0x3c99c7)=>ne(_0x3c32e1,typeof _0x54998a!=_0x3d0222(0xe2)?_0x54998a+'':_0x54998a,_0x3c99c7);let b=class extends _0x33f723{constructor(_0x78f431=M,_0xc87333,_0x2c062f){const _0x3c091b=_0x3d0222;super(),this[_0x3c091b(0xd7)]=_0x78f431,this[_0x3c091b(0xb9)]=_0xc87333,this['_configService']=_0x2c062f;const {..._0x582984}=_0x351827({},M,this[_0x3c091b(0xd7)]);this[_0x3c091b(0x91)]['setConfig'](z,_0x582984);}['onStarting'](){const _0x5d99fb=_0x3d0222;[[f],[g],[S]][_0x5d99fb(0xca)](_0x256598=>{const _0x3fd4c6=_0x5d99fb;this[_0x3fd4c6(0xb9)][_0x3fd4c6(0xda)](_0x256598);});}[_0x3d0222(0xd4)](){const _0x5aa9b8=_0x3d0222;this[_0x5aa9b8(0xb9)]['get'](g),this['_injector'][_0x5aa9b8(0xd0)](S);}};$(b,'pluginName',W),$(b,_0x3d0222(0xaa),_0x3f182b[_0x3d0222(0xc4)]),b=ie([_0x19c23a(_0x554dd4,_0x1d664a,_0xd9538b),w(0x1,_0xb50de1(_0xc1b344)),w(0x2,_0x4283b9)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x597f96=_0x5f55;(function(_0x299bf7,_0x2b77b8){const _0x5b4259=_0x5f55,_0x21cc96=_0x299bf7();while(!![]){try{const _0x397444=parseInt(_0x5b4259(0x172))/0x1*(parseInt(_0x5b4259(0x16f))/0x2)+parseInt(_0x5b4259(0x194))/0x3*(-parseInt(_0x5b4259(0x17c))/0x4)+-parseInt(_0x5b4259(0x164))/0x5+parseInt(_0x5b4259(0x14b))/0x6*(parseInt(_0x5b4259(0x15b))/0x7)+-parseInt(_0x5b4259(0x16c))/0x8*(parseInt(_0x5b4259(0x16d))/0x9)+parseInt(_0x5b4259(0x186))/0xa*(parseInt(_0x5b4259(0x184))/0xb)+parseInt(_0x5b4259(0x19e))/0xc;if(_0x397444===_0x2b77b8)break;else _0x21cc96['push'](_0x21cc96['shift']());}catch(_0x418b09){_0x21cc96['push'](_0x21cc96['shift']());}}}(_0x35bf,0x23011));import{CommentService as _0x870a6e,CollaborationSessionService as _0x32baf8,UniverCollaborationClientPlugin as _0x53a35a}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5b5c78}from'@univerjs-pro/license';import{dayjs as _0x3a4c00,UserManagerService as _0x5eb8f1,Inject as _0x3319bd,Injector as _0x2a9806,Disposable as _0x4b16b4,CustomRangeType as _0xc9d637,UniverInstanceType as _0x2a8601,DependentOn as _0x32eefa,IConfigService as _0x2dc9fb,Plugin as _0x2469e2,merge as _0x4f5a3a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1d2348}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xa098e9,IThreadCommentDataSourceService as _0x524bce}from'@univerjs/thread-comment';import{bufferTime as _0x55f664}from'rxjs';import{HTTPService as _0xeee792}from'@univerjs/network';function _0x35bf(){const _0x340636=['map','createTimestamp','_commentService','add','forEach','content','926710TcxCXI','user','getComment','_sessionService','get','/solved','post','code','48376uaZsJd','9EVZyoq','slice','183970KYbNiI','size','_userService','1PmjoYO','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/reply','COMMENT','delete','deleteComment','/list','stringify','customRanges','root','4aNwqoT','OpenOrReOpen','_config','comment','personId','error','getUnit','Reply','96613aFNbfN','Solve','20zmhijx','thread-comment-data-source.config','users','_threadCommentDataSource','parse','defineProperty','_initDataSource','addUser','userId','/universer-api/comment/unit/','disposeWithMe','type','/add','rangeId','127989fZcHHY','filter','listComments','format','_injector','_configService','Add','pipe','solved','replies','2375436jNmUbt','parentId','Delete','Edit','resolveComment','getMemberID','threadId','length','/delete','Unknown','userID','subscribe','_httpService','commentUpdate$','/edit','419550sMPSZJ','requireSession','resolved','UNRECOGNIZED','replyId','saveCommentToSnapshot','_threadCommentDataSourceService','body','_init','YYYY/MM/DD\x20HH:mm','setConfig','_threadCommentModel','symbol','Solved','values','getOwnPropertyDescriptor','7wjJgVf','unitId','_initUserSync'];_0x35bf=function(){return _0x340636;};return _0x35bf();}const W=_0x597f96(0x173);function _0x5f55(_0x4e0e0a,_0x7c0f12){const _0x35bfd2=_0x35bf();return _0x5f55=function(_0x5f554e,_0x4591eb){_0x5f554e=_0x5f554e-0x148;let _0x27154a=_0x35bfd2[_0x5f554e];return _0x27154a;},_0x5f55(_0x4e0e0a,_0x7c0f12);}var I=(_0xb883fe=>(_0xb883fe[_0xb883fe[_0x597f96(0x17d)]=0x0]=_0x597f96(0x17d),_0xb883fe[_0xb883fe[_0x597f96(0x158)]=0x1]=_0x597f96(0x158),_0xb883fe[_0xb883fe[_0x597f96(0x14e)]=-0x1]=_0x597f96(0x14e),_0xb883fe))(I||{}),v=(_0x1e09c6=>(_0x1e09c6[_0x1e09c6[_0x597f96(0x1a7)]=0x0]=_0x597f96(0x1a7),_0x1e09c6[_0x1e09c6[_0x597f96(0x19a)]=0x1]=_0x597f96(0x19a),_0x1e09c6[_0x1e09c6[_0x597f96(0x183)]=0x2]=_0x597f96(0x183),_0x1e09c6[_0x1e09c6[_0x597f96(0x1a1)]=0x3]=_0x597f96(0x1a1),_0x1e09c6[_0x1e09c6[_0x597f96(0x1a0)]=0x4]=_0x597f96(0x1a0),_0x1e09c6[_0x1e09c6['Solve']=0x5]=_0x597f96(0x185),_0x1e09c6[_0x1e09c6[_0x597f96(0x14e)]=-0x1]=_0x597f96(0x14e),_0x1e09c6))(v||{});const D=_0x3591a0=>_0x3a4c00(new Date(+_0x3591a0))[_0x597f96(0x197)](_0x597f96(0x154)),B=async(_0x42e457,_0x30674a)=>{const _0x473a52=_0x597f96,_0x5869a7=_0x42e457[_0x473a52(0x168)](_0x5eb8f1),_0x26300c=_0x42e457['get'](_0xeee792);_0x30674a[_0x473a52(0x162)](_0x5caa43=>{const _0x3829c8=_0x473a52;_0x5869a7['getUser'](_0x5caa43)&&_0x30674a[_0x3829c8(0x176)](_0x5caa43);}),_0x30674a[_0x473a52(0x170)]&&(await _0x26300c['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x30674a]}}))[_0x473a52(0x152)][_0x473a52(0x188)][_0x473a52(0x162)](_0x32b78c=>{const _0xc10422=_0x473a52;_0x32b78c&&_0x5869a7[_0xc10422(0x18d)](_0x32b78c);});};var K=Object[_0x597f96(0x15a)],V=(_0x285199,_0x568b53,_0x17f0ff,_0x62f402)=>{const _0x2f26d5=_0x597f96;for(var _0xd2c762=_0x62f402>0x1?void 0x0:_0x62f402?K(_0x568b53,_0x17f0ff):_0x568b53,_0x1e654d=_0x285199[_0x2f26d5(0x1a5)]-0x1,_0x4d2e64;_0x1e654d>=0x0;_0x1e654d--)(_0x4d2e64=_0x285199[_0x1e654d])&&(_0xd2c762=_0x4d2e64(_0xd2c762)||_0xd2c762);return _0xd2c762;},p=(_0x31ed3b,_0x137a6c)=>(_0x22ef5c,_0x58feb4)=>_0x137a6c(_0x22ef5c,_0x58feb4,_0x31ed3b);let S=class extends _0x4b16b4{constructor(_0x43c20b,_0xf30329,_0x6c99d3,_0x56d514){const _0x40841b=_0x597f96;super(),this[_0x40841b(0x160)]=_0x43c20b,this[_0x40841b(0x156)]=_0xf30329,this[_0x40841b(0x171)]=_0x6c99d3,this['_injector']=_0x56d514,this[_0x40841b(0x153)](),this[_0x40841b(0x15d)]();}[_0x597f96(0x15d)](){const _0xa79a10=_0x597f96;this[_0xa79a10(0x190)](this['_threadCommentModel']['commentUpdate$'][_0xa79a10(0x19b)](_0x55f664(0x10))[_0xa79a10(0x1a9)](_0x2f0b64=>{const _0x55dd1d=_0xa79a10,_0x10ddd1=new Set();_0x2f0b64['forEach'](_0x110dcf=>{const _0x3ac234=_0x5f55;switch(_0x110dcf[_0x3ac234(0x191)]){case'add':{const _0x499f8a=_0x110dcf['payload'][_0x3ac234(0x180)];_0x10ddd1[_0x3ac234(0x161)](_0x499f8a);break;}}}),B(this[_0x55dd1d(0x198)],_0x10ddd1);}));}[_0x597f96(0x153)](){const _0x3d182b=_0x597f96;this[_0x3d182b(0x190)](this[_0x3d182b(0x160)][_0x3d182b(0x149)][_0x3d182b(0x1a9)](async _0x16063c=>{const _0x144ffe=_0x3d182b;var _0x3ce913,_0x414d9f,_0x517bbb,_0x4c2310;const _0x127d08=(_0x3ce913=this['_threadCommentModel'][_0x144ffe(0x182)](_0x16063c['unitId'])['find'](_0x70efa8=>_0x70efa8['threadId']===_0x16063c['threadId']))==null?void 0x0:_0x3ce913['root'];if(!_0x127d08)return;const {unitId:_0x38dcef,subUnitId:_0x4519bc}=_0x127d08;switch(_0x16063c[_0x144ffe(0x165)]&&this['_userService'][_0x144ffe(0x18d)](_0x16063c[_0x144ffe(0x165)]),_0x16063c['type']){case v[_0x144ffe(0x19a)]:break;case v[_0x144ffe(0x183)]:{this[_0x144ffe(0x156)]['addComment'](_0x38dcef,_0x4519bc,{'unitId':_0x38dcef,'subUnitId':_0x4519bc,'ref':'','id':_0x16063c[_0x144ffe(0x14f)],'dT':D(+_0x16063c[_0x144ffe(0x15f)]),'threadId':_0x16063c['threadId'],'personId':(_0x517bbb=(_0x414d9f=_0x16063c['user'])==null?void 0x0:_0x414d9f[_0x144ffe(0x1a8)])!=null?_0x517bbb:_0x16063c[_0x144ffe(0x18e)],'text':JSON[_0x144ffe(0x18a)](_0x16063c[_0x144ffe(0x163)]),'parentId':_0x127d08['id']});break;}case v['Delete']:{const _0x3c14f8=this[_0x144ffe(0x156)][_0x144ffe(0x166)](_0x38dcef,_0x4519bc,_0x16063c[_0x144ffe(0x14f)]);_0x3c14f8&&_0x3c14f8[_0x144ffe(0x19f)]&&this['_threadCommentModel'][_0x144ffe(0x177)](_0x38dcef,_0x4519bc,_0x16063c[_0x144ffe(0x14f)]);break;}case v['Edit']:{this['_threadCommentModel']['updateComment'](_0x38dcef,_0x4519bc,{'commentId':_0x16063c['replyId'],'text':JSON['parse'](_0x16063c[_0x144ffe(0x163)])});break;}case v[_0x144ffe(0x185)]:{const _0x46e105=(_0x4c2310=this['_threadCommentModel'][_0x144ffe(0x182)](_0x16063c[_0x144ffe(0x15c)])['find'](_0x140f7e=>_0x140f7e[_0x144ffe(0x1a4)]===_0x16063c['threadId']))==null?void 0x0:_0x4c2310[_0x144ffe(0x17b)];_0x46e105&&this[_0x144ffe(0x156)]['resolveComment'](_0x38dcef,_0x4519bc,_0x46e105['id'],_0x16063c[_0x144ffe(0x19c)]===I[_0x144ffe(0x158)]);break;}}}));}};S=V([p(0x0,_0x3319bd(_0x870a6e)),p(0x1,_0x3319bd(_0xa098e9)),p(0x2,_0x3319bd(_0x5eb8f1)),p(0x3,_0x3319bd(_0x2a9806))],S);const z=_0x597f96(0x187),M={};var k=Object[_0x597f96(0x15a)],Q=(_0x10532d,_0x59c67e,_0x9c1fe6,_0x543e0b)=>{const _0x2a5bb0=_0x597f96;for(var _0x582c49=_0x543e0b>0x1?void 0x0:_0x543e0b?k(_0x59c67e,_0x9c1fe6):_0x59c67e,_0x52b088=_0x10532d[_0x2a5bb0(0x1a5)]-0x1,_0x558edf;_0x52b088>=0x0;_0x52b088--)(_0x558edf=_0x10532d[_0x52b088])&&(_0x582c49=_0x558edf(_0x582c49)||_0x582c49);return _0x582c49;},_=(_0xde9a76,_0x300404)=>(_0x2f5898,_0x226a7d)=>_0x300404(_0x2f5898,_0x226a7d,_0xde9a76);function X(_0xe3fd93,_0x5f0ac8){const _0x3a4758=_0x597f96,_0x212ad5=_0xe3fd93[_0x3a4758(0x19d)][0x0];return{..._0x5f0ac8,'id':_0x212ad5[_0x3a4758(0x14f)],'resolved':_0xe3fd93[_0x3a4758(0x19c)]===0x1,'dT':D(_0x212ad5[_0x3a4758(0x15f)]),'personId':_0x212ad5['userId'],'threadId':_0x212ad5['threadId']};}function ee(_0x18d791,_0x44d536,_0x55dc40){const _0x3aea06=_0x597f96;var _0x231397,_0x1c43da;if(((_0x1c43da=(_0x231397=_0x18d791==null?void 0x0:_0x18d791[_0x3aea06(0x19d)])==null?void 0x0:_0x231397[_0x3aea06(0x1a5)])!=null?_0x1c43da:0x0)>0x0){const _0x2d5661=(_0x4a6db1,_0xb98591)=>({'id':_0x4a6db1[_0x3aea06(0x14f)],'threadId':_0x4a6db1[_0x3aea06(0x1a4)],'dT':D(_0x4a6db1[_0x3aea06(0x15f)]),'personId':_0x4a6db1[_0x3aea06(0x18e)],'resolved':_0x18d791[_0x3aea06(0x19c)]===I[_0x3aea06(0x158)],'unitId':_0x44d536,'subUnitId':_0x55dc40,'text':JSON[_0x3aea06(0x18a)](_0x4a6db1[_0x3aea06(0x163)]),'parentId':_0xb98591}),_0x206aa8=_0x2d5661(_0x18d791[_0x3aea06(0x19d)][0x0]);return{..._0x206aa8,'children':_0x18d791[_0x3aea06(0x19d)][_0x3aea06(0x16e)](0x1)[_0x3aea06(0x15e)](_0x44bdf9=>_0x2d5661(_0x44bdf9,_0x206aa8['id']))};}return null;}let f=class{constructor(_0x30794d,_0x280658,_0x194daa,_0x463807){const _0x338733=_0x597f96;this[_0x338733(0x148)]=_0x30794d,this[_0x338733(0x171)]=_0x280658,this[_0x338733(0x167)]=_0x194daa,this['_injector']=_0x463807;}async['addComment'](_0x5d8f4d){const _0x2ac765=_0x597f96;var _0x3219c4,_0x3bdaca;const {parentId:_0x25d9dd,unitId:_0x5dcb58,text:_0x217d9b,threadId:_0x6f770b}=_0x5d8f4d,_0x2a4e4c=(_0x3bdaca=(_0x3219c4=_0x217d9b['customRanges'])==null?void 0x0:_0x3219c4[_0x2ac765(0x195)](_0x2872c9=>_0x2872c9['rangeType']===_0xc9d637[_0x2ac765(0x175)])[_0x2ac765(0x15e)](_0x427f35=>_0x427f35[_0x2ac765(0x193)]))!=null?_0x3bdaca:[],_0x11c187=JSON[_0x2ac765(0x179)](_0x217d9b),_0x6d173d=(await this[_0x2ac765(0x167)]['requireSession'](_0x5dcb58))[_0x2ac765(0x1a3)]();if(_0x25d9dd){const _0x4fb426={'memberId':_0x6d173d,'unitId':_0x5dcb58,'content':_0x11c187,'mention':_0x2a4e4c,'threadId':_0x6f770b},_0x4c0835=(await this[_0x2ac765(0x148)][_0x2ac765(0x16a)](_0x2ac765(0x18f)+_0x5dcb58+_0x2ac765(0x174),{'body':_0x4fb426}))['body']['reply'];return{..._0x5d8f4d,'id':_0x4c0835['replyId'],'dT':_0x3a4c00(+_0x4c0835[_0x2ac765(0x15f)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x4c0835[_0x2ac765(0x18e)]};}else{const _0x22181d={'memberId':_0x6d173d,'unitId':_0x5dcb58,'content':_0x11c187,'mention':_0x2a4e4c},_0xd465d5=await this[_0x2ac765(0x148)]['post'](_0x2ac765(0x18f)+_0x5dcb58+_0x2ac765(0x192),{'body':_0x22181d});return X(_0xd465d5['body'][_0x2ac765(0x17f)],_0x5d8f4d);}}async['updateComment'](_0x286a9b){const _0x420817=_0x597f96;var _0x34c9a7,_0x4b3f4e;const {text:_0x3a8bc7,unitId:_0x4aeadd}=_0x286a9b,_0x107907=(_0x4b3f4e=(_0x34c9a7=_0x3a8bc7[_0x420817(0x17a)])==null?void 0x0:_0x34c9a7['filter'](_0x21e0d0=>_0x21e0d0['rangeType']===_0xc9d637[_0x420817(0x175)])[_0x420817(0x15e)](_0x2f6d3a=>_0x2f6d3a[_0x420817(0x193)]))!=null?_0x4b3f4e:[],_0x517a57=JSON[_0x420817(0x179)](_0x3a8bc7),_0x12241f=_0x286a9b[_0x420817(0x1a4)],_0x3d6cb6=_0x286a9b['id'],_0x43f11f={'memberId':(await this[_0x420817(0x167)][_0x420817(0x14c)](_0x4aeadd))['getMemberID'](),'unitId':_0x4aeadd,'threadId':_0x12241f,'mention':_0x107907,'content':_0x517a57,'replyId':_0x3d6cb6},_0x10ae1d=await this[_0x420817(0x148)][_0x420817(0x16a)]('/universer-api/comment/unit/'+_0x4aeadd+_0x420817(0x14a),{'body':_0x43f11f});return!_0x10ae1d[_0x420817(0x152)]['error']||_0x10ae1d[_0x420817(0x152)][_0x420817(0x181)][_0x420817(0x16b)]===0x1;}async[_0x597f96(0x1a2)](_0x2cf37d){const _0x384a16=_0x597f96,{unitId:_0x483f2a}=_0x2cf37d,_0x10e469=_0x2cf37d[_0x384a16(0x1a4)],_0xec4560={'memberId':this[_0x384a16(0x171)]['getCurrentUser']()[_0x384a16(0x1a8)],'unitId':_0x483f2a,'threadId':_0x10e469,'solved':_0x2cf37d[_0x384a16(0x14d)]?I[_0x384a16(0x158)]:I[_0x384a16(0x17d)]},_0x4a6017=await this[_0x384a16(0x148)][_0x384a16(0x16a)](_0x384a16(0x18f)+_0x483f2a+_0x384a16(0x169),{'body':_0xec4560});return!_0x4a6017['body'][_0x384a16(0x181)]||_0x4a6017[_0x384a16(0x152)][_0x384a16(0x181)][_0x384a16(0x16b)]===0x1;}async['deleteComment'](_0x1fe00d,_0x33f6dd,_0x4f2c4c,_0x259f47){const _0x1536bb=_0x597f96,_0x2b3e31={'memberId':(await this['_sessionService']['requireSession'](_0x1fe00d))[_0x1536bb(0x1a3)](),'threadId':_0x4f2c4c,'replyId':_0x259f47,'unitId':_0x1fe00d},_0xbabc2=await this['_httpService'][_0x1536bb(0x16a)](_0x1536bb(0x18f)+_0x1fe00d+_0x1536bb(0x1a6),{'body':_0x2b3e31});return!_0xbabc2[_0x1536bb(0x152)][_0x1536bb(0x181)]||_0xbabc2[_0x1536bb(0x152)][_0x1536bb(0x181)][_0x1536bb(0x16b)]===0x1;}async[_0x597f96(0x196)](_0xa08590,_0x532cfe,_0x24b1c2){const _0x40a35f=_0x597f96,_0x4178d1={'unitId':_0xa08590,'threadId':_0x24b1c2},_0x261a59=await this['_httpService'][_0x40a35f(0x16a)](_0x40a35f(0x18f)+_0xa08590+_0x40a35f(0x178),{'body':_0x4178d1}),_0xe09690=_0x24b1c2[_0x40a35f(0x15e)](_0x54aeec=>ee(_0x261a59['body']['comments'][_0x54aeec],_0xa08590,_0x532cfe))[_0x40a35f(0x195)](Boolean);return Object[_0x40a35f(0x159)](_0x261a59[_0x40a35f(0x152)]['users'])['forEach'](_0xbfb615=>{const _0xc31d2d=_0x40a35f;this[_0xc31d2d(0x171)]['addUser'](_0xbfb615);}),_0xe09690;}[_0x597f96(0x150)](_0x70e505){const _0x1ef39f=_0x597f96;return{'id':_0x70e505['id'],'threadId':_0x70e505[_0x1ef39f(0x1a4)],'ref':_0x70e505['ref']};}};f=Q([_(0x0,_0x3319bd(_0xeee792)),_(0x1,_0x3319bd(_0x5eb8f1)),_(0x2,_0x3319bd(_0x32baf8)),_(0x3,_0x3319bd(_0x2a9806))],f);var re=Object[_0x597f96(0x15a)],te=(_0xda6ae8,_0xafc026,_0x6084be,_0x25b53e)=>{for(var _0x5a10cc=_0x25b53e>0x1?void 0x0:_0x25b53e?re(_0xafc026,_0x6084be):_0xafc026,_0xd1af38=_0xda6ae8['length']-0x1,_0x34b42d;_0xd1af38>=0x0;_0xd1af38--)(_0x34b42d=_0xda6ae8[_0xd1af38])&&(_0x5a10cc=_0x34b42d(_0x5a10cc)||_0x5a10cc);return _0x5a10cc;},N=(_0xaf04b8,_0x46ef6f)=>(_0x575db9,_0x160f09)=>_0x46ef6f(_0x575db9,_0x160f09,_0xaf04b8);let g=class extends _0x4b16b4{constructor(_0x696a20,_0x217382){const _0x55f272=_0x597f96;super(),this[_0x55f272(0x151)]=_0x696a20,this[_0x55f272(0x189)]=_0x217382,this[_0x55f272(0x18c)]();}[_0x597f96(0x18c)](){const _0x416c56=_0x597f96;this['_threadCommentDataSourceService']['dataSource']=this[_0x416c56(0x189)],this[_0x416c56(0x151)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x524bce),N(0x1,_0x3319bd(f))],g);var se=Object[_0x597f96(0x18b)],oe=Object[_0x597f96(0x15a)],ne=(_0x5a1a53,_0x2d9d4e,_0x2d07ec)=>_0x2d9d4e in _0x5a1a53?se(_0x5a1a53,_0x2d9d4e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2d07ec}):_0x5a1a53[_0x2d9d4e]=_0x2d07ec,ie=(_0x2ac3d0,_0x5935b3,_0x12851b,_0x1f4f36)=>{const _0x301a83=_0x597f96;for(var _0x3d8a92=_0x1f4f36>0x1?void 0x0:_0x1f4f36?oe(_0x5935b3,_0x12851b):_0x5935b3,_0x5b01e5=_0x2ac3d0[_0x301a83(0x1a5)]-0x1,_0x417de6;_0x5b01e5>=0x0;_0x5b01e5--)(_0x417de6=_0x2ac3d0[_0x5b01e5])&&(_0x3d8a92=_0x417de6(_0x3d8a92)||_0x3d8a92);return _0x3d8a92;},w=(_0x5f34b8,_0x2d1046)=>(_0x121a8e,_0x14767b)=>_0x2d1046(_0x121a8e,_0x14767b,_0x5f34b8),$=(_0x17e997,_0xd52f66,_0x17d923)=>ne(_0x17e997,typeof _0xd52f66!=_0x597f96(0x157)?_0xd52f66+'':_0xd52f66,_0x17d923);let b=class extends _0x2469e2{constructor(_0x5dd388=M,_0x32acef,_0xe35147){const _0xdb3830=_0x597f96;super(),this[_0xdb3830(0x17e)]=_0x5dd388,this['_injector']=_0x32acef,this[_0xdb3830(0x199)]=_0xe35147;const {..._0x3bc1f7}=_0x4f5a3a({},M,this[_0xdb3830(0x17e)]);this[_0xdb3830(0x199)][_0xdb3830(0x155)](z,_0x3bc1f7);}['onStarting'](){const _0xe0f8c=_0x597f96;[[f],[g],[S]][_0xe0f8c(0x162)](_0x35634b=>{const _0x522e91=_0xe0f8c;this['_injector'][_0x522e91(0x161)](_0x35634b);});}['onReady'](){const _0x43d2ea=_0x597f96;this[_0x43d2ea(0x198)]['get'](g),this[_0x43d2ea(0x198)][_0x43d2ea(0x168)](S);}};$(b,'pluginName',W),$(b,_0x597f96(0x191),_0x2a8601['UNIVER_UNKNOWN']),b=ie([_0x32eefa(_0x1d2348,_0x53a35a,_0x5b5c78),w(0x1,_0x3319bd(_0x2a9806)),w(0x2,_0x2dc9fb)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3d0222=_0x215d;(function(_0x3140fd,_0x3103e7){const _0xd8b334=_0x215d,_0x27c435=_0x3140fd();while(!![]){try{const _0xb05e11=parseInt(_0xd8b334(0x83))/0x1*(-parseInt(_0xd8b334(0xc8))/0x2)+parseInt(_0xd8b334(0xc3))/0x3*(-parseInt(_0xd8b334(0x9b))/0x4)+parseInt(_0xd8b334(0x90))/0x5*(parseInt(_0xd8b334(0xcb))/0x6)+-parseInt(_0xd8b334(0xb1))/0x7*(-parseInt(_0xd8b334(0xc5))/0x8)+-parseInt(_0xd8b334(0xdd))/0x9*(-parseInt(_0xd8b334(0x95))/0xa)+parseInt(_0xd8b334(0xd5))/0xb*(-parseInt(_0xd8b334(0x89))/0xc)+parseInt(_0xd8b334(0xd6))/0xd;if(_0xb05e11===_0x3103e7)break;else _0x27c435['push'](_0x27c435['shift']());}catch(_0x1c113e){_0x27c435['push'](_0x27c435['shift']());}}}(_0x1ae7,0xbc411));import{CommentService as _0x2eedbc,CollaborationSessionService as _0x331714,UniverCollaborationClientPlugin as _0x1d664a}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xd9538b}from'@univerjs-pro/license';import{dayjs as _0x3b7c2,UserManagerService as _0x312b2f,Inject as _0xb50de1,Injector as _0xc1b344,Disposable as _0x4314bc,CustomRangeType as _0xfc942,UniverInstanceType as _0x3f182b,DependentOn as _0x19c23a,IConfigService as _0x4283b9,Plugin as _0x33f723,merge as _0x351827}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x554dd4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x20227f,IThreadCommentDataSourceService as _0x43c8d5}from'@univerjs/thread-comment';function _0x215d(_0x3539ee,_0x25e01d){const _0x1ae716=_0x1ae7();return _0x215d=function(_0x215db4,_0x555a45){_0x215db4=_0x215db4-0x80;let _0x3eb85c=_0x1ae716[_0x215db4];return _0x3eb85c;},_0x215d(_0x3539ee,_0x25e01d);}import{bufferTime as _0x45eeee}from'rxjs';import{HTTPService as _0x40ab69}from'@univerjs/network';const W=_0x3d0222(0x9e);var I=(_0x4af38=>(_0x4af38[_0x4af38['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x4af38[_0x4af38[_0x3d0222(0xd2)]=0x1]=_0x3d0222(0xd2),_0x4af38[_0x4af38[_0x3d0222(0x86)]=-0x1]=_0x3d0222(0x86),_0x4af38))(I||{}),v=(_0x16435d=>(_0x16435d[_0x16435d[_0x3d0222(0xad)]=0x0]=_0x3d0222(0xad),_0x16435d[_0x16435d[_0x3d0222(0x8f)]=0x1]='Add',_0x16435d[_0x16435d[_0x3d0222(0xb5)]=0x2]=_0x3d0222(0xb5),_0x16435d[_0x16435d['Edit']=0x3]=_0x3d0222(0x92),_0x16435d[_0x16435d[_0x3d0222(0x9a)]=0x4]=_0x3d0222(0x9a),_0x16435d[_0x16435d[_0x3d0222(0xba)]=0x5]=_0x3d0222(0xba),_0x16435d[_0x16435d[_0x3d0222(0x86)]=-0x1]=_0x3d0222(0x86),_0x16435d))(v||{});const D=_0x4f0219=>_0x3b7c2(new Date(+_0x4f0219))['format'](_0x3d0222(0xa3)),B=async(_0x2ef99f,_0x28bcc4)=>{const _0xc91faf=_0x3d0222,_0x1b53fd=_0x2ef99f[_0xc91faf(0xd0)](_0x312b2f),_0x4924d4=_0x2ef99f[_0xc91faf(0xd0)](_0x40ab69);_0x28bcc4[_0xc91faf(0xca)](_0x4e3d27=>{const _0x172a5e=_0xc91faf;_0x1b53fd['getUser'](_0x4e3d27)&&_0x28bcc4[_0x172a5e(0xbf)](_0x4e3d27);}),_0x28bcc4['size']&&(await _0x4924d4['get'](_0xc91faf(0xe8),{'params':{'userIDs':[..._0x28bcc4]}}))[_0xc91faf(0xcd)][_0xc91faf(0x88)]['forEach'](_0x2d7c80=>{const _0xe40bf2=_0xc91faf;_0x2d7c80&&_0x1b53fd[_0xe40bf2(0xa2)](_0x2d7c80);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x46a882,_0x6188d,_0x5756cb,_0x16af2c)=>{const _0x38ce41=_0x3d0222;for(var _0x4ea8b3=_0x16af2c>0x1?void 0x0:_0x16af2c?K(_0x6188d,_0x5756cb):_0x6188d,_0x3e4e30=_0x46a882[_0x38ce41(0xe5)]-0x1,_0x4357c5;_0x3e4e30>=0x0;_0x3e4e30--)(_0x4357c5=_0x46a882[_0x3e4e30])&&(_0x4ea8b3=_0x4357c5(_0x4ea8b3)||_0x4ea8b3);return _0x4ea8b3;},p=(_0x296b5b,_0x23b7ba)=>(_0xfe8ff4,_0x5447b8)=>_0x23b7ba(_0xfe8ff4,_0x5447b8,_0x296b5b);let S=class extends _0x4314bc{constructor(_0x1d4d95,_0x45eac5,_0x226d24,_0x1440a0){const _0xba2ced=_0x3d0222;super(),this[_0xba2ced(0xde)]=_0x1d4d95,this[_0xba2ced(0xd9)]=_0x45eac5,this[_0xba2ced(0x82)]=_0x226d24,this[_0xba2ced(0xb9)]=_0x1440a0,this[_0xba2ced(0xac)](),this['_initUserSync']();}[_0x3d0222(0x97)](){const _0x559dbb=_0x3d0222;this[_0x559dbb(0xe3)](this[_0x559dbb(0xd9)]['commentUpdate$'][_0x559dbb(0xdb)](_0x45eeee(0x10))['subscribe'](_0x181efb=>{const _0x2936e1=_0x559dbb,_0x4cee51=new Set();_0x181efb[_0x2936e1(0xca)](_0xda2af6=>{const _0x2b5b13=_0x2936e1;switch(_0xda2af6[_0x2b5b13(0xaa)]){case'add':{const _0x5e38ce=_0xda2af6[_0x2b5b13(0xa4)][_0x2b5b13(0xdc)];_0x4cee51[_0x2b5b13(0xda)](_0x5e38ce);break;}}}),B(this['_injector'],_0x4cee51);}));}[_0x3d0222(0xac)](){const _0x59be15=_0x3d0222;this['disposeWithMe'](this[_0x59be15(0xde)][_0x59be15(0x8e)]['subscribe'](async _0x506e81=>{const _0x22693b=_0x59be15;var _0x3e0df5,_0x25e85e,_0x39480b,_0xd01aa4;const _0x1a6164=(_0x3e0df5=this[_0x22693b(0xd9)]['getUnit'](_0x506e81['unitId'])[_0x22693b(0x96)](_0x3d35fe=>_0x3d35fe[_0x22693b(0x99)]===_0x506e81[_0x22693b(0x99)]))==null?void 0x0:_0x3e0df5[_0x22693b(0x9c)];if(!_0x1a6164)return;const {unitId:_0x82dfa1,subUnitId:_0x5d32a3}=_0x1a6164;switch(_0x506e81[_0x22693b(0xdf)]&&this['_userService'][_0x22693b(0xa2)](_0x506e81[_0x22693b(0xdf)]),_0x506e81[_0x22693b(0xaa)]){case v[_0x22693b(0x8f)]:break;case v[_0x22693b(0xb5)]:{this[_0x22693b(0xd9)][_0x22693b(0x8d)](_0x82dfa1,_0x5d32a3,{'unitId':_0x82dfa1,'subUnitId':_0x5d32a3,'ref':'','id':_0x506e81[_0x22693b(0x8c)],'dT':D(+_0x506e81[_0x22693b(0xbe)]),'threadId':_0x506e81[_0x22693b(0x99)],'personId':(_0x39480b=(_0x25e85e=_0x506e81[_0x22693b(0xdf)])==null?void 0x0:_0x25e85e[_0x22693b(0xa9)])!=null?_0x39480b:_0x506e81[_0x22693b(0x8a)],'text':JSON[_0x22693b(0xb4)](_0x506e81[_0x22693b(0xa7)]),'parentId':_0x1a6164['id']});break;}case v[_0x22693b(0x9a)]:{const _0x397d8a=this[_0x22693b(0xd9)][_0x22693b(0xc6)](_0x82dfa1,_0x5d32a3,_0x506e81[_0x22693b(0x8c)]);_0x397d8a&&_0x397d8a['parentId']&&this['_threadCommentModel']['deleteComment'](_0x82dfa1,_0x5d32a3,_0x506e81[_0x22693b(0x8c)]);break;}case v[_0x22693b(0x92)]:{this['_threadCommentModel'][_0x22693b(0xbb)](_0x82dfa1,_0x5d32a3,{'commentId':_0x506e81[_0x22693b(0x8c)],'text':JSON[_0x22693b(0xb4)](_0x506e81[_0x22693b(0xa7)])});break;}case v[_0x22693b(0xba)]:{const _0x4e576d=(_0xd01aa4=this['_threadCommentModel'][_0x22693b(0xc0)](_0x506e81[_0x22693b(0x9f)])[_0x22693b(0x96)](_0x49dc00=>_0x49dc00[_0x22693b(0x99)]===_0x506e81[_0x22693b(0x99)]))==null?void 0x0:_0xd01aa4[_0x22693b(0x9c)];_0x4e576d&&this[_0x22693b(0xd9)][_0x22693b(0xe6)](_0x82dfa1,_0x5d32a3,_0x4e576d['id'],_0x506e81[_0x22693b(0xe7)]===I[_0x22693b(0xd2)]);break;}}}));}};S=V([p(0x0,_0xb50de1(_0x2eedbc)),p(0x1,_0xb50de1(_0x20227f)),p(0x2,_0xb50de1(_0x312b2f)),p(0x3,_0xb50de1(_0xc1b344))],S);const z=_0x3d0222(0xaf),M={};var k=Object[_0x3d0222(0xcc)],Q=(_0x10058c,_0x1b9c24,_0x43394a,_0x11e3cf)=>{for(var _0x35138e=_0x11e3cf>0x1?void 0x0:_0x11e3cf?k(_0x1b9c24,_0x43394a):_0x1b9c24,_0x331af7=_0x10058c['length']-0x1,_0x3f93f2;_0x331af7>=0x0;_0x331af7--)(_0x3f93f2=_0x10058c[_0x331af7])&&(_0x35138e=_0x3f93f2(_0x35138e)||_0x35138e);return _0x35138e;},_=(_0x2791c3,_0x4c0229)=>(_0x4ac72c,_0x11e90e)=>_0x4c0229(_0x4ac72c,_0x11e90e,_0x2791c3);function X(_0x40c91b,_0x4d83db){const _0x5a4b1c=_0x3d0222,_0x59b46a=_0x40c91b['replies'][0x0];return{..._0x4d83db,'id':_0x59b46a[_0x5a4b1c(0x8c)],'resolved':_0x40c91b[_0x5a4b1c(0xe7)]===0x1,'dT':D(_0x59b46a[_0x5a4b1c(0xbe)]),'personId':_0x59b46a[_0x5a4b1c(0x8a)],'threadId':_0x59b46a[_0x5a4b1c(0x99)]};}function ee(_0x3b4b64,_0x2ac990,_0x729992){const _0x4cbfe7=_0x3d0222;var _0xa41e14,_0x2c182e;if(((_0x2c182e=(_0xa41e14=_0x3b4b64==null?void 0x0:_0x3b4b64[_0x4cbfe7(0xab)])==null?void 0x0:_0xa41e14['length'])!=null?_0x2c182e:0x0)>0x0){const _0x2e01a3=(_0x1b5e80,_0xe75e5d)=>({'id':_0x1b5e80['replyId'],'threadId':_0x1b5e80[_0x4cbfe7(0x99)],'dT':D(_0x1b5e80['createTimestamp']),'personId':_0x1b5e80[_0x4cbfe7(0x8a)],'resolved':_0x3b4b64[_0x4cbfe7(0xe7)]===I[_0x4cbfe7(0xd2)],'unitId':_0x2ac990,'subUnitId':_0x729992,'text':JSON[_0x4cbfe7(0xb4)](_0x1b5e80[_0x4cbfe7(0xa7)]),'parentId':_0xe75e5d}),_0x3e59d7=_0x2e01a3(_0x3b4b64[_0x4cbfe7(0xab)][0x0]);return{..._0x3e59d7,'children':_0x3b4b64['replies'][_0x4cbfe7(0xd3)](0x1)[_0x4cbfe7(0x84)](_0x5abc96=>_0x2e01a3(_0x5abc96,_0x3e59d7['id']))};}return null;}let f=class{constructor(_0x4d307b,_0x334e9f,_0x5d93ce,_0x3efa69){const _0x550a26=_0x3d0222;this[_0x550a26(0x8b)]=_0x4d307b,this[_0x550a26(0x82)]=_0x334e9f,this['_sessionService']=_0x5d93ce,this[_0x550a26(0xb9)]=_0x3efa69;}async[_0x3d0222(0x8d)](_0x64865a){const _0x1ec075=_0x3d0222;var _0x333129,_0x28205e;const {parentId:_0x1886c5,unitId:_0x3e28d7,text:_0x487b95,threadId:_0x1eb36c}=_0x64865a,_0x2172a1=(_0x28205e=(_0x333129=_0x487b95['customRanges'])==null?void 0x0:_0x333129['filter'](_0x2d4a13=>_0x2d4a13[_0x1ec075(0xae)]===_0xfc942[_0x1ec075(0xc7)])[_0x1ec075(0x84)](_0x223472=>_0x223472[_0x1ec075(0xb6)]))!=null?_0x28205e:[],_0x122f88=JSON[_0x1ec075(0xcf)](_0x487b95),_0x4f5e50=(await this[_0x1ec075(0xa0)][_0x1ec075(0x9d)](_0x3e28d7))['getMemberID']();if(_0x1886c5){const _0x534844={'memberId':_0x4f5e50,'unitId':_0x3e28d7,'content':_0x122f88,'mention':_0x2172a1,'threadId':_0x1eb36c},_0x4d9b53=(await this[_0x1ec075(0x8b)][_0x1ec075(0xb0)](_0x1ec075(0xe1)+_0x3e28d7+'/reply',{'body':_0x534844}))[_0x1ec075(0xcd)][_0x1ec075(0xb3)];return{..._0x64865a,'id':_0x4d9b53['replyId'],'dT':_0x3b7c2(+_0x4d9b53[_0x1ec075(0xbe)])[_0x1ec075(0xc1)](_0x1ec075(0xa3)),'personId':_0x4d9b53[_0x1ec075(0x8a)]};}else{const _0xd499b5={'memberId':_0x4f5e50,'unitId':_0x3e28d7,'content':_0x122f88,'mention':_0x2172a1},_0x14b436=await this[_0x1ec075(0x8b)][_0x1ec075(0xb0)](_0x1ec075(0xe1)+_0x3e28d7+'/add',{'body':_0xd499b5});return X(_0x14b436[_0x1ec075(0xcd)]['comment'],_0x64865a);}}async[_0x3d0222(0xbb)](_0x3720e5){const _0x5cd947=_0x3d0222;var _0x5ba954,_0x12fadd;const {text:_0xda9522,unitId:_0x45e44b}=_0x3720e5,_0xdc3f54=(_0x12fadd=(_0x5ba954=_0xda9522[_0x5cd947(0xc2)])==null?void 0x0:_0x5ba954[_0x5cd947(0xa1)](_0x80135c=>_0x80135c[_0x5cd947(0xae)]===_0xfc942['COMMENT'])[_0x5cd947(0x84)](_0x4b7208=>_0x4b7208[_0x5cd947(0xb6)]))!=null?_0x12fadd:[],_0x107725=JSON['stringify'](_0xda9522),_0x4a8eda=_0x3720e5[_0x5cd947(0x99)],_0x2f3a87=_0x3720e5['id'],_0xc1a49f={'memberId':(await this[_0x5cd947(0xa0)][_0x5cd947(0x9d)](_0x45e44b))[_0x5cd947(0xa6)](),'unitId':_0x45e44b,'threadId':_0x4a8eda,'mention':_0xdc3f54,'content':_0x107725,'replyId':_0x2f3a87},_0x2c39ee=await this[_0x5cd947(0x8b)][_0x5cd947(0xb0)](_0x5cd947(0xe1)+_0x45e44b+_0x5cd947(0x94),{'body':_0xc1a49f});return!_0x2c39ee['body']['error']||_0x2c39ee['body'][_0x5cd947(0xb8)][_0x5cd947(0xa5)]===0x1;}async['resolveComment'](_0x568d2f){const _0x144fd3=_0x3d0222,{unitId:_0x50b417}=_0x568d2f,_0x484fac=_0x568d2f[_0x144fd3(0x99)],_0x3d5fe8={'memberId':this[_0x144fd3(0x82)][_0x144fd3(0x81)]()[_0x144fd3(0xa9)],'unitId':_0x50b417,'threadId':_0x484fac,'solved':_0x568d2f[_0x144fd3(0xe4)]?I[_0x144fd3(0xd2)]:I[_0x144fd3(0x80)]},_0x3755e9=await this[_0x144fd3(0x8b)]['post'](_0x144fd3(0xe1)+_0x50b417+_0x144fd3(0x85),{'body':_0x3d5fe8});return!_0x3755e9[_0x144fd3(0xcd)]['error']||_0x3755e9[_0x144fd3(0xcd)]['error'][_0x144fd3(0xa5)]===0x1;}async[_0x3d0222(0xd1)](_0x4868f4,_0x5b36a4,_0x3d16b6,_0x1a19ad){const _0x3f5155=_0x3d0222,_0x41bea9={'memberId':(await this[_0x3f5155(0xa0)][_0x3f5155(0x9d)](_0x4868f4))['getMemberID'](),'threadId':_0x3d16b6,'replyId':_0x1a19ad,'unitId':_0x4868f4},_0x266303=await this['_httpService'][_0x3f5155(0xb0)](_0x3f5155(0xe1)+_0x4868f4+_0x3f5155(0x93),{'body':_0x41bea9});return!_0x266303[_0x3f5155(0xcd)][_0x3f5155(0xb8)]||_0x266303[_0x3f5155(0xcd)]['error'][_0x3f5155(0xa5)]===0x1;}async[_0x3d0222(0xb7)](_0x1c6340,_0x5b9171,_0xff73d9){const _0x3627ba=_0x3d0222,_0x4462cd={'unitId':_0x1c6340,'threadId':_0xff73d9},_0x2d2a71=await this[_0x3627ba(0x8b)][_0x3627ba(0xb0)]('/universer-api/comment/unit/'+_0x1c6340+_0x3627ba(0xce),{'body':_0x4462cd}),_0x31c03a=_0xff73d9[_0x3627ba(0x84)](_0x301d85=>ee(_0x2d2a71['body'][_0x3627ba(0xc9)][_0x301d85],_0x1c6340,_0x5b9171))[_0x3627ba(0xa1)](Boolean);return Object[_0x3627ba(0xd8)](_0x2d2a71['body'][_0x3627ba(0x88)])[_0x3627ba(0xca)](_0x2fe9aa=>{const _0x449b1a=_0x3627ba;this[_0x449b1a(0x82)][_0x449b1a(0xa2)](_0x2fe9aa);}),_0x31c03a;}[_0x3d0222(0xbd)](_0x3cecfc){const _0x49bf80=_0x3d0222;return{'id':_0x3cecfc['id'],'threadId':_0x3cecfc[_0x49bf80(0x99)],'ref':_0x3cecfc['ref']};}};f=Q([_(0x0,_0xb50de1(_0x40ab69)),_(0x1,_0xb50de1(_0x312b2f)),_(0x2,_0xb50de1(_0x331714)),_(0x3,_0xb50de1(_0xc1b344))],f);var re=Object[_0x3d0222(0xcc)],te=(_0x340c9,_0x4aa2ee,_0x49b161,_0x593a88)=>{const _0x50c0d1=_0x3d0222;for(var _0x420459=_0x593a88>0x1?void 0x0:_0x593a88?re(_0x4aa2ee,_0x49b161):_0x4aa2ee,_0x36a67d=_0x340c9[_0x50c0d1(0xe5)]-0x1,_0x1c4c42;_0x36a67d>=0x0;_0x36a67d--)(_0x1c4c42=_0x340c9[_0x36a67d])&&(_0x420459=_0x1c4c42(_0x420459)||_0x420459);return _0x420459;},N=(_0x32d9c6,_0x4bf623)=>(_0x5c2141,_0x2980b2)=>_0x4bf623(_0x5c2141,_0x2980b2,_0x32d9c6);let g=class extends _0x4314bc{constructor(_0x418de9,_0x32c23f){super(),this['_threadCommentDataSourceService']=_0x418de9,this['_threadCommentDataSource']=_0x32c23f,this['_initDataSource']();}[_0x3d0222(0xe0)](){const _0x2e3614=_0x3d0222;this[_0x2e3614(0xa8)][_0x2e3614(0x87)]=this[_0x2e3614(0xbc)],this[_0x2e3614(0xa8)][_0x2e3614(0x98)]=!0x1;}};function _0x1ae7(){const _0x52b082=['_userService','586dvCcgf','map','/solved','UNRECOGNIZED','dataSource','users','180aqdHGH','userId','_httpService','replyId','addComment','commentUpdate$','Add','395FstyHN','_configService','Edit','/delete','/edit','937000hkGEtP','find','_initUserSync','syncUpdateMutationToColla','threadId','Delete','5212OtbjqO','root','requireSession','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','unitId','_sessionService','filter','addUser','YYYY/MM/DD\x20HH:mm','payload','code','getMemberID','content','_threadCommentDataSourceService','userID','type','replies','_init','Unknown','rangeType','thread-comment-data-source.config','post','7yFdsnJ','defineProperty','reply','parse','Reply','rangeId','listComments','error','_injector','Solve','updateComment','_threadCommentDataSource','saveCommentToSnapshot','createTimestamp','delete','getUnit','format','customRanges','1572OeylcM','UNIVER_UNKNOWN','12245936PqSczY','getComment','COMMENT','3590tHWYWd','comments','forEach','48390MLxJFA','getOwnPropertyDescriptor','body','/list','stringify','get','deleteComment','Solved','slice','onReady','4906ZPVrYh','3260972WvBiQu','_config','values','_threadCommentModel','add','pipe','personId','9QSphko','_commentService','user','_initDataSource','/universer-api/comment/unit/','symbol','disposeWithMe','resolved','length','resolveComment','solved','/universer-api/user/list','OpenOrReOpen','getCurrentUser'];_0x1ae7=function(){return _0x52b082;};return _0x1ae7();}g=te([N(0x0,_0x43c8d5),N(0x1,_0xb50de1(f))],g);var se=Object[_0x3d0222(0xb2)],oe=Object[_0x3d0222(0xcc)],ne=(_0x5e632d,_0x4d7829,_0xd5531a)=>_0x4d7829 in _0x5e632d?se(_0x5e632d,_0x4d7829,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd5531a}):_0x5e632d[_0x4d7829]=_0xd5531a,ie=(_0x55f43e,_0x24a442,_0x4c5758,_0x262485)=>{const _0x58e45f=_0x3d0222;for(var _0x2d7c02=_0x262485>0x1?void 0x0:_0x262485?oe(_0x24a442,_0x4c5758):_0x24a442,_0x48c0b4=_0x55f43e[_0x58e45f(0xe5)]-0x1,_0x43c453;_0x48c0b4>=0x0;_0x48c0b4--)(_0x43c453=_0x55f43e[_0x48c0b4])&&(_0x2d7c02=_0x43c453(_0x2d7c02)||_0x2d7c02);return _0x2d7c02;},w=(_0x6073e9,_0x595dcb)=>(_0x5e5eee,_0x528be8)=>_0x595dcb(_0x5e5eee,_0x528be8,_0x6073e9),$=(_0x3c32e1,_0x54998a,_0x3c99c7)=>ne(_0x3c32e1,typeof _0x54998a!=_0x3d0222(0xe2)?_0x54998a+'':_0x54998a,_0x3c99c7);let b=class extends _0x33f723{constructor(_0x78f431=M,_0xc87333,_0x2c062f){const _0x3c091b=_0x3d0222;super(),this[_0x3c091b(0xd7)]=_0x78f431,this[_0x3c091b(0xb9)]=_0xc87333,this['_configService']=_0x2c062f;const {..._0x582984}=_0x351827({},M,this[_0x3c091b(0xd7)]);this[_0x3c091b(0x91)]['setConfig'](z,_0x582984);}['onStarting'](){const _0x5d99fb=_0x3d0222;[[f],[g],[S]][_0x5d99fb(0xca)](_0x256598=>{const _0x3fd4c6=_0x5d99fb;this[_0x3fd4c6(0xb9)][_0x3fd4c6(0xda)](_0x256598);});}[_0x3d0222(0xd4)](){const _0x5aa9b8=_0x3d0222;this[_0x5aa9b8(0xb9)]['get'](g),this['_injector'][_0x5aa9b8(0xd0)](S);}};$(b,'pluginName',W),$(b,_0x3d0222(0xaa),_0x3f182b[_0x3d0222(0xc4)]),b=ie([_0x19c23a(_0x554dd4,_0x1d664a,_0xd9538b),w(0x1,_0xb50de1(_0xc1b344)),w(0x2,_0x4283b9)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x3f16(){const _0x533f13=['add','error','ThreadCommentModel','87584HUhFhV','symbol','_httpService','Module','parentId','Reply','post','rangeType','deleteComment','1365480RVqRuJ','@univerjs-pro/collaboration-client','UniverInstanceType','HTTPService','_injector','getUnit','onReady','root','_threadCommentDataSource','code','UniverThreadCommentUi','updateComment','function','232508SapGpd','DependentOn','listComments','/reply','_commentService','/solved','addComment','forEach','getUser','@univerjs/network','comments','body','length','size','dayjs','addUser','UniverProCollaborationClient','CollaborationSessionService','defineProperty','UniverNetwork','ref','requireSession','commentUpdate$','createTimestamp','995547YZsnWG','Inject','filter','_threadCommentDataSourceService','replies','81xDmrgV','@univerjs/core','resolved','Solved','customRanges','3WWqiKj','getCurrentUser','Plugin','rxjs','UniverProLicense','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','bufferTime','getMemberID','COMMENT','_userService','exports','Delete','personId','find','UniverProThreadCommentDatasource','slice','values','Add','threadId','CommentService','UNRECOGNIZED','userId','comment','Unknown','solved','5YYHDJh','amd','_sessionService','subscribe','map','OpenOrReOpen','780968YRzPcN','unitId','rangeId','_configService','_init','getOwnPropertyDescriptor','setConfig','/universer-api/comment/unit/','_config','UniverLicensePlugin','Disposable','onStarting','CustomRangeType','format','disposeWithMe','replyId','Injector','/edit','type','/delete','_initUserSync','object','users','user','stringify','UniverThreadCommentDataSourcePlugin','pluginName','Solve','merge','/list','syncUpdateMutationToColla','content','928506spmift','UNIVER_UNKNOWN','57104OAPFPZ','userID','parse','dataSource','thread-comment-data-source.config','@univerjs/thread-comment-ui','get','/universer-api/user/list','UserManagerService','_threadCommentModel','Edit','YYYY/MM/DD\x20HH:mm','reply'];_0x3f16=function(){return _0x533f13;};return _0x3f16();}function _0x1b41(_0x379ebb,_0x52d64b){const _0x3f1671=_0x3f16();return _0x1b41=function(_0x1b41a7,_0x54ffd4){_0x1b41a7=_0x1b41a7-0x1b7;let _0x5826e8=_0x3f1671[_0x1b41a7];return _0x5826e8;},_0x1b41(_0x379ebb,_0x52d64b);}(function(_0x585621,_0x29707e){const _0x59cb97=_0x1b41,_0x36dc0d=_0x585621();while(!![]){try{const _0x423c35=parseInt(_0x59cb97(0x218))/0x1+parseInt(_0x59cb97(0x22e))/0x2*(parseInt(_0x59cb97(0x1c7))/0x3)+-parseInt(_0x59cb97(0x1e6))/0x4+-parseInt(_0x59cb97(0x1e0))/0x5*(-parseInt(_0x59cb97(0x206))/0x6)+parseInt(_0x59cb97(0x1bd))/0x7+parseInt(_0x59cb97(0x208))/0x8*(-parseInt(_0x59cb97(0x1c2))/0x9)+-parseInt(_0x59cb97(0x221))/0xa;if(_0x423c35===_0x29707e)break;else _0x36dc0d['push'](_0x36dc0d['shift']());}catch(_0x3e592c){_0x36dc0d['push'](_0x36dc0d['shift']());}}}(_0x3f16,0x1994a),function(_0x3f16f6,_0x290e1d){const _0x4465f7=_0x1b41;typeof exports==_0x4465f7(0x1fb)&&typeof module<'u'?_0x290e1d(exports,require(_0x4465f7(0x222)),require('@univerjs-pro/license'),require(_0x4465f7(0x1c3)),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require(_0x4465f7(0x1ca)),require(_0x4465f7(0x237))):typeof define==_0x4465f7(0x22d)&&define[_0x4465f7(0x1e1)]?define([_0x4465f7(0x1d1),_0x4465f7(0x222),'@univerjs-pro/license',_0x4465f7(0x1c3),_0x4465f7(0x20d),'@univerjs/thread-comment',_0x4465f7(0x1ca),'@univerjs/network'],_0x290e1d):(_0x3f16f6=typeof globalThis<'u'?globalThis:_0x3f16f6||self,_0x290e1d(_0x3f16f6[_0x4465f7(0x1d5)]={},_0x3f16f6[_0x4465f7(0x23e)],_0x3f16f6[_0x4465f7(0x1cb)],_0x3f16f6['UniverCore'],_0x3f16f6[_0x4465f7(0x22b)],_0x3f16f6['UniverThreadComment'],_0x3f16f6['rxjs'],_0x3f16f6[_0x4465f7(0x1b8)]));}(this,function(_0x24ed3d,_0x4b6958,_0x4a61dd,_0x8ba108,_0x56d5d9,_0x47d0a6,_0x39e82a,_0x50014d){'use strict';const _0xd9dc20=_0x1b41;const _0x299ca5=_0xd9dc20(0x1cc);var _0x527132=(_0x8292e0=>(_0x8292e0[_0x8292e0['OpenOrReOpen']=0x0]=_0xd9dc20(0x1e5),_0x8292e0[_0x8292e0[_0xd9dc20(0x1c5)]=0x1]=_0xd9dc20(0x1c5),_0x8292e0[_0x8292e0['UNRECOGNIZED']=-0x1]=_0xd9dc20(0x1db),_0x8292e0))(_0x527132||{}),_0x1ab4b5=(_0x22f7ef=>(_0x22f7ef[_0x22f7ef['Unknown']=0x0]=_0xd9dc20(0x1de),_0x22f7ef[_0x22f7ef[_0xd9dc20(0x1d8)]=0x1]='Add',_0x22f7ef[_0x22f7ef[_0xd9dc20(0x21d)]=0x2]='Reply',_0x22f7ef[_0x22f7ef[_0xd9dc20(0x212)]=0x3]=_0xd9dc20(0x212),_0x22f7ef[_0x22f7ef[_0xd9dc20(0x1d2)]=0x4]='Delete',_0x22f7ef[_0x22f7ef[_0xd9dc20(0x201)]=0x5]=_0xd9dc20(0x201),_0x22f7ef[_0x22f7ef[_0xd9dc20(0x1db)]=-0x1]=_0xd9dc20(0x1db),_0x22f7ef))(_0x1ab4b5||{});const _0x19b69f=_0x2f4cae=>_0x8ba108[_0xd9dc20(0x23c)](new Date(+_0x2f4cae))[_0xd9dc20(0x1f3)](_0xd9dc20(0x213)),_0x36a832=async(_0x5e7c4d,_0x5b1517)=>{const _0x395be8=_0xd9dc20,_0x4229e1=_0x5e7c4d[_0x395be8(0x20e)](_0x8ba108['UserManagerService']),_0x5ac6e9=_0x5e7c4d[_0x395be8(0x20e)](_0x50014d[_0x395be8(0x224)]);_0x5b1517[_0x395be8(0x235)](_0x4a8641=>{const _0x419481=_0x395be8;_0x4229e1[_0x419481(0x236)](_0x4a8641)&&_0x5b1517['delete'](_0x4a8641);}),_0x5b1517[_0x395be8(0x23b)]&&(await _0x5ac6e9['get'](_0x395be8(0x20f),{'params':{'userIDs':[..._0x5b1517]}}))[_0x395be8(0x239)][_0x395be8(0x1fc)]['forEach'](_0x558660=>{const _0x129931=_0x395be8;_0x558660&&_0x4229e1[_0x129931(0x23d)](_0x558660);});};var _0xe1934b=Object['getOwnPropertyDescriptor'],_0x2801e3=(_0x58b446,_0x3732db,_0x4204c1,_0x41e259)=>{const _0x1edf36=_0xd9dc20;for(var _0xb60792=_0x41e259>0x1?void 0x0:_0x41e259?_0xe1934b(_0x3732db,_0x4204c1):_0x3732db,_0x39bf7d=_0x58b446[_0x1edf36(0x23a)]-0x1,_0x43f59f;_0x39bf7d>=0x0;_0x39bf7d--)(_0x43f59f=_0x58b446[_0x39bf7d])&&(_0xb60792=_0x43f59f(_0xb60792)||_0xb60792);return _0xb60792;},_0x46d7c4=(_0x544d68,_0x2d9244)=>(_0x26664a,_0x2618ec)=>_0x2d9244(_0x26664a,_0x2618ec,_0x544d68);let _0x257958=class extends _0x8ba108['Disposable']{constructor(_0x3d3cea,_0x443e0d,_0x4dadf9,_0x5f5725){const _0x27717d=_0xd9dc20;super(),this[_0x27717d(0x232)]=_0x3d3cea,this[_0x27717d(0x211)]=_0x443e0d,this['_userService']=_0x4dadf9,this[_0x27717d(0x225)]=_0x5f5725,this['_init'](),this['_initUserSync']();}[_0xd9dc20(0x1fa)](){const _0x32dd7a=_0xd9dc20;this['disposeWithMe'](this['_threadCommentModel'][_0x32dd7a(0x1bb)]['pipe'](_0x39e82a[_0x32dd7a(0x1cd)](0x10))[_0x32dd7a(0x1e3)](_0x19b19b=>{const _0x58c893=_0x32dd7a,_0x5f1b95=new Set();_0x19b19b['forEach'](_0x57da52=>{const _0x39a007=_0x1b41;switch(_0x57da52['type']){case _0x39a007(0x215):{const _0x1c3733=_0x57da52['payload'][_0x39a007(0x1d3)];_0x5f1b95['add'](_0x1c3733);break;}}}),_0x36a832(this[_0x58c893(0x225)],_0x5f1b95);}));}[_0xd9dc20(0x1ea)](){const _0x2c8c79=_0xd9dc20;this[_0x2c8c79(0x1f4)](this[_0x2c8c79(0x232)][_0x2c8c79(0x1bb)]['subscribe'](async _0x28c715=>{const _0x179b25=_0x2c8c79;var _0x841773,_0x24c0af,_0x4f0f7b,_0x21afd1;const _0xc1bf97=(_0x841773=this[_0x179b25(0x211)][_0x179b25(0x226)](_0x28c715[_0x179b25(0x1e7)])[_0x179b25(0x1d4)](_0xab4354=>_0xab4354[_0x179b25(0x1d9)]===_0x28c715[_0x179b25(0x1d9)]))==null?void 0x0:_0x841773['root'];if(!_0xc1bf97)return;const {unitId:_0x3f8a30,subUnitId:_0x433acd}=_0xc1bf97;switch(_0x28c715[_0x179b25(0x1fd)]&&this[_0x179b25(0x1d0)][_0x179b25(0x23d)](_0x28c715[_0x179b25(0x1fd)]),_0x28c715['type']){case _0x1ab4b5[_0x179b25(0x1d8)]:break;case _0x1ab4b5['Reply']:{this[_0x179b25(0x211)][_0x179b25(0x234)](_0x3f8a30,_0x433acd,{'unitId':_0x3f8a30,'subUnitId':_0x433acd,'ref':'','id':_0x28c715[_0x179b25(0x1f5)],'dT':_0x19b69f(+_0x28c715[_0x179b25(0x1bc)]),'threadId':_0x28c715['threadId'],'personId':(_0x4f0f7b=(_0x24c0af=_0x28c715[_0x179b25(0x1fd)])==null?void 0x0:_0x24c0af[_0x179b25(0x209)])!=null?_0x4f0f7b:_0x28c715[_0x179b25(0x1dc)],'text':JSON['parse'](_0x28c715[_0x179b25(0x205)]),'parentId':_0xc1bf97['id']});break;}case _0x1ab4b5[_0x179b25(0x1d2)]:{const _0x57d38c=this['_threadCommentModel']['getComment'](_0x3f8a30,_0x433acd,_0x28c715['replyId']);_0x57d38c&&_0x57d38c[_0x179b25(0x21c)]&&this['_threadCommentModel'][_0x179b25(0x220)](_0x3f8a30,_0x433acd,_0x28c715[_0x179b25(0x1f5)]);break;}case _0x1ab4b5['Edit']:{this[_0x179b25(0x211)][_0x179b25(0x22c)](_0x3f8a30,_0x433acd,{'commentId':_0x28c715[_0x179b25(0x1f5)],'text':JSON[_0x179b25(0x20a)](_0x28c715[_0x179b25(0x205)])});break;}case _0x1ab4b5[_0x179b25(0x201)]:{const _0x969f8d=(_0x21afd1=this[_0x179b25(0x211)][_0x179b25(0x226)](_0x28c715[_0x179b25(0x1e7)])[_0x179b25(0x1d4)](_0x19c65b=>_0x19c65b[_0x179b25(0x1d9)]===_0x28c715[_0x179b25(0x1d9)]))==null?void 0x0:_0x21afd1[_0x179b25(0x228)];_0x969f8d&&this[_0x179b25(0x211)]['resolveComment'](_0x3f8a30,_0x433acd,_0x969f8d['id'],_0x28c715['solved']===_0x527132[_0x179b25(0x1c5)]);break;}}}));}};_0x257958=_0x2801e3([_0x46d7c4(0x0,_0x8ba108[_0xd9dc20(0x1be)](_0x4b6958[_0xd9dc20(0x1da)])),_0x46d7c4(0x1,_0x8ba108[_0xd9dc20(0x1be)](_0x47d0a6[_0xd9dc20(0x217)])),_0x46d7c4(0x2,_0x8ba108[_0xd9dc20(0x1be)](_0x8ba108[_0xd9dc20(0x210)])),_0x46d7c4(0x3,_0x8ba108[_0xd9dc20(0x1be)](_0x8ba108[_0xd9dc20(0x1f6)]))],_0x257958);const _0x5963a3=_0xd9dc20(0x20c),_0x1ebfe0={};var _0x3e93cd=Object[_0xd9dc20(0x1eb)],_0x20ec76=(_0x3625dd,_0x5f48f5,_0x563321,_0x1c2b44)=>{for(var _0x55c0a9=_0x1c2b44>0x1?void 0x0:_0x1c2b44?_0x3e93cd(_0x5f48f5,_0x563321):_0x5f48f5,_0x238d0d=_0x3625dd['length']-0x1,_0x522b42;_0x238d0d>=0x0;_0x238d0d--)(_0x522b42=_0x3625dd[_0x238d0d])&&(_0x55c0a9=_0x522b42(_0x55c0a9)||_0x55c0a9);return _0x55c0a9;},_0x50759f=(_0x2c26ad,_0x2a780f)=>(_0x5d51d3,_0x4ff7b2)=>_0x2a780f(_0x5d51d3,_0x4ff7b2,_0x2c26ad);function _0x4cc20f(_0x39220e,_0x502e8e){const _0x3eff86=_0xd9dc20,_0xc14e70=_0x39220e[_0x3eff86(0x1c1)][0x0];return{..._0x502e8e,'id':_0xc14e70[_0x3eff86(0x1f5)],'resolved':_0x39220e[_0x3eff86(0x1df)]===0x1,'dT':_0x19b69f(_0xc14e70[_0x3eff86(0x1bc)]),'personId':_0xc14e70['userId'],'threadId':_0xc14e70[_0x3eff86(0x1d9)]};}function _0xd260ef(_0x1484f3,_0x1523d3,_0x3f0219){const _0x38ea1e=_0xd9dc20;var _0x4ab1d0,_0x26b215;if(((_0x26b215=(_0x4ab1d0=_0x1484f3==null?void 0x0:_0x1484f3[_0x38ea1e(0x1c1)])==null?void 0x0:_0x4ab1d0[_0x38ea1e(0x23a)])!=null?_0x26b215:0x0)>0x0){const _0x24602e=(_0x1a45f1,_0x63a4c7)=>({'id':_0x1a45f1['replyId'],'threadId':_0x1a45f1[_0x38ea1e(0x1d9)],'dT':_0x19b69f(_0x1a45f1[_0x38ea1e(0x1bc)]),'personId':_0x1a45f1[_0x38ea1e(0x1dc)],'resolved':_0x1484f3['solved']===_0x527132[_0x38ea1e(0x1c5)],'unitId':_0x1523d3,'subUnitId':_0x3f0219,'text':JSON[_0x38ea1e(0x20a)](_0x1a45f1[_0x38ea1e(0x205)]),'parentId':_0x63a4c7}),_0x411958=_0x24602e(_0x1484f3[_0x38ea1e(0x1c1)][0x0]);return{..._0x411958,'children':_0x1484f3[_0x38ea1e(0x1c1)][_0x38ea1e(0x1d6)](0x1)['map'](_0x4b5b50=>_0x24602e(_0x4b5b50,_0x411958['id']))};}return null;}let _0x24593d=class{constructor(_0x553aea,_0x2c1d2b,_0xf58014,_0x10891f){const _0x54ce37=_0xd9dc20;this['_httpService']=_0x553aea,this[_0x54ce37(0x1d0)]=_0x2c1d2b,this[_0x54ce37(0x1e2)]=_0xf58014,this['_injector']=_0x10891f;}async[_0xd9dc20(0x234)](_0x16f180){const _0x50ab45=_0xd9dc20;var _0x72bc6,_0x3239cc;const {parentId:_0x3fad65,unitId:_0x51c35a,text:_0x35a7ca,threadId:_0x1b7e8d}=_0x16f180,_0x1eae6f=(_0x3239cc=(_0x72bc6=_0x35a7ca['customRanges'])==null?void 0x0:_0x72bc6[_0x50ab45(0x1bf)](_0xcbc757=>_0xcbc757[_0x50ab45(0x21f)]===_0x8ba108[_0x50ab45(0x1f2)][_0x50ab45(0x1cf)])[_0x50ab45(0x1e4)](_0x65bf2e=>_0x65bf2e['rangeId']))!=null?_0x3239cc:[],_0x5b1528=JSON[_0x50ab45(0x1fe)](_0x35a7ca),_0x501eb5=(await this[_0x50ab45(0x1e2)][_0x50ab45(0x1ba)](_0x51c35a))[_0x50ab45(0x1ce)]();if(_0x3fad65){const _0x3b7fef={'memberId':_0x501eb5,'unitId':_0x51c35a,'content':_0x5b1528,'mention':_0x1eae6f,'threadId':_0x1b7e8d},_0x120f60=(await this[_0x50ab45(0x21a)][_0x50ab45(0x21e)]('/universer-api/comment/unit/'+_0x51c35a+_0x50ab45(0x231),{'body':_0x3b7fef}))[_0x50ab45(0x239)][_0x50ab45(0x214)];return{..._0x16f180,'id':_0x120f60['replyId'],'dT':_0x8ba108['dayjs'](+_0x120f60[_0x50ab45(0x1bc)])[_0x50ab45(0x1f3)](_0x50ab45(0x213)),'personId':_0x120f60[_0x50ab45(0x1dc)]};}else{const _0x2a34f2={'memberId':_0x501eb5,'unitId':_0x51c35a,'content':_0x5b1528,'mention':_0x1eae6f},_0x511c95=await this[_0x50ab45(0x21a)][_0x50ab45(0x21e)](_0x50ab45(0x1ed)+_0x51c35a+'/add',{'body':_0x2a34f2});return _0x4cc20f(_0x511c95[_0x50ab45(0x239)][_0x50ab45(0x1dd)],_0x16f180);}}async[_0xd9dc20(0x22c)](_0x33e952){const _0x21e1a8=_0xd9dc20;var _0x1a8cc9,_0x3e21ea;const {text:_0x5f91a1,unitId:_0x5ef23a}=_0x33e952,_0x217489=(_0x3e21ea=(_0x1a8cc9=_0x5f91a1[_0x21e1a8(0x1c6)])==null?void 0x0:_0x1a8cc9['filter'](_0x226faa=>_0x226faa[_0x21e1a8(0x21f)]===_0x8ba108[_0x21e1a8(0x1f2)][_0x21e1a8(0x1cf)])['map'](_0x57e31a=>_0x57e31a[_0x21e1a8(0x1e8)]))!=null?_0x3e21ea:[],_0x51b7d8=JSON[_0x21e1a8(0x1fe)](_0x5f91a1),_0x1da904=_0x33e952[_0x21e1a8(0x1d9)],_0x893c32=_0x33e952['id'],_0x3e0f57={'memberId':(await this['_sessionService'][_0x21e1a8(0x1ba)](_0x5ef23a))[_0x21e1a8(0x1ce)](),'unitId':_0x5ef23a,'threadId':_0x1da904,'mention':_0x217489,'content':_0x51b7d8,'replyId':_0x893c32},_0x41ee93=await this['_httpService'][_0x21e1a8(0x21e)](_0x21e1a8(0x1ed)+_0x5ef23a+_0x21e1a8(0x1f7),{'body':_0x3e0f57});return!_0x41ee93['body'][_0x21e1a8(0x216)]||_0x41ee93['body'][_0x21e1a8(0x216)][_0x21e1a8(0x22a)]===0x1;}async['resolveComment'](_0x4666e7){const _0x38f7fa=_0xd9dc20,{unitId:_0x26e269}=_0x4666e7,_0x5be4a8=_0x4666e7[_0x38f7fa(0x1d9)],_0x5d5715={'memberId':this[_0x38f7fa(0x1d0)][_0x38f7fa(0x1c8)]()[_0x38f7fa(0x209)],'unitId':_0x26e269,'threadId':_0x5be4a8,'solved':_0x4666e7[_0x38f7fa(0x1c4)]?_0x527132['Solved']:_0x527132['OpenOrReOpen']},_0x55923b=await this[_0x38f7fa(0x21a)][_0x38f7fa(0x21e)](_0x38f7fa(0x1ed)+_0x26e269+_0x38f7fa(0x233),{'body':_0x5d5715});return!_0x55923b[_0x38f7fa(0x239)]['error']||_0x55923b[_0x38f7fa(0x239)][_0x38f7fa(0x216)]['code']===0x1;}async[_0xd9dc20(0x220)](_0x3a33d0,_0x152566,_0x469ebc,_0x1e5209){const _0x4b9d6b=_0xd9dc20,_0x496e8a={'memberId':(await this[_0x4b9d6b(0x1e2)][_0x4b9d6b(0x1ba)](_0x3a33d0))[_0x4b9d6b(0x1ce)](),'threadId':_0x469ebc,'replyId':_0x1e5209,'unitId':_0x3a33d0},_0x1e8124=await this['_httpService'][_0x4b9d6b(0x21e)](_0x4b9d6b(0x1ed)+_0x3a33d0+_0x4b9d6b(0x1f9),{'body':_0x496e8a});return!_0x1e8124[_0x4b9d6b(0x239)][_0x4b9d6b(0x216)]||_0x1e8124[_0x4b9d6b(0x239)][_0x4b9d6b(0x216)][_0x4b9d6b(0x22a)]===0x1;}async[_0xd9dc20(0x230)](_0x30eaed,_0x96dbff,_0x168369){const _0x107396=_0xd9dc20,_0x2404ef={'unitId':_0x30eaed,'threadId':_0x168369},_0x186d56=await this['_httpService']['post'](_0x107396(0x1ed)+_0x30eaed+_0x107396(0x203),{'body':_0x2404ef}),_0x51e000=_0x168369[_0x107396(0x1e4)](_0x3fbb51=>_0xd260ef(_0x186d56[_0x107396(0x239)][_0x107396(0x238)][_0x3fbb51],_0x30eaed,_0x96dbff))['filter'](Boolean);return Object[_0x107396(0x1d7)](_0x186d56['body'][_0x107396(0x1fc)])[_0x107396(0x235)](_0x3ec5b2=>{const _0x4d018c=_0x107396;this[_0x4d018c(0x1d0)]['addUser'](_0x3ec5b2);}),_0x51e000;}['saveCommentToSnapshot'](_0x34564c){const _0x2efb7d=_0xd9dc20;return{'id':_0x34564c['id'],'threadId':_0x34564c['threadId'],'ref':_0x34564c[_0x2efb7d(0x1b9)]};}};_0x24593d=_0x20ec76([_0x50759f(0x0,_0x8ba108[_0xd9dc20(0x1be)](_0x50014d['HTTPService'])),_0x50759f(0x1,_0x8ba108[_0xd9dc20(0x1be)](_0x8ba108[_0xd9dc20(0x210)])),_0x50759f(0x2,_0x8ba108[_0xd9dc20(0x1be)](_0x4b6958[_0xd9dc20(0x23f)])),_0x50759f(0x3,_0x8ba108[_0xd9dc20(0x1be)](_0x8ba108[_0xd9dc20(0x1f6)]))],_0x24593d);var _0x87a981=Object[_0xd9dc20(0x1eb)],_0x409830=(_0x2339e2,_0x81f701,_0x1f8de0,_0x51e9cb)=>{const _0x5b3069=_0xd9dc20;for(var _0x413706=_0x51e9cb>0x1?void 0x0:_0x51e9cb?_0x87a981(_0x81f701,_0x1f8de0):_0x81f701,_0x25c93e=_0x2339e2[_0x5b3069(0x23a)]-0x1,_0x130753;_0x25c93e>=0x0;_0x25c93e--)(_0x130753=_0x2339e2[_0x25c93e])&&(_0x413706=_0x130753(_0x413706)||_0x413706);return _0x413706;},_0x507e96=(_0x5b4773,_0xdd4361)=>(_0x2fab3d,_0x7e9d78)=>_0xdd4361(_0x2fab3d,_0x7e9d78,_0x5b4773);let _0x366456=class extends _0x8ba108[_0xd9dc20(0x1f0)]{constructor(_0xedf1e4,_0x43400a){const _0x3bd067=_0xd9dc20;super(),this['_threadCommentDataSourceService']=_0xedf1e4,this[_0x3bd067(0x229)]=_0x43400a,this['_initDataSource']();}['_initDataSource'](){const _0x477bf6=_0xd9dc20;this[_0x477bf6(0x1c0)][_0x477bf6(0x20b)]=this[_0x477bf6(0x229)],this[_0x477bf6(0x1c0)][_0x477bf6(0x204)]=!0x1;}};_0x366456=_0x409830([_0x507e96(0x0,_0x47d0a6['IThreadCommentDataSourceService']),_0x507e96(0x1,_0x8ba108['Inject'](_0x24593d))],_0x366456);var _0x2c2bc6=Object[_0xd9dc20(0x1b7)],_0x11e524=Object[_0xd9dc20(0x1eb)],_0xfe42b7=(_0x5bc393,_0x148947,_0x2337f3)=>_0x148947 in _0x5bc393?_0x2c2bc6(_0x5bc393,_0x148947,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2337f3}):_0x5bc393[_0x148947]=_0x2337f3,_0x36df0e=(_0x4ccf5c,_0x2e9607,_0x217ed9,_0x1efb0d)=>{const _0x1da006=_0xd9dc20;for(var _0x484964=_0x1efb0d>0x1?void 0x0:_0x1efb0d?_0x11e524(_0x2e9607,_0x217ed9):_0x2e9607,_0x42d1c0=_0x4ccf5c[_0x1da006(0x23a)]-0x1,_0x13f870;_0x42d1c0>=0x0;_0x42d1c0--)(_0x13f870=_0x4ccf5c[_0x42d1c0])&&(_0x484964=_0x13f870(_0x484964)||_0x484964);return _0x484964;},_0x5cd221=(_0x3da58b,_0x2b3e65)=>(_0x3e9376,_0x3e6b04)=>_0x2b3e65(_0x3e9376,_0x3e6b04,_0x3da58b),_0x772518=(_0x56614d,_0x5e97ff,_0x180108)=>_0xfe42b7(_0x56614d,typeof _0x5e97ff!=_0xd9dc20(0x219)?_0x5e97ff+'':_0x5e97ff,_0x180108);_0x24ed3d[_0xd9dc20(0x1ff)]=class extends _0x8ba108[_0xd9dc20(0x1c9)]{constructor(_0x35f5a1=_0x1ebfe0,_0x1f28ce,_0x299bbf){const _0x350231=_0xd9dc20;super(),this['_config']=_0x35f5a1,this['_injector']=_0x1f28ce,this['_configService']=_0x299bbf;const {..._0xbef2b2}=_0x8ba108[_0x350231(0x202)]({},_0x1ebfe0,this[_0x350231(0x1ee)]);this[_0x350231(0x1e9)][_0x350231(0x1ec)](_0x5963a3,_0xbef2b2);}[_0xd9dc20(0x1f1)](){const _0x3b0d56=_0xd9dc20;[[_0x24593d],[_0x366456],[_0x257958]][_0x3b0d56(0x235)](_0x2ebb08=>{const _0x5daf72=_0x3b0d56;this[_0x5daf72(0x225)][_0x5daf72(0x215)](_0x2ebb08);});}[_0xd9dc20(0x227)](){const _0x358fb7=_0xd9dc20;this[_0x358fb7(0x225)][_0x358fb7(0x20e)](_0x366456),this[_0x358fb7(0x225)]['get'](_0x257958);}},_0x772518(_0x24ed3d[_0xd9dc20(0x1ff)],_0xd9dc20(0x200),_0x299ca5),_0x772518(_0x24ed3d[_0xd9dc20(0x1ff)],_0xd9dc20(0x1f8),_0x8ba108[_0xd9dc20(0x223)][_0xd9dc20(0x207)]),_0x24ed3d['UniverThreadCommentDataSourcePlugin']=_0x36df0e([_0x8ba108[_0xd9dc20(0x22f)](_0x56d5d9['UniverThreadCommentUIPlugin'],_0x4b6958['UniverCollaborationClientPlugin'],_0x4a61dd[_0xd9dc20(0x1ef)]),_0x5cd221(0x1,_0x8ba108['Inject'](_0x8ba108[_0xd9dc20(0x1f6)])),_0x5cd221(0x2,_0x8ba108['IConfigService'])],_0x24ed3d[_0xd9dc20(0x1ff)]),Object[_0xd9dc20(0x1b7)](_0x24ed3d,Symbol['toStringTag'],{'value':_0xd9dc20(0x21b)});}));
|
|
1
|
+
function _0x555a(_0x236c41,_0x12adb6){const _0x2f8cb4=_0x2f8c();return _0x555a=function(_0x555a6c,_0x473654){_0x555a6c=_0x555a6c-0x1d1;let _0x231e7b=_0x2f8cb4[_0x555a6c];return _0x231e7b;},_0x555a(_0x236c41,_0x12adb6);}(function(_0x2d2c7e,_0x36e857){const _0x4da183=_0x555a,_0x1ab652=_0x2d2c7e();while(!![]){try{const _0x59603f=-parseInt(_0x4da183(0x1ec))/0x1*(parseInt(_0x4da183(0x20f))/0x2)+parseInt(_0x4da183(0x22e))/0x3*(-parseInt(_0x4da183(0x237))/0x4)+-parseInt(_0x4da183(0x1ff))/0x5+parseInt(_0x4da183(0x215))/0x6*(-parseInt(_0x4da183(0x223))/0x7)+-parseInt(_0x4da183(0x20e))/0x8+-parseInt(_0x4da183(0x22b))/0x9+parseInt(_0x4da183(0x1f2))/0xa;if(_0x59603f===_0x36e857)break;else _0x1ab652['push'](_0x1ab652['shift']());}catch(_0x1b904a){_0x1ab652['push'](_0x1ab652['shift']());}}}(_0x2f8c,0xc4022),function(_0x5b2ce3,_0x37ae6c){const _0x41a14d=_0x555a;typeof exports=='object'&&typeof module<'u'?_0x37ae6c(exports,require('@univerjs-pro/collaboration-client'),require(_0x41a14d(0x22d)),require('@univerjs/core'),require(_0x41a14d(0x1e1)),require(_0x41a14d(0x1f9)),require(_0x41a14d(0x211)),require(_0x41a14d(0x1ef))):typeof define==_0x41a14d(0x253)&&define[_0x41a14d(0x229)]?define([_0x41a14d(0x24b),_0x41a14d(0x256),_0x41a14d(0x22d),'@univerjs/core','@univerjs/thread-comment-ui',_0x41a14d(0x1f9),_0x41a14d(0x211),_0x41a14d(0x1ef)],_0x37ae6c):(_0x5b2ce3=typeof globalThis<'u'?globalThis:_0x5b2ce3||self,_0x37ae6c(_0x5b2ce3['UniverProThreadCommentDatasource']={},_0x5b2ce3[_0x41a14d(0x1e8)],_0x5b2ce3[_0x41a14d(0x202)],_0x5b2ce3[_0x41a14d(0x217)],_0x5b2ce3['UniverThreadCommentUi'],_0x5b2ce3['UniverThreadComment'],_0x5b2ce3[_0x41a14d(0x211)],_0x5b2ce3[_0x41a14d(0x254)]));}(this,function(_0x3a6cfc,_0x1ce484,_0x33deaf,_0x4332b8,_0x3a429e,_0xe1c387,_0x1ee6ef,_0x226f1a){'use strict';const _0x2e5523=_0x555a;const _0x499ff3=_0x2e5523(0x20c);var _0x5380fc=(_0x10299b=>(_0x10299b[_0x10299b[_0x2e5523(0x21b)]=0x0]='OpenOrReOpen',_0x10299b[_0x10299b[_0x2e5523(0x24d)]=0x1]=_0x2e5523(0x24d),_0x10299b[_0x10299b['UNRECOGNIZED']=-0x1]=_0x2e5523(0x20b),_0x10299b))(_0x5380fc||{}),_0x435fff=(_0x41bde3=>(_0x41bde3[_0x41bde3[_0x2e5523(0x206)]=0x0]=_0x2e5523(0x206),_0x41bde3[_0x41bde3[_0x2e5523(0x24c)]=0x1]=_0x2e5523(0x24c),_0x41bde3[_0x41bde3[_0x2e5523(0x1d2)]=0x2]=_0x2e5523(0x1d2),_0x41bde3[_0x41bde3[_0x2e5523(0x24f)]=0x3]=_0x2e5523(0x24f),_0x41bde3[_0x41bde3['Delete']=0x4]=_0x2e5523(0x21f),_0x41bde3[_0x41bde3[_0x2e5523(0x219)]=0x5]=_0x2e5523(0x219),_0x41bde3[_0x41bde3[_0x2e5523(0x20b)]=-0x1]='UNRECOGNIZED',_0x41bde3))(_0x435fff||{});const _0x3d91c9=_0x3160d5=>_0x4332b8[_0x2e5523(0x1d7)](new Date(+_0x3160d5))[_0x2e5523(0x225)](_0x2e5523(0x1e3)),_0x220f02=async(_0x4f3398,_0x24ff89)=>{const _0x5674f4=_0x2e5523,_0x40348d=_0x4f3398['get'](_0x4332b8[_0x5674f4(0x255)]),_0x17a4b8=_0x4f3398[_0x5674f4(0x1f0)](_0x226f1a[_0x5674f4(0x207)]);_0x24ff89[_0x5674f4(0x1e2)](_0x2222e9=>{const _0x1c5717=_0x5674f4;_0x40348d[_0x1c5717(0x234)](_0x2222e9)&&_0x24ff89[_0x1c5717(0x1fd)](_0x2222e9);}),_0x24ff89[_0x5674f4(0x251)]&&(await _0x17a4b8[_0x5674f4(0x1f0)]('/universer-api/user/list',{'params':{'userIDs':[..._0x24ff89]}}))[_0x5674f4(0x25b)][_0x5674f4(0x1db)][_0x5674f4(0x1e2)](_0x1200ec=>{const _0x432323=_0x5674f4;_0x1200ec&&_0x40348d[_0x432323(0x1fe)](_0x1200ec);});};var _0x22aae9=Object[_0x2e5523(0x1e5)],_0x5e6829=(_0x10f160,_0x3a249a,_0x3e12f4,_0x338111)=>{const _0xa8a278=_0x2e5523;for(var _0x39104f=_0x338111>0x1?void 0x0:_0x338111?_0x22aae9(_0x3a249a,_0x3e12f4):_0x3a249a,_0x467202=_0x10f160[_0xa8a278(0x238)]-0x1,_0x4f7b33;_0x467202>=0x0;_0x467202--)(_0x4f7b33=_0x10f160[_0x467202])&&(_0x39104f=_0x4f7b33(_0x39104f)||_0x39104f);return _0x39104f;},_0x5e804c=(_0x20680a,_0x99370c)=>(_0x4983f7,_0x3018a0)=>_0x99370c(_0x4983f7,_0x3018a0,_0x20680a);let _0x2f0683=class extends _0x4332b8[_0x2e5523(0x201)]{constructor(_0x470d61,_0x3ba4b3,_0x55bca6,_0x5e61d7){const _0x22403a=_0x2e5523;super(),this['_commentService']=_0x470d61,this[_0x22403a(0x228)]=_0x3ba4b3,this[_0x22403a(0x236)]=_0x55bca6,this[_0x22403a(0x1e6)]=_0x5e61d7,this[_0x22403a(0x1dd)](),this['_initUserSync']();}[_0x2e5523(0x1e7)](){const _0x7a7ed=_0x2e5523;this[_0x7a7ed(0x1fc)](this[_0x7a7ed(0x228)][_0x7a7ed(0x1ee)][_0x7a7ed(0x252)](_0x1ee6ef[_0x7a7ed(0x1ed)](0x10))[_0x7a7ed(0x22c)](_0x3e0aa1=>{const _0x55045e=_0x7a7ed,_0x53ec8b=new Set();_0x3e0aa1[_0x55045e(0x1e2)](_0x1dbf7d=>{const _0xdbf195=_0x55045e;switch(_0x1dbf7d[_0xdbf195(0x259)]){case'add':{const _0x3b17e4=_0x1dbf7d['payload'][_0xdbf195(0x226)];_0x53ec8b[_0xdbf195(0x203)](_0x3b17e4);break;}}}),_0x220f02(this[_0x55045e(0x1e6)],_0x53ec8b);}));}[_0x2e5523(0x1dd)](){const _0x4e3b1a=_0x2e5523;this[_0x4e3b1a(0x1fc)](this['_commentService'][_0x4e3b1a(0x1ee)][_0x4e3b1a(0x22c)](async _0x293d84=>{const _0x18a3b2=_0x4e3b1a;var _0x190c72,_0x3f02d2,_0x38d541,_0x543c87;const _0x3d3d71=(_0x190c72=this['_threadCommentModel'][_0x18a3b2(0x213)](_0x293d84['unitId'])[_0x18a3b2(0x247)](_0x29268b=>_0x29268b[_0x18a3b2(0x1f1)]===_0x293d84[_0x18a3b2(0x1f1)]))==null?void 0x0:_0x190c72['root'];if(!_0x3d3d71)return;const {unitId:_0x2afd9f,subUnitId:_0x19d50f}=_0x3d3d71;switch(_0x293d84[_0x18a3b2(0x1f8)]&&this[_0x18a3b2(0x236)][_0x18a3b2(0x1fe)](_0x293d84[_0x18a3b2(0x1f8)]),_0x293d84[_0x18a3b2(0x259)]){case _0x435fff[_0x18a3b2(0x24c)]:break;case _0x435fff[_0x18a3b2(0x1d2)]:{this[_0x18a3b2(0x228)][_0x18a3b2(0x20a)](_0x2afd9f,_0x19d50f,{'unitId':_0x2afd9f,'subUnitId':_0x19d50f,'ref':'','id':_0x293d84['replyId'],'dT':_0x3d91c9(+_0x293d84['createTimestamp']),'threadId':_0x293d84['threadId'],'personId':(_0x38d541=(_0x3f02d2=_0x293d84['user'])==null?void 0x0:_0x3f02d2['userID'])!=null?_0x38d541:_0x293d84['userId'],'text':JSON[_0x18a3b2(0x1d6)](_0x293d84[_0x18a3b2(0x204)]),'parentId':_0x3d3d71['id']});break;}case _0x435fff[_0x18a3b2(0x21f)]:{const _0x4a6ff5=this[_0x18a3b2(0x228)]['getComment'](_0x2afd9f,_0x19d50f,_0x293d84[_0x18a3b2(0x245)]);_0x4a6ff5&&_0x4a6ff5['parentId']&&this['_threadCommentModel'][_0x18a3b2(0x205)](_0x2afd9f,_0x19d50f,_0x293d84['replyId']);break;}case _0x435fff[_0x18a3b2(0x24f)]:{this['_threadCommentModel'][_0x18a3b2(0x235)](_0x2afd9f,_0x19d50f,{'commentId':_0x293d84[_0x18a3b2(0x245)],'text':JSON[_0x18a3b2(0x1d6)](_0x293d84[_0x18a3b2(0x204)])});break;}case _0x435fff[_0x18a3b2(0x219)]:{const _0x3fb25b=(_0x543c87=this[_0x18a3b2(0x228)][_0x18a3b2(0x213)](_0x293d84[_0x18a3b2(0x22f)])[_0x18a3b2(0x247)](_0x62c5c5=>_0x62c5c5[_0x18a3b2(0x1f1)]===_0x293d84['threadId']))==null?void 0x0:_0x543c87['root'];_0x3fb25b&&this[_0x18a3b2(0x228)][_0x18a3b2(0x24e)](_0x2afd9f,_0x19d50f,_0x3fb25b['id'],_0x293d84[_0x18a3b2(0x249)]===_0x5380fc[_0x18a3b2(0x24d)]);break;}}}));}};_0x2f0683=_0x5e6829([_0x5e804c(0x0,_0x4332b8[_0x2e5523(0x1de)](_0x1ce484[_0x2e5523(0x1d4)])),_0x5e804c(0x1,_0x4332b8[_0x2e5523(0x1de)](_0xe1c387['ThreadCommentModel'])),_0x5e804c(0x2,_0x4332b8[_0x2e5523(0x1de)](_0x4332b8[_0x2e5523(0x255)])),_0x5e804c(0x3,_0x4332b8[_0x2e5523(0x1de)](_0x4332b8[_0x2e5523(0x21d)]))],_0x2f0683);const _0x2545e5=_0x2e5523(0x1d5),_0x5d602c={};var _0x1fdee5=Object['getOwnPropertyDescriptor'],_0x33a533=(_0x1643db,_0x2b0339,_0x127b81,_0x2f1b19)=>{for(var _0x3a81ee=_0x2f1b19>0x1?void 0x0:_0x2f1b19?_0x1fdee5(_0x2b0339,_0x127b81):_0x2b0339,_0x4d4660=_0x1643db['length']-0x1,_0x2dcc01;_0x4d4660>=0x0;_0x4d4660--)(_0x2dcc01=_0x1643db[_0x4d4660])&&(_0x3a81ee=_0x2dcc01(_0x3a81ee)||_0x3a81ee);return _0x3a81ee;},_0x2193c1=(_0x3c0f55,_0x2535ce)=>(_0x56389e,_0x185228)=>_0x2535ce(_0x56389e,_0x185228,_0x3c0f55);function _0x48e7b8(_0x49cc1e,_0x2afa1d){const _0x1b5ee6=_0x2e5523,_0xf837ef=_0x49cc1e[_0x1b5ee6(0x1fb)][0x0];return{..._0x2afa1d,'id':_0xf837ef[_0x1b5ee6(0x245)],'resolved':_0x49cc1e[_0x1b5ee6(0x249)]===0x1,'dT':_0x3d91c9(_0xf837ef['createTimestamp']),'personId':_0xf837ef[_0x1b5ee6(0x241)],'threadId':_0xf837ef['threadId']};}function _0x3670d7(_0x4d15bf,_0x5210d5,_0x352630){const _0x9fa71d=_0x2e5523;var _0x266d88,_0x1efdff;if(((_0x1efdff=(_0x266d88=_0x4d15bf==null?void 0x0:_0x4d15bf[_0x9fa71d(0x1fb)])==null?void 0x0:_0x266d88[_0x9fa71d(0x238)])!=null?_0x1efdff:0x0)>0x0){const _0x2808e2=(_0x2b3be8,_0x12910a)=>({'id':_0x2b3be8[_0x9fa71d(0x245)],'threadId':_0x2b3be8[_0x9fa71d(0x1f1)],'dT':_0x3d91c9(_0x2b3be8[_0x9fa71d(0x1d1)]),'personId':_0x2b3be8[_0x9fa71d(0x241)],'resolved':_0x4d15bf[_0x9fa71d(0x249)]===_0x5380fc['Solved'],'unitId':_0x5210d5,'subUnitId':_0x352630,'text':JSON['parse'](_0x2b3be8['content']),'parentId':_0x12910a}),_0x3599da=_0x2808e2(_0x4d15bf['replies'][0x0]);return{..._0x3599da,'children':_0x4d15bf[_0x9fa71d(0x1fb)][_0x9fa71d(0x21c)](0x1)[_0x9fa71d(0x25c)](_0x3286af=>_0x2808e2(_0x3286af,_0x3599da['id']))};}return null;}let _0x443274=class{constructor(_0x2f385f,_0x1544bd,_0x113b14,_0xd1babc){const _0x363ec6=_0x2e5523;this['_httpService']=_0x2f385f,this[_0x363ec6(0x236)]=_0x1544bd,this[_0x363ec6(0x250)]=_0x113b14,this[_0x363ec6(0x1e6)]=_0xd1babc;}async[_0x2e5523(0x20a)](_0x45e4d7){const _0x1c1dec=_0x2e5523;var _0x504f46,_0x1902f1;const {parentId:_0x184ae9,unitId:_0x4df60b,text:_0x47ad08,threadId:_0x3fb808}=_0x45e4d7,_0x55947d=(_0x1902f1=(_0x504f46=_0x47ad08[_0x1c1dec(0x23d)])==null?void 0x0:_0x504f46[_0x1c1dec(0x1e4)](_0x3bf1fe=>_0x3bf1fe[_0x1c1dec(0x243)]===_0x4332b8[_0x1c1dec(0x1fa)]['COMMENT'])['map'](_0x1acfe1=>_0x1acfe1[_0x1c1dec(0x216)]))!=null?_0x1902f1:[],_0x59739b=JSON[_0x1c1dec(0x218)](_0x47ad08),_0x3d2284=(await this[_0x1c1dec(0x250)][_0x1c1dec(0x1e9)](_0x4df60b))['getMemberID']();if(_0x184ae9){const _0x60c5cf={'memberId':_0x3d2284,'unitId':_0x4df60b,'content':_0x59739b,'mention':_0x55947d,'threadId':_0x3fb808},_0x8c1caa=(await this['_httpService'][_0x1c1dec(0x212)](_0x1c1dec(0x22a)+_0x4df60b+_0x1c1dec(0x23c),{'body':_0x60c5cf}))[_0x1c1dec(0x25b)][_0x1c1dec(0x23e)];return{..._0x45e4d7,'id':_0x8c1caa[_0x1c1dec(0x245)],'dT':_0x4332b8[_0x1c1dec(0x1d7)](+_0x8c1caa['createTimestamp'])['format'](_0x1c1dec(0x1e3)),'personId':_0x8c1caa[_0x1c1dec(0x241)]};}else{const _0x381ed1={'memberId':_0x3d2284,'unitId':_0x4df60b,'content':_0x59739b,'mention':_0x55947d},_0x3e1307=await this[_0x1c1dec(0x258)][_0x1c1dec(0x212)](_0x1c1dec(0x22a)+_0x4df60b+_0x1c1dec(0x246),{'body':_0x381ed1});return _0x48e7b8(_0x3e1307[_0x1c1dec(0x25b)][_0x1c1dec(0x230)],_0x45e4d7);}}async[_0x2e5523(0x235)](_0x459dca){const _0x11efa5=_0x2e5523;var _0x5a18bf,_0x5961c4;const {text:_0x4be02b,unitId:_0x19437d}=_0x459dca,_0x4c6b68=(_0x5961c4=(_0x5a18bf=_0x4be02b[_0x11efa5(0x23d)])==null?void 0x0:_0x5a18bf[_0x11efa5(0x1e4)](_0x540fce=>_0x540fce['rangeType']===_0x4332b8['CustomRangeType'][_0x11efa5(0x224)])[_0x11efa5(0x25c)](_0x4281b4=>_0x4281b4[_0x11efa5(0x216)]))!=null?_0x5961c4:[],_0x9e5c3a=JSON[_0x11efa5(0x218)](_0x4be02b),_0x1233b8=_0x459dca['threadId'],_0x1cdae9=_0x459dca['id'],_0xde1cd={'memberId':(await this[_0x11efa5(0x250)][_0x11efa5(0x1e9)](_0x19437d))['getMemberID'](),'unitId':_0x19437d,'threadId':_0x1233b8,'mention':_0x4c6b68,'content':_0x9e5c3a,'replyId':_0x1cdae9},_0x30a2b7=await this[_0x11efa5(0x258)]['post']('/universer-api/comment/unit/'+_0x19437d+_0x11efa5(0x1f3),{'body':_0xde1cd});return!_0x30a2b7[_0x11efa5(0x25b)][_0x11efa5(0x239)]||_0x30a2b7[_0x11efa5(0x25b)][_0x11efa5(0x239)][_0x11efa5(0x1d3)]===0x1;}async['resolveComment'](_0x1117aa){const _0x16cf27=_0x2e5523,{unitId:_0x28b102}=_0x1117aa,_0x1d7109=_0x1117aa[_0x16cf27(0x1f1)],_0x85d7c3={'memberId':this[_0x16cf27(0x236)]['getCurrentUser']()[_0x16cf27(0x1f5)],'unitId':_0x28b102,'threadId':_0x1d7109,'solved':_0x1117aa[_0x16cf27(0x20d)]?_0x5380fc['Solved']:_0x5380fc[_0x16cf27(0x21b)]},_0x2ff781=await this[_0x16cf27(0x258)][_0x16cf27(0x212)](_0x16cf27(0x22a)+_0x28b102+_0x16cf27(0x242),{'body':_0x85d7c3});return!_0x2ff781[_0x16cf27(0x25b)][_0x16cf27(0x239)]||_0x2ff781['body'][_0x16cf27(0x239)][_0x16cf27(0x1d3)]===0x1;}async[_0x2e5523(0x205)](_0x51535b,_0x19a57f,_0x3df49b,_0x420a2d){const _0x1460b1=_0x2e5523,_0x2a06fb={'memberId':(await this[_0x1460b1(0x250)]['requireSession'](_0x51535b))[_0x1460b1(0x1e0)](),'threadId':_0x3df49b,'replyId':_0x420a2d,'unitId':_0x51535b},_0x3bda9c=await this[_0x1460b1(0x258)][_0x1460b1(0x212)](_0x1460b1(0x22a)+_0x51535b+_0x1460b1(0x248),{'body':_0x2a06fb});return!_0x3bda9c['body']['error']||_0x3bda9c[_0x1460b1(0x25b)][_0x1460b1(0x239)][_0x1460b1(0x1d3)]===0x1;}async[_0x2e5523(0x23a)](_0x3a38eb,_0x434cb5,_0x3e0132){const _0x3bb418=_0x2e5523,_0x4d7d0e={'unitId':_0x3a38eb,'threadId':_0x3e0132},_0x5176be=await this[_0x3bb418(0x258)][_0x3bb418(0x212)](_0x3bb418(0x22a)+_0x3a38eb+_0x3bb418(0x232),{'body':_0x4d7d0e}),_0x269953=_0x3e0132[_0x3bb418(0x25c)](_0x5144d1=>_0x3670d7(_0x5176be[_0x3bb418(0x25b)][_0x3bb418(0x244)][_0x5144d1],_0x3a38eb,_0x434cb5))[_0x3bb418(0x1e4)](Boolean);return Object[_0x3bb418(0x214)](_0x5176be['body'][_0x3bb418(0x1db)])[_0x3bb418(0x1e2)](_0x5632b0=>{const _0x107b59=_0x3bb418;this[_0x107b59(0x236)][_0x107b59(0x1fe)](_0x5632b0);}),_0x269953;}[_0x2e5523(0x1eb)](_0x2499db){const _0x2e446c=_0x2e5523;return{'id':_0x2499db['id'],'threadId':_0x2499db[_0x2e446c(0x1f1)],'ref':_0x2499db[_0x2e446c(0x1d8)]};}};_0x443274=_0x33a533([_0x2193c1(0x0,_0x4332b8[_0x2e5523(0x1de)](_0x226f1a[_0x2e5523(0x207)])),_0x2193c1(0x1,_0x4332b8[_0x2e5523(0x1de)](_0x4332b8['UserManagerService'])),_0x2193c1(0x2,_0x4332b8[_0x2e5523(0x1de)](_0x1ce484[_0x2e5523(0x210)])),_0x2193c1(0x3,_0x4332b8[_0x2e5523(0x1de)](_0x4332b8[_0x2e5523(0x21d)]))],_0x443274);var _0x4aa720=Object[_0x2e5523(0x1e5)],_0x582c88=(_0x1033cd,_0x1fed1d,_0x28c1d7,_0x263b65)=>{const _0x4c618c=_0x2e5523;for(var _0x1f9b08=_0x263b65>0x1?void 0x0:_0x263b65?_0x4aa720(_0x1fed1d,_0x28c1d7):_0x1fed1d,_0x55577d=_0x1033cd[_0x4c618c(0x238)]-0x1,_0x4b9999;_0x55577d>=0x0;_0x55577d--)(_0x4b9999=_0x1033cd[_0x55577d])&&(_0x1f9b08=_0x4b9999(_0x1f9b08)||_0x1f9b08);return _0x1f9b08;},_0x2af97d=(_0x3e69d0,_0xd992e)=>(_0x3f1863,_0x370fba)=>_0xd992e(_0x3f1863,_0x370fba,_0x3e69d0);let _0x5ddf11=class extends _0x4332b8[_0x2e5523(0x201)]{constructor(_0x4fead4,_0x3ef163){const _0x51556f=_0x2e5523;super(),this['_threadCommentDataSourceService']=_0x4fead4,this[_0x51556f(0x221)]=_0x3ef163,this[_0x51556f(0x209)]();}[_0x2e5523(0x209)](){const _0x25c4fe=_0x2e5523;this[_0x25c4fe(0x21e)]['dataSource']=this[_0x25c4fe(0x221)],this[_0x25c4fe(0x21e)][_0x25c4fe(0x1f6)]=!0x1;}};_0x5ddf11=_0x582c88([_0x2af97d(0x0,_0xe1c387[_0x2e5523(0x1f4)]),_0x2af97d(0x1,_0x4332b8['Inject'](_0x443274))],_0x5ddf11);var _0x4b310d=Object[_0x2e5523(0x231)],_0x22014a=Object[_0x2e5523(0x1e5)],_0xde7e94=(_0x588c7d,_0x256bd8,_0x1be3e9)=>_0x256bd8 in _0x588c7d?_0x4b310d(_0x588c7d,_0x256bd8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1be3e9}):_0x588c7d[_0x256bd8]=_0x1be3e9,_0x5247a9=(_0x23a542,_0x18468b,_0x202410,_0x11451f)=>{for(var _0x1edb97=_0x11451f>0x1?void 0x0:_0x11451f?_0x22014a(_0x18468b,_0x202410):_0x18468b,_0x40d16c=_0x23a542['length']-0x1,_0xc389b4;_0x40d16c>=0x0;_0x40d16c--)(_0xc389b4=_0x23a542[_0x40d16c])&&(_0x1edb97=_0xc389b4(_0x1edb97)||_0x1edb97);return _0x1edb97;},_0x5af191=(_0x23f431,_0x2e6f1b)=>(_0x4122db,_0xb3cad9)=>_0x2e6f1b(_0x4122db,_0xb3cad9,_0x23f431),_0x26a5af=(_0x38f95c,_0x114aad,_0x3bb971)=>_0xde7e94(_0x38f95c,typeof _0x114aad!=_0x2e5523(0x1d9)?_0x114aad+'':_0x114aad,_0x3bb971);_0x3a6cfc[_0x2e5523(0x25a)]=class extends _0x4332b8[_0x2e5523(0x21a)]{constructor(_0x436e89=_0x5d602c,_0x4a448d,_0x2578c6){const _0x4cf01c=_0x2e5523;super(),this[_0x4cf01c(0x23f)]=_0x436e89,this['_injector']=_0x4a448d,this[_0x4cf01c(0x1df)]=_0x2578c6;const {..._0x53bf39}=_0x4332b8[_0x4cf01c(0x233)]({},_0x5d602c,this[_0x4cf01c(0x23f)]);this[_0x4cf01c(0x1df)][_0x4cf01c(0x24a)](_0x2545e5,_0x53bf39);}[_0x2e5523(0x1f7)](){[[_0x443274],[_0x5ddf11],[_0x2f0683]]['forEach'](_0x1e80fe=>{const _0xa0df8e=_0x555a;this['_injector'][_0xa0df8e(0x203)](_0x1e80fe);});}[_0x2e5523(0x227)](){const _0x2d75c8=_0x2e5523;this[_0x2d75c8(0x1e6)][_0x2d75c8(0x1f0)](_0x5ddf11),this[_0x2d75c8(0x1e6)][_0x2d75c8(0x1f0)](_0x2f0683);}},_0x26a5af(_0x3a6cfc[_0x2e5523(0x25a)],_0x2e5523(0x1da),_0x499ff3),_0x26a5af(_0x3a6cfc['UniverThreadCommentDataSourcePlugin'],'type',_0x4332b8[_0x2e5523(0x208)][_0x2e5523(0x257)]),_0x3a6cfc[_0x2e5523(0x25a)]=_0x5247a9([_0x4332b8[_0x2e5523(0x222)](_0x3a429e[_0x2e5523(0x220)],_0x1ce484[_0x2e5523(0x1dc)],_0x33deaf[_0x2e5523(0x240)]),_0x5af191(0x1,_0x4332b8[_0x2e5523(0x1de)](_0x4332b8[_0x2e5523(0x21d)])),_0x5af191(0x2,_0x4332b8[_0x2e5523(0x1ea)])],_0x3a6cfc[_0x2e5523(0x25a)]),Object['defineProperty'](_0x3a6cfc,Symbol[_0x2e5523(0x23b)],{'value':_0x2e5523(0x200)});}));function _0x2f8c(){const _0x3abedd=['getUnit','values','6366tAiJLG','rangeId','UniverCore','stringify','Solve','Plugin','OpenOrReOpen','slice','Injector','_threadCommentDataSourceService','Delete','UniverThreadCommentUIPlugin','_threadCommentDataSource','DependentOn','133nGicem','COMMENT','format','personId','onReady','_threadCommentModel','amd','/universer-api/comment/unit/','14216463SIcsZM','subscribe','@univerjs-pro/license','66057FkiolB','unitId','comment','defineProperty','/list','merge','getUser','updateComment','_userService','200veIlvc','length','error','listComments','toStringTag','/reply','customRanges','reply','_config','UniverLicensePlugin','userId','/solved','rangeType','comments','replyId','/add','find','/delete','solved','setConfig','exports','Add','Solved','resolveComment','Edit','_sessionService','size','pipe','function','UniverNetwork','UserManagerService','@univerjs-pro/collaboration-client','UNIVER_UNKNOWN','_httpService','type','UniverThreadCommentDataSourcePlugin','body','map','createTimestamp','Reply','code','CommentService','thread-comment-data-source.config','parse','dayjs','ref','symbol','pluginName','users','UniverCollaborationClientPlugin','_init','Inject','_configService','getMemberID','@univerjs/thread-comment-ui','forEach','YYYY/MM/DD\x20HH:mm','filter','getOwnPropertyDescriptor','_injector','_initUserSync','UniverProCollaborationClient','requireSession','IConfigService','saveCommentToSnapshot','1447205OxQjCu','bufferTime','commentUpdate$','@univerjs/network','get','threadId','53619160JuDaTI','/edit','IThreadCommentDataSourceService','userID','syncUpdateMutationToColla','onStarting','user','@univerjs/thread-comment','CustomRangeType','replies','disposeWithMe','delete','addUser','1260905OFsfTI','Module','Disposable','UniverProLicense','add','content','deleteComment','Unknown','HTTPService','UniverInstanceType','_initDataSource','addComment','UNRECOGNIZED','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolved','1271712CKSwVF','2JYcbbQ','CollaborationSessionService','rxjs','post'];_0x2f8c=function(){return _0x3abedd;};return _0x2f8c();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.7.0-nightly.
|
|
3
|
+
"version": "0.7.0-nightly.202505141607",
|
|
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.7.0-nightly.
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs/core": "0.7.0-nightly.
|
|
51
|
-
"@univerjs-pro/license": "0.7.0-nightly.202505121607",
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.7.0-nightly.202505141607",
|
|
49
|
+
"@univerjs-pro/license": "0.7.0-nightly.202505141607",
|
|
50
|
+
"@univerjs/core": "0.7.0-nightly.202505141607",
|
|
52
51
|
"@univerjs/protocol": "0.1.46-alpha.3",
|
|
53
|
-
"@univerjs/
|
|
54
|
-
"@univerjs/
|
|
52
|
+
"@univerjs/network": "0.7.0-nightly.202505141607",
|
|
53
|
+
"@univerjs/thread-comment": "0.7.0-nightly.202505141607",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.7.0-nightly.202505141607"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.8.3",
|
|
59
59
|
"vite": "^6.3.5",
|
|
60
60
|
"vitest": "^3.1.3",
|
|
61
|
-
"@univerjs-infra/shared": "0.7.0
|
|
61
|
+
"@univerjs-infra/shared": "0.7.0"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|