@univerjs-pro/thread-comment-datasource 0.24.0 → 0.25.0-insiders.20260608-e4336f7
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
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4e8059=_0x23bf;(function(_0xbcf9ca,_0xb49e82){const _0x855c97=_0x23bf,_0x3af9c6=_0xbcf9ca();while(!![]){try{const _0x165ed1=-parseInt(_0x855c97(0xf8))/0x1+parseInt(_0x855c97(0x12e))/0x2+-parseInt(_0x855c97(0x140))/0x3+-parseInt(_0x855c97(0x11b))/0x4+parseInt(_0x855c97(0x161))/0x5+-parseInt(_0x855c97(0x14f))/0x6*(-parseInt(_0x855c97(0x10f))/0x7)+-parseInt(_0x855c97(0x120))/0x8*(-parseInt(_0x855c97(0x156))/0x9);if(_0x165ed1===_0xb49e82)break;else _0x3af9c6['push'](_0x3af9c6['shift']());}catch(_0x190294){_0x3af9c6['push'](_0x3af9c6['shift']());}}}(_0xc8bc,0xd8ef5),Object[_0x4e8059(0x10e)](exports,Symbol[_0x4e8059(0x160)],{'value':_0x4e8059(0x158)}));function _0x23bf(_0x2ea274,_0x104ec5){_0x2ea274=_0x2ea274-0xf1;const _0xc8bcba=_0xc8bc();let _0x23bfcc=_0xc8bcba[_0x2ea274];return _0x23bfcc;}let e=require(`@univerjs-pro/collaboration-client`),t=require(`@univerjs-pro/license`),n=require(`@univerjs/core`),r=require(`@univerjs/thread-comment-ui`),i=require(`@univerjs/protocol`),a=require(`@univerjs/thread-comment`),o=require(`rxjs`),s=require(`@univerjs/network`);var c=_0x4e8059(0x150),l='0.24.0';const u=_0x4da32c=>(0x0,n[_0x4e8059(0x12f)])(new Date(+_0x4da32c))[_0x4e8059(0x13a)](_0x4e8059(0x165)),d=async(_0x4d0d5a,_0x24e762)=>{const _0x49823c=_0x4e8059;let _0x480cc0=_0x4d0d5a[_0x49823c(0x12c)](n[_0x49823c(0x13d)]),_0x3584ec=_0x4d0d5a[_0x49823c(0x12c)](s['HTTPService']);_0x24e762[_0x49823c(0x14c)](_0x3b6ee7=>{const _0x43bd03=_0x49823c;_0x480cc0['getUser'](_0x3b6ee7)&&_0x24e762[_0x43bd03(0x106)](_0x3b6ee7);}),_0x24e762[_0x49823c(0x128)]&&(await _0x3584ec['get'](_0x49823c(0x14a),{'params':{'userIDs':[..._0x24e762]}}))[_0x49823c(0x16e)][_0x49823c(0x147)][_0x49823c(0x14c)](_0x6bed80=>{const _0x12a6bf=_0x49823c;_0x6bed80&&_0x480cc0[_0x12a6bf(0x143)](_0x6bed80);});};function f(_0x2a0fdc,_0x42beba){return function(_0x1c4132,_0x23dddc){_0x42beba(_0x1c4132,_0x23dddc,_0x2a0fdc);};}function p(_0x4111d9,_0xc1850f,_0x38c507,_0x2b76d7){const _0x145c99=_0x4e8059;var _0xbdb3a8=arguments[_0x145c99(0x14e)],_0x443593=_0xbdb3a8<0x3?_0xc1850f:_0x2b76d7===null?_0x2b76d7=Object[_0x145c99(0x129)](_0xc1850f,_0x38c507):_0x2b76d7,_0x3049a0;if(typeof Reflect==_0x145c99(0x16d)&&typeof Reflect[_0x145c99(0x11d)]==_0x145c99(0xf4))_0x443593=Reflect[_0x145c99(0x11d)](_0x4111d9,_0xc1850f,_0x38c507,_0x2b76d7);else{for(var _0x57a297=_0x4111d9[_0x145c99(0x14e)]-0x1;_0x57a297>=0x0;_0x57a297--)(_0x3049a0=_0x4111d9[_0x57a297])&&(_0x443593=(_0xbdb3a8<0x3?_0x3049a0(_0x443593):_0xbdb3a8>0x3?_0x3049a0(_0xc1850f,_0x38c507,_0x443593):_0x3049a0(_0xc1850f,_0x38c507))||_0x443593);}return _0xbdb3a8>0x3&&_0x443593&&Object['defineProperty'](_0xc1850f,_0x38c507,_0x443593),_0x443593;}let m=class extends n[_0x4e8059(0x139)]{constructor(_0x588023,_0x223824,_0x3b3dd3,_0xe92b55){const _0x8633b7=_0x4e8059;super(),this[_0x8633b7(0x169)]=_0x588023,this['_threadCommentModel']=_0x223824,this[_0x8633b7(0x155)]=_0x3b3dd3,this[_0x8633b7(0x136)]=_0xe92b55,this['_init'](),this['_initUserSync']();}[_0x4e8059(0x102)](){const _0x333ba9=_0x4e8059;this['disposeWithMe'](this[_0x333ba9(0x10b)][_0x333ba9(0xfa)][_0x333ba9(0x132)]((0x0,o[_0x333ba9(0x113)])(0x10))[_0x333ba9(0x170)](_0x5b648d=>{const _0x2e640c=_0x333ba9;let _0x59bdf5=new Set();_0x5b648d['forEach'](_0x38e99e=>{const _0x20c35f=_0x23bf;switch(_0x38e99e[_0x20c35f(0x16f)]){case _0x20c35f(0x13f):{let _0xda62dc=_0x38e99e[_0x20c35f(0x12b)][_0x20c35f(0x13e)];_0x59bdf5['add'](_0xda62dc);break;}default:break;}}),d(this[_0x2e640c(0x136)],_0x59bdf5);}));}[_0x4e8059(0x162)](){const _0x471dba=_0x4e8059;this[_0x471dba(0x101)](this[_0x471dba(0x169)][_0x471dba(0xfa)][_0x471dba(0x170)](async _0x447e70=>{const _0xebe350=_0x471dba;var _0x5e7361;let _0x5bd10c=(_0x5e7361=this[_0xebe350(0x10b)][_0xebe350(0x15e)](_0x447e70[_0xebe350(0x15b)])[_0xebe350(0x124)](_0x55e7c4=>_0x55e7c4[_0xebe350(0xf7)]===_0x447e70[_0xebe350(0xf7)]))==null?void 0x0:_0x5e7361[_0xebe350(0xfd)];if(!_0x5bd10c)return;let {unitId:_0x48c082,subUnitId:_0x392539}=_0x5bd10c;switch(_0x447e70['user']&&this[_0xebe350(0x155)][_0xebe350(0x143)](_0x447e70[_0xebe350(0x112)]),_0x447e70[_0xebe350(0x16f)]){case i[_0xebe350(0x10c)][_0xebe350(0x15c)]:break;case i['CommentUpdateEventType'][_0xebe350(0x126)]:var _0x1381b7,_0x52ae65;this[_0xebe350(0x10b)]['addComment'](_0x48c082,_0x392539,{'unitId':_0x48c082,'subUnitId':_0x392539,'ref':'','id':_0x447e70[_0xebe350(0x130)],'dT':u(+_0x447e70[_0xebe350(0x166)]),'threadId':_0x447e70['threadId'],'personId':(_0x1381b7=(_0x52ae65=_0x447e70[_0xebe350(0x112)])==null?void 0x0:_0x52ae65[_0xebe350(0x154)])==null?_0x447e70[_0xebe350(0x146)]:_0x1381b7,'text':JSON[_0xebe350(0xff)](_0x447e70['content']),'parentId':_0x5bd10c['id']});break;case i[_0xebe350(0x10c)][_0xebe350(0x108)]:{let _0x2e79d3=this[_0xebe350(0x10b)]['getComment'](_0x48c082,_0x392539,_0x447e70[_0xebe350(0x130)]);_0x2e79d3&&_0x2e79d3[_0xebe350(0xf5)]&&this[_0xebe350(0x10b)][_0xebe350(0x151)](_0x48c082,_0x392539,_0x447e70['replyId']);break;}case i[_0xebe350(0x10c)][_0xebe350(0xfe)]:this['_threadCommentModel']['updateComment'](_0x48c082,_0x392539,{'commentId':_0x447e70[_0xebe350(0x130)],'text':JSON[_0xebe350(0xff)](_0x447e70['content'])});break;case i[_0xebe350(0x10c)][_0xebe350(0x131)]:{var _0x41a8d8;let _0x17f5f6=(_0x41a8d8=this[_0xebe350(0x10b)][_0xebe350(0x15e)](_0x447e70[_0xebe350(0x15b)])[_0xebe350(0x124)](_0x4909e8=>_0x4909e8[_0xebe350(0xf7)]===_0x447e70[_0xebe350(0xf7)]))==null?void 0x0:_0x41a8d8[_0xebe350(0xfd)];_0x17f5f6&&this['_threadCommentModel'][_0xebe350(0x11e)](_0x48c082,_0x392539,_0x17f5f6['id'],_0x447e70[_0xebe350(0x103)]===i[_0xebe350(0x15d)][_0xebe350(0x16b)]);break;}default:break;}}));}};m=p([f(0x0,(0x0,n[_0x4e8059(0x11c)])(e[_0x4e8059(0x138)])),f(0x1,(0x0,n[_0x4e8059(0x11c)])(a[_0x4e8059(0x15a)])),f(0x2,(0x0,n[_0x4e8059(0x11c)])(n[_0x4e8059(0x13d)])),f(0x3,(0x0,n['Inject'])(n[_0x4e8059(0x14b)]))],m);const h='thread-comment-data-source.config';Symbol(h);const g={};function _(_0x5037e6,_0x4ad869){const _0x5f220b=_0x4e8059;let _0x4081ea=_0x5037e6[_0x5f220b(0xfb)][0x0];return{..._0x4ad869,'id':_0x4081ea[_0x5f220b(0x130)],'resolved':_0x5037e6[_0x5f220b(0x103)]===0x1,'dT':u(_0x4081ea[_0x5f220b(0x166)]),'personId':_0x4081ea['userId'],'threadId':_0x4081ea[_0x5f220b(0xf7)]};}function v(_0x409cba,_0x184081,_0x44171f){const _0x325241=_0x4e8059;var _0xa87839,_0x495c28;if(((_0xa87839=_0x409cba==null||(_0x495c28=_0x409cba[_0x325241(0xfb)])==null?void 0x0:_0x495c28[_0x325241(0x14e)])==null?0x0:_0xa87839)>0x0){let _0x496fad=(_0x17d706,_0x1a6967)=>({'id':_0x17d706[_0x325241(0x130)],'threadId':_0x17d706['threadId'],'dT':u(_0x17d706[_0x325241(0x166)]),'personId':_0x17d706[_0x325241(0x146)],'resolved':_0x409cba[_0x325241(0x103)]===i[_0x325241(0x15d)][_0x325241(0x16b)],'unitId':_0x184081,'subUnitId':_0x44171f,'text':JSON[_0x325241(0xff)](_0x17d706[_0x325241(0x133)]),'parentId':_0x1a6967}),_0x8998da=_0x496fad(_0x409cba[_0x325241(0xfb)][0x0]);return{..._0x8998da,'children':_0x409cba[_0x325241(0xfb)]['slice'](0x1)[_0x325241(0x117)](_0x326464=>_0x496fad(_0x326464,_0x8998da['id']))};}return null;}let y=class{constructor(_0x327c84,_0x107a2d,_0x169c6f){const _0x2baaa6=_0x4e8059;this[_0x2baaa6(0x152)]=_0x327c84,this['_userService']=_0x107a2d,this[_0x2baaa6(0x127)]=_0x169c6f;}async[_0x4e8059(0x16a)](_0xdc28f2){const _0x2291e7=_0x4e8059;var _0x9cd8c8,_0x42aff6;let {parentId:_0x49daad,unitId:_0x7290a6,text:_0x1e9a6a,threadId:_0x688d1a}=_0xdc28f2,_0x529a3f=(_0x9cd8c8=(_0x42aff6=_0x1e9a6a[_0x2291e7(0xf3)])==null?void 0x0:_0x42aff6[_0x2291e7(0x12d)](_0xe06e8e=>_0xe06e8e[_0x2291e7(0x142)]===n['CustomRangeType']['COMMENT'])[_0x2291e7(0x117)](_0x2ae65d=>_0x2ae65d[_0x2291e7(0x15f)]))==null?[]:_0x9cd8c8,_0x192b29=JSON[_0x2291e7(0x163)](_0x1e9a6a),_0xccd2bd=(await this[_0x2291e7(0x127)]['requireSession'](_0x7290a6))[_0x2291e7(0x144)]();if(_0x49daad){let _0x4f943d={'memberId':_0xccd2bd,'unitId':_0x7290a6,'content':_0x192b29,'mention':_0x529a3f,'threadId':_0x688d1a},_0x2ec1c8=(await this[_0x2291e7(0x152)][_0x2291e7(0x11a)](_0x2291e7(0x141)+_0x7290a6+'/reply',{'body':_0x4f943d}))[_0x2291e7(0x16e)][_0x2291e7(0x157)];return{..._0xdc28f2,'id':_0x2ec1c8[_0x2291e7(0x130)],'dT':(0x0,n[_0x2291e7(0x12f)])(+_0x2ec1c8[_0x2291e7(0x166)])['format'](_0x2291e7(0x165)),'personId':_0x2ec1c8[_0x2291e7(0x146)]};}else{let _0x14f7e5={'memberId':_0xccd2bd,'unitId':_0x7290a6,'content':_0x192b29,'mention':_0x529a3f};return _((await this[_0x2291e7(0x152)][_0x2291e7(0x11a)](_0x2291e7(0x141)+_0x7290a6+'/add',{'body':_0x14f7e5}))[_0x2291e7(0x16e)]['comment'],_0xdc28f2);}}async[_0x4e8059(0x11f)](_0x407d2d){const _0x3d9a63=_0x4e8059;var _0x5d3ba9,_0x3fc49f;let {text:_0xe942d6,unitId:_0x6908c8}=_0x407d2d,_0x34e7a6=(_0x5d3ba9=(_0x3fc49f=_0xe942d6[_0x3d9a63(0xf3)])==null?void 0x0:_0x3fc49f[_0x3d9a63(0x12d)](_0x5c493e=>_0x5c493e['rangeType']===n[_0x3d9a63(0xf9)][_0x3d9a63(0xf6)])['map'](_0x11cb57=>_0x11cb57[_0x3d9a63(0x15f)]))==null?[]:_0x5d3ba9,_0x5381d8=JSON[_0x3d9a63(0x163)](_0xe942d6),_0xfe545d=_0x407d2d[_0x3d9a63(0xf7)],_0x148c06=_0x407d2d['id'],_0x12bd0b={'memberId':(await this['_sessionService'][_0x3d9a63(0x12a)](_0x6908c8))[_0x3d9a63(0x144)](),'unitId':_0x6908c8,'threadId':_0xfe545d,'mention':_0x34e7a6,'content':_0x5381d8,'replyId':_0x148c06},_0x32f0bf=await this[_0x3d9a63(0x152)]['post'](_0x3d9a63(0x141)+_0x6908c8+_0x3d9a63(0x114),{'body':_0x12bd0b});return!_0x32f0bf[_0x3d9a63(0x16e)]['error']||_0x32f0bf['body']['error'][_0x3d9a63(0x171)]===0x1;}async[_0x4e8059(0x11e)](_0x141aba){const _0xaa8aae=_0x4e8059;let {unitId:_0x2ec86d}=_0x141aba,_0x47a1d6=_0x141aba['threadId'],_0x26dfcf={'memberId':this[_0xaa8aae(0x155)]['getCurrentUser']()[_0xaa8aae(0x154)],'unitId':_0x2ec86d,'threadId':_0x47a1d6,'solved':_0x141aba[_0xaa8aae(0x159)]?i[_0xaa8aae(0x15d)]['Solved']:i[_0xaa8aae(0x15d)][_0xaa8aae(0x172)]},_0x17082c=await this[_0xaa8aae(0x152)][_0xaa8aae(0x11a)](_0xaa8aae(0x141)+_0x2ec86d+_0xaa8aae(0x13c),{'body':_0x26dfcf});return!_0x17082c[_0xaa8aae(0x16e)][_0xaa8aae(0x13b)]||_0x17082c[_0xaa8aae(0x16e)][_0xaa8aae(0x13b)][_0xaa8aae(0x171)]===0x1;}async[_0x4e8059(0x151)](_0xe2120c,_0x9b1d9e,_0x1d1d9c,_0xc0f9fe){const _0x200fc5=_0x4e8059;let _0x55b02c={'memberId':(await this[_0x200fc5(0x127)]['requireSession'](_0xe2120c))[_0x200fc5(0x144)](),'threadId':_0x1d1d9c,'replyId':_0xc0f9fe,'unitId':_0xe2120c},_0x500ef2=await this['_httpService'][_0x200fc5(0x11a)]('/universer-api/comment/unit/'+_0xe2120c+'/delete',{'body':_0x55b02c});return!_0x500ef2[_0x200fc5(0x16e)][_0x200fc5(0x13b)]||_0x500ef2[_0x200fc5(0x16e)]['error'][_0x200fc5(0x171)]===0x1;}async[_0x4e8059(0x14d)](_0xcc79b4,_0x5350b6,_0x593f23){const _0x50259a=_0x4e8059;let _0x2223db={'unitId':_0xcc79b4,'threadId':_0x593f23},_0x32489b=await this[_0x50259a(0x152)][_0x50259a(0x11a)]('/universer-api/comment/unit/'+_0xcc79b4+'/list',{'body':_0x2223db}),_0x31da35=_0x593f23[_0x50259a(0x117)](_0x3201bf=>v(_0x32489b[_0x50259a(0x16e)][_0x50259a(0x116)][_0x3201bf],_0xcc79b4,_0x5350b6))[_0x50259a(0x12d)](Boolean);return Object[_0x50259a(0x148)](_0x32489b[_0x50259a(0x16e)][_0x50259a(0x147)])[_0x50259a(0x14c)](_0x3b84ea=>{const _0x1a64bd=_0x50259a;this[_0x1a64bd(0x155)][_0x1a64bd(0x143)](_0x3b84ea);}),_0x31da35;}[_0x4e8059(0x119)](_0x27a27e){const _0x82974f=_0x4e8059;return{'id':_0x27a27e['id'],'threadId':_0x27a27e[_0x82974f(0xf7)],'ref':_0x27a27e[_0x82974f(0x135)]};}};function _0xc8bc(){const _0x40b2a1=['536IRrOZY','DependentOn','symbol','IThreadCommentDataSourceService','find','setConfig','Reply','_sessionService','size','getOwnPropertyDescriptor','requireSession','payload','get','filter','2307678txZcOa','dateKit','replyId','Solve','pipe','content','packageName','ref','_injector','HTTPService','CommentService','Disposable','format','error','/solved','UserManagerService','personId','add','4200642zHBeTb','/universer-api/comment/unit/','rangeType','addUser','getMemberID','version','userId','users','values','prototype','/universer-api/user/list','Injector','forEach','listComments','length','9722010HIssJX','@univerjs-pro/thread-comment-datasource','deleteComment','_httpService','UniverThreadCommentUIPlugin','userID','_userService','235467xOYvba','reply','Module','resolved','ThreadCommentModel','unitId','Add','CommentSolvedStatus','getUnit','rangeId','toStringTag','772370pXCayM','_init','stringify','dataSource','YYYY/MM/DD\x20HH:mm','createTimestamp','_config','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_commentService','addComment','Solved','onReady','object','body','type','subscribe','code','OpenOrReOpen','iterator','constructor','string','customRanges','function','parentId','COMMENT','threadId','1635175TZblyU','CustomRangeType','commentUpdate$','replies','UniverThreadCommentDataSourcePlugin','root','Edit','parse','_threadCommentDataSource','disposeWithMe','_initUserSync','solved','call','_threadCommentDataSourceService','delete','_initDataSource','Delete','_configService','pluginName','_threadCommentModel','CommentUpdateEventType','toPrimitive','defineProperty','7zdOxOR','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','IConfigService','user','bufferTime','/edit','onStarting','comments','map','default','saveCommentToSnapshot','post','3030460KJDdvz','Inject','decorate','resolveComment','updateComment'];_0xc8bc=function(){return _0x40b2a1;};return _0xc8bc();}y=p([f(0x0,(0x0,n[_0x4e8059(0x11c)])(s[_0x4e8059(0x137)])),f(0x1,(0x0,n['Inject'])(n[_0x4e8059(0x13d)])),f(0x2,(0x0,n[_0x4e8059(0x11c)])(e['CollaborationSessionService']))],y);let b=class extends n[_0x4e8059(0x139)]{constructor(_0x84bd32,_0xbaa2a7){const _0x47da72=_0x4e8059;super(),this[_0x47da72(0x105)]=_0x84bd32,this[_0x47da72(0x100)]=_0xbaa2a7,this[_0x47da72(0x107)]();}[_0x4e8059(0x107)](){const _0x357cfb=_0x4e8059;this[_0x357cfb(0x105)][_0x357cfb(0x164)]=this[_0x357cfb(0x100)],this[_0x357cfb(0x105)]['syncUpdateMutationToColla']=!0x1;}};b=p([f(0x0,a[_0x4e8059(0x123)]),f(0x1,(0x0,n[_0x4e8059(0x11c)])(y))],b);function x(_0x2c3e44){'@babel/helpers - typeof';const _0x1b7b51=_0x4e8059;return x=typeof Symbol==_0x1b7b51(0xf4)&&typeof Symbol[_0x1b7b51(0x173)]==_0x1b7b51(0x122)?function(_0x46d987){return typeof _0x46d987;}:function(_0x5b2f3e){const _0x55acfe=_0x1b7b51;return _0x5b2f3e&&typeof Symbol=='function'&&_0x5b2f3e[_0x55acfe(0xf1)]===Symbol&&_0x5b2f3e!==Symbol[_0x55acfe(0x149)]?'symbol':typeof _0x5b2f3e;},x(_0x2c3e44);}function S(_0x35a996,_0x332bb2){const _0x25715a=_0x4e8059;if(x(_0x35a996)!=_0x25715a(0x16d)||!_0x35a996)return _0x35a996;var _0x2e7a24=_0x35a996[Symbol[_0x25715a(0x10d)]];if(_0x2e7a24!==void 0x0){var _0x5d1c16=_0x2e7a24[_0x25715a(0x104)](_0x35a996,_0x332bb2||_0x25715a(0x118));if(x(_0x5d1c16)!=_0x25715a(0x16d))return _0x5d1c16;throw TypeError(_0x25715a(0x168));}return(_0x332bb2===_0x25715a(0xf2)?String:Number)(_0x35a996);}function C(_0x42a502){const _0xb693b4=_0x4e8059;var _0xc58d62=S(_0x42a502,_0xb693b4(0xf2));return x(_0xc58d62)==_0xb693b4(0x122)?_0xc58d62:_0xc58d62+'';}function w(_0x339271,_0x330568,_0xdb53e3){const _0x10c870=_0x4e8059;return(_0x330568=C(_0x330568))in _0x339271?Object[_0x10c870(0x10e)](_0x339271,_0x330568,{'value':_0xdb53e3,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x339271[_0x330568]=_0xdb53e3,_0x339271;}let T=class extends n['Plugin']{constructor(_0x42401b=g,_0x2e0f8f,_0x25f402){const _0x4288ce=_0x4e8059;super(),this['_config']=_0x42401b,this[_0x4288ce(0x136)]=_0x2e0f8f,this[_0x4288ce(0x109)]=_0x25f402;let {..._0x3acd8e}=(0x0,n['merge'])({},g,this[_0x4288ce(0x167)]);this['_configService'][_0x4288ce(0x125)](h,_0x3acd8e);}[_0x4e8059(0x115)](){const _0x3cfbbb=_0x4e8059;[[y],[b],[m]][_0x3cfbbb(0x14c)](_0x55f20f=>{const _0x337bc3=_0x3cfbbb;this[_0x337bc3(0x136)][_0x337bc3(0x13f)](_0x55f20f);});}[_0x4e8059(0x16c)](){const _0x3fc1f1=_0x4e8059;this['_injector'][_0x3fc1f1(0x12c)](b),this[_0x3fc1f1(0x136)][_0x3fc1f1(0x12c)](m);}};w(T,_0x4e8059(0x10a),_0x4e8059(0x110)),w(T,_0x4e8059(0x134),c),w(T,_0x4e8059(0x145),l),T=p([(0x0,n[_0x4e8059(0x121)])(r[_0x4e8059(0x153)],e['UniverCollaborationClientPlugin'],t['UniverLicensePlugin']),f(0x1,(0x0,n[_0x4e8059(0x11c)])(n['Injector'])),f(0x2,n[_0x4e8059(0x111)])],T),Object[_0x4e8059(0x10e)](exports,_0x4e8059(0xfc),{'enumerable':!0x0,'get':function(){return T;}});
|
|
1
|
+
const _0x1583f8=_0x13f4;function _0x3d99(){const _0x43ab6e=['getComment','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','CollaborationSessionService','updateComment','threadId','UniverLicensePlugin','_threadCommentDataSource','iterator','dateKit','UniverCollaborationClientPlugin','_threadCommentModel','Disposable','syncUpdateMutationToColla','comment','error','/delete','personId','CommentService','553800FUKJzi','@univerjs-pro/thread-comment-datasource','resolveComment','CommentSolvedStatus','function','decorate','subscribe','solved','Delete','/universer-api/user/list','slice','prototype','root','commentUpdate$','_userService','/solved','requireSession','payload','saveCommentToSnapshot','user','70ftjCcM','deleteComment','Reply','1073337lzRvGB','dataSource','replies','users','object','12jagKxh','content','resolved','119020oSxoau','1853448cayUvD','Add','getUser','getMemberID','stringify','/edit','/reply','HTTPService','IThreadCommentDataSourceService','onStarting','listComments','toStringTag','Injector','filter','_init','_commentService','CustomRangeType','8734649HMWExQ','get','map','/universer-api/comment/unit/','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','body','add','constructor','_httpService','default','getCurrentUser','packageName','13582rsoKei','ref','parse','defineProperty','find','call','421035olTXdH','createTimestamp','18pBDvwo','addComment','Inject','UserManagerService','forEach','bufferTime','version','symbol','customRanges','35zmkolF','disposeWithMe','ThreadCommentModel','replyId','Module','userID','_config','string','rangeId','_injector','reply','length','rangeType','values','comments','merge','_sessionService','CommentUpdateEventType','Solved','post','thread-comment-data-source.config','IConfigService','userId','addUser','Edit','81BgldsN','COMMENT','code','getUnit','format','unitId'];_0x3d99=function(){return _0x43ab6e;};return _0x3d99();}function _0x13f4(_0x4c240e,_0x20ef58){_0x4c240e=_0x4c240e-0x1ce;const _0x3d9969=_0x3d99();let _0x13f404=_0x3d9969[_0x4c240e];return _0x13f404;}(function(_0x44035d,_0x41e1da){const _0x1e4d26=_0x13f4,_0x46f5c7=_0x44035d();while(!![]){try{const _0x3584ed=parseInt(_0x1e4d26(0x20a))/0x1*(parseInt(_0x1e4d26(0x1e1))/0x2)+parseInt(_0x1e4d26(0x1e4))/0x3+-parseInt(_0x1e4d26(0x1ed))/0x4+-parseInt(_0x1e4d26(0x210))/0x5*(-parseInt(_0x1e4d26(0x212))/0x6)+parseInt(_0x1e4d26(0x21b))/0x7*(parseInt(_0x1e4d26(0x24c))/0x8)+parseInt(_0x1e4d26(0x234))/0x9*(parseInt(_0x1e4d26(0x1ec))/0xa)+parseInt(_0x1e4d26(0x1fe))/0xb*(-parseInt(_0x1e4d26(0x1e9))/0xc);if(_0x3584ed===_0x41e1da)break;else _0x46f5c7['push'](_0x46f5c7['shift']());}catch(_0x502595){_0x46f5c7['push'](_0x46f5c7['shift']());}}}(_0x3d99,0x44bf8),Object[_0x1583f8(0x20d)](exports,Symbol[_0x1583f8(0x1f8)],{'value':_0x1583f8(0x21f)}));let e=require('@univerjs-pro/collaboration-client'),t=require('@univerjs-pro/license'),n=require('@univerjs/core'),r=require('@univerjs/thread-comment-ui'),i=require('@univerjs/protocol'),a=require('@univerjs/thread-comment'),o=require('rxjs'),s=require('@univerjs/network');var c=_0x1583f8(0x1ce),l='0.25.0-insiders.20260608-e4336f7';const u=_0x27b21f=>(0x0,n[_0x1583f8(0x242)])(new Date(+_0x27b21f))[_0x1583f8(0x238)]('YYYY/MM/DD\x20HH:mm'),d=async(_0x457906,_0x225e4c)=>{const _0x2f024b=_0x1583f8;let _0x190f8b=_0x457906[_0x2f024b(0x1ff)](n['UserManagerService']),_0x1b534c=_0x457906[_0x2f024b(0x1ff)](s['HTTPService']);_0x225e4c[_0x2f024b(0x216)](_0x4fbb6e=>{const _0x4cb250=_0x2f024b;_0x190f8b[_0x4cb250(0x1ef)](_0x4fbb6e)&&_0x225e4c['delete'](_0x4fbb6e);}),_0x225e4c['size']&&(await _0x1b534c[_0x2f024b(0x1ff)](_0x2f024b(0x1d6),{'params':{'userIDs':[..._0x225e4c]}}))[_0x2f024b(0x203)][_0x2f024b(0x1e7)][_0x2f024b(0x216)](_0x2639a1=>{const _0x1655d9=_0x2f024b;_0x2639a1&&_0x190f8b[_0x1655d9(0x232)](_0x2639a1);});};function f(_0x18ce9f,_0x2e074b){return function(_0x51b2ec,_0x53e590){_0x2e074b(_0x51b2ec,_0x53e590,_0x18ce9f);};}function p(_0x201407,_0x755e30,_0x59f5c7,_0x4b6091){const _0x3691eb=_0x1583f8;var _0x5a04dc=arguments['length'],_0x2731e0=_0x5a04dc<0x3?_0x755e30:_0x4b6091===null?_0x4b6091=Object['getOwnPropertyDescriptor'](_0x755e30,_0x59f5c7):_0x4b6091,_0x4973ba;if(typeof Reflect==_0x3691eb(0x1e8)&&typeof Reflect[_0x3691eb(0x1d2)]==_0x3691eb(0x1d1))_0x2731e0=Reflect[_0x3691eb(0x1d2)](_0x201407,_0x755e30,_0x59f5c7,_0x4b6091);else{for(var _0xb5cc13=_0x201407[_0x3691eb(0x226)]-0x1;_0xb5cc13>=0x0;_0xb5cc13--)(_0x4973ba=_0x201407[_0xb5cc13])&&(_0x2731e0=(_0x5a04dc<0x3?_0x4973ba(_0x2731e0):_0x5a04dc>0x3?_0x4973ba(_0x755e30,_0x59f5c7,_0x2731e0):_0x4973ba(_0x755e30,_0x59f5c7))||_0x2731e0);}return _0x5a04dc>0x3&&_0x2731e0&&Object[_0x3691eb(0x20d)](_0x755e30,_0x59f5c7,_0x2731e0),_0x2731e0;}let m=class extends n[_0x1583f8(0x245)]{constructor(_0x5e53ac,_0x452862,_0x1dc57c,_0x32e64f){const _0x4eb546=_0x1583f8;super(),this[_0x4eb546(0x1fc)]=_0x5e53ac,this[_0x4eb546(0x244)]=_0x452862,this[_0x4eb546(0x1db)]=_0x1dc57c,this[_0x4eb546(0x224)]=_0x32e64f,this[_0x4eb546(0x1fb)](),this['_initUserSync']();}['_initUserSync'](){const _0x33f155=_0x1583f8;this[_0x33f155(0x21c)](this[_0x33f155(0x244)]['commentUpdate$']['pipe']((0x0,o[_0x33f155(0x217)])(0x10))[_0x33f155(0x1d3)](_0xa723c3=>{const _0x468515=_0x33f155;let _0x16bc2b=new Set();_0xa723c3[_0x468515(0x216)](_0xd77838=>{const _0x10aca0=_0x468515;switch(_0xd77838['type']){case _0x10aca0(0x204):{let _0x4559cf=_0xd77838[_0x10aca0(0x1de)][_0x10aca0(0x24a)];_0x16bc2b[_0x10aca0(0x204)](_0x4559cf);break;}default:break;}}),d(this['_injector'],_0x16bc2b);}));}['_init'](){const _0x55ae88=_0x1583f8;this['disposeWithMe'](this[_0x55ae88(0x1fc)][_0x55ae88(0x1da)][_0x55ae88(0x1d3)](async _0x5dad70=>{const _0x5858bf=_0x55ae88;var _0x503c9c;let _0x37fea7=(_0x503c9c=this[_0x5858bf(0x244)][_0x5858bf(0x237)](_0x5dad70[_0x5858bf(0x239)])[_0x5858bf(0x20e)](_0x30a47d=>_0x30a47d['threadId']===_0x5dad70[_0x5858bf(0x23e)]))==null?void 0x0:_0x503c9c[_0x5858bf(0x1d9)];if(!_0x37fea7)return;let {unitId:_0x14acbd,subUnitId:_0x2d6755}=_0x37fea7;switch(_0x5dad70[_0x5858bf(0x1e0)]&&this[_0x5858bf(0x1db)][_0x5858bf(0x232)](_0x5dad70[_0x5858bf(0x1e0)]),_0x5dad70['type']){case i[_0x5858bf(0x22c)][_0x5858bf(0x1ee)]:break;case i['CommentUpdateEventType'][_0x5858bf(0x1e3)]:var _0x2bc6f0,_0x8c4962;this[_0x5858bf(0x244)][_0x5858bf(0x213)](_0x14acbd,_0x2d6755,{'unitId':_0x14acbd,'subUnitId':_0x2d6755,'ref':'','id':_0x5dad70[_0x5858bf(0x21e)],'dT':u(+_0x5dad70[_0x5858bf(0x211)]),'threadId':_0x5dad70[_0x5858bf(0x23e)],'personId':(_0x2bc6f0=(_0x8c4962=_0x5dad70[_0x5858bf(0x1e0)])==null?void 0x0:_0x8c4962[_0x5858bf(0x220)])==null?_0x5dad70[_0x5858bf(0x231)]:_0x2bc6f0,'text':JSON[_0x5858bf(0x20c)](_0x5dad70[_0x5858bf(0x1ea)]),'parentId':_0x37fea7['id']});break;case i[_0x5858bf(0x22c)][_0x5858bf(0x1d5)]:{let _0x3a9c17=this[_0x5858bf(0x244)][_0x5858bf(0x23a)](_0x14acbd,_0x2d6755,_0x5dad70[_0x5858bf(0x21e)]);_0x3a9c17&&_0x3a9c17['parentId']&&this[_0x5858bf(0x244)][_0x5858bf(0x1e2)](_0x14acbd,_0x2d6755,_0x5dad70[_0x5858bf(0x21e)]);break;}case i[_0x5858bf(0x22c)][_0x5858bf(0x233)]:this[_0x5858bf(0x244)][_0x5858bf(0x23d)](_0x14acbd,_0x2d6755,{'commentId':_0x5dad70[_0x5858bf(0x21e)],'text':JSON[_0x5858bf(0x20c)](_0x5dad70[_0x5858bf(0x1ea)])});break;case i[_0x5858bf(0x22c)]['Solve']:{var _0x37c7a1;let _0x1eeacd=(_0x37c7a1=this[_0x5858bf(0x244)]['getUnit'](_0x5dad70[_0x5858bf(0x239)])['find'](_0x155fc6=>_0x155fc6[_0x5858bf(0x23e)]===_0x5dad70['threadId']))==null?void 0x0:_0x37c7a1['root'];_0x1eeacd&&this[_0x5858bf(0x244)]['resolveComment'](_0x14acbd,_0x2d6755,_0x1eeacd['id'],_0x5dad70[_0x5858bf(0x1d4)]===i[_0x5858bf(0x1d0)][_0x5858bf(0x22d)]);break;}default:break;}}));}};m=p([f(0x0,(0x0,n[_0x1583f8(0x214)])(e[_0x1583f8(0x24b)])),f(0x1,(0x0,n[_0x1583f8(0x214)])(a[_0x1583f8(0x21d)])),f(0x2,(0x0,n[_0x1583f8(0x214)])(n[_0x1583f8(0x215)])),f(0x3,(0x0,n[_0x1583f8(0x214)])(n[_0x1583f8(0x1f9)]))],m);const h={};function g(_0x119cc0,_0x1b593d){const _0x48a429=_0x1583f8;let _0x4551c8=_0x119cc0[_0x48a429(0x1e6)][0x0];return{..._0x1b593d,'id':_0x4551c8[_0x48a429(0x21e)],'resolved':_0x119cc0['solved']===0x1,'dT':u(_0x4551c8['createTimestamp']),'personId':_0x4551c8[_0x48a429(0x231)],'threadId':_0x4551c8[_0x48a429(0x23e)]};}function _(_0x106851,_0x1af6eb,_0x4f5244){const _0x4e0fbf=_0x1583f8;var _0x2b66ed,_0x20bc3a;if(((_0x2b66ed=_0x106851==null||(_0x20bc3a=_0x106851[_0x4e0fbf(0x1e6)])==null?void 0x0:_0x20bc3a[_0x4e0fbf(0x226)])==null?0x0:_0x2b66ed)>0x0){let _0x437fc7=(_0x19fceb,_0x1b1b9f)=>({'id':_0x19fceb['replyId'],'threadId':_0x19fceb['threadId'],'dT':u(_0x19fceb[_0x4e0fbf(0x211)]),'personId':_0x19fceb['userId'],'resolved':_0x106851[_0x4e0fbf(0x1d4)]===i[_0x4e0fbf(0x1d0)][_0x4e0fbf(0x22d)],'unitId':_0x1af6eb,'subUnitId':_0x4f5244,'text':JSON[_0x4e0fbf(0x20c)](_0x19fceb['content']),'parentId':_0x1b1b9f}),_0x1ad1ee=_0x437fc7(_0x106851[_0x4e0fbf(0x1e6)][0x0]);return{..._0x1ad1ee,'children':_0x106851[_0x4e0fbf(0x1e6)][_0x4e0fbf(0x1d7)](0x1)[_0x4e0fbf(0x200)](_0x434c08=>_0x437fc7(_0x434c08,_0x1ad1ee['id']))};}return null;}let v=class{constructor(_0x1edd5c,_0x40a744,_0xea8c5f){const _0xb2f940=_0x1583f8;this[_0xb2f940(0x206)]=_0x1edd5c,this[_0xb2f940(0x1db)]=_0x40a744,this[_0xb2f940(0x22b)]=_0xea8c5f;}async[_0x1583f8(0x213)](_0x40ba53){const _0x3d8bb8=_0x1583f8;var _0x5570f8,_0x2957c6;let {parentId:_0x122e00,unitId:_0x155111,text:_0x515d05,threadId:_0x5179bf}=_0x40ba53,_0x52c8c1=(_0x5570f8=(_0x2957c6=_0x515d05[_0x3d8bb8(0x21a)])==null?void 0x0:_0x2957c6['filter'](_0x465b8e=>_0x465b8e[_0x3d8bb8(0x227)]===n[_0x3d8bb8(0x1fd)][_0x3d8bb8(0x235)])['map'](_0x16e3f3=>_0x16e3f3['rangeId']))==null?[]:_0x5570f8,_0x53ddbc=JSON[_0x3d8bb8(0x1f1)](_0x515d05),_0xd5784=(await this[_0x3d8bb8(0x22b)][_0x3d8bb8(0x1dd)](_0x155111))[_0x3d8bb8(0x1f0)]();if(_0x122e00){let _0x28dcc1={'memberId':_0xd5784,'unitId':_0x155111,'content':_0x53ddbc,'mention':_0x52c8c1,'threadId':_0x5179bf},_0x48e5ab=(await this['_httpService'][_0x3d8bb8(0x22e)](_0x3d8bb8(0x201)+_0x155111+_0x3d8bb8(0x1f3),{'body':_0x28dcc1}))['body'][_0x3d8bb8(0x225)];return{..._0x40ba53,'id':_0x48e5ab[_0x3d8bb8(0x21e)],'dT':(0x0,n[_0x3d8bb8(0x242)])(+_0x48e5ab[_0x3d8bb8(0x211)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x48e5ab[_0x3d8bb8(0x231)]};}else{let _0x46faad={'memberId':_0xd5784,'unitId':_0x155111,'content':_0x53ddbc,'mention':_0x52c8c1};return g((await this[_0x3d8bb8(0x206)][_0x3d8bb8(0x22e)](_0x3d8bb8(0x201)+_0x155111+'/add',{'body':_0x46faad}))['body'][_0x3d8bb8(0x247)],_0x40ba53);}}async['updateComment'](_0x3baa46){const _0x3036cf=_0x1583f8;var _0x11c427,_0x2deb06;let {text:_0x1c77c3,unitId:_0x3d56ff}=_0x3baa46,_0x56606c=(_0x11c427=(_0x2deb06=_0x1c77c3['customRanges'])==null?void 0x0:_0x2deb06[_0x3036cf(0x1fa)](_0x122208=>_0x122208[_0x3036cf(0x227)]===n['CustomRangeType'][_0x3036cf(0x235)])[_0x3036cf(0x200)](_0x668e72=>_0x668e72[_0x3036cf(0x223)]))==null?[]:_0x11c427,_0x53f49d=JSON['stringify'](_0x1c77c3),_0x164538=_0x3baa46[_0x3036cf(0x23e)],_0x44b807=_0x3baa46['id'],_0x5d7a40={'memberId':(await this[_0x3036cf(0x22b)][_0x3036cf(0x1dd)](_0x3d56ff))[_0x3036cf(0x1f0)](),'unitId':_0x3d56ff,'threadId':_0x164538,'mention':_0x56606c,'content':_0x53f49d,'replyId':_0x44b807},_0x1edb2d=await this['_httpService']['post'](_0x3036cf(0x201)+_0x3d56ff+_0x3036cf(0x1f2),{'body':_0x5d7a40});return!_0x1edb2d[_0x3036cf(0x203)][_0x3036cf(0x248)]||_0x1edb2d[_0x3036cf(0x203)][_0x3036cf(0x248)][_0x3036cf(0x236)]===0x1;}async[_0x1583f8(0x1cf)](_0x581406){const _0x40a7c3=_0x1583f8;let {unitId:_0x434f24}=_0x581406,_0x233ff8=_0x581406[_0x40a7c3(0x23e)],_0x15fb47={'memberId':this[_0x40a7c3(0x1db)][_0x40a7c3(0x208)]()[_0x40a7c3(0x220)],'unitId':_0x434f24,'threadId':_0x233ff8,'solved':_0x581406[_0x40a7c3(0x1eb)]?i[_0x40a7c3(0x1d0)][_0x40a7c3(0x22d)]:i[_0x40a7c3(0x1d0)]['OpenOrReOpen']},_0x57542d=await this[_0x40a7c3(0x206)][_0x40a7c3(0x22e)](_0x40a7c3(0x201)+_0x434f24+_0x40a7c3(0x1dc),{'body':_0x15fb47});return!_0x57542d[_0x40a7c3(0x203)][_0x40a7c3(0x248)]||_0x57542d['body'][_0x40a7c3(0x248)][_0x40a7c3(0x236)]===0x1;}async[_0x1583f8(0x1e2)](_0x2b7c60,_0x3ec4cc,_0x23d88e,_0x51de14){const _0x319b1c=_0x1583f8;let _0x19f443={'memberId':(await this['_sessionService'][_0x319b1c(0x1dd)](_0x2b7c60))[_0x319b1c(0x1f0)](),'threadId':_0x23d88e,'replyId':_0x51de14,'unitId':_0x2b7c60},_0x5aaae7=await this[_0x319b1c(0x206)][_0x319b1c(0x22e)](_0x319b1c(0x201)+_0x2b7c60+_0x319b1c(0x249),{'body':_0x19f443});return!_0x5aaae7['body']['error']||_0x5aaae7[_0x319b1c(0x203)][_0x319b1c(0x248)][_0x319b1c(0x236)]===0x1;}async[_0x1583f8(0x1f7)](_0x57869b,_0x1e5500,_0x34f671){const _0x4d77f0=_0x1583f8;let _0x2b8dfa={'unitId':_0x57869b,'threadId':_0x34f671},_0x5ba42e=await this[_0x4d77f0(0x206)][_0x4d77f0(0x22e)](_0x4d77f0(0x201)+_0x57869b+'/list',{'body':_0x2b8dfa}),_0x45d5a8=_0x34f671['map'](_0x1941e9=>_(_0x5ba42e[_0x4d77f0(0x203)][_0x4d77f0(0x229)][_0x1941e9],_0x57869b,_0x1e5500))[_0x4d77f0(0x1fa)](Boolean);return Object[_0x4d77f0(0x228)](_0x5ba42e[_0x4d77f0(0x203)][_0x4d77f0(0x1e7)])[_0x4d77f0(0x216)](_0x48862=>{this['_userService']['addUser'](_0x48862);}),_0x45d5a8;}[_0x1583f8(0x1df)](_0x50e611){const _0x4a2917=_0x1583f8;return{'id':_0x50e611['id'],'threadId':_0x50e611[_0x4a2917(0x23e)],'ref':_0x50e611[_0x4a2917(0x20b)]};}};v=p([f(0x0,(0x0,n[_0x1583f8(0x214)])(s[_0x1583f8(0x1f4)])),f(0x1,(0x0,n['Inject'])(n[_0x1583f8(0x215)])),f(0x2,(0x0,n[_0x1583f8(0x214)])(e[_0x1583f8(0x23c)]))],v);let y=class extends n[_0x1583f8(0x245)]{constructor(_0x1225ed,_0x44d11c){const _0x19716f=_0x1583f8;super(),this['_threadCommentDataSourceService']=_0x1225ed,this[_0x19716f(0x240)]=_0x44d11c,this['_initDataSource']();}['_initDataSource'](){const _0x11ac6f=_0x1583f8;this['_threadCommentDataSourceService'][_0x11ac6f(0x1e5)]=this[_0x11ac6f(0x240)],this['_threadCommentDataSourceService'][_0x11ac6f(0x246)]=!0x1;}};y=p([f(0x0,a[_0x1583f8(0x1f5)]),f(0x1,(0x0,n['Inject'])(v))],y);function b(_0x5c6865){'@babel/helpers - typeof';const _0x1977e0=_0x1583f8;return b=typeof Symbol==_0x1977e0(0x1d1)&&typeof Symbol[_0x1977e0(0x241)]==_0x1977e0(0x219)?function(_0x568d9f){return typeof _0x568d9f;}:function(_0x271670){const _0x4e7618=_0x1977e0;return _0x271670&&typeof Symbol==_0x4e7618(0x1d1)&&_0x271670[_0x4e7618(0x205)]===Symbol&&_0x271670!==Symbol[_0x4e7618(0x1d8)]?_0x4e7618(0x219):typeof _0x271670;},b(_0x5c6865);}function x(_0x1448bd,_0x2d76ce){const _0x264d60=_0x1583f8;if(b(_0x1448bd)!='object'||!_0x1448bd)return _0x1448bd;var _0x47486e=_0x1448bd[Symbol['toPrimitive']];if(_0x47486e!==void 0x0){var _0x343037=_0x47486e[_0x264d60(0x20f)](_0x1448bd,_0x2d76ce||_0x264d60(0x207));if(b(_0x343037)!=_0x264d60(0x1e8))return _0x343037;throw TypeError(_0x264d60(0x23b));}return(_0x2d76ce===_0x264d60(0x222)?String:Number)(_0x1448bd);}function S(_0x4ecd75){const _0x3883df=_0x1583f8;var _0x12f480=x(_0x4ecd75,_0x3883df(0x222));return b(_0x12f480)==_0x3883df(0x219)?_0x12f480:_0x12f480+'';}function C(_0x447e24,_0x369c9c,_0x3b173a){const _0x1fba00=_0x1583f8;return(_0x369c9c=S(_0x369c9c))in _0x447e24?Object[_0x1fba00(0x20d)](_0x447e24,_0x369c9c,{'value':_0x3b173a,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x447e24[_0x369c9c]=_0x3b173a,_0x447e24;}let w=class extends n['Plugin']{constructor(_0x127d41=h,_0x26f9b3,_0x4bfd5c){const _0x368fc1=_0x1583f8;super(),this[_0x368fc1(0x221)]=_0x127d41,this[_0x368fc1(0x224)]=_0x26f9b3,this['_configService']=_0x4bfd5c;let {..._0xa0bcc3}=(0x0,n[_0x368fc1(0x22a)])({},h,this[_0x368fc1(0x221)]);this['_configService']['setConfig'](_0x368fc1(0x22f),_0xa0bcc3);}[_0x1583f8(0x1f6)](){const _0x11a8e6=_0x1583f8;[[v],[y],[m]][_0x11a8e6(0x216)](_0x2fa96a=>{const _0x23d0c0=_0x11a8e6;this[_0x23d0c0(0x224)]['add'](_0x2fa96a);});}['onReady'](){const _0x5cdc72=_0x1583f8;this['_injector'][_0x5cdc72(0x1ff)](y),this[_0x5cdc72(0x224)][_0x5cdc72(0x1ff)](m);}};C(w,'pluginName',_0x1583f8(0x202)),C(w,_0x1583f8(0x209),c),C(w,_0x1583f8(0x218),l),w=p([(0x0,n['DependentOn'])(r['UniverThreadCommentUIPlugin'],e[_0x1583f8(0x243)],t[_0x1583f8(0x23f)]),f(0x1,(0x0,n[_0x1583f8(0x214)])(n['Injector'])),f(0x2,n[_0x1583f8(0x230)])],w),Object[_0x1583f8(0x20d)](exports,'UniverThreadCommentDataSourcePlugin',{'enumerable':!0x0,'get':function(){return w;}});
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x24c5c3=_0x5900;(function(_0x553a0c,_0x4a2a8f){const _0x2a2031=_0x5900,_0x121997=_0x553a0c();while(!![]){try{const _0xe2541b=-parseInt(_0x2a2031(0x10d))/0x1+-parseInt(_0x2a2031(0x100))/0x2+-parseInt(_0x2a2031(0x119))/0x3*(-parseInt(_0x2a2031(0x139))/0x4)+-parseInt(_0x2a2031(0x10b))/0x5*(parseInt(_0x2a2031(0x145))/0x6)+parseInt(_0x2a2031(0xf2))/0x7*(parseInt(_0x2a2031(0x13a))/0x8)+-parseInt(_0x2a2031(0x143))/0x9*(-parseInt(_0x2a2031(0x132))/0xa)+-parseInt(_0x2a2031(0x106))/0xb*(-parseInt(_0x2a2031(0x118))/0xc);if(_0xe2541b===_0x4a2a8f)break;else _0x121997['push'](_0x121997['shift']());}catch(_0x3a7009){_0x121997['push'](_0x121997['shift']());}}}(_0x2d56,0x31105));import{CollaborationSessionService as _0x19b44,CommentService as _0x24e92c,UniverCollaborationClientPlugin as _0x3f9642}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3dce09}from'@univerjs-pro/license';import{CustomRangeType as _0x5a9d83,DependentOn as _0x140f68,Disposable as _0x163bfc,IConfigService as _0x4f4aa1,Inject as _0x2bff0e,Injector as _0xc96534,Plugin as _0x1a5129,UserManagerService as _0x2d0607,dateKit as _0x2ad89d,merge as _0x33d367}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x42b7ee}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x20f75b,CommentUpdateEventType as _0x558fda}from'@univerjs/protocol';import{IThreadCommentDataSourceService as _0xebaadb,ThreadCommentModel as _0x192dc2}from'@univerjs/thread-comment';function _0x5900(_0x5aeda0,_0x30b58a){_0x5aeda0=_0x5aeda0-0xe4;const _0x2d56f7=_0x2d56();let _0x5900d8=_0x2d56f7[_0x5aeda0];return _0x5900d8;}import{bufferTime as _0x2f4805}from'rxjs';import{HTTPService as _0x5a5f64}from'@univerjs/network';var x='@univerjs-pro/thread-comment-datasource',S=_0x24c5c3(0x128);const C=_0x5b4d20=>_0x2ad89d(new Date(+_0x5b4d20))[_0x24c5c3(0x134)](_0x24c5c3(0x14b)),w=async(_0x2ce6f7,_0x10599c)=>{const _0x4c49c1=_0x24c5c3;let _0x3d39f8=_0x2ce6f7[_0x4c49c1(0xf0)](_0x2d0607),_0x968fce=_0x2ce6f7[_0x4c49c1(0xf0)](_0x5a5f64);_0x10599c[_0x4c49c1(0x12d)](_0x10980a=>{const _0x4497fa=_0x4c49c1;_0x3d39f8[_0x4497fa(0x11e)](_0x10980a)&&_0x10599c['delete'](_0x10980a);}),_0x10599c['size']&&(await _0x968fce['get'](_0x4c49c1(0x138),{'params':{'userIDs':[..._0x10599c]}}))[_0x4c49c1(0x147)]['users'][_0x4c49c1(0x12d)](_0x5dc0a5=>{_0x5dc0a5&&_0x3d39f8['addUser'](_0x5dc0a5);});};function T(_0x5e840d,_0x5b0e60){return function(_0x5a3bdb,_0x3c0d20){_0x5b0e60(_0x5a3bdb,_0x3c0d20,_0x5e840d);};}function E(_0x51e779,_0x39a30b,_0xbc01dd,_0x315a5f){const _0x5e4a6a=_0x24c5c3;var _0x32bb00=arguments[_0x5e4a6a(0x13d)],_0x3677d3=_0x32bb00<0x3?_0x39a30b:_0x315a5f===null?_0x315a5f=Object['getOwnPropertyDescriptor'](_0x39a30b,_0xbc01dd):_0x315a5f,_0x178738;if(typeof Reflect=='object'&&typeof Reflect[_0x5e4a6a(0x114)]==_0x5e4a6a(0x130))_0x3677d3=Reflect[_0x5e4a6a(0x114)](_0x51e779,_0x39a30b,_0xbc01dd,_0x315a5f);else{for(var _0x288038=_0x51e779[_0x5e4a6a(0x13d)]-0x1;_0x288038>=0x0;_0x288038--)(_0x178738=_0x51e779[_0x288038])&&(_0x3677d3=(_0x32bb00<0x3?_0x178738(_0x3677d3):_0x32bb00>0x3?_0x178738(_0x39a30b,_0xbc01dd,_0x3677d3):_0x178738(_0x39a30b,_0xbc01dd))||_0x3677d3);}return _0x32bb00>0x3&&_0x3677d3&&Object[_0x5e4a6a(0x123)](_0x39a30b,_0xbc01dd,_0x3677d3),_0x3677d3;}let D=class extends _0x163bfc{constructor(_0x2ecab8,_0x562d35,_0x43a27d,_0x5626c3){const _0x539a12=_0x24c5c3;super(),this[_0x539a12(0x12c)]=_0x2ecab8,this[_0x539a12(0x129)]=_0x562d35,this['_userService']=_0x43a27d,this['_injector']=_0x5626c3,this['_init'](),this['_initUserSync']();}[_0x24c5c3(0x14a)](){const _0xf73f7c=_0x24c5c3;this['disposeWithMe'](this[_0xf73f7c(0x129)][_0xf73f7c(0x13b)][_0xf73f7c(0xe4)](_0x2f4805(0x10))[_0xf73f7c(0x117)](_0x6fe9cc=>{const _0x5e6af9=_0xf73f7c;let _0xfd89ee=new Set();_0x6fe9cc[_0x5e6af9(0x12d)](_0x276dcd=>{const _0xedc54b=_0x5e6af9;switch(_0x276dcd[_0xedc54b(0xf5)]){case _0xedc54b(0x131):{let _0x39913b=_0x276dcd[_0xedc54b(0x112)][_0xedc54b(0x113)];_0xfd89ee[_0xedc54b(0x131)](_0x39913b);break;}default:break;}}),w(this[_0x5e6af9(0x146)],_0xfd89ee);}));}[_0x24c5c3(0xeb)](){const _0x117ea2=_0x24c5c3;this[_0x117ea2(0x110)](this[_0x117ea2(0x12c)][_0x117ea2(0x13b)][_0x117ea2(0x117)](async _0x24df94=>{const _0x25c1cd=_0x117ea2;var _0x52bba0;let _0x1ac1fa=(_0x52bba0=this[_0x25c1cd(0x129)][_0x25c1cd(0xe7)](_0x24df94[_0x25c1cd(0xf6)])[_0x25c1cd(0x11a)](_0x7f9a56=>_0x7f9a56[_0x25c1cd(0x109)]===_0x24df94['threadId']))==null?void 0x0:_0x52bba0[_0x25c1cd(0x121)];if(!_0x1ac1fa)return;let {unitId:_0x1ce9f5,subUnitId:_0x1383d5}=_0x1ac1fa;switch(_0x24df94['user']&&this[_0x25c1cd(0xed)][_0x25c1cd(0xe6)](_0x24df94[_0x25c1cd(0x149)]),_0x24df94[_0x25c1cd(0xf5)]){case _0x558fda['Add']:break;case _0x558fda[_0x25c1cd(0x111)]:var _0xc75f62,_0x56cf40;this[_0x25c1cd(0x129)][_0x25c1cd(0x135)](_0x1ce9f5,_0x1383d5,{'unitId':_0x1ce9f5,'subUnitId':_0x1383d5,'ref':'','id':_0x24df94[_0x25c1cd(0x14d)],'dT':C(+_0x24df94[_0x25c1cd(0x140)]),'threadId':_0x24df94[_0x25c1cd(0x109)],'personId':(_0xc75f62=(_0x56cf40=_0x24df94[_0x25c1cd(0x149)])==null?void 0x0:_0x56cf40[_0x25c1cd(0xe5)])==null?_0x24df94['userId']:_0xc75f62,'text':JSON[_0x25c1cd(0x13f)](_0x24df94[_0x25c1cd(0x10e)]),'parentId':_0x1ac1fa['id']});break;case _0x558fda[_0x25c1cd(0x13c)]:{let _0x5985db=this[_0x25c1cd(0x129)][_0x25c1cd(0xe9)](_0x1ce9f5,_0x1383d5,_0x24df94['replyId']);_0x5985db&&_0x5985db['parentId']&&this[_0x25c1cd(0x129)][_0x25c1cd(0x13e)](_0x1ce9f5,_0x1383d5,_0x24df94[_0x25c1cd(0x14d)]);break;}case _0x558fda['Edit']:this[_0x25c1cd(0x129)]['updateComment'](_0x1ce9f5,_0x1383d5,{'commentId':_0x24df94['replyId'],'text':JSON[_0x25c1cd(0x13f)](_0x24df94[_0x25c1cd(0x10e)])});break;case _0x558fda[_0x25c1cd(0x103)]:{var _0x487ab4;let _0x17542d=(_0x487ab4=this[_0x25c1cd(0x129)][_0x25c1cd(0xe7)](_0x24df94[_0x25c1cd(0xf6)])[_0x25c1cd(0x11a)](_0x5d3f95=>_0x5d3f95['threadId']===_0x24df94[_0x25c1cd(0x109)]))==null?void 0x0:_0x487ab4[_0x25c1cd(0x121)];_0x17542d&&this[_0x25c1cd(0x129)][_0x25c1cd(0xf9)](_0x1ce9f5,_0x1383d5,_0x17542d['id'],_0x24df94[_0x25c1cd(0x108)]===_0x20f75b[_0x25c1cd(0xef)]);break;}default:break;}}));}};D=E([T(0x0,_0x2bff0e(_0x24e92c)),T(0x1,_0x2bff0e(_0x192dc2)),T(0x2,_0x2bff0e(_0x2d0607)),T(0x3,_0x2bff0e(_0xc96534))],D);const O='thread-comment-data-source.config';Symbol(O);const k={};function A(_0x2890d4,_0x13d050){const _0x49cf9c=_0x24c5c3;let _0x2378a8=_0x2890d4[_0x49cf9c(0x137)][0x0];return{..._0x13d050,'id':_0x2378a8[_0x49cf9c(0x14d)],'resolved':_0x2890d4[_0x49cf9c(0x108)]===0x1,'dT':C(_0x2378a8[_0x49cf9c(0x140)]),'personId':_0x2378a8[_0x49cf9c(0x105)],'threadId':_0x2378a8[_0x49cf9c(0x109)]};}function _0x2d56(){const _0x3cae25=['_threadCommentDataSource','root','customRanges','defineProperty','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','/universer-api/comment/unit/','_httpService','toPrimitive','0.24.0','_threadCommentModel','/reply','values','_commentService','forEach','symbol','syncUpdateMutationToColla','function','add','20CcruKl','/edit','format','addComment','_config','replies','/universer-api/user/list','36KYFtQV','2288leTztJ','commentUpdate$','Delete','length','deleteComment','parse','createTimestamp','object','stringify','903366xEVOKz','ref','6OPsOtN','_injector','body','default','user','_initUserSync','YYYY/MM/DD\x20HH:mm','listComments','replyId','pipe','userID','addUser','getUnit','onReady','getComment','_configService','_init','rangeId','_userService','dataSource','Solved','get','filter','9373xdIcmN','saveCommentToSnapshot','map','type','unitId','COMMENT','rangeType','resolveComment','requireSession','constructor','resolved','code','_sessionService','getMemberID','247898xdMqpk','/add','call','Solve','version','userId','15598FgmBrc','error','solved','threadId','packageName','268310CQNkgp','comments','384848vrNYdm','content','post','disposeWithMe','Reply','payload','personId','decorate','_initDataSource','onStarting','subscribe','672LzQQnd','33438iEEbfp','find','OpenOrReOpen','pluginName','_threadCommentDataSourceService','getUser','iterator'];_0x2d56=function(){return _0x3cae25;};return _0x2d56();}function j(_0x5df83d,_0x54d4a3,_0x3929da){const _0x356783=_0x24c5c3;var _0x239006,_0x5d9189;if(((_0x239006=_0x5df83d==null||(_0x5d9189=_0x5df83d[_0x356783(0x137)])==null?void 0x0:_0x5d9189['length'])==null?0x0:_0x239006)>0x0){let _0x2c7c02=(_0x36cc43,_0x10accb)=>({'id':_0x36cc43[_0x356783(0x14d)],'threadId':_0x36cc43['threadId'],'dT':C(_0x36cc43[_0x356783(0x140)]),'personId':_0x36cc43[_0x356783(0x105)],'resolved':_0x5df83d['solved']===_0x20f75b[_0x356783(0xef)],'unitId':_0x54d4a3,'subUnitId':_0x3929da,'text':JSON[_0x356783(0x13f)](_0x36cc43[_0x356783(0x10e)]),'parentId':_0x10accb}),_0xa2a6c=_0x2c7c02(_0x5df83d['replies'][0x0]);return{..._0xa2a6c,'children':_0x5df83d[_0x356783(0x137)]['slice'](0x1)[_0x356783(0xf4)](_0x1f27cf=>_0x2c7c02(_0x1f27cf,_0xa2a6c['id']))};}return null;}let M=class{constructor(_0x96c43a,_0x35052b,_0x5cd31d){const _0x51a981=_0x24c5c3;this[_0x51a981(0x126)]=_0x96c43a,this['_userService']=_0x35052b,this[_0x51a981(0xfe)]=_0x5cd31d;}async[_0x24c5c3(0x135)](_0x36e456){const _0x1c2285=_0x24c5c3;var _0x300f2e,_0x1de19b;let {parentId:_0x19af64,unitId:_0x93938b,text:_0x1ffdeb,threadId:_0x1b65de}=_0x36e456,_0x568464=(_0x300f2e=(_0x1de19b=_0x1ffdeb[_0x1c2285(0x122)])==null?void 0x0:_0x1de19b[_0x1c2285(0xf1)](_0x12a39c=>_0x12a39c[_0x1c2285(0xf8)]===_0x5a9d83[_0x1c2285(0xf7)])[_0x1c2285(0xf4)](_0x1e0578=>_0x1e0578[_0x1c2285(0xec)]))==null?[]:_0x300f2e,_0x4db456=JSON['stringify'](_0x1ffdeb),_0x53fa50=(await this[_0x1c2285(0xfe)][_0x1c2285(0xfa)](_0x93938b))['getMemberID']();if(_0x19af64){let _0x459c1d={'memberId':_0x53fa50,'unitId':_0x93938b,'content':_0x4db456,'mention':_0x568464,'threadId':_0x1b65de},_0x8cc736=(await this[_0x1c2285(0x126)][_0x1c2285(0x10f)](_0x1c2285(0x125)+_0x93938b+_0x1c2285(0x12a),{'body':_0x459c1d}))[_0x1c2285(0x147)]['reply'];return{..._0x36e456,'id':_0x8cc736[_0x1c2285(0x14d)],'dT':_0x2ad89d(+_0x8cc736[_0x1c2285(0x140)])[_0x1c2285(0x134)](_0x1c2285(0x14b)),'personId':_0x8cc736[_0x1c2285(0x105)]};}else{let _0x289eb6={'memberId':_0x53fa50,'unitId':_0x93938b,'content':_0x4db456,'mention':_0x568464};return A((await this[_0x1c2285(0x126)][_0x1c2285(0x10f)](_0x1c2285(0x125)+_0x93938b+_0x1c2285(0x101),{'body':_0x289eb6}))[_0x1c2285(0x147)]['comment'],_0x36e456);}}async['updateComment'](_0x50fe5b){const _0x58ec21=_0x24c5c3;var _0xda8f9f,_0x4a8384;let {text:_0x4416d6,unitId:_0x2c2f4a}=_0x50fe5b,_0x522789=(_0xda8f9f=(_0x4a8384=_0x4416d6[_0x58ec21(0x122)])==null?void 0x0:_0x4a8384[_0x58ec21(0xf1)](_0x3521ac=>_0x3521ac['rangeType']===_0x5a9d83[_0x58ec21(0xf7)])[_0x58ec21(0xf4)](_0x40c32d=>_0x40c32d[_0x58ec21(0xec)]))==null?[]:_0xda8f9f,_0x591c89=JSON[_0x58ec21(0x142)](_0x4416d6),_0x4a08ed=_0x50fe5b[_0x58ec21(0x109)],_0x413c77=_0x50fe5b['id'],_0x3ea597={'memberId':(await this['_sessionService'][_0x58ec21(0xfa)](_0x2c2f4a))[_0x58ec21(0xff)](),'unitId':_0x2c2f4a,'threadId':_0x4a08ed,'mention':_0x522789,'content':_0x591c89,'replyId':_0x413c77},_0x84bf4c=await this[_0x58ec21(0x126)][_0x58ec21(0x10f)]('/universer-api/comment/unit/'+_0x2c2f4a+_0x58ec21(0x133),{'body':_0x3ea597});return!_0x84bf4c[_0x58ec21(0x147)][_0x58ec21(0x107)]||_0x84bf4c[_0x58ec21(0x147)][_0x58ec21(0x107)][_0x58ec21(0xfd)]===0x1;}async[_0x24c5c3(0xf9)](_0x1dc2d8){const _0x497f4a=_0x24c5c3;let {unitId:_0x1a73f9}=_0x1dc2d8,_0x52433b=_0x1dc2d8[_0x497f4a(0x109)],_0x1cc4f4={'memberId':this[_0x497f4a(0xed)]['getCurrentUser']()[_0x497f4a(0xe5)],'unitId':_0x1a73f9,'threadId':_0x52433b,'solved':_0x1dc2d8[_0x497f4a(0xfc)]?_0x20f75b[_0x497f4a(0xef)]:_0x20f75b[_0x497f4a(0x11b)]},_0xf3909a=await this[_0x497f4a(0x126)][_0x497f4a(0x10f)](_0x497f4a(0x125)+_0x1a73f9+'/solved',{'body':_0x1cc4f4});return!_0xf3909a[_0x497f4a(0x147)][_0x497f4a(0x107)]||_0xf3909a[_0x497f4a(0x147)][_0x497f4a(0x107)][_0x497f4a(0xfd)]===0x1;}async[_0x24c5c3(0x13e)](_0x4cb99a,_0x344ff7,_0x530db3,_0x2b1f67){const _0x218fc5=_0x24c5c3;let _0x99762b={'memberId':(await this[_0x218fc5(0xfe)][_0x218fc5(0xfa)](_0x4cb99a))[_0x218fc5(0xff)](),'threadId':_0x530db3,'replyId':_0x2b1f67,'unitId':_0x4cb99a},_0x19d51c=await this['_httpService'][_0x218fc5(0x10f)](_0x218fc5(0x125)+_0x4cb99a+'/delete',{'body':_0x99762b});return!_0x19d51c[_0x218fc5(0x147)][_0x218fc5(0x107)]||_0x19d51c[_0x218fc5(0x147)]['error'][_0x218fc5(0xfd)]===0x1;}async[_0x24c5c3(0x14c)](_0x33ad97,_0x4edc46,_0x5cd8cd){const _0x13c0d5=_0x24c5c3;let _0x1fd9fd={'unitId':_0x33ad97,'threadId':_0x5cd8cd},_0x1f5f1c=await this[_0x13c0d5(0x126)][_0x13c0d5(0x10f)](_0x13c0d5(0x125)+_0x33ad97+'/list',{'body':_0x1fd9fd}),_0x63d95c=_0x5cd8cd[_0x13c0d5(0xf4)](_0x6a589f=>j(_0x1f5f1c[_0x13c0d5(0x147)][_0x13c0d5(0x10c)][_0x6a589f],_0x33ad97,_0x4edc46))['filter'](Boolean);return Object[_0x13c0d5(0x12b)](_0x1f5f1c['body']['users'])['forEach'](_0x325695=>{const _0x148b94=_0x13c0d5;this[_0x148b94(0xed)][_0x148b94(0xe6)](_0x325695);}),_0x63d95c;}[_0x24c5c3(0xf3)](_0xd54aa6){const _0x492f2e=_0x24c5c3;return{'id':_0xd54aa6['id'],'threadId':_0xd54aa6[_0x492f2e(0x109)],'ref':_0xd54aa6[_0x492f2e(0x144)]};}};M=E([T(0x0,_0x2bff0e(_0x5a5f64)),T(0x1,_0x2bff0e(_0x2d0607)),T(0x2,_0x2bff0e(_0x19b44))],M);let N=class extends _0x163bfc{constructor(_0x172dc9,_0x3e7705){const _0x250df3=_0x24c5c3;super(),this['_threadCommentDataSourceService']=_0x172dc9,this[_0x250df3(0x120)]=_0x3e7705,this[_0x250df3(0x115)]();}[_0x24c5c3(0x115)](){const _0x509cbd=_0x24c5c3;this[_0x509cbd(0x11d)][_0x509cbd(0xee)]=this[_0x509cbd(0x120)],this[_0x509cbd(0x11d)][_0x509cbd(0x12f)]=!0x1;}};N=E([T(0x0,_0xebaadb),T(0x1,_0x2bff0e(M))],N);function P(_0x3a08ad){'@babel/helpers - typeof';const _0x210936=_0x24c5c3;return P=typeof Symbol=='function'&&typeof Symbol[_0x210936(0x11f)]==_0x210936(0x12e)?function(_0x3acfd3){return typeof _0x3acfd3;}:function(_0x5417f4){const _0x300b55=_0x210936;return _0x5417f4&&typeof Symbol=='function'&&_0x5417f4[_0x300b55(0xfb)]===Symbol&&_0x5417f4!==Symbol['prototype']?_0x300b55(0x12e):typeof _0x5417f4;},P(_0x3a08ad);}function F(_0x434e2d,_0x38b588){const _0x428543=_0x24c5c3;if(P(_0x434e2d)!='object'||!_0x434e2d)return _0x434e2d;var _0x3b4f82=_0x434e2d[Symbol[_0x428543(0x127)]];if(_0x3b4f82!==void 0x0){var _0x2e5374=_0x3b4f82[_0x428543(0x102)](_0x434e2d,_0x38b588||_0x428543(0x148));if(P(_0x2e5374)!=_0x428543(0x141))return _0x2e5374;throw TypeError(_0x428543(0x124));}return(_0x38b588==='string'?String:Number)(_0x434e2d);}function I(_0x20c87){const _0x1079a1=_0x24c5c3;var _0x28bbcc=F(_0x20c87,'string');return P(_0x28bbcc)==_0x1079a1(0x12e)?_0x28bbcc:_0x28bbcc+'';}function L(_0x1e0fa6,_0x1333a9,_0x3e3558){const _0x397a58=_0x24c5c3;return(_0x1333a9=I(_0x1333a9))in _0x1e0fa6?Object[_0x397a58(0x123)](_0x1e0fa6,_0x1333a9,{'value':_0x3e3558,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1e0fa6[_0x1333a9]=_0x3e3558,_0x1e0fa6;}let R=class extends _0x1a5129{constructor(_0x4eba27=k,_0x50453a,_0x7eb3ac){const _0x5a8a08=_0x24c5c3;super(),this[_0x5a8a08(0x136)]=_0x4eba27,this['_injector']=_0x50453a,this[_0x5a8a08(0xea)]=_0x7eb3ac;let {..._0x4828ff}=_0x33d367({},k,this[_0x5a8a08(0x136)]);this[_0x5a8a08(0xea)]['setConfig'](O,_0x4828ff);}[_0x24c5c3(0x116)](){const _0x2e85fc=_0x24c5c3;[[M],[N],[D]][_0x2e85fc(0x12d)](_0xc70a5b=>{const _0x1287a8=_0x2e85fc;this[_0x1287a8(0x146)]['add'](_0xc70a5b);});}[_0x24c5c3(0xe8)](){const _0x163bed=_0x24c5c3;this[_0x163bed(0x146)]['get'](N),this[_0x163bed(0x146)][_0x163bed(0xf0)](D);}};L(R,_0x24c5c3(0x11c),'UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'),L(R,_0x24c5c3(0x10a),x),L(R,_0x24c5c3(0x104),S),R=E([_0x140f68(_0x42b7ee,_0x3f9642,_0x3dce09),T(0x1,_0x2bff0e(_0xc96534)),T(0x2,_0x4f4aa1)],R);export{R as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x377f0a=_0xb276;(function(_0x2d7d05,_0x1f8066){const _0x1300b2=_0xb276,_0x3c15ae=_0x2d7d05();while(!![]){try{const _0x52c6c4=parseInt(_0x1300b2(0xb3))/0x1*(parseInt(_0x1300b2(0xe5))/0x2)+-parseInt(_0x1300b2(0xc7))/0x3*(-parseInt(_0x1300b2(0xd3))/0x4)+-parseInt(_0x1300b2(0xb4))/0x5+parseInt(_0x1300b2(0xae))/0x6*(parseInt(_0x1300b2(0x97))/0x7)+parseInt(_0x1300b2(0x91))/0x8+parseInt(_0x1300b2(0xce))/0x9*(-parseInt(_0x1300b2(0x98))/0xa)+parseInt(_0x1300b2(0xd2))/0xb;if(_0x52c6c4===_0x1f8066)break;else _0x3c15ae['push'](_0x3c15ae['shift']());}catch(_0x2508a2){_0x3c15ae['push'](_0x3c15ae['shift']());}}}(_0x2a6f,0x94c0a));import{CollaborationSessionService as _0x1d897d,CommentService as _0x1ce647,UniverCollaborationClientPlugin as _0x217c67}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x57a573}from'@univerjs-pro/license';function _0xb276(_0x43e293,_0x47b882){_0x43e293=_0x43e293-0x8f;const _0x2a6f58=_0x2a6f();let _0xb27664=_0x2a6f58[_0x43e293];return _0xb27664;}import{CustomRangeType as _0x2f674f,DependentOn as _0xecc282,Disposable as _0x380642,IConfigService as _0x1a5d1a,Inject as _0x136b55,Injector as _0x2b5710,Plugin as _0xf2c82e,UserManagerService as _0x5bd2c8,dateKit as _0x21465b,merge as _0x54e067}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x400f9f}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x4089fb,CommentUpdateEventType as _0x2612c1}from'@univerjs/protocol';import{IThreadCommentDataSourceService as _0x473ae1,ThreadCommentModel as _0x532749}from'@univerjs/thread-comment';import{bufferTime as _0x302516}from'rxjs';import{HTTPService as _0x279b8c}from'@univerjs/network';var x=_0x377f0a(0x9b),S=_0x377f0a(0xdf);const C=_0x36f500=>_0x21465b(new Date(+_0x36f500))[_0x377f0a(0xf7)](_0x377f0a(0x94)),w=async(_0x3e73ab,_0x42dc2c)=>{const _0x8242da=_0x377f0a;let _0x433a28=_0x3e73ab[_0x8242da(0xa0)](_0x5bd2c8),_0x2cf99f=_0x3e73ab[_0x8242da(0xa0)](_0x279b8c);_0x42dc2c[_0x8242da(0xaf)](_0x563a63=>{const _0x27c0cc=_0x8242da;_0x433a28[_0x27c0cc(0xc8)](_0x563a63)&&_0x42dc2c[_0x27c0cc(0xdd)](_0x563a63);}),_0x42dc2c['size']&&(await _0x2cf99f[_0x8242da(0xa0)](_0x8242da(0xc5),{'params':{'userIDs':[..._0x42dc2c]}}))[_0x8242da(0xa2)][_0x8242da(0xe0)][_0x8242da(0xaf)](_0x3dc41b=>{const _0x22a0ea=_0x8242da;_0x3dc41b&&_0x433a28[_0x22a0ea(0xe6)](_0x3dc41b);});};function T(_0x15b2bc,_0x1824e0){return function(_0x28d83e,_0x54f890){_0x1824e0(_0x28d83e,_0x54f890,_0x15b2bc);};}function E(_0x302655,_0x20a1a9,_0x5450fd,_0x247151){const _0x1c952e=_0x377f0a;var _0x34a8ae=arguments[_0x1c952e(0xcb)],_0x5eb171=_0x34a8ae<0x3?_0x20a1a9:_0x247151===null?_0x247151=Object[_0x1c952e(0xd4)](_0x20a1a9,_0x5450fd):_0x247151,_0x2be8a3;if(typeof Reflect==_0x1c952e(0xcf)&&typeof Reflect['decorate']==_0x1c952e(0xd8))_0x5eb171=Reflect['decorate'](_0x302655,_0x20a1a9,_0x5450fd,_0x247151);else{for(var _0x4cf1ea=_0x302655[_0x1c952e(0xcb)]-0x1;_0x4cf1ea>=0x0;_0x4cf1ea--)(_0x2be8a3=_0x302655[_0x4cf1ea])&&(_0x5eb171=(_0x34a8ae<0x3?_0x2be8a3(_0x5eb171):_0x34a8ae>0x3?_0x2be8a3(_0x20a1a9,_0x5450fd,_0x5eb171):_0x2be8a3(_0x20a1a9,_0x5450fd))||_0x5eb171);}return _0x34a8ae>0x3&&_0x5eb171&&Object[_0x1c952e(0xbb)](_0x20a1a9,_0x5450fd,_0x5eb171),_0x5eb171;}let D=class extends _0x380642{constructor(_0x286871,_0x57e082,_0x5aae31,_0x13929d){const _0x5a21ca=_0x377f0a;super(),this[_0x5a21ca(0xa6)]=_0x286871,this[_0x5a21ca(0xc1)]=_0x57e082,this[_0x5a21ca(0xe2)]=_0x5aae31,this['_injector']=_0x13929d,this[_0x5a21ca(0x93)](),this[_0x5a21ca(0xc6)]();}[_0x377f0a(0xc6)](){const _0x3b9400=_0x377f0a;this['disposeWithMe'](this['_threadCommentModel'][_0x3b9400(0xa4)][_0x3b9400(0xe4)](_0x302516(0x10))[_0x3b9400(0xa5)](_0x28c664=>{const _0x3580fb=_0x3b9400;let _0x545550=new Set();_0x28c664['forEach'](_0x42583d=>{const _0xed1e3c=_0xb276;switch(_0x42583d[_0xed1e3c(0xb1)]){case'add':{let _0x559606=_0x42583d[_0xed1e3c(0xca)][_0xed1e3c(0xd0)];_0x545550[_0xed1e3c(0xe7)](_0x559606);break;}default:break;}}),w(this[_0x3580fb(0xb2)],_0x545550);}));}['_init'](){const _0x447718=_0x377f0a;this[_0x447718(0x8f)](this[_0x447718(0xa6)]['commentUpdate$'][_0x447718(0xa5)](async _0x92557d=>{const _0x2bef51=_0x447718;var _0x5b7112;let _0x6ab3f0=(_0x5b7112=this[_0x2bef51(0xc1)][_0x2bef51(0x99)](_0x92557d[_0x2bef51(0xa3)])[_0x2bef51(0xb0)](_0x45dc28=>_0x45dc28['threadId']===_0x92557d[_0x2bef51(0xf9)]))==null?void 0x0:_0x5b7112[_0x2bef51(0xcc)];if(!_0x6ab3f0)return;let {unitId:_0x3d2464,subUnitId:_0x29c8f0}=_0x6ab3f0;switch(_0x92557d[_0x2bef51(0xb6)]&&this[_0x2bef51(0xe2)][_0x2bef51(0xe6)](_0x92557d[_0x2bef51(0xb6)]),_0x92557d[_0x2bef51(0xb1)]){case _0x2612c1[_0x2bef51(0xc3)]:break;case _0x2612c1[_0x2bef51(0xf3)]:var _0x5c38e3,_0x39af71;this[_0x2bef51(0xc1)][_0x2bef51(0xbf)](_0x3d2464,_0x29c8f0,{'unitId':_0x3d2464,'subUnitId':_0x29c8f0,'ref':'','id':_0x92557d['replyId'],'dT':C(+_0x92557d['createTimestamp']),'threadId':_0x92557d[_0x2bef51(0xf9)],'personId':(_0x5c38e3=(_0x39af71=_0x92557d[_0x2bef51(0xb6)])==null?void 0x0:_0x39af71[_0x2bef51(0xd5)])==null?_0x92557d[_0x2bef51(0xef)]:_0x5c38e3,'text':JSON['parse'](_0x92557d[_0x2bef51(0xda)]),'parentId':_0x6ab3f0['id']});break;case _0x2612c1['Delete']:{let _0x4fe4a8=this[_0x2bef51(0xc1)][_0x2bef51(0xd1)](_0x3d2464,_0x29c8f0,_0x92557d['replyId']);_0x4fe4a8&&_0x4fe4a8[_0x2bef51(0xd9)]&&this[_0x2bef51(0xc1)][_0x2bef51(0xb9)](_0x3d2464,_0x29c8f0,_0x92557d['replyId']);break;}case _0x2612c1[_0x2bef51(0xfa)]:this[_0x2bef51(0xc1)][_0x2bef51(0xfb)](_0x3d2464,_0x29c8f0,{'commentId':_0x92557d['replyId'],'text':JSON[_0x2bef51(0xf8)](_0x92557d[_0x2bef51(0xda)])});break;case _0x2612c1[_0x2bef51(0xd6)]:{var _0x98aa92;let _0x480251=(_0x98aa92=this[_0x2bef51(0xc1)][_0x2bef51(0x99)](_0x92557d[_0x2bef51(0xa3)])['find'](_0x3e3103=>_0x3e3103[_0x2bef51(0xf9)]===_0x92557d[_0x2bef51(0xf9)]))==null?void 0x0:_0x98aa92[_0x2bef51(0xcc)];_0x480251&&this['_threadCommentModel']['resolveComment'](_0x3d2464,_0x29c8f0,_0x480251['id'],_0x92557d[_0x2bef51(0xee)]===_0x4089fb[_0x2bef51(0xed)]);break;}default:break;}}));}};function _0x2a6f(){const _0x51ee9b=['body','unitId','commentUpdate$','subscribe','_commentService','OpenOrReOpen','version','filter','/solved','rangeType','customRanges','pluginName','67278JbrlwJ','forEach','find','type','_injector','1tknGGX','1216230ovjbrB','error','user','_threadCommentDataSource','prototype','deleteComment','reply','defineProperty','thread-comment-data-source.config','_threadCommentDataSourceService','comments','addComment','symbol','_threadCommentModel','replyId','Add','constructor','/universer-api/user/list','_initUserSync','1983Iuuzhc','getUser','syncUpdateMutationToColla','payload','length','root','_configService','81tjIvPE','object','personId','getComment','3520407XwuruG','332KzesrI','getOwnPropertyDescriptor','userID','Solve','getMemberID','function','parentId','content','string','comment','delete','stringify','0.25.0-insiders.20260608-e4336f7','users','/delete','_userService','post','pipe','762578oBUnHh','addUser','add','_initDataSource','replies','map','_sessionService','onStarting','Solved','solved','userId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_config','slice','Reply','setConfig','default','requireSession','format','parse','threadId','Edit','updateComment','iterator','disposeWithMe','code','405800qDdoOK','/list','_init','YYYY/MM/DD\x20HH:mm','onReady','/universer-api/comment/unit/','497IFODiN','833890XGqvzb','getUnit','dataSource','@univerjs-pro/thread-comment-datasource','rangeId','COMMENT','_httpService','/add','get','createTimestamp'];_0x2a6f=function(){return _0x51ee9b;};return _0x2a6f();}D=E([T(0x0,_0x136b55(_0x1ce647)),T(0x1,_0x136b55(_0x532749)),T(0x2,_0x136b55(_0x5bd2c8)),T(0x3,_0x136b55(_0x2b5710))],D);const O={};function k(_0x17d069,_0x39b09c){const _0x1e3f50=_0x377f0a;let _0x136fa8=_0x17d069[_0x1e3f50(0xe9)][0x0];return{..._0x39b09c,'id':_0x136fa8[_0x1e3f50(0xc2)],'resolved':_0x17d069[_0x1e3f50(0xee)]===0x1,'dT':C(_0x136fa8[_0x1e3f50(0xa1)]),'personId':_0x136fa8[_0x1e3f50(0xef)],'threadId':_0x136fa8[_0x1e3f50(0xf9)]};}function A(_0x2297f6,_0x445fe6,_0x536040){const _0x5b4195=_0x377f0a;var _0xa4785,_0x2eb04d;if(((_0xa4785=_0x2297f6==null||(_0x2eb04d=_0x2297f6[_0x5b4195(0xe9)])==null?void 0x0:_0x2eb04d[_0x5b4195(0xcb)])==null?0x0:_0xa4785)>0x0){let _0x190bc5=(_0x40e5aa,_0x4778b9)=>({'id':_0x40e5aa['replyId'],'threadId':_0x40e5aa[_0x5b4195(0xf9)],'dT':C(_0x40e5aa['createTimestamp']),'personId':_0x40e5aa[_0x5b4195(0xef)],'resolved':_0x2297f6[_0x5b4195(0xee)]===_0x4089fb[_0x5b4195(0xed)],'unitId':_0x445fe6,'subUnitId':_0x536040,'text':JSON[_0x5b4195(0xf8)](_0x40e5aa['content']),'parentId':_0x4778b9}),_0x3acaaf=_0x190bc5(_0x2297f6[_0x5b4195(0xe9)][0x0]);return{..._0x3acaaf,'children':_0x2297f6['replies'][_0x5b4195(0xf2)](0x1)[_0x5b4195(0xea)](_0x3e9457=>_0x190bc5(_0x3e9457,_0x3acaaf['id']))};}return null;}let j=class{constructor(_0x375990,_0xe6cec,_0x3f1dc9){const _0x4aebe4=_0x377f0a;this[_0x4aebe4(0x9e)]=_0x375990,this[_0x4aebe4(0xe2)]=_0xe6cec,this['_sessionService']=_0x3f1dc9;}async[_0x377f0a(0xbf)](_0x483b01){const _0x403317=_0x377f0a;var _0x3dd94,_0x56206f;let {parentId:_0xb8802d,unitId:_0x580669,text:_0x37af5c,threadId:_0x6b5209}=_0x483b01,_0xe40b52=(_0x3dd94=(_0x56206f=_0x37af5c[_0x403317(0xac)])==null?void 0x0:_0x56206f[_0x403317(0xa9)](_0x2aa153=>_0x2aa153['rangeType']===_0x2f674f['COMMENT'])['map'](_0x5c2c10=>_0x5c2c10['rangeId']))==null?[]:_0x3dd94,_0x1c182c=JSON[_0x403317(0xde)](_0x37af5c),_0x4949e1=(await this['_sessionService'][_0x403317(0xf6)](_0x580669))[_0x403317(0xd7)]();if(_0xb8802d){let _0x4bab19={'memberId':_0x4949e1,'unitId':_0x580669,'content':_0x1c182c,'mention':_0xe40b52,'threadId':_0x6b5209},_0x5504ae=(await this['_httpService'][_0x403317(0xe3)](_0x403317(0x96)+_0x580669+'/reply',{'body':_0x4bab19}))[_0x403317(0xa2)][_0x403317(0xba)];return{..._0x483b01,'id':_0x5504ae[_0x403317(0xc2)],'dT':_0x21465b(+_0x5504ae[_0x403317(0xa1)])[_0x403317(0xf7)](_0x403317(0x94)),'personId':_0x5504ae[_0x403317(0xef)]};}else{let _0x40552a={'memberId':_0x4949e1,'unitId':_0x580669,'content':_0x1c182c,'mention':_0xe40b52};return k((await this['_httpService'][_0x403317(0xe3)](_0x403317(0x96)+_0x580669+_0x403317(0x9f),{'body':_0x40552a}))[_0x403317(0xa2)][_0x403317(0xdc)],_0x483b01);}}async[_0x377f0a(0xfb)](_0x904098){const _0x5f069b=_0x377f0a;var _0x6025cb,_0x2053c6;let {text:_0x569eea,unitId:_0x13db87}=_0x904098,_0x266628=(_0x6025cb=(_0x2053c6=_0x569eea['customRanges'])==null?void 0x0:_0x2053c6['filter'](_0x394daa=>_0x394daa[_0x5f069b(0xab)]===_0x2f674f[_0x5f069b(0x9d)])[_0x5f069b(0xea)](_0x45f24d=>_0x45f24d[_0x5f069b(0x9c)]))==null?[]:_0x6025cb,_0xe3ed43=JSON[_0x5f069b(0xde)](_0x569eea),_0x230498=_0x904098[_0x5f069b(0xf9)],_0x2182dd=_0x904098['id'],_0x254104={'memberId':(await this['_sessionService'][_0x5f069b(0xf6)](_0x13db87))[_0x5f069b(0xd7)](),'unitId':_0x13db87,'threadId':_0x230498,'mention':_0x266628,'content':_0xe3ed43,'replyId':_0x2182dd},_0x196f06=await this[_0x5f069b(0x9e)][_0x5f069b(0xe3)]('/universer-api/comment/unit/'+_0x13db87+'/edit',{'body':_0x254104});return!_0x196f06[_0x5f069b(0xa2)][_0x5f069b(0xb5)]||_0x196f06[_0x5f069b(0xa2)][_0x5f069b(0xb5)][_0x5f069b(0x90)]===0x1;}async['resolveComment'](_0x13c795){const _0xae3f72=_0x377f0a;let {unitId:_0x3f00fe}=_0x13c795,_0x15eb35=_0x13c795['threadId'],_0x19086a={'memberId':this[_0xae3f72(0xe2)]['getCurrentUser']()['userID'],'unitId':_0x3f00fe,'threadId':_0x15eb35,'solved':_0x13c795['resolved']?_0x4089fb[_0xae3f72(0xed)]:_0x4089fb[_0xae3f72(0xa7)]},_0x3956f6=await this[_0xae3f72(0x9e)][_0xae3f72(0xe3)](_0xae3f72(0x96)+_0x3f00fe+_0xae3f72(0xaa),{'body':_0x19086a});return!_0x3956f6[_0xae3f72(0xa2)]['error']||_0x3956f6[_0xae3f72(0xa2)]['error'][_0xae3f72(0x90)]===0x1;}async[_0x377f0a(0xb9)](_0x49a661,_0x421813,_0x57fb30,_0xe029e7){const _0x25b2d0=_0x377f0a;let _0x3f5367={'memberId':(await this[_0x25b2d0(0xeb)]['requireSession'](_0x49a661))[_0x25b2d0(0xd7)](),'threadId':_0x57fb30,'replyId':_0xe029e7,'unitId':_0x49a661},_0x8b1b60=await this[_0x25b2d0(0x9e)][_0x25b2d0(0xe3)]('/universer-api/comment/unit/'+_0x49a661+_0x25b2d0(0xe1),{'body':_0x3f5367});return!_0x8b1b60['body']['error']||_0x8b1b60['body'][_0x25b2d0(0xb5)]['code']===0x1;}async['listComments'](_0x61b7db,_0x358a91,_0x3ad97f){const _0x15a528=_0x377f0a;let _0x3f267d={'unitId':_0x61b7db,'threadId':_0x3ad97f},_0x2ce876=await this[_0x15a528(0x9e)][_0x15a528(0xe3)](_0x15a528(0x96)+_0x61b7db+_0x15a528(0x92),{'body':_0x3f267d}),_0xdfa767=_0x3ad97f[_0x15a528(0xea)](_0x5744aa=>A(_0x2ce876['body'][_0x15a528(0xbe)][_0x5744aa],_0x61b7db,_0x358a91))[_0x15a528(0xa9)](Boolean);return Object['values'](_0x2ce876[_0x15a528(0xa2)]['users'])[_0x15a528(0xaf)](_0x76bb76=>{const _0x127887=_0x15a528;this[_0x127887(0xe2)][_0x127887(0xe6)](_0x76bb76);}),_0xdfa767;}['saveCommentToSnapshot'](_0x4daf75){const _0x5d42f8=_0x377f0a;return{'id':_0x4daf75['id'],'threadId':_0x4daf75[_0x5d42f8(0xf9)],'ref':_0x4daf75['ref']};}};j=E([T(0x0,_0x136b55(_0x279b8c)),T(0x1,_0x136b55(_0x5bd2c8)),T(0x2,_0x136b55(_0x1d897d))],j);let M=class extends _0x380642{constructor(_0x369a0f,_0x3ecce2){const _0x31b5bc=_0x377f0a;super(),this[_0x31b5bc(0xbd)]=_0x369a0f,this[_0x31b5bc(0xb7)]=_0x3ecce2,this['_initDataSource']();}[_0x377f0a(0xe8)](){const _0x4162bd=_0x377f0a;this[_0x4162bd(0xbd)][_0x4162bd(0x9a)]=this[_0x4162bd(0xb7)],this['_threadCommentDataSourceService'][_0x4162bd(0xc9)]=!0x1;}};M=E([T(0x0,_0x473ae1),T(0x1,_0x136b55(j))],M);function N(_0x1d69de){'@babel/helpers - typeof';const _0x40cb78=_0x377f0a;return N=typeof Symbol==_0x40cb78(0xd8)&&typeof Symbol[_0x40cb78(0xfc)]==_0x40cb78(0xc0)?function(_0x2ede8b){return typeof _0x2ede8b;}:function(_0x12c8a2){const _0x409272=_0x40cb78;return _0x12c8a2&&typeof Symbol==_0x409272(0xd8)&&_0x12c8a2[_0x409272(0xc4)]===Symbol&&_0x12c8a2!==Symbol[_0x409272(0xb8)]?'symbol':typeof _0x12c8a2;},N(_0x1d69de);}function P(_0x7e00b9,_0x47d5aa){const _0x435149=_0x377f0a;if(N(_0x7e00b9)!='object'||!_0x7e00b9)return _0x7e00b9;var _0x5e0067=_0x7e00b9[Symbol['toPrimitive']];if(_0x5e0067!==void 0x0){var _0x4fddea=_0x5e0067['call'](_0x7e00b9,_0x47d5aa||_0x435149(0xf5));if(N(_0x4fddea)!=_0x435149(0xcf))return _0x4fddea;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x47d5aa===_0x435149(0xdb)?String:Number)(_0x7e00b9);}function F(_0x439c5d){const _0x52c658=_0x377f0a;var _0x317712=P(_0x439c5d,'string');return N(_0x317712)==_0x52c658(0xc0)?_0x317712:_0x317712+'';}function I(_0x463d1e,_0x1bfb62,_0x40dbd3){const _0x5cd298=_0x377f0a;return(_0x1bfb62=F(_0x1bfb62))in _0x463d1e?Object[_0x5cd298(0xbb)](_0x463d1e,_0x1bfb62,{'value':_0x40dbd3,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x463d1e[_0x1bfb62]=_0x40dbd3,_0x463d1e;}let L=class extends _0xf2c82e{constructor(_0x486821=O,_0x3fbfdb,_0x541f17){const _0x570583=_0x377f0a;super(),this[_0x570583(0xf1)]=_0x486821,this[_0x570583(0xb2)]=_0x3fbfdb,this[_0x570583(0xcd)]=_0x541f17;let {..._0x1077be}=_0x54e067({},O,this[_0x570583(0xf1)]);this[_0x570583(0xcd)][_0x570583(0xf4)](_0x570583(0xbc),_0x1077be);}[_0x377f0a(0xec)](){const _0x1ee6ef=_0x377f0a;[[j],[M],[D]][_0x1ee6ef(0xaf)](_0x298743=>{const _0x483925=_0x1ee6ef;this[_0x483925(0xb2)][_0x483925(0xe7)](_0x298743);});}[_0x377f0a(0x95)](){const _0x134d08=_0x377f0a;this[_0x134d08(0xb2)][_0x134d08(0xa0)](M),this[_0x134d08(0xb2)][_0x134d08(0xa0)](D);}};I(L,_0x377f0a(0xad),_0x377f0a(0xf0)),I(L,'packageName',x),I(L,_0x377f0a(0xa8),S),L=E([_0xecc282(_0x400f9f,_0x217c67,_0x57a573),T(0x1,_0x136b55(_0x2b5710)),T(0x2,_0x1a5d1a)],L);export{L as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x24c5c3=_0x5900;(function(_0x553a0c,_0x4a2a8f){const _0x2a2031=_0x5900,_0x121997=_0x553a0c();while(!![]){try{const _0xe2541b=-parseInt(_0x2a2031(0x10d))/0x1+-parseInt(_0x2a2031(0x100))/0x2+-parseInt(_0x2a2031(0x119))/0x3*(-parseInt(_0x2a2031(0x139))/0x4)+-parseInt(_0x2a2031(0x10b))/0x5*(parseInt(_0x2a2031(0x145))/0x6)+parseInt(_0x2a2031(0xf2))/0x7*(parseInt(_0x2a2031(0x13a))/0x8)+-parseInt(_0x2a2031(0x143))/0x9*(-parseInt(_0x2a2031(0x132))/0xa)+-parseInt(_0x2a2031(0x106))/0xb*(-parseInt(_0x2a2031(0x118))/0xc);if(_0xe2541b===_0x4a2a8f)break;else _0x121997['push'](_0x121997['shift']());}catch(_0x3a7009){_0x121997['push'](_0x121997['shift']());}}}(_0x2d56,0x31105));import{CollaborationSessionService as _0x19b44,CommentService as _0x24e92c,UniverCollaborationClientPlugin as _0x3f9642}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3dce09}from'@univerjs-pro/license';import{CustomRangeType as _0x5a9d83,DependentOn as _0x140f68,Disposable as _0x163bfc,IConfigService as _0x4f4aa1,Inject as _0x2bff0e,Injector as _0xc96534,Plugin as _0x1a5129,UserManagerService as _0x2d0607,dateKit as _0x2ad89d,merge as _0x33d367}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x42b7ee}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x20f75b,CommentUpdateEventType as _0x558fda}from'@univerjs/protocol';import{IThreadCommentDataSourceService as _0xebaadb,ThreadCommentModel as _0x192dc2}from'@univerjs/thread-comment';function _0x5900(_0x5aeda0,_0x30b58a){_0x5aeda0=_0x5aeda0-0xe4;const _0x2d56f7=_0x2d56();let _0x5900d8=_0x2d56f7[_0x5aeda0];return _0x5900d8;}import{bufferTime as _0x2f4805}from'rxjs';import{HTTPService as _0x5a5f64}from'@univerjs/network';var x='@univerjs-pro/thread-comment-datasource',S=_0x24c5c3(0x128);const C=_0x5b4d20=>_0x2ad89d(new Date(+_0x5b4d20))[_0x24c5c3(0x134)](_0x24c5c3(0x14b)),w=async(_0x2ce6f7,_0x10599c)=>{const _0x4c49c1=_0x24c5c3;let _0x3d39f8=_0x2ce6f7[_0x4c49c1(0xf0)](_0x2d0607),_0x968fce=_0x2ce6f7[_0x4c49c1(0xf0)](_0x5a5f64);_0x10599c[_0x4c49c1(0x12d)](_0x10980a=>{const _0x4497fa=_0x4c49c1;_0x3d39f8[_0x4497fa(0x11e)](_0x10980a)&&_0x10599c['delete'](_0x10980a);}),_0x10599c['size']&&(await _0x968fce['get'](_0x4c49c1(0x138),{'params':{'userIDs':[..._0x10599c]}}))[_0x4c49c1(0x147)]['users'][_0x4c49c1(0x12d)](_0x5dc0a5=>{_0x5dc0a5&&_0x3d39f8['addUser'](_0x5dc0a5);});};function T(_0x5e840d,_0x5b0e60){return function(_0x5a3bdb,_0x3c0d20){_0x5b0e60(_0x5a3bdb,_0x3c0d20,_0x5e840d);};}function E(_0x51e779,_0x39a30b,_0xbc01dd,_0x315a5f){const _0x5e4a6a=_0x24c5c3;var _0x32bb00=arguments[_0x5e4a6a(0x13d)],_0x3677d3=_0x32bb00<0x3?_0x39a30b:_0x315a5f===null?_0x315a5f=Object['getOwnPropertyDescriptor'](_0x39a30b,_0xbc01dd):_0x315a5f,_0x178738;if(typeof Reflect=='object'&&typeof Reflect[_0x5e4a6a(0x114)]==_0x5e4a6a(0x130))_0x3677d3=Reflect[_0x5e4a6a(0x114)](_0x51e779,_0x39a30b,_0xbc01dd,_0x315a5f);else{for(var _0x288038=_0x51e779[_0x5e4a6a(0x13d)]-0x1;_0x288038>=0x0;_0x288038--)(_0x178738=_0x51e779[_0x288038])&&(_0x3677d3=(_0x32bb00<0x3?_0x178738(_0x3677d3):_0x32bb00>0x3?_0x178738(_0x39a30b,_0xbc01dd,_0x3677d3):_0x178738(_0x39a30b,_0xbc01dd))||_0x3677d3);}return _0x32bb00>0x3&&_0x3677d3&&Object[_0x5e4a6a(0x123)](_0x39a30b,_0xbc01dd,_0x3677d3),_0x3677d3;}let D=class extends _0x163bfc{constructor(_0x2ecab8,_0x562d35,_0x43a27d,_0x5626c3){const _0x539a12=_0x24c5c3;super(),this[_0x539a12(0x12c)]=_0x2ecab8,this[_0x539a12(0x129)]=_0x562d35,this['_userService']=_0x43a27d,this['_injector']=_0x5626c3,this['_init'](),this['_initUserSync']();}[_0x24c5c3(0x14a)](){const _0xf73f7c=_0x24c5c3;this['disposeWithMe'](this[_0xf73f7c(0x129)][_0xf73f7c(0x13b)][_0xf73f7c(0xe4)](_0x2f4805(0x10))[_0xf73f7c(0x117)](_0x6fe9cc=>{const _0x5e6af9=_0xf73f7c;let _0xfd89ee=new Set();_0x6fe9cc[_0x5e6af9(0x12d)](_0x276dcd=>{const _0xedc54b=_0x5e6af9;switch(_0x276dcd[_0xedc54b(0xf5)]){case _0xedc54b(0x131):{let _0x39913b=_0x276dcd[_0xedc54b(0x112)][_0xedc54b(0x113)];_0xfd89ee[_0xedc54b(0x131)](_0x39913b);break;}default:break;}}),w(this[_0x5e6af9(0x146)],_0xfd89ee);}));}[_0x24c5c3(0xeb)](){const _0x117ea2=_0x24c5c3;this[_0x117ea2(0x110)](this[_0x117ea2(0x12c)][_0x117ea2(0x13b)][_0x117ea2(0x117)](async _0x24df94=>{const _0x25c1cd=_0x117ea2;var _0x52bba0;let _0x1ac1fa=(_0x52bba0=this[_0x25c1cd(0x129)][_0x25c1cd(0xe7)](_0x24df94[_0x25c1cd(0xf6)])[_0x25c1cd(0x11a)](_0x7f9a56=>_0x7f9a56[_0x25c1cd(0x109)]===_0x24df94['threadId']))==null?void 0x0:_0x52bba0[_0x25c1cd(0x121)];if(!_0x1ac1fa)return;let {unitId:_0x1ce9f5,subUnitId:_0x1383d5}=_0x1ac1fa;switch(_0x24df94['user']&&this[_0x25c1cd(0xed)][_0x25c1cd(0xe6)](_0x24df94[_0x25c1cd(0x149)]),_0x24df94[_0x25c1cd(0xf5)]){case _0x558fda['Add']:break;case _0x558fda[_0x25c1cd(0x111)]:var _0xc75f62,_0x56cf40;this[_0x25c1cd(0x129)][_0x25c1cd(0x135)](_0x1ce9f5,_0x1383d5,{'unitId':_0x1ce9f5,'subUnitId':_0x1383d5,'ref':'','id':_0x24df94[_0x25c1cd(0x14d)],'dT':C(+_0x24df94[_0x25c1cd(0x140)]),'threadId':_0x24df94[_0x25c1cd(0x109)],'personId':(_0xc75f62=(_0x56cf40=_0x24df94[_0x25c1cd(0x149)])==null?void 0x0:_0x56cf40[_0x25c1cd(0xe5)])==null?_0x24df94['userId']:_0xc75f62,'text':JSON[_0x25c1cd(0x13f)](_0x24df94[_0x25c1cd(0x10e)]),'parentId':_0x1ac1fa['id']});break;case _0x558fda[_0x25c1cd(0x13c)]:{let _0x5985db=this[_0x25c1cd(0x129)][_0x25c1cd(0xe9)](_0x1ce9f5,_0x1383d5,_0x24df94['replyId']);_0x5985db&&_0x5985db['parentId']&&this[_0x25c1cd(0x129)][_0x25c1cd(0x13e)](_0x1ce9f5,_0x1383d5,_0x24df94[_0x25c1cd(0x14d)]);break;}case _0x558fda['Edit']:this[_0x25c1cd(0x129)]['updateComment'](_0x1ce9f5,_0x1383d5,{'commentId':_0x24df94['replyId'],'text':JSON[_0x25c1cd(0x13f)](_0x24df94[_0x25c1cd(0x10e)])});break;case _0x558fda[_0x25c1cd(0x103)]:{var _0x487ab4;let _0x17542d=(_0x487ab4=this[_0x25c1cd(0x129)][_0x25c1cd(0xe7)](_0x24df94[_0x25c1cd(0xf6)])[_0x25c1cd(0x11a)](_0x5d3f95=>_0x5d3f95['threadId']===_0x24df94[_0x25c1cd(0x109)]))==null?void 0x0:_0x487ab4[_0x25c1cd(0x121)];_0x17542d&&this[_0x25c1cd(0x129)][_0x25c1cd(0xf9)](_0x1ce9f5,_0x1383d5,_0x17542d['id'],_0x24df94[_0x25c1cd(0x108)]===_0x20f75b[_0x25c1cd(0xef)]);break;}default:break;}}));}};D=E([T(0x0,_0x2bff0e(_0x24e92c)),T(0x1,_0x2bff0e(_0x192dc2)),T(0x2,_0x2bff0e(_0x2d0607)),T(0x3,_0x2bff0e(_0xc96534))],D);const O='thread-comment-data-source.config';Symbol(O);const k={};function A(_0x2890d4,_0x13d050){const _0x49cf9c=_0x24c5c3;let _0x2378a8=_0x2890d4[_0x49cf9c(0x137)][0x0];return{..._0x13d050,'id':_0x2378a8[_0x49cf9c(0x14d)],'resolved':_0x2890d4[_0x49cf9c(0x108)]===0x1,'dT':C(_0x2378a8[_0x49cf9c(0x140)]),'personId':_0x2378a8[_0x49cf9c(0x105)],'threadId':_0x2378a8[_0x49cf9c(0x109)]};}function _0x2d56(){const _0x3cae25=['_threadCommentDataSource','root','customRanges','defineProperty','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','/universer-api/comment/unit/','_httpService','toPrimitive','0.24.0','_threadCommentModel','/reply','values','_commentService','forEach','symbol','syncUpdateMutationToColla','function','add','20CcruKl','/edit','format','addComment','_config','replies','/universer-api/user/list','36KYFtQV','2288leTztJ','commentUpdate$','Delete','length','deleteComment','parse','createTimestamp','object','stringify','903366xEVOKz','ref','6OPsOtN','_injector','body','default','user','_initUserSync','YYYY/MM/DD\x20HH:mm','listComments','replyId','pipe','userID','addUser','getUnit','onReady','getComment','_configService','_init','rangeId','_userService','dataSource','Solved','get','filter','9373xdIcmN','saveCommentToSnapshot','map','type','unitId','COMMENT','rangeType','resolveComment','requireSession','constructor','resolved','code','_sessionService','getMemberID','247898xdMqpk','/add','call','Solve','version','userId','15598FgmBrc','error','solved','threadId','packageName','268310CQNkgp','comments','384848vrNYdm','content','post','disposeWithMe','Reply','payload','personId','decorate','_initDataSource','onStarting','subscribe','672LzQQnd','33438iEEbfp','find','OpenOrReOpen','pluginName','_threadCommentDataSourceService','getUser','iterator'];_0x2d56=function(){return _0x3cae25;};return _0x2d56();}function j(_0x5df83d,_0x54d4a3,_0x3929da){const _0x356783=_0x24c5c3;var _0x239006,_0x5d9189;if(((_0x239006=_0x5df83d==null||(_0x5d9189=_0x5df83d[_0x356783(0x137)])==null?void 0x0:_0x5d9189['length'])==null?0x0:_0x239006)>0x0){let _0x2c7c02=(_0x36cc43,_0x10accb)=>({'id':_0x36cc43[_0x356783(0x14d)],'threadId':_0x36cc43['threadId'],'dT':C(_0x36cc43[_0x356783(0x140)]),'personId':_0x36cc43[_0x356783(0x105)],'resolved':_0x5df83d['solved']===_0x20f75b[_0x356783(0xef)],'unitId':_0x54d4a3,'subUnitId':_0x3929da,'text':JSON[_0x356783(0x13f)](_0x36cc43[_0x356783(0x10e)]),'parentId':_0x10accb}),_0xa2a6c=_0x2c7c02(_0x5df83d['replies'][0x0]);return{..._0xa2a6c,'children':_0x5df83d[_0x356783(0x137)]['slice'](0x1)[_0x356783(0xf4)](_0x1f27cf=>_0x2c7c02(_0x1f27cf,_0xa2a6c['id']))};}return null;}let M=class{constructor(_0x96c43a,_0x35052b,_0x5cd31d){const _0x51a981=_0x24c5c3;this[_0x51a981(0x126)]=_0x96c43a,this['_userService']=_0x35052b,this[_0x51a981(0xfe)]=_0x5cd31d;}async[_0x24c5c3(0x135)](_0x36e456){const _0x1c2285=_0x24c5c3;var _0x300f2e,_0x1de19b;let {parentId:_0x19af64,unitId:_0x93938b,text:_0x1ffdeb,threadId:_0x1b65de}=_0x36e456,_0x568464=(_0x300f2e=(_0x1de19b=_0x1ffdeb[_0x1c2285(0x122)])==null?void 0x0:_0x1de19b[_0x1c2285(0xf1)](_0x12a39c=>_0x12a39c[_0x1c2285(0xf8)]===_0x5a9d83[_0x1c2285(0xf7)])[_0x1c2285(0xf4)](_0x1e0578=>_0x1e0578[_0x1c2285(0xec)]))==null?[]:_0x300f2e,_0x4db456=JSON['stringify'](_0x1ffdeb),_0x53fa50=(await this[_0x1c2285(0xfe)][_0x1c2285(0xfa)](_0x93938b))['getMemberID']();if(_0x19af64){let _0x459c1d={'memberId':_0x53fa50,'unitId':_0x93938b,'content':_0x4db456,'mention':_0x568464,'threadId':_0x1b65de},_0x8cc736=(await this[_0x1c2285(0x126)][_0x1c2285(0x10f)](_0x1c2285(0x125)+_0x93938b+_0x1c2285(0x12a),{'body':_0x459c1d}))[_0x1c2285(0x147)]['reply'];return{..._0x36e456,'id':_0x8cc736[_0x1c2285(0x14d)],'dT':_0x2ad89d(+_0x8cc736[_0x1c2285(0x140)])[_0x1c2285(0x134)](_0x1c2285(0x14b)),'personId':_0x8cc736[_0x1c2285(0x105)]};}else{let _0x289eb6={'memberId':_0x53fa50,'unitId':_0x93938b,'content':_0x4db456,'mention':_0x568464};return A((await this[_0x1c2285(0x126)][_0x1c2285(0x10f)](_0x1c2285(0x125)+_0x93938b+_0x1c2285(0x101),{'body':_0x289eb6}))[_0x1c2285(0x147)]['comment'],_0x36e456);}}async['updateComment'](_0x50fe5b){const _0x58ec21=_0x24c5c3;var _0xda8f9f,_0x4a8384;let {text:_0x4416d6,unitId:_0x2c2f4a}=_0x50fe5b,_0x522789=(_0xda8f9f=(_0x4a8384=_0x4416d6[_0x58ec21(0x122)])==null?void 0x0:_0x4a8384[_0x58ec21(0xf1)](_0x3521ac=>_0x3521ac['rangeType']===_0x5a9d83[_0x58ec21(0xf7)])[_0x58ec21(0xf4)](_0x40c32d=>_0x40c32d[_0x58ec21(0xec)]))==null?[]:_0xda8f9f,_0x591c89=JSON[_0x58ec21(0x142)](_0x4416d6),_0x4a08ed=_0x50fe5b[_0x58ec21(0x109)],_0x413c77=_0x50fe5b['id'],_0x3ea597={'memberId':(await this['_sessionService'][_0x58ec21(0xfa)](_0x2c2f4a))[_0x58ec21(0xff)](),'unitId':_0x2c2f4a,'threadId':_0x4a08ed,'mention':_0x522789,'content':_0x591c89,'replyId':_0x413c77},_0x84bf4c=await this[_0x58ec21(0x126)][_0x58ec21(0x10f)]('/universer-api/comment/unit/'+_0x2c2f4a+_0x58ec21(0x133),{'body':_0x3ea597});return!_0x84bf4c[_0x58ec21(0x147)][_0x58ec21(0x107)]||_0x84bf4c[_0x58ec21(0x147)][_0x58ec21(0x107)][_0x58ec21(0xfd)]===0x1;}async[_0x24c5c3(0xf9)](_0x1dc2d8){const _0x497f4a=_0x24c5c3;let {unitId:_0x1a73f9}=_0x1dc2d8,_0x52433b=_0x1dc2d8[_0x497f4a(0x109)],_0x1cc4f4={'memberId':this[_0x497f4a(0xed)]['getCurrentUser']()[_0x497f4a(0xe5)],'unitId':_0x1a73f9,'threadId':_0x52433b,'solved':_0x1dc2d8[_0x497f4a(0xfc)]?_0x20f75b[_0x497f4a(0xef)]:_0x20f75b[_0x497f4a(0x11b)]},_0xf3909a=await this[_0x497f4a(0x126)][_0x497f4a(0x10f)](_0x497f4a(0x125)+_0x1a73f9+'/solved',{'body':_0x1cc4f4});return!_0xf3909a[_0x497f4a(0x147)][_0x497f4a(0x107)]||_0xf3909a[_0x497f4a(0x147)][_0x497f4a(0x107)][_0x497f4a(0xfd)]===0x1;}async[_0x24c5c3(0x13e)](_0x4cb99a,_0x344ff7,_0x530db3,_0x2b1f67){const _0x218fc5=_0x24c5c3;let _0x99762b={'memberId':(await this[_0x218fc5(0xfe)][_0x218fc5(0xfa)](_0x4cb99a))[_0x218fc5(0xff)](),'threadId':_0x530db3,'replyId':_0x2b1f67,'unitId':_0x4cb99a},_0x19d51c=await this['_httpService'][_0x218fc5(0x10f)](_0x218fc5(0x125)+_0x4cb99a+'/delete',{'body':_0x99762b});return!_0x19d51c[_0x218fc5(0x147)][_0x218fc5(0x107)]||_0x19d51c[_0x218fc5(0x147)]['error'][_0x218fc5(0xfd)]===0x1;}async[_0x24c5c3(0x14c)](_0x33ad97,_0x4edc46,_0x5cd8cd){const _0x13c0d5=_0x24c5c3;let _0x1fd9fd={'unitId':_0x33ad97,'threadId':_0x5cd8cd},_0x1f5f1c=await this[_0x13c0d5(0x126)][_0x13c0d5(0x10f)](_0x13c0d5(0x125)+_0x33ad97+'/list',{'body':_0x1fd9fd}),_0x63d95c=_0x5cd8cd[_0x13c0d5(0xf4)](_0x6a589f=>j(_0x1f5f1c[_0x13c0d5(0x147)][_0x13c0d5(0x10c)][_0x6a589f],_0x33ad97,_0x4edc46))['filter'](Boolean);return Object[_0x13c0d5(0x12b)](_0x1f5f1c['body']['users'])['forEach'](_0x325695=>{const _0x148b94=_0x13c0d5;this[_0x148b94(0xed)][_0x148b94(0xe6)](_0x325695);}),_0x63d95c;}[_0x24c5c3(0xf3)](_0xd54aa6){const _0x492f2e=_0x24c5c3;return{'id':_0xd54aa6['id'],'threadId':_0xd54aa6[_0x492f2e(0x109)],'ref':_0xd54aa6[_0x492f2e(0x144)]};}};M=E([T(0x0,_0x2bff0e(_0x5a5f64)),T(0x1,_0x2bff0e(_0x2d0607)),T(0x2,_0x2bff0e(_0x19b44))],M);let N=class extends _0x163bfc{constructor(_0x172dc9,_0x3e7705){const _0x250df3=_0x24c5c3;super(),this['_threadCommentDataSourceService']=_0x172dc9,this[_0x250df3(0x120)]=_0x3e7705,this[_0x250df3(0x115)]();}[_0x24c5c3(0x115)](){const _0x509cbd=_0x24c5c3;this[_0x509cbd(0x11d)][_0x509cbd(0xee)]=this[_0x509cbd(0x120)],this[_0x509cbd(0x11d)][_0x509cbd(0x12f)]=!0x1;}};N=E([T(0x0,_0xebaadb),T(0x1,_0x2bff0e(M))],N);function P(_0x3a08ad){'@babel/helpers - typeof';const _0x210936=_0x24c5c3;return P=typeof Symbol=='function'&&typeof Symbol[_0x210936(0x11f)]==_0x210936(0x12e)?function(_0x3acfd3){return typeof _0x3acfd3;}:function(_0x5417f4){const _0x300b55=_0x210936;return _0x5417f4&&typeof Symbol=='function'&&_0x5417f4[_0x300b55(0xfb)]===Symbol&&_0x5417f4!==Symbol['prototype']?_0x300b55(0x12e):typeof _0x5417f4;},P(_0x3a08ad);}function F(_0x434e2d,_0x38b588){const _0x428543=_0x24c5c3;if(P(_0x434e2d)!='object'||!_0x434e2d)return _0x434e2d;var _0x3b4f82=_0x434e2d[Symbol[_0x428543(0x127)]];if(_0x3b4f82!==void 0x0){var _0x2e5374=_0x3b4f82[_0x428543(0x102)](_0x434e2d,_0x38b588||_0x428543(0x148));if(P(_0x2e5374)!=_0x428543(0x141))return _0x2e5374;throw TypeError(_0x428543(0x124));}return(_0x38b588==='string'?String:Number)(_0x434e2d);}function I(_0x20c87){const _0x1079a1=_0x24c5c3;var _0x28bbcc=F(_0x20c87,'string');return P(_0x28bbcc)==_0x1079a1(0x12e)?_0x28bbcc:_0x28bbcc+'';}function L(_0x1e0fa6,_0x1333a9,_0x3e3558){const _0x397a58=_0x24c5c3;return(_0x1333a9=I(_0x1333a9))in _0x1e0fa6?Object[_0x397a58(0x123)](_0x1e0fa6,_0x1333a9,{'value':_0x3e3558,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1e0fa6[_0x1333a9]=_0x3e3558,_0x1e0fa6;}let R=class extends _0x1a5129{constructor(_0x4eba27=k,_0x50453a,_0x7eb3ac){const _0x5a8a08=_0x24c5c3;super(),this[_0x5a8a08(0x136)]=_0x4eba27,this['_injector']=_0x50453a,this[_0x5a8a08(0xea)]=_0x7eb3ac;let {..._0x4828ff}=_0x33d367({},k,this[_0x5a8a08(0x136)]);this[_0x5a8a08(0xea)]['setConfig'](O,_0x4828ff);}[_0x24c5c3(0x116)](){const _0x2e85fc=_0x24c5c3;[[M],[N],[D]][_0x2e85fc(0x12d)](_0xc70a5b=>{const _0x1287a8=_0x2e85fc;this[_0x1287a8(0x146)]['add'](_0xc70a5b);});}[_0x24c5c3(0xe8)](){const _0x163bed=_0x24c5c3;this[_0x163bed(0x146)]['get'](N),this[_0x163bed(0x146)][_0x163bed(0xf0)](D);}};L(R,_0x24c5c3(0x11c),'UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'),L(R,_0x24c5c3(0x10a),x),L(R,_0x24c5c3(0x104),S),R=E([_0x140f68(_0x42b7ee,_0x3f9642,_0x3dce09),T(0x1,_0x2bff0e(_0xc96534)),T(0x2,_0x4f4aa1)],R);export{R as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x377f0a=_0xb276;(function(_0x2d7d05,_0x1f8066){const _0x1300b2=_0xb276,_0x3c15ae=_0x2d7d05();while(!![]){try{const _0x52c6c4=parseInt(_0x1300b2(0xb3))/0x1*(parseInt(_0x1300b2(0xe5))/0x2)+-parseInt(_0x1300b2(0xc7))/0x3*(-parseInt(_0x1300b2(0xd3))/0x4)+-parseInt(_0x1300b2(0xb4))/0x5+parseInt(_0x1300b2(0xae))/0x6*(parseInt(_0x1300b2(0x97))/0x7)+parseInt(_0x1300b2(0x91))/0x8+parseInt(_0x1300b2(0xce))/0x9*(-parseInt(_0x1300b2(0x98))/0xa)+parseInt(_0x1300b2(0xd2))/0xb;if(_0x52c6c4===_0x1f8066)break;else _0x3c15ae['push'](_0x3c15ae['shift']());}catch(_0x2508a2){_0x3c15ae['push'](_0x3c15ae['shift']());}}}(_0x2a6f,0x94c0a));import{CollaborationSessionService as _0x1d897d,CommentService as _0x1ce647,UniverCollaborationClientPlugin as _0x217c67}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x57a573}from'@univerjs-pro/license';function _0xb276(_0x43e293,_0x47b882){_0x43e293=_0x43e293-0x8f;const _0x2a6f58=_0x2a6f();let _0xb27664=_0x2a6f58[_0x43e293];return _0xb27664;}import{CustomRangeType as _0x2f674f,DependentOn as _0xecc282,Disposable as _0x380642,IConfigService as _0x1a5d1a,Inject as _0x136b55,Injector as _0x2b5710,Plugin as _0xf2c82e,UserManagerService as _0x5bd2c8,dateKit as _0x21465b,merge as _0x54e067}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x400f9f}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x4089fb,CommentUpdateEventType as _0x2612c1}from'@univerjs/protocol';import{IThreadCommentDataSourceService as _0x473ae1,ThreadCommentModel as _0x532749}from'@univerjs/thread-comment';import{bufferTime as _0x302516}from'rxjs';import{HTTPService as _0x279b8c}from'@univerjs/network';var x=_0x377f0a(0x9b),S=_0x377f0a(0xdf);const C=_0x36f500=>_0x21465b(new Date(+_0x36f500))[_0x377f0a(0xf7)](_0x377f0a(0x94)),w=async(_0x3e73ab,_0x42dc2c)=>{const _0x8242da=_0x377f0a;let _0x433a28=_0x3e73ab[_0x8242da(0xa0)](_0x5bd2c8),_0x2cf99f=_0x3e73ab[_0x8242da(0xa0)](_0x279b8c);_0x42dc2c[_0x8242da(0xaf)](_0x563a63=>{const _0x27c0cc=_0x8242da;_0x433a28[_0x27c0cc(0xc8)](_0x563a63)&&_0x42dc2c[_0x27c0cc(0xdd)](_0x563a63);}),_0x42dc2c['size']&&(await _0x2cf99f[_0x8242da(0xa0)](_0x8242da(0xc5),{'params':{'userIDs':[..._0x42dc2c]}}))[_0x8242da(0xa2)][_0x8242da(0xe0)][_0x8242da(0xaf)](_0x3dc41b=>{const _0x22a0ea=_0x8242da;_0x3dc41b&&_0x433a28[_0x22a0ea(0xe6)](_0x3dc41b);});};function T(_0x15b2bc,_0x1824e0){return function(_0x28d83e,_0x54f890){_0x1824e0(_0x28d83e,_0x54f890,_0x15b2bc);};}function E(_0x302655,_0x20a1a9,_0x5450fd,_0x247151){const _0x1c952e=_0x377f0a;var _0x34a8ae=arguments[_0x1c952e(0xcb)],_0x5eb171=_0x34a8ae<0x3?_0x20a1a9:_0x247151===null?_0x247151=Object[_0x1c952e(0xd4)](_0x20a1a9,_0x5450fd):_0x247151,_0x2be8a3;if(typeof Reflect==_0x1c952e(0xcf)&&typeof Reflect['decorate']==_0x1c952e(0xd8))_0x5eb171=Reflect['decorate'](_0x302655,_0x20a1a9,_0x5450fd,_0x247151);else{for(var _0x4cf1ea=_0x302655[_0x1c952e(0xcb)]-0x1;_0x4cf1ea>=0x0;_0x4cf1ea--)(_0x2be8a3=_0x302655[_0x4cf1ea])&&(_0x5eb171=(_0x34a8ae<0x3?_0x2be8a3(_0x5eb171):_0x34a8ae>0x3?_0x2be8a3(_0x20a1a9,_0x5450fd,_0x5eb171):_0x2be8a3(_0x20a1a9,_0x5450fd))||_0x5eb171);}return _0x34a8ae>0x3&&_0x5eb171&&Object[_0x1c952e(0xbb)](_0x20a1a9,_0x5450fd,_0x5eb171),_0x5eb171;}let D=class extends _0x380642{constructor(_0x286871,_0x57e082,_0x5aae31,_0x13929d){const _0x5a21ca=_0x377f0a;super(),this[_0x5a21ca(0xa6)]=_0x286871,this[_0x5a21ca(0xc1)]=_0x57e082,this[_0x5a21ca(0xe2)]=_0x5aae31,this['_injector']=_0x13929d,this[_0x5a21ca(0x93)](),this[_0x5a21ca(0xc6)]();}[_0x377f0a(0xc6)](){const _0x3b9400=_0x377f0a;this['disposeWithMe'](this['_threadCommentModel'][_0x3b9400(0xa4)][_0x3b9400(0xe4)](_0x302516(0x10))[_0x3b9400(0xa5)](_0x28c664=>{const _0x3580fb=_0x3b9400;let _0x545550=new Set();_0x28c664['forEach'](_0x42583d=>{const _0xed1e3c=_0xb276;switch(_0x42583d[_0xed1e3c(0xb1)]){case'add':{let _0x559606=_0x42583d[_0xed1e3c(0xca)][_0xed1e3c(0xd0)];_0x545550[_0xed1e3c(0xe7)](_0x559606);break;}default:break;}}),w(this[_0x3580fb(0xb2)],_0x545550);}));}['_init'](){const _0x447718=_0x377f0a;this[_0x447718(0x8f)](this[_0x447718(0xa6)]['commentUpdate$'][_0x447718(0xa5)](async _0x92557d=>{const _0x2bef51=_0x447718;var _0x5b7112;let _0x6ab3f0=(_0x5b7112=this[_0x2bef51(0xc1)][_0x2bef51(0x99)](_0x92557d[_0x2bef51(0xa3)])[_0x2bef51(0xb0)](_0x45dc28=>_0x45dc28['threadId']===_0x92557d[_0x2bef51(0xf9)]))==null?void 0x0:_0x5b7112[_0x2bef51(0xcc)];if(!_0x6ab3f0)return;let {unitId:_0x3d2464,subUnitId:_0x29c8f0}=_0x6ab3f0;switch(_0x92557d[_0x2bef51(0xb6)]&&this[_0x2bef51(0xe2)][_0x2bef51(0xe6)](_0x92557d[_0x2bef51(0xb6)]),_0x92557d[_0x2bef51(0xb1)]){case _0x2612c1[_0x2bef51(0xc3)]:break;case _0x2612c1[_0x2bef51(0xf3)]:var _0x5c38e3,_0x39af71;this[_0x2bef51(0xc1)][_0x2bef51(0xbf)](_0x3d2464,_0x29c8f0,{'unitId':_0x3d2464,'subUnitId':_0x29c8f0,'ref':'','id':_0x92557d['replyId'],'dT':C(+_0x92557d['createTimestamp']),'threadId':_0x92557d[_0x2bef51(0xf9)],'personId':(_0x5c38e3=(_0x39af71=_0x92557d[_0x2bef51(0xb6)])==null?void 0x0:_0x39af71[_0x2bef51(0xd5)])==null?_0x92557d[_0x2bef51(0xef)]:_0x5c38e3,'text':JSON['parse'](_0x92557d[_0x2bef51(0xda)]),'parentId':_0x6ab3f0['id']});break;case _0x2612c1['Delete']:{let _0x4fe4a8=this[_0x2bef51(0xc1)][_0x2bef51(0xd1)](_0x3d2464,_0x29c8f0,_0x92557d['replyId']);_0x4fe4a8&&_0x4fe4a8[_0x2bef51(0xd9)]&&this[_0x2bef51(0xc1)][_0x2bef51(0xb9)](_0x3d2464,_0x29c8f0,_0x92557d['replyId']);break;}case _0x2612c1[_0x2bef51(0xfa)]:this[_0x2bef51(0xc1)][_0x2bef51(0xfb)](_0x3d2464,_0x29c8f0,{'commentId':_0x92557d['replyId'],'text':JSON[_0x2bef51(0xf8)](_0x92557d[_0x2bef51(0xda)])});break;case _0x2612c1[_0x2bef51(0xd6)]:{var _0x98aa92;let _0x480251=(_0x98aa92=this[_0x2bef51(0xc1)][_0x2bef51(0x99)](_0x92557d[_0x2bef51(0xa3)])['find'](_0x3e3103=>_0x3e3103[_0x2bef51(0xf9)]===_0x92557d[_0x2bef51(0xf9)]))==null?void 0x0:_0x98aa92[_0x2bef51(0xcc)];_0x480251&&this['_threadCommentModel']['resolveComment'](_0x3d2464,_0x29c8f0,_0x480251['id'],_0x92557d[_0x2bef51(0xee)]===_0x4089fb[_0x2bef51(0xed)]);break;}default:break;}}));}};function _0x2a6f(){const _0x51ee9b=['body','unitId','commentUpdate$','subscribe','_commentService','OpenOrReOpen','version','filter','/solved','rangeType','customRanges','pluginName','67278JbrlwJ','forEach','find','type','_injector','1tknGGX','1216230ovjbrB','error','user','_threadCommentDataSource','prototype','deleteComment','reply','defineProperty','thread-comment-data-source.config','_threadCommentDataSourceService','comments','addComment','symbol','_threadCommentModel','replyId','Add','constructor','/universer-api/user/list','_initUserSync','1983Iuuzhc','getUser','syncUpdateMutationToColla','payload','length','root','_configService','81tjIvPE','object','personId','getComment','3520407XwuruG','332KzesrI','getOwnPropertyDescriptor','userID','Solve','getMemberID','function','parentId','content','string','comment','delete','stringify','0.25.0-insiders.20260608-e4336f7','users','/delete','_userService','post','pipe','762578oBUnHh','addUser','add','_initDataSource','replies','map','_sessionService','onStarting','Solved','solved','userId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_config','slice','Reply','setConfig','default','requireSession','format','parse','threadId','Edit','updateComment','iterator','disposeWithMe','code','405800qDdoOK','/list','_init','YYYY/MM/DD\x20HH:mm','onReady','/universer-api/comment/unit/','497IFODiN','833890XGqvzb','getUnit','dataSource','@univerjs-pro/thread-comment-datasource','rangeId','COMMENT','_httpService','/add','get','createTimestamp'];_0x2a6f=function(){return _0x51ee9b;};return _0x2a6f();}D=E([T(0x0,_0x136b55(_0x1ce647)),T(0x1,_0x136b55(_0x532749)),T(0x2,_0x136b55(_0x5bd2c8)),T(0x3,_0x136b55(_0x2b5710))],D);const O={};function k(_0x17d069,_0x39b09c){const _0x1e3f50=_0x377f0a;let _0x136fa8=_0x17d069[_0x1e3f50(0xe9)][0x0];return{..._0x39b09c,'id':_0x136fa8[_0x1e3f50(0xc2)],'resolved':_0x17d069[_0x1e3f50(0xee)]===0x1,'dT':C(_0x136fa8[_0x1e3f50(0xa1)]),'personId':_0x136fa8[_0x1e3f50(0xef)],'threadId':_0x136fa8[_0x1e3f50(0xf9)]};}function A(_0x2297f6,_0x445fe6,_0x536040){const _0x5b4195=_0x377f0a;var _0xa4785,_0x2eb04d;if(((_0xa4785=_0x2297f6==null||(_0x2eb04d=_0x2297f6[_0x5b4195(0xe9)])==null?void 0x0:_0x2eb04d[_0x5b4195(0xcb)])==null?0x0:_0xa4785)>0x0){let _0x190bc5=(_0x40e5aa,_0x4778b9)=>({'id':_0x40e5aa['replyId'],'threadId':_0x40e5aa[_0x5b4195(0xf9)],'dT':C(_0x40e5aa['createTimestamp']),'personId':_0x40e5aa[_0x5b4195(0xef)],'resolved':_0x2297f6[_0x5b4195(0xee)]===_0x4089fb[_0x5b4195(0xed)],'unitId':_0x445fe6,'subUnitId':_0x536040,'text':JSON[_0x5b4195(0xf8)](_0x40e5aa['content']),'parentId':_0x4778b9}),_0x3acaaf=_0x190bc5(_0x2297f6[_0x5b4195(0xe9)][0x0]);return{..._0x3acaaf,'children':_0x2297f6['replies'][_0x5b4195(0xf2)](0x1)[_0x5b4195(0xea)](_0x3e9457=>_0x190bc5(_0x3e9457,_0x3acaaf['id']))};}return null;}let j=class{constructor(_0x375990,_0xe6cec,_0x3f1dc9){const _0x4aebe4=_0x377f0a;this[_0x4aebe4(0x9e)]=_0x375990,this[_0x4aebe4(0xe2)]=_0xe6cec,this['_sessionService']=_0x3f1dc9;}async[_0x377f0a(0xbf)](_0x483b01){const _0x403317=_0x377f0a;var _0x3dd94,_0x56206f;let {parentId:_0xb8802d,unitId:_0x580669,text:_0x37af5c,threadId:_0x6b5209}=_0x483b01,_0xe40b52=(_0x3dd94=(_0x56206f=_0x37af5c[_0x403317(0xac)])==null?void 0x0:_0x56206f[_0x403317(0xa9)](_0x2aa153=>_0x2aa153['rangeType']===_0x2f674f['COMMENT'])['map'](_0x5c2c10=>_0x5c2c10['rangeId']))==null?[]:_0x3dd94,_0x1c182c=JSON[_0x403317(0xde)](_0x37af5c),_0x4949e1=(await this['_sessionService'][_0x403317(0xf6)](_0x580669))[_0x403317(0xd7)]();if(_0xb8802d){let _0x4bab19={'memberId':_0x4949e1,'unitId':_0x580669,'content':_0x1c182c,'mention':_0xe40b52,'threadId':_0x6b5209},_0x5504ae=(await this['_httpService'][_0x403317(0xe3)](_0x403317(0x96)+_0x580669+'/reply',{'body':_0x4bab19}))[_0x403317(0xa2)][_0x403317(0xba)];return{..._0x483b01,'id':_0x5504ae[_0x403317(0xc2)],'dT':_0x21465b(+_0x5504ae[_0x403317(0xa1)])[_0x403317(0xf7)](_0x403317(0x94)),'personId':_0x5504ae[_0x403317(0xef)]};}else{let _0x40552a={'memberId':_0x4949e1,'unitId':_0x580669,'content':_0x1c182c,'mention':_0xe40b52};return k((await this['_httpService'][_0x403317(0xe3)](_0x403317(0x96)+_0x580669+_0x403317(0x9f),{'body':_0x40552a}))[_0x403317(0xa2)][_0x403317(0xdc)],_0x483b01);}}async[_0x377f0a(0xfb)](_0x904098){const _0x5f069b=_0x377f0a;var _0x6025cb,_0x2053c6;let {text:_0x569eea,unitId:_0x13db87}=_0x904098,_0x266628=(_0x6025cb=(_0x2053c6=_0x569eea['customRanges'])==null?void 0x0:_0x2053c6['filter'](_0x394daa=>_0x394daa[_0x5f069b(0xab)]===_0x2f674f[_0x5f069b(0x9d)])[_0x5f069b(0xea)](_0x45f24d=>_0x45f24d[_0x5f069b(0x9c)]))==null?[]:_0x6025cb,_0xe3ed43=JSON[_0x5f069b(0xde)](_0x569eea),_0x230498=_0x904098[_0x5f069b(0xf9)],_0x2182dd=_0x904098['id'],_0x254104={'memberId':(await this['_sessionService'][_0x5f069b(0xf6)](_0x13db87))[_0x5f069b(0xd7)](),'unitId':_0x13db87,'threadId':_0x230498,'mention':_0x266628,'content':_0xe3ed43,'replyId':_0x2182dd},_0x196f06=await this[_0x5f069b(0x9e)][_0x5f069b(0xe3)]('/universer-api/comment/unit/'+_0x13db87+'/edit',{'body':_0x254104});return!_0x196f06[_0x5f069b(0xa2)][_0x5f069b(0xb5)]||_0x196f06[_0x5f069b(0xa2)][_0x5f069b(0xb5)][_0x5f069b(0x90)]===0x1;}async['resolveComment'](_0x13c795){const _0xae3f72=_0x377f0a;let {unitId:_0x3f00fe}=_0x13c795,_0x15eb35=_0x13c795['threadId'],_0x19086a={'memberId':this[_0xae3f72(0xe2)]['getCurrentUser']()['userID'],'unitId':_0x3f00fe,'threadId':_0x15eb35,'solved':_0x13c795['resolved']?_0x4089fb[_0xae3f72(0xed)]:_0x4089fb[_0xae3f72(0xa7)]},_0x3956f6=await this[_0xae3f72(0x9e)][_0xae3f72(0xe3)](_0xae3f72(0x96)+_0x3f00fe+_0xae3f72(0xaa),{'body':_0x19086a});return!_0x3956f6[_0xae3f72(0xa2)]['error']||_0x3956f6[_0xae3f72(0xa2)]['error'][_0xae3f72(0x90)]===0x1;}async[_0x377f0a(0xb9)](_0x49a661,_0x421813,_0x57fb30,_0xe029e7){const _0x25b2d0=_0x377f0a;let _0x3f5367={'memberId':(await this[_0x25b2d0(0xeb)]['requireSession'](_0x49a661))[_0x25b2d0(0xd7)](),'threadId':_0x57fb30,'replyId':_0xe029e7,'unitId':_0x49a661},_0x8b1b60=await this[_0x25b2d0(0x9e)][_0x25b2d0(0xe3)]('/universer-api/comment/unit/'+_0x49a661+_0x25b2d0(0xe1),{'body':_0x3f5367});return!_0x8b1b60['body']['error']||_0x8b1b60['body'][_0x25b2d0(0xb5)]['code']===0x1;}async['listComments'](_0x61b7db,_0x358a91,_0x3ad97f){const _0x15a528=_0x377f0a;let _0x3f267d={'unitId':_0x61b7db,'threadId':_0x3ad97f},_0x2ce876=await this[_0x15a528(0x9e)][_0x15a528(0xe3)](_0x15a528(0x96)+_0x61b7db+_0x15a528(0x92),{'body':_0x3f267d}),_0xdfa767=_0x3ad97f[_0x15a528(0xea)](_0x5744aa=>A(_0x2ce876['body'][_0x15a528(0xbe)][_0x5744aa],_0x61b7db,_0x358a91))[_0x15a528(0xa9)](Boolean);return Object['values'](_0x2ce876[_0x15a528(0xa2)]['users'])[_0x15a528(0xaf)](_0x76bb76=>{const _0x127887=_0x15a528;this[_0x127887(0xe2)][_0x127887(0xe6)](_0x76bb76);}),_0xdfa767;}['saveCommentToSnapshot'](_0x4daf75){const _0x5d42f8=_0x377f0a;return{'id':_0x4daf75['id'],'threadId':_0x4daf75[_0x5d42f8(0xf9)],'ref':_0x4daf75['ref']};}};j=E([T(0x0,_0x136b55(_0x279b8c)),T(0x1,_0x136b55(_0x5bd2c8)),T(0x2,_0x136b55(_0x1d897d))],j);let M=class extends _0x380642{constructor(_0x369a0f,_0x3ecce2){const _0x31b5bc=_0x377f0a;super(),this[_0x31b5bc(0xbd)]=_0x369a0f,this[_0x31b5bc(0xb7)]=_0x3ecce2,this['_initDataSource']();}[_0x377f0a(0xe8)](){const _0x4162bd=_0x377f0a;this[_0x4162bd(0xbd)][_0x4162bd(0x9a)]=this[_0x4162bd(0xb7)],this['_threadCommentDataSourceService'][_0x4162bd(0xc9)]=!0x1;}};M=E([T(0x0,_0x473ae1),T(0x1,_0x136b55(j))],M);function N(_0x1d69de){'@babel/helpers - typeof';const _0x40cb78=_0x377f0a;return N=typeof Symbol==_0x40cb78(0xd8)&&typeof Symbol[_0x40cb78(0xfc)]==_0x40cb78(0xc0)?function(_0x2ede8b){return typeof _0x2ede8b;}:function(_0x12c8a2){const _0x409272=_0x40cb78;return _0x12c8a2&&typeof Symbol==_0x409272(0xd8)&&_0x12c8a2[_0x409272(0xc4)]===Symbol&&_0x12c8a2!==Symbol[_0x409272(0xb8)]?'symbol':typeof _0x12c8a2;},N(_0x1d69de);}function P(_0x7e00b9,_0x47d5aa){const _0x435149=_0x377f0a;if(N(_0x7e00b9)!='object'||!_0x7e00b9)return _0x7e00b9;var _0x5e0067=_0x7e00b9[Symbol['toPrimitive']];if(_0x5e0067!==void 0x0){var _0x4fddea=_0x5e0067['call'](_0x7e00b9,_0x47d5aa||_0x435149(0xf5));if(N(_0x4fddea)!=_0x435149(0xcf))return _0x4fddea;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x47d5aa===_0x435149(0xdb)?String:Number)(_0x7e00b9);}function F(_0x439c5d){const _0x52c658=_0x377f0a;var _0x317712=P(_0x439c5d,'string');return N(_0x317712)==_0x52c658(0xc0)?_0x317712:_0x317712+'';}function I(_0x463d1e,_0x1bfb62,_0x40dbd3){const _0x5cd298=_0x377f0a;return(_0x1bfb62=F(_0x1bfb62))in _0x463d1e?Object[_0x5cd298(0xbb)](_0x463d1e,_0x1bfb62,{'value':_0x40dbd3,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x463d1e[_0x1bfb62]=_0x40dbd3,_0x463d1e;}let L=class extends _0xf2c82e{constructor(_0x486821=O,_0x3fbfdb,_0x541f17){const _0x570583=_0x377f0a;super(),this[_0x570583(0xf1)]=_0x486821,this[_0x570583(0xb2)]=_0x3fbfdb,this[_0x570583(0xcd)]=_0x541f17;let {..._0x1077be}=_0x54e067({},O,this[_0x570583(0xf1)]);this[_0x570583(0xcd)][_0x570583(0xf4)](_0x570583(0xbc),_0x1077be);}[_0x377f0a(0xec)](){const _0x1ee6ef=_0x377f0a;[[j],[M],[D]][_0x1ee6ef(0xaf)](_0x298743=>{const _0x483925=_0x1ee6ef;this[_0x483925(0xb2)][_0x483925(0xe7)](_0x298743);});}[_0x377f0a(0x95)](){const _0x134d08=_0x377f0a;this[_0x134d08(0xb2)][_0x134d08(0xa0)](M),this[_0x134d08(0xb2)][_0x134d08(0xa0)](D);}};I(L,_0x377f0a(0xad),_0x377f0a(0xf0)),I(L,'packageName',x),I(L,_0x377f0a(0xa8),S),L=E([_0xecc282(_0x400f9f,_0x217c67,_0x57a573),T(0x1,_0x136b55(_0x2b5710)),T(0x2,_0x1a5d1a)],L);export{L as UniverThreadCommentDataSourcePlugin};
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { IUniverThreadCommentDataSourceConfig } from './
|
|
1
|
+
export type { IUniverThreadCommentDataSourceConfig } from './config/config';
|
|
2
2
|
export { UniverThreadCommentDataSourcePlugin } from './plugin';
|
package/lib/types/plugin.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IUniverThreadCommentDataSourceConfig } from './
|
|
1
|
+
import type { IUniverThreadCommentDataSourceConfig } from './config/config';
|
|
2
2
|
import { IConfigService, Injector, Plugin } from '@univerjs/core';
|
|
3
3
|
export declare class UniverThreadCommentDataSourcePlugin extends Plugin {
|
|
4
4
|
private readonly _config;
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x2f62(){const _0x1f0810=['deleteComment','dateKit','UniverThreadCommentDataSourcePlugin','@univerjs/thread-comment','_commentService','getOwnPropertyDescriptor','add','code','121SbDhEx','5EVjXfi','resolveComment','ThreadCommentModel','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','@univerjs/core','error','18qVCZOB','rangeId','93SzWKOG','Edit','rangeType','onReady','filter','setConfig','UniverProThreadCommentDatasource','unitId','toStringTag','root','Solve','object','default','post','Solved','DependentOn','/solved','HTTPService','Plugin','onStarting','Reply','bufferTime','pluginName','/reply','getMemberID','CommentUpdateEventType','1025370euRfQh','addComment','saveCommentToSnapshot','toPrimitive','0.24.0','dataSource','delete','amd','content','replies','requireSession','_sessionService','OpenOrReOpen','@univerjs/protocol','string','users','symbol','YYYY/MM/DD\x20HH:mm','getUnit','_httpService','pipe','createTimestamp','3812CvyYPm','/edit','/list','CustomRangeType','Injector','@univerjs/network','format','listComments','1392392NlwGzq','userID','_initDataSource','UniverLicensePlugin','713120FnwPMi','stringify','get','body','type','COMMENT','resolved','defineProperty','updateComment','_userService','getCurrentUser','Disposable','_initUserSync','addUser','/add','replyId','rxjs','subscribe','comment','getComment','size','268701AIXSRd','67790NMLROo','syncUpdateMutationToColla','@univerjs-pro/collaboration-client','length','_injector','CommentSolvedStatus','find','UniverProCollaborationClient','/universer-api/user/list','/universer-api/comment/unit/','solved','1302343zGCqvx','UniverProLicense','disposeWithMe','prototype','_threadCommentDataSourceService','comments','iterator','decorate','_threadCommentDataSource','user','getUser','merge','UniverThreadCommentUIPlugin','@univerjs-pro/thread-comment-datasource','Inject','map','commentUpdate$','parse','slice','UniverThreadComment','_configService','threadId','customRanges','_threadCommentModel','userId','function','UserManagerService','UniverCollaborationClientPlugin','forEach','_init','CollaborationSessionService'];_0x2f62=function(){return _0x1f0810;};return _0x2f62();}function _0x191e(_0x218c3a,_0x57f561){_0x218c3a=_0x218c3a-0x1dd;const _0x2f62b9=_0x2f62();let _0x191e96=_0x2f62b9[_0x218c3a];return _0x191e96;}(function(_0x28db60,_0x538abd){const _0x573f0b=_0x191e,_0x492bad=_0x28db60();while(!![]){try{const _0x50b44a=-parseInt(_0x573f0b(0x219))/0x1+parseInt(_0x573f0b(0x204))/0x2+parseInt(_0x573f0b(0x255))/0x3*(parseInt(_0x573f0b(0x1f8))/0x4)+-parseInt(_0x573f0b(0x24d))/0x5*(parseInt(_0x573f0b(0x1e2))/0x6)+-parseInt(_0x573f0b(0x225))/0x7+parseInt(_0x573f0b(0x200))/0x8*(parseInt(_0x573f0b(0x253))/0x9)+parseInt(_0x573f0b(0x21a))/0xa*(parseInt(_0x573f0b(0x24c))/0xb);if(_0x50b44a===_0x538abd)break;else _0x492bad['push'](_0x492bad['shift']());}catch(_0x5cebfd){_0x492bad['push'](_0x492bad['shift']());}}}(_0x2f62,0x2cb55),function(_0x53159a,_0x174943){const _0x2049c3=_0x191e;typeof exports==_0x2049c3(0x260)&&typeof module<'u'?_0x174943(exports,require(`@univerjs-pro/collaboration-client`),require(`@univerjs-pro/license`),require(`@univerjs/core`),require(`@univerjs/thread-comment-ui`),require(`@univerjs/protocol`),require(`@univerjs/thread-comment`),require(`rxjs`),require(`@univerjs/network`)):typeof define==_0x2049c3(0x23e)&&define[_0x2049c3(0x1e9)]?define(['exports',_0x2049c3(0x21c),'@univerjs-pro/license',_0x2049c3(0x251),'@univerjs/thread-comment-ui',_0x2049c3(0x1ef),_0x2049c3(0x247),'rxjs',_0x2049c3(0x1fd)],_0x174943):(_0x53159a=typeof globalThis<'u'?globalThis:_0x53159a||self,_0x174943(_0x53159a[_0x2049c3(0x25b)]={},_0x53159a[_0x2049c3(0x221)],_0x53159a[_0x2049c3(0x226)],_0x53159a['UniverCore'],_0x53159a['UniverThreadCommentUi'],_0x53159a['UniverProtocol'],_0x53159a[_0x2049c3(0x238)],_0x53159a[_0x2049c3(0x214)],_0x53159a['UniverNetwork']));}(this,function(_0x233f00,_0x4a3ce9,_0x326ba7,_0x5eb30e,_0x2a2e4d,_0x264b49,_0x3ea412,_0x2f852d,_0x265398){const _0x5de8ba=_0x191e;Object['defineProperty'](_0x233f00,Symbol[_0x5de8ba(0x25d)],{'value':'Module'});var _0x4a79c2=_0x5de8ba(0x232),_0x205c7e=_0x5de8ba(0x1e6);let _0x1ae6db=_0x45d5cc=>(0x0,_0x5eb30e[_0x5de8ba(0x245)])(new Date(+_0x45d5cc))[_0x5de8ba(0x1fe)]('YYYY/MM/DD\x20HH:mm'),_0x335c2b=async(_0x551ca6,_0xea1169)=>{const _0xa34fc1=_0x5de8ba;let _0x86f069=_0x551ca6[_0xa34fc1(0x206)](_0x5eb30e[_0xa34fc1(0x23f)]),_0x3f8d4f=_0x551ca6['get'](_0x265398['HTTPService']);_0xea1169[_0xa34fc1(0x241)](_0x566c6f=>{const _0x4a10ec=_0xa34fc1;_0x86f069[_0x4a10ec(0x22f)](_0x566c6f)&&_0xea1169[_0x4a10ec(0x1e8)](_0x566c6f);}),_0xea1169[_0xa34fc1(0x218)]&&(await _0x3f8d4f[_0xa34fc1(0x206)](_0xa34fc1(0x222),{'params':{'userIDs':[..._0xea1169]}}))[_0xa34fc1(0x207)]['users']['forEach'](_0x63f32a=>{const _0x186cfd=_0xa34fc1;_0x63f32a&&_0x86f069[_0x186cfd(0x211)](_0x63f32a);});};function _0x3c1fef(_0x22d707,_0x2f4778){return function(_0x3b59d8,_0x2ca084){_0x2f4778(_0x3b59d8,_0x2ca084,_0x22d707);};}function _0x4c09c4(_0x1e9c5e,_0x4d30d0,_0x6f5771,_0x2d9769){const _0x2dfac1=_0x5de8ba;var _0x4259c5=arguments['length'],_0x2c5a9e=_0x4259c5<0x3?_0x4d30d0:_0x2d9769===null?_0x2d9769=Object[_0x2dfac1(0x249)](_0x4d30d0,_0x6f5771):_0x2d9769,_0x4bcaee;if(typeof Reflect==_0x2dfac1(0x260)&&typeof Reflect['decorate']==_0x2dfac1(0x23e))_0x2c5a9e=Reflect[_0x2dfac1(0x22c)](_0x1e9c5e,_0x4d30d0,_0x6f5771,_0x2d9769);else{for(var _0xb8d169=_0x1e9c5e[_0x2dfac1(0x21d)]-0x1;_0xb8d169>=0x0;_0xb8d169--)(_0x4bcaee=_0x1e9c5e[_0xb8d169])&&(_0x2c5a9e=(_0x4259c5<0x3?_0x4bcaee(_0x2c5a9e):_0x4259c5>0x3?_0x4bcaee(_0x4d30d0,_0x6f5771,_0x2c5a9e):_0x4bcaee(_0x4d30d0,_0x6f5771))||_0x2c5a9e);}return _0x4259c5>0x3&&_0x2c5a9e&&Object[_0x2dfac1(0x20b)](_0x4d30d0,_0x6f5771,_0x2c5a9e),_0x2c5a9e;}let _0x4d71b0=class extends _0x5eb30e[_0x5de8ba(0x20f)]{constructor(_0x1a5c92,_0x435571,_0x64e61d,_0x108538){const _0x393af0=_0x5de8ba;super(),this[_0x393af0(0x248)]=_0x1a5c92,this[_0x393af0(0x23c)]=_0x435571,this[_0x393af0(0x20d)]=_0x64e61d,this[_0x393af0(0x21e)]=_0x108538,this[_0x393af0(0x242)](),this['_initUserSync']();}[_0x5de8ba(0x210)](){const _0x10fade=_0x5de8ba;this['disposeWithMe'](this[_0x10fade(0x23c)][_0x10fade(0x235)][_0x10fade(0x1f6)]((0x0,_0x2f852d[_0x10fade(0x1dd)])(0x10))['subscribe'](_0x1552e6=>{const _0x4cf9b5=_0x10fade;let _0x1fe51a=new Set();_0x1552e6[_0x4cf9b5(0x241)](_0x1d9b65=>{const _0x274323=_0x4cf9b5;switch(_0x1d9b65[_0x274323(0x208)]){case _0x274323(0x24a):{let _0x30ec20=_0x1d9b65['payload']['personId'];_0x1fe51a[_0x274323(0x24a)](_0x30ec20);break;}default:break;}}),_0x335c2b(this[_0x4cf9b5(0x21e)],_0x1fe51a);}));}[_0x5de8ba(0x242)](){const _0x28330c=_0x5de8ba;this[_0x28330c(0x227)](this[_0x28330c(0x248)]['commentUpdate$'][_0x28330c(0x215)](async _0x66e48=>{const _0x3a9323=_0x28330c;var _0x2e0be2;let _0x36f5d3=(_0x2e0be2=this[_0x3a9323(0x23c)]['getUnit'](_0x66e48[_0x3a9323(0x25c)])[_0x3a9323(0x220)](_0x1fc93e=>_0x1fc93e['threadId']===_0x66e48[_0x3a9323(0x23a)]))==null?void 0x0:_0x2e0be2['root'];if(!_0x36f5d3)return;let {unitId:_0x52dba2,subUnitId:_0x4b2edc}=_0x36f5d3;switch(_0x66e48[_0x3a9323(0x22e)]&&this[_0x3a9323(0x20d)][_0x3a9323(0x211)](_0x66e48[_0x3a9323(0x22e)]),_0x66e48[_0x3a9323(0x208)]){case _0x264b49[_0x3a9323(0x1e1)]['Add']:break;case _0x264b49[_0x3a9323(0x1e1)][_0x3a9323(0x269)]:var _0x544e16,_0x1f099b;this['_threadCommentModel'][_0x3a9323(0x1e3)](_0x52dba2,_0x4b2edc,{'unitId':_0x52dba2,'subUnitId':_0x4b2edc,'ref':'','id':_0x66e48[_0x3a9323(0x213)],'dT':_0x1ae6db(+_0x66e48['createTimestamp']),'threadId':_0x66e48['threadId'],'personId':(_0x544e16=(_0x1f099b=_0x66e48[_0x3a9323(0x22e)])==null?void 0x0:_0x1f099b[_0x3a9323(0x201)])==null?_0x66e48[_0x3a9323(0x23d)]:_0x544e16,'text':JSON[_0x3a9323(0x236)](_0x66e48[_0x3a9323(0x1ea)]),'parentId':_0x36f5d3['id']});break;case _0x264b49['CommentUpdateEventType']['Delete']:{let _0x5bac74=this[_0x3a9323(0x23c)][_0x3a9323(0x217)](_0x52dba2,_0x4b2edc,_0x66e48['replyId']);_0x5bac74&&_0x5bac74['parentId']&&this[_0x3a9323(0x23c)]['deleteComment'](_0x52dba2,_0x4b2edc,_0x66e48[_0x3a9323(0x213)]);break;}case _0x264b49[_0x3a9323(0x1e1)][_0x3a9323(0x256)]:this[_0x3a9323(0x23c)][_0x3a9323(0x20c)](_0x52dba2,_0x4b2edc,{'commentId':_0x66e48[_0x3a9323(0x213)],'text':JSON[_0x3a9323(0x236)](_0x66e48[_0x3a9323(0x1ea)])});break;case _0x264b49[_0x3a9323(0x1e1)][_0x3a9323(0x25f)]:{var _0x5e5e47;let _0xd9f7d6=(_0x5e5e47=this[_0x3a9323(0x23c)][_0x3a9323(0x1f4)](_0x66e48['unitId'])['find'](_0x5bee1d=>_0x5bee1d[_0x3a9323(0x23a)]===_0x66e48[_0x3a9323(0x23a)]))==null?void 0x0:_0x5e5e47[_0x3a9323(0x25e)];_0xd9f7d6&&this[_0x3a9323(0x23c)][_0x3a9323(0x24e)](_0x52dba2,_0x4b2edc,_0xd9f7d6['id'],_0x66e48[_0x3a9323(0x224)]===_0x264b49['CommentSolvedStatus'][_0x3a9323(0x263)]);break;}default:break;}}));}};_0x4d71b0=_0x4c09c4([_0x3c1fef(0x0,(0x0,_0x5eb30e[_0x5de8ba(0x233)])(_0x4a3ce9['CommentService'])),_0x3c1fef(0x1,(0x0,_0x5eb30e[_0x5de8ba(0x233)])(_0x3ea412[_0x5de8ba(0x24f)])),_0x3c1fef(0x2,(0x0,_0x5eb30e[_0x5de8ba(0x233)])(_0x5eb30e['UserManagerService'])),_0x3c1fef(0x3,(0x0,_0x5eb30e[_0x5de8ba(0x233)])(_0x5eb30e['Injector']))],_0x4d71b0);let _0xa8911f='thread-comment-data-source.config';Symbol(_0xa8911f);let _0xabf9ce={};function _0x49a6f4(_0x3e9f34,_0x165fe5){const _0x44ed9c=_0x5de8ba;let _0x193313=_0x3e9f34[_0x44ed9c(0x1eb)][0x0];return{..._0x165fe5,'id':_0x193313['replyId'],'resolved':_0x3e9f34[_0x44ed9c(0x224)]===0x1,'dT':_0x1ae6db(_0x193313[_0x44ed9c(0x1f7)]),'personId':_0x193313[_0x44ed9c(0x23d)],'threadId':_0x193313[_0x44ed9c(0x23a)]};}function _0x57ba87(_0xd8ed19,_0x47e5c3,_0x43bf61){const _0x25b2a1=_0x5de8ba;var _0x1b329a,_0x392033;if(((_0x1b329a=_0xd8ed19==null||(_0x392033=_0xd8ed19['replies'])==null?void 0x0:_0x392033[_0x25b2a1(0x21d)])==null?0x0:_0x1b329a)>0x0){let _0x391a6d=(_0x30ba65,_0x4b0602)=>({'id':_0x30ba65[_0x25b2a1(0x213)],'threadId':_0x30ba65['threadId'],'dT':_0x1ae6db(_0x30ba65['createTimestamp']),'personId':_0x30ba65[_0x25b2a1(0x23d)],'resolved':_0xd8ed19['solved']===_0x264b49['CommentSolvedStatus']['Solved'],'unitId':_0x47e5c3,'subUnitId':_0x43bf61,'text':JSON[_0x25b2a1(0x236)](_0x30ba65[_0x25b2a1(0x1ea)]),'parentId':_0x4b0602}),_0x1866df=_0x391a6d(_0xd8ed19[_0x25b2a1(0x1eb)][0x0]);return{..._0x1866df,'children':_0xd8ed19[_0x25b2a1(0x1eb)][_0x25b2a1(0x237)](0x1)[_0x25b2a1(0x234)](_0x15d8e3=>_0x391a6d(_0x15d8e3,_0x1866df['id']))};}return null;}let _0xd01958=class{constructor(_0x3f65e6,_0x429d36,_0x373e7c){const _0x5ab179=_0x5de8ba;this[_0x5ab179(0x1f5)]=_0x3f65e6,this[_0x5ab179(0x20d)]=_0x429d36,this[_0x5ab179(0x1ed)]=_0x373e7c;}async[_0x5de8ba(0x1e3)](_0x54adc0){const _0x464876=_0x5de8ba;var _0x10e6da,_0xd0ebc8;let {parentId:_0x2596a7,unitId:_0x31c039,text:_0x568189,threadId:_0x4abd54}=_0x54adc0,_0x174914=(_0x10e6da=(_0xd0ebc8=_0x568189[_0x464876(0x23b)])==null?void 0x0:_0xd0ebc8[_0x464876(0x259)](_0xe392e0=>_0xe392e0[_0x464876(0x257)]===_0x5eb30e[_0x464876(0x1fb)][_0x464876(0x209)])['map'](_0x8c0b9b=>_0x8c0b9b[_0x464876(0x254)]))==null?[]:_0x10e6da,_0x462f95=JSON['stringify'](_0x568189),_0x11dd74=(await this[_0x464876(0x1ed)][_0x464876(0x1ec)](_0x31c039))[_0x464876(0x1e0)]();if(_0x2596a7){let _0x5a6a62={'memberId':_0x11dd74,'unitId':_0x31c039,'content':_0x462f95,'mention':_0x174914,'threadId':_0x4abd54},_0x3fd4b4=(await this[_0x464876(0x1f5)]['post'](_0x464876(0x223)+_0x31c039+_0x464876(0x1df),{'body':_0x5a6a62}))[_0x464876(0x207)]['reply'];return{..._0x54adc0,'id':_0x3fd4b4[_0x464876(0x213)],'dT':(0x0,_0x5eb30e[_0x464876(0x245)])(+_0x3fd4b4['createTimestamp'])[_0x464876(0x1fe)](_0x464876(0x1f3)),'personId':_0x3fd4b4[_0x464876(0x23d)]};}else{let _0x4640b2={'memberId':_0x11dd74,'unitId':_0x31c039,'content':_0x462f95,'mention':_0x174914};return _0x49a6f4((await this['_httpService'][_0x464876(0x262)](_0x464876(0x223)+_0x31c039+_0x464876(0x212),{'body':_0x4640b2}))[_0x464876(0x207)][_0x464876(0x216)],_0x54adc0);}}async[_0x5de8ba(0x20c)](_0x505fa3){const _0x159139=_0x5de8ba;var _0x3f66d0,_0x122b97;let {text:_0x38455e,unitId:_0x84ec45}=_0x505fa3,_0x1c3a90=(_0x3f66d0=(_0x122b97=_0x38455e[_0x159139(0x23b)])==null?void 0x0:_0x122b97[_0x159139(0x259)](_0x2f79f5=>_0x2f79f5[_0x159139(0x257)]===_0x5eb30e[_0x159139(0x1fb)][_0x159139(0x209)])[_0x159139(0x234)](_0x2c25a9=>_0x2c25a9[_0x159139(0x254)]))==null?[]:_0x3f66d0,_0x2150a6=JSON[_0x159139(0x205)](_0x38455e),_0x19ee5e=_0x505fa3[_0x159139(0x23a)],_0x2f4dd6=_0x505fa3['id'],_0x215e29={'memberId':(await this['_sessionService'][_0x159139(0x1ec)](_0x84ec45))['getMemberID'](),'unitId':_0x84ec45,'threadId':_0x19ee5e,'mention':_0x1c3a90,'content':_0x2150a6,'replyId':_0x2f4dd6},_0x32b456=await this['_httpService'][_0x159139(0x262)](_0x159139(0x223)+_0x84ec45+_0x159139(0x1f9),{'body':_0x215e29});return!_0x32b456[_0x159139(0x207)]['error']||_0x32b456['body']['error']['code']===0x1;}async[_0x5de8ba(0x24e)](_0x17c862){const _0xfc38cc=_0x5de8ba;let {unitId:_0x373983}=_0x17c862,_0x44a523=_0x17c862[_0xfc38cc(0x23a)],_0x467bd0={'memberId':this[_0xfc38cc(0x20d)][_0xfc38cc(0x20e)]()[_0xfc38cc(0x201)],'unitId':_0x373983,'threadId':_0x44a523,'solved':_0x17c862[_0xfc38cc(0x20a)]?_0x264b49[_0xfc38cc(0x21f)]['Solved']:_0x264b49[_0xfc38cc(0x21f)][_0xfc38cc(0x1ee)]},_0x4ac969=await this[_0xfc38cc(0x1f5)][_0xfc38cc(0x262)](_0xfc38cc(0x223)+_0x373983+_0xfc38cc(0x265),{'body':_0x467bd0});return!_0x4ac969['body'][_0xfc38cc(0x252)]||_0x4ac969[_0xfc38cc(0x207)]['error'][_0xfc38cc(0x24b)]===0x1;}async[_0x5de8ba(0x244)](_0xd830b4,_0xee8061,_0x536675,_0x4a76e0){const _0x1a8d8e=_0x5de8ba;let _0x48834f={'memberId':(await this[_0x1a8d8e(0x1ed)][_0x1a8d8e(0x1ec)](_0xd830b4))[_0x1a8d8e(0x1e0)](),'threadId':_0x536675,'replyId':_0x4a76e0,'unitId':_0xd830b4},_0x1da15d=await this[_0x1a8d8e(0x1f5)][_0x1a8d8e(0x262)](_0x1a8d8e(0x223)+_0xd830b4+'/delete',{'body':_0x48834f});return!_0x1da15d[_0x1a8d8e(0x207)][_0x1a8d8e(0x252)]||_0x1da15d['body'][_0x1a8d8e(0x252)][_0x1a8d8e(0x24b)]===0x1;}async[_0x5de8ba(0x1ff)](_0x3775e2,_0x4355a3,_0x3db5ad){const _0x4a2a55=_0x5de8ba;let _0x94d430={'unitId':_0x3775e2,'threadId':_0x3db5ad},_0x3766cf=await this['_httpService'][_0x4a2a55(0x262)](_0x4a2a55(0x223)+_0x3775e2+_0x4a2a55(0x1fa),{'body':_0x94d430}),_0x52d1bd=_0x3db5ad[_0x4a2a55(0x234)](_0x442013=>_0x57ba87(_0x3766cf[_0x4a2a55(0x207)][_0x4a2a55(0x22a)][_0x442013],_0x3775e2,_0x4355a3))[_0x4a2a55(0x259)](Boolean);return Object['values'](_0x3766cf[_0x4a2a55(0x207)][_0x4a2a55(0x1f1)])[_0x4a2a55(0x241)](_0x46b68f=>{const _0x4faa33=_0x4a2a55;this[_0x4faa33(0x20d)][_0x4faa33(0x211)](_0x46b68f);}),_0x52d1bd;}[_0x5de8ba(0x1e4)](_0x332ac7){const _0x332c94=_0x5de8ba;return{'id':_0x332ac7['id'],'threadId':_0x332ac7[_0x332c94(0x23a)],'ref':_0x332ac7['ref']};}};_0xd01958=_0x4c09c4([_0x3c1fef(0x0,(0x0,_0x5eb30e[_0x5de8ba(0x233)])(_0x265398[_0x5de8ba(0x266)])),_0x3c1fef(0x1,(0x0,_0x5eb30e[_0x5de8ba(0x233)])(_0x5eb30e[_0x5de8ba(0x23f)])),_0x3c1fef(0x2,(0x0,_0x5eb30e[_0x5de8ba(0x233)])(_0x4a3ce9[_0x5de8ba(0x243)]))],_0xd01958);let _0x248d24=class extends _0x5eb30e[_0x5de8ba(0x20f)]{constructor(_0x198290,_0x368aa5){const _0x3677fc=_0x5de8ba;super(),this[_0x3677fc(0x229)]=_0x198290,this['_threadCommentDataSource']=_0x368aa5,this[_0x3677fc(0x202)]();}[_0x5de8ba(0x202)](){const _0x3de160=_0x5de8ba;this[_0x3de160(0x229)][_0x3de160(0x1e7)]=this[_0x3de160(0x22d)],this['_threadCommentDataSourceService'][_0x3de160(0x21b)]=!0x1;}};_0x248d24=_0x4c09c4([_0x3c1fef(0x0,_0x3ea412['IThreadCommentDataSourceService']),_0x3c1fef(0x1,(0x0,_0x5eb30e[_0x5de8ba(0x233)])(_0xd01958))],_0x248d24);function _0x938851(_0x4c1982){'@babel/helpers - typeof';const _0x471a62=_0x5de8ba;return _0x938851=typeof Symbol==_0x471a62(0x23e)&&typeof Symbol[_0x471a62(0x22b)]==_0x471a62(0x1f2)?function(_0x11b824){return typeof _0x11b824;}:function(_0x3aa073){const _0x3ab0ef=_0x471a62;return _0x3aa073&&typeof Symbol=='function'&&_0x3aa073['constructor']===Symbol&&_0x3aa073!==Symbol[_0x3ab0ef(0x228)]?'symbol':typeof _0x3aa073;},_0x938851(_0x4c1982);}function _0x159e94(_0x3b6ef2,_0x4bcfe2){const _0x37e035=_0x5de8ba;if(_0x938851(_0x3b6ef2)!=_0x37e035(0x260)||!_0x3b6ef2)return _0x3b6ef2;var _0x4c02f3=_0x3b6ef2[Symbol[_0x37e035(0x1e5)]];if(_0x4c02f3!==void 0x0){var _0x4038f7=_0x4c02f3['call'](_0x3b6ef2,_0x4bcfe2||_0x37e035(0x261));if(_0x938851(_0x4038f7)!='object')return _0x4038f7;throw TypeError(_0x37e035(0x250));}return(_0x4bcfe2==='string'?String:Number)(_0x3b6ef2);}function _0xfaf3b(_0x16369a){const _0x4880c8=_0x5de8ba;var _0x5c7d9d=_0x159e94(_0x16369a,_0x4880c8(0x1f0));return _0x938851(_0x5c7d9d)==_0x4880c8(0x1f2)?_0x5c7d9d:_0x5c7d9d+'';}function _0x1b1519(_0x27f2b3,_0x3c00c5,_0x134b64){return(_0x3c00c5=_0xfaf3b(_0x3c00c5))in _0x27f2b3?Object['defineProperty'](_0x27f2b3,_0x3c00c5,{'value':_0x134b64,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x27f2b3[_0x3c00c5]=_0x134b64,_0x27f2b3;}let _0x2429e9=class extends _0x5eb30e[_0x5de8ba(0x267)]{constructor(_0x2c7f0c=_0xabf9ce,_0x572c31,_0x44df6f){const _0x3a9d74=_0x5de8ba;super(),this['_config']=_0x2c7f0c,this[_0x3a9d74(0x21e)]=_0x572c31,this[_0x3a9d74(0x239)]=_0x44df6f;let {..._0x27e6bb}=(0x0,_0x5eb30e[_0x3a9d74(0x230)])({},_0xabf9ce,this['_config']);this[_0x3a9d74(0x239)][_0x3a9d74(0x25a)](_0xa8911f,_0x27e6bb);}[_0x5de8ba(0x268)](){[[_0xd01958],[_0x248d24],[_0x4d71b0]]['forEach'](_0x1142b8=>{const _0x501776=_0x191e;this[_0x501776(0x21e)][_0x501776(0x24a)](_0x1142b8);});}[_0x5de8ba(0x258)](){const _0x26888f=_0x5de8ba;this[_0x26888f(0x21e)][_0x26888f(0x206)](_0x248d24),this[_0x26888f(0x21e)][_0x26888f(0x206)](_0x4d71b0);}};_0x1b1519(_0x2429e9,_0x5de8ba(0x1de),'UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'),_0x1b1519(_0x2429e9,'packageName',_0x4a79c2),_0x1b1519(_0x2429e9,'version',_0x205c7e),_0x2429e9=_0x4c09c4([(0x0,_0x5eb30e[_0x5de8ba(0x264)])(_0x2a2e4d[_0x5de8ba(0x231)],_0x4a3ce9[_0x5de8ba(0x240)],_0x326ba7[_0x5de8ba(0x203)]),_0x3c1fef(0x1,(0x0,_0x5eb30e[_0x5de8ba(0x233)])(_0x5eb30e[_0x5de8ba(0x1fc)])),_0x3c1fef(0x2,_0x5eb30e['IConfigService'])],_0x2429e9),Object['defineProperty'](_0x233f00,_0x5de8ba(0x246),{'enumerable':!0x0,'get':function(){return _0x2429e9;}});}));
|
|
1
|
+
function _0x2767(_0xbcd25d,_0x3802e0){_0xbcd25d=_0xbcd25d-0x19d;const _0x3b4338=_0x3b43();let _0x276776=_0x3b4338[_0xbcd25d];return _0x276776;}function _0x3b43(){const _0xf85b0b=['@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','exports','dataSource','parentId','pipe','find','Delete','_httpService','userId','resolveComment','amd','userID','2657068zWANQz','listComments','unitId','rangeId','filter','disposeWithMe','code','format','/universer-api/comment/unit/','UniverProLicense','YYYY/MM/DD\x20HH:mm','symbol','payload','merge','replies','personId','saveCommentToSnapshot','object','/reply','_initUserSync','UserManagerService','/edit','delete','comment','IThreadCommentDataSourceService','/delete','UniverCore','_threadCommentDataSourceService','UniverProCollaborationClient','rxjs','stringify','Disposable','subscribe','body','solved','parse','_configService','values','getMemberID','requireSession','OpenOrReOpen','commentUpdate$','CommentUpdateEventType','IConfigService','error','_userService','getUnit','reply','UniverCollaborationClientPlugin','user','defineProperty','forEach','_threadCommentModel','function','_config','CustomRangeType','Solve','Solved','@univerjs-pro/collaboration-client','getUser','rangeType','10516608Iynlht','Add','/list','Inject','createTimestamp','dateKit','addComment','10652260aHtstW','3171304Eqyrmk','resolved','8864080ZCtKQi','_init','comments','Injector','onReady','getCurrentUser','CollaborationSessionService','_threadCommentDataSource','call','root','HTTPService','UniverLicensePlugin','7giHiqC','0.25.0-insiders.20260608-e4336f7','type','_initDataSource','toStringTag','decorate','DependentOn','content','CommentSolvedStatus','Edit','COMMENT','ThreadCommentModel','Module','prototype','UniverThreadCommentUIPlugin','7545132tQNxXs','map','UniverThreadComment','UniverNetwork','addUser','slice','deleteComment','Plugin','threadId','1cyvFQv','getComment','_injector','@univerjs/protocol','_sessionService','updateComment','string','pluginName','add','@univerjs/network','post','Reply','getOwnPropertyDescriptor','syncUpdateMutationToColla','replyId','@univerjs-pro/license','UniverThreadCommentUi','6036OwtpNF','users','length','iterator','@univerjs/thread-comment','@univerjs/thread-comment-ui','ref','_commentService','2007guEURD','get','customRanges','/solved'];_0x3b43=function(){return _0xf85b0b;};return _0x3b43();}(function(_0x52029f,_0x20367c){const _0x2f247c=_0x2767,_0x225ff8=_0x52029f();while(!![]){try{const _0x568a0e=parseInt(_0x2f247c(0x1e8))/0x1*(-parseInt(_0x2f247c(0x211))/0x2)+parseInt(_0x2f247c(0x201))/0x3*(-parseInt(_0x2f247c(0x1f9))/0x4)+parseInt(_0x2f247c(0x1c4))/0x5+parseInt(_0x2f247c(0x1df))/0x6+parseInt(_0x2f247c(0x1d0))/0x7*(parseInt(_0x2f247c(0x1c2))/0x8)+-parseInt(_0x2f247c(0x1ba))/0x9+parseInt(_0x2f247c(0x1c1))/0xa;if(_0x568a0e===_0x20367c)break;else _0x225ff8['push'](_0x225ff8['shift']());}catch(_0x504fd9){_0x225ff8['push'](_0x225ff8['shift']());}}}(_0x3b43,0xf0942),function(_0x2480bb,_0x50458e){const _0x212186=_0x2767;typeof exports==_0x212186(0x222)&&typeof module<'u'?_0x50458e(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/protocol'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x212186(0x1b2)&&define[_0x212186(0x20f)]?define([_0x212186(0x206),_0x212186(0x1b7),_0x212186(0x1f7),'@univerjs/core',_0x212186(0x1fe),_0x212186(0x1eb),_0x212186(0x1fd),_0x212186(0x22e),_0x212186(0x1f1)],_0x50458e):(_0x2480bb=typeof globalThis<'u'?globalThis:_0x2480bb||self,_0x50458e(_0x2480bb['UniverProThreadCommentDatasource']={},_0x2480bb[_0x212186(0x22d)],_0x2480bb[_0x212186(0x21a)],_0x2480bb[_0x212186(0x22b)],_0x2480bb[_0x212186(0x1f8)],_0x2480bb['UniverProtocol'],_0x2480bb[_0x212186(0x1e1)],_0x2480bb[_0x212186(0x22e)],_0x2480bb[_0x212186(0x1e2)]));}(this,function(_0x392202,_0x423dc9,_0x559654,_0x4db30c,_0x25e677,_0x4ccfa7,_0x42cc70,_0x24c405,_0x5871da){const _0x5aafac=_0x2767;Object['defineProperty'](_0x392202,Symbol[_0x5aafac(0x1d4)],{'value':_0x5aafac(0x1dc)});var _0xc01b4e='@univerjs-pro/thread-comment-datasource',_0x2aacfc=_0x5aafac(0x1d1);let _0x408264=_0x50b17c=>(0x0,_0x4db30c['dateKit'])(new Date(+_0x50b17c))[_0x5aafac(0x218)](_0x5aafac(0x21b)),_0x2f3ba4=async(_0x42e70a,_0x39beb2)=>{const _0x3663bf=_0x5aafac;let _0x171ca4=_0x42e70a[_0x3663bf(0x202)](_0x4db30c['UserManagerService']),_0x190707=_0x42e70a['get'](_0x5871da[_0x3663bf(0x1ce)]);_0x39beb2[_0x3663bf(0x1b0)](_0x2b216a=>{const _0x7624c6=_0x3663bf;_0x171ca4[_0x7624c6(0x1b8)](_0x2b216a)&&_0x39beb2[_0x7624c6(0x227)](_0x2b216a);}),_0x39beb2['size']&&(await _0x190707[_0x3663bf(0x202)]('/universer-api/user/list',{'params':{'userIDs':[..._0x39beb2]}}))[_0x3663bf(0x19e)][_0x3663bf(0x1fa)]['forEach'](_0x2fe20d=>{const _0x2ea40c=_0x3663bf;_0x2fe20d&&_0x171ca4[_0x2ea40c(0x1e3)](_0x2fe20d);});};function _0x2ac05e(_0x351641,_0x5b6e95){return function(_0x4646aa,_0xdf2c6a){_0x5b6e95(_0x4646aa,_0xdf2c6a,_0x351641);};}function _0x4ff9cd(_0x28f6d2,_0x5c9d60,_0x402d47,_0x4a3459){const _0x37f534=_0x5aafac;var _0x57392f=arguments[_0x37f534(0x1fb)],_0x231c2b=_0x57392f<0x3?_0x5c9d60:_0x4a3459===null?_0x4a3459=Object[_0x37f534(0x1f4)](_0x5c9d60,_0x402d47):_0x4a3459,_0x3c701f;if(typeof Reflect==_0x37f534(0x222)&&typeof Reflect['decorate']=='function')_0x231c2b=Reflect[_0x37f534(0x1d5)](_0x28f6d2,_0x5c9d60,_0x402d47,_0x4a3459);else{for(var _0x21734f=_0x28f6d2['length']-0x1;_0x21734f>=0x0;_0x21734f--)(_0x3c701f=_0x28f6d2[_0x21734f])&&(_0x231c2b=(_0x57392f<0x3?_0x3c701f(_0x231c2b):_0x57392f>0x3?_0x3c701f(_0x5c9d60,_0x402d47,_0x231c2b):_0x3c701f(_0x5c9d60,_0x402d47))||_0x231c2b);}return _0x57392f>0x3&&_0x231c2b&&Object[_0x37f534(0x1af)](_0x5c9d60,_0x402d47,_0x231c2b),_0x231c2b;}let _0xf47c0e=class extends _0x4db30c['Disposable']{constructor(_0x2f586e,_0x39c38d,_0x474b70,_0x49a3ff){const _0x3ed291=_0x5aafac;super(),this[_0x3ed291(0x200)]=_0x2f586e,this[_0x3ed291(0x1b1)]=_0x39c38d,this[_0x3ed291(0x1aa)]=_0x474b70,this[_0x3ed291(0x1ea)]=_0x49a3ff,this[_0x3ed291(0x1c5)](),this[_0x3ed291(0x224)]();}[_0x5aafac(0x224)](){const _0x1c024e=_0x5aafac;this['disposeWithMe'](this['_threadCommentModel'][_0x1c024e(0x1a6)][_0x1c024e(0x209)]((0x0,_0x24c405['bufferTime'])(0x10))[_0x1c024e(0x19d)](_0x18e240=>{const _0x14b5c0=_0x1c024e;let _0x52b2fb=new Set();_0x18e240[_0x14b5c0(0x1b0)](_0x73e10=>{const _0xe765e0=_0x14b5c0;switch(_0x73e10[_0xe765e0(0x1d2)]){case'add':{let _0x229ab9=_0x73e10[_0xe765e0(0x21d)][_0xe765e0(0x220)];_0x52b2fb['add'](_0x229ab9);break;}default:break;}}),_0x2f3ba4(this['_injector'],_0x52b2fb);}));}[_0x5aafac(0x1c5)](){const _0x22ede2=_0x5aafac;this[_0x22ede2(0x216)](this[_0x22ede2(0x200)][_0x22ede2(0x1a6)][_0x22ede2(0x19d)](async _0x144a5c=>{const _0xba9e1d=_0x22ede2;var _0x4ff067;let _0x39bb3d=(_0x4ff067=this['_threadCommentModel'][_0xba9e1d(0x1ab)](_0x144a5c[_0xba9e1d(0x213)])[_0xba9e1d(0x20a)](_0x12fc16=>_0x12fc16[_0xba9e1d(0x1e7)]===_0x144a5c[_0xba9e1d(0x1e7)]))==null?void 0x0:_0x4ff067[_0xba9e1d(0x1cd)];if(!_0x39bb3d)return;let {unitId:_0x2a0610,subUnitId:_0x43caa3}=_0x39bb3d;switch(_0x144a5c[_0xba9e1d(0x1ae)]&&this['_userService']['addUser'](_0x144a5c[_0xba9e1d(0x1ae)]),_0x144a5c[_0xba9e1d(0x1d2)]){case _0x4ccfa7['CommentUpdateEventType'][_0xba9e1d(0x1bb)]:break;case _0x4ccfa7[_0xba9e1d(0x1a7)][_0xba9e1d(0x1f3)]:var _0x1443c3,_0x34463b;this[_0xba9e1d(0x1b1)][_0xba9e1d(0x1c0)](_0x2a0610,_0x43caa3,{'unitId':_0x2a0610,'subUnitId':_0x43caa3,'ref':'','id':_0x144a5c[_0xba9e1d(0x1f6)],'dT':_0x408264(+_0x144a5c[_0xba9e1d(0x1be)]),'threadId':_0x144a5c[_0xba9e1d(0x1e7)],'personId':(_0x1443c3=(_0x34463b=_0x144a5c['user'])==null?void 0x0:_0x34463b['userID'])==null?_0x144a5c[_0xba9e1d(0x20d)]:_0x1443c3,'text':JSON[_0xba9e1d(0x1a0)](_0x144a5c['content']),'parentId':_0x39bb3d['id']});break;case _0x4ccfa7[_0xba9e1d(0x1a7)][_0xba9e1d(0x20b)]:{let _0x24c12c=this[_0xba9e1d(0x1b1)][_0xba9e1d(0x1e9)](_0x2a0610,_0x43caa3,_0x144a5c['replyId']);_0x24c12c&&_0x24c12c[_0xba9e1d(0x208)]&&this[_0xba9e1d(0x1b1)][_0xba9e1d(0x1e5)](_0x2a0610,_0x43caa3,_0x144a5c[_0xba9e1d(0x1f6)]);break;}case _0x4ccfa7['CommentUpdateEventType'][_0xba9e1d(0x1d9)]:this[_0xba9e1d(0x1b1)][_0xba9e1d(0x1ed)](_0x2a0610,_0x43caa3,{'commentId':_0x144a5c['replyId'],'text':JSON[_0xba9e1d(0x1a0)](_0x144a5c[_0xba9e1d(0x1d7)])});break;case _0x4ccfa7[_0xba9e1d(0x1a7)][_0xba9e1d(0x1b5)]:{var _0x6816d3;let _0x5c58e6=(_0x6816d3=this[_0xba9e1d(0x1b1)][_0xba9e1d(0x1ab)](_0x144a5c['unitId'])[_0xba9e1d(0x20a)](_0x4934a4=>_0x4934a4[_0xba9e1d(0x1e7)]===_0x144a5c[_0xba9e1d(0x1e7)]))==null?void 0x0:_0x6816d3[_0xba9e1d(0x1cd)];_0x5c58e6&&this[_0xba9e1d(0x1b1)][_0xba9e1d(0x20e)](_0x2a0610,_0x43caa3,_0x5c58e6['id'],_0x144a5c[_0xba9e1d(0x19f)]===_0x4ccfa7[_0xba9e1d(0x1d8)][_0xba9e1d(0x1b6)]);break;}default:break;}}));}};_0xf47c0e=_0x4ff9cd([_0x2ac05e(0x0,(0x0,_0x4db30c[_0x5aafac(0x1bd)])(_0x423dc9['CommentService'])),_0x2ac05e(0x1,(0x0,_0x4db30c[_0x5aafac(0x1bd)])(_0x42cc70[_0x5aafac(0x1db)])),_0x2ac05e(0x2,(0x0,_0x4db30c['Inject'])(_0x4db30c[_0x5aafac(0x225)])),_0x2ac05e(0x3,(0x0,_0x4db30c[_0x5aafac(0x1bd)])(_0x4db30c[_0x5aafac(0x1c7)]))],_0xf47c0e);let _0x32a06f={};function _0x1add6d(_0x55e002,_0x288325){const _0xa388f9=_0x5aafac;let _0x1fce17=_0x55e002['replies'][0x0];return{..._0x288325,'id':_0x1fce17[_0xa388f9(0x1f6)],'resolved':_0x55e002[_0xa388f9(0x19f)]===0x1,'dT':_0x408264(_0x1fce17[_0xa388f9(0x1be)]),'personId':_0x1fce17[_0xa388f9(0x20d)],'threadId':_0x1fce17[_0xa388f9(0x1e7)]};}function _0x4652ca(_0x4f8f71,_0x4a12f9,_0x223913){const _0x4d3f8c=_0x5aafac;var _0x59e90c,_0x411972;if(((_0x59e90c=_0x4f8f71==null||(_0x411972=_0x4f8f71['replies'])==null?void 0x0:_0x411972[_0x4d3f8c(0x1fb)])==null?0x0:_0x59e90c)>0x0){let _0x160060=(_0x12ddd2,_0x24b8e3)=>({'id':_0x12ddd2[_0x4d3f8c(0x1f6)],'threadId':_0x12ddd2[_0x4d3f8c(0x1e7)],'dT':_0x408264(_0x12ddd2['createTimestamp']),'personId':_0x12ddd2['userId'],'resolved':_0x4f8f71['solved']===_0x4ccfa7[_0x4d3f8c(0x1d8)][_0x4d3f8c(0x1b6)],'unitId':_0x4a12f9,'subUnitId':_0x223913,'text':JSON['parse'](_0x12ddd2[_0x4d3f8c(0x1d7)]),'parentId':_0x24b8e3}),_0x4bee0f=_0x160060(_0x4f8f71[_0x4d3f8c(0x21f)][0x0]);return{..._0x4bee0f,'children':_0x4f8f71[_0x4d3f8c(0x21f)][_0x4d3f8c(0x1e4)](0x1)['map'](_0x472223=>_0x160060(_0x472223,_0x4bee0f['id']))};}return null;}let _0x6176b8=class{constructor(_0x3472c6,_0x4be054,_0xae4d67){const _0x3b19b5=_0x5aafac;this[_0x3b19b5(0x20c)]=_0x3472c6,this['_userService']=_0x4be054,this[_0x3b19b5(0x1ec)]=_0xae4d67;}async[_0x5aafac(0x1c0)](_0x879103){const _0x5803d6=_0x5aafac;var _0x3862f7,_0x2da281;let {parentId:_0x58eb59,unitId:_0x8f192,text:_0x3bef8d,threadId:_0x3d82a5}=_0x879103,_0x7e3d76=(_0x3862f7=(_0x2da281=_0x3bef8d[_0x5803d6(0x203)])==null?void 0x0:_0x2da281['filter'](_0x39db33=>_0x39db33[_0x5803d6(0x1b9)]===_0x4db30c[_0x5803d6(0x1b4)]['COMMENT'])[_0x5803d6(0x1e0)](_0x12a923=>_0x12a923[_0x5803d6(0x214)]))==null?[]:_0x3862f7,_0x219b1d=JSON['stringify'](_0x3bef8d),_0x41a0a4=(await this['_sessionService'][_0x5803d6(0x1a4)](_0x8f192))[_0x5803d6(0x1a3)]();if(_0x58eb59){let _0x549fbe={'memberId':_0x41a0a4,'unitId':_0x8f192,'content':_0x219b1d,'mention':_0x7e3d76,'threadId':_0x3d82a5},_0x185767=(await this[_0x5803d6(0x20c)][_0x5803d6(0x1f2)](_0x5803d6(0x219)+_0x8f192+_0x5803d6(0x223),{'body':_0x549fbe}))['body'][_0x5803d6(0x1ac)];return{..._0x879103,'id':_0x185767[_0x5803d6(0x1f6)],'dT':(0x0,_0x4db30c[_0x5803d6(0x1bf)])(+_0x185767[_0x5803d6(0x1be)])['format'](_0x5803d6(0x21b)),'personId':_0x185767[_0x5803d6(0x20d)]};}else{let _0x40bc4b={'memberId':_0x41a0a4,'unitId':_0x8f192,'content':_0x219b1d,'mention':_0x7e3d76};return _0x1add6d((await this['_httpService'][_0x5803d6(0x1f2)](_0x5803d6(0x219)+_0x8f192+'/add',{'body':_0x40bc4b}))[_0x5803d6(0x19e)][_0x5803d6(0x228)],_0x879103);}}async[_0x5aafac(0x1ed)](_0x531ea6){const _0x1e75bf=_0x5aafac;var _0x214e53,_0x1a603e;let {text:_0x2795c2,unitId:_0x16cca5}=_0x531ea6,_0x1a816c=(_0x214e53=(_0x1a603e=_0x2795c2[_0x1e75bf(0x203)])==null?void 0x0:_0x1a603e[_0x1e75bf(0x215)](_0x29ff16=>_0x29ff16[_0x1e75bf(0x1b9)]===_0x4db30c['CustomRangeType'][_0x1e75bf(0x1da)])[_0x1e75bf(0x1e0)](_0x2b5313=>_0x2b5313[_0x1e75bf(0x214)]))==null?[]:_0x214e53,_0x2e5946=JSON[_0x1e75bf(0x22f)](_0x2795c2),_0x5a0e6c=_0x531ea6[_0x1e75bf(0x1e7)],_0x51de8f=_0x531ea6['id'],_0x5947e6={'memberId':(await this[_0x1e75bf(0x1ec)][_0x1e75bf(0x1a4)](_0x16cca5))[_0x1e75bf(0x1a3)](),'unitId':_0x16cca5,'threadId':_0x5a0e6c,'mention':_0x1a816c,'content':_0x2e5946,'replyId':_0x51de8f},_0xe257c6=await this[_0x1e75bf(0x20c)][_0x1e75bf(0x1f2)](_0x1e75bf(0x219)+_0x16cca5+_0x1e75bf(0x226),{'body':_0x5947e6});return!_0xe257c6[_0x1e75bf(0x19e)]['error']||_0xe257c6[_0x1e75bf(0x19e)]['error'][_0x1e75bf(0x217)]===0x1;}async['resolveComment'](_0x222e7d){const _0x374aa5=_0x5aafac;let {unitId:_0x3e864e}=_0x222e7d,_0x46a5c7=_0x222e7d[_0x374aa5(0x1e7)],_0xf1b550={'memberId':this[_0x374aa5(0x1aa)][_0x374aa5(0x1c9)]()[_0x374aa5(0x210)],'unitId':_0x3e864e,'threadId':_0x46a5c7,'solved':_0x222e7d[_0x374aa5(0x1c3)]?_0x4ccfa7[_0x374aa5(0x1d8)][_0x374aa5(0x1b6)]:_0x4ccfa7[_0x374aa5(0x1d8)][_0x374aa5(0x1a5)]},_0x5b1052=await this['_httpService'][_0x374aa5(0x1f2)](_0x374aa5(0x219)+_0x3e864e+_0x374aa5(0x204),{'body':_0xf1b550});return!_0x5b1052[_0x374aa5(0x19e)][_0x374aa5(0x1a9)]||_0x5b1052['body']['error'][_0x374aa5(0x217)]===0x1;}async[_0x5aafac(0x1e5)](_0x1ca1cc,_0x402789,_0x14ae7c,_0x4e9e3a){const _0x934d18=_0x5aafac;let _0x3130f7={'memberId':(await this[_0x934d18(0x1ec)][_0x934d18(0x1a4)](_0x1ca1cc))[_0x934d18(0x1a3)](),'threadId':_0x14ae7c,'replyId':_0x4e9e3a,'unitId':_0x1ca1cc},_0x9f22fb=await this[_0x934d18(0x20c)]['post']('/universer-api/comment/unit/'+_0x1ca1cc+_0x934d18(0x22a),{'body':_0x3130f7});return!_0x9f22fb[_0x934d18(0x19e)][_0x934d18(0x1a9)]||_0x9f22fb[_0x934d18(0x19e)][_0x934d18(0x1a9)][_0x934d18(0x217)]===0x1;}async[_0x5aafac(0x212)](_0x29b6fa,_0x33bb7b,_0x13231f){const _0x5c6967=_0x5aafac;let _0x37473f={'unitId':_0x29b6fa,'threadId':_0x13231f},_0x1f7824=await this[_0x5c6967(0x20c)][_0x5c6967(0x1f2)](_0x5c6967(0x219)+_0x29b6fa+_0x5c6967(0x1bc),{'body':_0x37473f}),_0x4ea29e=_0x13231f[_0x5c6967(0x1e0)](_0x2941a5=>_0x4652ca(_0x1f7824[_0x5c6967(0x19e)][_0x5c6967(0x1c6)][_0x2941a5],_0x29b6fa,_0x33bb7b))[_0x5c6967(0x215)](Boolean);return Object[_0x5c6967(0x1a2)](_0x1f7824[_0x5c6967(0x19e)][_0x5c6967(0x1fa)])['forEach'](_0x2282bd=>{const _0x51a836=_0x5c6967;this[_0x51a836(0x1aa)][_0x51a836(0x1e3)](_0x2282bd);}),_0x4ea29e;}[_0x5aafac(0x221)](_0x1dec62){const _0x2496cd=_0x5aafac;return{'id':_0x1dec62['id'],'threadId':_0x1dec62[_0x2496cd(0x1e7)],'ref':_0x1dec62[_0x2496cd(0x1ff)]};}};_0x6176b8=_0x4ff9cd([_0x2ac05e(0x0,(0x0,_0x4db30c[_0x5aafac(0x1bd)])(_0x5871da[_0x5aafac(0x1ce)])),_0x2ac05e(0x1,(0x0,_0x4db30c[_0x5aafac(0x1bd)])(_0x4db30c[_0x5aafac(0x225)])),_0x2ac05e(0x2,(0x0,_0x4db30c['Inject'])(_0x423dc9[_0x5aafac(0x1ca)]))],_0x6176b8);let _0xfb8416=class extends _0x4db30c[_0x5aafac(0x230)]{constructor(_0x6bc301,_0x13311d){const _0x19b9e6=_0x5aafac;super(),this[_0x19b9e6(0x22c)]=_0x6bc301,this[_0x19b9e6(0x1cb)]=_0x13311d,this[_0x19b9e6(0x1d3)]();}[_0x5aafac(0x1d3)](){const _0x38f6a6=_0x5aafac;this[_0x38f6a6(0x22c)][_0x38f6a6(0x207)]=this['_threadCommentDataSource'],this[_0x38f6a6(0x22c)][_0x38f6a6(0x1f5)]=!0x1;}};_0xfb8416=_0x4ff9cd([_0x2ac05e(0x0,_0x42cc70[_0x5aafac(0x229)]),_0x2ac05e(0x1,(0x0,_0x4db30c[_0x5aafac(0x1bd)])(_0x6176b8))],_0xfb8416);function _0x482533(_0xb20f9e){'@babel/helpers - typeof';const _0x571e42=_0x5aafac;return _0x482533=typeof Symbol==_0x571e42(0x1b2)&&typeof Symbol[_0x571e42(0x1fc)]==_0x571e42(0x21c)?function(_0x35245d){return typeof _0x35245d;}:function(_0x3693f0){const _0x4aaeef=_0x571e42;return _0x3693f0&&typeof Symbol==_0x4aaeef(0x1b2)&&_0x3693f0['constructor']===Symbol&&_0x3693f0!==Symbol[_0x4aaeef(0x1dd)]?'symbol':typeof _0x3693f0;},_0x482533(_0xb20f9e);}function _0x2dee82(_0x5d7de5,_0x846ebc){const _0x2b6858=_0x5aafac;if(_0x482533(_0x5d7de5)!=_0x2b6858(0x222)||!_0x5d7de5)return _0x5d7de5;var _0x4d075a=_0x5d7de5[Symbol['toPrimitive']];if(_0x4d075a!==void 0x0){var _0x440842=_0x4d075a[_0x2b6858(0x1cc)](_0x5d7de5,_0x846ebc||'default');if(_0x482533(_0x440842)!='object')return _0x440842;throw TypeError(_0x2b6858(0x205));}return(_0x846ebc===_0x2b6858(0x1ee)?String:Number)(_0x5d7de5);}function _0x1d9324(_0x39f493){const _0x3c3db3=_0x5aafac;var _0x5c17aa=_0x2dee82(_0x39f493,_0x3c3db3(0x1ee));return _0x482533(_0x5c17aa)==_0x3c3db3(0x21c)?_0x5c17aa:_0x5c17aa+'';}function _0x279a69(_0x42ea61,_0x310bda,_0x47974b){const _0x16f2ad=_0x5aafac;return(_0x310bda=_0x1d9324(_0x310bda))in _0x42ea61?Object[_0x16f2ad(0x1af)](_0x42ea61,_0x310bda,{'value':_0x47974b,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x42ea61[_0x310bda]=_0x47974b,_0x42ea61;}let _0x1ddf35=class extends _0x4db30c[_0x5aafac(0x1e6)]{constructor(_0xf88b33=_0x32a06f,_0x42a156,_0x5befa8){const _0x53dab0=_0x5aafac;super(),this[_0x53dab0(0x1b3)]=_0xf88b33,this['_injector']=_0x42a156,this[_0x53dab0(0x1a1)]=_0x5befa8;let {..._0x12ff40}=(0x0,_0x4db30c[_0x53dab0(0x21e)])({},_0x32a06f,this[_0x53dab0(0x1b3)]);this[_0x53dab0(0x1a1)]['setConfig']('thread-comment-data-source.config',_0x12ff40);}['onStarting'](){[[_0x6176b8],[_0xfb8416],[_0xf47c0e]]['forEach'](_0x14aaa5=>{const _0x3a4711=_0x2767;this[_0x3a4711(0x1ea)][_0x3a4711(0x1f0)](_0x14aaa5);});}[_0x5aafac(0x1c8)](){const _0x1418a3=_0x5aafac;this[_0x1418a3(0x1ea)][_0x1418a3(0x202)](_0xfb8416),this[_0x1418a3(0x1ea)][_0x1418a3(0x202)](_0xf47c0e);}};_0x279a69(_0x1ddf35,_0x5aafac(0x1ef),'UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'),_0x279a69(_0x1ddf35,'packageName',_0xc01b4e),_0x279a69(_0x1ddf35,'version',_0x2aacfc),_0x1ddf35=_0x4ff9cd([(0x0,_0x4db30c[_0x5aafac(0x1d6)])(_0x25e677[_0x5aafac(0x1de)],_0x423dc9[_0x5aafac(0x1ad)],_0x559654[_0x5aafac(0x1cf)]),_0x2ac05e(0x1,(0x0,_0x4db30c[_0x5aafac(0x1bd)])(_0x4db30c['Injector'])),_0x2ac05e(0x2,_0x4db30c[_0x5aafac(0x1a8)])],_0x1ddf35),Object[_0x5aafac(0x1af)](_0x392202,'UniverThreadCommentDataSourcePlugin',{'enumerable':!0x0,'get':function(){return _0x1ddf35;}});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0-insiders.20260608-e4336f7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Remote data source integration for Univer thread comments.",
|
|
6
6
|
"author": "DreamNum Co., Ltd. <developer@univer.ai>",
|
|
@@ -51,19 +51,19 @@
|
|
|
51
51
|
"rxjs": ">=7.0.0"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@univerjs-pro/license": "0.
|
|
55
|
-
"@univerjs-pro/collaboration-client": "0.
|
|
56
|
-
"@univerjs/network": "0.
|
|
57
|
-
"@univerjs/
|
|
58
|
-
"@univerjs/
|
|
59
|
-
"@univerjs/thread-comment-ui": "0.
|
|
60
|
-
"@univerjs/
|
|
54
|
+
"@univerjs-pro/license": "0.25.0-insiders.20260608-e4336f7",
|
|
55
|
+
"@univerjs-pro/collaboration-client": "0.25.0-insiders.20260608-e4336f7",
|
|
56
|
+
"@univerjs/network": "0.25.0-insiders.20260608-e4336f7",
|
|
57
|
+
"@univerjs/protocol": "0.25.0-insiders.20260608-e4336f7",
|
|
58
|
+
"@univerjs/thread-comment": "0.25.0-insiders.20260608-e4336f7",
|
|
59
|
+
"@univerjs/thread-comment-ui": "0.25.0-insiders.20260608-e4336f7",
|
|
60
|
+
"@univerjs/core": "0.25.0-insiders.20260608-e4336f7"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"rxjs": "7.8.2",
|
|
64
64
|
"typescript": "^6.0.3",
|
|
65
|
-
"vitest": "^4.1.
|
|
66
|
-
"@univerjs-infra/shared": "0.
|
|
65
|
+
"vitest": "^4.1.8",
|
|
66
|
+
"@univerjs-infra/shared": "0.25.0"
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|
|
69
69
|
"test": "vitest run",
|
|
File without changes
|