@univerjs-pro/thread-comment-datasource 0.6.10-experimental.20250419-8f302dd → 0.6.10-experimental.20250421-e4eb9bc
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 _0x81b9fc=_0x449e;(function(_0x57ab41,_0x88813d){const _0x51372d=_0x449e,_0x53c4f8=_0x57ab41();while(!![]){try{const _0x54582f=parseInt(_0x51372d(0x185))/0x1+parseInt(_0x51372d(0x186))/0x2+parseInt(_0x51372d(0x16c))/0x3*(parseInt(_0x51372d(0x14a))/0x4)+-parseInt(_0x51372d(0x1c3))/0x5+-parseInt(_0x51372d(0x153))/0x6*(parseInt(_0x51372d(0x1a2))/0x7)+parseInt(_0x51372d(0x1a9))/0x8*(parseInt(_0x51372d(0x154))/0x9)+-parseInt(_0x51372d(0x1b8))/0xa*(-parseInt(_0x51372d(0x194))/0xb);if(_0x54582f===_0x88813d)break;else _0x53c4f8['push'](_0x53c4f8['shift']());}catch(_0xbcee1f){_0x53c4f8['push'](_0x53c4f8['shift']());}}}(_0x5e7e,0xec5dd));function _0x5e7e(){const _0x548de1=['body','thread-comment-data-source.config','@univerjs-pro/collaboration-client','rangeId','_initUserSync','@univerjs/thread-comment','userId','pipe','UNRECOGNIZED','Unknown','_config','addComment','reply','userID','addUser','deleteComment','Reply','rxjs','stringify','UniverThreadCommentDataSourcePlugin','258441ErdAll','bufferTime','code','user','values','@univerjs/core','merge','format','_commentService','root','parentId','Disposable','defineProperty','/list','type','length','_threadCommentDataSource','updateComment','IConfigService','getUnit','replyId','map','getComment','saveCommentToSnapshot','Module','662634tINURf','62018gZnxgO','error','ThreadCommentModel','@univerjs/thread-comment-ui','@univerjs-pro/license','getCurrentUser','unitId','/universer-api/comment/unit/','_initDataSource','comment','Solve','resolved','filter','_threadCommentDataSourceService','847ztadSi','threadId','_userService','customRanges','setConfig','Plugin','content','_injector','Delete','Add','_threadCommentModel','/add','get','/universer-api/user/list','7RuszdP','/reply','_sessionService','/solved','@univerjs/network','syncUpdateMutationToColla','comments','3954136RrgzSQ','subscribe','ref','dayjs','Solved','onReady','pluginName','/edit','disposeWithMe','delete','UNIVER_UNKNOWN','OpenOrReOpen','listComments','personId','YYYY/MM/DD\x20HH:mm','71410VQrBMD','commentUpdate$','post','requireSession','/delete','_configService','UserManagerService','parse','rangeType','createTimestamp','forEach','1448885PbOvNC','resolveComment','replies','HTTPService','getMemberID','size','CustomRangeType','COMMENT','12cICSAK','_httpService','solved','UniverThreadCommentUIPlugin','find','Injector','Inject','users','onStarting','4429644NAlAfc','9sEgaNA','add','dataSource','getOwnPropertyDescriptor'];_0x5e7e=function(){return _0x548de1;};return _0x5e7e();}Object[_0x81b9fc(0x178)](exports,Symbol['toStringTag'],{'value':_0x81b9fc(0x184)});const b=require(_0x81b9fc(0x15a)),T=require(_0x81b9fc(0x18a)),c=require(_0x81b9fc(0x171)),j=require(_0x81b9fc(0x189)),M=require(_0x81b9fc(0x15d)),w=require(_0x81b9fc(0x169)),P=require(_0x81b9fc(0x1a6)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x13558b=>(_0x13558b[_0x13558b[_0x81b9fc(0x1b4)]=0x0]=_0x81b9fc(0x1b4),_0x13558b[_0x13558b['Solved']=0x1]=_0x81b9fc(0x1ad),_0x13558b[_0x13558b['UNRECOGNIZED']=-0x1]=_0x81b9fc(0x160),_0x13558b))(I||{}),v=(_0x5b909d=>(_0x5b909d[_0x5b909d[_0x81b9fc(0x161)]=0x0]=_0x81b9fc(0x161),_0x5b909d[_0x5b909d[_0x81b9fc(0x19d)]=0x1]=_0x81b9fc(0x19d),_0x5b909d[_0x5b909d[_0x81b9fc(0x168)]=0x2]='Reply',_0x5b909d[_0x5b909d['Edit']=0x3]='Edit',_0x5b909d[_0x5b909d[_0x81b9fc(0x19c)]=0x4]=_0x81b9fc(0x19c),_0x5b909d[_0x5b909d[_0x81b9fc(0x190)]=0x5]=_0x81b9fc(0x190),_0x5b909d[_0x5b909d[_0x81b9fc(0x160)]=-0x1]=_0x81b9fc(0x160),_0x5b909d))(v||{});const f=_0x30c9bd=>c[_0x81b9fc(0x1ac)](new Date(+_0x30c9bd))[_0x81b9fc(0x173)](_0x81b9fc(0x1b7)),R=async(_0x113c61,_0x25d601)=>{const _0x4d4a1a=_0x81b9fc,_0x15e04c=_0x113c61['get'](c[_0x4d4a1a(0x1be)]),_0x5618af=_0x113c61[_0x4d4a1a(0x1a0)](P['HTTPService']);_0x25d601[_0x4d4a1a(0x1c2)](_0x29ee9a=>{const _0x39f5e6=_0x4d4a1a;_0x15e04c['getUser'](_0x29ee9a)&&_0x25d601[_0x39f5e6(0x1b2)](_0x29ee9a);}),_0x25d601[_0x4d4a1a(0x147)]&&(await _0x5618af[_0x4d4a1a(0x1a0)](_0x4d4a1a(0x1a1),{'params':{'userIDs':[..._0x25d601]}}))[_0x4d4a1a(0x158)][_0x4d4a1a(0x151)][_0x4d4a1a(0x1c2)](_0x3064c9=>{_0x3064c9&&_0x15e04c['addUser'](_0x3064c9);});};var $=Object[_0x81b9fc(0x157)],E=(_0x5994b1,_0x38a517,_0x1f1b58,_0x201979)=>{for(var _0x884656=_0x201979>0x1?void 0x0:_0x201979?$(_0x38a517,_0x1f1b58):_0x38a517,_0x3c8d91=_0x5994b1['length']-0x1,_0x3c5509;_0x3c8d91>=0x0;_0x3c8d91--)(_0x3c5509=_0x5994b1[_0x3c8d91])&&(_0x884656=_0x3c5509(_0x884656)||_0x884656);return _0x884656;},S=(_0x3bd4a3,_0x1a8dbe)=>(_0x26aebb,_0x278c14)=>_0x1a8dbe(_0x26aebb,_0x278c14,_0x3bd4a3);let p=class extends c[_0x81b9fc(0x177)]{constructor(_0x29b3ca,_0x505f9c,_0x8a232a,_0x2e5827){const _0x1c6479=_0x81b9fc;super(),this[_0x1c6479(0x174)]=_0x29b3ca,this[_0x1c6479(0x19e)]=_0x505f9c,this['_userService']=_0x8a232a,this['_injector']=_0x2e5827,this['_init'](),this[_0x1c6479(0x15c)]();}[_0x81b9fc(0x15c)](){const _0xdb2414=_0x81b9fc;this[_0xdb2414(0x1b1)](this['_threadCommentModel'][_0xdb2414(0x1b9)][_0xdb2414(0x15f)](w[_0xdb2414(0x16d)](0x10))[_0xdb2414(0x1aa)](_0x41160b=>{const _0x25083b=new Set();_0x41160b['forEach'](_0x2d2f8e=>{const _0x346033=_0x449e;switch(_0x2d2f8e['type']){case _0x346033(0x155):{const _0xcd4b29=_0x2d2f8e['payload'][_0x346033(0x1b6)];_0x25083b[_0x346033(0x155)](_0xcd4b29);break;}}}),R(this['_injector'],_0x25083b);}));}['_init'](){const _0xea9da8=_0x81b9fc;this['disposeWithMe'](this[_0xea9da8(0x174)][_0xea9da8(0x1b9)][_0xea9da8(0x1aa)](async _0x4e4c52=>{const _0x4f7ee8=_0xea9da8;var _0x3b3f3c,_0x121fc9,_0x4e957f,_0x2d11a5;const _0x129100=(_0x3b3f3c=this[_0x4f7ee8(0x19e)][_0x4f7ee8(0x17f)](_0x4e4c52[_0x4f7ee8(0x18c)])[_0x4f7ee8(0x14e)](_0x41e41d=>_0x41e41d[_0x4f7ee8(0x195)]===_0x4e4c52['threadId']))==null?void 0x0:_0x3b3f3c['root'];if(!_0x129100)return;const {unitId:_0x104463,subUnitId:_0x5b22d2}=_0x129100;switch(_0x4e4c52[_0x4f7ee8(0x16f)]&&this[_0x4f7ee8(0x196)][_0x4f7ee8(0x166)](_0x4e4c52[_0x4f7ee8(0x16f)]),_0x4e4c52[_0x4f7ee8(0x17a)]){case v[_0x4f7ee8(0x19d)]:break;case v[_0x4f7ee8(0x168)]:{this[_0x4f7ee8(0x19e)]['addComment'](_0x104463,_0x5b22d2,{'unitId':_0x104463,'subUnitId':_0x5b22d2,'ref':'','id':_0x4e4c52['replyId'],'dT':f(+_0x4e4c52['createTimestamp']),'threadId':_0x4e4c52[_0x4f7ee8(0x195)],'personId':(_0x4e957f=(_0x121fc9=_0x4e4c52[_0x4f7ee8(0x16f)])==null?void 0x0:_0x121fc9[_0x4f7ee8(0x165)])!=null?_0x4e957f:_0x4e4c52[_0x4f7ee8(0x15e)],'text':JSON[_0x4f7ee8(0x1bf)](_0x4e4c52[_0x4f7ee8(0x19a)]),'parentId':_0x129100['id']});break;}case v[_0x4f7ee8(0x19c)]:{const _0x310e16=this['_threadCommentModel'][_0x4f7ee8(0x182)](_0x104463,_0x5b22d2,_0x4e4c52['replyId']);_0x310e16&&_0x310e16[_0x4f7ee8(0x176)]&&this[_0x4f7ee8(0x19e)][_0x4f7ee8(0x167)](_0x104463,_0x5b22d2,_0x4e4c52['replyId']);break;}case v['Edit']:{this[_0x4f7ee8(0x19e)]['updateComment'](_0x104463,_0x5b22d2,{'commentId':_0x4e4c52[_0x4f7ee8(0x180)],'text':JSON['parse'](_0x4e4c52[_0x4f7ee8(0x19a)])});break;}case v[_0x4f7ee8(0x190)]:{const _0x1be96c=(_0x2d11a5=this[_0x4f7ee8(0x19e)][_0x4f7ee8(0x17f)](_0x4e4c52['unitId'])['find'](_0x20f207=>_0x20f207[_0x4f7ee8(0x195)]===_0x4e4c52[_0x4f7ee8(0x195)]))==null?void 0x0:_0x2d11a5[_0x4f7ee8(0x175)];_0x1be96c&&this['_threadCommentModel'][_0x4f7ee8(0x143)](_0x104463,_0x5b22d2,_0x1be96c['id'],_0x4e4c52[_0x4f7ee8(0x14c)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x81b9fc(0x150)](b['CommentService'])),S(0x1,c[_0x81b9fc(0x150)](M[_0x81b9fc(0x188)])),S(0x2,c[_0x81b9fc(0x150)](c['UserManagerService'])),S(0x3,c[_0x81b9fc(0x150)](c['Injector']))],p);const q=_0x81b9fc(0x159),D={};var A=Object[_0x81b9fc(0x157)],x=(_0x49a354,_0x2cc724,_0x2ef0c7,_0x58078d)=>{const _0x13bbee=_0x81b9fc;for(var _0x1ac35b=_0x58078d>0x1?void 0x0:_0x58078d?A(_0x2cc724,_0x2ef0c7):_0x2cc724,_0xb69760=_0x49a354[_0x13bbee(0x17b)]-0x1,_0x1ce3ae;_0xb69760>=0x0;_0xb69760--)(_0x1ce3ae=_0x49a354[_0xb69760])&&(_0x1ac35b=_0x1ce3ae(_0x1ac35b)||_0x1ac35b);return _0x1ac35b;},_=(_0x394d7c,_0x287e44)=>(_0x4dc0d5,_0xfa6da6)=>_0x287e44(_0x4dc0d5,_0xfa6da6,_0x394d7c);function Y(_0x29d2df,_0x4c520){const _0x122db1=_0x81b9fc,_0x201bd9=_0x29d2df[_0x122db1(0x144)][0x0];return{..._0x4c520,'id':_0x201bd9[_0x122db1(0x180)],'resolved':_0x29d2df['solved']===0x1,'dT':f(_0x201bd9[_0x122db1(0x1c1)]),'personId':_0x201bd9['userId'],'threadId':_0x201bd9[_0x122db1(0x195)]};}function G(_0x47482f,_0x3794d1,_0x52aa70){const _0x152226=_0x81b9fc;var _0x5da3c7,_0x3f8b27;if(((_0x3f8b27=(_0x5da3c7=_0x47482f==null?void 0x0:_0x47482f[_0x152226(0x144)])==null?void 0x0:_0x5da3c7[_0x152226(0x17b)])!=null?_0x3f8b27:0x0)>0x0){const _0x3afff0=(_0x35ddf5,_0x14f0f5)=>({'id':_0x35ddf5[_0x152226(0x180)],'threadId':_0x35ddf5[_0x152226(0x195)],'dT':f(_0x35ddf5[_0x152226(0x1c1)]),'personId':_0x35ddf5[_0x152226(0x15e)],'resolved':_0x47482f[_0x152226(0x14c)]===I[_0x152226(0x1ad)],'unitId':_0x3794d1,'subUnitId':_0x52aa70,'text':JSON[_0x152226(0x1bf)](_0x35ddf5[_0x152226(0x19a)]),'parentId':_0x14f0f5}),_0x387e19=_0x3afff0(_0x47482f[_0x152226(0x144)][0x0]);return{..._0x387e19,'children':_0x47482f[_0x152226(0x144)]['slice'](0x1)[_0x152226(0x181)](_0x4e822c=>_0x3afff0(_0x4e822c,_0x387e19['id']))};}return null;}let g=class{constructor(_0x5e9ca6,_0x18a100,_0x1ded56,_0x1971da){const _0x420060=_0x81b9fc;this[_0x420060(0x14b)]=_0x5e9ca6,this['_userService']=_0x18a100,this[_0x420060(0x1a4)]=_0x1ded56,this[_0x420060(0x19b)]=_0x1971da;}async[_0x81b9fc(0x163)](_0x3231e4){const _0xa95f0=_0x81b9fc;var _0xf87e3b,_0x5968ad;const {parentId:_0x2e707e,unitId:_0x1b1228,text:_0x917c9,threadId:_0x1991d1}=_0x3231e4,_0x2ca7fe=(_0x5968ad=(_0xf87e3b=_0x917c9[_0xa95f0(0x197)])==null?void 0x0:_0xf87e3b[_0xa95f0(0x192)](_0xe5d778=>_0xe5d778[_0xa95f0(0x1c0)]===c[_0xa95f0(0x148)][_0xa95f0(0x149)])['map'](_0x36f720=>_0x36f720[_0xa95f0(0x15b)]))!=null?_0x5968ad:[],_0x530ece=JSON['stringify'](_0x917c9),_0x643104=(await this[_0xa95f0(0x1a4)][_0xa95f0(0x1bb)](_0x1b1228))[_0xa95f0(0x146)]();if(_0x2e707e){const _0x4b18c2={'memberId':_0x643104,'unitId':_0x1b1228,'content':_0x530ece,'mention':_0x2ca7fe,'threadId':_0x1991d1},_0x29b298=(await this[_0xa95f0(0x14b)][_0xa95f0(0x1ba)](_0xa95f0(0x18d)+_0x1b1228+_0xa95f0(0x1a3),{'body':_0x4b18c2}))['body'][_0xa95f0(0x164)];return{..._0x3231e4,'id':_0x29b298[_0xa95f0(0x180)],'dT':c[_0xa95f0(0x1ac)](+_0x29b298[_0xa95f0(0x1c1)])['format'](_0xa95f0(0x1b7)),'personId':_0x29b298['userId']};}else{const _0x104b44={'memberId':_0x643104,'unitId':_0x1b1228,'content':_0x530ece,'mention':_0x2ca7fe},_0x3e5a5e=await this['_httpService'][_0xa95f0(0x1ba)](_0xa95f0(0x18d)+_0x1b1228+_0xa95f0(0x19f),{'body':_0x104b44});return Y(_0x3e5a5e[_0xa95f0(0x158)][_0xa95f0(0x18f)],_0x3231e4);}}async[_0x81b9fc(0x17d)](_0x3a8eef){const _0x4538c7=_0x81b9fc;var _0x4c339c,_0x3e678d;const {text:_0x3bd9f5,unitId:_0x4a9f45}=_0x3a8eef,_0x55a860=(_0x3e678d=(_0x4c339c=_0x3bd9f5[_0x4538c7(0x197)])==null?void 0x0:_0x4c339c[_0x4538c7(0x192)](_0x3b8eb0=>_0x3b8eb0[_0x4538c7(0x1c0)]===c['CustomRangeType'][_0x4538c7(0x149)])[_0x4538c7(0x181)](_0x290f80=>_0x290f80[_0x4538c7(0x15b)]))!=null?_0x3e678d:[],_0x186d1f=JSON[_0x4538c7(0x16a)](_0x3bd9f5),_0x45fafb=_0x3a8eef[_0x4538c7(0x195)],_0xab4b74=_0x3a8eef['id'],_0x51fd38={'memberId':(await this[_0x4538c7(0x1a4)][_0x4538c7(0x1bb)](_0x4a9f45))[_0x4538c7(0x146)](),'unitId':_0x4a9f45,'threadId':_0x45fafb,'mention':_0x55a860,'content':_0x186d1f,'replyId':_0xab4b74},_0x1a276d=await this[_0x4538c7(0x14b)][_0x4538c7(0x1ba)]('/universer-api/comment/unit/'+_0x4a9f45+_0x4538c7(0x1b0),{'body':_0x51fd38});return!_0x1a276d['body']['error']||_0x1a276d[_0x4538c7(0x158)][_0x4538c7(0x187)][_0x4538c7(0x16e)]===0x1;}async[_0x81b9fc(0x143)](_0x1aa67){const _0x3bf575=_0x81b9fc,{unitId:_0x527ff6}=_0x1aa67,_0x3d7fee=_0x1aa67[_0x3bf575(0x195)],_0x3f78e5={'memberId':this[_0x3bf575(0x196)][_0x3bf575(0x18b)]()[_0x3bf575(0x165)],'unitId':_0x527ff6,'threadId':_0x3d7fee,'solved':_0x1aa67[_0x3bf575(0x191)]?I[_0x3bf575(0x1ad)]:I[_0x3bf575(0x1b4)]},_0x824b7a=await this['_httpService'][_0x3bf575(0x1ba)]('/universer-api/comment/unit/'+_0x527ff6+_0x3bf575(0x1a5),{'body':_0x3f78e5});return!_0x824b7a['body'][_0x3bf575(0x187)]||_0x824b7a[_0x3bf575(0x158)][_0x3bf575(0x187)]['code']===0x1;}async['deleteComment'](_0x400fbf,_0x41ecfa,_0x3f07e6,_0xb80ab){const _0xa432ce=_0x81b9fc,_0x2829dc={'memberId':(await this[_0xa432ce(0x1a4)][_0xa432ce(0x1bb)](_0x400fbf))[_0xa432ce(0x146)](),'threadId':_0x3f07e6,'replyId':_0xb80ab,'unitId':_0x400fbf},_0x325ec3=await this[_0xa432ce(0x14b)][_0xa432ce(0x1ba)]('/universer-api/comment/unit/'+_0x400fbf+_0xa432ce(0x1bc),{'body':_0x2829dc});return!_0x325ec3[_0xa432ce(0x158)][_0xa432ce(0x187)]||_0x325ec3[_0xa432ce(0x158)][_0xa432ce(0x187)][_0xa432ce(0x16e)]===0x1;}async[_0x81b9fc(0x1b5)](_0x3e091d,_0x2ddd89,_0x461767){const _0x50e9c7=_0x81b9fc,_0x239710={'unitId':_0x3e091d,'threadId':_0x461767},_0x1ae5d0=await this['_httpService'][_0x50e9c7(0x1ba)](_0x50e9c7(0x18d)+_0x3e091d+_0x50e9c7(0x179),{'body':_0x239710}),_0x57305f=_0x461767[_0x50e9c7(0x181)](_0x2562f2=>G(_0x1ae5d0[_0x50e9c7(0x158)][_0x50e9c7(0x1a8)][_0x2562f2],_0x3e091d,_0x2ddd89))['filter'](Boolean);return Object[_0x50e9c7(0x170)](_0x1ae5d0['body'][_0x50e9c7(0x151)])[_0x50e9c7(0x1c2)](_0x549a1a=>{const _0x1a59e8=_0x50e9c7;this[_0x1a59e8(0x196)]['addUser'](_0x549a1a);}),_0x57305f;}[_0x81b9fc(0x183)](_0x2cb605){const _0x3ebec8=_0x81b9fc;return{'id':_0x2cb605['id'],'threadId':_0x2cb605[_0x3ebec8(0x195)],'ref':_0x2cb605[_0x3ebec8(0x1ab)]};}};g=x([_(0x0,c[_0x81b9fc(0x150)](P[_0x81b9fc(0x145)])),_(0x1,c[_0x81b9fc(0x150)](c[_0x81b9fc(0x1be)])),_(0x2,c[_0x81b9fc(0x150)](b['CollaborationSessionService'])),_(0x3,c[_0x81b9fc(0x150)](c[_0x81b9fc(0x14f)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x233099,_0x195d6f,_0x1cd700,_0x1361aa)=>{const _0x7baa80=_0x81b9fc;for(var _0x5ea9c7=_0x1361aa>0x1?void 0x0:_0x1361aa?H(_0x195d6f,_0x1cd700):_0x195d6f,_0x9b3ee1=_0x233099[_0x7baa80(0x17b)]-0x1,_0x567176;_0x9b3ee1>=0x0;_0x9b3ee1--)(_0x567176=_0x233099[_0x9b3ee1])&&(_0x5ea9c7=_0x567176(_0x5ea9c7)||_0x5ea9c7);return _0x5ea9c7;},y=(_0x2b3103,_0x5e9fe8)=>(_0x3a42ba,_0x38d1a1)=>_0x5e9fe8(_0x3a42ba,_0x38d1a1,_0x2b3103);let C=class extends c[_0x81b9fc(0x177)]{constructor(_0x4c5aad,_0x3c0b6e){const _0x1031d0=_0x81b9fc;super(),this[_0x1031d0(0x193)]=_0x4c5aad,this[_0x1031d0(0x17c)]=_0x3c0b6e,this[_0x1031d0(0x18e)]();}[_0x81b9fc(0x18e)](){const _0x4a8fa6=_0x81b9fc;this[_0x4a8fa6(0x193)][_0x4a8fa6(0x156)]=this[_0x4a8fa6(0x17c)],this['_threadCommentDataSourceService'][_0x4a8fa6(0x1a7)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](g))],C);function _0x449e(_0x240559,_0x1150dc){const _0x5e7e63=_0x5e7e();return _0x449e=function(_0x449e8d,_0x4e5c29){_0x449e8d=_0x449e8d-0x143;let _0x1885e1=_0x5e7e63[_0x449e8d];return _0x1885e1;},_0x449e(_0x240559,_0x1150dc);}var F=Object[_0x81b9fc(0x178)],L=Object[_0x81b9fc(0x157)],Z=(_0xc90ecd,_0x8e437a,_0x4bcc58)=>_0x8e437a in _0xc90ecd?F(_0xc90ecd,_0x8e437a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4bcc58}):_0xc90ecd[_0x8e437a]=_0x4bcc58,W=(_0x3b4da1,_0x4b7c1d,_0x7d2557,_0x263e4a)=>{const _0x3a4051=_0x81b9fc;for(var _0x185249=_0x263e4a>0x1?void 0x0:_0x263e4a?L(_0x4b7c1d,_0x7d2557):_0x4b7c1d,_0x594ecb=_0x3b4da1[_0x3a4051(0x17b)]-0x1,_0x538081;_0x594ecb>=0x0;_0x594ecb--)(_0x538081=_0x3b4da1[_0x594ecb])&&(_0x185249=_0x538081(_0x185249)||_0x185249);return _0x185249;},O=(_0x355aa,_0xffc069)=>(_0x44fa09,_0x33134e)=>_0xffc069(_0x44fa09,_0x33134e,_0x355aa),N=(_0x3541cc,_0x3fb5ff,_0x226987)=>Z(_0x3541cc,typeof _0x3fb5ff!='symbol'?_0x3fb5ff+'':_0x3fb5ff,_0x226987);exports[_0x81b9fc(0x16b)]=class extends c[_0x81b9fc(0x199)]{constructor(_0x39211f=D,_0x5c4e72,_0x8d9c25){const _0x1f6ddf=_0x81b9fc;super(),this[_0x1f6ddf(0x162)]=_0x39211f,this['_injector']=_0x5c4e72,this[_0x1f6ddf(0x1bd)]=_0x8d9c25;const {..._0x2eb46f}=c[_0x1f6ddf(0x172)]({},D,this[_0x1f6ddf(0x162)]);this[_0x1f6ddf(0x1bd)][_0x1f6ddf(0x198)](q,_0x2eb46f);}[_0x81b9fc(0x152)](){const _0x258c4e=_0x81b9fc;[[g],[C],[p]][_0x258c4e(0x1c2)](_0x444e8e=>{const _0x421ee3=_0x258c4e;this[_0x421ee3(0x19b)]['add'](_0x444e8e);});}[_0x81b9fc(0x1ae)](){const _0x34bdec=_0x81b9fc;this['_injector'][_0x34bdec(0x1a0)](C),this[_0x34bdec(0x19b)][_0x34bdec(0x1a0)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x81b9fc(0x1af),U),N(exports[_0x81b9fc(0x16b)],_0x81b9fc(0x17a),c['UniverInstanceType'][_0x81b9fc(0x1b3)]),exports[_0x81b9fc(0x16b)]=W([c['DependentOn'](j[_0x81b9fc(0x14d)],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c['Inject'](c[_0x81b9fc(0x14f)])),O(0x2,c[_0x81b9fc(0x17e)])],exports[_0x81b9fc(0x16b)]);
|
|
1
|
+
'use strict';const _0x588ebe=_0x4453;(function(_0x1b26e3,_0x282bcf){const _0x5a62c5=_0x4453,_0x4ea96e=_0x1b26e3();while(!![]){try{const _0x5819dc=-parseInt(_0x5a62c5(0xc7))/0x1+parseInt(_0x5a62c5(0xd2))/0x2+parseInt(_0x5a62c5(0xe7))/0x3+parseInt(_0x5a62c5(0xc9))/0x4+parseInt(_0x5a62c5(0x95))/0x5+parseInt(_0x5a62c5(0x74))/0x6*(-parseInt(_0x5a62c5(0xa5))/0x7)+parseInt(_0x5a62c5(0xb0))/0x8*(-parseInt(_0x5a62c5(0xbb))/0x9);if(_0x5819dc===_0x282bcf)break;else _0x4ea96e['push'](_0x4ea96e['shift']());}catch(_0x546a4d){_0x4ea96e['push'](_0x4ea96e['shift']());}}}(_0x38b1,0xa32cf));Object[_0x588ebe(0xcd)](exports,Symbol['toStringTag'],{'value':_0x588ebe(0xd6)});const b=require(_0x588ebe(0xa8)),T=require(_0x588ebe(0x7b)),c=require(_0x588ebe(0x76)),j=require(_0x588ebe(0xbe)),M=require(_0x588ebe(0xe5)),w=require(_0x588ebe(0xa7)),P=require(_0x588ebe(0xcc)),U=_0x588ebe(0x77);function _0x4453(_0x5c3ccf,_0x7e319f){const _0x38b17b=_0x38b1();return _0x4453=function(_0x44536,_0xac7f3b){_0x44536=_0x44536-0x66;let _0x52845c=_0x38b17b[_0x44536];return _0x52845c;},_0x4453(_0x5c3ccf,_0x7e319f);}var I=(_0x4e2ba8=>(_0x4e2ba8[_0x4e2ba8[_0x588ebe(0x97)]=0x0]=_0x588ebe(0x97),_0x4e2ba8[_0x4e2ba8[_0x588ebe(0x84)]=0x1]=_0x588ebe(0x84),_0x4e2ba8[_0x4e2ba8['UNRECOGNIZED']=-0x1]=_0x588ebe(0x70),_0x4e2ba8))(I||{}),v=(_0x26f3d6=>(_0x26f3d6[_0x26f3d6[_0x588ebe(0x69)]=0x0]=_0x588ebe(0x69),_0x26f3d6[_0x26f3d6['Add']=0x1]=_0x588ebe(0xdc),_0x26f3d6[_0x26f3d6['Reply']=0x2]='Reply',_0x26f3d6[_0x26f3d6[_0x588ebe(0xc2)]=0x3]=_0x588ebe(0xc2),_0x26f3d6[_0x26f3d6[_0x588ebe(0xb1)]=0x4]='Delete',_0x26f3d6[_0x26f3d6[_0x588ebe(0x86)]=0x5]='Solve',_0x26f3d6[_0x26f3d6[_0x588ebe(0x70)]=-0x1]=_0x588ebe(0x70),_0x26f3d6))(v||{});const f=_0x415986=>c[_0x588ebe(0xba)](new Date(+_0x415986))['format'](_0x588ebe(0xdb)),R=async(_0x165d8e,_0x3a9554)=>{const _0x296b1f=_0x588ebe,_0x37acbb=_0x165d8e['get'](c[_0x296b1f(0x9b)]),_0x34c100=_0x165d8e[_0x296b1f(0xca)](P[_0x296b1f(0xc1)]);_0x3a9554[_0x296b1f(0x6f)](_0x4ba3d4=>{const _0x423f7c=_0x296b1f;_0x37acbb['getUser'](_0x4ba3d4)&&_0x3a9554[_0x423f7c(0xa3)](_0x4ba3d4);}),_0x3a9554[_0x296b1f(0xd0)]&&(await _0x34c100[_0x296b1f(0xca)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3a9554]}}))[_0x296b1f(0xce)][_0x296b1f(0xb5)][_0x296b1f(0x6f)](_0x209b07=>{const _0x9cb877=_0x296b1f;_0x209b07&&_0x37acbb[_0x9cb877(0x96)](_0x209b07);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x4b75cf,_0x14cdf9,_0x18924a,_0x2a5351)=>{for(var _0x400ee4=_0x2a5351>0x1?void 0x0:_0x2a5351?$(_0x14cdf9,_0x18924a):_0x14cdf9,_0x3acf77=_0x4b75cf['length']-0x1,_0x488b88;_0x3acf77>=0x0;_0x3acf77--)(_0x488b88=_0x4b75cf[_0x3acf77])&&(_0x400ee4=_0x488b88(_0x400ee4)||_0x400ee4);return _0x400ee4;},S=(_0x535a50,_0x1263bc)=>(_0x22b249,_0x4e416e)=>_0x1263bc(_0x22b249,_0x4e416e,_0x535a50);let p=class extends c[_0x588ebe(0xc8)]{constructor(_0x87bdaa,_0x416a42,_0xd8c281,_0x2bfa25){const _0x318912=_0x588ebe;super(),this['_commentService']=_0x87bdaa,this[_0x318912(0xa1)]=_0x416a42,this[_0x318912(0xd9)]=_0xd8c281,this[_0x318912(0x9d)]=_0x2bfa25,this[_0x318912(0xc6)](),this['_initUserSync']();}[_0x588ebe(0x7e)](){const _0x1132b1=_0x588ebe;this[_0x1132b1(0xd5)](this[_0x1132b1(0xa1)]['commentUpdate$'][_0x1132b1(0x9f)](w[_0x1132b1(0x88)](0x10))['subscribe'](_0x53b44d=>{const _0x4a163c=_0x1132b1,_0x34d77d=new Set();_0x53b44d[_0x4a163c(0x6f)](_0x17fdc2=>{const _0x53f26b=_0x4a163c;switch(_0x17fdc2[_0x53f26b(0x90)]){case'add':{const _0x2c64e7=_0x17fdc2[_0x53f26b(0x8e)][_0x53f26b(0xa2)];_0x34d77d[_0x53f26b(0x83)](_0x2c64e7);break;}}}),R(this['_injector'],_0x34d77d);}));}[_0x588ebe(0xc6)](){const _0x1dc675=_0x588ebe;this[_0x1dc675(0xd5)](this[_0x1dc675(0x6b)][_0x1dc675(0x8b)][_0x1dc675(0x9c)](async _0x36faea=>{const _0x5e3fbf=_0x1dc675;var _0x5b7388,_0x22626d,_0x5bc60e,_0x540c08;const _0x47469e=(_0x5b7388=this[_0x5e3fbf(0xa1)][_0x5e3fbf(0x85)](_0x36faea[_0x5e3fbf(0xac)])[_0x5e3fbf(0xc4)](_0x4e0b9d=>_0x4e0b9d[_0x5e3fbf(0x9e)]===_0x36faea['threadId']))==null?void 0x0:_0x5b7388[_0x5e3fbf(0xb6)];if(!_0x47469e)return;const {unitId:_0x70bea8,subUnitId:_0x40f93a}=_0x47469e;switch(_0x36faea[_0x5e3fbf(0xaf)]&&this[_0x5e3fbf(0xd9)][_0x5e3fbf(0x96)](_0x36faea[_0x5e3fbf(0xaf)]),_0x36faea[_0x5e3fbf(0x90)]){case v['Add']:break;case v[_0x5e3fbf(0xd8)]:{this[_0x5e3fbf(0xa1)][_0x5e3fbf(0xd1)](_0x70bea8,_0x40f93a,{'unitId':_0x70bea8,'subUnitId':_0x40f93a,'ref':'','id':_0x36faea[_0x5e3fbf(0x94)],'dT':f(+_0x36faea[_0x5e3fbf(0xd4)]),'threadId':_0x36faea[_0x5e3fbf(0x9e)],'personId':(_0x5bc60e=(_0x22626d=_0x36faea[_0x5e3fbf(0xaf)])==null?void 0x0:_0x22626d[_0x5e3fbf(0xbf)])!=null?_0x5bc60e:_0x36faea[_0x5e3fbf(0xdd)],'text':JSON['parse'](_0x36faea[_0x5e3fbf(0xbd)]),'parentId':_0x47469e['id']});break;}case v[_0x5e3fbf(0xb1)]:{const _0x48163b=this[_0x5e3fbf(0xa1)][_0x5e3fbf(0xcf)](_0x70bea8,_0x40f93a,_0x36faea['replyId']);_0x48163b&&_0x48163b[_0x5e3fbf(0x87)]&&this[_0x5e3fbf(0xa1)][_0x5e3fbf(0xe1)](_0x70bea8,_0x40f93a,_0x36faea[_0x5e3fbf(0x94)]);break;}case v[_0x5e3fbf(0xc2)]:{this[_0x5e3fbf(0xa1)]['updateComment'](_0x70bea8,_0x40f93a,{'commentId':_0x36faea[_0x5e3fbf(0x94)],'text':JSON[_0x5e3fbf(0x92)](_0x36faea[_0x5e3fbf(0xbd)])});break;}case v[_0x5e3fbf(0x86)]:{const _0x1fdcb6=(_0x540c08=this[_0x5e3fbf(0xa1)]['getUnit'](_0x36faea['unitId'])[_0x5e3fbf(0xc4)](_0x1dd8ff=>_0x1dd8ff[_0x5e3fbf(0x9e)]===_0x36faea[_0x5e3fbf(0x9e)]))==null?void 0x0:_0x540c08[_0x5e3fbf(0xb6)];_0x1fdcb6&&this['_threadCommentModel'][_0x5e3fbf(0x73)](_0x70bea8,_0x40f93a,_0x1fdcb6['id'],_0x36faea['solved']===I['Solved']);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x588ebe(0x79)])),S(0x1,c[_0x588ebe(0xb8)](M[_0x588ebe(0xbc)])),S(0x2,c['Inject'](c['UserManagerService'])),S(0x3,c[_0x588ebe(0xb8)](c[_0x588ebe(0xa4)]))],p);const q=_0x588ebe(0x99),D={};function _0x38b1(){const _0x3aaf74=['unitId','_httpService','ref','user','460632wjyioD','Delete','map','reply','length','users','root','saveCommentToSnapshot','Inject','_threadCommentDataSourceService','dayjs','126RbdQHh','ThreadCommentModel','content','@univerjs/thread-comment-ui','userID','syncUpdateMutationToColla','HTTPService','Edit','stringify','find','/solved','_init','861183jQynnH','Disposable','2879476WaxIAd','get','getOwnPropertyDescriptor','@univerjs/network','defineProperty','body','getComment','size','addComment','1346760DjbxQU','setConfig','createTimestamp','disposeWithMe','Module','code','Reply','_userService','UniverLicensePlugin','YYYY/MM/DD\x20HH:mm','Add','userId','filter','error','customRanges','deleteComment','UniverThreadCommentUIPlugin','resolved','slice','@univerjs/thread-comment','_sessionService','283113cgRkoV','UNIVER_UNKNOWN','updateComment','merge','onReady','Unknown','/list','_commentService','getMemberID','replies','UniverThreadCommentDataSourcePlugin','forEach','UNRECOGNIZED','CustomRangeType','dataSource','resolveComment','390YpBZkJ','solved','@univerjs/core','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getCurrentUser','CommentService','_config','@univerjs-pro/license','_threadCommentDataSource','onStarting','_initUserSync','/universer-api/comment/unit/','_initDataSource','UniverInstanceType','Plugin','add','Solved','getUnit','Solve','parentId','bufferTime','DependentOn','rangeType','commentUpdate$','IConfigService','comments','payload','_configService','type','IThreadCommentDataSourceService','parse','/reply','replyId','5027005HpwUCi','addUser','OpenOrReOpen','comment','thread-comment-data-source.config','COMMENT','UserManagerService','subscribe','_injector','threadId','pipe','pluginName','_threadCommentModel','personId','delete','Injector','16947dohZQk','UniverCollaborationClientPlugin','rxjs','@univerjs-pro/collaboration-client','format','/add','post'];_0x38b1=function(){return _0x3aaf74;};return _0x38b1();}var A=Object[_0x588ebe(0xcb)],x=(_0x3add89,_0x28e5df,_0x3a29c6,_0x3529ed)=>{for(var _0x569efb=_0x3529ed>0x1?void 0x0:_0x3529ed?A(_0x28e5df,_0x3a29c6):_0x28e5df,_0x3feb76=_0x3add89['length']-0x1,_0x588548;_0x3feb76>=0x0;_0x3feb76--)(_0x588548=_0x3add89[_0x3feb76])&&(_0x569efb=_0x588548(_0x569efb)||_0x569efb);return _0x569efb;},_=(_0x496b09,_0xc9157b)=>(_0x43f90f,_0x4bf5c0)=>_0xc9157b(_0x43f90f,_0x4bf5c0,_0x496b09);function Y(_0x5c1752,_0x262721){const _0x309f2d=_0x588ebe,_0x20dd18=_0x5c1752['replies'][0x0];return{..._0x262721,'id':_0x20dd18[_0x309f2d(0x94)],'resolved':_0x5c1752[_0x309f2d(0x75)]===0x1,'dT':f(_0x20dd18[_0x309f2d(0xd4)]),'personId':_0x20dd18[_0x309f2d(0xdd)],'threadId':_0x20dd18['threadId']};}function G(_0x26aa7b,_0x594217,_0x49e656){const _0xb292e0=_0x588ebe;var _0x2a9b78,_0x935e43;if(((_0x935e43=(_0x2a9b78=_0x26aa7b==null?void 0x0:_0x26aa7b[_0xb292e0(0x6d)])==null?void 0x0:_0x2a9b78[_0xb292e0(0xb4)])!=null?_0x935e43:0x0)>0x0){const _0x4fc694=(_0x10aa47,_0x49c4e5)=>({'id':_0x10aa47[_0xb292e0(0x94)],'threadId':_0x10aa47[_0xb292e0(0x9e)],'dT':f(_0x10aa47[_0xb292e0(0xd4)]),'personId':_0x10aa47[_0xb292e0(0xdd)],'resolved':_0x26aa7b['solved']===I['Solved'],'unitId':_0x594217,'subUnitId':_0x49e656,'text':JSON[_0xb292e0(0x92)](_0x10aa47['content']),'parentId':_0x49c4e5}),_0x4ae3d0=_0x4fc694(_0x26aa7b[_0xb292e0(0x6d)][0x0]);return{..._0x4ae3d0,'children':_0x26aa7b[_0xb292e0(0x6d)][_0xb292e0(0xe4)](0x1)[_0xb292e0(0xb2)](_0x252c5e=>_0x4fc694(_0x252c5e,_0x4ae3d0['id']))};}return null;}let g=class{constructor(_0x532c7f,_0x4c5e2a,_0x3a069f,_0x5e0f6e){const _0x3faaa1=_0x588ebe;this[_0x3faaa1(0xad)]=_0x532c7f,this[_0x3faaa1(0xd9)]=_0x4c5e2a,this[_0x3faaa1(0xe6)]=_0x3a069f,this[_0x3faaa1(0x9d)]=_0x5e0f6e;}async[_0x588ebe(0xd1)](_0x105458){const _0x20578f=_0x588ebe;var _0x26062f,_0x1b67d0;const {parentId:_0x3f21d3,unitId:_0x18bdf2,text:_0x230829,threadId:_0x4936fc}=_0x105458,_0x359f1c=(_0x1b67d0=(_0x26062f=_0x230829['customRanges'])==null?void 0x0:_0x26062f[_0x20578f(0xde)](_0xee861b=>_0xee861b[_0x20578f(0x8a)]===c['CustomRangeType'][_0x20578f(0x9a)])[_0x20578f(0xb2)](_0x1daa85=>_0x1daa85['rangeId']))!=null?_0x1b67d0:[],_0x3ec544=JSON[_0x20578f(0xc3)](_0x230829),_0x494ce2=(await this['_sessionService']['requireSession'](_0x18bdf2))[_0x20578f(0x6c)]();if(_0x3f21d3){const _0x37a387={'memberId':_0x494ce2,'unitId':_0x18bdf2,'content':_0x3ec544,'mention':_0x359f1c,'threadId':_0x4936fc},_0x52e5bc=(await this['_httpService']['post'](_0x20578f(0x7f)+_0x18bdf2+_0x20578f(0x93),{'body':_0x37a387}))[_0x20578f(0xce)][_0x20578f(0xb3)];return{..._0x105458,'id':_0x52e5bc['replyId'],'dT':c[_0x20578f(0xba)](+_0x52e5bc[_0x20578f(0xd4)])[_0x20578f(0xa9)](_0x20578f(0xdb)),'personId':_0x52e5bc['userId']};}else{const _0x3f29c2={'memberId':_0x494ce2,'unitId':_0x18bdf2,'content':_0x3ec544,'mention':_0x359f1c},_0x25b6f0=await this[_0x20578f(0xad)][_0x20578f(0xab)](_0x20578f(0x7f)+_0x18bdf2+_0x20578f(0xaa),{'body':_0x3f29c2});return Y(_0x25b6f0[_0x20578f(0xce)][_0x20578f(0x98)],_0x105458);}}async[_0x588ebe(0x66)](_0x16c6e1){const _0x38bf09=_0x588ebe;var _0x485c7a,_0x2c29f6;const {text:_0x1fcac6,unitId:_0x30c0c8}=_0x16c6e1,_0x52bfeb=(_0x2c29f6=(_0x485c7a=_0x1fcac6[_0x38bf09(0xe0)])==null?void 0x0:_0x485c7a['filter'](_0x2d1998=>_0x2d1998[_0x38bf09(0x8a)]===c[_0x38bf09(0x71)][_0x38bf09(0x9a)])[_0x38bf09(0xb2)](_0x2f8744=>_0x2f8744['rangeId']))!=null?_0x2c29f6:[],_0x9cba72=JSON['stringify'](_0x1fcac6),_0x144b21=_0x16c6e1[_0x38bf09(0x9e)],_0x440eb8=_0x16c6e1['id'],_0x4791d1={'memberId':(await this[_0x38bf09(0xe6)]['requireSession'](_0x30c0c8))[_0x38bf09(0x6c)](),'unitId':_0x30c0c8,'threadId':_0x144b21,'mention':_0x52bfeb,'content':_0x9cba72,'replyId':_0x440eb8},_0x3a7c11=await this['_httpService'][_0x38bf09(0xab)](_0x38bf09(0x7f)+_0x30c0c8+'/edit',{'body':_0x4791d1});return!_0x3a7c11[_0x38bf09(0xce)][_0x38bf09(0xdf)]||_0x3a7c11['body'][_0x38bf09(0xdf)][_0x38bf09(0xd7)]===0x1;}async[_0x588ebe(0x73)](_0x431c33){const _0x9a293c=_0x588ebe,{unitId:_0x462d41}=_0x431c33,_0x59cf0a=_0x431c33[_0x9a293c(0x9e)],_0x4e2c8d={'memberId':this[_0x9a293c(0xd9)][_0x9a293c(0x78)]()['userID'],'unitId':_0x462d41,'threadId':_0x59cf0a,'solved':_0x431c33[_0x9a293c(0xe3)]?I['Solved']:I[_0x9a293c(0x97)]},_0x5857bd=await this[_0x9a293c(0xad)][_0x9a293c(0xab)](_0x9a293c(0x7f)+_0x462d41+_0x9a293c(0xc5),{'body':_0x4e2c8d});return!_0x5857bd[_0x9a293c(0xce)][_0x9a293c(0xdf)]||_0x5857bd[_0x9a293c(0xce)]['error'][_0x9a293c(0xd7)]===0x1;}async[_0x588ebe(0xe1)](_0x1f3267,_0x384497,_0x555856,_0x2693c9){const _0x413ca2=_0x588ebe,_0x4e2cea={'memberId':(await this[_0x413ca2(0xe6)]['requireSession'](_0x1f3267))[_0x413ca2(0x6c)](),'threadId':_0x555856,'replyId':_0x2693c9,'unitId':_0x1f3267},_0x26a223=await this[_0x413ca2(0xad)][_0x413ca2(0xab)]('/universer-api/comment/unit/'+_0x1f3267+'/delete',{'body':_0x4e2cea});return!_0x26a223[_0x413ca2(0xce)][_0x413ca2(0xdf)]||_0x26a223[_0x413ca2(0xce)][_0x413ca2(0xdf)][_0x413ca2(0xd7)]===0x1;}async['listComments'](_0x1ff5dd,_0xa70cf8,_0x48bb25){const _0xbe0e05=_0x588ebe,_0x481894={'unitId':_0x1ff5dd,'threadId':_0x48bb25},_0x10aa69=await this[_0xbe0e05(0xad)][_0xbe0e05(0xab)](_0xbe0e05(0x7f)+_0x1ff5dd+_0xbe0e05(0x6a),{'body':_0x481894}),_0x4691ad=_0x48bb25['map'](_0x37d9d0=>G(_0x10aa69[_0xbe0e05(0xce)][_0xbe0e05(0x8d)][_0x37d9d0],_0x1ff5dd,_0xa70cf8))['filter'](Boolean);return Object['values'](_0x10aa69['body'][_0xbe0e05(0xb5)])[_0xbe0e05(0x6f)](_0x197c04=>{const _0x5e1978=_0xbe0e05;this[_0x5e1978(0xd9)][_0x5e1978(0x96)](_0x197c04);}),_0x4691ad;}[_0x588ebe(0xb7)](_0x3f225f){const _0x31d037=_0x588ebe;return{'id':_0x3f225f['id'],'threadId':_0x3f225f[_0x31d037(0x9e)],'ref':_0x3f225f[_0x31d037(0xae)]};}};g=x([_(0x0,c[_0x588ebe(0xb8)](P['HTTPService'])),_(0x1,c[_0x588ebe(0xb8)](c[_0x588ebe(0x9b)])),_(0x2,c[_0x588ebe(0xb8)](b['CollaborationSessionService'])),_(0x3,c['Inject'](c['Injector']))],g);var H=Object[_0x588ebe(0xcb)],J=(_0xa9998e,_0x5ad9ff,_0x316dd1,_0x5b71b2)=>{const _0xb31b5=_0x588ebe;for(var _0x300de9=_0x5b71b2>0x1?void 0x0:_0x5b71b2?H(_0x5ad9ff,_0x316dd1):_0x5ad9ff,_0x58dfd3=_0xa9998e[_0xb31b5(0xb4)]-0x1,_0xd978a8;_0x58dfd3>=0x0;_0x58dfd3--)(_0xd978a8=_0xa9998e[_0x58dfd3])&&(_0x300de9=_0xd978a8(_0x300de9)||_0x300de9);return _0x300de9;},y=(_0x19d6ab,_0x3a5426)=>(_0x404c4e,_0x201ba4)=>_0x3a5426(_0x404c4e,_0x201ba4,_0x19d6ab);let C=class extends c['Disposable']{constructor(_0x1b7e14,_0x10de43){const _0x2e0736=_0x588ebe;super(),this['_threadCommentDataSourceService']=_0x1b7e14,this[_0x2e0736(0x7c)]=_0x10de43,this[_0x2e0736(0x80)]();}[_0x588ebe(0x80)](){const _0xe4d7b6=_0x588ebe;this[_0xe4d7b6(0xb9)][_0xe4d7b6(0x72)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0xe4d7b6(0xc0)]=!0x1;}};C=J([y(0x0,M[_0x588ebe(0x91)]),y(0x1,c['Inject'](g))],C);var F=Object['defineProperty'],L=Object[_0x588ebe(0xcb)],Z=(_0x343ad8,_0x354d76,_0x46ad6a)=>_0x354d76 in _0x343ad8?F(_0x343ad8,_0x354d76,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x46ad6a}):_0x343ad8[_0x354d76]=_0x46ad6a,W=(_0x16cc39,_0x501cc8,_0x340f30,_0x28bc83)=>{for(var _0x67d02=_0x28bc83>0x1?void 0x0:_0x28bc83?L(_0x501cc8,_0x340f30):_0x501cc8,_0x304ade=_0x16cc39['length']-0x1,_0x535761;_0x304ade>=0x0;_0x304ade--)(_0x535761=_0x16cc39[_0x304ade])&&(_0x67d02=_0x535761(_0x67d02)||_0x67d02);return _0x67d02;},O=(_0x83089c,_0x2835ed)=>(_0x39a071,_0x3c4ab3)=>_0x2835ed(_0x39a071,_0x3c4ab3,_0x83089c),N=(_0x4c224b,_0xcae11,_0x49fbe2)=>Z(_0x4c224b,typeof _0xcae11!='symbol'?_0xcae11+'':_0xcae11,_0x49fbe2);exports[_0x588ebe(0x6e)]=class extends c[_0x588ebe(0x82)]{constructor(_0x9ec111=D,_0x2fc8f4,_0x256fe7){const _0x5986e4=_0x588ebe;super(),this[_0x5986e4(0x7a)]=_0x9ec111,this[_0x5986e4(0x9d)]=_0x2fc8f4,this['_configService']=_0x256fe7;const {..._0x475427}=c[_0x5986e4(0x67)]({},D,this[_0x5986e4(0x7a)]);this[_0x5986e4(0x8f)][_0x5986e4(0xd3)](q,_0x475427);}[_0x588ebe(0x7d)](){const _0x12d6ab=_0x588ebe;[[g],[C],[p]][_0x12d6ab(0x6f)](_0x1997a5=>{const _0x214cd8=_0x12d6ab;this[_0x214cd8(0x9d)][_0x214cd8(0x83)](_0x1997a5);});}[_0x588ebe(0x68)](){const _0x27c84f=_0x588ebe;this[_0x27c84f(0x9d)][_0x27c84f(0xca)](C),this[_0x27c84f(0x9d)]['get'](p);}},N(exports[_0x588ebe(0x6e)],_0x588ebe(0xa0),U),N(exports[_0x588ebe(0x6e)],_0x588ebe(0x90),c[_0x588ebe(0x81)][_0x588ebe(0xe8)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x588ebe(0x89)](j[_0x588ebe(0xe2)],b[_0x588ebe(0xa6)],T[_0x588ebe(0xda)]),O(0x1,c[_0x588ebe(0xb8)](c[_0x588ebe(0xa4)])),O(0x2,c[_0x588ebe(0x8c)])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5500af=_0x3f44;(function(_0x5e6658,_0x15ac41){const _0x1fcabe=_0x3f44,_0x5dbe52=_0x5e6658();while(!![]){try{const _0x347424=parseInt(_0x1fcabe(0x182))/0x1*(parseInt(_0x1fcabe(0x198))/0x2)+parseInt(_0x1fcabe(0x160))/0x3+-parseInt(_0x1fcabe(0x157))/0x4+-parseInt(_0x1fcabe(0x152))/0x5+-parseInt(_0x1fcabe(0x19a))/0x6*(parseInt(_0x1fcabe(0x187))/0x7)+-parseInt(_0x1fcabe(0x156))/0x8*(-parseInt(_0x1fcabe(0x17e))/0x9)+-parseInt(_0x1fcabe(0x178))/0xa;if(_0x347424===_0x15ac41)break;else _0x5dbe52['push'](_0x5dbe52['shift']());}catch(_0x1317bc){_0x5dbe52['push'](_0x5dbe52['shift']());}}}(_0x3a2a,0x7d349));import{CommentService as _0x1c7a80,CollaborationSessionService as _0x14a9d7,UniverCollaborationClientPlugin as _0x3cbcf0}from'@univerjs-pro/collaboration-client';function _0x3f44(_0x15083a,_0x25b920){const _0x3a2a7e=_0x3a2a();return _0x3f44=function(_0x3f44b3,_0x5b12f8){_0x3f44b3=_0x3f44b3-0x139;let _0x2d3078=_0x3a2a7e[_0x3f44b3];return _0x2d3078;},_0x3f44(_0x15083a,_0x25b920);}import{UniverLicensePlugin as _0x13971c}from'@univerjs-pro/license';import{dayjs as _0x4447ab,UserManagerService as _0x2f94c9,Inject as _0x5037f1,Injector as _0xd219b2,Disposable as _0x2962e1,CustomRangeType as _0x58cdbb,UniverInstanceType as _0x38769a,DependentOn as _0x1bbb36,IConfigService as _0x207f36,Plugin as _0x3944f4,merge as _0x3977b3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x68d9}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xa29200,IThreadCommentDataSourceService as _0x474df7}from'@univerjs/thread-comment';import{bufferTime as _0x23a6f7}from'rxjs';import{HTTPService as _0x2bed63}from'@univerjs/network';const W=_0x5500af(0x18a);var I=(_0x41c2dc=>(_0x41c2dc[_0x41c2dc[_0x5500af(0x176)]=0x0]=_0x5500af(0x176),_0x41c2dc[_0x41c2dc['Solved']=0x1]=_0x5500af(0x13f),_0x41c2dc[_0x41c2dc[_0x5500af(0x17a)]=-0x1]=_0x5500af(0x17a),_0x41c2dc))(I||{}),v=(_0x17cb3e=>(_0x17cb3e[_0x17cb3e[_0x5500af(0x180)]=0x0]=_0x5500af(0x180),_0x17cb3e[_0x17cb3e['Add']=0x1]=_0x5500af(0x161),_0x17cb3e[_0x17cb3e[_0x5500af(0x199)]=0x2]=_0x5500af(0x199),_0x17cb3e[_0x17cb3e['Edit']=0x3]=_0x5500af(0x141),_0x17cb3e[_0x17cb3e[_0x5500af(0x154)]=0x4]=_0x5500af(0x154),_0x17cb3e[_0x17cb3e['Solve']=0x5]=_0x5500af(0x171),_0x17cb3e[_0x17cb3e[_0x5500af(0x17a)]=-0x1]=_0x5500af(0x17a),_0x17cb3e))(v||{});const D=_0x1b3643=>_0x4447ab(new Date(+_0x1b3643))[_0x5500af(0x18c)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x526b31,_0x2e2265)=>{const _0x304723=_0x5500af,_0x2caab2=_0x526b31[_0x304723(0x170)](_0x2f94c9),_0x65f8df=_0x526b31[_0x304723(0x170)](_0x2bed63);_0x2e2265['forEach'](_0x4219e9=>{const _0x2d518f=_0x304723;_0x2caab2['getUser'](_0x4219e9)&&_0x2e2265[_0x2d518f(0x191)](_0x4219e9);}),_0x2e2265['size']&&(await _0x65f8df[_0x304723(0x170)](_0x304723(0x14b),{'params':{'userIDs':[..._0x2e2265]}}))[_0x304723(0x19c)][_0x304723(0x190)][_0x304723(0x14c)](_0x34e544=>{const _0x44dbb3=_0x304723;_0x34e544&&_0x2caab2[_0x44dbb3(0x16b)](_0x34e544);});};var K=Object[_0x5500af(0x195)],V=(_0x29e637,_0x6a2320,_0x5701c3,_0x224501)=>{for(var _0x5da78a=_0x224501>0x1?void 0x0:_0x224501?K(_0x6a2320,_0x5701c3):_0x6a2320,_0x188a1a=_0x29e637['length']-0x1,_0xc79e6c;_0x188a1a>=0x0;_0x188a1a--)(_0xc79e6c=_0x29e637[_0x188a1a])&&(_0x5da78a=_0xc79e6c(_0x5da78a)||_0x5da78a);return _0x5da78a;},p=(_0x18cba4,_0x1b72e3)=>(_0x35cc30,_0x1ee254)=>_0x1b72e3(_0x35cc30,_0x1ee254,_0x18cba4);let S=class extends _0x2962e1{constructor(_0x51c2e3,_0x282063,_0x2c7480,_0xf45166){const _0x1095a4=_0x5500af;super(),this[_0x1095a4(0x142)]=_0x51c2e3,this[_0x1095a4(0x185)]=_0x282063,this[_0x1095a4(0x144)]=_0x2c7480,this[_0x1095a4(0x163)]=_0xf45166,this['_init'](),this[_0x1095a4(0x166)]();}[_0x5500af(0x166)](){const _0xfdb7a6=_0x5500af;this['disposeWithMe'](this[_0xfdb7a6(0x185)][_0xfdb7a6(0x143)][_0xfdb7a6(0x150)](_0x23a6f7(0x10))[_0xfdb7a6(0x169)](_0x5bfead=>{const _0x28590c=_0xfdb7a6,_0x3d3ebc=new Set();_0x5bfead[_0x28590c(0x14c)](_0x203bd9=>{const _0x26c613=_0x28590c;switch(_0x203bd9[_0x26c613(0x15d)]){case _0x26c613(0x184):{const _0x4ae8f3=_0x203bd9[_0x26c613(0x174)][_0x26c613(0x18f)];_0x3d3ebc['add'](_0x4ae8f3);break;}}}),B(this[_0x28590c(0x163)],_0x3d3ebc);}));}[_0x5500af(0x1a0)](){const _0x93ac12=_0x5500af;this[_0x93ac12(0x196)](this[_0x93ac12(0x142)][_0x93ac12(0x143)]['subscribe'](async _0x254ff9=>{const _0x2e5f2f=_0x93ac12;var _0x4b04d9,_0x1d572e,_0x3720dd,_0x41934d;const _0x3fcdbf=(_0x4b04d9=this['_threadCommentModel'][_0x2e5f2f(0x192)](_0x254ff9[_0x2e5f2f(0x13c)])[_0x2e5f2f(0x17b)](_0x2997c8=>_0x2997c8['threadId']===_0x254ff9[_0x2e5f2f(0x15c)]))==null?void 0x0:_0x4b04d9[_0x2e5f2f(0x159)];if(!_0x3fcdbf)return;const {unitId:_0x295ea9,subUnitId:_0x4f5118}=_0x3fcdbf;switch(_0x254ff9[_0x2e5f2f(0x19f)]&&this['_userService'][_0x2e5f2f(0x16b)](_0x254ff9[_0x2e5f2f(0x19f)]),_0x254ff9['type']){case v[_0x2e5f2f(0x161)]:break;case v[_0x2e5f2f(0x199)]:{this[_0x2e5f2f(0x185)][_0x2e5f2f(0x181)](_0x295ea9,_0x4f5118,{'unitId':_0x295ea9,'subUnitId':_0x4f5118,'ref':'','id':_0x254ff9['replyId'],'dT':D(+_0x254ff9[_0x2e5f2f(0x177)]),'threadId':_0x254ff9['threadId'],'personId':(_0x3720dd=(_0x1d572e=_0x254ff9[_0x2e5f2f(0x19f)])==null?void 0x0:_0x1d572e[_0x2e5f2f(0x15a)])!=null?_0x3720dd:_0x254ff9[_0x2e5f2f(0x155)],'text':JSON[_0x2e5f2f(0x19d)](_0x254ff9[_0x2e5f2f(0x189)]),'parentId':_0x3fcdbf['id']});break;}case v[_0x2e5f2f(0x154)]:{const _0x5b630a=this[_0x2e5f2f(0x185)][_0x2e5f2f(0x173)](_0x295ea9,_0x4f5118,_0x254ff9['replyId']);_0x5b630a&&_0x5b630a[_0x2e5f2f(0x17f)]&&this[_0x2e5f2f(0x185)][_0x2e5f2f(0x139)](_0x295ea9,_0x4f5118,_0x254ff9[_0x2e5f2f(0x172)]);break;}case v[_0x2e5f2f(0x141)]:{this[_0x2e5f2f(0x185)][_0x2e5f2f(0x14e)](_0x295ea9,_0x4f5118,{'commentId':_0x254ff9[_0x2e5f2f(0x172)],'text':JSON[_0x2e5f2f(0x19d)](_0x254ff9['content'])});break;}case v[_0x2e5f2f(0x171)]:{const _0x374ceb=(_0x41934d=this['_threadCommentModel'][_0x2e5f2f(0x192)](_0x254ff9[_0x2e5f2f(0x13c)])['find'](_0x53791b=>_0x53791b['threadId']===_0x254ff9[_0x2e5f2f(0x15c)]))==null?void 0x0:_0x41934d[_0x2e5f2f(0x159)];_0x374ceb&&this['_threadCommentModel']['resolveComment'](_0x295ea9,_0x4f5118,_0x374ceb['id'],_0x254ff9[_0x2e5f2f(0x15e)]===I[_0x2e5f2f(0x13f)]);break;}}}));}};S=V([p(0x0,_0x5037f1(_0x1c7a80)),p(0x1,_0x5037f1(_0xa29200)),p(0x2,_0x5037f1(_0x2f94c9)),p(0x3,_0x5037f1(_0xd219b2))],S);const z=_0x5500af(0x165),M={};var k=Object[_0x5500af(0x195)],Q=(_0x2b8eec,_0x1810af,_0x212514,_0x5dec04)=>{const _0x47b615=_0x5500af;for(var _0x253b73=_0x5dec04>0x1?void 0x0:_0x5dec04?k(_0x1810af,_0x212514):_0x1810af,_0x5f15d7=_0x2b8eec[_0x47b615(0x18b)]-0x1,_0x10079f;_0x5f15d7>=0x0;_0x5f15d7--)(_0x10079f=_0x2b8eec[_0x5f15d7])&&(_0x253b73=_0x10079f(_0x253b73)||_0x253b73);return _0x253b73;},_=(_0x403975,_0x435ed8)=>(_0x4eaa02,_0x277673)=>_0x435ed8(_0x4eaa02,_0x277673,_0x403975);function X(_0x5566ce,_0xde9a3e){const _0x1b3a12=_0x5500af,_0x374afa=_0x5566ce[_0x1b3a12(0x19b)][0x0];return{..._0xde9a3e,'id':_0x374afa[_0x1b3a12(0x172)],'resolved':_0x5566ce[_0x1b3a12(0x15e)]===0x1,'dT':D(_0x374afa['createTimestamp']),'personId':_0x374afa[_0x1b3a12(0x155)],'threadId':_0x374afa[_0x1b3a12(0x15c)]};}function ee(_0x1aa970,_0x516c4c,_0x1e72f6){const _0x39272d=_0x5500af;var _0x3c1cde,_0x4d95f4;if(((_0x4d95f4=(_0x3c1cde=_0x1aa970==null?void 0x0:_0x1aa970[_0x39272d(0x19b)])==null?void 0x0:_0x3c1cde[_0x39272d(0x18b)])!=null?_0x4d95f4:0x0)>0x0){const _0xdeb79=(_0x559128,_0x5e2f39)=>({'id':_0x559128[_0x39272d(0x172)],'threadId':_0x559128[_0x39272d(0x15c)],'dT':D(_0x559128[_0x39272d(0x177)]),'personId':_0x559128[_0x39272d(0x155)],'resolved':_0x1aa970['solved']===I[_0x39272d(0x13f)],'unitId':_0x516c4c,'subUnitId':_0x1e72f6,'text':JSON[_0x39272d(0x19d)](_0x559128[_0x39272d(0x189)]),'parentId':_0x5e2f39}),_0x1ac857=_0xdeb79(_0x1aa970[_0x39272d(0x19b)][0x0]);return{..._0x1ac857,'children':_0x1aa970['replies'][_0x39272d(0x145)](0x1)['map'](_0x47cb9d=>_0xdeb79(_0x47cb9d,_0x1ac857['id']))};}return null;}function _0x3a2a(){const _0x417f02=['getUnit','comment','filter','getOwnPropertyDescriptor','disposeWithMe','error','14ZvraQx','Reply','6558jvZewP','replies','body','parse','post','user','_init','deleteComment','getMemberID','/add','unitId','onStarting','_initDataSource','Solved','code','Edit','_commentService','commentUpdate$','_userService','slice','_config','values','stringify','/list','rangeType','/universer-api/user/list','forEach','dataSource','updateComment','customRanges','pipe','defineProperty','516790HvWPDk','listComments','Delete','userId','238776fhrTtN','1877104SxqlIy','/universer-api/comment/unit/','root','userID','resolveComment','threadId','type','solved','symbol','1078020GUHyvl','Add','getCurrentUser','_injector','_threadCommentDataSourceService','thread-comment-data-source.config','_initUserSync','_sessionService','/solved','subscribe','onReady','addUser','comments','/reply','_httpService','saveCommentToSnapshot','get','Solve','replyId','getComment','payload','map','OpenOrReOpen','createTimestamp','455190HQotBH','reply','UNRECOGNIZED','find','resolved','requireSession','63vvkucx','parentId','Unknown','addComment','89914ByTfwH','rangeId','add','_threadCommentModel','pluginName','427eoNmaH','_threadCommentDataSource','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','length','format','/delete','ref','personId','users','delete'];_0x3a2a=function(){return _0x417f02;};return _0x3a2a();}let f=class{constructor(_0x543b6e,_0x205d66,_0x66eaba,_0x39f556){const _0x4f0e6a=_0x5500af;this[_0x4f0e6a(0x16e)]=_0x543b6e,this[_0x4f0e6a(0x144)]=_0x205d66,this['_sessionService']=_0x66eaba,this[_0x4f0e6a(0x163)]=_0x39f556;}async['addComment'](_0x358b36){const _0x266d28=_0x5500af;var _0x267ceb,_0x38bcdf;const {parentId:_0x4e14e7,unitId:_0xc4c883,text:_0x4ce085,threadId:_0x5b4955}=_0x358b36,_0x57f059=(_0x38bcdf=(_0x267ceb=_0x4ce085[_0x266d28(0x14f)])==null?void 0x0:_0x267ceb[_0x266d28(0x194)](_0x206b3b=>_0x206b3b[_0x266d28(0x14a)]===_0x58cdbb['COMMENT'])[_0x266d28(0x175)](_0x546d8f=>_0x546d8f[_0x266d28(0x183)]))!=null?_0x38bcdf:[],_0x1f0c92=JSON[_0x266d28(0x148)](_0x4ce085),_0x3f2f2e=(await this[_0x266d28(0x167)]['requireSession'](_0xc4c883))[_0x266d28(0x13a)]();if(_0x4e14e7){const _0x3dcf58={'memberId':_0x3f2f2e,'unitId':_0xc4c883,'content':_0x1f0c92,'mention':_0x57f059,'threadId':_0x5b4955},_0xdc0009=(await this['_httpService']['post'](_0x266d28(0x158)+_0xc4c883+_0x266d28(0x16d),{'body':_0x3dcf58}))[_0x266d28(0x19c)][_0x266d28(0x179)];return{..._0x358b36,'id':_0xdc0009[_0x266d28(0x172)],'dT':_0x4447ab(+_0xdc0009[_0x266d28(0x177)])[_0x266d28(0x18c)]('YYYY/MM/DD\x20HH:mm'),'personId':_0xdc0009['userId']};}else{const _0x572e1d={'memberId':_0x3f2f2e,'unitId':_0xc4c883,'content':_0x1f0c92,'mention':_0x57f059},_0x3af1a8=await this[_0x266d28(0x16e)]['post'](_0x266d28(0x158)+_0xc4c883+_0x266d28(0x13b),{'body':_0x572e1d});return X(_0x3af1a8[_0x266d28(0x19c)][_0x266d28(0x193)],_0x358b36);}}async['updateComment'](_0x439175){const _0x2ef6c4=_0x5500af;var _0x46a19e,_0x48f05e;const {text:_0x56a093,unitId:_0x408180}=_0x439175,_0x5f5301=(_0x48f05e=(_0x46a19e=_0x56a093[_0x2ef6c4(0x14f)])==null?void 0x0:_0x46a19e[_0x2ef6c4(0x194)](_0x31eb77=>_0x31eb77[_0x2ef6c4(0x14a)]===_0x58cdbb['COMMENT'])[_0x2ef6c4(0x175)](_0x3deffb=>_0x3deffb['rangeId']))!=null?_0x48f05e:[],_0x37dfc5=JSON['stringify'](_0x56a093),_0x22ad64=_0x439175[_0x2ef6c4(0x15c)],_0xc41945=_0x439175['id'],_0x4f12e7={'memberId':(await this[_0x2ef6c4(0x167)]['requireSession'](_0x408180))[_0x2ef6c4(0x13a)](),'unitId':_0x408180,'threadId':_0x22ad64,'mention':_0x5f5301,'content':_0x37dfc5,'replyId':_0xc41945},_0x2eb47c=await this[_0x2ef6c4(0x16e)][_0x2ef6c4(0x19e)](_0x2ef6c4(0x158)+_0x408180+'/edit',{'body':_0x4f12e7});return!_0x2eb47c[_0x2ef6c4(0x19c)][_0x2ef6c4(0x197)]||_0x2eb47c[_0x2ef6c4(0x19c)][_0x2ef6c4(0x197)][_0x2ef6c4(0x140)]===0x1;}async[_0x5500af(0x15b)](_0x391d2a){const _0x1d5a7d=_0x5500af,{unitId:_0x20e3cb}=_0x391d2a,_0x42883d=_0x391d2a[_0x1d5a7d(0x15c)],_0x4c84f9={'memberId':this[_0x1d5a7d(0x144)][_0x1d5a7d(0x162)]()[_0x1d5a7d(0x15a)],'unitId':_0x20e3cb,'threadId':_0x42883d,'solved':_0x391d2a[_0x1d5a7d(0x17c)]?I[_0x1d5a7d(0x13f)]:I['OpenOrReOpen']},_0x104a07=await this[_0x1d5a7d(0x16e)][_0x1d5a7d(0x19e)]('/universer-api/comment/unit/'+_0x20e3cb+_0x1d5a7d(0x168),{'body':_0x4c84f9});return!_0x104a07[_0x1d5a7d(0x19c)][_0x1d5a7d(0x197)]||_0x104a07['body'][_0x1d5a7d(0x197)][_0x1d5a7d(0x140)]===0x1;}async['deleteComment'](_0x20c77e,_0x55858a,_0x2127ca,_0x45c917){const _0x4c26ab=_0x5500af,_0x158eaf={'memberId':(await this[_0x4c26ab(0x167)][_0x4c26ab(0x17d)](_0x20c77e))[_0x4c26ab(0x13a)](),'threadId':_0x2127ca,'replyId':_0x45c917,'unitId':_0x20c77e},_0x2d2c07=await this['_httpService'][_0x4c26ab(0x19e)](_0x4c26ab(0x158)+_0x20c77e+_0x4c26ab(0x18d),{'body':_0x158eaf});return!_0x2d2c07['body'][_0x4c26ab(0x197)]||_0x2d2c07[_0x4c26ab(0x19c)]['error'][_0x4c26ab(0x140)]===0x1;}async[_0x5500af(0x153)](_0x4b21bb,_0x24c42c,_0x534e51){const _0x769906=_0x5500af,_0x1751a3={'unitId':_0x4b21bb,'threadId':_0x534e51},_0x4d77c3=await this[_0x769906(0x16e)]['post']('/universer-api/comment/unit/'+_0x4b21bb+_0x769906(0x149),{'body':_0x1751a3}),_0x1d7bcc=_0x534e51[_0x769906(0x175)](_0x4bc4df=>ee(_0x4d77c3[_0x769906(0x19c)][_0x769906(0x16c)][_0x4bc4df],_0x4b21bb,_0x24c42c))['filter'](Boolean);return Object[_0x769906(0x147)](_0x4d77c3['body']['users'])[_0x769906(0x14c)](_0x3f863d=>{const _0x36d374=_0x769906;this[_0x36d374(0x144)][_0x36d374(0x16b)](_0x3f863d);}),_0x1d7bcc;}[_0x5500af(0x16f)](_0x87c7a1){const _0x42dc3e=_0x5500af;return{'id':_0x87c7a1['id'],'threadId':_0x87c7a1[_0x42dc3e(0x15c)],'ref':_0x87c7a1[_0x42dc3e(0x18e)]};}};f=Q([_(0x0,_0x5037f1(_0x2bed63)),_(0x1,_0x5037f1(_0x2f94c9)),_(0x2,_0x5037f1(_0x14a9d7)),_(0x3,_0x5037f1(_0xd219b2))],f);var re=Object[_0x5500af(0x195)],te=(_0x21b6ec,_0x2af277,_0x502bce,_0x42ede5)=>{const _0x250b13=_0x5500af;for(var _0x1cee77=_0x42ede5>0x1?void 0x0:_0x42ede5?re(_0x2af277,_0x502bce):_0x2af277,_0x4c20db=_0x21b6ec[_0x250b13(0x18b)]-0x1,_0x4b232e;_0x4c20db>=0x0;_0x4c20db--)(_0x4b232e=_0x21b6ec[_0x4c20db])&&(_0x1cee77=_0x4b232e(_0x1cee77)||_0x1cee77);return _0x1cee77;},N=(_0x4d778a,_0x11591e)=>(_0x403835,_0x28c674)=>_0x11591e(_0x403835,_0x28c674,_0x4d778a);let g=class extends _0x2962e1{constructor(_0x1d8cc4,_0x2a4b67){const _0x3e0321=_0x5500af;super(),this[_0x3e0321(0x164)]=_0x1d8cc4,this[_0x3e0321(0x188)]=_0x2a4b67,this[_0x3e0321(0x13e)]();}[_0x5500af(0x13e)](){const _0x31cd45=_0x5500af;this[_0x31cd45(0x164)][_0x31cd45(0x14d)]=this[_0x31cd45(0x188)],this[_0x31cd45(0x164)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x474df7),N(0x1,_0x5037f1(f))],g);var se=Object[_0x5500af(0x151)],oe=Object[_0x5500af(0x195)],ne=(_0x340be8,_0x5849fb,_0x551091)=>_0x5849fb in _0x340be8?se(_0x340be8,_0x5849fb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x551091}):_0x340be8[_0x5849fb]=_0x551091,ie=(_0x475488,_0x3b7fb8,_0x592ae3,_0x3085a0)=>{for(var _0x535d47=_0x3085a0>0x1?void 0x0:_0x3085a0?oe(_0x3b7fb8,_0x592ae3):_0x3b7fb8,_0x303cd4=_0x475488['length']-0x1,_0x28c65a;_0x303cd4>=0x0;_0x303cd4--)(_0x28c65a=_0x475488[_0x303cd4])&&(_0x535d47=_0x28c65a(_0x535d47)||_0x535d47);return _0x535d47;},w=(_0x8b1040,_0x57d322)=>(_0x290efd,_0x427c60)=>_0x57d322(_0x290efd,_0x427c60,_0x8b1040),$=(_0x2fde41,_0x1441ac,_0x904550)=>ne(_0x2fde41,typeof _0x1441ac!=_0x5500af(0x15f)?_0x1441ac+'':_0x1441ac,_0x904550);let b=class extends _0x3944f4{constructor(_0x166e37=M,_0x458e81,_0x48f553){const _0x58b8a7=_0x5500af;super(),this[_0x58b8a7(0x146)]=_0x166e37,this[_0x58b8a7(0x163)]=_0x458e81,this['_configService']=_0x48f553;const {..._0x55623d}=_0x3977b3({},M,this[_0x58b8a7(0x146)]);this['_configService']['setConfig'](z,_0x55623d);}[_0x5500af(0x13d)](){const _0x503eaa=_0x5500af;[[f],[g],[S]][_0x503eaa(0x14c)](_0x1ddc58=>{const _0x42f45a=_0x503eaa;this[_0x42f45a(0x163)][_0x42f45a(0x184)](_0x1ddc58);});}[_0x5500af(0x16a)](){const _0x45ba30=_0x5500af;this['_injector'][_0x45ba30(0x170)](g),this[_0x45ba30(0x163)][_0x45ba30(0x170)](S);}};$(b,_0x5500af(0x186),W),$(b,_0x5500af(0x15d),_0x38769a['UNIVER_UNKNOWN']),b=ie([_0x1bbb36(_0x68d9,_0x3cbcf0,_0x13971c),w(0x1,_0x5037f1(_0xd219b2)),w(0x2,_0x207f36)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x166c12=_0x10f6;(function(_0x1a6a5e,_0x24319e){const _0x2e1f0c=_0x10f6,_0xdc54c=_0x1a6a5e();while(!![]){try{const _0x30adae=-parseInt(_0x2e1f0c(0x196))/0x1+parseInt(_0x2e1f0c(0x1f3))/0x2*(parseInt(_0x2e1f0c(0x19a))/0x3)+-parseInt(_0x2e1f0c(0x1ce))/0x4+-parseInt(_0x2e1f0c(0x1a6))/0x5+parseInt(_0x2e1f0c(0x1aa))/0x6+-parseInt(_0x2e1f0c(0x19b))/0x7*(-parseInt(_0x2e1f0c(0x1e7))/0x8)+parseInt(_0x2e1f0c(0x1de))/0x9;if(_0x30adae===_0x24319e)break;else _0xdc54c['push'](_0xdc54c['shift']());}catch(_0x5e5e95){_0xdc54c['push'](_0xdc54c['shift']());}}}(_0x3b23,0xacab1));import{CommentService as _0x25df25,CollaborationSessionService as _0x1cbde6,UniverCollaborationClientPlugin as _0x4b2720}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1bfdd1}from'@univerjs-pro/license';import{dayjs as _0x3cecb5,UserManagerService as _0xc83dbe,Inject as _0x8fdc81,Injector as _0x37caba,Disposable as _0x18908b,CustomRangeType as _0xf7bfe6,UniverInstanceType as _0x4acfe4,DependentOn as _0x648336,IConfigService as _0x4f6915,Plugin as _0x2b8ea1,merge as _0x984593}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3a2862}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2fa9d4,IThreadCommentDataSourceService as _0x360ed4}from'@univerjs/thread-comment';function _0x3b23(){const _0x11dc9c=['onReady','user','/universer-api/comment/unit/','addComment','254682RxgyPF','getOwnPropertyDescriptor','Unknown','Solved','18boxwqC','105oewPtB','deleteComment','saveCommentToSnapshot','/solved','comments','error','Edit','slice','customRanges','filter','_sessionService','4760075PzwSIl','_userService','setConfig','find','251904PJVoka','replies','reply','length','addUser','Solve','syncUpdateMutationToColla','Reply','defineProperty','COMMENT','resolved','_threadCommentDataSource','pluginName','_configService','userID','thread-comment-data-source.config','parse','replyId','forEach','_httpService','pipe','subscribe','users','_init','dataSource','unitId','symbol','_threadCommentModel','Delete','_initUserSync','content','/list','get','parentId','Add','threadId','4843388LFUyRx','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getComment','values','root','body','requireSession','rangeId','solved','_injector','type','code','_threadCommentDataSourceService','getUser','format','OpenOrReOpen','11679363tWsTKq','getUnit','stringify','listComments','_config','_commentService','delete','updateComment','/reply','488416kMvqye','onStarting','post','userId','/universer-api/user/list','personId','map','resolveComment','ref','getMemberID','commentUpdate$','getCurrentUser','289774kogfea','createTimestamp','disposeWithMe','size','rangeType','UNRECOGNIZED','YYYY/MM/DD\x20HH:mm','_initDataSource'];_0x3b23=function(){return _0x11dc9c;};return _0x3b23();}import{bufferTime as _0x51f2cb}from'rxjs';import{HTTPService as _0x57fadc}from'@univerjs/network';const W=_0x166c12(0x1cf);var I=(_0x3b6987=>(_0x3b6987[_0x3b6987[_0x166c12(0x1dd)]=0x0]=_0x166c12(0x1dd),_0x3b6987[_0x3b6987['Solved']=0x1]=_0x166c12(0x199),_0x3b6987[_0x3b6987[_0x166c12(0x1f8)]=-0x1]=_0x166c12(0x1f8),_0x3b6987))(I||{}),v=(_0x5855b0=>(_0x5855b0[_0x5855b0[_0x166c12(0x198)]=0x0]=_0x166c12(0x198),_0x5855b0[_0x5855b0['Add']=0x1]=_0x166c12(0x1cc),_0x5855b0[_0x5855b0[_0x166c12(0x1b1)]=0x2]=_0x166c12(0x1b1),_0x5855b0[_0x5855b0[_0x166c12(0x1a1)]=0x3]='Edit',_0x5855b0[_0x5855b0[_0x166c12(0x1c6)]=0x4]=_0x166c12(0x1c6),_0x5855b0[_0x5855b0['Solve']=0x5]=_0x166c12(0x1af),_0x5855b0[_0x5855b0[_0x166c12(0x1f8)]=-0x1]=_0x166c12(0x1f8),_0x5855b0))(v||{});const D=_0x3cd454=>_0x3cecb5(new Date(+_0x3cd454))[_0x166c12(0x1dc)](_0x166c12(0x1f9)),B=async(_0x36e145,_0xb19bb2)=>{const _0x43792d=_0x166c12,_0x4553f7=_0x36e145[_0x43792d(0x1ca)](_0xc83dbe),_0x5a2ed8=_0x36e145[_0x43792d(0x1ca)](_0x57fadc);_0xb19bb2[_0x43792d(0x1bc)](_0x9aba20=>{const _0x2c17f0=_0x43792d;_0x4553f7[_0x2c17f0(0x1db)](_0x9aba20)&&_0xb19bb2[_0x2c17f0(0x1e4)](_0x9aba20);}),_0xb19bb2[_0x43792d(0x1f6)]&&(await _0x5a2ed8[_0x43792d(0x1ca)](_0x43792d(0x1eb),{'params':{'userIDs':[..._0xb19bb2]}}))['body'][_0x43792d(0x1c0)][_0x43792d(0x1bc)](_0x1fa17e=>{const _0x2c68b1=_0x43792d;_0x1fa17e&&_0x4553f7[_0x2c68b1(0x1ae)](_0x1fa17e);});};var K=Object[_0x166c12(0x197)],V=(_0x4d23cd,_0xa427dc,_0x48082a,_0x1c2e22)=>{const _0x2d02d5=_0x166c12;for(var _0x21a7ca=_0x1c2e22>0x1?void 0x0:_0x1c2e22?K(_0xa427dc,_0x48082a):_0xa427dc,_0x10936c=_0x4d23cd[_0x2d02d5(0x1ad)]-0x1,_0x453bbb;_0x10936c>=0x0;_0x10936c--)(_0x453bbb=_0x4d23cd[_0x10936c])&&(_0x21a7ca=_0x453bbb(_0x21a7ca)||_0x21a7ca);return _0x21a7ca;},p=(_0x55630d,_0x37a088)=>(_0x155671,_0x396802)=>_0x37a088(_0x155671,_0x396802,_0x55630d);let S=class extends _0x18908b{constructor(_0x29a138,_0x2106e2,_0x4fcc7e,_0x251864){const _0x3e0b62=_0x166c12;super(),this[_0x3e0b62(0x1e3)]=_0x29a138,this[_0x3e0b62(0x1c5)]=_0x2106e2,this[_0x3e0b62(0x1a7)]=_0x4fcc7e,this[_0x3e0b62(0x1d7)]=_0x251864,this[_0x3e0b62(0x1c1)](),this[_0x3e0b62(0x1c7)]();}[_0x166c12(0x1c7)](){const _0x2c8663=_0x166c12;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$'][_0x2c8663(0x1be)](_0x51f2cb(0x10))[_0x2c8663(0x1bf)](_0x50bb92=>{const _0x38242d=_0x2c8663,_0x3b47f0=new Set();_0x50bb92[_0x38242d(0x1bc)](_0x7709b4=>{const _0x43aef5=_0x38242d;switch(_0x7709b4[_0x43aef5(0x1d8)]){case'add':{const _0x3f9fa3=_0x7709b4['payload'][_0x43aef5(0x1ec)];_0x3b47f0['add'](_0x3f9fa3);break;}}}),B(this[_0x38242d(0x1d7)],_0x3b47f0);}));}[_0x166c12(0x1c1)](){const _0x24e48e=_0x166c12;this[_0x24e48e(0x1f5)](this[_0x24e48e(0x1e3)][_0x24e48e(0x1f1)][_0x24e48e(0x1bf)](async _0x4f670f=>{const _0x2b94df=_0x24e48e;var _0x46d6ed,_0x5cd8a7,_0x3e5c43,_0x63985b;const _0x887d46=(_0x46d6ed=this[_0x2b94df(0x1c5)][_0x2b94df(0x1df)](_0x4f670f[_0x2b94df(0x1c3)])[_0x2b94df(0x1a9)](_0x47934d=>_0x47934d[_0x2b94df(0x1cd)]===_0x4f670f[_0x2b94df(0x1cd)]))==null?void 0x0:_0x46d6ed[_0x2b94df(0x1d2)];if(!_0x887d46)return;const {unitId:_0x30791d,subUnitId:_0x11c418}=_0x887d46;switch(_0x4f670f['user']&&this['_userService'][_0x2b94df(0x1ae)](_0x4f670f['user']),_0x4f670f['type']){case v[_0x2b94df(0x1cc)]:break;case v['Reply']:{this[_0x2b94df(0x1c5)]['addComment'](_0x30791d,_0x11c418,{'unitId':_0x30791d,'subUnitId':_0x11c418,'ref':'','id':_0x4f670f[_0x2b94df(0x1bb)],'dT':D(+_0x4f670f[_0x2b94df(0x1f4)]),'threadId':_0x4f670f[_0x2b94df(0x1cd)],'personId':(_0x3e5c43=(_0x5cd8a7=_0x4f670f[_0x2b94df(0x193)])==null?void 0x0:_0x5cd8a7[_0x2b94df(0x1b8)])!=null?_0x3e5c43:_0x4f670f['userId'],'text':JSON[_0x2b94df(0x1ba)](_0x4f670f[_0x2b94df(0x1c8)]),'parentId':_0x887d46['id']});break;}case v['Delete']:{const _0x352c5b=this[_0x2b94df(0x1c5)][_0x2b94df(0x1d0)](_0x30791d,_0x11c418,_0x4f670f[_0x2b94df(0x1bb)]);_0x352c5b&&_0x352c5b[_0x2b94df(0x1cb)]&&this[_0x2b94df(0x1c5)][_0x2b94df(0x19c)](_0x30791d,_0x11c418,_0x4f670f[_0x2b94df(0x1bb)]);break;}case v[_0x2b94df(0x1a1)]:{this['_threadCommentModel'][_0x2b94df(0x1e5)](_0x30791d,_0x11c418,{'commentId':_0x4f670f[_0x2b94df(0x1bb)],'text':JSON[_0x2b94df(0x1ba)](_0x4f670f['content'])});break;}case v['Solve']:{const _0x349091=(_0x63985b=this[_0x2b94df(0x1c5)]['getUnit'](_0x4f670f[_0x2b94df(0x1c3)])[_0x2b94df(0x1a9)](_0x2e22bd=>_0x2e22bd[_0x2b94df(0x1cd)]===_0x4f670f['threadId']))==null?void 0x0:_0x63985b[_0x2b94df(0x1d2)];_0x349091&&this['_threadCommentModel']['resolveComment'](_0x30791d,_0x11c418,_0x349091['id'],_0x4f670f[_0x2b94df(0x1d6)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x8fdc81(_0x25df25)),p(0x1,_0x8fdc81(_0x2fa9d4)),p(0x2,_0x8fdc81(_0xc83dbe)),p(0x3,_0x8fdc81(_0x37caba))],S);const z=_0x166c12(0x1b9),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x236902,_0x351f7f,_0x1e3934,_0x4045e9)=>{const _0x5c55fa=_0x166c12;for(var _0x25ab4e=_0x4045e9>0x1?void 0x0:_0x4045e9?k(_0x351f7f,_0x1e3934):_0x351f7f,_0x2683be=_0x236902[_0x5c55fa(0x1ad)]-0x1,_0x31e114;_0x2683be>=0x0;_0x2683be--)(_0x31e114=_0x236902[_0x2683be])&&(_0x25ab4e=_0x31e114(_0x25ab4e)||_0x25ab4e);return _0x25ab4e;},_=(_0x125859,_0x5f2eb7)=>(_0x2f76a9,_0x281263)=>_0x5f2eb7(_0x2f76a9,_0x281263,_0x125859);function X(_0x3b08f7,_0x13f5a3){const _0x3183d8=_0x166c12,_0x37241b=_0x3b08f7['replies'][0x0];return{..._0x13f5a3,'id':_0x37241b[_0x3183d8(0x1bb)],'resolved':_0x3b08f7[_0x3183d8(0x1d6)]===0x1,'dT':D(_0x37241b['createTimestamp']),'personId':_0x37241b['userId'],'threadId':_0x37241b[_0x3183d8(0x1cd)]};}function ee(_0x39875d,_0x446a43,_0x730daf){const _0x196f1b=_0x166c12;var _0x4b5366,_0x5b39d7;if(((_0x5b39d7=(_0x4b5366=_0x39875d==null?void 0x0:_0x39875d[_0x196f1b(0x1ab)])==null?void 0x0:_0x4b5366[_0x196f1b(0x1ad)])!=null?_0x5b39d7:0x0)>0x0){const _0x3aaf1a=(_0x3fdef4,_0x1f6668)=>({'id':_0x3fdef4[_0x196f1b(0x1bb)],'threadId':_0x3fdef4[_0x196f1b(0x1cd)],'dT':D(_0x3fdef4[_0x196f1b(0x1f4)]),'personId':_0x3fdef4[_0x196f1b(0x1ea)],'resolved':_0x39875d[_0x196f1b(0x1d6)]===I[_0x196f1b(0x199)],'unitId':_0x446a43,'subUnitId':_0x730daf,'text':JSON[_0x196f1b(0x1ba)](_0x3fdef4[_0x196f1b(0x1c8)]),'parentId':_0x1f6668}),_0x4de25=_0x3aaf1a(_0x39875d[_0x196f1b(0x1ab)][0x0]);return{..._0x4de25,'children':_0x39875d[_0x196f1b(0x1ab)][_0x196f1b(0x1a2)](0x1)[_0x196f1b(0x1ed)](_0x2bda2d=>_0x3aaf1a(_0x2bda2d,_0x4de25['id']))};}return null;}let f=class{constructor(_0x7acca5,_0x3cc23d,_0x252b3e,_0x3160aa){this['_httpService']=_0x7acca5,this['_userService']=_0x3cc23d,this['_sessionService']=_0x252b3e,this['_injector']=_0x3160aa;}async[_0x166c12(0x195)](_0x13047e){const _0x3e8564=_0x166c12;var _0x295c93,_0x223f4f;const {parentId:_0x593255,unitId:_0x404c6d,text:_0x4134fe,threadId:_0xf7c514}=_0x13047e,_0x2f09a9=(_0x223f4f=(_0x295c93=_0x4134fe['customRanges'])==null?void 0x0:_0x295c93[_0x3e8564(0x1a4)](_0x1462bd=>_0x1462bd[_0x3e8564(0x1f7)]===_0xf7bfe6[_0x3e8564(0x1b3)])['map'](_0x4e0a3c=>_0x4e0a3c[_0x3e8564(0x1d5)]))!=null?_0x223f4f:[],_0x2338d5=JSON['stringify'](_0x4134fe),_0x42ad00=(await this[_0x3e8564(0x1a5)][_0x3e8564(0x1d4)](_0x404c6d))[_0x3e8564(0x1f0)]();if(_0x593255){const _0x88937f={'memberId':_0x42ad00,'unitId':_0x404c6d,'content':_0x2338d5,'mention':_0x2f09a9,'threadId':_0xf7c514},_0x46636e=(await this[_0x3e8564(0x1bd)]['post'](_0x3e8564(0x194)+_0x404c6d+_0x3e8564(0x1e6),{'body':_0x88937f}))[_0x3e8564(0x1d3)][_0x3e8564(0x1ac)];return{..._0x13047e,'id':_0x46636e[_0x3e8564(0x1bb)],'dT':_0x3cecb5(+_0x46636e[_0x3e8564(0x1f4)])[_0x3e8564(0x1dc)](_0x3e8564(0x1f9)),'personId':_0x46636e['userId']};}else{const _0x3484fa={'memberId':_0x42ad00,'unitId':_0x404c6d,'content':_0x2338d5,'mention':_0x2f09a9},_0x359bdb=await this[_0x3e8564(0x1bd)][_0x3e8564(0x1e9)](_0x3e8564(0x194)+_0x404c6d+'/add',{'body':_0x3484fa});return X(_0x359bdb[_0x3e8564(0x1d3)]['comment'],_0x13047e);}}async[_0x166c12(0x1e5)](_0xb7e253){const _0x1d18a8=_0x166c12;var _0x2a10f0,_0x41f84c;const {text:_0x261ae8,unitId:_0x2c0912}=_0xb7e253,_0x4e98b7=(_0x41f84c=(_0x2a10f0=_0x261ae8[_0x1d18a8(0x1a3)])==null?void 0x0:_0x2a10f0[_0x1d18a8(0x1a4)](_0x4b9621=>_0x4b9621[_0x1d18a8(0x1f7)]===_0xf7bfe6[_0x1d18a8(0x1b3)])[_0x1d18a8(0x1ed)](_0x51d2ef=>_0x51d2ef[_0x1d18a8(0x1d5)]))!=null?_0x41f84c:[],_0x1a323f=JSON[_0x1d18a8(0x1e0)](_0x261ae8),_0x2f4aa7=_0xb7e253[_0x1d18a8(0x1cd)],_0xf016b6=_0xb7e253['id'],_0xaab2ff={'memberId':(await this[_0x1d18a8(0x1a5)][_0x1d18a8(0x1d4)](_0x2c0912))['getMemberID'](),'unitId':_0x2c0912,'threadId':_0x2f4aa7,'mention':_0x4e98b7,'content':_0x1a323f,'replyId':_0xf016b6},_0x451c78=await this[_0x1d18a8(0x1bd)]['post'](_0x1d18a8(0x194)+_0x2c0912+'/edit',{'body':_0xaab2ff});return!_0x451c78[_0x1d18a8(0x1d3)][_0x1d18a8(0x1a0)]||_0x451c78[_0x1d18a8(0x1d3)]['error']['code']===0x1;}async[_0x166c12(0x1ee)](_0x2406e4){const _0x20bb96=_0x166c12,{unitId:_0x35fd9b}=_0x2406e4,_0x20540d=_0x2406e4[_0x20bb96(0x1cd)],_0x402c96={'memberId':this[_0x20bb96(0x1a7)][_0x20bb96(0x1f2)]()['userID'],'unitId':_0x35fd9b,'threadId':_0x20540d,'solved':_0x2406e4[_0x20bb96(0x1b4)]?I[_0x20bb96(0x199)]:I[_0x20bb96(0x1dd)]},_0x4cb16d=await this['_httpService'][_0x20bb96(0x1e9)]('/universer-api/comment/unit/'+_0x35fd9b+_0x20bb96(0x19e),{'body':_0x402c96});return!_0x4cb16d[_0x20bb96(0x1d3)][_0x20bb96(0x1a0)]||_0x4cb16d[_0x20bb96(0x1d3)][_0x20bb96(0x1a0)]['code']===0x1;}async[_0x166c12(0x19c)](_0x4124e3,_0x28a65b,_0xe062f3,_0x5548bd){const _0x57a811=_0x166c12,_0x47a5a0={'memberId':(await this[_0x57a811(0x1a5)][_0x57a811(0x1d4)](_0x4124e3))[_0x57a811(0x1f0)](),'threadId':_0xe062f3,'replyId':_0x5548bd,'unitId':_0x4124e3},_0x16c1c5=await this[_0x57a811(0x1bd)][_0x57a811(0x1e9)](_0x57a811(0x194)+_0x4124e3+'/delete',{'body':_0x47a5a0});return!_0x16c1c5[_0x57a811(0x1d3)]['error']||_0x16c1c5[_0x57a811(0x1d3)][_0x57a811(0x1a0)][_0x57a811(0x1d9)]===0x1;}async[_0x166c12(0x1e1)](_0x3ade55,_0x2746f5,_0x40018a){const _0x35bb43=_0x166c12,_0x18ff18={'unitId':_0x3ade55,'threadId':_0x40018a},_0x599aef=await this[_0x35bb43(0x1bd)][_0x35bb43(0x1e9)](_0x35bb43(0x194)+_0x3ade55+_0x35bb43(0x1c9),{'body':_0x18ff18}),_0x5485d8=_0x40018a['map'](_0x5a5e72=>ee(_0x599aef[_0x35bb43(0x1d3)][_0x35bb43(0x19f)][_0x5a5e72],_0x3ade55,_0x2746f5))[_0x35bb43(0x1a4)](Boolean);return Object[_0x35bb43(0x1d1)](_0x599aef['body'][_0x35bb43(0x1c0)])[_0x35bb43(0x1bc)](_0x649fec=>{const _0x1748d4=_0x35bb43;this[_0x1748d4(0x1a7)]['addUser'](_0x649fec);}),_0x5485d8;}[_0x166c12(0x19d)](_0x26b0fb){const _0xc11efc=_0x166c12;return{'id':_0x26b0fb['id'],'threadId':_0x26b0fb['threadId'],'ref':_0x26b0fb[_0xc11efc(0x1ef)]};}};f=Q([_(0x0,_0x8fdc81(_0x57fadc)),_(0x1,_0x8fdc81(_0xc83dbe)),_(0x2,_0x8fdc81(_0x1cbde6)),_(0x3,_0x8fdc81(_0x37caba))],f);function _0x10f6(_0x2bd15d,_0x137b0f){const _0x3b23c0=_0x3b23();return _0x10f6=function(_0x10f67c,_0xbc0d10){_0x10f67c=_0x10f67c-0x191;let _0x50d7b3=_0x3b23c0[_0x10f67c];return _0x50d7b3;},_0x10f6(_0x2bd15d,_0x137b0f);}var re=Object[_0x166c12(0x197)],te=(_0x291ffd,_0x10ef46,_0x2a468e,_0x1bbc9a)=>{const _0x5b87ed=_0x166c12;for(var _0xd0ef29=_0x1bbc9a>0x1?void 0x0:_0x1bbc9a?re(_0x10ef46,_0x2a468e):_0x10ef46,_0x14e5f6=_0x291ffd[_0x5b87ed(0x1ad)]-0x1,_0x33050f;_0x14e5f6>=0x0;_0x14e5f6--)(_0x33050f=_0x291ffd[_0x14e5f6])&&(_0xd0ef29=_0x33050f(_0xd0ef29)||_0xd0ef29);return _0xd0ef29;},N=(_0x4d2f7b,_0x19b1f8)=>(_0x12a140,_0x38bb8e)=>_0x19b1f8(_0x12a140,_0x38bb8e,_0x4d2f7b);let g=class extends _0x18908b{constructor(_0x3028cd,_0xb3add5){const _0x35c5df=_0x166c12;super(),this['_threadCommentDataSourceService']=_0x3028cd,this['_threadCommentDataSource']=_0xb3add5,this[_0x35c5df(0x191)]();}[_0x166c12(0x191)](){const _0x54824e=_0x166c12;this[_0x54824e(0x1da)][_0x54824e(0x1c2)]=this[_0x54824e(0x1b5)],this[_0x54824e(0x1da)][_0x54824e(0x1b0)]=!0x1;}};g=te([N(0x0,_0x360ed4),N(0x1,_0x8fdc81(f))],g);var se=Object[_0x166c12(0x1b2)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x382198,_0x385d53,_0x504c66)=>_0x385d53 in _0x382198?se(_0x382198,_0x385d53,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x504c66}):_0x382198[_0x385d53]=_0x504c66,ie=(_0x5618b5,_0x4abda7,_0x3b5b9a,_0x4315cf)=>{const _0x4ec47e=_0x166c12;for(var _0x534d0f=_0x4315cf>0x1?void 0x0:_0x4315cf?oe(_0x4abda7,_0x3b5b9a):_0x4abda7,_0x45acdc=_0x5618b5[_0x4ec47e(0x1ad)]-0x1,_0xd5032d;_0x45acdc>=0x0;_0x45acdc--)(_0xd5032d=_0x5618b5[_0x45acdc])&&(_0x534d0f=_0xd5032d(_0x534d0f)||_0x534d0f);return _0x534d0f;},w=(_0x36e1f1,_0x1a0080)=>(_0x14349a,_0xa97861)=>_0x1a0080(_0x14349a,_0xa97861,_0x36e1f1),$=(_0x561fa8,_0x4efdc5,_0x1e05d7)=>ne(_0x561fa8,typeof _0x4efdc5!=_0x166c12(0x1c4)?_0x4efdc5+'':_0x4efdc5,_0x1e05d7);let b=class extends _0x2b8ea1{constructor(_0x114f27=M,_0x560757,_0x133b78){const _0x538311=_0x166c12;super(),this[_0x538311(0x1e2)]=_0x114f27,this[_0x538311(0x1d7)]=_0x560757,this[_0x538311(0x1b7)]=_0x133b78;const {..._0x339ec6}=_0x984593({},M,this[_0x538311(0x1e2)]);this[_0x538311(0x1b7)][_0x538311(0x1a8)](z,_0x339ec6);}[_0x166c12(0x1e8)](){const _0x265e7d=_0x166c12;[[f],[g],[S]][_0x265e7d(0x1bc)](_0x4d52c6=>{const _0x31f9a9=_0x265e7d;this[_0x31f9a9(0x1d7)]['add'](_0x4d52c6);});}[_0x166c12(0x192)](){const _0x45d4c6=_0x166c12;this[_0x45d4c6(0x1d7)][_0x45d4c6(0x1ca)](g),this[_0x45d4c6(0x1d7)]['get'](S);}};$(b,_0x166c12(0x1b6),W),$(b,_0x166c12(0x1d8),_0x4acfe4['UNIVER_UNKNOWN']),b=ie([_0x648336(_0x3a2862,_0x4b2720,_0x1bfdd1),w(0x1,_0x8fdc81(_0x37caba)),w(0x2,_0x4f6915)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5500af=_0x3f44;(function(_0x5e6658,_0x15ac41){const _0x1fcabe=_0x3f44,_0x5dbe52=_0x5e6658();while(!![]){try{const _0x347424=parseInt(_0x1fcabe(0x182))/0x1*(parseInt(_0x1fcabe(0x198))/0x2)+parseInt(_0x1fcabe(0x160))/0x3+-parseInt(_0x1fcabe(0x157))/0x4+-parseInt(_0x1fcabe(0x152))/0x5+-parseInt(_0x1fcabe(0x19a))/0x6*(parseInt(_0x1fcabe(0x187))/0x7)+-parseInt(_0x1fcabe(0x156))/0x8*(-parseInt(_0x1fcabe(0x17e))/0x9)+-parseInt(_0x1fcabe(0x178))/0xa;if(_0x347424===_0x15ac41)break;else _0x5dbe52['push'](_0x5dbe52['shift']());}catch(_0x1317bc){_0x5dbe52['push'](_0x5dbe52['shift']());}}}(_0x3a2a,0x7d349));import{CommentService as _0x1c7a80,CollaborationSessionService as _0x14a9d7,UniverCollaborationClientPlugin as _0x3cbcf0}from'@univerjs-pro/collaboration-client';function _0x3f44(_0x15083a,_0x25b920){const _0x3a2a7e=_0x3a2a();return _0x3f44=function(_0x3f44b3,_0x5b12f8){_0x3f44b3=_0x3f44b3-0x139;let _0x2d3078=_0x3a2a7e[_0x3f44b3];return _0x2d3078;},_0x3f44(_0x15083a,_0x25b920);}import{UniverLicensePlugin as _0x13971c}from'@univerjs-pro/license';import{dayjs as _0x4447ab,UserManagerService as _0x2f94c9,Inject as _0x5037f1,Injector as _0xd219b2,Disposable as _0x2962e1,CustomRangeType as _0x58cdbb,UniverInstanceType as _0x38769a,DependentOn as _0x1bbb36,IConfigService as _0x207f36,Plugin as _0x3944f4,merge as _0x3977b3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x68d9}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xa29200,IThreadCommentDataSourceService as _0x474df7}from'@univerjs/thread-comment';import{bufferTime as _0x23a6f7}from'rxjs';import{HTTPService as _0x2bed63}from'@univerjs/network';const W=_0x5500af(0x18a);var I=(_0x41c2dc=>(_0x41c2dc[_0x41c2dc[_0x5500af(0x176)]=0x0]=_0x5500af(0x176),_0x41c2dc[_0x41c2dc['Solved']=0x1]=_0x5500af(0x13f),_0x41c2dc[_0x41c2dc[_0x5500af(0x17a)]=-0x1]=_0x5500af(0x17a),_0x41c2dc))(I||{}),v=(_0x17cb3e=>(_0x17cb3e[_0x17cb3e[_0x5500af(0x180)]=0x0]=_0x5500af(0x180),_0x17cb3e[_0x17cb3e['Add']=0x1]=_0x5500af(0x161),_0x17cb3e[_0x17cb3e[_0x5500af(0x199)]=0x2]=_0x5500af(0x199),_0x17cb3e[_0x17cb3e['Edit']=0x3]=_0x5500af(0x141),_0x17cb3e[_0x17cb3e[_0x5500af(0x154)]=0x4]=_0x5500af(0x154),_0x17cb3e[_0x17cb3e['Solve']=0x5]=_0x5500af(0x171),_0x17cb3e[_0x17cb3e[_0x5500af(0x17a)]=-0x1]=_0x5500af(0x17a),_0x17cb3e))(v||{});const D=_0x1b3643=>_0x4447ab(new Date(+_0x1b3643))[_0x5500af(0x18c)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x526b31,_0x2e2265)=>{const _0x304723=_0x5500af,_0x2caab2=_0x526b31[_0x304723(0x170)](_0x2f94c9),_0x65f8df=_0x526b31[_0x304723(0x170)](_0x2bed63);_0x2e2265['forEach'](_0x4219e9=>{const _0x2d518f=_0x304723;_0x2caab2['getUser'](_0x4219e9)&&_0x2e2265[_0x2d518f(0x191)](_0x4219e9);}),_0x2e2265['size']&&(await _0x65f8df[_0x304723(0x170)](_0x304723(0x14b),{'params':{'userIDs':[..._0x2e2265]}}))[_0x304723(0x19c)][_0x304723(0x190)][_0x304723(0x14c)](_0x34e544=>{const _0x44dbb3=_0x304723;_0x34e544&&_0x2caab2[_0x44dbb3(0x16b)](_0x34e544);});};var K=Object[_0x5500af(0x195)],V=(_0x29e637,_0x6a2320,_0x5701c3,_0x224501)=>{for(var _0x5da78a=_0x224501>0x1?void 0x0:_0x224501?K(_0x6a2320,_0x5701c3):_0x6a2320,_0x188a1a=_0x29e637['length']-0x1,_0xc79e6c;_0x188a1a>=0x0;_0x188a1a--)(_0xc79e6c=_0x29e637[_0x188a1a])&&(_0x5da78a=_0xc79e6c(_0x5da78a)||_0x5da78a);return _0x5da78a;},p=(_0x18cba4,_0x1b72e3)=>(_0x35cc30,_0x1ee254)=>_0x1b72e3(_0x35cc30,_0x1ee254,_0x18cba4);let S=class extends _0x2962e1{constructor(_0x51c2e3,_0x282063,_0x2c7480,_0xf45166){const _0x1095a4=_0x5500af;super(),this[_0x1095a4(0x142)]=_0x51c2e3,this[_0x1095a4(0x185)]=_0x282063,this[_0x1095a4(0x144)]=_0x2c7480,this[_0x1095a4(0x163)]=_0xf45166,this['_init'](),this[_0x1095a4(0x166)]();}[_0x5500af(0x166)](){const _0xfdb7a6=_0x5500af;this['disposeWithMe'](this[_0xfdb7a6(0x185)][_0xfdb7a6(0x143)][_0xfdb7a6(0x150)](_0x23a6f7(0x10))[_0xfdb7a6(0x169)](_0x5bfead=>{const _0x28590c=_0xfdb7a6,_0x3d3ebc=new Set();_0x5bfead[_0x28590c(0x14c)](_0x203bd9=>{const _0x26c613=_0x28590c;switch(_0x203bd9[_0x26c613(0x15d)]){case _0x26c613(0x184):{const _0x4ae8f3=_0x203bd9[_0x26c613(0x174)][_0x26c613(0x18f)];_0x3d3ebc['add'](_0x4ae8f3);break;}}}),B(this[_0x28590c(0x163)],_0x3d3ebc);}));}[_0x5500af(0x1a0)](){const _0x93ac12=_0x5500af;this[_0x93ac12(0x196)](this[_0x93ac12(0x142)][_0x93ac12(0x143)]['subscribe'](async _0x254ff9=>{const _0x2e5f2f=_0x93ac12;var _0x4b04d9,_0x1d572e,_0x3720dd,_0x41934d;const _0x3fcdbf=(_0x4b04d9=this['_threadCommentModel'][_0x2e5f2f(0x192)](_0x254ff9[_0x2e5f2f(0x13c)])[_0x2e5f2f(0x17b)](_0x2997c8=>_0x2997c8['threadId']===_0x254ff9[_0x2e5f2f(0x15c)]))==null?void 0x0:_0x4b04d9[_0x2e5f2f(0x159)];if(!_0x3fcdbf)return;const {unitId:_0x295ea9,subUnitId:_0x4f5118}=_0x3fcdbf;switch(_0x254ff9[_0x2e5f2f(0x19f)]&&this['_userService'][_0x2e5f2f(0x16b)](_0x254ff9[_0x2e5f2f(0x19f)]),_0x254ff9['type']){case v[_0x2e5f2f(0x161)]:break;case v[_0x2e5f2f(0x199)]:{this[_0x2e5f2f(0x185)][_0x2e5f2f(0x181)](_0x295ea9,_0x4f5118,{'unitId':_0x295ea9,'subUnitId':_0x4f5118,'ref':'','id':_0x254ff9['replyId'],'dT':D(+_0x254ff9[_0x2e5f2f(0x177)]),'threadId':_0x254ff9['threadId'],'personId':(_0x3720dd=(_0x1d572e=_0x254ff9[_0x2e5f2f(0x19f)])==null?void 0x0:_0x1d572e[_0x2e5f2f(0x15a)])!=null?_0x3720dd:_0x254ff9[_0x2e5f2f(0x155)],'text':JSON[_0x2e5f2f(0x19d)](_0x254ff9[_0x2e5f2f(0x189)]),'parentId':_0x3fcdbf['id']});break;}case v[_0x2e5f2f(0x154)]:{const _0x5b630a=this[_0x2e5f2f(0x185)][_0x2e5f2f(0x173)](_0x295ea9,_0x4f5118,_0x254ff9['replyId']);_0x5b630a&&_0x5b630a[_0x2e5f2f(0x17f)]&&this[_0x2e5f2f(0x185)][_0x2e5f2f(0x139)](_0x295ea9,_0x4f5118,_0x254ff9[_0x2e5f2f(0x172)]);break;}case v[_0x2e5f2f(0x141)]:{this[_0x2e5f2f(0x185)][_0x2e5f2f(0x14e)](_0x295ea9,_0x4f5118,{'commentId':_0x254ff9[_0x2e5f2f(0x172)],'text':JSON[_0x2e5f2f(0x19d)](_0x254ff9['content'])});break;}case v[_0x2e5f2f(0x171)]:{const _0x374ceb=(_0x41934d=this['_threadCommentModel'][_0x2e5f2f(0x192)](_0x254ff9[_0x2e5f2f(0x13c)])['find'](_0x53791b=>_0x53791b['threadId']===_0x254ff9[_0x2e5f2f(0x15c)]))==null?void 0x0:_0x41934d[_0x2e5f2f(0x159)];_0x374ceb&&this['_threadCommentModel']['resolveComment'](_0x295ea9,_0x4f5118,_0x374ceb['id'],_0x254ff9[_0x2e5f2f(0x15e)]===I[_0x2e5f2f(0x13f)]);break;}}}));}};S=V([p(0x0,_0x5037f1(_0x1c7a80)),p(0x1,_0x5037f1(_0xa29200)),p(0x2,_0x5037f1(_0x2f94c9)),p(0x3,_0x5037f1(_0xd219b2))],S);const z=_0x5500af(0x165),M={};var k=Object[_0x5500af(0x195)],Q=(_0x2b8eec,_0x1810af,_0x212514,_0x5dec04)=>{const _0x47b615=_0x5500af;for(var _0x253b73=_0x5dec04>0x1?void 0x0:_0x5dec04?k(_0x1810af,_0x212514):_0x1810af,_0x5f15d7=_0x2b8eec[_0x47b615(0x18b)]-0x1,_0x10079f;_0x5f15d7>=0x0;_0x5f15d7--)(_0x10079f=_0x2b8eec[_0x5f15d7])&&(_0x253b73=_0x10079f(_0x253b73)||_0x253b73);return _0x253b73;},_=(_0x403975,_0x435ed8)=>(_0x4eaa02,_0x277673)=>_0x435ed8(_0x4eaa02,_0x277673,_0x403975);function X(_0x5566ce,_0xde9a3e){const _0x1b3a12=_0x5500af,_0x374afa=_0x5566ce[_0x1b3a12(0x19b)][0x0];return{..._0xde9a3e,'id':_0x374afa[_0x1b3a12(0x172)],'resolved':_0x5566ce[_0x1b3a12(0x15e)]===0x1,'dT':D(_0x374afa['createTimestamp']),'personId':_0x374afa[_0x1b3a12(0x155)],'threadId':_0x374afa[_0x1b3a12(0x15c)]};}function ee(_0x1aa970,_0x516c4c,_0x1e72f6){const _0x39272d=_0x5500af;var _0x3c1cde,_0x4d95f4;if(((_0x4d95f4=(_0x3c1cde=_0x1aa970==null?void 0x0:_0x1aa970[_0x39272d(0x19b)])==null?void 0x0:_0x3c1cde[_0x39272d(0x18b)])!=null?_0x4d95f4:0x0)>0x0){const _0xdeb79=(_0x559128,_0x5e2f39)=>({'id':_0x559128[_0x39272d(0x172)],'threadId':_0x559128[_0x39272d(0x15c)],'dT':D(_0x559128[_0x39272d(0x177)]),'personId':_0x559128[_0x39272d(0x155)],'resolved':_0x1aa970['solved']===I[_0x39272d(0x13f)],'unitId':_0x516c4c,'subUnitId':_0x1e72f6,'text':JSON[_0x39272d(0x19d)](_0x559128[_0x39272d(0x189)]),'parentId':_0x5e2f39}),_0x1ac857=_0xdeb79(_0x1aa970[_0x39272d(0x19b)][0x0]);return{..._0x1ac857,'children':_0x1aa970['replies'][_0x39272d(0x145)](0x1)['map'](_0x47cb9d=>_0xdeb79(_0x47cb9d,_0x1ac857['id']))};}return null;}function _0x3a2a(){const _0x417f02=['getUnit','comment','filter','getOwnPropertyDescriptor','disposeWithMe','error','14ZvraQx','Reply','6558jvZewP','replies','body','parse','post','user','_init','deleteComment','getMemberID','/add','unitId','onStarting','_initDataSource','Solved','code','Edit','_commentService','commentUpdate$','_userService','slice','_config','values','stringify','/list','rangeType','/universer-api/user/list','forEach','dataSource','updateComment','customRanges','pipe','defineProperty','516790HvWPDk','listComments','Delete','userId','238776fhrTtN','1877104SxqlIy','/universer-api/comment/unit/','root','userID','resolveComment','threadId','type','solved','symbol','1078020GUHyvl','Add','getCurrentUser','_injector','_threadCommentDataSourceService','thread-comment-data-source.config','_initUserSync','_sessionService','/solved','subscribe','onReady','addUser','comments','/reply','_httpService','saveCommentToSnapshot','get','Solve','replyId','getComment','payload','map','OpenOrReOpen','createTimestamp','455190HQotBH','reply','UNRECOGNIZED','find','resolved','requireSession','63vvkucx','parentId','Unknown','addComment','89914ByTfwH','rangeId','add','_threadCommentModel','pluginName','427eoNmaH','_threadCommentDataSource','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','length','format','/delete','ref','personId','users','delete'];_0x3a2a=function(){return _0x417f02;};return _0x3a2a();}let f=class{constructor(_0x543b6e,_0x205d66,_0x66eaba,_0x39f556){const _0x4f0e6a=_0x5500af;this[_0x4f0e6a(0x16e)]=_0x543b6e,this[_0x4f0e6a(0x144)]=_0x205d66,this['_sessionService']=_0x66eaba,this[_0x4f0e6a(0x163)]=_0x39f556;}async['addComment'](_0x358b36){const _0x266d28=_0x5500af;var _0x267ceb,_0x38bcdf;const {parentId:_0x4e14e7,unitId:_0xc4c883,text:_0x4ce085,threadId:_0x5b4955}=_0x358b36,_0x57f059=(_0x38bcdf=(_0x267ceb=_0x4ce085[_0x266d28(0x14f)])==null?void 0x0:_0x267ceb[_0x266d28(0x194)](_0x206b3b=>_0x206b3b[_0x266d28(0x14a)]===_0x58cdbb['COMMENT'])[_0x266d28(0x175)](_0x546d8f=>_0x546d8f[_0x266d28(0x183)]))!=null?_0x38bcdf:[],_0x1f0c92=JSON[_0x266d28(0x148)](_0x4ce085),_0x3f2f2e=(await this[_0x266d28(0x167)]['requireSession'](_0xc4c883))[_0x266d28(0x13a)]();if(_0x4e14e7){const _0x3dcf58={'memberId':_0x3f2f2e,'unitId':_0xc4c883,'content':_0x1f0c92,'mention':_0x57f059,'threadId':_0x5b4955},_0xdc0009=(await this['_httpService']['post'](_0x266d28(0x158)+_0xc4c883+_0x266d28(0x16d),{'body':_0x3dcf58}))[_0x266d28(0x19c)][_0x266d28(0x179)];return{..._0x358b36,'id':_0xdc0009[_0x266d28(0x172)],'dT':_0x4447ab(+_0xdc0009[_0x266d28(0x177)])[_0x266d28(0x18c)]('YYYY/MM/DD\x20HH:mm'),'personId':_0xdc0009['userId']};}else{const _0x572e1d={'memberId':_0x3f2f2e,'unitId':_0xc4c883,'content':_0x1f0c92,'mention':_0x57f059},_0x3af1a8=await this[_0x266d28(0x16e)]['post'](_0x266d28(0x158)+_0xc4c883+_0x266d28(0x13b),{'body':_0x572e1d});return X(_0x3af1a8[_0x266d28(0x19c)][_0x266d28(0x193)],_0x358b36);}}async['updateComment'](_0x439175){const _0x2ef6c4=_0x5500af;var _0x46a19e,_0x48f05e;const {text:_0x56a093,unitId:_0x408180}=_0x439175,_0x5f5301=(_0x48f05e=(_0x46a19e=_0x56a093[_0x2ef6c4(0x14f)])==null?void 0x0:_0x46a19e[_0x2ef6c4(0x194)](_0x31eb77=>_0x31eb77[_0x2ef6c4(0x14a)]===_0x58cdbb['COMMENT'])[_0x2ef6c4(0x175)](_0x3deffb=>_0x3deffb['rangeId']))!=null?_0x48f05e:[],_0x37dfc5=JSON['stringify'](_0x56a093),_0x22ad64=_0x439175[_0x2ef6c4(0x15c)],_0xc41945=_0x439175['id'],_0x4f12e7={'memberId':(await this[_0x2ef6c4(0x167)]['requireSession'](_0x408180))[_0x2ef6c4(0x13a)](),'unitId':_0x408180,'threadId':_0x22ad64,'mention':_0x5f5301,'content':_0x37dfc5,'replyId':_0xc41945},_0x2eb47c=await this[_0x2ef6c4(0x16e)][_0x2ef6c4(0x19e)](_0x2ef6c4(0x158)+_0x408180+'/edit',{'body':_0x4f12e7});return!_0x2eb47c[_0x2ef6c4(0x19c)][_0x2ef6c4(0x197)]||_0x2eb47c[_0x2ef6c4(0x19c)][_0x2ef6c4(0x197)][_0x2ef6c4(0x140)]===0x1;}async[_0x5500af(0x15b)](_0x391d2a){const _0x1d5a7d=_0x5500af,{unitId:_0x20e3cb}=_0x391d2a,_0x42883d=_0x391d2a[_0x1d5a7d(0x15c)],_0x4c84f9={'memberId':this[_0x1d5a7d(0x144)][_0x1d5a7d(0x162)]()[_0x1d5a7d(0x15a)],'unitId':_0x20e3cb,'threadId':_0x42883d,'solved':_0x391d2a[_0x1d5a7d(0x17c)]?I[_0x1d5a7d(0x13f)]:I['OpenOrReOpen']},_0x104a07=await this[_0x1d5a7d(0x16e)][_0x1d5a7d(0x19e)]('/universer-api/comment/unit/'+_0x20e3cb+_0x1d5a7d(0x168),{'body':_0x4c84f9});return!_0x104a07[_0x1d5a7d(0x19c)][_0x1d5a7d(0x197)]||_0x104a07['body'][_0x1d5a7d(0x197)][_0x1d5a7d(0x140)]===0x1;}async['deleteComment'](_0x20c77e,_0x55858a,_0x2127ca,_0x45c917){const _0x4c26ab=_0x5500af,_0x158eaf={'memberId':(await this[_0x4c26ab(0x167)][_0x4c26ab(0x17d)](_0x20c77e))[_0x4c26ab(0x13a)](),'threadId':_0x2127ca,'replyId':_0x45c917,'unitId':_0x20c77e},_0x2d2c07=await this['_httpService'][_0x4c26ab(0x19e)](_0x4c26ab(0x158)+_0x20c77e+_0x4c26ab(0x18d),{'body':_0x158eaf});return!_0x2d2c07['body'][_0x4c26ab(0x197)]||_0x2d2c07[_0x4c26ab(0x19c)]['error'][_0x4c26ab(0x140)]===0x1;}async[_0x5500af(0x153)](_0x4b21bb,_0x24c42c,_0x534e51){const _0x769906=_0x5500af,_0x1751a3={'unitId':_0x4b21bb,'threadId':_0x534e51},_0x4d77c3=await this[_0x769906(0x16e)]['post']('/universer-api/comment/unit/'+_0x4b21bb+_0x769906(0x149),{'body':_0x1751a3}),_0x1d7bcc=_0x534e51[_0x769906(0x175)](_0x4bc4df=>ee(_0x4d77c3[_0x769906(0x19c)][_0x769906(0x16c)][_0x4bc4df],_0x4b21bb,_0x24c42c))['filter'](Boolean);return Object[_0x769906(0x147)](_0x4d77c3['body']['users'])[_0x769906(0x14c)](_0x3f863d=>{const _0x36d374=_0x769906;this[_0x36d374(0x144)][_0x36d374(0x16b)](_0x3f863d);}),_0x1d7bcc;}[_0x5500af(0x16f)](_0x87c7a1){const _0x42dc3e=_0x5500af;return{'id':_0x87c7a1['id'],'threadId':_0x87c7a1[_0x42dc3e(0x15c)],'ref':_0x87c7a1[_0x42dc3e(0x18e)]};}};f=Q([_(0x0,_0x5037f1(_0x2bed63)),_(0x1,_0x5037f1(_0x2f94c9)),_(0x2,_0x5037f1(_0x14a9d7)),_(0x3,_0x5037f1(_0xd219b2))],f);var re=Object[_0x5500af(0x195)],te=(_0x21b6ec,_0x2af277,_0x502bce,_0x42ede5)=>{const _0x250b13=_0x5500af;for(var _0x1cee77=_0x42ede5>0x1?void 0x0:_0x42ede5?re(_0x2af277,_0x502bce):_0x2af277,_0x4c20db=_0x21b6ec[_0x250b13(0x18b)]-0x1,_0x4b232e;_0x4c20db>=0x0;_0x4c20db--)(_0x4b232e=_0x21b6ec[_0x4c20db])&&(_0x1cee77=_0x4b232e(_0x1cee77)||_0x1cee77);return _0x1cee77;},N=(_0x4d778a,_0x11591e)=>(_0x403835,_0x28c674)=>_0x11591e(_0x403835,_0x28c674,_0x4d778a);let g=class extends _0x2962e1{constructor(_0x1d8cc4,_0x2a4b67){const _0x3e0321=_0x5500af;super(),this[_0x3e0321(0x164)]=_0x1d8cc4,this[_0x3e0321(0x188)]=_0x2a4b67,this[_0x3e0321(0x13e)]();}[_0x5500af(0x13e)](){const _0x31cd45=_0x5500af;this[_0x31cd45(0x164)][_0x31cd45(0x14d)]=this[_0x31cd45(0x188)],this[_0x31cd45(0x164)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x474df7),N(0x1,_0x5037f1(f))],g);var se=Object[_0x5500af(0x151)],oe=Object[_0x5500af(0x195)],ne=(_0x340be8,_0x5849fb,_0x551091)=>_0x5849fb in _0x340be8?se(_0x340be8,_0x5849fb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x551091}):_0x340be8[_0x5849fb]=_0x551091,ie=(_0x475488,_0x3b7fb8,_0x592ae3,_0x3085a0)=>{for(var _0x535d47=_0x3085a0>0x1?void 0x0:_0x3085a0?oe(_0x3b7fb8,_0x592ae3):_0x3b7fb8,_0x303cd4=_0x475488['length']-0x1,_0x28c65a;_0x303cd4>=0x0;_0x303cd4--)(_0x28c65a=_0x475488[_0x303cd4])&&(_0x535d47=_0x28c65a(_0x535d47)||_0x535d47);return _0x535d47;},w=(_0x8b1040,_0x57d322)=>(_0x290efd,_0x427c60)=>_0x57d322(_0x290efd,_0x427c60,_0x8b1040),$=(_0x2fde41,_0x1441ac,_0x904550)=>ne(_0x2fde41,typeof _0x1441ac!=_0x5500af(0x15f)?_0x1441ac+'':_0x1441ac,_0x904550);let b=class extends _0x3944f4{constructor(_0x166e37=M,_0x458e81,_0x48f553){const _0x58b8a7=_0x5500af;super(),this[_0x58b8a7(0x146)]=_0x166e37,this[_0x58b8a7(0x163)]=_0x458e81,this['_configService']=_0x48f553;const {..._0x55623d}=_0x3977b3({},M,this[_0x58b8a7(0x146)]);this['_configService']['setConfig'](z,_0x55623d);}[_0x5500af(0x13d)](){const _0x503eaa=_0x5500af;[[f],[g],[S]][_0x503eaa(0x14c)](_0x1ddc58=>{const _0x42f45a=_0x503eaa;this[_0x42f45a(0x163)][_0x42f45a(0x184)](_0x1ddc58);});}[_0x5500af(0x16a)](){const _0x45ba30=_0x5500af;this['_injector'][_0x45ba30(0x170)](g),this[_0x45ba30(0x163)][_0x45ba30(0x170)](S);}};$(b,_0x5500af(0x186),W),$(b,_0x5500af(0x15d),_0x38769a['UNIVER_UNKNOWN']),b=ie([_0x1bbb36(_0x68d9,_0x3cbcf0,_0x13971c),w(0x1,_0x5037f1(_0xd219b2)),w(0x2,_0x207f36)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x166c12=_0x10f6;(function(_0x1a6a5e,_0x24319e){const _0x2e1f0c=_0x10f6,_0xdc54c=_0x1a6a5e();while(!![]){try{const _0x30adae=-parseInt(_0x2e1f0c(0x196))/0x1+parseInt(_0x2e1f0c(0x1f3))/0x2*(parseInt(_0x2e1f0c(0x19a))/0x3)+-parseInt(_0x2e1f0c(0x1ce))/0x4+-parseInt(_0x2e1f0c(0x1a6))/0x5+parseInt(_0x2e1f0c(0x1aa))/0x6+-parseInt(_0x2e1f0c(0x19b))/0x7*(-parseInt(_0x2e1f0c(0x1e7))/0x8)+parseInt(_0x2e1f0c(0x1de))/0x9;if(_0x30adae===_0x24319e)break;else _0xdc54c['push'](_0xdc54c['shift']());}catch(_0x5e5e95){_0xdc54c['push'](_0xdc54c['shift']());}}}(_0x3b23,0xacab1));import{CommentService as _0x25df25,CollaborationSessionService as _0x1cbde6,UniverCollaborationClientPlugin as _0x4b2720}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1bfdd1}from'@univerjs-pro/license';import{dayjs as _0x3cecb5,UserManagerService as _0xc83dbe,Inject as _0x8fdc81,Injector as _0x37caba,Disposable as _0x18908b,CustomRangeType as _0xf7bfe6,UniverInstanceType as _0x4acfe4,DependentOn as _0x648336,IConfigService as _0x4f6915,Plugin as _0x2b8ea1,merge as _0x984593}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3a2862}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2fa9d4,IThreadCommentDataSourceService as _0x360ed4}from'@univerjs/thread-comment';function _0x3b23(){const _0x11dc9c=['onReady','user','/universer-api/comment/unit/','addComment','254682RxgyPF','getOwnPropertyDescriptor','Unknown','Solved','18boxwqC','105oewPtB','deleteComment','saveCommentToSnapshot','/solved','comments','error','Edit','slice','customRanges','filter','_sessionService','4760075PzwSIl','_userService','setConfig','find','251904PJVoka','replies','reply','length','addUser','Solve','syncUpdateMutationToColla','Reply','defineProperty','COMMENT','resolved','_threadCommentDataSource','pluginName','_configService','userID','thread-comment-data-source.config','parse','replyId','forEach','_httpService','pipe','subscribe','users','_init','dataSource','unitId','symbol','_threadCommentModel','Delete','_initUserSync','content','/list','get','parentId','Add','threadId','4843388LFUyRx','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getComment','values','root','body','requireSession','rangeId','solved','_injector','type','code','_threadCommentDataSourceService','getUser','format','OpenOrReOpen','11679363tWsTKq','getUnit','stringify','listComments','_config','_commentService','delete','updateComment','/reply','488416kMvqye','onStarting','post','userId','/universer-api/user/list','personId','map','resolveComment','ref','getMemberID','commentUpdate$','getCurrentUser','289774kogfea','createTimestamp','disposeWithMe','size','rangeType','UNRECOGNIZED','YYYY/MM/DD\x20HH:mm','_initDataSource'];_0x3b23=function(){return _0x11dc9c;};return _0x3b23();}import{bufferTime as _0x51f2cb}from'rxjs';import{HTTPService as _0x57fadc}from'@univerjs/network';const W=_0x166c12(0x1cf);var I=(_0x3b6987=>(_0x3b6987[_0x3b6987[_0x166c12(0x1dd)]=0x0]=_0x166c12(0x1dd),_0x3b6987[_0x3b6987['Solved']=0x1]=_0x166c12(0x199),_0x3b6987[_0x3b6987[_0x166c12(0x1f8)]=-0x1]=_0x166c12(0x1f8),_0x3b6987))(I||{}),v=(_0x5855b0=>(_0x5855b0[_0x5855b0[_0x166c12(0x198)]=0x0]=_0x166c12(0x198),_0x5855b0[_0x5855b0['Add']=0x1]=_0x166c12(0x1cc),_0x5855b0[_0x5855b0[_0x166c12(0x1b1)]=0x2]=_0x166c12(0x1b1),_0x5855b0[_0x5855b0[_0x166c12(0x1a1)]=0x3]='Edit',_0x5855b0[_0x5855b0[_0x166c12(0x1c6)]=0x4]=_0x166c12(0x1c6),_0x5855b0[_0x5855b0['Solve']=0x5]=_0x166c12(0x1af),_0x5855b0[_0x5855b0[_0x166c12(0x1f8)]=-0x1]=_0x166c12(0x1f8),_0x5855b0))(v||{});const D=_0x3cd454=>_0x3cecb5(new Date(+_0x3cd454))[_0x166c12(0x1dc)](_0x166c12(0x1f9)),B=async(_0x36e145,_0xb19bb2)=>{const _0x43792d=_0x166c12,_0x4553f7=_0x36e145[_0x43792d(0x1ca)](_0xc83dbe),_0x5a2ed8=_0x36e145[_0x43792d(0x1ca)](_0x57fadc);_0xb19bb2[_0x43792d(0x1bc)](_0x9aba20=>{const _0x2c17f0=_0x43792d;_0x4553f7[_0x2c17f0(0x1db)](_0x9aba20)&&_0xb19bb2[_0x2c17f0(0x1e4)](_0x9aba20);}),_0xb19bb2[_0x43792d(0x1f6)]&&(await _0x5a2ed8[_0x43792d(0x1ca)](_0x43792d(0x1eb),{'params':{'userIDs':[..._0xb19bb2]}}))['body'][_0x43792d(0x1c0)][_0x43792d(0x1bc)](_0x1fa17e=>{const _0x2c68b1=_0x43792d;_0x1fa17e&&_0x4553f7[_0x2c68b1(0x1ae)](_0x1fa17e);});};var K=Object[_0x166c12(0x197)],V=(_0x4d23cd,_0xa427dc,_0x48082a,_0x1c2e22)=>{const _0x2d02d5=_0x166c12;for(var _0x21a7ca=_0x1c2e22>0x1?void 0x0:_0x1c2e22?K(_0xa427dc,_0x48082a):_0xa427dc,_0x10936c=_0x4d23cd[_0x2d02d5(0x1ad)]-0x1,_0x453bbb;_0x10936c>=0x0;_0x10936c--)(_0x453bbb=_0x4d23cd[_0x10936c])&&(_0x21a7ca=_0x453bbb(_0x21a7ca)||_0x21a7ca);return _0x21a7ca;},p=(_0x55630d,_0x37a088)=>(_0x155671,_0x396802)=>_0x37a088(_0x155671,_0x396802,_0x55630d);let S=class extends _0x18908b{constructor(_0x29a138,_0x2106e2,_0x4fcc7e,_0x251864){const _0x3e0b62=_0x166c12;super(),this[_0x3e0b62(0x1e3)]=_0x29a138,this[_0x3e0b62(0x1c5)]=_0x2106e2,this[_0x3e0b62(0x1a7)]=_0x4fcc7e,this[_0x3e0b62(0x1d7)]=_0x251864,this[_0x3e0b62(0x1c1)](),this[_0x3e0b62(0x1c7)]();}[_0x166c12(0x1c7)](){const _0x2c8663=_0x166c12;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$'][_0x2c8663(0x1be)](_0x51f2cb(0x10))[_0x2c8663(0x1bf)](_0x50bb92=>{const _0x38242d=_0x2c8663,_0x3b47f0=new Set();_0x50bb92[_0x38242d(0x1bc)](_0x7709b4=>{const _0x43aef5=_0x38242d;switch(_0x7709b4[_0x43aef5(0x1d8)]){case'add':{const _0x3f9fa3=_0x7709b4['payload'][_0x43aef5(0x1ec)];_0x3b47f0['add'](_0x3f9fa3);break;}}}),B(this[_0x38242d(0x1d7)],_0x3b47f0);}));}[_0x166c12(0x1c1)](){const _0x24e48e=_0x166c12;this[_0x24e48e(0x1f5)](this[_0x24e48e(0x1e3)][_0x24e48e(0x1f1)][_0x24e48e(0x1bf)](async _0x4f670f=>{const _0x2b94df=_0x24e48e;var _0x46d6ed,_0x5cd8a7,_0x3e5c43,_0x63985b;const _0x887d46=(_0x46d6ed=this[_0x2b94df(0x1c5)][_0x2b94df(0x1df)](_0x4f670f[_0x2b94df(0x1c3)])[_0x2b94df(0x1a9)](_0x47934d=>_0x47934d[_0x2b94df(0x1cd)]===_0x4f670f[_0x2b94df(0x1cd)]))==null?void 0x0:_0x46d6ed[_0x2b94df(0x1d2)];if(!_0x887d46)return;const {unitId:_0x30791d,subUnitId:_0x11c418}=_0x887d46;switch(_0x4f670f['user']&&this['_userService'][_0x2b94df(0x1ae)](_0x4f670f['user']),_0x4f670f['type']){case v[_0x2b94df(0x1cc)]:break;case v['Reply']:{this[_0x2b94df(0x1c5)]['addComment'](_0x30791d,_0x11c418,{'unitId':_0x30791d,'subUnitId':_0x11c418,'ref':'','id':_0x4f670f[_0x2b94df(0x1bb)],'dT':D(+_0x4f670f[_0x2b94df(0x1f4)]),'threadId':_0x4f670f[_0x2b94df(0x1cd)],'personId':(_0x3e5c43=(_0x5cd8a7=_0x4f670f[_0x2b94df(0x193)])==null?void 0x0:_0x5cd8a7[_0x2b94df(0x1b8)])!=null?_0x3e5c43:_0x4f670f['userId'],'text':JSON[_0x2b94df(0x1ba)](_0x4f670f[_0x2b94df(0x1c8)]),'parentId':_0x887d46['id']});break;}case v['Delete']:{const _0x352c5b=this[_0x2b94df(0x1c5)][_0x2b94df(0x1d0)](_0x30791d,_0x11c418,_0x4f670f[_0x2b94df(0x1bb)]);_0x352c5b&&_0x352c5b[_0x2b94df(0x1cb)]&&this[_0x2b94df(0x1c5)][_0x2b94df(0x19c)](_0x30791d,_0x11c418,_0x4f670f[_0x2b94df(0x1bb)]);break;}case v[_0x2b94df(0x1a1)]:{this['_threadCommentModel'][_0x2b94df(0x1e5)](_0x30791d,_0x11c418,{'commentId':_0x4f670f[_0x2b94df(0x1bb)],'text':JSON[_0x2b94df(0x1ba)](_0x4f670f['content'])});break;}case v['Solve']:{const _0x349091=(_0x63985b=this[_0x2b94df(0x1c5)]['getUnit'](_0x4f670f[_0x2b94df(0x1c3)])[_0x2b94df(0x1a9)](_0x2e22bd=>_0x2e22bd[_0x2b94df(0x1cd)]===_0x4f670f['threadId']))==null?void 0x0:_0x63985b[_0x2b94df(0x1d2)];_0x349091&&this['_threadCommentModel']['resolveComment'](_0x30791d,_0x11c418,_0x349091['id'],_0x4f670f[_0x2b94df(0x1d6)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x8fdc81(_0x25df25)),p(0x1,_0x8fdc81(_0x2fa9d4)),p(0x2,_0x8fdc81(_0xc83dbe)),p(0x3,_0x8fdc81(_0x37caba))],S);const z=_0x166c12(0x1b9),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x236902,_0x351f7f,_0x1e3934,_0x4045e9)=>{const _0x5c55fa=_0x166c12;for(var _0x25ab4e=_0x4045e9>0x1?void 0x0:_0x4045e9?k(_0x351f7f,_0x1e3934):_0x351f7f,_0x2683be=_0x236902[_0x5c55fa(0x1ad)]-0x1,_0x31e114;_0x2683be>=0x0;_0x2683be--)(_0x31e114=_0x236902[_0x2683be])&&(_0x25ab4e=_0x31e114(_0x25ab4e)||_0x25ab4e);return _0x25ab4e;},_=(_0x125859,_0x5f2eb7)=>(_0x2f76a9,_0x281263)=>_0x5f2eb7(_0x2f76a9,_0x281263,_0x125859);function X(_0x3b08f7,_0x13f5a3){const _0x3183d8=_0x166c12,_0x37241b=_0x3b08f7['replies'][0x0];return{..._0x13f5a3,'id':_0x37241b[_0x3183d8(0x1bb)],'resolved':_0x3b08f7[_0x3183d8(0x1d6)]===0x1,'dT':D(_0x37241b['createTimestamp']),'personId':_0x37241b['userId'],'threadId':_0x37241b[_0x3183d8(0x1cd)]};}function ee(_0x39875d,_0x446a43,_0x730daf){const _0x196f1b=_0x166c12;var _0x4b5366,_0x5b39d7;if(((_0x5b39d7=(_0x4b5366=_0x39875d==null?void 0x0:_0x39875d[_0x196f1b(0x1ab)])==null?void 0x0:_0x4b5366[_0x196f1b(0x1ad)])!=null?_0x5b39d7:0x0)>0x0){const _0x3aaf1a=(_0x3fdef4,_0x1f6668)=>({'id':_0x3fdef4[_0x196f1b(0x1bb)],'threadId':_0x3fdef4[_0x196f1b(0x1cd)],'dT':D(_0x3fdef4[_0x196f1b(0x1f4)]),'personId':_0x3fdef4[_0x196f1b(0x1ea)],'resolved':_0x39875d[_0x196f1b(0x1d6)]===I[_0x196f1b(0x199)],'unitId':_0x446a43,'subUnitId':_0x730daf,'text':JSON[_0x196f1b(0x1ba)](_0x3fdef4[_0x196f1b(0x1c8)]),'parentId':_0x1f6668}),_0x4de25=_0x3aaf1a(_0x39875d[_0x196f1b(0x1ab)][0x0]);return{..._0x4de25,'children':_0x39875d[_0x196f1b(0x1ab)][_0x196f1b(0x1a2)](0x1)[_0x196f1b(0x1ed)](_0x2bda2d=>_0x3aaf1a(_0x2bda2d,_0x4de25['id']))};}return null;}let f=class{constructor(_0x7acca5,_0x3cc23d,_0x252b3e,_0x3160aa){this['_httpService']=_0x7acca5,this['_userService']=_0x3cc23d,this['_sessionService']=_0x252b3e,this['_injector']=_0x3160aa;}async[_0x166c12(0x195)](_0x13047e){const _0x3e8564=_0x166c12;var _0x295c93,_0x223f4f;const {parentId:_0x593255,unitId:_0x404c6d,text:_0x4134fe,threadId:_0xf7c514}=_0x13047e,_0x2f09a9=(_0x223f4f=(_0x295c93=_0x4134fe['customRanges'])==null?void 0x0:_0x295c93[_0x3e8564(0x1a4)](_0x1462bd=>_0x1462bd[_0x3e8564(0x1f7)]===_0xf7bfe6[_0x3e8564(0x1b3)])['map'](_0x4e0a3c=>_0x4e0a3c[_0x3e8564(0x1d5)]))!=null?_0x223f4f:[],_0x2338d5=JSON['stringify'](_0x4134fe),_0x42ad00=(await this[_0x3e8564(0x1a5)][_0x3e8564(0x1d4)](_0x404c6d))[_0x3e8564(0x1f0)]();if(_0x593255){const _0x88937f={'memberId':_0x42ad00,'unitId':_0x404c6d,'content':_0x2338d5,'mention':_0x2f09a9,'threadId':_0xf7c514},_0x46636e=(await this[_0x3e8564(0x1bd)]['post'](_0x3e8564(0x194)+_0x404c6d+_0x3e8564(0x1e6),{'body':_0x88937f}))[_0x3e8564(0x1d3)][_0x3e8564(0x1ac)];return{..._0x13047e,'id':_0x46636e[_0x3e8564(0x1bb)],'dT':_0x3cecb5(+_0x46636e[_0x3e8564(0x1f4)])[_0x3e8564(0x1dc)](_0x3e8564(0x1f9)),'personId':_0x46636e['userId']};}else{const _0x3484fa={'memberId':_0x42ad00,'unitId':_0x404c6d,'content':_0x2338d5,'mention':_0x2f09a9},_0x359bdb=await this[_0x3e8564(0x1bd)][_0x3e8564(0x1e9)](_0x3e8564(0x194)+_0x404c6d+'/add',{'body':_0x3484fa});return X(_0x359bdb[_0x3e8564(0x1d3)]['comment'],_0x13047e);}}async[_0x166c12(0x1e5)](_0xb7e253){const _0x1d18a8=_0x166c12;var _0x2a10f0,_0x41f84c;const {text:_0x261ae8,unitId:_0x2c0912}=_0xb7e253,_0x4e98b7=(_0x41f84c=(_0x2a10f0=_0x261ae8[_0x1d18a8(0x1a3)])==null?void 0x0:_0x2a10f0[_0x1d18a8(0x1a4)](_0x4b9621=>_0x4b9621[_0x1d18a8(0x1f7)]===_0xf7bfe6[_0x1d18a8(0x1b3)])[_0x1d18a8(0x1ed)](_0x51d2ef=>_0x51d2ef[_0x1d18a8(0x1d5)]))!=null?_0x41f84c:[],_0x1a323f=JSON[_0x1d18a8(0x1e0)](_0x261ae8),_0x2f4aa7=_0xb7e253[_0x1d18a8(0x1cd)],_0xf016b6=_0xb7e253['id'],_0xaab2ff={'memberId':(await this[_0x1d18a8(0x1a5)][_0x1d18a8(0x1d4)](_0x2c0912))['getMemberID'](),'unitId':_0x2c0912,'threadId':_0x2f4aa7,'mention':_0x4e98b7,'content':_0x1a323f,'replyId':_0xf016b6},_0x451c78=await this[_0x1d18a8(0x1bd)]['post'](_0x1d18a8(0x194)+_0x2c0912+'/edit',{'body':_0xaab2ff});return!_0x451c78[_0x1d18a8(0x1d3)][_0x1d18a8(0x1a0)]||_0x451c78[_0x1d18a8(0x1d3)]['error']['code']===0x1;}async[_0x166c12(0x1ee)](_0x2406e4){const _0x20bb96=_0x166c12,{unitId:_0x35fd9b}=_0x2406e4,_0x20540d=_0x2406e4[_0x20bb96(0x1cd)],_0x402c96={'memberId':this[_0x20bb96(0x1a7)][_0x20bb96(0x1f2)]()['userID'],'unitId':_0x35fd9b,'threadId':_0x20540d,'solved':_0x2406e4[_0x20bb96(0x1b4)]?I[_0x20bb96(0x199)]:I[_0x20bb96(0x1dd)]},_0x4cb16d=await this['_httpService'][_0x20bb96(0x1e9)]('/universer-api/comment/unit/'+_0x35fd9b+_0x20bb96(0x19e),{'body':_0x402c96});return!_0x4cb16d[_0x20bb96(0x1d3)][_0x20bb96(0x1a0)]||_0x4cb16d[_0x20bb96(0x1d3)][_0x20bb96(0x1a0)]['code']===0x1;}async[_0x166c12(0x19c)](_0x4124e3,_0x28a65b,_0xe062f3,_0x5548bd){const _0x57a811=_0x166c12,_0x47a5a0={'memberId':(await this[_0x57a811(0x1a5)][_0x57a811(0x1d4)](_0x4124e3))[_0x57a811(0x1f0)](),'threadId':_0xe062f3,'replyId':_0x5548bd,'unitId':_0x4124e3},_0x16c1c5=await this[_0x57a811(0x1bd)][_0x57a811(0x1e9)](_0x57a811(0x194)+_0x4124e3+'/delete',{'body':_0x47a5a0});return!_0x16c1c5[_0x57a811(0x1d3)]['error']||_0x16c1c5[_0x57a811(0x1d3)][_0x57a811(0x1a0)][_0x57a811(0x1d9)]===0x1;}async[_0x166c12(0x1e1)](_0x3ade55,_0x2746f5,_0x40018a){const _0x35bb43=_0x166c12,_0x18ff18={'unitId':_0x3ade55,'threadId':_0x40018a},_0x599aef=await this[_0x35bb43(0x1bd)][_0x35bb43(0x1e9)](_0x35bb43(0x194)+_0x3ade55+_0x35bb43(0x1c9),{'body':_0x18ff18}),_0x5485d8=_0x40018a['map'](_0x5a5e72=>ee(_0x599aef[_0x35bb43(0x1d3)][_0x35bb43(0x19f)][_0x5a5e72],_0x3ade55,_0x2746f5))[_0x35bb43(0x1a4)](Boolean);return Object[_0x35bb43(0x1d1)](_0x599aef['body'][_0x35bb43(0x1c0)])[_0x35bb43(0x1bc)](_0x649fec=>{const _0x1748d4=_0x35bb43;this[_0x1748d4(0x1a7)]['addUser'](_0x649fec);}),_0x5485d8;}[_0x166c12(0x19d)](_0x26b0fb){const _0xc11efc=_0x166c12;return{'id':_0x26b0fb['id'],'threadId':_0x26b0fb['threadId'],'ref':_0x26b0fb[_0xc11efc(0x1ef)]};}};f=Q([_(0x0,_0x8fdc81(_0x57fadc)),_(0x1,_0x8fdc81(_0xc83dbe)),_(0x2,_0x8fdc81(_0x1cbde6)),_(0x3,_0x8fdc81(_0x37caba))],f);function _0x10f6(_0x2bd15d,_0x137b0f){const _0x3b23c0=_0x3b23();return _0x10f6=function(_0x10f67c,_0xbc0d10){_0x10f67c=_0x10f67c-0x191;let _0x50d7b3=_0x3b23c0[_0x10f67c];return _0x50d7b3;},_0x10f6(_0x2bd15d,_0x137b0f);}var re=Object[_0x166c12(0x197)],te=(_0x291ffd,_0x10ef46,_0x2a468e,_0x1bbc9a)=>{const _0x5b87ed=_0x166c12;for(var _0xd0ef29=_0x1bbc9a>0x1?void 0x0:_0x1bbc9a?re(_0x10ef46,_0x2a468e):_0x10ef46,_0x14e5f6=_0x291ffd[_0x5b87ed(0x1ad)]-0x1,_0x33050f;_0x14e5f6>=0x0;_0x14e5f6--)(_0x33050f=_0x291ffd[_0x14e5f6])&&(_0xd0ef29=_0x33050f(_0xd0ef29)||_0xd0ef29);return _0xd0ef29;},N=(_0x4d2f7b,_0x19b1f8)=>(_0x12a140,_0x38bb8e)=>_0x19b1f8(_0x12a140,_0x38bb8e,_0x4d2f7b);let g=class extends _0x18908b{constructor(_0x3028cd,_0xb3add5){const _0x35c5df=_0x166c12;super(),this['_threadCommentDataSourceService']=_0x3028cd,this['_threadCommentDataSource']=_0xb3add5,this[_0x35c5df(0x191)]();}[_0x166c12(0x191)](){const _0x54824e=_0x166c12;this[_0x54824e(0x1da)][_0x54824e(0x1c2)]=this[_0x54824e(0x1b5)],this[_0x54824e(0x1da)][_0x54824e(0x1b0)]=!0x1;}};g=te([N(0x0,_0x360ed4),N(0x1,_0x8fdc81(f))],g);var se=Object[_0x166c12(0x1b2)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x382198,_0x385d53,_0x504c66)=>_0x385d53 in _0x382198?se(_0x382198,_0x385d53,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x504c66}):_0x382198[_0x385d53]=_0x504c66,ie=(_0x5618b5,_0x4abda7,_0x3b5b9a,_0x4315cf)=>{const _0x4ec47e=_0x166c12;for(var _0x534d0f=_0x4315cf>0x1?void 0x0:_0x4315cf?oe(_0x4abda7,_0x3b5b9a):_0x4abda7,_0x45acdc=_0x5618b5[_0x4ec47e(0x1ad)]-0x1,_0xd5032d;_0x45acdc>=0x0;_0x45acdc--)(_0xd5032d=_0x5618b5[_0x45acdc])&&(_0x534d0f=_0xd5032d(_0x534d0f)||_0x534d0f);return _0x534d0f;},w=(_0x36e1f1,_0x1a0080)=>(_0x14349a,_0xa97861)=>_0x1a0080(_0x14349a,_0xa97861,_0x36e1f1),$=(_0x561fa8,_0x4efdc5,_0x1e05d7)=>ne(_0x561fa8,typeof _0x4efdc5!=_0x166c12(0x1c4)?_0x4efdc5+'':_0x4efdc5,_0x1e05d7);let b=class extends _0x2b8ea1{constructor(_0x114f27=M,_0x560757,_0x133b78){const _0x538311=_0x166c12;super(),this[_0x538311(0x1e2)]=_0x114f27,this[_0x538311(0x1d7)]=_0x560757,this[_0x538311(0x1b7)]=_0x133b78;const {..._0x339ec6}=_0x984593({},M,this[_0x538311(0x1e2)]);this[_0x538311(0x1b7)][_0x538311(0x1a8)](z,_0x339ec6);}[_0x166c12(0x1e8)](){const _0x265e7d=_0x166c12;[[f],[g],[S]][_0x265e7d(0x1bc)](_0x4d52c6=>{const _0x31f9a9=_0x265e7d;this[_0x31f9a9(0x1d7)]['add'](_0x4d52c6);});}[_0x166c12(0x192)](){const _0x45d4c6=_0x166c12;this[_0x45d4c6(0x1d7)][_0x45d4c6(0x1ca)](g),this[_0x45d4c6(0x1d7)]['get'](S);}};$(b,_0x166c12(0x1b6),W),$(b,_0x166c12(0x1d8),_0x4acfe4['UNIVER_UNKNOWN']),b=ie([_0x648336(_0x3a2862,_0x4b2720,_0x1bfdd1),w(0x1,_0x8fdc81(_0x37caba)),w(0x2,_0x4f6915)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x4a5e(_0x3b30c6,_0xf051f2){const _0xc95a0e=_0xc95a();return _0x4a5e=function(_0x4a5e1a,_0x33810d){_0x4a5e1a=_0x4a5e1a-0x68;let _0x2b03ab=_0xc95a0e[_0x4a5e1a];return _0x2b03ab;},_0x4a5e(_0x3b30c6,_0xf051f2);}(function(_0x2e4a71,_0x4a9d21){const _0x50c145=_0x4a5e,_0x35fb84=_0x2e4a71();while(!![]){try{const _0x27a24a=-parseInt(_0x50c145(0xa9))/0x1*(-parseInt(_0x50c145(0x87))/0x2)+-parseInt(_0x50c145(0xb0))/0x3*(-parseInt(_0x50c145(0x71))/0x4)+-parseInt(_0x50c145(0xcf))/0x5*(-parseInt(_0x50c145(0x8b))/0x6)+-parseInt(_0x50c145(0x80))/0x7+-parseInt(_0x50c145(0xe8))/0x8+parseInt(_0x50c145(0x98))/0x9+-parseInt(_0x50c145(0xe4))/0xa*(parseInt(_0x50c145(0xa0))/0xb);if(_0x27a24a===_0x4a9d21)break;else _0x35fb84['push'](_0x35fb84['shift']());}catch(_0x2833a8){_0x35fb84['push'](_0x35fb84['shift']());}}}(_0xc95a,0xadadc),function(_0x34c3a6,_0x3bfa99){const _0x1456fd=_0x4a5e;typeof exports==_0x1456fd(0x7c)&&typeof module<'u'?_0x3bfa99(exports,require(_0x1456fd(0xd6)),require(_0x1456fd(0x8a)),require('@univerjs/core'),require(_0x1456fd(0xa7)),require(_0x1456fd(0xb9)),require(_0x1456fd(0x86)),require(_0x1456fd(0x73))):typeof define=='function'&&define[_0x1456fd(0x8f)]?define([_0x1456fd(0xa3),'@univerjs-pro/collaboration-client',_0x1456fd(0x8a),_0x1456fd(0xbe),'@univerjs/thread-comment-ui',_0x1456fd(0xb9),_0x1456fd(0x86),_0x1456fd(0x73)],_0x3bfa99):(_0x34c3a6=typeof globalThis<'u'?globalThis:_0x34c3a6||self,_0x3bfa99(_0x34c3a6['UniverProThreadCommentDatasource']={},_0x34c3a6['UniverProCollaborationClient'],_0x34c3a6[_0x1456fd(0xdb)],_0x34c3a6[_0x1456fd(0xd7)],_0x34c3a6['UniverThreadCommentUi'],_0x34c3a6[_0x1456fd(0x99)],_0x34c3a6[_0x1456fd(0x86)],_0x34c3a6[_0x1456fd(0xd4)]));}(this,function(_0xe90d93,_0x1bf8bf,_0x596226,_0x3d8fc0,_0x269e45,_0x353b4c,_0x267798,_0xc22f5a){'use strict';const _0x53c323=_0x4a5e;const _0x51dc45=_0x53c323(0xed);var _0xa819aa=(_0x1c8b01=>(_0x1c8b01[_0x1c8b01[_0x53c323(0x93)]=0x0]=_0x53c323(0x93),_0x1c8b01[_0x1c8b01[_0x53c323(0xdd)]=0x1]='Solved',_0x1c8b01[_0x1c8b01['UNRECOGNIZED']=-0x1]=_0x53c323(0xae),_0x1c8b01))(_0xa819aa||{}),_0x2e62b6=(_0x454e5b=>(_0x454e5b[_0x454e5b['Unknown']=0x0]=_0x53c323(0xde),_0x454e5b[_0x454e5b[_0x53c323(0xeb)]=0x1]=_0x53c323(0xeb),_0x454e5b[_0x454e5b[_0x53c323(0xa2)]=0x2]=_0x53c323(0xa2),_0x454e5b[_0x454e5b[_0x53c323(0xb6)]=0x3]=_0x53c323(0xb6),_0x454e5b[_0x454e5b[_0x53c323(0xac)]=0x4]=_0x53c323(0xac),_0x454e5b[_0x454e5b[_0x53c323(0xd2)]=0x5]=_0x53c323(0xd2),_0x454e5b[_0x454e5b[_0x53c323(0xae)]=-0x1]=_0x53c323(0xae),_0x454e5b))(_0x2e62b6||{});const _0x44e6f6=_0x7f5f5=>_0x3d8fc0[_0x53c323(0xd3)](new Date(+_0x7f5f5))[_0x53c323(0xee)]('YYYY/MM/DD\x20HH:mm'),_0xc26bc8=async(_0x29fb98,_0x15f5f7)=>{const _0x5e6a47=_0x53c323,_0x29d7de=_0x29fb98[_0x5e6a47(0x75)](_0x3d8fc0[_0x5e6a47(0xc1)]),_0x386431=_0x29fb98[_0x5e6a47(0x75)](_0xc22f5a[_0x5e6a47(0x77)]);_0x15f5f7[_0x5e6a47(0xdc)](_0x27f6d1=>{const _0x5df8b1=_0x5e6a47;_0x29d7de['getUser'](_0x27f6d1)&&_0x15f5f7[_0x5df8b1(0x9c)](_0x27f6d1);}),_0x15f5f7[_0x5e6a47(0x9f)]&&(await _0x386431[_0x5e6a47(0x75)](_0x5e6a47(0xb5),{'params':{'userIDs':[..._0x15f5f7]}}))[_0x5e6a47(0x6f)][_0x5e6a47(0x7e)][_0x5e6a47(0xdc)](_0x391d72=>{const _0x58507=_0x5e6a47;_0x391d72&&_0x29d7de[_0x58507(0xdf)](_0x391d72);});};var _0x5c0bc2=Object[_0x53c323(0xe7)],_0x4b78e3=(_0x28152d,_0x4444a6,_0xd2fcbd,_0x3f1723)=>{for(var _0xef8f0f=_0x3f1723>0x1?void 0x0:_0x3f1723?_0x5c0bc2(_0x4444a6,_0xd2fcbd):_0x4444a6,_0x242260=_0x28152d['length']-0x1,_0x445188;_0x242260>=0x0;_0x242260--)(_0x445188=_0x28152d[_0x242260])&&(_0xef8f0f=_0x445188(_0xef8f0f)||_0xef8f0f);return _0xef8f0f;},_0x5777db=(_0x43a613,_0xa4d4b4)=>(_0x29ed99,_0x43160f)=>_0xa4d4b4(_0x29ed99,_0x43160f,_0x43a613);let _0x25bc1d=class extends _0x3d8fc0[_0x53c323(0x96)]{constructor(_0x5413a8,_0x570757,_0xeb2f43,_0x1caa43){const _0x4aae55=_0x53c323;super(),this['_commentService']=_0x5413a8,this[_0x4aae55(0x72)]=_0x570757,this['_userService']=_0xeb2f43,this[_0x4aae55(0xbf)]=_0x1caa43,this[_0x4aae55(0x8d)](),this[_0x4aae55(0xbd)]();}[_0x53c323(0xbd)](){const _0x5a22eb=_0x53c323;this[_0x5a22eb(0xab)](this[_0x5a22eb(0x72)][_0x5a22eb(0xe0)][_0x5a22eb(0x83)](_0x267798[_0x5a22eb(0x6b)](0x10))[_0x5a22eb(0xc6)](_0x7223a1=>{const _0x2aa10a=_0x5a22eb,_0x1b5d11=new Set();_0x7223a1['forEach'](_0x5b5393=>{const _0x42252f=_0x4a5e;switch(_0x5b5393['type']){case _0x42252f(0x8c):{const _0xd4bb64=_0x5b5393[_0x42252f(0xc5)]['personId'];_0x1b5d11[_0x42252f(0x8c)](_0xd4bb64);break;}}}),_0xc26bc8(this[_0x2aa10a(0xbf)],_0x1b5d11);}));}['_init'](){const _0x1ccef4=_0x53c323;this['disposeWithMe'](this['_commentService'][_0x1ccef4(0xe0)]['subscribe'](async _0x3c8382=>{const _0x298059=_0x1ccef4;var _0x309c13,_0x1ea55e,_0x18fa41,_0x1e72c6;const _0x446a64=(_0x309c13=this[_0x298059(0x72)]['getUnit'](_0x3c8382[_0x298059(0xa6)])[_0x298059(0xb2)](_0x19a176=>_0x19a176[_0x298059(0x6c)]===_0x3c8382[_0x298059(0x6c)]))==null?void 0x0:_0x309c13[_0x298059(0xbc)];if(!_0x446a64)return;const {unitId:_0x5165a5,subUnitId:_0xc11e86}=_0x446a64;switch(_0x3c8382[_0x298059(0xcc)]&&this[_0x298059(0x7f)][_0x298059(0xdf)](_0x3c8382[_0x298059(0xcc)]),_0x3c8382['type']){case _0x2e62b6[_0x298059(0xeb)]:break;case _0x2e62b6['Reply']:{this[_0x298059(0x72)]['addComment'](_0x5165a5,_0xc11e86,{'unitId':_0x5165a5,'subUnitId':_0xc11e86,'ref':'','id':_0x3c8382['replyId'],'dT':_0x44e6f6(+_0x3c8382[_0x298059(0xcd)]),'threadId':_0x3c8382['threadId'],'personId':(_0x18fa41=(_0x1ea55e=_0x3c8382[_0x298059(0xcc)])==null?void 0x0:_0x1ea55e[_0x298059(0x7d)])!=null?_0x18fa41:_0x3c8382[_0x298059(0x89)],'text':JSON[_0x298059(0x9e)](_0x3c8382['content']),'parentId':_0x446a64['id']});break;}case _0x2e62b6[_0x298059(0xac)]:{const _0x58f2cb=this['_threadCommentModel'][_0x298059(0xc4)](_0x5165a5,_0xc11e86,_0x3c8382[_0x298059(0xd1)]);_0x58f2cb&&_0x58f2cb[_0x298059(0xe2)]&&this['_threadCommentModel'][_0x298059(0x69)](_0x5165a5,_0xc11e86,_0x3c8382[_0x298059(0xd1)]);break;}case _0x2e62b6['Edit']:{this[_0x298059(0x72)]['updateComment'](_0x5165a5,_0xc11e86,{'commentId':_0x3c8382[_0x298059(0xd1)],'text':JSON[_0x298059(0x9e)](_0x3c8382['content'])});break;}case _0x2e62b6[_0x298059(0xd2)]:{const _0x363d59=(_0x1e72c6=this['_threadCommentModel'][_0x298059(0xaf)](_0x3c8382[_0x298059(0xa6)])[_0x298059(0xb2)](_0x4fdc10=>_0x4fdc10['threadId']===_0x3c8382[_0x298059(0x6c)]))==null?void 0x0:_0x1e72c6['root'];_0x363d59&&this[_0x298059(0x72)][_0x298059(0x9d)](_0x5165a5,_0xc11e86,_0x363d59['id'],_0x3c8382['solved']===_0xa819aa[_0x298059(0xdd)]);break;}}}));}};_0x25bc1d=_0x4b78e3([_0x5777db(0x0,_0x3d8fc0[_0x53c323(0xd5)](_0x1bf8bf[_0x53c323(0x78)])),_0x5777db(0x1,_0x3d8fc0[_0x53c323(0xd5)](_0x353b4c[_0x53c323(0x82)])),_0x5777db(0x2,_0x3d8fc0[_0x53c323(0xd5)](_0x3d8fc0[_0x53c323(0xc1)])),_0x5777db(0x3,_0x3d8fc0[_0x53c323(0xd5)](_0x3d8fc0[_0x53c323(0xe1)]))],_0x25bc1d);const _0xdd85e0=_0x53c323(0xaa),_0x56e2de={};var _0x488ae2=Object[_0x53c323(0xe7)],_0x56ddcc=(_0x378290,_0x286047,_0x132a7a,_0x3de866)=>{const _0x4cc919=_0x53c323;for(var _0x1a6d3b=_0x3de866>0x1?void 0x0:_0x3de866?_0x488ae2(_0x286047,_0x132a7a):_0x286047,_0x56b14b=_0x378290[_0x4cc919(0x68)]-0x1,_0x2f1679;_0x56b14b>=0x0;_0x56b14b--)(_0x2f1679=_0x378290[_0x56b14b])&&(_0x1a6d3b=_0x2f1679(_0x1a6d3b)||_0x1a6d3b);return _0x1a6d3b;},_0x375c86=(_0x459d0e,_0x48389d)=>(_0x5ab490,_0xed135e)=>_0x48389d(_0x5ab490,_0xed135e,_0x459d0e);function _0x45c837(_0x2fe22a,_0x1e252a){const _0xc0287c=_0x53c323,_0x41c5df=_0x2fe22a[_0xc0287c(0xe9)][0x0];return{..._0x1e252a,'id':_0x41c5df[_0xc0287c(0xd1)],'resolved':_0x2fe22a[_0xc0287c(0xa5)]===0x1,'dT':_0x44e6f6(_0x41c5df['createTimestamp']),'personId':_0x41c5df[_0xc0287c(0x89)],'threadId':_0x41c5df[_0xc0287c(0x6c)]};}function _0x29b4e3(_0x513784,_0x1d077a,_0x5bb550){const _0x235b0e=_0x53c323;var _0x2ed8e0,_0x3fe402;if(((_0x3fe402=(_0x2ed8e0=_0x513784==null?void 0x0:_0x513784[_0x235b0e(0xe9)])==null?void 0x0:_0x2ed8e0[_0x235b0e(0x68)])!=null?_0x3fe402:0x0)>0x0){const _0x50d886=(_0x9a61c4,_0x14a762)=>({'id':_0x9a61c4['replyId'],'threadId':_0x9a61c4['threadId'],'dT':_0x44e6f6(_0x9a61c4[_0x235b0e(0xcd)]),'personId':_0x9a61c4[_0x235b0e(0x89)],'resolved':_0x513784[_0x235b0e(0xa5)]===_0xa819aa['Solved'],'unitId':_0x1d077a,'subUnitId':_0x5bb550,'text':JSON[_0x235b0e(0x9e)](_0x9a61c4['content']),'parentId':_0x14a762}),_0x59f764=_0x50d886(_0x513784[_0x235b0e(0xe9)][0x0]);return{..._0x59f764,'children':_0x513784[_0x235b0e(0xe9)][_0x235b0e(0x6d)](0x1)[_0x235b0e(0xa8)](_0x29a774=>_0x50d886(_0x29a774,_0x59f764['id']))};}return null;}let _0x23239d=class{constructor(_0x295dcb,_0x35af8b,_0x43172d,_0x578620){const _0x41ca24=_0x53c323;this[_0x41ca24(0x95)]=_0x295dcb,this[_0x41ca24(0x7f)]=_0x35af8b,this[_0x41ca24(0xb1)]=_0x43172d,this[_0x41ca24(0xbf)]=_0x578620;}async[_0x53c323(0xda)](_0xa5b1f){const _0x113d0e=_0x53c323;var _0xb3e30,_0x2954b3;const {parentId:_0x3146c7,unitId:_0x5c4653,text:_0x4a20b5,threadId:_0x48a1a1}=_0xa5b1f,_0x3a0251=(_0x2954b3=(_0xb3e30=_0x4a20b5[_0x113d0e(0x91)])==null?void 0x0:_0xb3e30[_0x113d0e(0xbb)](_0xbd485a=>_0xbd485a[_0x113d0e(0x85)]===_0x3d8fc0[_0x113d0e(0xe6)][_0x113d0e(0x74)])['map'](_0x38bc1b=>_0x38bc1b[_0x113d0e(0xea)]))!=null?_0x2954b3:[],_0x390bc3=JSON[_0x113d0e(0xa1)](_0x4a20b5),_0x5729a0=(await this[_0x113d0e(0xb1)][_0x113d0e(0x81)](_0x5c4653))[_0x113d0e(0x6a)]();if(_0x3146c7){const _0x3cd02c={'memberId':_0x5729a0,'unitId':_0x5c4653,'content':_0x390bc3,'mention':_0x3a0251,'threadId':_0x48a1a1},_0x138762=(await this[_0x113d0e(0x95)]['post'](_0x113d0e(0x9a)+_0x5c4653+'/reply',{'body':_0x3cd02c}))[_0x113d0e(0x6f)][_0x113d0e(0xc3)];return{..._0xa5b1f,'id':_0x138762[_0x113d0e(0xd1)],'dT':_0x3d8fc0[_0x113d0e(0xd3)](+_0x138762['createTimestamp'])['format'](_0x113d0e(0x90)),'personId':_0x138762[_0x113d0e(0x89)]};}else{const _0x40665d={'memberId':_0x5729a0,'unitId':_0x5c4653,'content':_0x390bc3,'mention':_0x3a0251},_0x5dc22c=await this[_0x113d0e(0x95)][_0x113d0e(0xec)](_0x113d0e(0x9a)+_0x5c4653+_0x113d0e(0x84),{'body':_0x40665d});return _0x45c837(_0x5dc22c['body'][_0x113d0e(0xce)],_0xa5b1f);}}async[_0x53c323(0x76)](_0x58023a){const _0x5aa08b=_0x53c323;var _0x36009f,_0x36c729;const {text:_0xc4c171,unitId:_0x32f047}=_0x58023a,_0x7d82ea=(_0x36c729=(_0x36009f=_0xc4c171[_0x5aa08b(0x91)])==null?void 0x0:_0x36009f[_0x5aa08b(0xbb)](_0x307791=>_0x307791[_0x5aa08b(0x85)]===_0x3d8fc0[_0x5aa08b(0xe6)][_0x5aa08b(0x74)])['map'](_0x4db036=>_0x4db036[_0x5aa08b(0xea)]))!=null?_0x36c729:[],_0x1d0ac1=JSON[_0x5aa08b(0xa1)](_0xc4c171),_0x21af1b=_0x58023a['threadId'],_0x42dd0c=_0x58023a['id'],_0x24afc5={'memberId':(await this['_sessionService'][_0x5aa08b(0x81)](_0x32f047))[_0x5aa08b(0x6a)](),'unitId':_0x32f047,'threadId':_0x21af1b,'mention':_0x7d82ea,'content':_0x1d0ac1,'replyId':_0x42dd0c},_0x306461=await this[_0x5aa08b(0x95)][_0x5aa08b(0xec)]('/universer-api/comment/unit/'+_0x32f047+_0x5aa08b(0xd0),{'body':_0x24afc5});return!_0x306461['body'][_0x5aa08b(0x7b)]||_0x306461[_0x5aa08b(0x6f)][_0x5aa08b(0x7b)][_0x5aa08b(0xcb)]===0x1;}async[_0x53c323(0x9d)](_0x1851c2){const _0x47e6c7=_0x53c323,{unitId:_0x94dc9b}=_0x1851c2,_0x3d4d40=_0x1851c2[_0x47e6c7(0x6c)],_0x510fc8={'memberId':this[_0x47e6c7(0x7f)][_0x47e6c7(0xc8)]()[_0x47e6c7(0x7d)],'unitId':_0x94dc9b,'threadId':_0x3d4d40,'solved':_0x1851c2[_0x47e6c7(0xb3)]?_0xa819aa[_0x47e6c7(0xdd)]:_0xa819aa[_0x47e6c7(0x93)]},_0x3ec5e6=await this['_httpService']['post'](_0x47e6c7(0x9a)+_0x94dc9b+_0x47e6c7(0xe5),{'body':_0x510fc8});return!_0x3ec5e6[_0x47e6c7(0x6f)][_0x47e6c7(0x7b)]||_0x3ec5e6['body'][_0x47e6c7(0x7b)][_0x47e6c7(0xcb)]===0x1;}async[_0x53c323(0x69)](_0x10b54f,_0x341fcc,_0x377e45,_0x4b711f){const _0x101d2e=_0x53c323,_0x5b818e={'memberId':(await this['_sessionService'][_0x101d2e(0x81)](_0x10b54f))['getMemberID'](),'threadId':_0x377e45,'replyId':_0x4b711f,'unitId':_0x10b54f},_0x7a2f8f=await this[_0x101d2e(0x95)][_0x101d2e(0xec)](_0x101d2e(0x9a)+_0x10b54f+_0x101d2e(0x6e),{'body':_0x5b818e});return!_0x7a2f8f['body'][_0x101d2e(0x7b)]||_0x7a2f8f['body']['error']['code']===0x1;}async['listComments'](_0x315cbd,_0x5c870a,_0x267b3c){const _0x5802d1=_0x53c323,_0x17f184={'unitId':_0x315cbd,'threadId':_0x267b3c},_0x566ea9=await this['_httpService'][_0x5802d1(0xec)]('/universer-api/comment/unit/'+_0x315cbd+'/list',{'body':_0x17f184}),_0x4a8efc=_0x267b3c[_0x5802d1(0xa8)](_0xc6b111=>_0x29b4e3(_0x566ea9[_0x5802d1(0x6f)]['comments'][_0xc6b111],_0x315cbd,_0x5c870a))['filter'](Boolean);return Object[_0x5802d1(0xad)](_0x566ea9[_0x5802d1(0x6f)][_0x5802d1(0x7e)])['forEach'](_0x434813=>{const _0x46ee22=_0x5802d1;this[_0x46ee22(0x7f)]['addUser'](_0x434813);}),_0x4a8efc;}[_0x53c323(0xef)](_0x15d8d9){const _0x1cad0f=_0x53c323;return{'id':_0x15d8d9['id'],'threadId':_0x15d8d9[_0x1cad0f(0x6c)],'ref':_0x15d8d9[_0x1cad0f(0xe3)]};}};_0x23239d=_0x56ddcc([_0x375c86(0x0,_0x3d8fc0[_0x53c323(0xd5)](_0xc22f5a[_0x53c323(0x77)])),_0x375c86(0x1,_0x3d8fc0[_0x53c323(0xd5)](_0x3d8fc0[_0x53c323(0xc1)])),_0x375c86(0x2,_0x3d8fc0[_0x53c323(0xd5)](_0x1bf8bf['CollaborationSessionService'])),_0x375c86(0x3,_0x3d8fc0[_0x53c323(0xd5)](_0x3d8fc0[_0x53c323(0xe1)]))],_0x23239d);var _0x2c8065=Object[_0x53c323(0xe7)],_0x45dc32=(_0x1e1047,_0x1ac8f2,_0x2b3d89,_0x6c0be4)=>{const _0x342c9b=_0x53c323;for(var _0x51c8d2=_0x6c0be4>0x1?void 0x0:_0x6c0be4?_0x2c8065(_0x1ac8f2,_0x2b3d89):_0x1ac8f2,_0x42724e=_0x1e1047[_0x342c9b(0x68)]-0x1,_0x3e9b27;_0x42724e>=0x0;_0x42724e--)(_0x3e9b27=_0x1e1047[_0x42724e])&&(_0x51c8d2=_0x3e9b27(_0x51c8d2)||_0x51c8d2);return _0x51c8d2;},_0x7bcf7f=(_0x59f27e,_0x2c1ec5)=>(_0x498b28,_0x2d43bb)=>_0x2c1ec5(_0x498b28,_0x2d43bb,_0x59f27e);let _0x350f72=class extends _0x3d8fc0['Disposable']{constructor(_0x223a66,_0x2169a2){const _0x230774=_0x53c323;super(),this[_0x230774(0x97)]=_0x223a66,this['_threadCommentDataSource']=_0x2169a2,this['_initDataSource']();}[_0x53c323(0xa4)](){const _0x3879ca=_0x53c323;this[_0x3879ca(0x97)][_0x3879ca(0xc7)]=this[_0x3879ca(0xba)],this[_0x3879ca(0x97)][_0x3879ca(0xc2)]=!0x1;}};_0x350f72=_0x45dc32([_0x7bcf7f(0x0,_0x353b4c[_0x53c323(0x7a)]),_0x7bcf7f(0x1,_0x3d8fc0[_0x53c323(0xd5)](_0x23239d))],_0x350f72);var _0x171633=Object[_0x53c323(0x92)],_0x3222a0=Object[_0x53c323(0xe7)],_0x339d35=(_0x326a2c,_0xe69035,_0x25b05d)=>_0xe69035 in _0x326a2c?_0x171633(_0x326a2c,_0xe69035,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x25b05d}):_0x326a2c[_0xe69035]=_0x25b05d,_0x913526=(_0x44f581,_0x243819,_0x5d8c90,_0xa5c758)=>{const _0x1ca1a9=_0x53c323;for(var _0xce91ef=_0xa5c758>0x1?void 0x0:_0xa5c758?_0x3222a0(_0x243819,_0x5d8c90):_0x243819,_0x88e8e2=_0x44f581[_0x1ca1a9(0x68)]-0x1,_0x31b2ab;_0x88e8e2>=0x0;_0x88e8e2--)(_0x31b2ab=_0x44f581[_0x88e8e2])&&(_0xce91ef=_0x31b2ab(_0xce91ef)||_0xce91ef);return _0xce91ef;},_0x37912d=(_0x2f6991,_0x568c2c)=>(_0x52496b,_0x48d4b7)=>_0x568c2c(_0x52496b,_0x48d4b7,_0x2f6991),_0x5c2077=(_0x1558de,_0x155faa,_0x2960ac)=>_0x339d35(_0x1558de,typeof _0x155faa!=_0x53c323(0x70)?_0x155faa+'':_0x155faa,_0x2960ac);_0xe90d93[_0x53c323(0xc0)]=class extends _0x3d8fc0[_0x53c323(0x79)]{constructor(_0x21394e=_0x56e2de,_0x5deac9,_0x191713){const _0x330d24=_0x53c323;super(),this[_0x330d24(0xd9)]=_0x21394e,this[_0x330d24(0xbf)]=_0x5deac9,this[_0x330d24(0xb7)]=_0x191713;const {..._0x583aa1}=_0x3d8fc0[_0x330d24(0x9b)]({},_0x56e2de,this[_0x330d24(0xd9)]);this['_configService']['setConfig'](_0xdd85e0,_0x583aa1);}['onStarting'](){[[_0x23239d],[_0x350f72],[_0x25bc1d]]['forEach'](_0x313c8d=>{this['_injector']['add'](_0x313c8d);});}[_0x53c323(0xca)](){const _0x4e6fd4=_0x53c323;this[_0x4e6fd4(0xbf)]['get'](_0x350f72),this[_0x4e6fd4(0xbf)]['get'](_0x25bc1d);}},_0x5c2077(_0xe90d93[_0x53c323(0xc0)],_0x53c323(0xb8),_0x51dc45),_0x5c2077(_0xe90d93[_0x53c323(0xc0)],_0x53c323(0x94),_0x3d8fc0[_0x53c323(0xd8)]['UNIVER_UNKNOWN']),_0xe90d93[_0x53c323(0xc0)]=_0x913526([_0x3d8fc0['DependentOn'](_0x269e45[_0x53c323(0xb4)],_0x1bf8bf[_0x53c323(0xc9)],_0x596226[_0x53c323(0x8e)]),_0x37912d(0x1,_0x3d8fc0['Inject'](_0x3d8fc0['Injector'])),_0x37912d(0x2,_0x3d8fc0[_0x53c323(0x88)])],_0xe90d93[_0x53c323(0xc0)]),Object[_0x53c323(0x92)](_0xe90d93,Symbol['toStringTag'],{'value':'Module'});}));function _0xc95a(){const _0x29be67=['filter','root','_initUserSync','@univerjs/core','_injector','UniverThreadCommentDataSourcePlugin','UserManagerService','syncUpdateMutationToColla','reply','getComment','payload','subscribe','dataSource','getCurrentUser','UniverCollaborationClientPlugin','onReady','code','user','createTimestamp','comment','58055LpPRdQ','/edit','replyId','Solve','dayjs','UniverNetwork','Inject','@univerjs-pro/collaboration-client','UniverCore','UniverInstanceType','_config','addComment','UniverProLicense','forEach','Solved','Unknown','addUser','commentUpdate$','Injector','parentId','ref','10NdcPjI','/solved','CustomRangeType','getOwnPropertyDescriptor','9277032HGqDrt','replies','rangeId','Add','post','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','format','saveCommentToSnapshot','length','deleteComment','getMemberID','bufferTime','threadId','slice','/delete','body','symbol','216604qBuxFm','_threadCommentModel','@univerjs/network','COMMENT','get','updateComment','HTTPService','CommentService','Plugin','IThreadCommentDataSourceService','error','object','userID','users','_userService','4153051wWsnUS','requireSession','ThreadCommentModel','pipe','/add','rangeType','rxjs','601114LYjitp','IConfigService','userId','@univerjs-pro/license','630beXbTn','add','_init','UniverLicensePlugin','amd','YYYY/MM/DD\x20HH:mm','customRanges','defineProperty','OpenOrReOpen','type','_httpService','Disposable','_threadCommentDataSourceService','805770cggfBw','UniverThreadComment','/universer-api/comment/unit/','merge','delete','resolveComment','parse','size','124828AiGcPt','stringify','Reply','exports','_initDataSource','solved','unitId','@univerjs/thread-comment-ui','map','1HUGdDa','thread-comment-data-source.config','disposeWithMe','Delete','values','UNRECOGNIZED','getUnit','48UukOKy','_sessionService','find','resolved','UniverThreadCommentUIPlugin','/universer-api/user/list','Edit','_configService','pluginName','@univerjs/thread-comment','_threadCommentDataSource'];_0xc95a=function(){return _0x29be67;};return _0xc95a();}
|
|
1
|
+
function _0x372f(){const _0x590e33=['Solved','commentUpdate$','disposeWithMe','UniverThreadCommentUIPlugin','_threadCommentModel','getComment','object','dataSource','5042828quSwyU','COMMENT','forEach','find','rxjs','UNRECOGNIZED','userID','_sessionService','/solved','UniverNetwork','92287wmeItZ','_httpService','2680948QdMEQU','_threadCommentDataSource','UserManagerService','@univerjs-pro/collaboration-client','rangeType','OpenOrReOpen','UniverProCollaborationClient','add','thread-comment-data-source.config','resolveComment','subscribe','5351255SuSdJK','length','@univerjs/thread-comment-ui','Inject','onStarting','root','getUser','syncUpdateMutationToColla','getCurrentUser','/universer-api/comment/unit/','map','toStringTag','Injector','addComment','addUser','comments','Module','rangeId','@univerjs/network','error','createTimestamp','Plugin','updateComment','Solve','Edit','ThreadCommentModel','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','UniverInstanceType','personId','_injector','exports','content','27959712jqOiYs','get','IThreadCommentDataSourceService','body','3008460FzIMrj','Unknown','_init','CollaborationSessionService','saveCommentToSnapshot','Delete','UniverCollaborationClientPlugin','resolved','format','UniverProThreadCommentDatasource','user','UniverCore','Reply','getOwnPropertyDescriptor','_userService','filter','replies','getUnit','requireSession','HTTPService','394854XQylbt','parse','users','replyId','/reply','reply','code','dayjs','_commentService','post','_configService','UniverThreadCommentDataSourcePlugin','CustomRangeType','pluginName','/delete','_threadCommentDataSourceService','@univerjs/thread-comment','defineProperty','userId','getMemberID','_config','@univerjs-pro/license','_initDataSource','/universer-api/user/list','bufferTime','parentId','onReady','size','@univerjs/core','CommentService','Add','/edit','listComments','/list','customRanges','function','UniverProLicense','stringify','6WgahoO','threadId','deleteComment','type','pipe','YYYY/MM/DD\x20HH:mm'];_0x372f=function(){return _0x590e33;};return _0x372f();}function _0x2a14(_0x33dc94,_0x2b2f88){const _0x372fcc=_0x372f();return _0x2a14=function(_0x2a14f5,_0x557e30){_0x2a14f5=_0x2a14f5-0x9a;let _0x55e630=_0x372fcc[_0x2a14f5];return _0x55e630;},_0x2a14(_0x33dc94,_0x2b2f88);}(function(_0x1b3363,_0x560d02){const _0x55eb81=_0x2a14,_0x8d180=_0x1b3363();while(!![]){try{const _0x1ae9b0=parseInt(_0x55eb81(0x10c))/0x1*(parseInt(_0x55eb81(0xf4))/0x2)+-parseInt(_0x55eb81(0xce))/0x3+-parseInt(_0x55eb81(0x10e))/0x4+-parseInt(_0x55eb81(0x119))/0x5+-parseInt(_0x55eb81(0xba))/0x6+-parseInt(_0x55eb81(0x102))/0x7+parseInt(_0x55eb81(0xb6))/0x8;if(_0x1ae9b0===_0x560d02)break;else _0x8d180['push'](_0x8d180['shift']());}catch(_0x49633a){_0x8d180['push'](_0x8d180['shift']());}}}(_0x372f,0xa5811),function(_0x2496d8,_0x3384ba){const _0x346e50=_0x2a14;typeof exports==_0x346e50(0x100)&&typeof module<'u'?_0x3384ba(exports,require(_0x346e50(0x111)),require('@univerjs-pro/license'),require(_0x346e50(0xea)),require(_0x346e50(0x11b)),require(_0x346e50(0xde)),require(_0x346e50(0x106)),require(_0x346e50(0xa7))):typeof define==_0x346e50(0xf1)&&define['amd']?define([_0x346e50(0xb4),_0x346e50(0x111),_0x346e50(0xe3),_0x346e50(0xea),'@univerjs/thread-comment-ui',_0x346e50(0xde),_0x346e50(0x106),_0x346e50(0xa7)],_0x3384ba):(_0x2496d8=typeof globalThis<'u'?globalThis:_0x2496d8||self,_0x3384ba(_0x2496d8[_0x346e50(0xc3)]={},_0x2496d8[_0x346e50(0x114)],_0x2496d8[_0x346e50(0xf2)],_0x2496d8[_0x346e50(0xc5)],_0x2496d8['UniverThreadCommentUi'],_0x2496d8['UniverThreadComment'],_0x2496d8['rxjs'],_0x2496d8[_0x346e50(0x10b)]));}(this,function(_0x2b4972,_0x153186,_0x1b4088,_0xf0a7f9,_0x56cf0c,_0x37eabe,_0x7a0ece,_0x5e599c){'use strict';const _0x3d86cd=_0x2a14;const _0x3399c7=_0x3d86cd(0xaf);var _0x5b6eb6=(_0x3aa485=>(_0x3aa485[_0x3aa485[_0x3d86cd(0x113)]=0x0]=_0x3d86cd(0x113),_0x3aa485[_0x3aa485[_0x3d86cd(0xfa)]=0x1]=_0x3d86cd(0xfa),_0x3aa485[_0x3aa485[_0x3d86cd(0x107)]=-0x1]=_0x3d86cd(0x107),_0x3aa485))(_0x5b6eb6||{}),_0x33bd75=(_0x3921ad=>(_0x3921ad[_0x3921ad['Unknown']=0x0]=_0x3d86cd(0xbb),_0x3921ad[_0x3921ad['Add']=0x1]=_0x3d86cd(0xec),_0x3921ad[_0x3921ad[_0x3d86cd(0xc6)]=0x2]='Reply',_0x3921ad[_0x3921ad[_0x3d86cd(0xad)]=0x3]=_0x3d86cd(0xad),_0x3921ad[_0x3921ad['Delete']=0x4]=_0x3d86cd(0xbf),_0x3921ad[_0x3921ad[_0x3d86cd(0xac)]=0x5]=_0x3d86cd(0xac),_0x3921ad[_0x3921ad[_0x3d86cd(0x107)]=-0x1]=_0x3d86cd(0x107),_0x3921ad))(_0x33bd75||{});const _0x20ca0e=_0x25d397=>_0xf0a7f9['dayjs'](new Date(+_0x25d397))[_0x3d86cd(0xc2)](_0x3d86cd(0xf9)),_0x4c1372=async(_0x509cf1,_0x42709a)=>{const _0x455a3c=_0x3d86cd,_0x11499d=_0x509cf1[_0x455a3c(0xb7)](_0xf0a7f9['UserManagerService']),_0x19eba2=_0x509cf1[_0x455a3c(0xb7)](_0x5e599c[_0x455a3c(0xcd)]);_0x42709a[_0x455a3c(0x104)](_0x380394=>{const _0x40b87f=_0x455a3c;_0x11499d[_0x40b87f(0x9b)](_0x380394)&&_0x42709a['delete'](_0x380394);}),_0x42709a[_0x455a3c(0xe9)]&&(await _0x19eba2['get'](_0x455a3c(0xe5),{'params':{'userIDs':[..._0x42709a]}}))[_0x455a3c(0xb9)][_0x455a3c(0xd0)]['forEach'](_0x426edb=>{_0x426edb&&_0x11499d['addUser'](_0x426edb);});};var _0x14eec8=Object[_0x3d86cd(0xc7)],_0x29e126=(_0x34d875,_0x28c33c,_0x55e814,_0x55e996)=>{const _0x18a99e=_0x3d86cd;for(var _0x4acb32=_0x55e996>0x1?void 0x0:_0x55e996?_0x14eec8(_0x28c33c,_0x55e814):_0x28c33c,_0x1604db=_0x34d875[_0x18a99e(0x11a)]-0x1,_0x37b7ed;_0x1604db>=0x0;_0x1604db--)(_0x37b7ed=_0x34d875[_0x1604db])&&(_0x4acb32=_0x37b7ed(_0x4acb32)||_0x4acb32);return _0x4acb32;},_0x35aace=(_0x158e64,_0x33f52f)=>(_0x1aac22,_0xf24474)=>_0x33f52f(_0x1aac22,_0xf24474,_0x158e64);let _0x1e2814=class extends _0xf0a7f9['Disposable']{constructor(_0x2d07fa,_0x10a8cb,_0x32728a,_0x505b9c){const _0x2b420f=_0x3d86cd;super(),this['_commentService']=_0x2d07fa,this[_0x2b420f(0xfe)]=_0x10a8cb,this[_0x2b420f(0xc8)]=_0x32728a,this['_injector']=_0x505b9c,this[_0x2b420f(0xbc)](),this['_initUserSync']();}['_initUserSync'](){const _0x3f9b27=_0x3d86cd;this['disposeWithMe'](this['_threadCommentModel'][_0x3f9b27(0xfb)][_0x3f9b27(0xf8)](_0x7a0ece[_0x3f9b27(0xe6)](0x10))[_0x3f9b27(0x118)](_0x516c42=>{const _0x375199=_0x3f9b27,_0x55f854=new Set();_0x516c42[_0x375199(0x104)](_0x502f40=>{const _0x27e027=_0x375199;switch(_0x502f40[_0x27e027(0xf7)]){case _0x27e027(0x115):{const _0x246af=_0x502f40['payload'][_0x27e027(0xb2)];_0x55f854[_0x27e027(0x115)](_0x246af);break;}}}),_0x4c1372(this[_0x375199(0xb3)],_0x55f854);}));}[_0x3d86cd(0xbc)](){const _0x1a96a9=_0x3d86cd;this[_0x1a96a9(0xfc)](this[_0x1a96a9(0xd6)][_0x1a96a9(0xfb)][_0x1a96a9(0x118)](async _0x438949=>{const _0x5d7087=_0x1a96a9;var _0x503679,_0x6b4dc6,_0x7dd254,_0xc98db2;const _0x16520a=(_0x503679=this[_0x5d7087(0xfe)][_0x5d7087(0xcb)](_0x438949['unitId'])['find'](_0x549b8b=>_0x549b8b['threadId']===_0x438949[_0x5d7087(0xf5)]))==null?void 0x0:_0x503679[_0x5d7087(0x9a)];if(!_0x16520a)return;const {unitId:_0x4fe338,subUnitId:_0x36b010}=_0x16520a;switch(_0x438949[_0x5d7087(0xc4)]&&this[_0x5d7087(0xc8)]['addUser'](_0x438949[_0x5d7087(0xc4)]),_0x438949['type']){case _0x33bd75['Add']:break;case _0x33bd75[_0x5d7087(0xc6)]:{this[_0x5d7087(0xfe)][_0x5d7087(0xa2)](_0x4fe338,_0x36b010,{'unitId':_0x4fe338,'subUnitId':_0x36b010,'ref':'','id':_0x438949[_0x5d7087(0xd1)],'dT':_0x20ca0e(+_0x438949['createTimestamp']),'threadId':_0x438949[_0x5d7087(0xf5)],'personId':(_0x7dd254=(_0x6b4dc6=_0x438949[_0x5d7087(0xc4)])==null?void 0x0:_0x6b4dc6[_0x5d7087(0x108)])!=null?_0x7dd254:_0x438949[_0x5d7087(0xe0)],'text':JSON['parse'](_0x438949[_0x5d7087(0xb5)]),'parentId':_0x16520a['id']});break;}case _0x33bd75[_0x5d7087(0xbf)]:{const _0x117af7=this[_0x5d7087(0xfe)][_0x5d7087(0xff)](_0x4fe338,_0x36b010,_0x438949['replyId']);_0x117af7&&_0x117af7[_0x5d7087(0xe7)]&&this[_0x5d7087(0xfe)][_0x5d7087(0xf6)](_0x4fe338,_0x36b010,_0x438949[_0x5d7087(0xd1)]);break;}case _0x33bd75[_0x5d7087(0xad)]:{this[_0x5d7087(0xfe)][_0x5d7087(0xab)](_0x4fe338,_0x36b010,{'commentId':_0x438949['replyId'],'text':JSON[_0x5d7087(0xcf)](_0x438949[_0x5d7087(0xb5)])});break;}case _0x33bd75[_0x5d7087(0xac)]:{const _0x492a5f=(_0xc98db2=this[_0x5d7087(0xfe)][_0x5d7087(0xcb)](_0x438949['unitId'])[_0x5d7087(0x105)](_0xcd27fc=>_0xcd27fc[_0x5d7087(0xf5)]===_0x438949[_0x5d7087(0xf5)]))==null?void 0x0:_0xc98db2['root'];_0x492a5f&&this[_0x5d7087(0xfe)][_0x5d7087(0x117)](_0x4fe338,_0x36b010,_0x492a5f['id'],_0x438949[_0x5d7087(0xb0)]===_0x5b6eb6[_0x5d7087(0xfa)]);break;}}}));}};_0x1e2814=_0x29e126([_0x35aace(0x0,_0xf0a7f9[_0x3d86cd(0x11c)](_0x153186[_0x3d86cd(0xeb)])),_0x35aace(0x1,_0xf0a7f9[_0x3d86cd(0x11c)](_0x37eabe[_0x3d86cd(0xae)])),_0x35aace(0x2,_0xf0a7f9[_0x3d86cd(0x11c)](_0xf0a7f9[_0x3d86cd(0x110)])),_0x35aace(0x3,_0xf0a7f9['Inject'](_0xf0a7f9['Injector']))],_0x1e2814);const _0x3bf006=_0x3d86cd(0x116),_0x402ac2={};var _0x4667ab=Object[_0x3d86cd(0xc7)],_0x4ea974=(_0x5b5222,_0x4b2e6c,_0x2ee8ca,_0x358616)=>{const _0x550c56=_0x3d86cd;for(var _0x11a6a7=_0x358616>0x1?void 0x0:_0x358616?_0x4667ab(_0x4b2e6c,_0x2ee8ca):_0x4b2e6c,_0x19932d=_0x5b5222[_0x550c56(0x11a)]-0x1,_0x51fe66;_0x19932d>=0x0;_0x19932d--)(_0x51fe66=_0x5b5222[_0x19932d])&&(_0x11a6a7=_0x51fe66(_0x11a6a7)||_0x11a6a7);return _0x11a6a7;},_0x146181=(_0x50793d,_0x4d0d64)=>(_0x5499df,_0x30573c)=>_0x4d0d64(_0x5499df,_0x30573c,_0x50793d);function _0x5b3df(_0x25fd8a,_0x4c01e5){const _0x449767=_0x3d86cd,_0x35f691=_0x25fd8a[_0x449767(0xca)][0x0];return{..._0x4c01e5,'id':_0x35f691['replyId'],'resolved':_0x25fd8a[_0x449767(0xb0)]===0x1,'dT':_0x20ca0e(_0x35f691['createTimestamp']),'personId':_0x35f691[_0x449767(0xe0)],'threadId':_0x35f691[_0x449767(0xf5)]};}function _0x1b50fd(_0x5cab63,_0x4233de,_0x3d4381){const _0x459306=_0x3d86cd;var _0x2b7e1b,_0x271e9d;if(((_0x271e9d=(_0x2b7e1b=_0x5cab63==null?void 0x0:_0x5cab63[_0x459306(0xca)])==null?void 0x0:_0x2b7e1b[_0x459306(0x11a)])!=null?_0x271e9d:0x0)>0x0){const _0x26659a=(_0x30018a,_0x1e736f)=>({'id':_0x30018a['replyId'],'threadId':_0x30018a[_0x459306(0xf5)],'dT':_0x20ca0e(_0x30018a['createTimestamp']),'personId':_0x30018a[_0x459306(0xe0)],'resolved':_0x5cab63['solved']===_0x5b6eb6[_0x459306(0xfa)],'unitId':_0x4233de,'subUnitId':_0x3d4381,'text':JSON['parse'](_0x30018a[_0x459306(0xb5)]),'parentId':_0x1e736f}),_0x4adcf4=_0x26659a(_0x5cab63[_0x459306(0xca)][0x0]);return{..._0x4adcf4,'children':_0x5cab63[_0x459306(0xca)]['slice'](0x1)[_0x459306(0x9f)](_0x18e4a4=>_0x26659a(_0x18e4a4,_0x4adcf4['id']))};}return null;}let _0x3f497e=class{constructor(_0xc9e66a,_0xe5ca1a,_0x573e5,_0x38c9c0){const _0x419c04=_0x3d86cd;this['_httpService']=_0xc9e66a,this[_0x419c04(0xc8)]=_0xe5ca1a,this[_0x419c04(0x109)]=_0x573e5,this['_injector']=_0x38c9c0;}async[_0x3d86cd(0xa2)](_0x5d8c69){const _0x4b338e=_0x3d86cd;var _0x54dc35,_0xa9dcf4;const {parentId:_0x2c27b7,unitId:_0x142643,text:_0x3c53d6,threadId:_0x493157}=_0x5d8c69,_0x5fd3b1=(_0xa9dcf4=(_0x54dc35=_0x3c53d6['customRanges'])==null?void 0x0:_0x54dc35[_0x4b338e(0xc9)](_0x2bc785=>_0x2bc785[_0x4b338e(0x112)]===_0xf0a7f9['CustomRangeType'][_0x4b338e(0x103)])['map'](_0x46475f=>_0x46475f[_0x4b338e(0xa6)]))!=null?_0xa9dcf4:[],_0x573a7c=JSON[_0x4b338e(0xf3)](_0x3c53d6),_0x19d95d=(await this['_sessionService']['requireSession'](_0x142643))['getMemberID']();if(_0x2c27b7){const _0xfed5ea={'memberId':_0x19d95d,'unitId':_0x142643,'content':_0x573a7c,'mention':_0x5fd3b1,'threadId':_0x493157},_0xfc6870=(await this[_0x4b338e(0x10d)][_0x4b338e(0xd7)](_0x4b338e(0x9e)+_0x142643+_0x4b338e(0xd2),{'body':_0xfed5ea}))[_0x4b338e(0xb9)][_0x4b338e(0xd3)];return{..._0x5d8c69,'id':_0xfc6870[_0x4b338e(0xd1)],'dT':_0xf0a7f9[_0x4b338e(0xd5)](+_0xfc6870[_0x4b338e(0xa9)])[_0x4b338e(0xc2)]('YYYY/MM/DD\x20HH:mm'),'personId':_0xfc6870[_0x4b338e(0xe0)]};}else{const _0x3cf0d3={'memberId':_0x19d95d,'unitId':_0x142643,'content':_0x573a7c,'mention':_0x5fd3b1},_0x589b86=await this['_httpService'][_0x4b338e(0xd7)](_0x4b338e(0x9e)+_0x142643+'/add',{'body':_0x3cf0d3});return _0x5b3df(_0x589b86['body']['comment'],_0x5d8c69);}}async[_0x3d86cd(0xab)](_0x1ca750){const _0x4ecc68=_0x3d86cd;var _0x468908,_0x36528a;const {text:_0x1fe948,unitId:_0x26ae73}=_0x1ca750,_0x4276a4=(_0x36528a=(_0x468908=_0x1fe948[_0x4ecc68(0xf0)])==null?void 0x0:_0x468908[_0x4ecc68(0xc9)](_0x3c99cd=>_0x3c99cd[_0x4ecc68(0x112)]===_0xf0a7f9[_0x4ecc68(0xda)][_0x4ecc68(0x103)])[_0x4ecc68(0x9f)](_0x37cb3a=>_0x37cb3a[_0x4ecc68(0xa6)]))!=null?_0x36528a:[],_0x362617=JSON[_0x4ecc68(0xf3)](_0x1fe948),_0x2fe78a=_0x1ca750[_0x4ecc68(0xf5)],_0x48197b=_0x1ca750['id'],_0x3056a7={'memberId':(await this['_sessionService'][_0x4ecc68(0xcc)](_0x26ae73))[_0x4ecc68(0xe1)](),'unitId':_0x26ae73,'threadId':_0x2fe78a,'mention':_0x4276a4,'content':_0x362617,'replyId':_0x48197b},_0x102b76=await this[_0x4ecc68(0x10d)][_0x4ecc68(0xd7)](_0x4ecc68(0x9e)+_0x26ae73+_0x4ecc68(0xed),{'body':_0x3056a7});return!_0x102b76[_0x4ecc68(0xb9)][_0x4ecc68(0xa8)]||_0x102b76[_0x4ecc68(0xb9)][_0x4ecc68(0xa8)][_0x4ecc68(0xd4)]===0x1;}async[_0x3d86cd(0x117)](_0x2b4462){const _0x622d38=_0x3d86cd,{unitId:_0x23d565}=_0x2b4462,_0x1dd722=_0x2b4462['threadId'],_0x31429={'memberId':this[_0x622d38(0xc8)][_0x622d38(0x9d)]()[_0x622d38(0x108)],'unitId':_0x23d565,'threadId':_0x1dd722,'solved':_0x2b4462[_0x622d38(0xc1)]?_0x5b6eb6[_0x622d38(0xfa)]:_0x5b6eb6[_0x622d38(0x113)]},_0x544c18=await this[_0x622d38(0x10d)][_0x622d38(0xd7)](_0x622d38(0x9e)+_0x23d565+_0x622d38(0x10a),{'body':_0x31429});return!_0x544c18[_0x622d38(0xb9)][_0x622d38(0xa8)]||_0x544c18[_0x622d38(0xb9)][_0x622d38(0xa8)][_0x622d38(0xd4)]===0x1;}async['deleteComment'](_0x35c070,_0x2bf17f,_0x244851,_0x34b591){const _0x38ba82=_0x3d86cd,_0x53b487={'memberId':(await this[_0x38ba82(0x109)]['requireSession'](_0x35c070))[_0x38ba82(0xe1)](),'threadId':_0x244851,'replyId':_0x34b591,'unitId':_0x35c070},_0x458674=await this[_0x38ba82(0x10d)][_0x38ba82(0xd7)](_0x38ba82(0x9e)+_0x35c070+_0x38ba82(0xdc),{'body':_0x53b487});return!_0x458674[_0x38ba82(0xb9)][_0x38ba82(0xa8)]||_0x458674[_0x38ba82(0xb9)][_0x38ba82(0xa8)][_0x38ba82(0xd4)]===0x1;}async[_0x3d86cd(0xee)](_0x121a30,_0xabb2e3,_0x25f6aa){const _0x1fb4c4=_0x3d86cd,_0x2f6026={'unitId':_0x121a30,'threadId':_0x25f6aa},_0x4e2f21=await this[_0x1fb4c4(0x10d)][_0x1fb4c4(0xd7)](_0x1fb4c4(0x9e)+_0x121a30+_0x1fb4c4(0xef),{'body':_0x2f6026}),_0x5dc5a9=_0x25f6aa[_0x1fb4c4(0x9f)](_0x4b8982=>_0x1b50fd(_0x4e2f21['body'][_0x1fb4c4(0xa4)][_0x4b8982],_0x121a30,_0xabb2e3))[_0x1fb4c4(0xc9)](Boolean);return Object['values'](_0x4e2f21[_0x1fb4c4(0xb9)]['users'])[_0x1fb4c4(0x104)](_0x29ab4d=>{const _0x16b03e=_0x1fb4c4;this[_0x16b03e(0xc8)][_0x16b03e(0xa3)](_0x29ab4d);}),_0x5dc5a9;}[_0x3d86cd(0xbe)](_0x26ed38){const _0x3c514e=_0x3d86cd;return{'id':_0x26ed38['id'],'threadId':_0x26ed38[_0x3c514e(0xf5)],'ref':_0x26ed38['ref']};}};_0x3f497e=_0x4ea974([_0x146181(0x0,_0xf0a7f9['Inject'](_0x5e599c['HTTPService'])),_0x146181(0x1,_0xf0a7f9['Inject'](_0xf0a7f9[_0x3d86cd(0x110)])),_0x146181(0x2,_0xf0a7f9['Inject'](_0x153186[_0x3d86cd(0xbd)])),_0x146181(0x3,_0xf0a7f9[_0x3d86cd(0x11c)](_0xf0a7f9[_0x3d86cd(0xa1)]))],_0x3f497e);var _0x1e29e8=Object[_0x3d86cd(0xc7)],_0x3b5ad9=(_0x1e2374,_0x3f9146,_0x4b49f5,_0x3fec1c)=>{const _0x62f8c9=_0x3d86cd;for(var _0x62be45=_0x3fec1c>0x1?void 0x0:_0x3fec1c?_0x1e29e8(_0x3f9146,_0x4b49f5):_0x3f9146,_0x185969=_0x1e2374[_0x62f8c9(0x11a)]-0x1,_0x433971;_0x185969>=0x0;_0x185969--)(_0x433971=_0x1e2374[_0x185969])&&(_0x62be45=_0x433971(_0x62be45)||_0x62be45);return _0x62be45;},_0x495dbf=(_0x2deb35,_0x51dc29)=>(_0x18e373,_0x1a6a96)=>_0x51dc29(_0x18e373,_0x1a6a96,_0x2deb35);let _0x32f0ff=class extends _0xf0a7f9['Disposable']{constructor(_0x21fc35,_0x38e540){const _0x2a2a67=_0x3d86cd;super(),this['_threadCommentDataSourceService']=_0x21fc35,this[_0x2a2a67(0x10f)]=_0x38e540,this[_0x2a2a67(0xe4)]();}[_0x3d86cd(0xe4)](){const _0x51503a=_0x3d86cd;this[_0x51503a(0xdd)][_0x51503a(0x101)]=this[_0x51503a(0x10f)],this[_0x51503a(0xdd)][_0x51503a(0x9c)]=!0x1;}};_0x32f0ff=_0x3b5ad9([_0x495dbf(0x0,_0x37eabe[_0x3d86cd(0xb8)]),_0x495dbf(0x1,_0xf0a7f9[_0x3d86cd(0x11c)](_0x3f497e))],_0x32f0ff);var _0x2d7605=Object[_0x3d86cd(0xdf)],_0x547fa0=Object[_0x3d86cd(0xc7)],_0x24a756=(_0x4d58e1,_0x27856a,_0x52ec5f)=>_0x27856a in _0x4d58e1?_0x2d7605(_0x4d58e1,_0x27856a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x52ec5f}):_0x4d58e1[_0x27856a]=_0x52ec5f,_0x3e8b14=(_0x3c40cc,_0x5627fe,_0x41db16,_0x2371d4)=>{const _0x50dcfb=_0x3d86cd;for(var _0x2a1fdf=_0x2371d4>0x1?void 0x0:_0x2371d4?_0x547fa0(_0x5627fe,_0x41db16):_0x5627fe,_0x3c8c53=_0x3c40cc[_0x50dcfb(0x11a)]-0x1,_0x2c3f12;_0x3c8c53>=0x0;_0x3c8c53--)(_0x2c3f12=_0x3c40cc[_0x3c8c53])&&(_0x2a1fdf=_0x2c3f12(_0x2a1fdf)||_0x2a1fdf);return _0x2a1fdf;},_0x5c866c=(_0x44c042,_0x14eeba)=>(_0x1c0148,_0x55c8e6)=>_0x14eeba(_0x1c0148,_0x55c8e6,_0x44c042),_0x533b80=(_0x2bce90,_0x4ceeab,_0x3e1ffc)=>_0x24a756(_0x2bce90,typeof _0x4ceeab!='symbol'?_0x4ceeab+'':_0x4ceeab,_0x3e1ffc);_0x2b4972['UniverThreadCommentDataSourcePlugin']=class extends _0xf0a7f9[_0x3d86cd(0xaa)]{constructor(_0x54dcd6=_0x402ac2,_0x4f4fab,_0x16d95e){const _0x2bb48b=_0x3d86cd;super(),this[_0x2bb48b(0xe2)]=_0x54dcd6,this[_0x2bb48b(0xb3)]=_0x4f4fab,this[_0x2bb48b(0xd8)]=_0x16d95e;const {..._0x32238f}=_0xf0a7f9['merge']({},_0x402ac2,this[_0x2bb48b(0xe2)]);this[_0x2bb48b(0xd8)]['setConfig'](_0x3bf006,_0x32238f);}[_0x3d86cd(0x11d)](){const _0x94bd36=_0x3d86cd;[[_0x3f497e],[_0x32f0ff],[_0x1e2814]][_0x94bd36(0x104)](_0x19b09c=>{this['_injector']['add'](_0x19b09c);});}[_0x3d86cd(0xe8)](){const _0x56fb42=_0x3d86cd;this[_0x56fb42(0xb3)][_0x56fb42(0xb7)](_0x32f0ff),this[_0x56fb42(0xb3)]['get'](_0x1e2814);}},_0x533b80(_0x2b4972['UniverThreadCommentDataSourcePlugin'],_0x3d86cd(0xdb),_0x3399c7),_0x533b80(_0x2b4972[_0x3d86cd(0xd9)],_0x3d86cd(0xf7),_0xf0a7f9[_0x3d86cd(0xb1)]['UNIVER_UNKNOWN']),_0x2b4972['UniverThreadCommentDataSourcePlugin']=_0x3e8b14([_0xf0a7f9['DependentOn'](_0x56cf0c[_0x3d86cd(0xfd)],_0x153186[_0x3d86cd(0xc0)],_0x1b4088['UniverLicensePlugin']),_0x5c866c(0x1,_0xf0a7f9[_0x3d86cd(0x11c)](_0xf0a7f9[_0x3d86cd(0xa1)])),_0x5c866c(0x2,_0xf0a7f9['IConfigService'])],_0x2b4972[_0x3d86cd(0xd9)]),Object['defineProperty'](_0x2b4972,Symbol[_0x3d86cd(0xa0)],{'value':_0x3d86cd(0xa5)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.6.10-experimental.
|
|
3
|
+
"version": "0.6.10-experimental.20250421-e4eb9bc",
|
|
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.6.10-experimental.
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs
|
|
51
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.6.10-experimental.20250421-e4eb9bc",
|
|
49
|
+
"@univerjs-pro/license": "0.6.10-experimental.20250421-e4eb9bc",
|
|
50
|
+
"@univerjs/network": "0.6.10-experimental.20250421-e4eb9bc",
|
|
51
|
+
"@univerjs/core": "0.6.10-experimental.20250421-e4eb9bc",
|
|
52
52
|
"@univerjs/protocol": "0.1.46-alpha.3",
|
|
53
|
-
"@univerjs/thread-comment": "0.6.10-experimental.
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.6.10-experimental.
|
|
53
|
+
"@univerjs/thread-comment": "0.6.10-experimental.20250421-e4eb9bc",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.6.10-experimental.20250421-e4eb9bc"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|
|
58
58
|
"typescript": "^5.8.3",
|
|
59
59
|
"vite": "^6.3.0",
|
|
60
60
|
"vitest": "^3.1.1",
|
|
61
|
-
"@univerjs-infra/shared": "0.6.10
|
|
61
|
+
"@univerjs-infra/shared": "0.6.10"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|