@univerjs-pro/thread-comment-datasource 0.24.0 → 0.25.0-insiders.20260604-29ebbff
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +10 -10
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 _0x218215=_0x548c;(function(_0x46cc39,_0xbbc5e){const _0x2dcd54=_0x548c,_0x2ff16a=_0x46cc39();while(!![]){try{const _0x27afc2=-parseInt(_0x2dcd54(0x112))/0x1+parseInt(_0x2dcd54(0x11d))/0x2+-parseInt(_0x2dcd54(0xf6))/0x3+parseInt(_0x2dcd54(0x106))/0x4*(-parseInt(_0x2dcd54(0xe1))/0x5)+-parseInt(_0x2dcd54(0x123))/0x6*(parseInt(_0x2dcd54(0x140))/0x7)+-parseInt(_0x2dcd54(0xc2))/0x8*(-parseInt(_0x2dcd54(0x11f))/0x9)+parseInt(_0x2dcd54(0x13b))/0xa;if(_0x27afc2===_0xbbc5e)break;else _0x2ff16a['push'](_0x2ff16a['shift']());}catch(_0x19793d){_0x2ff16a['push'](_0x2ff16a['shift']());}}}(_0x326d,0xd3a8d),Object[_0x218215(0x115)](exports,Symbol['toStringTag'],{'value':_0x218215(0x11a)}));function _0x326d(){const _0x1f08c1=['get','30lZVmtx','requireSession','parentId','_initUserSync','personId','deleteComment','filter','CommentUpdateEventType','code','reply','_initDataSource','object','onReady','Add','users','prototype','syncUpdateMutationToColla','comment','Solved','_threadCommentDataSource','decorate','_commentService','resolveComment','payload','35264130bttDNI','dataSource','ThreadCommentModel','Disposable','rangeType','1404179rjcqnW','YYYY/MM/DD\x20HH:mm','Solve','commentUpdate$','_threadCommentModel','forEach','IThreadCommentDataSourceService','UniverCollaborationClientPlugin','length','897632jmhEMr','/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','replies','OpenOrReOpen','userId','saveCommentToSnapshot','UserManagerService','threadId','getUnit','dateKit','Reply','Inject','ref','DependentOn','toPrimitive','map','find','getUser','getComment','iterator','merge','/solved','root','bufferTime','CustomRangeType','user','type','UniverThreadCommentUIPlugin','userID','unitId','5iJtbXG','getMemberID','HTTPService','_userService','size','function','customRanges','CommentService','comments','Injector','addComment','_httpService','listComments','pipe','string','_sessionService','createTimestamp','symbol','subscribe','version','@univerjs-pro/thread-comment-datasource','4119561pEsavh','COMMENT','slice','IConfigService','/reply','Delete','_threadCommentDataSourceService','0.25.0-insiders.20260604-29ebbff','disposeWithMe','/universer-api/comment/unit/','_init','Edit','delete','parse','default','call','925052pcQrrL','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','format','replyId','CommentSolvedStatus','content','solved','packageName','getOwnPropertyDescriptor','addUser','/add','post','357854YpzvsI','rangeId','body','defineProperty','/delete','add','constructor','error','Module','stringify','values','162850ThoGJd','_config','18eqdJbK','/edit','_injector'];_0x326d=function(){return _0x1f08c1;};return _0x326d();}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=_0x218215(0xf5),l=_0x218215(0xfd);const u=_0x313bc5=>(0x0,n[_0x218215(0xcc)])(new Date(+_0x313bc5))[_0x218215(0x108)](_0x218215(0xba)),d=async(_0x3e7555,_0x1a6824)=>{const _0x339da7=_0x218215;let _0x486325=_0x3e7555[_0x339da7(0x122)](n[_0x339da7(0xc9)]),_0x54a068=_0x3e7555[_0x339da7(0x122)](s[_0x339da7(0xe3)]);_0x1a6824[_0x339da7(0xbe)](_0x298af6=>{const _0x3693ce=_0x339da7;_0x486325[_0x3693ce(0xd4)](_0x298af6)&&_0x1a6824[_0x3693ce(0x102)](_0x298af6);}),_0x1a6824[_0x339da7(0xe5)]&&(await _0x54a068['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x1a6824]}}))['body']['users'][_0x339da7(0xbe)](_0x3cdeab=>{_0x3cdeab&&_0x486325['addUser'](_0x3cdeab);});};function f(_0x280c7b,_0x127eab){return function(_0x4bd211,_0x539558){_0x127eab(_0x4bd211,_0x539558,_0x280c7b);};}function p(_0x451fcc,_0x237e8c,_0x34d087,_0x4b7ef6){const _0xeab5cc=_0x218215;var _0x4e7f03=arguments[_0xeab5cc(0xc1)],_0x1798ca=_0x4e7f03<0x3?_0x237e8c:_0x4b7ef6===null?_0x4b7ef6=Object[_0xeab5cc(0x10e)](_0x237e8c,_0x34d087):_0x4b7ef6,_0x3987a7;if(typeof Reflect==_0xeab5cc(0x12e)&&typeof Reflect['decorate']==_0xeab5cc(0xe6))_0x1798ca=Reflect[_0xeab5cc(0x137)](_0x451fcc,_0x237e8c,_0x34d087,_0x4b7ef6);else{for(var _0x3a87d0=_0x451fcc['length']-0x1;_0x3a87d0>=0x0;_0x3a87d0--)(_0x3987a7=_0x451fcc[_0x3a87d0])&&(_0x1798ca=(_0x4e7f03<0x3?_0x3987a7(_0x1798ca):_0x4e7f03>0x3?_0x3987a7(_0x237e8c,_0x34d087,_0x1798ca):_0x3987a7(_0x237e8c,_0x34d087))||_0x1798ca);}return _0x4e7f03>0x3&&_0x1798ca&&Object[_0xeab5cc(0x115)](_0x237e8c,_0x34d087,_0x1798ca),_0x1798ca;}function _0x548c(_0x5cbe42,_0x1c21d9){_0x5cbe42=_0x5cbe42-0xba;const _0x326db6=_0x326d();let _0x548ce5=_0x326db6[_0x5cbe42];return _0x548ce5;}let m=class extends n[_0x218215(0x13e)]{constructor(_0x37e0b8,_0x19f545,_0x4f4b43,_0x53d751){const _0x420cce=_0x218215;super(),this[_0x420cce(0x138)]=_0x37e0b8,this[_0x420cce(0xbd)]=_0x19f545,this[_0x420cce(0xe4)]=_0x4f4b43,this[_0x420cce(0x121)]=_0x53d751,this[_0x420cce(0x100)](),this['_initUserSync']();}[_0x218215(0x126)](){const _0x4a388f=_0x218215;this[_0x4a388f(0xfe)](this[_0x4a388f(0xbd)][_0x4a388f(0xbc)][_0x4a388f(0xee)]((0x0,o[_0x4a388f(0xda)])(0x10))[_0x4a388f(0xf3)](_0x3e9b47=>{const _0x3aee72=_0x4a388f;let _0x46746e=new Set();_0x3e9b47['forEach'](_0x41f528=>{const _0x3afc9b=_0x548c;switch(_0x41f528[_0x3afc9b(0xdd)]){case _0x3afc9b(0x117):{let _0x504932=_0x41f528[_0x3afc9b(0x13a)][_0x3afc9b(0x127)];_0x46746e[_0x3afc9b(0x117)](_0x504932);break;}default:break;}}),d(this[_0x3aee72(0x121)],_0x46746e);}));}[_0x218215(0x100)](){const _0x1a8e5a=_0x218215;this['disposeWithMe'](this[_0x1a8e5a(0x138)]['commentUpdate$'][_0x1a8e5a(0xf3)](async _0x365967=>{const _0x695be7=_0x1a8e5a;var _0x5c1bf;let _0xee5ff5=(_0x5c1bf=this[_0x695be7(0xbd)][_0x695be7(0xcb)](_0x365967[_0x695be7(0xe0)])[_0x695be7(0xd3)](_0x388b53=>_0x388b53['threadId']===_0x365967['threadId']))==null?void 0x0:_0x5c1bf[_0x695be7(0xd9)];if(!_0xee5ff5)return;let {unitId:_0x337913,subUnitId:_0x4bbdec}=_0xee5ff5;switch(_0x365967[_0x695be7(0xdc)]&&this[_0x695be7(0xe4)][_0x695be7(0x10f)](_0x365967[_0x695be7(0xdc)]),_0x365967[_0x695be7(0xdd)]){case i[_0x695be7(0x12a)][_0x695be7(0x130)]:break;case i[_0x695be7(0x12a)][_0x695be7(0xcd)]:var _0x1f3280,_0x1c6816;this[_0x695be7(0xbd)][_0x695be7(0xeb)](_0x337913,_0x4bbdec,{'unitId':_0x337913,'subUnitId':_0x4bbdec,'ref':'','id':_0x365967['replyId'],'dT':u(+_0x365967[_0x695be7(0xf1)]),'threadId':_0x365967[_0x695be7(0xca)],'personId':(_0x1f3280=(_0x1c6816=_0x365967[_0x695be7(0xdc)])==null?void 0x0:_0x1c6816[_0x695be7(0xdf)])==null?_0x365967[_0x695be7(0xc7)]:_0x1f3280,'text':JSON[_0x695be7(0x103)](_0x365967[_0x695be7(0x10b)]),'parentId':_0xee5ff5['id']});break;case i['CommentUpdateEventType'][_0x695be7(0xfb)]:{let _0x5ed7ac=this[_0x695be7(0xbd)][_0x695be7(0xd5)](_0x337913,_0x4bbdec,_0x365967[_0x695be7(0x109)]);_0x5ed7ac&&_0x5ed7ac[_0x695be7(0x125)]&&this[_0x695be7(0xbd)][_0x695be7(0x128)](_0x337913,_0x4bbdec,_0x365967[_0x695be7(0x109)]);break;}case i[_0x695be7(0x12a)][_0x695be7(0x101)]:this[_0x695be7(0xbd)]['updateComment'](_0x337913,_0x4bbdec,{'commentId':_0x365967[_0x695be7(0x109)],'text':JSON[_0x695be7(0x103)](_0x365967['content'])});break;case i[_0x695be7(0x12a)][_0x695be7(0xbb)]:{var _0x1b7008;let _0xf61a2=(_0x1b7008=this[_0x695be7(0xbd)]['getUnit'](_0x365967[_0x695be7(0xe0)])[_0x695be7(0xd3)](_0x53cdd0=>_0x53cdd0[_0x695be7(0xca)]===_0x365967[_0x695be7(0xca)]))==null?void 0x0:_0x1b7008[_0x695be7(0xd9)];_0xf61a2&&this[_0x695be7(0xbd)][_0x695be7(0x139)](_0x337913,_0x4bbdec,_0xf61a2['id'],_0x365967[_0x695be7(0x10c)]===i[_0x695be7(0x10a)]['Solved']);break;}default:break;}}));}};m=p([f(0x0,(0x0,n['Inject'])(e[_0x218215(0xe8)])),f(0x1,(0x0,n[_0x218215(0xce)])(a[_0x218215(0x13d)])),f(0x2,(0x0,n[_0x218215(0xce)])(n['UserManagerService'])),f(0x3,(0x0,n[_0x218215(0xce)])(n[_0x218215(0xea)]))],m);const h={};function g(_0x4f4b46,_0x373256){const _0x389303=_0x218215;let _0x12d227=_0x4f4b46[_0x389303(0xc5)][0x0];return{..._0x373256,'id':_0x12d227[_0x389303(0x109)],'resolved':_0x4f4b46['solved']===0x1,'dT':u(_0x12d227[_0x389303(0xf1)]),'personId':_0x12d227[_0x389303(0xc7)],'threadId':_0x12d227[_0x389303(0xca)]};}function _(_0x20222a,_0xcdb1ad,_0xeaaaa4){const _0x55a25a=_0x218215;var _0x2e5307,_0x53bb45;if(((_0x2e5307=_0x20222a==null||(_0x53bb45=_0x20222a[_0x55a25a(0xc5)])==null?void 0x0:_0x53bb45['length'])==null?0x0:_0x2e5307)>0x0){let _0x5a8e81=(_0x4db59d,_0x41ce8b)=>({'id':_0x4db59d[_0x55a25a(0x109)],'threadId':_0x4db59d['threadId'],'dT':u(_0x4db59d[_0x55a25a(0xf1)]),'personId':_0x4db59d['userId'],'resolved':_0x20222a['solved']===i[_0x55a25a(0x10a)][_0x55a25a(0x135)],'unitId':_0xcdb1ad,'subUnitId':_0xeaaaa4,'text':JSON[_0x55a25a(0x103)](_0x4db59d[_0x55a25a(0x10b)]),'parentId':_0x41ce8b}),_0xd444af=_0x5a8e81(_0x20222a[_0x55a25a(0xc5)][0x0]);return{..._0xd444af,'children':_0x20222a[_0x55a25a(0xc5)][_0x55a25a(0xf8)](0x1)[_0x55a25a(0xd2)](_0x36a11d=>_0x5a8e81(_0x36a11d,_0xd444af['id']))};}return null;}let v=class{constructor(_0x563357,_0x16c507,_0x491a66){const _0x27da70=_0x218215;this[_0x27da70(0xec)]=_0x563357,this[_0x27da70(0xe4)]=_0x16c507,this[_0x27da70(0xf0)]=_0x491a66;}async[_0x218215(0xeb)](_0x3e3ffc){const _0xf59e4f=_0x218215;var _0xb04540,_0x31fd9f;let {parentId:_0x462add,unitId:_0x1d226c,text:_0x22135f,threadId:_0x5ac19d}=_0x3e3ffc,_0x390729=(_0xb04540=(_0x31fd9f=_0x22135f['customRanges'])==null?void 0x0:_0x31fd9f[_0xf59e4f(0x129)](_0x13ab27=>_0x13ab27['rangeType']===n[_0xf59e4f(0xdb)][_0xf59e4f(0xf7)])[_0xf59e4f(0xd2)](_0x5a93aa=>_0x5a93aa[_0xf59e4f(0x113)]))==null?[]:_0xb04540,_0xf2f410=JSON['stringify'](_0x22135f),_0x49e132=(await this[_0xf59e4f(0xf0)][_0xf59e4f(0x124)](_0x1d226c))[_0xf59e4f(0xe2)]();if(_0x462add){let _0x59e24e={'memberId':_0x49e132,'unitId':_0x1d226c,'content':_0xf2f410,'mention':_0x390729,'threadId':_0x5ac19d},_0x491ada=(await this[_0xf59e4f(0xec)][_0xf59e4f(0x111)]('/universer-api/comment/unit/'+_0x1d226c+_0xf59e4f(0xfa),{'body':_0x59e24e}))[_0xf59e4f(0x114)][_0xf59e4f(0x12c)];return{..._0x3e3ffc,'id':_0x491ada[_0xf59e4f(0x109)],'dT':(0x0,n['dateKit'])(+_0x491ada[_0xf59e4f(0xf1)])[_0xf59e4f(0x108)](_0xf59e4f(0xba)),'personId':_0x491ada[_0xf59e4f(0xc7)]};}else{let _0x105ea6={'memberId':_0x49e132,'unitId':_0x1d226c,'content':_0xf2f410,'mention':_0x390729};return g((await this[_0xf59e4f(0xec)][_0xf59e4f(0x111)]('/universer-api/comment/unit/'+_0x1d226c+_0xf59e4f(0x110),{'body':_0x105ea6}))[_0xf59e4f(0x114)][_0xf59e4f(0x134)],_0x3e3ffc);}}async['updateComment'](_0x1d3952){const _0x3cb9e8=_0x218215;var _0x23c396,_0xd33be7;let {text:_0x171b33,unitId:_0x76641}=_0x1d3952,_0x3ba426=(_0x23c396=(_0xd33be7=_0x171b33[_0x3cb9e8(0xe7)])==null?void 0x0:_0xd33be7[_0x3cb9e8(0x129)](_0x3f8b92=>_0x3f8b92[_0x3cb9e8(0x13f)]===n[_0x3cb9e8(0xdb)][_0x3cb9e8(0xf7)])[_0x3cb9e8(0xd2)](_0x59797e=>_0x59797e['rangeId']))==null?[]:_0x23c396,_0x5706ea=JSON[_0x3cb9e8(0x11b)](_0x171b33),_0x5b1a35=_0x1d3952[_0x3cb9e8(0xca)],_0x4536b7=_0x1d3952['id'],_0x38b559={'memberId':(await this[_0x3cb9e8(0xf0)][_0x3cb9e8(0x124)](_0x76641))['getMemberID'](),'unitId':_0x76641,'threadId':_0x5b1a35,'mention':_0x3ba426,'content':_0x5706ea,'replyId':_0x4536b7},_0x2371b3=await this[_0x3cb9e8(0xec)][_0x3cb9e8(0x111)](_0x3cb9e8(0xff)+_0x76641+_0x3cb9e8(0x120),{'body':_0x38b559});return!_0x2371b3['body']['error']||_0x2371b3[_0x3cb9e8(0x114)][_0x3cb9e8(0x119)][_0x3cb9e8(0x12b)]===0x1;}async[_0x218215(0x139)](_0x32cf84){const _0x4ac6d4=_0x218215;let {unitId:_0x433d97}=_0x32cf84,_0x48a14d=_0x32cf84['threadId'],_0x1ed26d={'memberId':this[_0x4ac6d4(0xe4)]['getCurrentUser']()[_0x4ac6d4(0xdf)],'unitId':_0x433d97,'threadId':_0x48a14d,'solved':_0x32cf84['resolved']?i[_0x4ac6d4(0x10a)][_0x4ac6d4(0x135)]:i[_0x4ac6d4(0x10a)][_0x4ac6d4(0xc6)]},_0x1eeea8=await this[_0x4ac6d4(0xec)][_0x4ac6d4(0x111)]('/universer-api/comment/unit/'+_0x433d97+_0x4ac6d4(0xd8),{'body':_0x1ed26d});return!_0x1eeea8[_0x4ac6d4(0x114)][_0x4ac6d4(0x119)]||_0x1eeea8[_0x4ac6d4(0x114)][_0x4ac6d4(0x119)][_0x4ac6d4(0x12b)]===0x1;}async[_0x218215(0x128)](_0x42e93a,_0x319e51,_0x345102,_0x579fb9){const _0x31d4d1=_0x218215;let _0x48067b={'memberId':(await this[_0x31d4d1(0xf0)][_0x31d4d1(0x124)](_0x42e93a))[_0x31d4d1(0xe2)](),'threadId':_0x345102,'replyId':_0x579fb9,'unitId':_0x42e93a},_0x175178=await this['_httpService'][_0x31d4d1(0x111)](_0x31d4d1(0xff)+_0x42e93a+_0x31d4d1(0x116),{'body':_0x48067b});return!_0x175178[_0x31d4d1(0x114)][_0x31d4d1(0x119)]||_0x175178[_0x31d4d1(0x114)]['error'][_0x31d4d1(0x12b)]===0x1;}async[_0x218215(0xed)](_0x4b3fa5,_0x53af99,_0x8e7873){const _0x23567a=_0x218215;let _0xe6ddbe={'unitId':_0x4b3fa5,'threadId':_0x8e7873},_0xdf8d2b=await this['_httpService'][_0x23567a(0x111)]('/universer-api/comment/unit/'+_0x4b3fa5+_0x23567a(0xc3),{'body':_0xe6ddbe}),_0x40bdc2=_0x8e7873[_0x23567a(0xd2)](_0x50fa7e=>_(_0xdf8d2b[_0x23567a(0x114)][_0x23567a(0xe9)][_0x50fa7e],_0x4b3fa5,_0x53af99))[_0x23567a(0x129)](Boolean);return Object[_0x23567a(0x11c)](_0xdf8d2b['body'][_0x23567a(0x131)])[_0x23567a(0xbe)](_0x50fe73=>{const _0x4e08c7=_0x23567a;this[_0x4e08c7(0xe4)][_0x4e08c7(0x10f)](_0x50fe73);}),_0x40bdc2;}[_0x218215(0xc8)](_0x304527){const _0x30fffc=_0x218215;return{'id':_0x304527['id'],'threadId':_0x304527['threadId'],'ref':_0x304527[_0x30fffc(0xcf)]};}};v=p([f(0x0,(0x0,n[_0x218215(0xce)])(s[_0x218215(0xe3)])),f(0x1,(0x0,n[_0x218215(0xce)])(n[_0x218215(0xc9)])),f(0x2,(0x0,n['Inject'])(e['CollaborationSessionService']))],v);let y=class extends n[_0x218215(0x13e)]{constructor(_0x2f6e78,_0x5607bf){const _0x28b317=_0x218215;super(),this[_0x28b317(0xfc)]=_0x2f6e78,this[_0x28b317(0x136)]=_0x5607bf,this['_initDataSource']();}[_0x218215(0x12d)](){const _0x1214d7=_0x218215;this[_0x1214d7(0xfc)][_0x1214d7(0x13c)]=this[_0x1214d7(0x136)],this['_threadCommentDataSourceService'][_0x1214d7(0x133)]=!0x1;}};y=p([f(0x0,a[_0x218215(0xbf)]),f(0x1,(0x0,n[_0x218215(0xce)])(v))],y);function b(_0x53082a){'@babel/helpers - typeof';const _0x29a00f=_0x218215;return b=typeof Symbol=='function'&&typeof Symbol[_0x29a00f(0xd6)]==_0x29a00f(0xf2)?function(_0x23d736){return typeof _0x23d736;}:function(_0x519c2a){const _0x2b206a=_0x29a00f;return _0x519c2a&&typeof Symbol==_0x2b206a(0xe6)&&_0x519c2a[_0x2b206a(0x118)]===Symbol&&_0x519c2a!==Symbol[_0x2b206a(0x132)]?_0x2b206a(0xf2):typeof _0x519c2a;},b(_0x53082a);}function x(_0x40c9d6,_0x25715a){const _0x813b3=_0x218215;if(b(_0x40c9d6)!=_0x813b3(0x12e)||!_0x40c9d6)return _0x40c9d6;var _0x51d8ef=_0x40c9d6[Symbol[_0x813b3(0xd1)]];if(_0x51d8ef!==void 0x0){var _0x39b4a5=_0x51d8ef[_0x813b3(0x105)](_0x40c9d6,_0x25715a||_0x813b3(0x104));if(b(_0x39b4a5)!=_0x813b3(0x12e))return _0x39b4a5;throw TypeError(_0x813b3(0x107));}return(_0x25715a===_0x813b3(0xef)?String:Number)(_0x40c9d6);}function S(_0x135b7a){const _0x12bc3d=_0x218215;var _0x206f31=x(_0x135b7a,_0x12bc3d(0xef));return b(_0x206f31)==_0x12bc3d(0xf2)?_0x206f31:_0x206f31+'';}function C(_0x5f3364,_0x164103,_0x58843d){const _0x4310bf=_0x218215;return(_0x164103=S(_0x164103))in _0x5f3364?Object[_0x4310bf(0x115)](_0x5f3364,_0x164103,{'value':_0x58843d,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x5f3364[_0x164103]=_0x58843d,_0x5f3364;}let w=class extends n['Plugin']{constructor(_0x3b06ec=h,_0x2bdb87,_0x3b2f4b){const _0xc92aba=_0x218215;super(),this[_0xc92aba(0x11e)]=_0x3b06ec,this[_0xc92aba(0x121)]=_0x2bdb87,this['_configService']=_0x3b2f4b;let {..._0xb14e97}=(0x0,n[_0xc92aba(0xd7)])({},h,this[_0xc92aba(0x11e)]);this['_configService']['setConfig']('thread-comment-data-source.config',_0xb14e97);}['onStarting'](){const _0xd3d0bc=_0x218215;[[v],[y],[m]][_0xd3d0bc(0xbe)](_0x49d4d3=>{const _0x341a85=_0xd3d0bc;this[_0x341a85(0x121)][_0x341a85(0x117)](_0x49d4d3);});}[_0x218215(0x12f)](){const _0x5d3248=_0x218215;this[_0x5d3248(0x121)][_0x5d3248(0x122)](y),this[_0x5d3248(0x121)][_0x5d3248(0x122)](m);}};C(w,'pluginName',_0x218215(0xc4)),C(w,_0x218215(0x10d),c),C(w,_0x218215(0xf4),l),w=p([(0x0,n[_0x218215(0xd0)])(r[_0x218215(0xde)],e[_0x218215(0xc0)],t['UniverLicensePlugin']),f(0x1,(0x0,n[_0x218215(0xce)])(n[_0x218215(0xea)])),f(0x2,n[_0x218215(0xf9)])],w),Object[_0x218215(0x115)](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 _0x49b3ba=_0x1797;(function(_0x5ecf5b,_0x56fe29){const _0x463e2b=_0x1797,_0x46dc85=_0x5ecf5b();while(!![]){try{const _0x1cc47f=parseInt(_0x463e2b(0x172))/0x1+-parseInt(_0x463e2b(0x197))/0x2*(-parseInt(_0x463e2b(0x156))/0x3)+-parseInt(_0x463e2b(0x151))/0x4+parseInt(_0x463e2b(0x14f))/0x5*(parseInt(_0x463e2b(0x187))/0x6)+-parseInt(_0x463e2b(0x174))/0x7+parseInt(_0x463e2b(0x19c))/0x8+parseInt(_0x463e2b(0x1a7))/0x9*(-parseInt(_0x463e2b(0x171))/0xa);if(_0x1cc47f===_0x56fe29)break;else _0x46dc85['push'](_0x46dc85['shift']());}catch(_0x188eac){_0x46dc85['push'](_0x46dc85['shift']());}}}(_0x29d3,0x7ab84));import{CollaborationSessionService as _0x5e09f1,CommentService as _0x11f8b2,UniverCollaborationClientPlugin as _0x2c4122}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4b9957}from'@univerjs-pro/license';import{CustomRangeType as _0x2f082f,DependentOn as _0x420215,Disposable as _0xbd5c00,IConfigService as _0x573bbb,Inject as _0x407dcc,Injector as _0x227748,Plugin as _0x25f057,UserManagerService as _0x25bd2a,dateKit as _0x226a5b,merge as _0x35f3c8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xf4347b}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x11072b,CommentUpdateEventType as _0x2c9ca5}from'@univerjs/protocol';import{IThreadCommentDataSourceService as _0x2c0770,ThreadCommentModel as _0x560b6d}from'@univerjs/thread-comment';import{bufferTime as _0x6034e9}from'rxjs';function _0x1797(_0x57af2b,_0x467ab6){_0x57af2b=_0x57af2b-0x13b;const _0x29d3f4=_0x29d3();let _0x1797f7=_0x29d3f4[_0x57af2b];return _0x1797f7;}import{HTTPService as _0x99c345}from'@univerjs/network';var x=_0x49b3ba(0x189),S=_0x49b3ba(0x199);const C=_0x413018=>_0x226a5b(new Date(+_0x413018))[_0x49b3ba(0x169)](_0x49b3ba(0x198)),w=async(_0x5ecf75,_0x35e6a0)=>{const _0x3fec68=_0x49b3ba;let _0x49e5b8=_0x5ecf75[_0x3fec68(0x17b)](_0x25bd2a),_0x29beb5=_0x5ecf75[_0x3fec68(0x17b)](_0x99c345);_0x35e6a0[_0x3fec68(0x15a)](_0x32faa0=>{_0x49e5b8['getUser'](_0x32faa0)&&_0x35e6a0['delete'](_0x32faa0);}),_0x35e6a0[_0x3fec68(0x19d)]&&(await _0x29beb5[_0x3fec68(0x17b)](_0x3fec68(0x1a4),{'params':{'userIDs':[..._0x35e6a0]}}))[_0x3fec68(0x152)]['users'][_0x3fec68(0x15a)](_0x4a6521=>{const _0x5a7502=_0x3fec68;_0x4a6521&&_0x49e5b8[_0x5a7502(0x19b)](_0x4a6521);});};function T(_0x206e85,_0x455dca){return function(_0x3141fd,_0x578e48){_0x455dca(_0x3141fd,_0x578e48,_0x206e85);};}function E(_0x57ef89,_0x2c5a1f,_0x40119e,_0x1cd679){const _0x38dd30=_0x49b3ba;var _0x578b49=arguments[_0x38dd30(0x173)],_0x2a2603=_0x578b49<0x3?_0x2c5a1f:_0x1cd679===null?_0x1cd679=Object[_0x38dd30(0x1a3)](_0x2c5a1f,_0x40119e):_0x1cd679,_0x404cad;if(typeof Reflect=='object'&&typeof Reflect[_0x38dd30(0x157)]==_0x38dd30(0x16d))_0x2a2603=Reflect[_0x38dd30(0x157)](_0x57ef89,_0x2c5a1f,_0x40119e,_0x1cd679);else{for(var _0x1eaee5=_0x57ef89[_0x38dd30(0x173)]-0x1;_0x1eaee5>=0x0;_0x1eaee5--)(_0x404cad=_0x57ef89[_0x1eaee5])&&(_0x2a2603=(_0x578b49<0x3?_0x404cad(_0x2a2603):_0x578b49>0x3?_0x404cad(_0x2c5a1f,_0x40119e,_0x2a2603):_0x404cad(_0x2c5a1f,_0x40119e))||_0x2a2603);}return _0x578b49>0x3&&_0x2a2603&&Object[_0x38dd30(0x184)](_0x2c5a1f,_0x40119e,_0x2a2603),_0x2a2603;}let D=class extends _0xbd5c00{constructor(_0x8eaf37,_0x3c5477,_0x3fa884,_0x311160){const _0x4c9e61=_0x49b3ba;super(),this[_0x4c9e61(0x159)]=_0x8eaf37,this[_0x4c9e61(0x19a)]=_0x3c5477,this['_userService']=_0x3fa884,this[_0x4c9e61(0x145)]=_0x311160,this[_0x4c9e61(0x18a)](),this[_0x4c9e61(0x191)]();}[_0x49b3ba(0x191)](){const _0x4274f7=_0x49b3ba;this[_0x4274f7(0x17c)](this[_0x4274f7(0x19a)][_0x4274f7(0x16a)][_0x4274f7(0x13d)](_0x6034e9(0x10))['subscribe'](_0x167bd1=>{const _0x15a6e8=_0x4274f7;let _0x4c4015=new Set();_0x167bd1[_0x15a6e8(0x15a)](_0x1af150=>{const _0x271e98=_0x15a6e8;switch(_0x1af150[_0x271e98(0x17f)]){case _0x271e98(0x158):{let _0x2f0ff1=_0x1af150[_0x271e98(0x1a6)]['personId'];_0x4c4015[_0x271e98(0x158)](_0x2f0ff1);break;}default:break;}}),w(this[_0x15a6e8(0x145)],_0x4c4015);}));}[_0x49b3ba(0x18a)](){const _0x528803=_0x49b3ba;this[_0x528803(0x17c)](this[_0x528803(0x159)][_0x528803(0x16a)][_0x528803(0x1a5)](async _0x333f92=>{const _0xb428f6=_0x528803;var _0x2f3de5;let _0x603595=(_0x2f3de5=this[_0xb428f6(0x19a)][_0xb428f6(0x160)](_0x333f92[_0xb428f6(0x18c)])[_0xb428f6(0x180)](_0x3e8144=>_0x3e8144[_0xb428f6(0x183)]===_0x333f92[_0xb428f6(0x183)]))==null?void 0x0:_0x2f3de5['root'];if(!_0x603595)return;let {unitId:_0x32242d,subUnitId:_0x2a7a50}=_0x603595;switch(_0x333f92[_0xb428f6(0x154)]&&this[_0xb428f6(0x14a)]['addUser'](_0x333f92[_0xb428f6(0x154)]),_0x333f92['type']){case _0x2c9ca5[_0xb428f6(0x18d)]:break;case _0x2c9ca5[_0xb428f6(0x17d)]:var _0x5a2d1d,_0x51cdad;this[_0xb428f6(0x19a)][_0xb428f6(0x182)](_0x32242d,_0x2a7a50,{'unitId':_0x32242d,'subUnitId':_0x2a7a50,'ref':'','id':_0x333f92[_0xb428f6(0x170)],'dT':C(+_0x333f92[_0xb428f6(0x149)]),'threadId':_0x333f92[_0xb428f6(0x183)],'personId':(_0x5a2d1d=(_0x51cdad=_0x333f92[_0xb428f6(0x154)])==null?void 0x0:_0x51cdad[_0xb428f6(0x142)])==null?_0x333f92[_0xb428f6(0x165)]:_0x5a2d1d,'text':JSON['parse'](_0x333f92[_0xb428f6(0x16f)]),'parentId':_0x603595['id']});break;case _0x2c9ca5['Delete']:{let _0x566449=this[_0xb428f6(0x19a)][_0xb428f6(0x17e)](_0x32242d,_0x2a7a50,_0x333f92['replyId']);_0x566449&&_0x566449['parentId']&&this[_0xb428f6(0x19a)]['deleteComment'](_0x32242d,_0x2a7a50,_0x333f92[_0xb428f6(0x170)]);break;}case _0x2c9ca5[_0xb428f6(0x167)]:this[_0xb428f6(0x19a)]['updateComment'](_0x32242d,_0x2a7a50,{'commentId':_0x333f92[_0xb428f6(0x170)],'text':JSON['parse'](_0x333f92[_0xb428f6(0x16f)])});break;case _0x2c9ca5[_0xb428f6(0x14d)]:{var _0x19fd7c;let _0x286aeb=(_0x19fd7c=this[_0xb428f6(0x19a)][_0xb428f6(0x160)](_0x333f92['unitId'])[_0xb428f6(0x180)](_0x31a9be=>_0x31a9be[_0xb428f6(0x183)]===_0x333f92['threadId']))==null?void 0x0:_0x19fd7c[_0xb428f6(0x177)];_0x286aeb&&this['_threadCommentModel'][_0xb428f6(0x161)](_0x32242d,_0x2a7a50,_0x286aeb['id'],_0x333f92['solved']===_0x11072b['Solved']);break;}default:break;}}));}};D=E([T(0x0,_0x407dcc(_0x11f8b2)),T(0x1,_0x407dcc(_0x560b6d)),T(0x2,_0x407dcc(_0x25bd2a)),T(0x3,_0x407dcc(_0x227748))],D);const O={};function k(_0xfb869d,_0x514d43){const _0x1d7853=_0x49b3ba;let _0x83fc6d=_0xfb869d[_0x1d7853(0x141)][0x0];return{..._0x514d43,'id':_0x83fc6d[_0x1d7853(0x170)],'resolved':_0xfb869d[_0x1d7853(0x190)]===0x1,'dT':C(_0x83fc6d[_0x1d7853(0x149)]),'personId':_0x83fc6d[_0x1d7853(0x165)],'threadId':_0x83fc6d[_0x1d7853(0x183)]};}function A(_0x1e0246,_0x391b5d,_0x4e7498){const _0x5a454d=_0x49b3ba;var _0x58bbb2,_0x57712f;if(((_0x58bbb2=_0x1e0246==null||(_0x57712f=_0x1e0246['replies'])==null?void 0x0:_0x57712f['length'])==null?0x0:_0x58bbb2)>0x0){let _0x2233bf=(_0x2b7d00,_0x1a9e4a)=>({'id':_0x2b7d00['replyId'],'threadId':_0x2b7d00[_0x5a454d(0x183)],'dT':C(_0x2b7d00[_0x5a454d(0x149)]),'personId':_0x2b7d00[_0x5a454d(0x165)],'resolved':_0x1e0246[_0x5a454d(0x190)]===_0x11072b[_0x5a454d(0x195)],'unitId':_0x391b5d,'subUnitId':_0x4e7498,'text':JSON['parse'](_0x2b7d00[_0x5a454d(0x16f)]),'parentId':_0x1a9e4a}),_0x36207e=_0x2233bf(_0x1e0246[_0x5a454d(0x141)][0x0]);return{..._0x36207e,'children':_0x1e0246[_0x5a454d(0x141)][_0x5a454d(0x144)](0x1)[_0x5a454d(0x15d)](_0xc12cbf=>_0x2233bf(_0xc12cbf,_0x36207e['id']))};}return null;}let j=class{constructor(_0x2310b6,_0x53d106,_0x35872b){const _0x53e74d=_0x49b3ba;this['_httpService']=_0x2310b6,this[_0x53e74d(0x14a)]=_0x53d106,this[_0x53e74d(0x164)]=_0x35872b;}async[_0x49b3ba(0x182)](_0x50e31f){const _0x456cb4=_0x49b3ba;var _0x350fce,_0x5c9f70;let {parentId:_0xef717f,unitId:_0x3c2508,text:_0x441c05,threadId:_0x5ec408}=_0x50e31f,_0x2660e4=(_0x350fce=(_0x5c9f70=_0x441c05[_0x456cb4(0x16b)])==null?void 0x0:_0x5c9f70[_0x456cb4(0x153)](_0x48806d=>_0x48806d['rangeType']===_0x2f082f[_0x456cb4(0x13c)])[_0x456cb4(0x15d)](_0x4561b7=>_0x4561b7['rangeId']))==null?[]:_0x350fce,_0x3f6279=JSON['stringify'](_0x441c05),_0x31c571=(await this[_0x456cb4(0x164)][_0x456cb4(0x15f)](_0x3c2508))[_0x456cb4(0x140)]();if(_0xef717f){let _0x5ad91f={'memberId':_0x31c571,'unitId':_0x3c2508,'content':_0x3f6279,'mention':_0x2660e4,'threadId':_0x5ec408},_0xbdf394=(await this['_httpService']['post'](_0x456cb4(0x148)+_0x3c2508+_0x456cb4(0x1a0),{'body':_0x5ad91f}))[_0x456cb4(0x152)][_0x456cb4(0x168)];return{..._0x50e31f,'id':_0xbdf394['replyId'],'dT':_0x226a5b(+_0xbdf394[_0x456cb4(0x149)])['format'](_0x456cb4(0x198)),'personId':_0xbdf394[_0x456cb4(0x165)]};}else{let _0x5d2639={'memberId':_0x31c571,'unitId':_0x3c2508,'content':_0x3f6279,'mention':_0x2660e4};return k((await this[_0x456cb4(0x178)][_0x456cb4(0x14e)]('/universer-api/comment/unit/'+_0x3c2508+'/add',{'body':_0x5d2639}))[_0x456cb4(0x152)]['comment'],_0x50e31f);}}async[_0x49b3ba(0x16c)](_0x35945b){const _0xa4eb93=_0x49b3ba;var _0x145576,_0x2938cb;let {text:_0x2bd60c,unitId:_0x25f370}=_0x35945b,_0x1b12e7=(_0x145576=(_0x2938cb=_0x2bd60c['customRanges'])==null?void 0x0:_0x2938cb['filter'](_0x23d7c2=>_0x23d7c2['rangeType']===_0x2f082f[_0xa4eb93(0x13c)])[_0xa4eb93(0x15d)](_0x40c7c5=>_0x40c7c5['rangeId']))==null?[]:_0x145576,_0x2be56a=JSON['stringify'](_0x2bd60c),_0xcff108=_0x35945b[_0xa4eb93(0x183)],_0x697275=_0x35945b['id'],_0x58b107={'memberId':(await this[_0xa4eb93(0x164)][_0xa4eb93(0x15f)](_0x25f370))[_0xa4eb93(0x140)](),'unitId':_0x25f370,'threadId':_0xcff108,'mention':_0x1b12e7,'content':_0x2be56a,'replyId':_0x697275},_0x46319e=await this[_0xa4eb93(0x178)][_0xa4eb93(0x14e)](_0xa4eb93(0x148)+_0x25f370+_0xa4eb93(0x19f),{'body':_0x58b107});return!_0x46319e[_0xa4eb93(0x152)]['error']||_0x46319e[_0xa4eb93(0x152)][_0xa4eb93(0x192)][_0xa4eb93(0x175)]===0x1;}async['resolveComment'](_0x2d90f4){const _0x1fc3ef=_0x49b3ba;let {unitId:_0x2ddc9c}=_0x2d90f4,_0x331ee1=_0x2d90f4[_0x1fc3ef(0x183)],_0x2a5a4d={'memberId':this[_0x1fc3ef(0x14a)][_0x1fc3ef(0x19e)]()[_0x1fc3ef(0x142)],'unitId':_0x2ddc9c,'threadId':_0x331ee1,'solved':_0x2d90f4[_0x1fc3ef(0x150)]?_0x11072b[_0x1fc3ef(0x195)]:_0x11072b[_0x1fc3ef(0x194)]},_0x5134f8=await this[_0x1fc3ef(0x178)][_0x1fc3ef(0x14e)](_0x1fc3ef(0x148)+_0x2ddc9c+'/solved',{'body':_0x2a5a4d});return!_0x5134f8['body'][_0x1fc3ef(0x192)]||_0x5134f8[_0x1fc3ef(0x152)][_0x1fc3ef(0x192)][_0x1fc3ef(0x175)]===0x1;}async[_0x49b3ba(0x166)](_0x256e6c,_0x5309d0,_0x57723d,_0x4d1e01){const _0x4eceb2=_0x49b3ba;let _0x3b387c={'memberId':(await this['_sessionService'][_0x4eceb2(0x15f)](_0x256e6c))[_0x4eceb2(0x140)](),'threadId':_0x57723d,'replyId':_0x4d1e01,'unitId':_0x256e6c},_0x1fc2b6=await this[_0x4eceb2(0x178)]['post'](_0x4eceb2(0x148)+_0x256e6c+'/delete',{'body':_0x3b387c});return!_0x1fc2b6['body']['error']||_0x1fc2b6[_0x4eceb2(0x152)][_0x4eceb2(0x192)][_0x4eceb2(0x175)]===0x1;}async[_0x49b3ba(0x15b)](_0xf537ac,_0x1b1606,_0x3d5061){const _0x330614=_0x49b3ba;let _0x4b1f1f={'unitId':_0xf537ac,'threadId':_0x3d5061},_0x31befd=await this[_0x330614(0x178)][_0x330614(0x14e)](_0x330614(0x148)+_0xf537ac+'/list',{'body':_0x4b1f1f}),_0x115dbe=_0x3d5061[_0x330614(0x15d)](_0xe7b30c=>A(_0x31befd[_0x330614(0x152)][_0x330614(0x15c)][_0xe7b30c],_0xf537ac,_0x1b1606))[_0x330614(0x153)](Boolean);return Object[_0x330614(0x193)](_0x31befd[_0x330614(0x152)][_0x330614(0x13b)])[_0x330614(0x15a)](_0x578a21=>{const _0x7a0046=_0x330614;this[_0x7a0046(0x14a)][_0x7a0046(0x19b)](_0x578a21);}),_0x115dbe;}[_0x49b3ba(0x14c)](_0x3cb3cc){const _0x5564d0=_0x49b3ba;return{'id':_0x3cb3cc['id'],'threadId':_0x3cb3cc['threadId'],'ref':_0x3cb3cc[_0x5564d0(0x188)]};}};function _0x29d3(){const _0x2ff6f8=['Add','constructor','onReady','solved','_initUserSync','error','values','OpenOrReOpen','Solved','syncUpdateMutationToColla','1881412AuzYwF','YYYY/MM/DD\x20HH:mm','0.25.0-insiders.20260604-29ebbff','_threadCommentModel','addUser','294568LRmvSR','size','getCurrentUser','/edit','/reply','prototype','object','getOwnPropertyDescriptor','/universer-api/user/list','subscribe','payload','704034tEGZUz','users','COMMENT','pipe','version','thread-comment-data-source.config','getMemberID','replies','userID','dataSource','slice','_injector','toPrimitive','symbol','/universer-api/comment/unit/','createTimestamp','_userService','_threadCommentDataSource','saveCommentToSnapshot','Solve','post','22235oyUlOn','resolved','1180896jpqDvJ','body','filter','user','_configService','3klHIWh','decorate','add','_commentService','forEach','listComments','comments','map','string','requireSession','getUnit','resolveComment','setConfig','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_sessionService','userId','deleteComment','Edit','reply','format','commentUpdate$','customRanges','updateComment','function','packageName','content','replyId','90gMHDso','379778BJTJIH','length','544159QxcgVt','code','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','root','_httpService','iterator','_config','get','disposeWithMe','Reply','getComment','type','find','_threadCommentDataSourceService','addComment','threadId','defineProperty','onStarting','default','300IRcLei','ref','@univerjs-pro/thread-comment-datasource','_init','_initDataSource','unitId'];_0x29d3=function(){return _0x2ff6f8;};return _0x29d3();}j=E([T(0x0,_0x407dcc(_0x99c345)),T(0x1,_0x407dcc(_0x25bd2a)),T(0x2,_0x407dcc(_0x5e09f1))],j);let M=class extends _0xbd5c00{constructor(_0x20a5b2,_0x2ddc42){const _0x2d52ad=_0x49b3ba;super(),this['_threadCommentDataSourceService']=_0x20a5b2,this['_threadCommentDataSource']=_0x2ddc42,this[_0x2d52ad(0x18b)]();}['_initDataSource'](){const _0x202b91=_0x49b3ba;this[_0x202b91(0x181)][_0x202b91(0x143)]=this[_0x202b91(0x14b)],this[_0x202b91(0x181)][_0x202b91(0x196)]=!0x1;}};M=E([T(0x0,_0x2c0770),T(0x1,_0x407dcc(j))],M);function N(_0x25608a){'@babel/helpers - typeof';const _0x199370=_0x49b3ba;return N=typeof Symbol==_0x199370(0x16d)&&typeof Symbol[_0x199370(0x179)]==_0x199370(0x147)?function(_0x56eeaf){return typeof _0x56eeaf;}:function(_0x26d6f9){const _0xb2f8a3=_0x199370;return _0x26d6f9&&typeof Symbol=='function'&&_0x26d6f9[_0xb2f8a3(0x18e)]===Symbol&&_0x26d6f9!==Symbol[_0xb2f8a3(0x1a1)]?_0xb2f8a3(0x147):typeof _0x26d6f9;},N(_0x25608a);}function P(_0xccde0e,_0x516893){const _0x4e68e2=_0x49b3ba;if(N(_0xccde0e)!=_0x4e68e2(0x1a2)||!_0xccde0e)return _0xccde0e;var _0x1844ed=_0xccde0e[Symbol[_0x4e68e2(0x146)]];if(_0x1844ed!==void 0x0){var _0x16c046=_0x1844ed['call'](_0xccde0e,_0x516893||_0x4e68e2(0x186));if(N(_0x16c046)!=_0x4e68e2(0x1a2))return _0x16c046;throw TypeError(_0x4e68e2(0x163));}return(_0x516893==='string'?String:Number)(_0xccde0e);}function F(_0x206959){const _0x5a9fbd=_0x49b3ba;var _0x2fb467=P(_0x206959,_0x5a9fbd(0x15e));return N(_0x2fb467)=='symbol'?_0x2fb467:_0x2fb467+'';}function I(_0x573b7e,_0x28d4d8,_0x43b792){const _0x333738=_0x49b3ba;return(_0x28d4d8=F(_0x28d4d8))in _0x573b7e?Object[_0x333738(0x184)](_0x573b7e,_0x28d4d8,{'value':_0x43b792,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x573b7e[_0x28d4d8]=_0x43b792,_0x573b7e;}let L=class extends _0x25f057{constructor(_0x49b08d=O,_0x54c8dd,_0x46eb65){const _0x5b1502=_0x49b3ba;super(),this['_config']=_0x49b08d,this['_injector']=_0x54c8dd,this['_configService']=_0x46eb65;let {..._0x198896}=_0x35f3c8({},O,this[_0x5b1502(0x17a)]);this[_0x5b1502(0x155)][_0x5b1502(0x162)](_0x5b1502(0x13f),_0x198896);}[_0x49b3ba(0x185)](){const _0x316a9c=_0x49b3ba;[[j],[M],[D]][_0x316a9c(0x15a)](_0x56a6e7=>{const _0x4632ac=_0x316a9c;this[_0x4632ac(0x145)]['add'](_0x56a6e7);});}[_0x49b3ba(0x18f)](){const _0x52560=_0x49b3ba;this[_0x52560(0x145)][_0x52560(0x17b)](M),this['_injector'][_0x52560(0x17b)](D);}};I(L,'pluginName',_0x49b3ba(0x176)),I(L,_0x49b3ba(0x16e),x),I(L,_0x49b3ba(0x13e),S),L=E([_0x420215(_0xf4347b,_0x2c4122,_0x4b9957),T(0x1,_0x407dcc(_0x227748)),T(0x2,_0x573bbb)],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 _0x49b3ba=_0x1797;(function(_0x5ecf5b,_0x56fe29){const _0x463e2b=_0x1797,_0x46dc85=_0x5ecf5b();while(!![]){try{const _0x1cc47f=parseInt(_0x463e2b(0x172))/0x1+-parseInt(_0x463e2b(0x197))/0x2*(-parseInt(_0x463e2b(0x156))/0x3)+-parseInt(_0x463e2b(0x151))/0x4+parseInt(_0x463e2b(0x14f))/0x5*(parseInt(_0x463e2b(0x187))/0x6)+-parseInt(_0x463e2b(0x174))/0x7+parseInt(_0x463e2b(0x19c))/0x8+parseInt(_0x463e2b(0x1a7))/0x9*(-parseInt(_0x463e2b(0x171))/0xa);if(_0x1cc47f===_0x56fe29)break;else _0x46dc85['push'](_0x46dc85['shift']());}catch(_0x188eac){_0x46dc85['push'](_0x46dc85['shift']());}}}(_0x29d3,0x7ab84));import{CollaborationSessionService as _0x5e09f1,CommentService as _0x11f8b2,UniverCollaborationClientPlugin as _0x2c4122}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4b9957}from'@univerjs-pro/license';import{CustomRangeType as _0x2f082f,DependentOn as _0x420215,Disposable as _0xbd5c00,IConfigService as _0x573bbb,Inject as _0x407dcc,Injector as _0x227748,Plugin as _0x25f057,UserManagerService as _0x25bd2a,dateKit as _0x226a5b,merge as _0x35f3c8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xf4347b}from'@univerjs/thread-comment-ui';import{CommentSolvedStatus as _0x11072b,CommentUpdateEventType as _0x2c9ca5}from'@univerjs/protocol';import{IThreadCommentDataSourceService as _0x2c0770,ThreadCommentModel as _0x560b6d}from'@univerjs/thread-comment';import{bufferTime as _0x6034e9}from'rxjs';function _0x1797(_0x57af2b,_0x467ab6){_0x57af2b=_0x57af2b-0x13b;const _0x29d3f4=_0x29d3();let _0x1797f7=_0x29d3f4[_0x57af2b];return _0x1797f7;}import{HTTPService as _0x99c345}from'@univerjs/network';var x=_0x49b3ba(0x189),S=_0x49b3ba(0x199);const C=_0x413018=>_0x226a5b(new Date(+_0x413018))[_0x49b3ba(0x169)](_0x49b3ba(0x198)),w=async(_0x5ecf75,_0x35e6a0)=>{const _0x3fec68=_0x49b3ba;let _0x49e5b8=_0x5ecf75[_0x3fec68(0x17b)](_0x25bd2a),_0x29beb5=_0x5ecf75[_0x3fec68(0x17b)](_0x99c345);_0x35e6a0[_0x3fec68(0x15a)](_0x32faa0=>{_0x49e5b8['getUser'](_0x32faa0)&&_0x35e6a0['delete'](_0x32faa0);}),_0x35e6a0[_0x3fec68(0x19d)]&&(await _0x29beb5[_0x3fec68(0x17b)](_0x3fec68(0x1a4),{'params':{'userIDs':[..._0x35e6a0]}}))[_0x3fec68(0x152)]['users'][_0x3fec68(0x15a)](_0x4a6521=>{const _0x5a7502=_0x3fec68;_0x4a6521&&_0x49e5b8[_0x5a7502(0x19b)](_0x4a6521);});};function T(_0x206e85,_0x455dca){return function(_0x3141fd,_0x578e48){_0x455dca(_0x3141fd,_0x578e48,_0x206e85);};}function E(_0x57ef89,_0x2c5a1f,_0x40119e,_0x1cd679){const _0x38dd30=_0x49b3ba;var _0x578b49=arguments[_0x38dd30(0x173)],_0x2a2603=_0x578b49<0x3?_0x2c5a1f:_0x1cd679===null?_0x1cd679=Object[_0x38dd30(0x1a3)](_0x2c5a1f,_0x40119e):_0x1cd679,_0x404cad;if(typeof Reflect=='object'&&typeof Reflect[_0x38dd30(0x157)]==_0x38dd30(0x16d))_0x2a2603=Reflect[_0x38dd30(0x157)](_0x57ef89,_0x2c5a1f,_0x40119e,_0x1cd679);else{for(var _0x1eaee5=_0x57ef89[_0x38dd30(0x173)]-0x1;_0x1eaee5>=0x0;_0x1eaee5--)(_0x404cad=_0x57ef89[_0x1eaee5])&&(_0x2a2603=(_0x578b49<0x3?_0x404cad(_0x2a2603):_0x578b49>0x3?_0x404cad(_0x2c5a1f,_0x40119e,_0x2a2603):_0x404cad(_0x2c5a1f,_0x40119e))||_0x2a2603);}return _0x578b49>0x3&&_0x2a2603&&Object[_0x38dd30(0x184)](_0x2c5a1f,_0x40119e,_0x2a2603),_0x2a2603;}let D=class extends _0xbd5c00{constructor(_0x8eaf37,_0x3c5477,_0x3fa884,_0x311160){const _0x4c9e61=_0x49b3ba;super(),this[_0x4c9e61(0x159)]=_0x8eaf37,this[_0x4c9e61(0x19a)]=_0x3c5477,this['_userService']=_0x3fa884,this[_0x4c9e61(0x145)]=_0x311160,this[_0x4c9e61(0x18a)](),this[_0x4c9e61(0x191)]();}[_0x49b3ba(0x191)](){const _0x4274f7=_0x49b3ba;this[_0x4274f7(0x17c)](this[_0x4274f7(0x19a)][_0x4274f7(0x16a)][_0x4274f7(0x13d)](_0x6034e9(0x10))['subscribe'](_0x167bd1=>{const _0x15a6e8=_0x4274f7;let _0x4c4015=new Set();_0x167bd1[_0x15a6e8(0x15a)](_0x1af150=>{const _0x271e98=_0x15a6e8;switch(_0x1af150[_0x271e98(0x17f)]){case _0x271e98(0x158):{let _0x2f0ff1=_0x1af150[_0x271e98(0x1a6)]['personId'];_0x4c4015[_0x271e98(0x158)](_0x2f0ff1);break;}default:break;}}),w(this[_0x15a6e8(0x145)],_0x4c4015);}));}[_0x49b3ba(0x18a)](){const _0x528803=_0x49b3ba;this[_0x528803(0x17c)](this[_0x528803(0x159)][_0x528803(0x16a)][_0x528803(0x1a5)](async _0x333f92=>{const _0xb428f6=_0x528803;var _0x2f3de5;let _0x603595=(_0x2f3de5=this[_0xb428f6(0x19a)][_0xb428f6(0x160)](_0x333f92[_0xb428f6(0x18c)])[_0xb428f6(0x180)](_0x3e8144=>_0x3e8144[_0xb428f6(0x183)]===_0x333f92[_0xb428f6(0x183)]))==null?void 0x0:_0x2f3de5['root'];if(!_0x603595)return;let {unitId:_0x32242d,subUnitId:_0x2a7a50}=_0x603595;switch(_0x333f92[_0xb428f6(0x154)]&&this[_0xb428f6(0x14a)]['addUser'](_0x333f92[_0xb428f6(0x154)]),_0x333f92['type']){case _0x2c9ca5[_0xb428f6(0x18d)]:break;case _0x2c9ca5[_0xb428f6(0x17d)]:var _0x5a2d1d,_0x51cdad;this[_0xb428f6(0x19a)][_0xb428f6(0x182)](_0x32242d,_0x2a7a50,{'unitId':_0x32242d,'subUnitId':_0x2a7a50,'ref':'','id':_0x333f92[_0xb428f6(0x170)],'dT':C(+_0x333f92[_0xb428f6(0x149)]),'threadId':_0x333f92[_0xb428f6(0x183)],'personId':(_0x5a2d1d=(_0x51cdad=_0x333f92[_0xb428f6(0x154)])==null?void 0x0:_0x51cdad[_0xb428f6(0x142)])==null?_0x333f92[_0xb428f6(0x165)]:_0x5a2d1d,'text':JSON['parse'](_0x333f92[_0xb428f6(0x16f)]),'parentId':_0x603595['id']});break;case _0x2c9ca5['Delete']:{let _0x566449=this[_0xb428f6(0x19a)][_0xb428f6(0x17e)](_0x32242d,_0x2a7a50,_0x333f92['replyId']);_0x566449&&_0x566449['parentId']&&this[_0xb428f6(0x19a)]['deleteComment'](_0x32242d,_0x2a7a50,_0x333f92[_0xb428f6(0x170)]);break;}case _0x2c9ca5[_0xb428f6(0x167)]:this[_0xb428f6(0x19a)]['updateComment'](_0x32242d,_0x2a7a50,{'commentId':_0x333f92[_0xb428f6(0x170)],'text':JSON['parse'](_0x333f92[_0xb428f6(0x16f)])});break;case _0x2c9ca5[_0xb428f6(0x14d)]:{var _0x19fd7c;let _0x286aeb=(_0x19fd7c=this[_0xb428f6(0x19a)][_0xb428f6(0x160)](_0x333f92['unitId'])[_0xb428f6(0x180)](_0x31a9be=>_0x31a9be[_0xb428f6(0x183)]===_0x333f92['threadId']))==null?void 0x0:_0x19fd7c[_0xb428f6(0x177)];_0x286aeb&&this['_threadCommentModel'][_0xb428f6(0x161)](_0x32242d,_0x2a7a50,_0x286aeb['id'],_0x333f92['solved']===_0x11072b['Solved']);break;}default:break;}}));}};D=E([T(0x0,_0x407dcc(_0x11f8b2)),T(0x1,_0x407dcc(_0x560b6d)),T(0x2,_0x407dcc(_0x25bd2a)),T(0x3,_0x407dcc(_0x227748))],D);const O={};function k(_0xfb869d,_0x514d43){const _0x1d7853=_0x49b3ba;let _0x83fc6d=_0xfb869d[_0x1d7853(0x141)][0x0];return{..._0x514d43,'id':_0x83fc6d[_0x1d7853(0x170)],'resolved':_0xfb869d[_0x1d7853(0x190)]===0x1,'dT':C(_0x83fc6d[_0x1d7853(0x149)]),'personId':_0x83fc6d[_0x1d7853(0x165)],'threadId':_0x83fc6d[_0x1d7853(0x183)]};}function A(_0x1e0246,_0x391b5d,_0x4e7498){const _0x5a454d=_0x49b3ba;var _0x58bbb2,_0x57712f;if(((_0x58bbb2=_0x1e0246==null||(_0x57712f=_0x1e0246['replies'])==null?void 0x0:_0x57712f['length'])==null?0x0:_0x58bbb2)>0x0){let _0x2233bf=(_0x2b7d00,_0x1a9e4a)=>({'id':_0x2b7d00['replyId'],'threadId':_0x2b7d00[_0x5a454d(0x183)],'dT':C(_0x2b7d00[_0x5a454d(0x149)]),'personId':_0x2b7d00[_0x5a454d(0x165)],'resolved':_0x1e0246[_0x5a454d(0x190)]===_0x11072b[_0x5a454d(0x195)],'unitId':_0x391b5d,'subUnitId':_0x4e7498,'text':JSON['parse'](_0x2b7d00[_0x5a454d(0x16f)]),'parentId':_0x1a9e4a}),_0x36207e=_0x2233bf(_0x1e0246[_0x5a454d(0x141)][0x0]);return{..._0x36207e,'children':_0x1e0246[_0x5a454d(0x141)][_0x5a454d(0x144)](0x1)[_0x5a454d(0x15d)](_0xc12cbf=>_0x2233bf(_0xc12cbf,_0x36207e['id']))};}return null;}let j=class{constructor(_0x2310b6,_0x53d106,_0x35872b){const _0x53e74d=_0x49b3ba;this['_httpService']=_0x2310b6,this[_0x53e74d(0x14a)]=_0x53d106,this[_0x53e74d(0x164)]=_0x35872b;}async[_0x49b3ba(0x182)](_0x50e31f){const _0x456cb4=_0x49b3ba;var _0x350fce,_0x5c9f70;let {parentId:_0xef717f,unitId:_0x3c2508,text:_0x441c05,threadId:_0x5ec408}=_0x50e31f,_0x2660e4=(_0x350fce=(_0x5c9f70=_0x441c05[_0x456cb4(0x16b)])==null?void 0x0:_0x5c9f70[_0x456cb4(0x153)](_0x48806d=>_0x48806d['rangeType']===_0x2f082f[_0x456cb4(0x13c)])[_0x456cb4(0x15d)](_0x4561b7=>_0x4561b7['rangeId']))==null?[]:_0x350fce,_0x3f6279=JSON['stringify'](_0x441c05),_0x31c571=(await this[_0x456cb4(0x164)][_0x456cb4(0x15f)](_0x3c2508))[_0x456cb4(0x140)]();if(_0xef717f){let _0x5ad91f={'memberId':_0x31c571,'unitId':_0x3c2508,'content':_0x3f6279,'mention':_0x2660e4,'threadId':_0x5ec408},_0xbdf394=(await this['_httpService']['post'](_0x456cb4(0x148)+_0x3c2508+_0x456cb4(0x1a0),{'body':_0x5ad91f}))[_0x456cb4(0x152)][_0x456cb4(0x168)];return{..._0x50e31f,'id':_0xbdf394['replyId'],'dT':_0x226a5b(+_0xbdf394[_0x456cb4(0x149)])['format'](_0x456cb4(0x198)),'personId':_0xbdf394[_0x456cb4(0x165)]};}else{let _0x5d2639={'memberId':_0x31c571,'unitId':_0x3c2508,'content':_0x3f6279,'mention':_0x2660e4};return k((await this[_0x456cb4(0x178)][_0x456cb4(0x14e)]('/universer-api/comment/unit/'+_0x3c2508+'/add',{'body':_0x5d2639}))[_0x456cb4(0x152)]['comment'],_0x50e31f);}}async[_0x49b3ba(0x16c)](_0x35945b){const _0xa4eb93=_0x49b3ba;var _0x145576,_0x2938cb;let {text:_0x2bd60c,unitId:_0x25f370}=_0x35945b,_0x1b12e7=(_0x145576=(_0x2938cb=_0x2bd60c['customRanges'])==null?void 0x0:_0x2938cb['filter'](_0x23d7c2=>_0x23d7c2['rangeType']===_0x2f082f[_0xa4eb93(0x13c)])[_0xa4eb93(0x15d)](_0x40c7c5=>_0x40c7c5['rangeId']))==null?[]:_0x145576,_0x2be56a=JSON['stringify'](_0x2bd60c),_0xcff108=_0x35945b[_0xa4eb93(0x183)],_0x697275=_0x35945b['id'],_0x58b107={'memberId':(await this[_0xa4eb93(0x164)][_0xa4eb93(0x15f)](_0x25f370))[_0xa4eb93(0x140)](),'unitId':_0x25f370,'threadId':_0xcff108,'mention':_0x1b12e7,'content':_0x2be56a,'replyId':_0x697275},_0x46319e=await this[_0xa4eb93(0x178)][_0xa4eb93(0x14e)](_0xa4eb93(0x148)+_0x25f370+_0xa4eb93(0x19f),{'body':_0x58b107});return!_0x46319e[_0xa4eb93(0x152)]['error']||_0x46319e[_0xa4eb93(0x152)][_0xa4eb93(0x192)][_0xa4eb93(0x175)]===0x1;}async['resolveComment'](_0x2d90f4){const _0x1fc3ef=_0x49b3ba;let {unitId:_0x2ddc9c}=_0x2d90f4,_0x331ee1=_0x2d90f4[_0x1fc3ef(0x183)],_0x2a5a4d={'memberId':this[_0x1fc3ef(0x14a)][_0x1fc3ef(0x19e)]()[_0x1fc3ef(0x142)],'unitId':_0x2ddc9c,'threadId':_0x331ee1,'solved':_0x2d90f4[_0x1fc3ef(0x150)]?_0x11072b[_0x1fc3ef(0x195)]:_0x11072b[_0x1fc3ef(0x194)]},_0x5134f8=await this[_0x1fc3ef(0x178)][_0x1fc3ef(0x14e)](_0x1fc3ef(0x148)+_0x2ddc9c+'/solved',{'body':_0x2a5a4d});return!_0x5134f8['body'][_0x1fc3ef(0x192)]||_0x5134f8[_0x1fc3ef(0x152)][_0x1fc3ef(0x192)][_0x1fc3ef(0x175)]===0x1;}async[_0x49b3ba(0x166)](_0x256e6c,_0x5309d0,_0x57723d,_0x4d1e01){const _0x4eceb2=_0x49b3ba;let _0x3b387c={'memberId':(await this['_sessionService'][_0x4eceb2(0x15f)](_0x256e6c))[_0x4eceb2(0x140)](),'threadId':_0x57723d,'replyId':_0x4d1e01,'unitId':_0x256e6c},_0x1fc2b6=await this[_0x4eceb2(0x178)]['post'](_0x4eceb2(0x148)+_0x256e6c+'/delete',{'body':_0x3b387c});return!_0x1fc2b6['body']['error']||_0x1fc2b6[_0x4eceb2(0x152)][_0x4eceb2(0x192)][_0x4eceb2(0x175)]===0x1;}async[_0x49b3ba(0x15b)](_0xf537ac,_0x1b1606,_0x3d5061){const _0x330614=_0x49b3ba;let _0x4b1f1f={'unitId':_0xf537ac,'threadId':_0x3d5061},_0x31befd=await this[_0x330614(0x178)][_0x330614(0x14e)](_0x330614(0x148)+_0xf537ac+'/list',{'body':_0x4b1f1f}),_0x115dbe=_0x3d5061[_0x330614(0x15d)](_0xe7b30c=>A(_0x31befd[_0x330614(0x152)][_0x330614(0x15c)][_0xe7b30c],_0xf537ac,_0x1b1606))[_0x330614(0x153)](Boolean);return Object[_0x330614(0x193)](_0x31befd[_0x330614(0x152)][_0x330614(0x13b)])[_0x330614(0x15a)](_0x578a21=>{const _0x7a0046=_0x330614;this[_0x7a0046(0x14a)][_0x7a0046(0x19b)](_0x578a21);}),_0x115dbe;}[_0x49b3ba(0x14c)](_0x3cb3cc){const _0x5564d0=_0x49b3ba;return{'id':_0x3cb3cc['id'],'threadId':_0x3cb3cc['threadId'],'ref':_0x3cb3cc[_0x5564d0(0x188)]};}};function _0x29d3(){const _0x2ff6f8=['Add','constructor','onReady','solved','_initUserSync','error','values','OpenOrReOpen','Solved','syncUpdateMutationToColla','1881412AuzYwF','YYYY/MM/DD\x20HH:mm','0.25.0-insiders.20260604-29ebbff','_threadCommentModel','addUser','294568LRmvSR','size','getCurrentUser','/edit','/reply','prototype','object','getOwnPropertyDescriptor','/universer-api/user/list','subscribe','payload','704034tEGZUz','users','COMMENT','pipe','version','thread-comment-data-source.config','getMemberID','replies','userID','dataSource','slice','_injector','toPrimitive','symbol','/universer-api/comment/unit/','createTimestamp','_userService','_threadCommentDataSource','saveCommentToSnapshot','Solve','post','22235oyUlOn','resolved','1180896jpqDvJ','body','filter','user','_configService','3klHIWh','decorate','add','_commentService','forEach','listComments','comments','map','string','requireSession','getUnit','resolveComment','setConfig','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_sessionService','userId','deleteComment','Edit','reply','format','commentUpdate$','customRanges','updateComment','function','packageName','content','replyId','90gMHDso','379778BJTJIH','length','544159QxcgVt','code','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','root','_httpService','iterator','_config','get','disposeWithMe','Reply','getComment','type','find','_threadCommentDataSourceService','addComment','threadId','defineProperty','onStarting','default','300IRcLei','ref','@univerjs-pro/thread-comment-datasource','_init','_initDataSource','unitId'];_0x29d3=function(){return _0x2ff6f8;};return _0x29d3();}j=E([T(0x0,_0x407dcc(_0x99c345)),T(0x1,_0x407dcc(_0x25bd2a)),T(0x2,_0x407dcc(_0x5e09f1))],j);let M=class extends _0xbd5c00{constructor(_0x20a5b2,_0x2ddc42){const _0x2d52ad=_0x49b3ba;super(),this['_threadCommentDataSourceService']=_0x20a5b2,this['_threadCommentDataSource']=_0x2ddc42,this[_0x2d52ad(0x18b)]();}['_initDataSource'](){const _0x202b91=_0x49b3ba;this[_0x202b91(0x181)][_0x202b91(0x143)]=this[_0x202b91(0x14b)],this[_0x202b91(0x181)][_0x202b91(0x196)]=!0x1;}};M=E([T(0x0,_0x2c0770),T(0x1,_0x407dcc(j))],M);function N(_0x25608a){'@babel/helpers - typeof';const _0x199370=_0x49b3ba;return N=typeof Symbol==_0x199370(0x16d)&&typeof Symbol[_0x199370(0x179)]==_0x199370(0x147)?function(_0x56eeaf){return typeof _0x56eeaf;}:function(_0x26d6f9){const _0xb2f8a3=_0x199370;return _0x26d6f9&&typeof Symbol=='function'&&_0x26d6f9[_0xb2f8a3(0x18e)]===Symbol&&_0x26d6f9!==Symbol[_0xb2f8a3(0x1a1)]?_0xb2f8a3(0x147):typeof _0x26d6f9;},N(_0x25608a);}function P(_0xccde0e,_0x516893){const _0x4e68e2=_0x49b3ba;if(N(_0xccde0e)!=_0x4e68e2(0x1a2)||!_0xccde0e)return _0xccde0e;var _0x1844ed=_0xccde0e[Symbol[_0x4e68e2(0x146)]];if(_0x1844ed!==void 0x0){var _0x16c046=_0x1844ed['call'](_0xccde0e,_0x516893||_0x4e68e2(0x186));if(N(_0x16c046)!=_0x4e68e2(0x1a2))return _0x16c046;throw TypeError(_0x4e68e2(0x163));}return(_0x516893==='string'?String:Number)(_0xccde0e);}function F(_0x206959){const _0x5a9fbd=_0x49b3ba;var _0x2fb467=P(_0x206959,_0x5a9fbd(0x15e));return N(_0x2fb467)=='symbol'?_0x2fb467:_0x2fb467+'';}function I(_0x573b7e,_0x28d4d8,_0x43b792){const _0x333738=_0x49b3ba;return(_0x28d4d8=F(_0x28d4d8))in _0x573b7e?Object[_0x333738(0x184)](_0x573b7e,_0x28d4d8,{'value':_0x43b792,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x573b7e[_0x28d4d8]=_0x43b792,_0x573b7e;}let L=class extends _0x25f057{constructor(_0x49b08d=O,_0x54c8dd,_0x46eb65){const _0x5b1502=_0x49b3ba;super(),this['_config']=_0x49b08d,this['_injector']=_0x54c8dd,this['_configService']=_0x46eb65;let {..._0x198896}=_0x35f3c8({},O,this[_0x5b1502(0x17a)]);this[_0x5b1502(0x155)][_0x5b1502(0x162)](_0x5b1502(0x13f),_0x198896);}[_0x49b3ba(0x185)](){const _0x316a9c=_0x49b3ba;[[j],[M],[D]][_0x316a9c(0x15a)](_0x56a6e7=>{const _0x4632ac=_0x316a9c;this[_0x4632ac(0x145)]['add'](_0x56a6e7);});}[_0x49b3ba(0x18f)](){const _0x52560=_0x49b3ba;this[_0x52560(0x145)][_0x52560(0x17b)](M),this['_injector'][_0x52560(0x17b)](D);}};I(L,'pluginName',_0x49b3ba(0x176)),I(L,_0x49b3ba(0x16e),x),I(L,_0x49b3ba(0x13e),S),L=E([_0x420215(_0xf4347b,_0x2c4122,_0x4b9957),T(0x1,_0x407dcc(_0x227748)),T(0x2,_0x573bbb)],L);export{L as UniverThreadCommentDataSourcePlugin};
|
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 _0x42a6(_0x1f9698,_0x5dd30b){_0x1f9698=_0x1f9698-0xb5;const _0x3983f8=_0x3983();let _0x42a638=_0x3983f8[_0x1f9698];return _0x42a638;}function _0x3983(){const _0x197283=['values','type','UserManagerService','dataSource','_configService','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','1731006mwQicN','UniverThreadComment','pluginName','_httpService','find','CollaborationSessionService','string','5530110frYjJD','399025uPHQHE','prototype','_sessionService','@univerjs/protocol','104sYvBnu','/reply','merge','IThreadCommentDataSourceService','Plugin','Inject','61377inIrQJ','_threadCommentDataSource','resolveComment','error','UniverProCollaborationClient','addUser','CommentService','444NJkHVT','filter','CustomRangeType','_userService','pipe','object','defineProperty','Solved','version','commentUpdate$','users','syncUpdateMutationToColla','UniverCollaborationClientPlugin','resolved','3087014Ioaguy','@univerjs/thread-comment','threadId','_init','getUnit','call','/delete','/list','forEach','createTimestamp','Edit','root','49108aHDtkT','size','426FCSvJv','/add','body','rxjs','payload','toStringTag','thread-comment-data-source.config','replies','map','content','disposeWithMe','_initUserSync','post','reply','Injector','COMMENT','function','amd','/solved','format','setConfig','symbol','length','82495uxgeNW','user','@univerjs-pro/license','parentId','code','stringify','@univerjs-pro/collaboration-client','_config','ThreadCommentModel','unitId','solved','_injector','CommentUpdateEventType','updateComment','Reply','slice','24gucrPZ','rangeId','YYYY/MM/DD\x20HH:mm','get','add','UniverThreadCommentUi','deleteComment','DependentOn','subscribe','@univerjs/core','addComment','_commentService','parse','getMemberID','HTTPService','_threadCommentDataSourceService','bufferTime','/universer-api/comment/unit/','dateKit','_threadCommentModel','CommentSolvedStatus','toPrimitive','rangeType','12spGHCH','listComments','userId','IConfigService','UniverThreadCommentDataSourcePlugin','@univerjs/thread-comment-ui','Disposable','0.25.0-insiders.20260604-29ebbff','_initDataSource','requireSession','UniverLicensePlugin','UniverProLicense','decorate','OpenOrReOpen','UniverProThreadCommentDatasource','/universer-api/user/list','ref','replyId'];_0x3983=function(){return _0x197283;};return _0x3983();}(function(_0x3d1acc,_0x1b5a02){const _0x31b1b4=_0x42a6,_0x5dc243=_0x3d1acc();while(!![]){try{const _0x589347=parseInt(_0x31b1b4(0xfa))/0x1*(parseInt(_0x31b1b4(0xba))/0x2)+-parseInt(_0x31b1b4(0x124))/0x3*(parseInt(_0x31b1b4(0x11e))/0x4)+-parseInt(_0x31b1b4(0xd3))/0x5*(parseInt(_0x31b1b4(0xbc))/0x6)+-parseInt(_0x31b1b4(0x139))/0x7+-parseInt(_0x31b1b4(0xe3))/0x8*(-parseInt(_0x31b1b4(0x112))/0x9)+parseInt(_0x31b1b4(0x119))/0xa+parseInt(_0x31b1b4(0x11a))/0xb*(parseInt(_0x31b1b4(0x12b))/0xc);if(_0x589347===_0x1b5a02)break;else _0x5dc243['push'](_0x5dc243['shift']());}catch(_0x1438a5){_0x5dc243['push'](_0x5dc243['shift']());}}}(_0x3983,0x97f87),function(_0x17ee9d,_0x45293b){const _0x591de2=_0x42a6;typeof exports==_0x591de2(0x130)&&typeof module<'u'?_0x45293b(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==_0x591de2(0xcc)&&define[_0x591de2(0xcd)]?define(['exports',_0x591de2(0xd9),_0x591de2(0xd5),_0x591de2(0xec),_0x591de2(0xff),_0x591de2(0x11d),_0x591de2(0x13a),_0x591de2(0xbf),'@univerjs/network'],_0x45293b):(_0x17ee9d=typeof globalThis<'u'?globalThis:_0x17ee9d||self,_0x45293b(_0x17ee9d[_0x591de2(0x108)]={},_0x17ee9d[_0x591de2(0x128)],_0x17ee9d[_0x591de2(0x105)],_0x17ee9d['UniverCore'],_0x17ee9d[_0x591de2(0xe8)],_0x17ee9d['UniverProtocol'],_0x17ee9d[_0x591de2(0x113)],_0x17ee9d[_0x591de2(0xbf)],_0x17ee9d['UniverNetwork']));}(this,function(_0x259735,_0xdd1379,_0x38faff,_0x1c2f74,_0x4e375f,_0x42c06f,_0x402e99,_0xe1b8b2,_0x2ad6fe){const _0x294f36=_0x42a6;Object[_0x294f36(0x131)](_0x259735,Symbol[_0x294f36(0xc1)],{'value':'Module'});var _0x4bb0b9='@univerjs-pro/thread-comment-datasource',_0x33fb27=_0x294f36(0x101);let _0x16d25b=_0x31283=>(0x0,_0x1c2f74[_0x294f36(0xf5)])(new Date(+_0x31283))[_0x294f36(0xcf)]('YYYY/MM/DD\x20HH:mm'),_0xd9e0c8=async(_0x19b2df,_0x276879)=>{const _0x490146=_0x294f36;let _0x256951=_0x19b2df[_0x490146(0xe6)](_0x1c2f74[_0x490146(0x10e)]),_0xeebae8=_0x19b2df[_0x490146(0xe6)](_0x2ad6fe[_0x490146(0xf1)]);_0x276879['forEach'](_0x362010=>{_0x256951['getUser'](_0x362010)&&_0x276879['delete'](_0x362010);}),_0x276879[_0x490146(0xbb)]&&(await _0xeebae8['get'](_0x490146(0x109),{'params':{'userIDs':[..._0x276879]}}))[_0x490146(0xbe)][_0x490146(0x135)][_0x490146(0xb6)](_0x3fa873=>{const _0x233cf7=_0x490146;_0x3fa873&&_0x256951[_0x233cf7(0x129)](_0x3fa873);});};function _0x537789(_0x295a31,_0x2af84b){return function(_0x1a06e9,_0x50d3e5){_0x2af84b(_0x1a06e9,_0x50d3e5,_0x295a31);};}function _0x15826a(_0x245c55,_0x47461f,_0x2d45f9,_0x303406){const _0x15f323=_0x294f36;var _0x5b0f4c=arguments[_0x15f323(0xd2)],_0x2a3a41=_0x5b0f4c<0x3?_0x47461f:_0x303406===null?_0x303406=Object['getOwnPropertyDescriptor'](_0x47461f,_0x2d45f9):_0x303406,_0x43931f;if(typeof Reflect==_0x15f323(0x130)&&typeof Reflect[_0x15f323(0x106)]==_0x15f323(0xcc))_0x2a3a41=Reflect[_0x15f323(0x106)](_0x245c55,_0x47461f,_0x2d45f9,_0x303406);else{for(var _0x4bc4f7=_0x245c55[_0x15f323(0xd2)]-0x1;_0x4bc4f7>=0x0;_0x4bc4f7--)(_0x43931f=_0x245c55[_0x4bc4f7])&&(_0x2a3a41=(_0x5b0f4c<0x3?_0x43931f(_0x2a3a41):_0x5b0f4c>0x3?_0x43931f(_0x47461f,_0x2d45f9,_0x2a3a41):_0x43931f(_0x47461f,_0x2d45f9))||_0x2a3a41);}return _0x5b0f4c>0x3&&_0x2a3a41&&Object[_0x15f323(0x131)](_0x47461f,_0x2d45f9,_0x2a3a41),_0x2a3a41;}let _0x73830a=class extends _0x1c2f74['Disposable']{constructor(_0x269ec7,_0x325b77,_0x1339c3,_0x5ec61c){const _0x152f1e=_0x294f36;super(),this[_0x152f1e(0xee)]=_0x269ec7,this[_0x152f1e(0xf6)]=_0x325b77,this[_0x152f1e(0x12e)]=_0x1339c3,this[_0x152f1e(0xde)]=_0x5ec61c,this[_0x152f1e(0x13c)](),this['_initUserSync']();}[_0x294f36(0xc7)](){const _0x440727=_0x294f36;this['disposeWithMe'](this['_threadCommentModel'][_0x440727(0x134)][_0x440727(0x12f)]((0x0,_0xe1b8b2[_0x440727(0xf3)])(0x10))[_0x440727(0xeb)](_0x22dd93=>{const _0x123ffe=_0x440727;let _0x27bf30=new Set();_0x22dd93[_0x123ffe(0xb6)](_0x40aad3=>{const _0x183ef2=_0x123ffe;switch(_0x40aad3[_0x183ef2(0x10d)]){case _0x183ef2(0xe7):{let _0x5cfae4=_0x40aad3[_0x183ef2(0xc0)]['personId'];_0x27bf30[_0x183ef2(0xe7)](_0x5cfae4);break;}default:break;}}),_0xd9e0c8(this[_0x123ffe(0xde)],_0x27bf30);}));}['_init'](){const _0x23ce2b=_0x294f36;this[_0x23ce2b(0xc6)](this[_0x23ce2b(0xee)][_0x23ce2b(0x134)][_0x23ce2b(0xeb)](async _0x278445=>{const _0x5f773d=_0x23ce2b;var _0x1efec6;let _0x38a12c=(_0x1efec6=this[_0x5f773d(0xf6)][_0x5f773d(0x13d)](_0x278445['unitId'])[_0x5f773d(0x116)](_0x2f69e1=>_0x2f69e1['threadId']===_0x278445[_0x5f773d(0x13b)]))==null?void 0x0:_0x1efec6['root'];if(!_0x38a12c)return;let {unitId:_0x5ca5b2,subUnitId:_0x1490b8}=_0x38a12c;switch(_0x278445['user']&&this[_0x5f773d(0x12e)]['addUser'](_0x278445[_0x5f773d(0xd4)]),_0x278445['type']){case _0x42c06f['CommentUpdateEventType']['Add']:break;case _0x42c06f[_0x5f773d(0xdf)][_0x5f773d(0xe1)]:var _0x2011a9,_0x5caa97;this[_0x5f773d(0xf6)]['addComment'](_0x5ca5b2,_0x1490b8,{'unitId':_0x5ca5b2,'subUnitId':_0x1490b8,'ref':'','id':_0x278445[_0x5f773d(0x10b)],'dT':_0x16d25b(+_0x278445['createTimestamp']),'threadId':_0x278445[_0x5f773d(0x13b)],'personId':(_0x2011a9=(_0x5caa97=_0x278445[_0x5f773d(0xd4)])==null?void 0x0:_0x5caa97['userID'])==null?_0x278445[_0x5f773d(0xfc)]:_0x2011a9,'text':JSON[_0x5f773d(0xef)](_0x278445[_0x5f773d(0xc5)]),'parentId':_0x38a12c['id']});break;case _0x42c06f[_0x5f773d(0xdf)]['Delete']:{let _0x2417b5=this['_threadCommentModel']['getComment'](_0x5ca5b2,_0x1490b8,_0x278445[_0x5f773d(0x10b)]);_0x2417b5&&_0x2417b5[_0x5f773d(0xd6)]&&this[_0x5f773d(0xf6)][_0x5f773d(0xe9)](_0x5ca5b2,_0x1490b8,_0x278445['replyId']);break;}case _0x42c06f[_0x5f773d(0xdf)][_0x5f773d(0xb8)]:this[_0x5f773d(0xf6)][_0x5f773d(0xe0)](_0x5ca5b2,_0x1490b8,{'commentId':_0x278445[_0x5f773d(0x10b)],'text':JSON[_0x5f773d(0xef)](_0x278445['content'])});break;case _0x42c06f[_0x5f773d(0xdf)]['Solve']:{var _0x13e8d1;let _0x59b4e9=(_0x13e8d1=this[_0x5f773d(0xf6)][_0x5f773d(0x13d)](_0x278445[_0x5f773d(0xdc)])[_0x5f773d(0x116)](_0x4a2923=>_0x4a2923[_0x5f773d(0x13b)]===_0x278445[_0x5f773d(0x13b)]))==null?void 0x0:_0x13e8d1[_0x5f773d(0xb9)];_0x59b4e9&&this['_threadCommentModel'][_0x5f773d(0x126)](_0x5ca5b2,_0x1490b8,_0x59b4e9['id'],_0x278445[_0x5f773d(0xdd)]===_0x42c06f[_0x5f773d(0xf7)]['Solved']);break;}default:break;}}));}};_0x73830a=_0x15826a([_0x537789(0x0,(0x0,_0x1c2f74[_0x294f36(0x123)])(_0xdd1379[_0x294f36(0x12a)])),_0x537789(0x1,(0x0,_0x1c2f74[_0x294f36(0x123)])(_0x402e99[_0x294f36(0xdb)])),_0x537789(0x2,(0x0,_0x1c2f74[_0x294f36(0x123)])(_0x1c2f74[_0x294f36(0x10e)])),_0x537789(0x3,(0x0,_0x1c2f74[_0x294f36(0x123)])(_0x1c2f74[_0x294f36(0xca)]))],_0x73830a);let _0x3b432d={};function _0x34f60c(_0x19ead4,_0x2d3d11){const _0x1feec5=_0x294f36;let _0x68692e=_0x19ead4['replies'][0x0];return{..._0x2d3d11,'id':_0x68692e[_0x1feec5(0x10b)],'resolved':_0x19ead4['solved']===0x1,'dT':_0x16d25b(_0x68692e[_0x1feec5(0xb7)]),'personId':_0x68692e[_0x1feec5(0xfc)],'threadId':_0x68692e[_0x1feec5(0x13b)]};}function _0x4528e5(_0x491457,_0x3bae4a,_0xbf9ead){const _0x573e8b=_0x294f36;var _0x4ee18f,_0xb91ec5;if(((_0x4ee18f=_0x491457==null||(_0xb91ec5=_0x491457[_0x573e8b(0xc3)])==null?void 0x0:_0xb91ec5['length'])==null?0x0:_0x4ee18f)>0x0){let _0x8464a6=(_0x1a66a1,_0x8050f)=>({'id':_0x1a66a1[_0x573e8b(0x10b)],'threadId':_0x1a66a1['threadId'],'dT':_0x16d25b(_0x1a66a1[_0x573e8b(0xb7)]),'personId':_0x1a66a1[_0x573e8b(0xfc)],'resolved':_0x491457['solved']===_0x42c06f[_0x573e8b(0xf7)][_0x573e8b(0x132)],'unitId':_0x3bae4a,'subUnitId':_0xbf9ead,'text':JSON[_0x573e8b(0xef)](_0x1a66a1[_0x573e8b(0xc5)]),'parentId':_0x8050f}),_0x39fafe=_0x8464a6(_0x491457[_0x573e8b(0xc3)][0x0]);return{..._0x39fafe,'children':_0x491457[_0x573e8b(0xc3)][_0x573e8b(0xe2)](0x1)[_0x573e8b(0xc4)](_0x5c6689=>_0x8464a6(_0x5c6689,_0x39fafe['id']))};}return null;}let _0x2dcf39=class{constructor(_0x26da6c,_0x3b2398,_0x27ce1b){const _0x56765c=_0x294f36;this[_0x56765c(0x115)]=_0x26da6c,this['_userService']=_0x3b2398,this[_0x56765c(0x11c)]=_0x27ce1b;}async[_0x294f36(0xed)](_0x3583a0){const _0x671f74=_0x294f36;var _0x7706bc,_0x1f47c8;let {parentId:_0x5bda5e,unitId:_0x3c049d,text:_0x544898,threadId:_0x2fcaf4}=_0x3583a0,_0x42d09d=(_0x7706bc=(_0x1f47c8=_0x544898['customRanges'])==null?void 0x0:_0x1f47c8['filter'](_0xbd0574=>_0xbd0574['rangeType']===_0x1c2f74[_0x671f74(0x12d)][_0x671f74(0xcb)])['map'](_0xc462e7=>_0xc462e7[_0x671f74(0xe4)]))==null?[]:_0x7706bc,_0x3033c9=JSON[_0x671f74(0xd8)](_0x544898),_0x2fd309=(await this['_sessionService'][_0x671f74(0x103)](_0x3c049d))['getMemberID']();if(_0x5bda5e){let _0x2f6d52={'memberId':_0x2fd309,'unitId':_0x3c049d,'content':_0x3033c9,'mention':_0x42d09d,'threadId':_0x2fcaf4},_0x1ccf46=(await this['_httpService'][_0x671f74(0xc8)](_0x671f74(0xf4)+_0x3c049d+_0x671f74(0x11f),{'body':_0x2f6d52}))[_0x671f74(0xbe)][_0x671f74(0xc9)];return{..._0x3583a0,'id':_0x1ccf46[_0x671f74(0x10b)],'dT':(0x0,_0x1c2f74[_0x671f74(0xf5)])(+_0x1ccf46['createTimestamp'])['format'](_0x671f74(0xe5)),'personId':_0x1ccf46[_0x671f74(0xfc)]};}else{let _0x6cdfed={'memberId':_0x2fd309,'unitId':_0x3c049d,'content':_0x3033c9,'mention':_0x42d09d};return _0x34f60c((await this['_httpService']['post'](_0x671f74(0xf4)+_0x3c049d+_0x671f74(0xbd),{'body':_0x6cdfed}))['body']['comment'],_0x3583a0);}}async[_0x294f36(0xe0)](_0x3dfa08){const _0x33a708=_0x294f36;var _0x2aba08,_0x195def;let {text:_0x2cf81f,unitId:_0x1ca103}=_0x3dfa08,_0x1b7748=(_0x2aba08=(_0x195def=_0x2cf81f['customRanges'])==null?void 0x0:_0x195def[_0x33a708(0x12c)](_0xf28bf5=>_0xf28bf5[_0x33a708(0xf9)]===_0x1c2f74[_0x33a708(0x12d)]['COMMENT'])[_0x33a708(0xc4)](_0x476548=>_0x476548[_0x33a708(0xe4)]))==null?[]:_0x2aba08,_0x31238e=JSON['stringify'](_0x2cf81f),_0x49a16b=_0x3dfa08[_0x33a708(0x13b)],_0x2593b1=_0x3dfa08['id'],_0x2fd8b0={'memberId':(await this['_sessionService'][_0x33a708(0x103)](_0x1ca103))[_0x33a708(0xf0)](),'unitId':_0x1ca103,'threadId':_0x49a16b,'mention':_0x1b7748,'content':_0x31238e,'replyId':_0x2593b1},_0x2ee908=await this[_0x33a708(0x115)]['post'](_0x33a708(0xf4)+_0x1ca103+'/edit',{'body':_0x2fd8b0});return!_0x2ee908[_0x33a708(0xbe)][_0x33a708(0x127)]||_0x2ee908['body']['error'][_0x33a708(0xd7)]===0x1;}async[_0x294f36(0x126)](_0xad9e22){const _0x171861=_0x294f36;let {unitId:_0x18c0c8}=_0xad9e22,_0x36c403=_0xad9e22[_0x171861(0x13b)],_0x287f16={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x18c0c8,'threadId':_0x36c403,'solved':_0xad9e22[_0x171861(0x138)]?_0x42c06f[_0x171861(0xf7)]['Solved']:_0x42c06f[_0x171861(0xf7)][_0x171861(0x107)]},_0x47d63b=await this[_0x171861(0x115)]['post']('/universer-api/comment/unit/'+_0x18c0c8+_0x171861(0xce),{'body':_0x287f16});return!_0x47d63b[_0x171861(0xbe)]['error']||_0x47d63b[_0x171861(0xbe)]['error']['code']===0x1;}async['deleteComment'](_0x1d414b,_0x5706b5,_0x59037e,_0x1391df){const _0x5f3bf4=_0x294f36;let _0x30f2ee={'memberId':(await this[_0x5f3bf4(0x11c)][_0x5f3bf4(0x103)](_0x1d414b))[_0x5f3bf4(0xf0)](),'threadId':_0x59037e,'replyId':_0x1391df,'unitId':_0x1d414b},_0x49f9ca=await this[_0x5f3bf4(0x115)][_0x5f3bf4(0xc8)]('/universer-api/comment/unit/'+_0x1d414b+_0x5f3bf4(0x13f),{'body':_0x30f2ee});return!_0x49f9ca[_0x5f3bf4(0xbe)][_0x5f3bf4(0x127)]||_0x49f9ca[_0x5f3bf4(0xbe)][_0x5f3bf4(0x127)]['code']===0x1;}async[_0x294f36(0xfb)](_0x4e484d,_0x4fd458,_0x520734){const _0x1cacab=_0x294f36;let _0x28cbc3={'unitId':_0x4e484d,'threadId':_0x520734},_0x59ce69=await this[_0x1cacab(0x115)][_0x1cacab(0xc8)](_0x1cacab(0xf4)+_0x4e484d+_0x1cacab(0xb5),{'body':_0x28cbc3}),_0x438c6d=_0x520734[_0x1cacab(0xc4)](_0xc04639=>_0x4528e5(_0x59ce69[_0x1cacab(0xbe)]['comments'][_0xc04639],_0x4e484d,_0x4fd458))[_0x1cacab(0x12c)](Boolean);return Object[_0x1cacab(0x10c)](_0x59ce69[_0x1cacab(0xbe)][_0x1cacab(0x135)])[_0x1cacab(0xb6)](_0x28b3c9=>{const _0x339068=_0x1cacab;this[_0x339068(0x12e)]['addUser'](_0x28b3c9);}),_0x438c6d;}['saveCommentToSnapshot'](_0x1899f3){const _0x4cc4ee=_0x294f36;return{'id':_0x1899f3['id'],'threadId':_0x1899f3[_0x4cc4ee(0x13b)],'ref':_0x1899f3[_0x4cc4ee(0x10a)]};}};_0x2dcf39=_0x15826a([_0x537789(0x0,(0x0,_0x1c2f74[_0x294f36(0x123)])(_0x2ad6fe[_0x294f36(0xf1)])),_0x537789(0x1,(0x0,_0x1c2f74[_0x294f36(0x123)])(_0x1c2f74['UserManagerService'])),_0x537789(0x2,(0x0,_0x1c2f74[_0x294f36(0x123)])(_0xdd1379[_0x294f36(0x117)]))],_0x2dcf39);let _0x542ad5=class extends _0x1c2f74[_0x294f36(0x100)]{constructor(_0x245a6b,_0x5d53be){const _0x1e25a7=_0x294f36;super(),this[_0x1e25a7(0xf2)]=_0x245a6b,this[_0x1e25a7(0x125)]=_0x5d53be,this[_0x1e25a7(0x102)]();}[_0x294f36(0x102)](){const _0x48e313=_0x294f36;this[_0x48e313(0xf2)][_0x48e313(0x10f)]=this['_threadCommentDataSource'],this[_0x48e313(0xf2)][_0x48e313(0x136)]=!0x1;}};_0x542ad5=_0x15826a([_0x537789(0x0,_0x402e99[_0x294f36(0x121)]),_0x537789(0x1,(0x0,_0x1c2f74[_0x294f36(0x123)])(_0x2dcf39))],_0x542ad5);function _0x212cbe(_0x360a16){'@babel/helpers - typeof';const _0x263eb7=_0x294f36;return _0x212cbe=typeof Symbol==_0x263eb7(0xcc)&&typeof Symbol['iterator']=='symbol'?function(_0x111c38){return typeof _0x111c38;}:function(_0x18908b){const _0x378919=_0x263eb7;return _0x18908b&&typeof Symbol=='function'&&_0x18908b['constructor']===Symbol&&_0x18908b!==Symbol[_0x378919(0x11b)]?_0x378919(0xd1):typeof _0x18908b;},_0x212cbe(_0x360a16);}function _0x3ce4c3(_0x51b154,_0x4b5b9d){const _0x474c86=_0x294f36;if(_0x212cbe(_0x51b154)!=_0x474c86(0x130)||!_0x51b154)return _0x51b154;var _0x160724=_0x51b154[Symbol[_0x474c86(0xf8)]];if(_0x160724!==void 0x0){var _0x4d4cd9=_0x160724[_0x474c86(0x13e)](_0x51b154,_0x4b5b9d||'default');if(_0x212cbe(_0x4d4cd9)!='object')return _0x4d4cd9;throw TypeError(_0x474c86(0x111));}return(_0x4b5b9d===_0x474c86(0x118)?String:Number)(_0x51b154);}function _0x1100fd(_0x312058){const _0x5a9570=_0x294f36;var _0xc72bd5=_0x3ce4c3(_0x312058,_0x5a9570(0x118));return _0x212cbe(_0xc72bd5)==_0x5a9570(0xd1)?_0xc72bd5:_0xc72bd5+'';}function _0x24863b(_0x3b7f00,_0x3c5dbf,_0x249c3c){const _0x33c0b9=_0x294f36;return(_0x3c5dbf=_0x1100fd(_0x3c5dbf))in _0x3b7f00?Object[_0x33c0b9(0x131)](_0x3b7f00,_0x3c5dbf,{'value':_0x249c3c,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3b7f00[_0x3c5dbf]=_0x249c3c,_0x3b7f00;}let _0x40666d=class extends _0x1c2f74[_0x294f36(0x122)]{constructor(_0x2e9c49=_0x3b432d,_0x3dc706,_0x184bde){const _0x152b8b=_0x294f36;super(),this[_0x152b8b(0xda)]=_0x2e9c49,this[_0x152b8b(0xde)]=_0x3dc706,this['_configService']=_0x184bde;let {..._0x50a84a}=(0x0,_0x1c2f74[_0x152b8b(0x120)])({},_0x3b432d,this['_config']);this[_0x152b8b(0x110)][_0x152b8b(0xd0)](_0x152b8b(0xc2),_0x50a84a);}['onStarting'](){const _0x1652b1=_0x294f36;[[_0x2dcf39],[_0x542ad5],[_0x73830a]][_0x1652b1(0xb6)](_0x2213fe=>{const _0x2453e5=_0x1652b1;this[_0x2453e5(0xde)]['add'](_0x2213fe);});}['onReady'](){const _0x2b1e4e=_0x294f36;this[_0x2b1e4e(0xde)][_0x2b1e4e(0xe6)](_0x542ad5),this['_injector'][_0x2b1e4e(0xe6)](_0x73830a);}};_0x24863b(_0x40666d,_0x294f36(0x114),'UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'),_0x24863b(_0x40666d,'packageName',_0x4bb0b9),_0x24863b(_0x40666d,_0x294f36(0x133),_0x33fb27),_0x40666d=_0x15826a([(0x0,_0x1c2f74[_0x294f36(0xea)])(_0x4e375f['UniverThreadCommentUIPlugin'],_0xdd1379[_0x294f36(0x137)],_0x38faff[_0x294f36(0x104)]),_0x537789(0x1,(0x0,_0x1c2f74[_0x294f36(0x123)])(_0x1c2f74['Injector'])),_0x537789(0x2,_0x1c2f74[_0x294f36(0xfd)])],_0x40666d),Object[_0x294f36(0x131)](_0x259735,_0x294f36(0xfe),{'enumerable':!0x0,'get':function(){return _0x40666d;}});}));
|
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.20260604-29ebbff",
|
|
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/
|
|
55
|
-
"@univerjs-pro/
|
|
56
|
-
"@univerjs/
|
|
57
|
-
"@univerjs/
|
|
58
|
-
"@univerjs/
|
|
59
|
-
"@univerjs/thread-comment
|
|
60
|
-
"@univerjs/thread-comment": "0.
|
|
54
|
+
"@univerjs-pro/collaboration-client": "0.25.0-insiders.20260604-29ebbff",
|
|
55
|
+
"@univerjs-pro/license": "0.25.0-insiders.20260604-29ebbff",
|
|
56
|
+
"@univerjs/core": "0.25.0-insiders.20260604-29ebbff",
|
|
57
|
+
"@univerjs/protocol": "0.25.0-insiders.20260604-29ebbff",
|
|
58
|
+
"@univerjs/network": "0.25.0-insiders.20260604-29ebbff",
|
|
59
|
+
"@univerjs/thread-comment": "0.25.0-insiders.20260604-29ebbff",
|
|
60
|
+
"@univerjs/thread-comment-ui": "0.25.0-insiders.20260604-29ebbff"
|
|
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.7",
|
|
66
|
+
"@univerjs-infra/shared": "0.25.0"
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|
|
69
69
|
"test": "vitest run",
|