@univerjs-pro/thread-comment-datasource 0.6.6-nightly.202503201607 → 0.6.6-nightly.202503221606
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/umd/index.js +1 -1
- package/package.json +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function _0x174a(){const _0x5a40b1=['UNRECOGNIZED','getOwnPropertyDescriptor','pluginName','code','rangeId','236038qBwJIk','@univerjs/thread-comment-ui','CommentService','onReady','9534040FpkZeM','error','/universer-api/comment/unit/','solved','OpenOrReOpen','length','Injector','addComment','parse','2prlaUM','_commentService','Delete','/reply','createTimestamp','personId','userId','saveCommentToSnapshot','_userService','107684mysobN','replyId','/edit','getUser','_sessionService','getMemberID','Add','add','_initDataSource','_init','489601dOLpAm','commentUpdate$','customRanges','toStringTag','COMMENT','pipe','syncUpdateMutationToColla','rangeType','post','comments','get','/add','_configService','Inject','getCurrentUser','parentId','24hNHyNf','/universer-api/user/list','DependentOn','values','_initUserSync','defineProperty','format','2936517tAdteC','6oIkZDT','@univerjs/network','Reply','UniverThreadCommentUIPlugin','_threadCommentDataSource','IThreadCommentDataSourceService','filter','root','_injector','body','user','type','dayjs','UniverThreadCommentDataSourcePlugin','Edit','resolveComment','map','CollaborationSessionService','size','slice','@univerjs-pro/license','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','deleteComment','@univerjs/thread-comment','_threadCommentDataSourceService','delete','updateComment','thread-comment-data-source.config','threadId','dataSource','/delete','disposeWithMe','Solve','requireSession','ref','userID','getComment','addUser','2764495LXHGcQ','comment','Plugin','Unknown','YYYY/MM/DD\x20HH:mm','payload','reply','/list','setConfig','UserManagerService','content','replies','getUnit','Solved','forEach','_httpService','resolved','find','_threadCommentModel','merge','bufferTime','rxjs','/solved','3596418kbSvlw','_config','subscribe'];_0x174a=function(){return _0x5a40b1;};return _0x174a();}const _0x8d019f=_0x5ea3;(function(_0x3c05ac,_0x12803d){const _0x50cddd=_0x5ea3,_0x503114=_0x3c05ac();while(!![]){try{const _0x105cb9=-parseInt(_0x50cddd(0x19f))/0x1*(-parseInt(_0x50cddd(0x192))/0x2)+-parseInt(_0x50cddd(0x14c))/0x3+-parseInt(_0x50cddd(0x1a8))/0x4+-parseInt(_0x50cddd(0x173))/0x5*(-parseInt(_0x50cddd(0x14d))/0x6)+-parseInt(_0x50cddd(0x1b2))/0x7*(parseInt(_0x50cddd(0x145))/0x8)+parseInt(_0x50cddd(0x18a))/0x9+parseInt(_0x50cddd(0x196))/0xa;if(_0x105cb9===_0x12803d)break;else _0x503114['push'](_0x503114['shift']());}catch(_0x5a2e8c){_0x503114['push'](_0x503114['shift']());}}}(_0x174a,0xe2292));Object[_0x8d019f(0x14a)](exports,Symbol[_0x8d019f(0x1b5)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x8d019f(0x161)),c=require('@univerjs/core'),j=require(_0x8d019f(0x193)),M=require(_0x8d019f(0x164)),w=require(_0x8d019f(0x188)),P=require(_0x8d019f(0x14e)),U=_0x8d019f(0x162);var I=(_0x1f5d74=>(_0x1f5d74[_0x1f5d74[_0x8d019f(0x19a)]=0x0]=_0x8d019f(0x19a),_0x1f5d74[_0x1f5d74[_0x8d019f(0x180)]=0x1]=_0x8d019f(0x180),_0x1f5d74[_0x1f5d74['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x1f5d74))(I||{}),v=(_0x226e12=>(_0x226e12[_0x226e12['Unknown']=0x0]=_0x8d019f(0x176),_0x226e12[_0x226e12['Add']=0x1]=_0x8d019f(0x1ae),_0x226e12[_0x226e12[_0x8d019f(0x14f)]=0x2]=_0x8d019f(0x14f),_0x226e12[_0x226e12[_0x8d019f(0x15b)]=0x3]='Edit',_0x226e12[_0x226e12['Delete']=0x4]=_0x8d019f(0x1a1),_0x226e12[_0x226e12[_0x8d019f(0x16d)]=0x5]='Solve',_0x226e12[_0x226e12[_0x8d019f(0x18d)]=-0x1]=_0x8d019f(0x18d),_0x226e12))(v||{});const f=_0x451c99=>c[_0x8d019f(0x159)](new Date(+_0x451c99))[_0x8d019f(0x14b)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x4a2833,_0x29c041)=>{const _0x50e9be=_0x8d019f,_0x4c0afa=_0x4a2833['get'](c[_0x50e9be(0x17c)]),_0x48dfb2=_0x4a2833[_0x50e9be(0x1bc)](P['HTTPService']);_0x29c041['forEach'](_0x55d5dd=>{const _0x18c7ec=_0x50e9be;_0x4c0afa[_0x18c7ec(0x1ab)](_0x55d5dd)&&_0x29c041[_0x18c7ec(0x166)](_0x55d5dd);}),_0x29c041[_0x50e9be(0x15f)]&&(await _0x48dfb2[_0x50e9be(0x1bc)](_0x50e9be(0x146),{'params':{'userIDs':[..._0x29c041]}}))['body']['users'][_0x50e9be(0x181)](_0x3d64cb=>{const _0x2218ad=_0x50e9be;_0x3d64cb&&_0x4c0afa[_0x2218ad(0x172)](_0x3d64cb);});};var $=Object[_0x8d019f(0x18e)],E=(_0x156502,_0x1df9cf,_0x14498e,_0x4a643b)=>{const _0x5e3067=_0x8d019f;for(var _0x2d9b4f=_0x4a643b>0x1?void 0x0:_0x4a643b?$(_0x1df9cf,_0x14498e):_0x1df9cf,_0x1a7be2=_0x156502[_0x5e3067(0x19b)]-0x1,_0x115331;_0x1a7be2>=0x0;_0x1a7be2--)(_0x115331=_0x156502[_0x1a7be2])&&(_0x2d9b4f=_0x115331(_0x2d9b4f)||_0x2d9b4f);return _0x2d9b4f;},S=(_0x53163d,_0x3e7695)=>(_0x4baa23,_0x3a15a3)=>_0x3e7695(_0x4baa23,_0x3a15a3,_0x53163d);let p=class extends c['Disposable']{constructor(_0x16f9f7,_0x4a0efd,_0x5bf236,_0x4728c3){const _0xc0b96e=_0x8d019f;super(),this['_commentService']=_0x16f9f7,this[_0xc0b96e(0x185)]=_0x4a0efd,this[_0xc0b96e(0x1a7)]=_0x5bf236,this[_0xc0b96e(0x155)]=_0x4728c3,this[_0xc0b96e(0x1b1)](),this[_0xc0b96e(0x149)]();}[_0x8d019f(0x149)](){const _0x1b8c1f=_0x8d019f;this[_0x1b8c1f(0x16c)](this[_0x1b8c1f(0x185)][_0x1b8c1f(0x1b3)][_0x1b8c1f(0x1b7)](w[_0x1b8c1f(0x187)](0x10))[_0x1b8c1f(0x18c)](_0x53460e=>{const _0x4241ce=_0x1b8c1f,_0x5b5ee6=new Set();_0x53460e[_0x4241ce(0x181)](_0x2d3ecb=>{const _0x269555=_0x4241ce;switch(_0x2d3ecb['type']){case _0x269555(0x1af):{const _0x4b59a9=_0x2d3ecb[_0x269555(0x178)][_0x269555(0x1a4)];_0x5b5ee6[_0x269555(0x1af)](_0x4b59a9);break;}}}),R(this['_injector'],_0x5b5ee6);}));}['_init'](){const _0x3e2b6f=_0x8d019f;this['disposeWithMe'](this[_0x3e2b6f(0x1a0)][_0x3e2b6f(0x1b3)][_0x3e2b6f(0x18c)](async _0x1aaf8e=>{const _0x2d16d8=_0x3e2b6f;var _0x1c8b16,_0x38ed4e,_0x5179a5,_0x3bfba1;const _0x5c5764=(_0x1c8b16=this[_0x2d16d8(0x185)][_0x2d16d8(0x17f)](_0x1aaf8e['unitId'])['find'](_0x4f1bc3=>_0x4f1bc3[_0x2d16d8(0x169)]===_0x1aaf8e[_0x2d16d8(0x169)]))==null?void 0x0:_0x1c8b16[_0x2d16d8(0x154)];if(!_0x5c5764)return;const {unitId:_0x5b7853,subUnitId:_0x743ff7}=_0x5c5764;switch(_0x1aaf8e['user']&&this[_0x2d16d8(0x1a7)][_0x2d16d8(0x172)](_0x1aaf8e[_0x2d16d8(0x157)]),_0x1aaf8e['type']){case v['Add']:break;case v['Reply']:{this[_0x2d16d8(0x185)][_0x2d16d8(0x19d)](_0x5b7853,_0x743ff7,{'unitId':_0x5b7853,'subUnitId':_0x743ff7,'ref':'','id':_0x1aaf8e[_0x2d16d8(0x1a9)],'dT':f(+_0x1aaf8e[_0x2d16d8(0x1a3)]),'threadId':_0x1aaf8e[_0x2d16d8(0x169)],'personId':(_0x5179a5=(_0x38ed4e=_0x1aaf8e[_0x2d16d8(0x157)])==null?void 0x0:_0x38ed4e[_0x2d16d8(0x170)])!=null?_0x5179a5:_0x1aaf8e['userId'],'text':JSON['parse'](_0x1aaf8e[_0x2d16d8(0x17d)]),'parentId':_0x5c5764['id']});break;}case v['Delete']:{const _0x2e1484=this['_threadCommentModel'][_0x2d16d8(0x171)](_0x5b7853,_0x743ff7,_0x1aaf8e['replyId']);_0x2e1484&&_0x2e1484[_0x2d16d8(0x144)]&&this[_0x2d16d8(0x185)]['deleteComment'](_0x5b7853,_0x743ff7,_0x1aaf8e['replyId']);break;}case v[_0x2d16d8(0x15b)]:{this['_threadCommentModel'][_0x2d16d8(0x167)](_0x5b7853,_0x743ff7,{'commentId':_0x1aaf8e['replyId'],'text':JSON[_0x2d16d8(0x19e)](_0x1aaf8e[_0x2d16d8(0x17d)])});break;}case v[_0x2d16d8(0x16d)]:{const _0x1aec67=(_0x3bfba1=this[_0x2d16d8(0x185)]['getUnit'](_0x1aaf8e['unitId'])[_0x2d16d8(0x184)](_0x5a1c4c=>_0x5a1c4c[_0x2d16d8(0x169)]===_0x1aaf8e[_0x2d16d8(0x169)]))==null?void 0x0:_0x3bfba1['root'];_0x1aec67&&this[_0x2d16d8(0x185)][_0x2d16d8(0x15c)](_0x5b7853,_0x743ff7,_0x1aec67['id'],_0x1aaf8e[_0x2d16d8(0x199)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x8d019f(0x1bf)](b[_0x8d019f(0x194)])),S(0x1,c[_0x8d019f(0x1bf)](M['ThreadCommentModel'])),S(0x2,c[_0x8d019f(0x1bf)](c['UserManagerService'])),S(0x3,c[_0x8d019f(0x1bf)](c[_0x8d019f(0x19c)]))],p);const q=_0x8d019f(0x168),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x1e4be2,_0xc652c6,_0x54ea54,_0x48ea28)=>{const _0x6d3752=_0x8d019f;for(var _0x535b6b=_0x48ea28>0x1?void 0x0:_0x48ea28?A(_0xc652c6,_0x54ea54):_0xc652c6,_0x61be30=_0x1e4be2[_0x6d3752(0x19b)]-0x1,_0x47ec49;_0x61be30>=0x0;_0x61be30--)(_0x47ec49=_0x1e4be2[_0x61be30])&&(_0x535b6b=_0x47ec49(_0x535b6b)||_0x535b6b);return _0x535b6b;},_=(_0x4adcee,_0x198325)=>(_0x1e117f,_0x2d20f2)=>_0x198325(_0x1e117f,_0x2d20f2,_0x4adcee);function Y(_0x303956,_0x3f55f6){const _0x4b536d=_0x8d019f,_0x448972=_0x303956[_0x4b536d(0x17e)][0x0];return{..._0x3f55f6,'id':_0x448972[_0x4b536d(0x1a9)],'resolved':_0x303956[_0x4b536d(0x199)]===0x1,'dT':f(_0x448972[_0x4b536d(0x1a3)]),'personId':_0x448972['userId'],'threadId':_0x448972[_0x4b536d(0x169)]};}function G(_0x28a8fc,_0x41c40a,_0x2cdbf0){const _0x3f0b19=_0x8d019f;var _0x3d720f,_0x58191c;if(((_0x58191c=(_0x3d720f=_0x28a8fc==null?void 0x0:_0x28a8fc[_0x3f0b19(0x17e)])==null?void 0x0:_0x3d720f['length'])!=null?_0x58191c:0x0)>0x0){const _0x4b78a6=(_0x46926b,_0x4a3c40)=>({'id':_0x46926b['replyId'],'threadId':_0x46926b[_0x3f0b19(0x169)],'dT':f(_0x46926b[_0x3f0b19(0x1a3)]),'personId':_0x46926b[_0x3f0b19(0x1a5)],'resolved':_0x28a8fc[_0x3f0b19(0x199)]===I[_0x3f0b19(0x180)],'unitId':_0x41c40a,'subUnitId':_0x2cdbf0,'text':JSON['parse'](_0x46926b[_0x3f0b19(0x17d)]),'parentId':_0x4a3c40}),_0x11fec2=_0x4b78a6(_0x28a8fc[_0x3f0b19(0x17e)][0x0]);return{..._0x11fec2,'children':_0x28a8fc[_0x3f0b19(0x17e)][_0x3f0b19(0x160)](0x1)[_0x3f0b19(0x15d)](_0x377353=>_0x4b78a6(_0x377353,_0x11fec2['id']))};}return null;}function _0x5ea3(_0x5784d5,_0x3ffdf3){const _0x174a19=_0x174a();return _0x5ea3=function(_0x5ea305,_0x5e395b){_0x5ea305=_0x5ea305-0x143;let _0x4a1167=_0x174a19[_0x5ea305];return _0x4a1167;},_0x5ea3(_0x5784d5,_0x3ffdf3);}let g=class{constructor(_0x396aff,_0x1c4578,_0x325cb6,_0x549c4a){const _0x4e7806=_0x8d019f;this['_httpService']=_0x396aff,this['_userService']=_0x1c4578,this[_0x4e7806(0x1ac)]=_0x325cb6,this['_injector']=_0x549c4a;}async[_0x8d019f(0x19d)](_0x223acd){const _0x4a5ca1=_0x8d019f;var _0x41d34a,_0x150269;const {parentId:_0x1e08cb,unitId:_0x2e82b2,text:_0x2f52c6,threadId:_0x17a4ff}=_0x223acd,_0x6124e6=(_0x150269=(_0x41d34a=_0x2f52c6[_0x4a5ca1(0x1b4)])==null?void 0x0:_0x41d34a[_0x4a5ca1(0x153)](_0x33d9d0=>_0x33d9d0['rangeType']===c['CustomRangeType'][_0x4a5ca1(0x1b6)])[_0x4a5ca1(0x15d)](_0x24e655=>_0x24e655[_0x4a5ca1(0x191)]))!=null?_0x150269:[],_0x214c67=JSON['stringify'](_0x2f52c6),_0x5c25ef=(await this[_0x4a5ca1(0x1ac)][_0x4a5ca1(0x16e)](_0x2e82b2))[_0x4a5ca1(0x1ad)]();if(_0x1e08cb){const _0x8e3b64={'memberId':_0x5c25ef,'unitId':_0x2e82b2,'content':_0x214c67,'mention':_0x6124e6,'threadId':_0x17a4ff},_0x23993e=(await this[_0x4a5ca1(0x182)]['post'](_0x4a5ca1(0x198)+_0x2e82b2+_0x4a5ca1(0x1a2),{'body':_0x8e3b64}))[_0x4a5ca1(0x156)][_0x4a5ca1(0x179)];return{..._0x223acd,'id':_0x23993e[_0x4a5ca1(0x1a9)],'dT':c[_0x4a5ca1(0x159)](+_0x23993e[_0x4a5ca1(0x1a3)])[_0x4a5ca1(0x14b)](_0x4a5ca1(0x177)),'personId':_0x23993e[_0x4a5ca1(0x1a5)]};}else{const _0x3bdf17={'memberId':_0x5c25ef,'unitId':_0x2e82b2,'content':_0x214c67,'mention':_0x6124e6},_0x329cb4=await this[_0x4a5ca1(0x182)][_0x4a5ca1(0x1ba)]('/universer-api/comment/unit/'+_0x2e82b2+_0x4a5ca1(0x1bd),{'body':_0x3bdf17});return Y(_0x329cb4['body'][_0x4a5ca1(0x174)],_0x223acd);}}async[_0x8d019f(0x167)](_0xf63abe){const _0x2f95c0=_0x8d019f;var _0x135a2f,_0x2ceb71;const {text:_0xc7f10c,unitId:_0x5eb54c}=_0xf63abe,_0x18a7ec=(_0x2ceb71=(_0x135a2f=_0xc7f10c[_0x2f95c0(0x1b4)])==null?void 0x0:_0x135a2f['filter'](_0x158b25=>_0x158b25[_0x2f95c0(0x1b9)]===c['CustomRangeType'][_0x2f95c0(0x1b6)])[_0x2f95c0(0x15d)](_0x3a9039=>_0x3a9039['rangeId']))!=null?_0x2ceb71:[],_0x1258f1=JSON['stringify'](_0xc7f10c),_0x3ba589=_0xf63abe[_0x2f95c0(0x169)],_0x4d588e=_0xf63abe['id'],_0x48aa0e={'memberId':(await this[_0x2f95c0(0x1ac)][_0x2f95c0(0x16e)](_0x5eb54c))[_0x2f95c0(0x1ad)](),'unitId':_0x5eb54c,'threadId':_0x3ba589,'mention':_0x18a7ec,'content':_0x1258f1,'replyId':_0x4d588e},_0x4beb4d=await this[_0x2f95c0(0x182)]['post'](_0x2f95c0(0x198)+_0x5eb54c+_0x2f95c0(0x1aa),{'body':_0x48aa0e});return!_0x4beb4d[_0x2f95c0(0x156)][_0x2f95c0(0x197)]||_0x4beb4d[_0x2f95c0(0x156)][_0x2f95c0(0x197)][_0x2f95c0(0x190)]===0x1;}async[_0x8d019f(0x15c)](_0x488ad3){const _0x4e9785=_0x8d019f,{unitId:_0x5c2520}=_0x488ad3,_0x5be6b8=_0x488ad3[_0x4e9785(0x169)],_0x3b090a={'memberId':this[_0x4e9785(0x1a7)][_0x4e9785(0x143)]()[_0x4e9785(0x170)],'unitId':_0x5c2520,'threadId':_0x5be6b8,'solved':_0x488ad3[_0x4e9785(0x183)]?I[_0x4e9785(0x180)]:I[_0x4e9785(0x19a)]},_0x1674ea=await this['_httpService'][_0x4e9785(0x1ba)](_0x4e9785(0x198)+_0x5c2520+_0x4e9785(0x189),{'body':_0x3b090a});return!_0x1674ea['body'][_0x4e9785(0x197)]||_0x1674ea['body'][_0x4e9785(0x197)][_0x4e9785(0x190)]===0x1;}async[_0x8d019f(0x163)](_0x9725cf,_0xef821f,_0x1d01fd,_0x43b972){const _0x2a4ceb=_0x8d019f,_0x861b7c={'memberId':(await this[_0x2a4ceb(0x1ac)]['requireSession'](_0x9725cf))[_0x2a4ceb(0x1ad)](),'threadId':_0x1d01fd,'replyId':_0x43b972,'unitId':_0x9725cf},_0xe7834c=await this['_httpService'][_0x2a4ceb(0x1ba)](_0x2a4ceb(0x198)+_0x9725cf+_0x2a4ceb(0x16b),{'body':_0x861b7c});return!_0xe7834c[_0x2a4ceb(0x156)][_0x2a4ceb(0x197)]||_0xe7834c[_0x2a4ceb(0x156)][_0x2a4ceb(0x197)]['code']===0x1;}async['listComments'](_0x27bbb4,_0x56c71a,_0x3a7624){const _0x97c795=_0x8d019f,_0x50a12c={'unitId':_0x27bbb4,'threadId':_0x3a7624},_0x21fde1=await this['_httpService']['post'](_0x97c795(0x198)+_0x27bbb4+_0x97c795(0x17a),{'body':_0x50a12c}),_0x3fa129=_0x3a7624[_0x97c795(0x15d)](_0xad2900=>G(_0x21fde1[_0x97c795(0x156)][_0x97c795(0x1bb)][_0xad2900],_0x27bbb4,_0x56c71a))[_0x97c795(0x153)](Boolean);return Object[_0x97c795(0x148)](_0x21fde1['body']['users'])[_0x97c795(0x181)](_0xafda=>{const _0xb63b40=_0x97c795;this['_userService'][_0xb63b40(0x172)](_0xafda);}),_0x3fa129;}[_0x8d019f(0x1a6)](_0x1020fd){const _0x1344a5=_0x8d019f;return{'id':_0x1020fd['id'],'threadId':_0x1020fd[_0x1344a5(0x169)],'ref':_0x1020fd[_0x1344a5(0x16f)]};}};g=x([_(0x0,c[_0x8d019f(0x1bf)](P['HTTPService'])),_(0x1,c['Inject'](c[_0x8d019f(0x17c)])),_(0x2,c[_0x8d019f(0x1bf)](b[_0x8d019f(0x15e)])),_(0x3,c[_0x8d019f(0x1bf)](c[_0x8d019f(0x19c)]))],g);var H=Object[_0x8d019f(0x18e)],J=(_0x5150c8,_0x129248,_0x23ba8d,_0x4ff198)=>{const _0x58f254=_0x8d019f;for(var _0x36f071=_0x4ff198>0x1?void 0x0:_0x4ff198?H(_0x129248,_0x23ba8d):_0x129248,_0x55255c=_0x5150c8[_0x58f254(0x19b)]-0x1,_0x388e3c;_0x55255c>=0x0;_0x55255c--)(_0x388e3c=_0x5150c8[_0x55255c])&&(_0x36f071=_0x388e3c(_0x36f071)||_0x36f071);return _0x36f071;},y=(_0x58c68c,_0x1a3f37)=>(_0x192d96,_0x2d3700)=>_0x1a3f37(_0x192d96,_0x2d3700,_0x58c68c);let C=class extends c['Disposable']{constructor(_0x4fb3ed,_0x2a33c5){const _0x2edc97=_0x8d019f;super(),this['_threadCommentDataSourceService']=_0x4fb3ed,this[_0x2edc97(0x151)]=_0x2a33c5,this['_initDataSource']();}[_0x8d019f(0x1b0)](){const _0x50fd11=_0x8d019f;this[_0x50fd11(0x165)][_0x50fd11(0x16a)]=this['_threadCommentDataSource'],this[_0x50fd11(0x165)][_0x50fd11(0x1b8)]=!0x1;}};C=J([y(0x0,M[_0x8d019f(0x152)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x8d019f(0x14a)],L=Object[_0x8d019f(0x18e)],Z=(_0x58c5a1,_0x277e16,_0x37d34f)=>_0x277e16 in _0x58c5a1?F(_0x58c5a1,_0x277e16,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x37d34f}):_0x58c5a1[_0x277e16]=_0x37d34f,W=(_0x5035e5,_0x3db645,_0xc7e06b,_0xfc069b)=>{for(var _0x28f055=_0xfc069b>0x1?void 0x0:_0xfc069b?L(_0x3db645,_0xc7e06b):_0x3db645,_0x5916d5=_0x5035e5['length']-0x1,_0x4e54f4;_0x5916d5>=0x0;_0x5916d5--)(_0x4e54f4=_0x5035e5[_0x5916d5])&&(_0x28f055=_0x4e54f4(_0x28f055)||_0x28f055);return _0x28f055;},O=(_0xfa84b9,_0x58892d)=>(_0x24e06d,_0x40abca)=>_0x58892d(_0x24e06d,_0x40abca,_0xfa84b9),N=(_0x551975,_0x520395,_0x18f21e)=>Z(_0x551975,typeof _0x520395!='symbol'?_0x520395+'':_0x520395,_0x18f21e);exports[_0x8d019f(0x15a)]=class extends c[_0x8d019f(0x175)]{constructor(_0x1939f0=D,_0x322146,_0x20105e){const _0x1196b5=_0x8d019f;super(),this[_0x1196b5(0x18b)]=_0x1939f0,this['_injector']=_0x322146,this[_0x1196b5(0x1be)]=_0x20105e;const {..._0xf824c4}=c[_0x1196b5(0x186)]({},D,this[_0x1196b5(0x18b)]);this['_configService'][_0x1196b5(0x17b)](q,_0xf824c4);}['onStarting'](){[[g],[C],[p]]['forEach'](_0x1fb00=>{const _0x580a59=_0x5ea3;this[_0x580a59(0x155)][_0x580a59(0x1af)](_0x1fb00);});}[_0x8d019f(0x195)](){const _0xf8a4b6=_0x8d019f;this[_0xf8a4b6(0x155)]['get'](C),this[_0xf8a4b6(0x155)][_0xf8a4b6(0x1bc)](p);}},N(exports[_0x8d019f(0x15a)],_0x8d019f(0x18f),U),N(exports[_0x8d019f(0x15a)],_0x8d019f(0x158),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports[_0x8d019f(0x15a)]=W([c[_0x8d019f(0x147)](j[_0x8d019f(0x150)],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c[_0x8d019f(0x1bf)](c[_0x8d019f(0x19c)])),O(0x2,c['IConfigService'])],exports[_0x8d019f(0x15a)]);
|
|
1
|
+
'use strict';const _0x53388f=_0x100f;(function(_0x1802ff,_0x560897){const _0x39e314=_0x100f,_0x12ba09=_0x1802ff();while(!![]){try{const _0xe13fa3=parseInt(_0x39e314(0x21c))/0x1+parseInt(_0x39e314(0x1de))/0x2*(parseInt(_0x39e314(0x222))/0x3)+-parseInt(_0x39e314(0x217))/0x4+parseInt(_0x39e314(0x1f7))/0x5+-parseInt(_0x39e314(0x1c9))/0x6+parseInt(_0x39e314(0x227))/0x7*(-parseInt(_0x39e314(0x1b0))/0x8)+-parseInt(_0x39e314(0x1d7))/0x9*(-parseInt(_0x39e314(0x218))/0xa);if(_0xe13fa3===_0x560897)break;else _0x12ba09['push'](_0x12ba09['shift']());}catch(_0x398e59){_0x12ba09['push'](_0x12ba09['shift']());}}}(_0x19f5,0xa46d9));Object[_0x53388f(0x1e6)](exports,Symbol[_0x53388f(0x1ea)],{'value':'Module'});const b=require(_0x53388f(0x1ff)),T=require(_0x53388f(0x1c6)),c=require(_0x53388f(0x1e8)),j=require(_0x53388f(0x1eb)),M=require(_0x53388f(0x1cf)),w=require('rxjs'),P=require(_0x53388f(0x1ee)),U=_0x53388f(0x225);var I=(_0x11d7d5=>(_0x11d7d5[_0x11d7d5[_0x53388f(0x201)]=0x0]='OpenOrReOpen',_0x11d7d5[_0x11d7d5[_0x53388f(0x1c1)]=0x1]=_0x53388f(0x1c1),_0x11d7d5[_0x11d7d5[_0x53388f(0x1fd)]=-0x1]=_0x53388f(0x1fd),_0x11d7d5))(I||{}),v=(_0x4c940e=>(_0x4c940e[_0x4c940e[_0x53388f(0x22c)]=0x0]=_0x53388f(0x22c),_0x4c940e[_0x4c940e[_0x53388f(0x1bb)]=0x1]=_0x53388f(0x1bb),_0x4c940e[_0x4c940e['Reply']=0x2]=_0x53388f(0x1b7),_0x4c940e[_0x4c940e[_0x53388f(0x22d)]=0x3]=_0x53388f(0x22d),_0x4c940e[_0x4c940e[_0x53388f(0x1c7)]=0x4]=_0x53388f(0x1c7),_0x4c940e[_0x4c940e['Solve']=0x5]=_0x53388f(0x204),_0x4c940e[_0x4c940e['UNRECOGNIZED']=-0x1]=_0x53388f(0x1fd),_0x4c940e))(v||{});const f=_0x480fa9=>c['dayjs'](new Date(+_0x480fa9))[_0x53388f(0x21d)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x5f260f,_0x508e11)=>{const _0x558468=_0x53388f,_0x56fe11=_0x5f260f[_0x558468(0x1ef)](c[_0x558468(0x1f6)]),_0x364ac2=_0x5f260f[_0x558468(0x1ef)](P[_0x558468(0x1c2)]);_0x508e11[_0x558468(0x21e)](_0x3ee505=>{const _0x2686b2=_0x558468;_0x56fe11[_0x2686b2(0x1d9)](_0x3ee505)&&_0x508e11['delete'](_0x3ee505);}),_0x508e11[_0x558468(0x1dd)]&&(await _0x364ac2[_0x558468(0x1ef)](_0x558468(0x1ce),{'params':{'userIDs':[..._0x508e11]}}))['body'][_0x558468(0x1d5)]['forEach'](_0x4aabdf=>{const _0x50ed7a=_0x558468;_0x4aabdf&&_0x56fe11[_0x50ed7a(0x22a)](_0x4aabdf);});};var $=Object[_0x53388f(0x1d2)],E=(_0x1052da,_0x3189ca,_0x2cea70,_0x43c962)=>{for(var _0x3ff462=_0x43c962>0x1?void 0x0:_0x43c962?$(_0x3189ca,_0x2cea70):_0x3189ca,_0x4236ed=_0x1052da['length']-0x1,_0x7e9c15;_0x4236ed>=0x0;_0x4236ed--)(_0x7e9c15=_0x1052da[_0x4236ed])&&(_0x3ff462=_0x7e9c15(_0x3ff462)||_0x3ff462);return _0x3ff462;},S=(_0x5c5f3b,_0x15da3a)=>(_0x55b754,_0xfe71e9)=>_0x15da3a(_0x55b754,_0xfe71e9,_0x5c5f3b);let p=class extends c[_0x53388f(0x1c8)]{constructor(_0x542661,_0x5e88de,_0x4458ea,_0x46c2b9){const _0x55b5fb=_0x53388f;super(),this[_0x55b5fb(0x1d4)]=_0x542661,this[_0x55b5fb(0x1f0)]=_0x5e88de,this[_0x55b5fb(0x1cd)]=_0x4458ea,this[_0x55b5fb(0x20b)]=_0x46c2b9,this[_0x55b5fb(0x1cc)](),this[_0x55b5fb(0x1b3)]();}['_initUserSync'](){const _0xe346b7=_0x53388f;this[_0xe346b7(0x1b1)](this[_0xe346b7(0x1f0)][_0xe346b7(0x1e3)]['pipe'](w[_0xe346b7(0x1c4)](0x10))[_0xe346b7(0x1fa)](_0x42b26b=>{const _0x2ac1a0=_0xe346b7,_0x318476=new Set();_0x42b26b[_0x2ac1a0(0x21e)](_0x585311=>{const _0x29a6ce=_0x2ac1a0;switch(_0x585311[_0x29a6ce(0x20c)]){case _0x29a6ce(0x1bf):{const _0xf6d983=_0x585311[_0x29a6ce(0x1fb)][_0x29a6ce(0x22b)];_0x318476[_0x29a6ce(0x1bf)](_0xf6d983);break;}}}),R(this[_0x2ac1a0(0x20b)],_0x318476);}));}['_init'](){const _0xffd1f9=_0x53388f;this['disposeWithMe'](this['_commentService']['commentUpdate$'][_0xffd1f9(0x1fa)](async _0x1b8567=>{const _0x180388=_0xffd1f9;var _0x4cbc4d,_0x3d4adc,_0x4c1b3d,_0x16fc99;const _0x33802e=(_0x4cbc4d=this['_threadCommentModel']['getUnit'](_0x1b8567[_0x180388(0x1f8)])[_0x180388(0x221)](_0x4f2c59=>_0x4f2c59[_0x180388(0x1f2)]===_0x1b8567[_0x180388(0x1f2)]))==null?void 0x0:_0x4cbc4d[_0x180388(0x226)];if(!_0x33802e)return;const {unitId:_0x1e04cb,subUnitId:_0x239704}=_0x33802e;switch(_0x1b8567[_0x180388(0x21f)]&&this[_0x180388(0x1cd)][_0x180388(0x22a)](_0x1b8567[_0x180388(0x21f)]),_0x1b8567[_0x180388(0x20c)]){case v[_0x180388(0x1bb)]:break;case v[_0x180388(0x1b7)]:{this[_0x180388(0x1f0)][_0x180388(0x20e)](_0x1e04cb,_0x239704,{'unitId':_0x1e04cb,'subUnitId':_0x239704,'ref':'','id':_0x1b8567['replyId'],'dT':f(+_0x1b8567[_0x180388(0x216)]),'threadId':_0x1b8567['threadId'],'personId':(_0x4c1b3d=(_0x3d4adc=_0x1b8567[_0x180388(0x21f)])==null?void 0x0:_0x3d4adc[_0x180388(0x1ec)])!=null?_0x4c1b3d:_0x1b8567['userId'],'text':JSON['parse'](_0x1b8567[_0x180388(0x1b2)]),'parentId':_0x33802e['id']});break;}case v['Delete']:{const _0x49c71e=this['_threadCommentModel'][_0x180388(0x1bd)](_0x1e04cb,_0x239704,_0x1b8567[_0x180388(0x1b5)]);_0x49c71e&&_0x49c71e[_0x180388(0x1d8)]&&this['_threadCommentModel'][_0x180388(0x1d3)](_0x1e04cb,_0x239704,_0x1b8567[_0x180388(0x1b5)]);break;}case v['Edit']:{this[_0x180388(0x1f0)][_0x180388(0x1fc)](_0x1e04cb,_0x239704,{'commentId':_0x1b8567[_0x180388(0x1b5)],'text':JSON[_0x180388(0x1df)](_0x1b8567[_0x180388(0x1b2)])});break;}case v[_0x180388(0x204)]:{const _0x236878=(_0x16fc99=this['_threadCommentModel']['getUnit'](_0x1b8567[_0x180388(0x1f8)])[_0x180388(0x221)](_0x3a0a51=>_0x3a0a51[_0x180388(0x1f2)]===_0x1b8567[_0x180388(0x1f2)]))==null?void 0x0:_0x16fc99['root'];_0x236878&&this[_0x180388(0x1f0)]['resolveComment'](_0x1e04cb,_0x239704,_0x236878['id'],_0x1b8567['solved']===I[_0x180388(0x1c1)]);break;}}}));}};p=E([S(0x0,c[_0x53388f(0x1e4)](b[_0x53388f(0x20d)])),S(0x1,c['Inject'](M[_0x53388f(0x1ed)])),S(0x2,c['Inject'](c[_0x53388f(0x1f6)])),S(0x3,c[_0x53388f(0x1e4)](c[_0x53388f(0x1f9)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x53388f(0x1d2)],x=(_0x54a806,_0x494606,_0x470a0b,_0x349462)=>{const _0x24d777=_0x53388f;for(var _0x27735a=_0x349462>0x1?void 0x0:_0x349462?A(_0x494606,_0x470a0b):_0x494606,_0x5145c5=_0x54a806[_0x24d777(0x214)]-0x1,_0x14d866;_0x5145c5>=0x0;_0x5145c5--)(_0x14d866=_0x54a806[_0x5145c5])&&(_0x27735a=_0x14d866(_0x27735a)||_0x27735a);return _0x27735a;},_=(_0x1186a8,_0x5068aa)=>(_0x520e5d,_0x402ac4)=>_0x5068aa(_0x520e5d,_0x402ac4,_0x1186a8);function Y(_0x55c658,_0x3bc94a){const _0x1aeac2=_0x53388f,_0x506c21=_0x55c658[_0x1aeac2(0x1e0)][0x0];return{..._0x3bc94a,'id':_0x506c21['replyId'],'resolved':_0x55c658['solved']===0x1,'dT':f(_0x506c21['createTimestamp']),'personId':_0x506c21[_0x1aeac2(0x1be)],'threadId':_0x506c21[_0x1aeac2(0x1f2)]};}function _0x19f5(){const _0x13bf8e=['525627oYXNUb','requireSession','/solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','root','21mAkZAG','UniverCollaborationClientPlugin','stringify','addUser','personId','Unknown','Edit','CollaborationSessionService','onStarting','2661512XNXtHp','disposeWithMe','content','_initUserSync','IThreadCommentDataSourceService','replyId','comments','Reply','/add','map','UniverThreadCommentUIPlugin','Add','error','getComment','userId','add','post','Solved','HTTPService','_httpService','bufferTime','values','@univerjs-pro/license','Delete','Disposable','7539126nlQJQr','_config','_sessionService','_init','_userService','/universer-api/user/list','@univerjs/thread-comment','dayjs','/edit','getOwnPropertyDescriptor','deleteComment','_commentService','users','Plugin','1332jqpbON','parentId','getUser','resolved','body','symbol','size','14itQHxI','parse','replies','_threadCommentDataSourceService','_initDataSource','commentUpdate$','Inject','YYYY/MM/DD\x20HH:mm','defineProperty','_threadCommentDataSource','@univerjs/core','/universer-api/comment/unit/','toStringTag','@univerjs/thread-comment-ui','userID','ThreadCommentModel','@univerjs/network','get','_threadCommentModel','IConfigService','threadId','code','filter','onReady','UserManagerService','1506640ByQuuX','unitId','Injector','subscribe','payload','updateComment','UNRECOGNIZED','CustomRangeType','@univerjs-pro/collaboration-client','customRanges','OpenOrReOpen','UNIVER_UNKNOWN','UniverThreadCommentDataSourcePlugin','Solve','/reply','syncUpdateMutationToColla','getMemberID','reply','pluginName','resolveComment','_injector','type','CommentService','addComment','rangeId','DependentOn','dataSource','rangeType','COMMENT','length','ref','createTimestamp','3209824kqrXPg','124910kwELWN','/list','/delete','slice','354082RbtffM','format','forEach','user','UniverLicensePlugin','find'];_0x19f5=function(){return _0x13bf8e;};return _0x19f5();}function G(_0x5c8ff3,_0x5afbe0,_0x119871){const _0xa321f=_0x53388f;var _0x443389,_0x293b85;if(((_0x293b85=(_0x443389=_0x5c8ff3==null?void 0x0:_0x5c8ff3[_0xa321f(0x1e0)])==null?void 0x0:_0x443389[_0xa321f(0x214)])!=null?_0x293b85:0x0)>0x0){const _0x2d9e24=(_0x53a178,_0x481eff)=>({'id':_0x53a178['replyId'],'threadId':_0x53a178['threadId'],'dT':f(_0x53a178[_0xa321f(0x216)]),'personId':_0x53a178[_0xa321f(0x1be)],'resolved':_0x5c8ff3['solved']===I[_0xa321f(0x1c1)],'unitId':_0x5afbe0,'subUnitId':_0x119871,'text':JSON['parse'](_0x53a178['content']),'parentId':_0x481eff}),_0x57fc1f=_0x2d9e24(_0x5c8ff3[_0xa321f(0x1e0)][0x0]);return{..._0x57fc1f,'children':_0x5c8ff3['replies'][_0xa321f(0x21b)](0x1)[_0xa321f(0x1b9)](_0x12a3a6=>_0x2d9e24(_0x12a3a6,_0x57fc1f['id']))};}return null;}let g=class{constructor(_0x3f7217,_0x554611,_0x2ec9ab,_0x1187cf){const _0x46a873=_0x53388f;this[_0x46a873(0x1c3)]=_0x3f7217,this[_0x46a873(0x1cd)]=_0x554611,this[_0x46a873(0x1cb)]=_0x2ec9ab,this['_injector']=_0x1187cf;}async[_0x53388f(0x20e)](_0x108e16){const _0x14a535=_0x53388f;var _0x468e3c,_0xf4cfb3;const {parentId:_0x49fe3e,unitId:_0x2d8199,text:_0x58d129,threadId:_0x482902}=_0x108e16,_0x4b77f6=(_0xf4cfb3=(_0x468e3c=_0x58d129[_0x14a535(0x200)])==null?void 0x0:_0x468e3c[_0x14a535(0x1f4)](_0x43dd7b=>_0x43dd7b[_0x14a535(0x212)]===c[_0x14a535(0x1fe)][_0x14a535(0x213)])[_0x14a535(0x1b9)](_0x35af65=>_0x35af65[_0x14a535(0x20f)]))!=null?_0xf4cfb3:[],_0x38cf49=JSON[_0x14a535(0x229)](_0x58d129),_0xb54ea3=(await this[_0x14a535(0x1cb)][_0x14a535(0x223)](_0x2d8199))[_0x14a535(0x207)]();if(_0x49fe3e){const _0xe0ae75={'memberId':_0xb54ea3,'unitId':_0x2d8199,'content':_0x38cf49,'mention':_0x4b77f6,'threadId':_0x482902},_0x326d33=(await this[_0x14a535(0x1c3)][_0x14a535(0x1c0)]('/universer-api/comment/unit/'+_0x2d8199+_0x14a535(0x205),{'body':_0xe0ae75}))['body'][_0x14a535(0x208)];return{..._0x108e16,'id':_0x326d33['replyId'],'dT':c[_0x14a535(0x1d0)](+_0x326d33[_0x14a535(0x216)])[_0x14a535(0x21d)](_0x14a535(0x1e5)),'personId':_0x326d33[_0x14a535(0x1be)]};}else{const _0x4f3953={'memberId':_0xb54ea3,'unitId':_0x2d8199,'content':_0x38cf49,'mention':_0x4b77f6},_0x36de18=await this[_0x14a535(0x1c3)]['post']('/universer-api/comment/unit/'+_0x2d8199+_0x14a535(0x1b8),{'body':_0x4f3953});return Y(_0x36de18[_0x14a535(0x1db)]['comment'],_0x108e16);}}async[_0x53388f(0x1fc)](_0x2d947c){const _0x136aad=_0x53388f;var _0x62bc18,_0x399692;const {text:_0x231e32,unitId:_0x285d8f}=_0x2d947c,_0x2cd41a=(_0x399692=(_0x62bc18=_0x231e32[_0x136aad(0x200)])==null?void 0x0:_0x62bc18['filter'](_0x2c7c82=>_0x2c7c82[_0x136aad(0x212)]===c[_0x136aad(0x1fe)]['COMMENT'])['map'](_0x259e7e=>_0x259e7e[_0x136aad(0x20f)]))!=null?_0x399692:[],_0x3981d5=JSON[_0x136aad(0x229)](_0x231e32),_0x12fa8f=_0x2d947c[_0x136aad(0x1f2)],_0x4ce35c=_0x2d947c['id'],_0x458224={'memberId':(await this[_0x136aad(0x1cb)][_0x136aad(0x223)](_0x285d8f))[_0x136aad(0x207)](),'unitId':_0x285d8f,'threadId':_0x12fa8f,'mention':_0x2cd41a,'content':_0x3981d5,'replyId':_0x4ce35c},_0x43ea0a=await this['_httpService'][_0x136aad(0x1c0)]('/universer-api/comment/unit/'+_0x285d8f+_0x136aad(0x1d1),{'body':_0x458224});return!_0x43ea0a['body'][_0x136aad(0x1bc)]||_0x43ea0a['body'][_0x136aad(0x1bc)][_0x136aad(0x1f3)]===0x1;}async[_0x53388f(0x20a)](_0x1b6e01){const _0x54ee6b=_0x53388f,{unitId:_0x2b59ea}=_0x1b6e01,_0x24fefc=_0x1b6e01[_0x54ee6b(0x1f2)],_0x51d94f={'memberId':this[_0x54ee6b(0x1cd)]['getCurrentUser']()[_0x54ee6b(0x1ec)],'unitId':_0x2b59ea,'threadId':_0x24fefc,'solved':_0x1b6e01[_0x54ee6b(0x1da)]?I[_0x54ee6b(0x1c1)]:I['OpenOrReOpen']},_0x594115=await this[_0x54ee6b(0x1c3)][_0x54ee6b(0x1c0)](_0x54ee6b(0x1e9)+_0x2b59ea+_0x54ee6b(0x224),{'body':_0x51d94f});return!_0x594115[_0x54ee6b(0x1db)][_0x54ee6b(0x1bc)]||_0x594115['body']['error'][_0x54ee6b(0x1f3)]===0x1;}async['deleteComment'](_0x407303,_0x27fcf0,_0x417498,_0x41e7e6){const _0x380218=_0x53388f,_0x54f340={'memberId':(await this['_sessionService'][_0x380218(0x223)](_0x407303))[_0x380218(0x207)](),'threadId':_0x417498,'replyId':_0x41e7e6,'unitId':_0x407303},_0x46d98e=await this[_0x380218(0x1c3)]['post'](_0x380218(0x1e9)+_0x407303+_0x380218(0x21a),{'body':_0x54f340});return!_0x46d98e['body'][_0x380218(0x1bc)]||_0x46d98e[_0x380218(0x1db)][_0x380218(0x1bc)][_0x380218(0x1f3)]===0x1;}async['listComments'](_0x4d1258,_0x5998fd,_0x10a09c){const _0x12ccd2=_0x53388f,_0x5dd54b={'unitId':_0x4d1258,'threadId':_0x10a09c},_0x402469=await this[_0x12ccd2(0x1c3)][_0x12ccd2(0x1c0)]('/universer-api/comment/unit/'+_0x4d1258+_0x12ccd2(0x219),{'body':_0x5dd54b}),_0xd2b0d1=_0x10a09c[_0x12ccd2(0x1b9)](_0xfdf14f=>G(_0x402469[_0x12ccd2(0x1db)][_0x12ccd2(0x1b6)][_0xfdf14f],_0x4d1258,_0x5998fd))[_0x12ccd2(0x1f4)](Boolean);return Object[_0x12ccd2(0x1c5)](_0x402469[_0x12ccd2(0x1db)][_0x12ccd2(0x1d5)])['forEach'](_0x298147=>{const _0x309f57=_0x12ccd2;this[_0x309f57(0x1cd)]['addUser'](_0x298147);}),_0xd2b0d1;}['saveCommentToSnapshot'](_0x4af46d){const _0x2d4b19=_0x53388f;return{'id':_0x4af46d['id'],'threadId':_0x4af46d[_0x2d4b19(0x1f2)],'ref':_0x4af46d[_0x2d4b19(0x215)]};}};g=x([_(0x0,c['Inject'](P['HTTPService'])),_(0x1,c[_0x53388f(0x1e4)](c[_0x53388f(0x1f6)])),_(0x2,c[_0x53388f(0x1e4)](b[_0x53388f(0x22e)])),_(0x3,c[_0x53388f(0x1e4)](c[_0x53388f(0x1f9)]))],g);function _0x100f(_0xddc602,_0x51b4e1){const _0x19f50e=_0x19f5();return _0x100f=function(_0x100f9e,_0x13b926){_0x100f9e=_0x100f9e-0x1b0;let _0x224dfb=_0x19f50e[_0x100f9e];return _0x224dfb;},_0x100f(_0xddc602,_0x51b4e1);}var H=Object[_0x53388f(0x1d2)],J=(_0x44f201,_0x441d3d,_0x1b15ae,_0x459054)=>{const _0x1d60db=_0x53388f;for(var _0x164fb3=_0x459054>0x1?void 0x0:_0x459054?H(_0x441d3d,_0x1b15ae):_0x441d3d,_0x5bb6dd=_0x44f201[_0x1d60db(0x214)]-0x1,_0x274dcd;_0x5bb6dd>=0x0;_0x5bb6dd--)(_0x274dcd=_0x44f201[_0x5bb6dd])&&(_0x164fb3=_0x274dcd(_0x164fb3)||_0x164fb3);return _0x164fb3;},y=(_0x80b87f,_0x235e02)=>(_0x1f0a71,_0x176e09)=>_0x235e02(_0x1f0a71,_0x176e09,_0x80b87f);let C=class extends c[_0x53388f(0x1c8)]{constructor(_0x3884ac,_0x45d62e){const _0x19e91c=_0x53388f;super(),this[_0x19e91c(0x1e1)]=_0x3884ac,this[_0x19e91c(0x1e7)]=_0x45d62e,this[_0x19e91c(0x1e2)]();}[_0x53388f(0x1e2)](){const _0x2d3ff8=_0x53388f;this[_0x2d3ff8(0x1e1)][_0x2d3ff8(0x211)]=this[_0x2d3ff8(0x1e7)],this[_0x2d3ff8(0x1e1)][_0x2d3ff8(0x206)]=!0x1;}};C=J([y(0x0,M[_0x53388f(0x1b4)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x53388f(0x1e6)],L=Object[_0x53388f(0x1d2)],Z=(_0x170085,_0x4a9d4b,_0x557e43)=>_0x4a9d4b in _0x170085?F(_0x170085,_0x4a9d4b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x557e43}):_0x170085[_0x4a9d4b]=_0x557e43,W=(_0x553b42,_0x3e72a1,_0x265465,_0x520f69)=>{const _0x565d26=_0x53388f;for(var _0x3a6ab4=_0x520f69>0x1?void 0x0:_0x520f69?L(_0x3e72a1,_0x265465):_0x3e72a1,_0x4beac8=_0x553b42[_0x565d26(0x214)]-0x1,_0x439b32;_0x4beac8>=0x0;_0x4beac8--)(_0x439b32=_0x553b42[_0x4beac8])&&(_0x3a6ab4=_0x439b32(_0x3a6ab4)||_0x3a6ab4);return _0x3a6ab4;},O=(_0x36cee0,_0x5a6bc7)=>(_0x75e7fd,_0x341928)=>_0x5a6bc7(_0x75e7fd,_0x341928,_0x36cee0),N=(_0x3122c7,_0x266998,_0x14c3ec)=>Z(_0x3122c7,typeof _0x266998!=_0x53388f(0x1dc)?_0x266998+'':_0x266998,_0x14c3ec);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x53388f(0x1d6)]{constructor(_0x227b6b=D,_0x5e9b02,_0x5cb0c8){const _0x502101=_0x53388f;super(),this[_0x502101(0x1ca)]=_0x227b6b,this['_injector']=_0x5e9b02,this['_configService']=_0x5cb0c8;const {..._0x45830a}=c['merge']({},D,this[_0x502101(0x1ca)]);this['_configService']['setConfig'](q,_0x45830a);}[_0x53388f(0x22f)](){const _0x2937c4=_0x53388f;[[g],[C],[p]][_0x2937c4(0x21e)](_0x2ff1ec=>{const _0x35b33f=_0x2937c4;this[_0x35b33f(0x20b)][_0x35b33f(0x1bf)](_0x2ff1ec);});}[_0x53388f(0x1f5)](){const _0x44d981=_0x53388f;this[_0x44d981(0x20b)][_0x44d981(0x1ef)](C),this[_0x44d981(0x20b)][_0x44d981(0x1ef)](p);}},N(exports[_0x53388f(0x203)],_0x53388f(0x209),U),N(exports[_0x53388f(0x203)],_0x53388f(0x20c),c['UniverInstanceType'][_0x53388f(0x202)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x53388f(0x210)](j[_0x53388f(0x1ba)],b[_0x53388f(0x228)],T[_0x53388f(0x220)]),O(0x1,c['Inject'](c['Injector'])),O(0x2,c[_0x53388f(0x1f1)])],exports[_0x53388f(0x203)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x255719=_0xb414;function _0x4aa3(){const _0x33937d=['defineProperty','updateComment','dataSource','comment','Solved','disposeWithMe','4864tjzPHl','_threadCommentModel','_injector','reply','_config','Reply','replies','getUser','delete','/delete','UNRECOGNIZED','_configService','root','code','/solved','_commentService','377548oNhsNB','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Delete','1190861XmcYqy','6299559QIqsLE','Add','size','post','error','forEach','getMemberID','549560soQPYV','createTimestamp','ref','map','body','rangeId','users','onStarting','threadId','getComment','/list','find','_sessionService','get','saveCommentToSnapshot','pipe','deleteComment','replyId','COMMENT','_httpService','/reply','_userService','6NetboK','_initDataSource','_init','length','Edit','type','addUser','commentUpdate$','filter','parse','171622CMGyvU','12tyazLD','51402weCCQO','customRanges','rangeType','Solve','requireSession','_threadCommentDataSourceService','/universer-api/comment/unit/','resolveComment','format','addComment','setConfig','/universer-api/user/list','content','getOwnPropertyDescriptor','add','values','unitId','solved','user','personId','onReady','stringify','userID','listComments','OpenOrReOpen','pluginName','userId','Unknown','YYYY/MM/DD\x20HH:mm','getUnit','_threadCommentDataSource','payload','/edit'];_0x4aa3=function(){return _0x33937d;};return _0x4aa3();}(function(_0x4f2022,_0x4cdb81){const _0x5024d8=_0xb414,_0x413151=_0x4f2022();while(!![]){try{const _0x272e5f=-parseInt(_0x5024d8(0x175))/0x1+-parseInt(_0x5024d8(0x177))/0x2+-parseInt(_0x5024d8(0x16b))/0x3*(-parseInt(_0x5024d8(0x14a))/0x4)+-parseInt(_0x5024d8(0x155))/0x5+parseInt(_0x5024d8(0x176))/0x6*(-parseInt(_0x5024d8(0x14d))/0x7)+parseInt(_0x5024d8(0x13a))/0x8+parseInt(_0x5024d8(0x14e))/0x9;if(_0x272e5f===_0x4cdb81)break;else _0x413151['push'](_0x413151['shift']());}catch(_0x15405c){_0x413151['push'](_0x413151['shift']());}}}(_0x4aa3,0x3b0bc));import{CommentService as _0x251251,CollaborationSessionService as _0x5b2a6f,UniverCollaborationClientPlugin as _0x16ccf1}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x219b5c}from'@univerjs-pro/license';import{dayjs as _0x189502,UserManagerService as _0x5f0907,Inject as _0x41fdfe,Injector as _0x3832fe,Disposable as _0x160754,CustomRangeType as _0x1d3389,UniverInstanceType as _0x652023,DependentOn as _0x167230,IConfigService as _0x3ae480,Plugin as _0x1c2fb5,merge as _0xc8f13a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x267ce8}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x448e16,IThreadCommentDataSourceService as _0x12c648}from'@univerjs/thread-comment';import{bufferTime as _0x3cf8d4}from'rxjs';import{HTTPService as _0x514fce}from'@univerjs/network';const W=_0x255719(0x14b);var I=(_0x17e0bb=>(_0x17e0bb[_0x17e0bb['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x17e0bb[_0x17e0bb[_0x255719(0x138)]=0x1]='Solved',_0x17e0bb[_0x17e0bb['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x17e0bb))(I||{}),v=(_0x3dca15=>(_0x3dca15[_0x3dca15['Unknown']=0x0]=_0x255719(0x192),_0x3dca15[_0x3dca15[_0x255719(0x14f)]=0x1]=_0x255719(0x14f),_0x3dca15[_0x3dca15[_0x255719(0x13f)]=0x2]='Reply',_0x3dca15[_0x3dca15[_0x255719(0x16f)]=0x3]=_0x255719(0x16f),_0x3dca15[_0x3dca15[_0x255719(0x14c)]=0x4]=_0x255719(0x14c),_0x3dca15[_0x3dca15['Solve']=0x5]=_0x255719(0x17a),_0x3dca15[_0x3dca15[_0x255719(0x144)]=-0x1]=_0x255719(0x144),_0x3dca15))(v||{});const D=_0x4ecccb=>_0x189502(new Date(+_0x4ecccb))[_0x255719(0x17f)](_0x255719(0x193)),B=async(_0x277f21,_0x3303c7)=>{const _0x4ed143=_0x255719,_0x44d5ba=_0x277f21['get'](_0x5f0907),_0x14c853=_0x277f21[_0x4ed143(0x162)](_0x514fce);_0x3303c7['forEach'](_0xaac077=>{const _0xd659d8=_0x4ed143;_0x44d5ba[_0xd659d8(0x141)](_0xaac077)&&_0x3303c7[_0xd659d8(0x142)](_0xaac077);}),_0x3303c7[_0x4ed143(0x150)]&&(await _0x14c853[_0x4ed143(0x162)](_0x4ed143(0x182),{'params':{'userIDs':[..._0x3303c7]}}))[_0x4ed143(0x159)][_0x4ed143(0x15b)]['forEach'](_0x3743fd=>{const _0x13aaeb=_0x4ed143;_0x3743fd&&_0x44d5ba[_0x13aaeb(0x171)](_0x3743fd);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x40088c,_0x1c3943,_0x3d3d81,_0x2a14f9)=>{const _0xf37554=_0x255719;for(var _0x200728=_0x2a14f9>0x1?void 0x0:_0x2a14f9?K(_0x1c3943,_0x3d3d81):_0x1c3943,_0x5f0f5f=_0x40088c[_0xf37554(0x16e)]-0x1,_0x4e0ac9;_0x5f0f5f>=0x0;_0x5f0f5f--)(_0x4e0ac9=_0x40088c[_0x5f0f5f])&&(_0x200728=_0x4e0ac9(_0x200728)||_0x200728);return _0x200728;},p=(_0x3e1a39,_0x236937)=>(_0x10e7ba,_0x43d44c)=>_0x236937(_0x10e7ba,_0x43d44c,_0x3e1a39);let S=class extends _0x160754{constructor(_0x1cf156,_0x3d3b4d,_0x571cb3,_0x42e27a){const _0x1e81a0=_0x255719;super(),this[_0x1e81a0(0x149)]=_0x1cf156,this[_0x1e81a0(0x13b)]=_0x3d3b4d,this['_userService']=_0x571cb3,this['_injector']=_0x42e27a,this[_0x1e81a0(0x16d)](),this['_initUserSync']();}['_initUserSync'](){const _0x53052c=_0x255719;this[_0x53052c(0x139)](this[_0x53052c(0x13b)][_0x53052c(0x172)][_0x53052c(0x164)](_0x3cf8d4(0x10))['subscribe'](_0x281303=>{const _0x5a89d3=_0x53052c,_0x5d5381=new Set();_0x281303[_0x5a89d3(0x153)](_0x419bcc=>{const _0x52038d=_0x5a89d3;switch(_0x419bcc[_0x52038d(0x170)]){case _0x52038d(0x185):{const _0x3140ad=_0x419bcc[_0x52038d(0x132)][_0x52038d(0x18a)];_0x5d5381[_0x52038d(0x185)](_0x3140ad);break;}}}),B(this[_0x5a89d3(0x13c)],_0x5d5381);}));}[_0x255719(0x16d)](){const _0x34a98e=_0x255719;this[_0x34a98e(0x139)](this['_commentService'][_0x34a98e(0x172)]['subscribe'](async _0x20aa40=>{const _0x2e419e=_0x34a98e;var _0xc352dc,_0x309684,_0x2929bc,_0x8a0c31;const _0x4aad68=(_0xc352dc=this[_0x2e419e(0x13b)][_0x2e419e(0x194)](_0x20aa40[_0x2e419e(0x187)])['find'](_0x1d86c3=>_0x1d86c3[_0x2e419e(0x15d)]===_0x20aa40[_0x2e419e(0x15d)]))==null?void 0x0:_0xc352dc[_0x2e419e(0x146)];if(!_0x4aad68)return;const {unitId:_0x126fc3,subUnitId:_0x4044d6}=_0x4aad68;switch(_0x20aa40[_0x2e419e(0x189)]&&this[_0x2e419e(0x16a)][_0x2e419e(0x171)](_0x20aa40[_0x2e419e(0x189)]),_0x20aa40[_0x2e419e(0x170)]){case v[_0x2e419e(0x14f)]:break;case v[_0x2e419e(0x13f)]:{this['_threadCommentModel'][_0x2e419e(0x180)](_0x126fc3,_0x4044d6,{'unitId':_0x126fc3,'subUnitId':_0x4044d6,'ref':'','id':_0x20aa40[_0x2e419e(0x166)],'dT':D(+_0x20aa40[_0x2e419e(0x156)]),'threadId':_0x20aa40[_0x2e419e(0x15d)],'personId':(_0x2929bc=(_0x309684=_0x20aa40[_0x2e419e(0x189)])==null?void 0x0:_0x309684[_0x2e419e(0x18d)])!=null?_0x2929bc:_0x20aa40[_0x2e419e(0x191)],'text':JSON[_0x2e419e(0x174)](_0x20aa40[_0x2e419e(0x183)]),'parentId':_0x4aad68['id']});break;}case v[_0x2e419e(0x14c)]:{const _0x44cb25=this['_threadCommentModel'][_0x2e419e(0x15e)](_0x126fc3,_0x4044d6,_0x20aa40[_0x2e419e(0x166)]);_0x44cb25&&_0x44cb25['parentId']&&this[_0x2e419e(0x13b)][_0x2e419e(0x165)](_0x126fc3,_0x4044d6,_0x20aa40[_0x2e419e(0x166)]);break;}case v['Edit']:{this[_0x2e419e(0x13b)]['updateComment'](_0x126fc3,_0x4044d6,{'commentId':_0x20aa40['replyId'],'text':JSON['parse'](_0x20aa40[_0x2e419e(0x183)])});break;}case v[_0x2e419e(0x17a)]:{const _0x1f45fd=(_0x8a0c31=this[_0x2e419e(0x13b)][_0x2e419e(0x194)](_0x20aa40[_0x2e419e(0x187)])[_0x2e419e(0x160)](_0x2aba51=>_0x2aba51[_0x2e419e(0x15d)]===_0x20aa40[_0x2e419e(0x15d)]))==null?void 0x0:_0x8a0c31[_0x2e419e(0x146)];_0x1f45fd&&this[_0x2e419e(0x13b)][_0x2e419e(0x17e)](_0x126fc3,_0x4044d6,_0x1f45fd['id'],_0x20aa40['solved']===I[_0x2e419e(0x138)]);break;}}}));}};function _0xb414(_0x47fcca,_0x8f1c01){const _0x4aa3da=_0x4aa3();return _0xb414=function(_0xb414e9,_0x4adb4f){_0xb414e9=_0xb414e9-0x131;let _0x1dfc52=_0x4aa3da[_0xb414e9];return _0x1dfc52;},_0xb414(_0x47fcca,_0x8f1c01);}S=V([p(0x0,_0x41fdfe(_0x251251)),p(0x1,_0x41fdfe(_0x448e16)),p(0x2,_0x41fdfe(_0x5f0907)),p(0x3,_0x41fdfe(_0x3832fe))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x255719(0x184)],Q=(_0x142e92,_0x26dc1a,_0x3798e7,_0x320379)=>{const _0x2f4067=_0x255719;for(var _0x273185=_0x320379>0x1?void 0x0:_0x320379?k(_0x26dc1a,_0x3798e7):_0x26dc1a,_0x181780=_0x142e92[_0x2f4067(0x16e)]-0x1,_0x61f074;_0x181780>=0x0;_0x181780--)(_0x61f074=_0x142e92[_0x181780])&&(_0x273185=_0x61f074(_0x273185)||_0x273185);return _0x273185;},_=(_0x4e5a6f,_0x1d174f)=>(_0xdc22cc,_0x5d4be0)=>_0x1d174f(_0xdc22cc,_0x5d4be0,_0x4e5a6f);function X(_0x20f862,_0x32e04f){const _0x240715=_0x255719,_0x2196ed=_0x20f862[_0x240715(0x140)][0x0];return{..._0x32e04f,'id':_0x2196ed[_0x240715(0x166)],'resolved':_0x20f862[_0x240715(0x188)]===0x1,'dT':D(_0x2196ed['createTimestamp']),'personId':_0x2196ed[_0x240715(0x191)],'threadId':_0x2196ed['threadId']};}function ee(_0x1a2011,_0x2febb3,_0x417667){const _0x4e31b8=_0x255719;var _0x265e73,_0x291085;if(((_0x291085=(_0x265e73=_0x1a2011==null?void 0x0:_0x1a2011[_0x4e31b8(0x140)])==null?void 0x0:_0x265e73['length'])!=null?_0x291085:0x0)>0x0){const _0x58bab9=(_0x19d169,_0x3011dc)=>({'id':_0x19d169[_0x4e31b8(0x166)],'threadId':_0x19d169['threadId'],'dT':D(_0x19d169['createTimestamp']),'personId':_0x19d169[_0x4e31b8(0x191)],'resolved':_0x1a2011[_0x4e31b8(0x188)]===I['Solved'],'unitId':_0x2febb3,'subUnitId':_0x417667,'text':JSON[_0x4e31b8(0x174)](_0x19d169[_0x4e31b8(0x183)]),'parentId':_0x3011dc}),_0x310199=_0x58bab9(_0x1a2011[_0x4e31b8(0x140)][0x0]);return{..._0x310199,'children':_0x1a2011[_0x4e31b8(0x140)]['slice'](0x1)[_0x4e31b8(0x158)](_0x29c25b=>_0x58bab9(_0x29c25b,_0x310199['id']))};}return null;}let f=class{constructor(_0x409b86,_0x38e259,_0x3df38b,_0xa6d6c8){const _0xf079a5=_0x255719;this[_0xf079a5(0x168)]=_0x409b86,this[_0xf079a5(0x16a)]=_0x38e259,this[_0xf079a5(0x161)]=_0x3df38b,this[_0xf079a5(0x13c)]=_0xa6d6c8;}async[_0x255719(0x180)](_0x3d2aca){const _0x1b5533=_0x255719;var _0x14de00,_0xf86806;const {parentId:_0x1131c8,unitId:_0x37779d,text:_0x1a62ab,threadId:_0x13d972}=_0x3d2aca,_0x3b3283=(_0xf86806=(_0x14de00=_0x1a62ab[_0x1b5533(0x178)])==null?void 0x0:_0x14de00[_0x1b5533(0x173)](_0x40b922=>_0x40b922[_0x1b5533(0x179)]===_0x1d3389[_0x1b5533(0x167)])[_0x1b5533(0x158)](_0x7ab2d2=>_0x7ab2d2[_0x1b5533(0x15a)]))!=null?_0xf86806:[],_0x4fd599=JSON['stringify'](_0x1a62ab),_0x16d3c2=(await this[_0x1b5533(0x161)][_0x1b5533(0x17b)](_0x37779d))[_0x1b5533(0x154)]();if(_0x1131c8){const _0x4820ad={'memberId':_0x16d3c2,'unitId':_0x37779d,'content':_0x4fd599,'mention':_0x3b3283,'threadId':_0x13d972},_0x3e27b2=(await this[_0x1b5533(0x168)][_0x1b5533(0x151)](_0x1b5533(0x17d)+_0x37779d+_0x1b5533(0x169),{'body':_0x4820ad}))['body'][_0x1b5533(0x13d)];return{..._0x3d2aca,'id':_0x3e27b2[_0x1b5533(0x166)],'dT':_0x189502(+_0x3e27b2[_0x1b5533(0x156)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x3e27b2[_0x1b5533(0x191)]};}else{const _0x46aa2c={'memberId':_0x16d3c2,'unitId':_0x37779d,'content':_0x4fd599,'mention':_0x3b3283},_0x3c610c=await this[_0x1b5533(0x168)][_0x1b5533(0x151)](_0x1b5533(0x17d)+_0x37779d+'/add',{'body':_0x46aa2c});return X(_0x3c610c[_0x1b5533(0x159)][_0x1b5533(0x137)],_0x3d2aca);}}async[_0x255719(0x135)](_0x7685ad){const _0x1a2817=_0x255719;var _0x193b0a,_0x534894;const {text:_0x41c979,unitId:_0x3dcc69}=_0x7685ad,_0x2d2a41=(_0x534894=(_0x193b0a=_0x41c979[_0x1a2817(0x178)])==null?void 0x0:_0x193b0a[_0x1a2817(0x173)](_0x371346=>_0x371346[_0x1a2817(0x179)]===_0x1d3389[_0x1a2817(0x167)])[_0x1a2817(0x158)](_0x1bc13e=>_0x1bc13e['rangeId']))!=null?_0x534894:[],_0x2e8ae2=JSON[_0x1a2817(0x18c)](_0x41c979),_0x32c344=_0x7685ad[_0x1a2817(0x15d)],_0x157205=_0x7685ad['id'],_0x3e683b={'memberId':(await this['_sessionService'][_0x1a2817(0x17b)](_0x3dcc69))[_0x1a2817(0x154)](),'unitId':_0x3dcc69,'threadId':_0x32c344,'mention':_0x2d2a41,'content':_0x2e8ae2,'replyId':_0x157205},_0x404664=await this[_0x1a2817(0x168)]['post'](_0x1a2817(0x17d)+_0x3dcc69+_0x1a2817(0x133),{'body':_0x3e683b});return!_0x404664[_0x1a2817(0x159)]['error']||_0x404664[_0x1a2817(0x159)]['error'][_0x1a2817(0x147)]===0x1;}async['resolveComment'](_0x5e9b6a){const _0x263f15=_0x255719,{unitId:_0x3d5793}=_0x5e9b6a,_0x48b100=_0x5e9b6a[_0x263f15(0x15d)],_0x3fb9a7={'memberId':this['_userService']['getCurrentUser']()[_0x263f15(0x18d)],'unitId':_0x3d5793,'threadId':_0x48b100,'solved':_0x5e9b6a['resolved']?I[_0x263f15(0x138)]:I[_0x263f15(0x18f)]},_0x185625=await this['_httpService'][_0x263f15(0x151)]('/universer-api/comment/unit/'+_0x3d5793+_0x263f15(0x148),{'body':_0x3fb9a7});return!_0x185625[_0x263f15(0x159)][_0x263f15(0x152)]||_0x185625[_0x263f15(0x159)][_0x263f15(0x152)][_0x263f15(0x147)]===0x1;}async[_0x255719(0x165)](_0x64599f,_0x3c08c6,_0x4aa4a7,_0x3278e7){const _0x4c908f=_0x255719,_0x23b6c1={'memberId':(await this[_0x4c908f(0x161)]['requireSession'](_0x64599f))[_0x4c908f(0x154)](),'threadId':_0x4aa4a7,'replyId':_0x3278e7,'unitId':_0x64599f},_0x4090b1=await this[_0x4c908f(0x168)][_0x4c908f(0x151)](_0x4c908f(0x17d)+_0x64599f+_0x4c908f(0x143),{'body':_0x23b6c1});return!_0x4090b1[_0x4c908f(0x159)][_0x4c908f(0x152)]||_0x4090b1['body'][_0x4c908f(0x152)][_0x4c908f(0x147)]===0x1;}async[_0x255719(0x18e)](_0x47ba26,_0x102d3c,_0x11f93f){const _0x18bf8d=_0x255719,_0x509929={'unitId':_0x47ba26,'threadId':_0x11f93f},_0x2795db=await this[_0x18bf8d(0x168)][_0x18bf8d(0x151)](_0x18bf8d(0x17d)+_0x47ba26+_0x18bf8d(0x15f),{'body':_0x509929}),_0x322366=_0x11f93f[_0x18bf8d(0x158)](_0x36addd=>ee(_0x2795db[_0x18bf8d(0x159)]['comments'][_0x36addd],_0x47ba26,_0x102d3c))['filter'](Boolean);return Object[_0x18bf8d(0x186)](_0x2795db[_0x18bf8d(0x159)][_0x18bf8d(0x15b)])['forEach'](_0x135949=>{const _0x3bbc98=_0x18bf8d;this[_0x3bbc98(0x16a)][_0x3bbc98(0x171)](_0x135949);}),_0x322366;}[_0x255719(0x163)](_0x21e3a9){const _0x95594=_0x255719;return{'id':_0x21e3a9['id'],'threadId':_0x21e3a9[_0x95594(0x15d)],'ref':_0x21e3a9[_0x95594(0x157)]};}};f=Q([_(0x0,_0x41fdfe(_0x514fce)),_(0x1,_0x41fdfe(_0x5f0907)),_(0x2,_0x41fdfe(_0x5b2a6f)),_(0x3,_0x41fdfe(_0x3832fe))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x5f24a8,_0x5a49b2,_0x56eba0,_0x2a584c)=>{const _0x2efccb=_0x255719;for(var _0x59054e=_0x2a584c>0x1?void 0x0:_0x2a584c?re(_0x5a49b2,_0x56eba0):_0x5a49b2,_0x124978=_0x5f24a8[_0x2efccb(0x16e)]-0x1,_0x17d4e7;_0x124978>=0x0;_0x124978--)(_0x17d4e7=_0x5f24a8[_0x124978])&&(_0x59054e=_0x17d4e7(_0x59054e)||_0x59054e);return _0x59054e;},N=(_0x54bf45,_0x4fd7bb)=>(_0x5df278,_0x36747c)=>_0x4fd7bb(_0x5df278,_0x36747c,_0x54bf45);let g=class extends _0x160754{constructor(_0x45e333,_0x5a0304){const _0x446b71=_0x255719;super(),this[_0x446b71(0x17c)]=_0x45e333,this[_0x446b71(0x131)]=_0x5a0304,this[_0x446b71(0x16c)]();}[_0x255719(0x16c)](){const _0x29ce07=_0x255719;this['_threadCommentDataSourceService'][_0x29ce07(0x136)]=this[_0x29ce07(0x131)],this[_0x29ce07(0x17c)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x12c648),N(0x1,_0x41fdfe(f))],g);var se=Object[_0x255719(0x134)],oe=Object[_0x255719(0x184)],ne=(_0x1d5bf8,_0x299c06,_0x1c36a9)=>_0x299c06 in _0x1d5bf8?se(_0x1d5bf8,_0x299c06,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1c36a9}):_0x1d5bf8[_0x299c06]=_0x1c36a9,ie=(_0xa9f7d8,_0x279797,_0xe38e82,_0x403fa0)=>{for(var _0x23dcc1=_0x403fa0>0x1?void 0x0:_0x403fa0?oe(_0x279797,_0xe38e82):_0x279797,_0x4af2ff=_0xa9f7d8['length']-0x1,_0x3f9fbd;_0x4af2ff>=0x0;_0x4af2ff--)(_0x3f9fbd=_0xa9f7d8[_0x4af2ff])&&(_0x23dcc1=_0x3f9fbd(_0x23dcc1)||_0x23dcc1);return _0x23dcc1;},w=(_0x4693e1,_0x2fde53)=>(_0x58ea0a,_0x4a79fb)=>_0x2fde53(_0x58ea0a,_0x4a79fb,_0x4693e1),$=(_0x1a1eb3,_0x53ae09,_0x30dbb4)=>ne(_0x1a1eb3,typeof _0x53ae09!='symbol'?_0x53ae09+'':_0x53ae09,_0x30dbb4);let b=class extends _0x1c2fb5{constructor(_0x15da86=M,_0x269f75,_0x3d29e2){const _0x45e2ea=_0x255719;super(),this[_0x45e2ea(0x13e)]=_0x15da86,this[_0x45e2ea(0x13c)]=_0x269f75,this[_0x45e2ea(0x145)]=_0x3d29e2;const {..._0x51f0a4}=_0xc8f13a({},M,this[_0x45e2ea(0x13e)]);this[_0x45e2ea(0x145)][_0x45e2ea(0x181)](z,_0x51f0a4);}[_0x255719(0x15c)](){const _0x2a1b9d=_0x255719;[[f],[g],[S]][_0x2a1b9d(0x153)](_0x4a0bd4=>{const _0x58fc5f=_0x2a1b9d;this[_0x58fc5f(0x13c)][_0x58fc5f(0x185)](_0x4a0bd4);});}[_0x255719(0x18b)](){const _0x4957db=_0x255719;this[_0x4957db(0x13c)]['get'](g),this[_0x4957db(0x13c)][_0x4957db(0x162)](S);}};$(b,_0x255719(0x190),W),$(b,_0x255719(0x170),_0x652023['UNIVER_UNKNOWN']),b=ie([_0x167230(_0x267ce8,_0x16ccf1,_0x219b5c),w(0x1,_0x41fdfe(_0x3832fe)),w(0x2,_0x3ae480)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x4dc8b9=_0xbd45;(function(_0x241dde,_0x4d06b8){const _0x9e50ec=_0xbd45,_0xdac1a=_0x241dde();while(!![]){try{const _0x5422e5=parseInt(_0x9e50ec(0x24c))/0x1*(-parseInt(_0x9e50ec(0x228))/0x2)+-parseInt(_0x9e50ec(0x1ed))/0x3*(-parseInt(_0x9e50ec(0x1fc))/0x4)+-parseInt(_0x9e50ec(0x222))/0x5*(-parseInt(_0x9e50ec(0x239))/0x6)+parseInt(_0x9e50ec(0x243))/0x7*(-parseInt(_0x9e50ec(0x23a))/0x8)+parseInt(_0x9e50ec(0x250))/0x9*(-parseInt(_0x9e50ec(0x21a))/0xa)+-parseInt(_0x9e50ec(0x237))/0xb+-parseInt(_0x9e50ec(0x215))/0xc*(-parseInt(_0x9e50ec(0x206))/0xd);if(_0x5422e5===_0x4d06b8)break;else _0xdac1a['push'](_0xdac1a['shift']());}catch(_0xd4b72a){_0xdac1a['push'](_0xdac1a['shift']());}}}(_0x1786,0xcc6f3));import{CommentService as _0x456c14,CollaborationSessionService as _0x485555,UniverCollaborationClientPlugin as _0x40ccab}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2e73e0}from'@univerjs-pro/license';import{dayjs as _0x456095,UserManagerService as _0x3da90d,Inject as _0x33b6ce,Injector as _0x4e040d,Disposable as _0x281fc3,CustomRangeType as _0x56b817,UniverInstanceType as _0x416382,DependentOn as _0x17ca9f,IConfigService as _0xf72ab4,Plugin as _0x161ec6,merge as _0x3d4375}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x11e46e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x27dc1c,IThreadCommentDataSourceService as _0x9aa631}from'@univerjs/thread-comment';import{bufferTime as _0x2cce7a}from'rxjs';import{HTTPService as _0xf4476d}from'@univerjs/network';const W=_0x4dc8b9(0x210);var I=(_0x5e3cc1=>(_0x5e3cc1[_0x5e3cc1[_0x4dc8b9(0x226)]=0x0]='OpenOrReOpen',_0x5e3cc1[_0x5e3cc1[_0x4dc8b9(0x232)]=0x1]=_0x4dc8b9(0x232),_0x5e3cc1[_0x5e3cc1[_0x4dc8b9(0x235)]=-0x1]='UNRECOGNIZED',_0x5e3cc1))(I||{}),v=(_0x4247d7=>(_0x4247d7[_0x4247d7[_0x4dc8b9(0x25a)]=0x0]=_0x4dc8b9(0x25a),_0x4247d7[_0x4247d7[_0x4dc8b9(0x23f)]=0x1]=_0x4dc8b9(0x23f),_0x4247d7[_0x4247d7['Reply']=0x2]='Reply',_0x4247d7[_0x4247d7['Edit']=0x3]=_0x4dc8b9(0x1ee),_0x4247d7[_0x4247d7[_0x4dc8b9(0x231)]=0x4]=_0x4dc8b9(0x231),_0x4247d7[_0x4247d7[_0x4dc8b9(0x20c)]=0x5]='Solve',_0x4247d7[_0x4247d7['UNRECOGNIZED']=-0x1]=_0x4dc8b9(0x235),_0x4247d7))(v||{});const D=_0x4b6417=>_0x456095(new Date(+_0x4b6417))[_0x4dc8b9(0x240)](_0x4dc8b9(0x229)),B=async(_0x2cd7c3,_0x15d89d)=>{const _0x6eefdb=_0x4dc8b9,_0x58d881=_0x2cd7c3[_0x6eefdb(0x236)](_0x3da90d),_0x2dc3d0=_0x2cd7c3['get'](_0xf4476d);_0x15d89d[_0x6eefdb(0x21b)](_0x5e4c3b=>{const _0x26f799=_0x6eefdb;_0x58d881[_0x26f799(0x1f5)](_0x5e4c3b)&&_0x15d89d[_0x26f799(0x22d)](_0x5e4c3b);}),_0x15d89d[_0x6eefdb(0x1f4)]&&(await _0x2dc3d0[_0x6eefdb(0x236)](_0x6eefdb(0x1ec),{'params':{'userIDs':[..._0x15d89d]}}))[_0x6eefdb(0x207)][_0x6eefdb(0x22a)][_0x6eefdb(0x21b)](_0x52128e=>{const _0x44ef3a=_0x6eefdb;_0x52128e&&_0x58d881[_0x44ef3a(0x242)](_0x52128e);});};var K=Object[_0x4dc8b9(0x208)],V=(_0x56215c,_0x76ceb,_0x38544a,_0x5c0638)=>{const _0x48dcc4=_0x4dc8b9;for(var _0x161256=_0x5c0638>0x1?void 0x0:_0x5c0638?K(_0x76ceb,_0x38544a):_0x76ceb,_0x7ad475=_0x56215c[_0x48dcc4(0x22f)]-0x1,_0x279b9d;_0x7ad475>=0x0;_0x7ad475--)(_0x279b9d=_0x56215c[_0x7ad475])&&(_0x161256=_0x279b9d(_0x161256)||_0x161256);return _0x161256;},p=(_0x5932fb,_0x205b62)=>(_0x21f721,_0x407661)=>_0x205b62(_0x21f721,_0x407661,_0x5932fb);let S=class extends _0x281fc3{constructor(_0x420f57,_0x2b2b67,_0x2003b7,_0x252ba7){const _0x153f29=_0x4dc8b9;super(),this[_0x153f29(0x1f2)]=_0x420f57,this['_threadCommentModel']=_0x2b2b67,this[_0x153f29(0x1fb)]=_0x2003b7,this[_0x153f29(0x21f)]=_0x252ba7,this[_0x153f29(0x251)](),this['_initUserSync']();}[_0x4dc8b9(0x200)](){const _0x399cb6=_0x4dc8b9;this[_0x399cb6(0x23e)](this[_0x399cb6(0x201)][_0x399cb6(0x246)][_0x399cb6(0x23c)](_0x2cce7a(0x10))[_0x399cb6(0x22e)](_0x4fa398=>{const _0x341308=_0x399cb6,_0x4ff1fd=new Set();_0x4fa398[_0x341308(0x21b)](_0x3dcbc3=>{const _0x3a7e67=_0x341308;switch(_0x3dcbc3['type']){case _0x3a7e67(0x24f):{const _0xce58f9=_0x3dcbc3[_0x3a7e67(0x223)][_0x3a7e67(0x257)];_0x4ff1fd[_0x3a7e67(0x24f)](_0xce58f9);break;}}}),B(this[_0x341308(0x21f)],_0x4ff1fd);}));}[_0x4dc8b9(0x251)](){const _0x5b817c=_0x4dc8b9;this[_0x5b817c(0x23e)](this['_commentService'][_0x5b817c(0x246)][_0x5b817c(0x22e)](async _0x53e740=>{const _0x12ed88=_0x5b817c;var _0x25f017,_0x14a25e,_0x44b385,_0xa4156;const _0x206dec=(_0x25f017=this['_threadCommentModel']['getUnit'](_0x53e740[_0x12ed88(0x21d)])[_0x12ed88(0x247)](_0x5a138d=>_0x5a138d[_0x12ed88(0x255)]===_0x53e740[_0x12ed88(0x255)]))==null?void 0x0:_0x25f017[_0x12ed88(0x230)];if(!_0x206dec)return;const {unitId:_0x2c0fac,subUnitId:_0x44d519}=_0x206dec;switch(_0x53e740[_0x12ed88(0x203)]&&this['_userService']['addUser'](_0x53e740[_0x12ed88(0x203)]),_0x53e740[_0x12ed88(0x21e)]){case v[_0x12ed88(0x23f)]:break;case v['Reply']:{this[_0x12ed88(0x201)][_0x12ed88(0x211)](_0x2c0fac,_0x44d519,{'unitId':_0x2c0fac,'subUnitId':_0x44d519,'ref':'','id':_0x53e740[_0x12ed88(0x1ff)],'dT':D(+_0x53e740['createTimestamp']),'threadId':_0x53e740[_0x12ed88(0x255)],'personId':(_0x44b385=(_0x14a25e=_0x53e740[_0x12ed88(0x203)])==null?void 0x0:_0x14a25e[_0x12ed88(0x20d)])!=null?_0x44b385:_0x53e740[_0x12ed88(0x1fe)],'text':JSON['parse'](_0x53e740[_0x12ed88(0x209)]),'parentId':_0x206dec['id']});break;}case v[_0x12ed88(0x231)]:{const _0x43842e=this['_threadCommentModel'][_0x12ed88(0x1fd)](_0x2c0fac,_0x44d519,_0x53e740[_0x12ed88(0x1ff)]);_0x43842e&&_0x43842e[_0x12ed88(0x227)]&&this['_threadCommentModel'][_0x12ed88(0x205)](_0x2c0fac,_0x44d519,_0x53e740[_0x12ed88(0x1ff)]);break;}case v[_0x12ed88(0x1ee)]:{this[_0x12ed88(0x201)][_0x12ed88(0x213)](_0x2c0fac,_0x44d519,{'commentId':_0x53e740[_0x12ed88(0x1ff)],'text':JSON[_0x12ed88(0x25b)](_0x53e740[_0x12ed88(0x209)])});break;}case v[_0x12ed88(0x20c)]:{const _0x53a9d7=(_0xa4156=this[_0x12ed88(0x201)][_0x12ed88(0x1ef)](_0x53e740[_0x12ed88(0x21d)])['find'](_0x1f6a3a=>_0x1f6a3a[_0x12ed88(0x255)]===_0x53e740[_0x12ed88(0x255)]))==null?void 0x0:_0xa4156[_0x12ed88(0x230)];_0x53a9d7&&this[_0x12ed88(0x201)]['resolveComment'](_0x2c0fac,_0x44d519,_0x53a9d7['id'],_0x53e740['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x33b6ce(_0x456c14)),p(0x1,_0x33b6ce(_0x27dc1c)),p(0x2,_0x33b6ce(_0x3da90d)),p(0x3,_0x33b6ce(_0x4e040d))],S);const z=_0x4dc8b9(0x1f9),M={};var k=Object[_0x4dc8b9(0x208)],Q=(_0x5ebfde,_0x318b2e,_0x4fa812,_0x581efd)=>{const _0x42d03c=_0x4dc8b9;for(var _0x1a93ae=_0x581efd>0x1?void 0x0:_0x581efd?k(_0x318b2e,_0x4fa812):_0x318b2e,_0xdca9a5=_0x5ebfde[_0x42d03c(0x22f)]-0x1,_0x5d4140;_0xdca9a5>=0x0;_0xdca9a5--)(_0x5d4140=_0x5ebfde[_0xdca9a5])&&(_0x1a93ae=_0x5d4140(_0x1a93ae)||_0x1a93ae);return _0x1a93ae;},_=(_0x502c43,_0x25048c)=>(_0x53ae7a,_0x325d00)=>_0x25048c(_0x53ae7a,_0x325d00,_0x502c43);function X(_0x4c9208,_0x1e56de){const _0x3bcc89=_0x4dc8b9,_0x3fd256=_0x4c9208[_0x3bcc89(0x256)][0x0];return{..._0x1e56de,'id':_0x3fd256[_0x3bcc89(0x1ff)],'resolved':_0x4c9208['solved']===0x1,'dT':D(_0x3fd256[_0x3bcc89(0x22b)]),'personId':_0x3fd256['userId'],'threadId':_0x3fd256['threadId']};}function ee(_0x26f6dd,_0x4b009d,_0x321ad3){const _0x107122=_0x4dc8b9;var _0x1c0d01,_0x490cf7;if(((_0x490cf7=(_0x1c0d01=_0x26f6dd==null?void 0x0:_0x26f6dd[_0x107122(0x256)])==null?void 0x0:_0x1c0d01[_0x107122(0x22f)])!=null?_0x490cf7:0x0)>0x0){const _0x2fb43b=(_0x39a333,_0x3de01f)=>({'id':_0x39a333['replyId'],'threadId':_0x39a333['threadId'],'dT':D(_0x39a333[_0x107122(0x22b)]),'personId':_0x39a333[_0x107122(0x1fe)],'resolved':_0x26f6dd[_0x107122(0x254)]===I['Solved'],'unitId':_0x4b009d,'subUnitId':_0x321ad3,'text':JSON[_0x107122(0x25b)](_0x39a333[_0x107122(0x209)]),'parentId':_0x3de01f}),_0x273432=_0x2fb43b(_0x26f6dd[_0x107122(0x256)][0x0]);return{..._0x273432,'children':_0x26f6dd[_0x107122(0x256)][_0x107122(0x23b)](0x1)['map'](_0x920a75=>_0x2fb43b(_0x920a75,_0x273432['id']))};}return null;}let f=class{constructor(_0x3a00e8,_0x1cb752,_0x181ed2,_0x16b76e){const _0x47a83a=_0x4dc8b9;this[_0x47a83a(0x244)]=_0x3a00e8,this[_0x47a83a(0x1fb)]=_0x1cb752,this[_0x47a83a(0x224)]=_0x181ed2,this[_0x47a83a(0x21f)]=_0x16b76e;}async[_0x4dc8b9(0x211)](_0x315130){const _0x389e98=_0x4dc8b9;var _0x12f416,_0x1d005f;const {parentId:_0x5925dc,unitId:_0xa3c633,text:_0x5cd72a,threadId:_0x34dc58}=_0x315130,_0x5256ce=(_0x1d005f=(_0x12f416=_0x5cd72a['customRanges'])==null?void 0x0:_0x12f416[_0x389e98(0x20b)](_0x384fed=>_0x384fed[_0x389e98(0x24a)]===_0x56b817[_0x389e98(0x233)])[_0x389e98(0x220)](_0x310ee7=>_0x310ee7[_0x389e98(0x20a)]))!=null?_0x1d005f:[],_0xbc6ea9=JSON[_0x389e98(0x259)](_0x5cd72a),_0x1cbdf8=(await this[_0x389e98(0x224)]['requireSession'](_0xa3c633))['getMemberID']();if(_0x5925dc){const _0x1eaf4f={'memberId':_0x1cbdf8,'unitId':_0xa3c633,'content':_0xbc6ea9,'mention':_0x5256ce,'threadId':_0x34dc58},_0x31b0af=(await this[_0x389e98(0x244)][_0x389e98(0x1f7)](_0x389e98(0x23d)+_0xa3c633+'/reply',{'body':_0x1eaf4f}))['body'][_0x389e98(0x234)];return{..._0x315130,'id':_0x31b0af[_0x389e98(0x1ff)],'dT':_0x456095(+_0x31b0af[_0x389e98(0x22b)])[_0x389e98(0x240)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x31b0af['userId']};}else{const _0x104007={'memberId':_0x1cbdf8,'unitId':_0xa3c633,'content':_0xbc6ea9,'mention':_0x5256ce},_0x15eca9=await this[_0x389e98(0x244)][_0x389e98(0x1f7)](_0x389e98(0x23d)+_0xa3c633+_0x389e98(0x1f3),{'body':_0x104007});return X(_0x15eca9['body'][_0x389e98(0x241)],_0x315130);}}async[_0x4dc8b9(0x213)](_0x582dc9){const _0x6c7233=_0x4dc8b9;var _0x2af20a,_0x26fb25;const {text:_0x29b1d0,unitId:_0x57038c}=_0x582dc9,_0x3fa1d3=(_0x26fb25=(_0x2af20a=_0x29b1d0[_0x6c7233(0x245)])==null?void 0x0:_0x2af20a['filter'](_0x56d0e1=>_0x56d0e1[_0x6c7233(0x24a)]===_0x56b817[_0x6c7233(0x233)])[_0x6c7233(0x220)](_0x2018d3=>_0x2018d3[_0x6c7233(0x20a)]))!=null?_0x26fb25:[],_0x202706=JSON[_0x6c7233(0x259)](_0x29b1d0),_0x401964=_0x582dc9[_0x6c7233(0x255)],_0x39005d=_0x582dc9['id'],_0x39aaf8={'memberId':(await this['_sessionService'][_0x6c7233(0x238)](_0x57038c))[_0x6c7233(0x217)](),'unitId':_0x57038c,'threadId':_0x401964,'mention':_0x3fa1d3,'content':_0x202706,'replyId':_0x39005d},_0x1b015c=await this['_httpService'][_0x6c7233(0x1f7)](_0x6c7233(0x23d)+_0x57038c+_0x6c7233(0x24b),{'body':_0x39aaf8});return!_0x1b015c[_0x6c7233(0x207)]['error']||_0x1b015c[_0x6c7233(0x207)]['error']['code']===0x1;}async[_0x4dc8b9(0x1f0)](_0x3dade3){const _0x238e4c=_0x4dc8b9,{unitId:_0x512887}=_0x3dade3,_0x39b2e0=_0x3dade3[_0x238e4c(0x255)],_0x39eeb2={'memberId':this[_0x238e4c(0x1fb)][_0x238e4c(0x248)]()[_0x238e4c(0x20d)],'unitId':_0x512887,'threadId':_0x39b2e0,'solved':_0x3dade3[_0x238e4c(0x1fa)]?I[_0x238e4c(0x232)]:I['OpenOrReOpen']},_0x3cb142=await this[_0x238e4c(0x244)][_0x238e4c(0x1f7)](_0x238e4c(0x23d)+_0x512887+_0x238e4c(0x24e),{'body':_0x39eeb2});return!_0x3cb142['body'][_0x238e4c(0x225)]||_0x3cb142['body'][_0x238e4c(0x225)]['code']===0x1;}async[_0x4dc8b9(0x205)](_0x383850,_0x1c516f,_0x10a955,_0x59dc52){const _0x33f1ef=_0x4dc8b9,_0x52bc1a={'memberId':(await this[_0x33f1ef(0x224)][_0x33f1ef(0x238)](_0x383850))['getMemberID'](),'threadId':_0x10a955,'replyId':_0x59dc52,'unitId':_0x383850},_0xb6faf1=await this[_0x33f1ef(0x244)][_0x33f1ef(0x1f7)](_0x33f1ef(0x23d)+_0x383850+_0x33f1ef(0x1f6),{'body':_0x52bc1a});return!_0xb6faf1[_0x33f1ef(0x207)][_0x33f1ef(0x225)]||_0xb6faf1['body'][_0x33f1ef(0x225)][_0x33f1ef(0x252)]===0x1;}async[_0x4dc8b9(0x212)](_0x101942,_0x59eea1,_0x45975c){const _0xd253c6=_0x4dc8b9,_0x20ba4e={'unitId':_0x101942,'threadId':_0x45975c},_0xf2715b=await this[_0xd253c6(0x244)][_0xd253c6(0x1f7)](_0xd253c6(0x23d)+_0x101942+_0xd253c6(0x218),{'body':_0x20ba4e}),_0x458799=_0x45975c[_0xd253c6(0x220)](_0x24bd4c=>ee(_0xf2715b['body'][_0xd253c6(0x21c)][_0x24bd4c],_0x101942,_0x59eea1))[_0xd253c6(0x20b)](Boolean);return Object[_0xd253c6(0x22c)](_0xf2715b[_0xd253c6(0x207)]['users'])['forEach'](_0x2f3fc1=>{const _0x109453=_0xd253c6;this[_0x109453(0x1fb)][_0x109453(0x242)](_0x2f3fc1);}),_0x458799;}[_0x4dc8b9(0x249)](_0x5df58b){const _0x32311c=_0x4dc8b9;return{'id':_0x5df58b['id'],'threadId':_0x5df58b[_0x32311c(0x255)],'ref':_0x5df58b[_0x32311c(0x20e)]};}};f=Q([_(0x0,_0x33b6ce(_0xf4476d)),_(0x1,_0x33b6ce(_0x3da90d)),_(0x2,_0x33b6ce(_0x485555)),_(0x3,_0x33b6ce(_0x4e040d))],f);var re=Object[_0x4dc8b9(0x208)],te=(_0x145e23,_0x526bd1,_0xfc7e32,_0x352f1c)=>{for(var _0x1ac74d=_0x352f1c>0x1?void 0x0:_0x352f1c?re(_0x526bd1,_0xfc7e32):_0x526bd1,_0x332466=_0x145e23['length']-0x1,_0x22e220;_0x332466>=0x0;_0x332466--)(_0x22e220=_0x145e23[_0x332466])&&(_0x1ac74d=_0x22e220(_0x1ac74d)||_0x1ac74d);return _0x1ac74d;},N=(_0x26ebb5,_0x438e32)=>(_0x591806,_0xa017d3)=>_0x438e32(_0x591806,_0xa017d3,_0x26ebb5);let g=class extends _0x281fc3{constructor(_0x322241,_0x5c36dd){const _0x19e0c1=_0x4dc8b9;super(),this[_0x19e0c1(0x20f)]=_0x322241,this[_0x19e0c1(0x219)]=_0x5c36dd,this['_initDataSource']();}[_0x4dc8b9(0x1f8)](){const _0x417226=_0x4dc8b9;this['_threadCommentDataSourceService']['dataSource']=this[_0x417226(0x219)],this[_0x417226(0x20f)][_0x417226(0x253)]=!0x1;}};function _0xbd45(_0x128c4a,_0x1fbe2a){const _0x1786c4=_0x1786();return _0xbd45=function(_0xbd4508,_0xbe7abf){_0xbd4508=_0xbd4508-0x1ec;let _0x2d3c21=_0x1786c4[_0xbd4508];return _0x2d3c21;},_0xbd45(_0x128c4a,_0x1fbe2a);}g=te([N(0x0,_0x9aa631),N(0x1,_0x33b6ce(f))],g);var se=Object[_0x4dc8b9(0x204)],oe=Object[_0x4dc8b9(0x208)],ne=(_0x450676,_0x320287,_0x100f12)=>_0x320287 in _0x450676?se(_0x450676,_0x320287,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x100f12}):_0x450676[_0x320287]=_0x100f12,ie=(_0x3e9ee7,_0x3deb83,_0x1518e6,_0x158865)=>{const _0x287978=_0x4dc8b9;for(var _0x3cdd69=_0x158865>0x1?void 0x0:_0x158865?oe(_0x3deb83,_0x1518e6):_0x3deb83,_0x904569=_0x3e9ee7[_0x287978(0x22f)]-0x1,_0x4d1cf2;_0x904569>=0x0;_0x904569--)(_0x4d1cf2=_0x3e9ee7[_0x904569])&&(_0x3cdd69=_0x4d1cf2(_0x3cdd69)||_0x3cdd69);return _0x3cdd69;},w=(_0x4e2b1a,_0x15c0a3)=>(_0x90b70c,_0x8654f)=>_0x15c0a3(_0x90b70c,_0x8654f,_0x4e2b1a),$=(_0x19582c,_0x2a5c70,_0x15f1f0)=>ne(_0x19582c,typeof _0x2a5c70!=_0x4dc8b9(0x258)?_0x2a5c70+'':_0x2a5c70,_0x15f1f0);let b=class extends _0x161ec6{constructor(_0x2afc44=M,_0x8b9eac,_0xe1dfb4){const _0x266752=_0x4dc8b9;super(),this[_0x266752(0x1f1)]=_0x2afc44,this['_injector']=_0x8b9eac,this[_0x266752(0x202)]=_0xe1dfb4;const {..._0x114d1d}=_0x3d4375({},M,this[_0x266752(0x1f1)]);this[_0x266752(0x202)][_0x266752(0x214)](z,_0x114d1d);}[_0x4dc8b9(0x216)](){const _0x38ed07=_0x4dc8b9;[[f],[g],[S]][_0x38ed07(0x21b)](_0x4f3e7f=>{const _0x6cbe0a=_0x38ed07;this[_0x6cbe0a(0x21f)][_0x6cbe0a(0x24f)](_0x4f3e7f);});}['onReady'](){const _0x177962=_0x4dc8b9;this[_0x177962(0x21f)][_0x177962(0x236)](g),this[_0x177962(0x21f)]['get'](S);}};$(b,_0x4dc8b9(0x24d),W),$(b,'type',_0x416382[_0x4dc8b9(0x221)]),b=ie([_0x17ca9f(_0x11e46e,_0x40ccab,_0x2e73e0),w(0x1,_0x33b6ce(_0x4e040d)),w(0x2,_0xf72ab4)],b);export{b as UniverThreadCommentDataSourcePlugin};function _0x1786(){const _0x4f09f0=['content','rangeId','filter','Solve','userID','ref','_threadCommentDataSourceService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','addComment','listComments','updateComment','setConfig','60rmvanB','onStarting','getMemberID','/list','_threadCommentDataSource','140870xPHZuZ','forEach','comments','unitId','type','_injector','map','UNIVER_UNKNOWN','65dMymHI','payload','_sessionService','error','OpenOrReOpen','parentId','146xjwSPs','YYYY/MM/DD\x20HH:mm','users','createTimestamp','values','delete','subscribe','length','root','Delete','Solved','COMMENT','reply','UNRECOGNIZED','get','9084218qomdrW','requireSession','405546alAtpP','32rmDday','slice','pipe','/universer-api/comment/unit/','disposeWithMe','Add','format','comment','addUser','2835616BlamnG','_httpService','customRanges','commentUpdate$','find','getCurrentUser','saveCommentToSnapshot','rangeType','/edit','9623YhsJKS','pluginName','/solved','add','549lVtEDG','_init','code','syncUpdateMutationToColla','solved','threadId','replies','personId','symbol','stringify','Unknown','parse','/universer-api/user/list','3abBomv','Edit','getUnit','resolveComment','_config','_commentService','/add','size','getUser','/delete','post','_initDataSource','thread-comment-data-source.config','resolved','_userService','3907004mIvpJG','getComment','userId','replyId','_initUserSync','_threadCommentModel','_configService','user','defineProperty','deleteComment','7773753JuszPB','body','getOwnPropertyDescriptor'];_0x1786=function(){return _0x4f09f0;};return _0x1786();}
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x3dee(_0x42d129,_0x5010ae){const _0x44edbc=_0x44ed();return _0x3dee=function(_0x3dee33,_0x53379f){_0x3dee33=_0x3dee33-0x14e;let _0x27bd8a=_0x44edbc[_0x3dee33];return _0x27bd8a;},_0x3dee(_0x42d129,_0x5010ae);}(function(_0x3144be,_0x576d83){const _0x1bece9=_0x3dee,_0x7643d4=_0x3144be();while(!![]){try{const _0x3fb93b=parseInt(_0x1bece9(0x1b8))/0x1+parseInt(_0x1bece9(0x1bb))/0x2+parseInt(_0x1bece9(0x17c))/0x3+parseInt(_0x1bece9(0x1a6))/0x4+parseInt(_0x1bece9(0x189))/0x5*(parseInt(_0x1bece9(0x166))/0x6)+parseInt(_0x1bece9(0x18c))/0x7+parseInt(_0x1bece9(0x176))/0x8*(-parseInt(_0x1bece9(0x17b))/0x9);if(_0x3fb93b===_0x576d83)break;else _0x7643d4['push'](_0x7643d4['shift']());}catch(_0x382e23){_0x7643d4['push'](_0x7643d4['shift']());}}}(_0x44ed,0xa4e1b),function(_0x498916,_0x2c267b){const _0x43ba86=_0x3dee;typeof exports==_0x43ba86(0x196)&&typeof module<'u'?_0x2c267b(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require(_0x43ba86(0x18d)),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require(_0x43ba86(0x199)),require('@univerjs/network')):typeof define==_0x43ba86(0x16f)&&define[_0x43ba86(0x1b3)]?define([_0x43ba86(0x1b5),_0x43ba86(0x1a5),_0x43ba86(0x1d3),'@univerjs/core','@univerjs/thread-comment-ui',_0x43ba86(0x191),_0x43ba86(0x199),_0x43ba86(0x178)],_0x2c267b):(_0x498916=typeof globalThis<'u'?globalThis:_0x498916||self,_0x2c267b(_0x498916['UniverProThreadCommentDatasource']={},_0x498916[_0x43ba86(0x169)],_0x498916[_0x43ba86(0x1ad)],_0x498916[_0x43ba86(0x157)],_0x498916[_0x43ba86(0x154)],_0x498916[_0x43ba86(0x16a)],_0x498916[_0x43ba86(0x199)],_0x498916[_0x43ba86(0x170)]));}(this,function(_0x2a7035,_0x1089b,_0x4f1ae7,_0x1c0857,_0x27f4fe,_0x30bf84,_0x95d387,_0x42b443){'use strict';const _0x181aa4=_0x3dee;const _0x17f6b6='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x2035f4=(_0x96418=>(_0x96418[_0x96418[_0x181aa4(0x15c)]=0x0]=_0x181aa4(0x15c),_0x96418[_0x96418[_0x181aa4(0x1ce)]=0x1]=_0x181aa4(0x1ce),_0x96418[_0x96418['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x96418))(_0x2035f4||{}),_0x1ea371=(_0x1fb7c6=>(_0x1fb7c6[_0x1fb7c6[_0x181aa4(0x15a)]=0x0]=_0x181aa4(0x15a),_0x1fb7c6[_0x1fb7c6['Add']=0x1]=_0x181aa4(0x197),_0x1fb7c6[_0x1fb7c6[_0x181aa4(0x1c9)]=0x2]=_0x181aa4(0x1c9),_0x1fb7c6[_0x1fb7c6[_0x181aa4(0x188)]=0x3]=_0x181aa4(0x188),_0x1fb7c6[_0x1fb7c6['Delete']=0x4]=_0x181aa4(0x1c0),_0x1fb7c6[_0x1fb7c6[_0x181aa4(0x18a)]=0x5]=_0x181aa4(0x18a),_0x1fb7c6[_0x1fb7c6[_0x181aa4(0x153)]=-0x1]='UNRECOGNIZED',_0x1fb7c6))(_0x1ea371||{});const _0x5976f9=_0x33c72d=>_0x1c0857[_0x181aa4(0x186)](new Date(+_0x33c72d))[_0x181aa4(0x18f)](_0x181aa4(0x162)),_0x358b02=async(_0xd237c0,_0x1deac3)=>{const _0x1513f2=_0x181aa4,_0x32c93e=_0xd237c0[_0x1513f2(0x163)](_0x1c0857['UserManagerService']),_0x3ea226=_0xd237c0[_0x1513f2(0x163)](_0x42b443[_0x1513f2(0x175)]);_0x1deac3[_0x1513f2(0x19b)](_0x559f71=>{const _0x4b3292=_0x1513f2;_0x32c93e[_0x4b3292(0x14f)](_0x559f71)&&_0x1deac3['delete'](_0x559f71);}),_0x1deac3[_0x1513f2(0x173)]&&(await _0x3ea226[_0x1513f2(0x163)](_0x1513f2(0x158),{'params':{'userIDs':[..._0x1deac3]}}))[_0x1513f2(0x1a0)][_0x1513f2(0x17f)][_0x1513f2(0x19b)](_0x379333=>{const _0x470ed5=_0x1513f2;_0x379333&&_0x32c93e[_0x470ed5(0x193)](_0x379333);});};var _0xaab56a=Object['getOwnPropertyDescriptor'],_0x285b1c=(_0x33514b,_0x32f13e,_0x59db05,_0x57f7d1)=>{for(var _0x34beba=_0x57f7d1>0x1?void 0x0:_0x57f7d1?_0xaab56a(_0x32f13e,_0x59db05):_0x32f13e,_0x46229b=_0x33514b['length']-0x1,_0x482116;_0x46229b>=0x0;_0x46229b--)(_0x482116=_0x33514b[_0x46229b])&&(_0x34beba=_0x482116(_0x34beba)||_0x34beba);return _0x34beba;},_0x63133d=(_0x4f3c3f,_0x4ffef6)=>(_0x3d1562,_0x4dd578)=>_0x4ffef6(_0x3d1562,_0x4dd578,_0x4f3c3f);let _0x36e91=class extends _0x1c0857[_0x181aa4(0x1a3)]{constructor(_0x586527,_0xd78068,_0x313b19,_0x249ef9){const _0x37581d=_0x181aa4;super(),this[_0x37581d(0x198)]=_0x586527,this['_threadCommentModel']=_0xd78068,this[_0x37581d(0x1b9)]=_0x313b19,this[_0x37581d(0x17e)]=_0x249ef9,this[_0x37581d(0x151)](),this['_initUserSync']();}['_initUserSync'](){const _0x5b2a21=_0x181aa4;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$']['pipe'](_0x95d387[_0x5b2a21(0x17a)](0x10))[_0x5b2a21(0x1c8)](_0x3a6808=>{const _0x531d21=_0x5b2a21,_0x133241=new Set();_0x3a6808[_0x531d21(0x19b)](_0x2a3ee7=>{const _0x5f2522=_0x531d21;switch(_0x2a3ee7[_0x5f2522(0x152)]){case _0x5f2522(0x16d):{const _0x1c3eee=_0x2a3ee7[_0x5f2522(0x161)][_0x5f2522(0x181)];_0x133241['add'](_0x1c3eee);break;}}}),_0x358b02(this['_injector'],_0x133241);}));}['_init'](){const _0xf4bb76=_0x181aa4;this['disposeWithMe'](this['_commentService']['commentUpdate$'][_0xf4bb76(0x1c8)](async _0xa21a6c=>{const _0x799665=_0xf4bb76;var _0x271258,_0x5e91b8,_0x3f1a14,_0x842148;const _0x26c50d=(_0x271258=this[_0x799665(0x1c7)][_0x799665(0x172)](_0xa21a6c[_0x799665(0x1b1)])[_0x799665(0x19c)](_0x4bf736=>_0x4bf736[_0x799665(0x168)]===_0xa21a6c[_0x799665(0x168)]))==null?void 0x0:_0x271258[_0x799665(0x17d)];if(!_0x26c50d)return;const {unitId:_0x5c1446,subUnitId:_0x5b076c}=_0x26c50d;switch(_0xa21a6c[_0x799665(0x1ae)]&&this[_0x799665(0x1b9)][_0x799665(0x193)](_0xa21a6c['user']),_0xa21a6c['type']){case _0x1ea371[_0x799665(0x197)]:break;case _0x1ea371['Reply']:{this[_0x799665(0x1c7)][_0x799665(0x1a8)](_0x5c1446,_0x5b076c,{'unitId':_0x5c1446,'subUnitId':_0x5b076c,'ref':'','id':_0xa21a6c[_0x799665(0x1b0)],'dT':_0x5976f9(+_0xa21a6c[_0x799665(0x1c2)]),'threadId':_0xa21a6c['threadId'],'personId':(_0x3f1a14=(_0x5e91b8=_0xa21a6c[_0x799665(0x1ae)])==null?void 0x0:_0x5e91b8[_0x799665(0x15b)])!=null?_0x3f1a14:_0xa21a6c['userId'],'text':JSON['parse'](_0xa21a6c[_0x799665(0x180)]),'parentId':_0x26c50d['id']});break;}case _0x1ea371[_0x799665(0x1c0)]:{const _0x30f250=this[_0x799665(0x1c7)][_0x799665(0x1a7)](_0x5c1446,_0x5b076c,_0xa21a6c['replyId']);_0x30f250&&_0x30f250['parentId']&&this[_0x799665(0x1c7)]['deleteComment'](_0x5c1446,_0x5b076c,_0xa21a6c[_0x799665(0x1b0)]);break;}case _0x1ea371[_0x799665(0x188)]:{this[_0x799665(0x1c7)][_0x799665(0x1ca)](_0x5c1446,_0x5b076c,{'commentId':_0xa21a6c[_0x799665(0x1b0)],'text':JSON[_0x799665(0x1ba)](_0xa21a6c[_0x799665(0x180)])});break;}case _0x1ea371[_0x799665(0x18a)]:{const _0x4b064d=(_0x842148=this[_0x799665(0x1c7)][_0x799665(0x172)](_0xa21a6c[_0x799665(0x1b1)])[_0x799665(0x19c)](_0x5698d1=>_0x5698d1['threadId']===_0xa21a6c[_0x799665(0x168)]))==null?void 0x0:_0x842148[_0x799665(0x17d)];_0x4b064d&&this['_threadCommentModel'][_0x799665(0x1b7)](_0x5c1446,_0x5b076c,_0x4b064d['id'],_0xa21a6c[_0x799665(0x187)]===_0x2035f4['Solved']);break;}}}));}};_0x36e91=_0x285b1c([_0x63133d(0x0,_0x1c0857['Inject'](_0x1089b[_0x181aa4(0x167)])),_0x63133d(0x1,_0x1c0857[_0x181aa4(0x1ac)](_0x30bf84[_0x181aa4(0x165)])),_0x63133d(0x2,_0x1c0857[_0x181aa4(0x1ac)](_0x1c0857[_0x181aa4(0x194)])),_0x63133d(0x3,_0x1c0857[_0x181aa4(0x1ac)](_0x1c0857['Injector']))],_0x36e91);const _0x45cd00=_0x181aa4(0x184),_0x2da823={};var _0x26563e=Object[_0x181aa4(0x1a4)],_0x30c428=(_0x29e61c,_0x15742e,_0x43ef44,_0xf3cf4c)=>{const _0x345b8a=_0x181aa4;for(var _0x7b1e71=_0xf3cf4c>0x1?void 0x0:_0xf3cf4c?_0x26563e(_0x15742e,_0x43ef44):_0x15742e,_0xe49e7a=_0x29e61c[_0x345b8a(0x1a9)]-0x1,_0x23da7b;_0xe49e7a>=0x0;_0xe49e7a--)(_0x23da7b=_0x29e61c[_0xe49e7a])&&(_0x7b1e71=_0x23da7b(_0x7b1e71)||_0x7b1e71);return _0x7b1e71;},_0x3993fa=(_0x1dc04b,_0x223703)=>(_0x4fbee9,_0x29e3a8)=>_0x223703(_0x4fbee9,_0x29e3a8,_0x1dc04b);function _0x5086a1(_0x1a5de3,_0x2bcbf6){const _0x2cdef9=_0x181aa4,_0x12f29f=_0x1a5de3[_0x2cdef9(0x1b2)][0x0];return{..._0x2bcbf6,'id':_0x12f29f[_0x2cdef9(0x1b0)],'resolved':_0x1a5de3[_0x2cdef9(0x187)]===0x1,'dT':_0x5976f9(_0x12f29f[_0x2cdef9(0x1c2)]),'personId':_0x12f29f[_0x2cdef9(0x15e)],'threadId':_0x12f29f[_0x2cdef9(0x168)]};}function _0x54ca4b(_0x42b495,_0x2419dd,_0x5a3991){const _0x2fcf0e=_0x181aa4;var _0xe2a9e0,_0x358671;if(((_0x358671=(_0xe2a9e0=_0x42b495==null?void 0x0:_0x42b495[_0x2fcf0e(0x1b2)])==null?void 0x0:_0xe2a9e0[_0x2fcf0e(0x1a9)])!=null?_0x358671:0x0)>0x0){const _0x32a78b=(_0x24c245,_0x2b847f)=>({'id':_0x24c245[_0x2fcf0e(0x1b0)],'threadId':_0x24c245[_0x2fcf0e(0x168)],'dT':_0x5976f9(_0x24c245[_0x2fcf0e(0x1c2)]),'personId':_0x24c245[_0x2fcf0e(0x15e)],'resolved':_0x42b495['solved']===_0x2035f4[_0x2fcf0e(0x1ce)],'unitId':_0x2419dd,'subUnitId':_0x5a3991,'text':JSON[_0x2fcf0e(0x1ba)](_0x24c245[_0x2fcf0e(0x180)]),'parentId':_0x2b847f}),_0x5a1c64=_0x32a78b(_0x42b495[_0x2fcf0e(0x1b2)][0x0]);return{..._0x5a1c64,'children':_0x42b495['replies'][_0x2fcf0e(0x1cf)](0x1)[_0x2fcf0e(0x1af)](_0x53e690=>_0x32a78b(_0x53e690,_0x5a1c64['id']))};}return null;}let _0x23f438=class{constructor(_0x281914,_0x41388e,_0x3ffa16,_0x2eb466){const _0x36931e=_0x181aa4;this[_0x36931e(0x155)]=_0x281914,this[_0x36931e(0x1b9)]=_0x41388e,this[_0x36931e(0x1be)]=_0x3ffa16,this[_0x36931e(0x17e)]=_0x2eb466;}async['addComment'](_0x428d7a){const _0x34c490=_0x181aa4;var _0x3d8f22,_0x20afbd;const {parentId:_0x2157c0,unitId:_0x501d32,text:_0x485f6d,threadId:_0x39a142}=_0x428d7a,_0x1e3920=(_0x20afbd=(_0x3d8f22=_0x485f6d[_0x34c490(0x1c1)])==null?void 0x0:_0x3d8f22[_0x34c490(0x1a2)](_0x3a7bee=>_0x3a7bee[_0x34c490(0x160)]===_0x1c0857[_0x34c490(0x1bc)][_0x34c490(0x174)])[_0x34c490(0x1af)](_0x4ef6b0=>_0x4ef6b0['rangeId']))!=null?_0x20afbd:[],_0x4dce78=JSON[_0x34c490(0x1bd)](_0x485f6d),_0x4e7125=(await this['_sessionService'][_0x34c490(0x190)](_0x501d32))[_0x34c490(0x156)]();if(_0x2157c0){const _0x1a5927={'memberId':_0x4e7125,'unitId':_0x501d32,'content':_0x4dce78,'mention':_0x1e3920,'threadId':_0x39a142},_0x11ed7f=(await this[_0x34c490(0x155)][_0x34c490(0x16c)](_0x34c490(0x16b)+_0x501d32+'/reply',{'body':_0x1a5927}))[_0x34c490(0x1a0)]['reply'];return{..._0x428d7a,'id':_0x11ed7f[_0x34c490(0x1b0)],'dT':_0x1c0857[_0x34c490(0x186)](+_0x11ed7f[_0x34c490(0x1c2)])[_0x34c490(0x18f)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x11ed7f[_0x34c490(0x15e)]};}else{const _0x5f42f4={'memberId':_0x4e7125,'unitId':_0x501d32,'content':_0x4dce78,'mention':_0x1e3920},_0x1a7bc7=await this[_0x34c490(0x155)][_0x34c490(0x16c)](_0x34c490(0x16b)+_0x501d32+'/add',{'body':_0x5f42f4});return _0x5086a1(_0x1a7bc7[_0x34c490(0x1a0)][_0x34c490(0x1aa)],_0x428d7a);}}async['updateComment'](_0x2231f2){const _0x6ab912=_0x181aa4;var _0x3b012d,_0xd179c7;const {text:_0x2dddb4,unitId:_0x5091f8}=_0x2231f2,_0x535d34=(_0xd179c7=(_0x3b012d=_0x2dddb4[_0x6ab912(0x1c1)])==null?void 0x0:_0x3b012d[_0x6ab912(0x1a2)](_0x1dce77=>_0x1dce77[_0x6ab912(0x160)]===_0x1c0857[_0x6ab912(0x1bc)][_0x6ab912(0x174)])[_0x6ab912(0x1af)](_0x9f90cd=>_0x9f90cd[_0x6ab912(0x1bf)]))!=null?_0xd179c7:[],_0x47825d=JSON[_0x6ab912(0x1bd)](_0x2dddb4),_0x2df074=_0x2231f2[_0x6ab912(0x168)],_0xf41c59=_0x2231f2['id'],_0x1b88a6={'memberId':(await this[_0x6ab912(0x1be)]['requireSession'](_0x5091f8))[_0x6ab912(0x156)](),'unitId':_0x5091f8,'threadId':_0x2df074,'mention':_0x535d34,'content':_0x47825d,'replyId':_0xf41c59},_0x2afdf0=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x5091f8+_0x6ab912(0x19f),{'body':_0x1b88a6});return!_0x2afdf0['body'][_0x6ab912(0x1c6)]||_0x2afdf0[_0x6ab912(0x1a0)][_0x6ab912(0x1c6)][_0x6ab912(0x1b4)]===0x1;}async[_0x181aa4(0x1b7)](_0x375e8f){const _0x4a32ce=_0x181aa4,{unitId:_0x2e14ce}=_0x375e8f,_0x315d19=_0x375e8f[_0x4a32ce(0x168)],_0x1b03d7={'memberId':this[_0x4a32ce(0x1b9)][_0x4a32ce(0x16e)]()[_0x4a32ce(0x15b)],'unitId':_0x2e14ce,'threadId':_0x315d19,'solved':_0x375e8f[_0x4a32ce(0x185)]?_0x2035f4[_0x4a32ce(0x1ce)]:_0x2035f4['OpenOrReOpen']},_0x3fa130=await this[_0x4a32ce(0x155)][_0x4a32ce(0x16c)](_0x4a32ce(0x16b)+_0x2e14ce+_0x4a32ce(0x18e),{'body':_0x1b03d7});return!_0x3fa130[_0x4a32ce(0x1a0)][_0x4a32ce(0x1c6)]||_0x3fa130[_0x4a32ce(0x1a0)]['error'][_0x4a32ce(0x1b4)]===0x1;}async[_0x181aa4(0x150)](_0x300367,_0x42f9bf,_0x26a2b8,_0x1593ef){const _0x592082=_0x181aa4,_0x4a4927={'memberId':(await this[_0x592082(0x1be)]['requireSession'](_0x300367))[_0x592082(0x156)](),'threadId':_0x26a2b8,'replyId':_0x1593ef,'unitId':_0x300367},_0x4b420c=await this[_0x592082(0x155)]['post'](_0x592082(0x16b)+_0x300367+_0x592082(0x15d),{'body':_0x4a4927});return!_0x4b420c[_0x592082(0x1a0)][_0x592082(0x1c6)]||_0x4b420c[_0x592082(0x1a0)][_0x592082(0x1c6)]['code']===0x1;}async[_0x181aa4(0x1d2)](_0x5da8d2,_0x4784a4,_0x18e2d7){const _0x430d2f=_0x181aa4,_0x44ec12={'unitId':_0x5da8d2,'threadId':_0x18e2d7},_0x4f91e1=await this['_httpService'][_0x430d2f(0x16c)](_0x430d2f(0x16b)+_0x5da8d2+_0x430d2f(0x1c5),{'body':_0x44ec12}),_0x1fa84e=_0x18e2d7[_0x430d2f(0x1af)](_0x1d5dee=>_0x54ca4b(_0x4f91e1[_0x430d2f(0x1a0)]['comments'][_0x1d5dee],_0x5da8d2,_0x4784a4))[_0x430d2f(0x1a2)](Boolean);return Object[_0x430d2f(0x1c4)](_0x4f91e1['body']['users'])[_0x430d2f(0x19b)](_0x4f3222=>{const _0x2c0375=_0x430d2f;this[_0x2c0375(0x1b9)]['addUser'](_0x4f3222);}),_0x1fa84e;}[_0x181aa4(0x1b6)](_0x411c2d){const _0x281b87=_0x181aa4;return{'id':_0x411c2d['id'],'threadId':_0x411c2d[_0x281b87(0x168)],'ref':_0x411c2d[_0x281b87(0x182)]};}};_0x23f438=_0x30c428([_0x3993fa(0x0,_0x1c0857[_0x181aa4(0x1ac)](_0x42b443[_0x181aa4(0x175)])),_0x3993fa(0x1,_0x1c0857[_0x181aa4(0x1ac)](_0x1c0857[_0x181aa4(0x194)])),_0x3993fa(0x2,_0x1c0857[_0x181aa4(0x1ac)](_0x1089b[_0x181aa4(0x177)])),_0x3993fa(0x3,_0x1c0857[_0x181aa4(0x1ac)](_0x1c0857[_0x181aa4(0x183)]))],_0x23f438);var _0xde6b33=Object['getOwnPropertyDescriptor'],_0x202adc=(_0xa84599,_0x22ecd8,_0x2f50cb,_0x149f51)=>{const _0x717681=_0x181aa4;for(var _0x510922=_0x149f51>0x1?void 0x0:_0x149f51?_0xde6b33(_0x22ecd8,_0x2f50cb):_0x22ecd8,_0x33076b=_0xa84599[_0x717681(0x1a9)]-0x1,_0x59e338;_0x33076b>=0x0;_0x33076b--)(_0x59e338=_0xa84599[_0x33076b])&&(_0x510922=_0x59e338(_0x510922)||_0x510922);return _0x510922;},_0x553b9b=(_0x52e3c0,_0x525ecb)=>(_0x13170c,_0x20266d)=>_0x525ecb(_0x13170c,_0x20266d,_0x52e3c0);let _0x35938c=class extends _0x1c0857['Disposable']{constructor(_0x3de811,_0x429bfd){super(),this['_threadCommentDataSourceService']=_0x3de811,this['_threadCommentDataSource']=_0x429bfd,this['_initDataSource']();}[_0x181aa4(0x1ab)](){const _0x513f9f=_0x181aa4;this['_threadCommentDataSourceService'][_0x513f9f(0x15f)]=this['_threadCommentDataSource'],this[_0x513f9f(0x1d4)][_0x513f9f(0x18b)]=!0x1;}};_0x35938c=_0x202adc([_0x553b9b(0x0,_0x30bf84[_0x181aa4(0x171)]),_0x553b9b(0x1,_0x1c0857[_0x181aa4(0x1ac)](_0x23f438))],_0x35938c);var _0x3d44bc=Object['defineProperty'],_0x4bddf9=Object[_0x181aa4(0x1a4)],_0x2616bb=(_0x10686e,_0x10aed4,_0x41d05b)=>_0x10aed4 in _0x10686e?_0x3d44bc(_0x10686e,_0x10aed4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x41d05b}):_0x10686e[_0x10aed4]=_0x41d05b,_0x58ce34=(_0x55cf84,_0x4c09c4,_0x1c91a3,_0x7ac44b)=>{const _0x43e421=_0x181aa4;for(var _0x3e274e=_0x7ac44b>0x1?void 0x0:_0x7ac44b?_0x4bddf9(_0x4c09c4,_0x1c91a3):_0x4c09c4,_0x3573ee=_0x55cf84[_0x43e421(0x1a9)]-0x1,_0x18ca67;_0x3573ee>=0x0;_0x3573ee--)(_0x18ca67=_0x55cf84[_0x3573ee])&&(_0x3e274e=_0x18ca67(_0x3e274e)||_0x3e274e);return _0x3e274e;},_0x1325a1=(_0x364e8f,_0x2b62c8)=>(_0x382fa1,_0x585242)=>_0x2b62c8(_0x382fa1,_0x585242,_0x364e8f),_0x116e74=(_0x32a29f,_0x29e5c2,_0x336863)=>_0x2616bb(_0x32a29f,typeof _0x29e5c2!=_0x181aa4(0x1c3)?_0x29e5c2+'':_0x29e5c2,_0x336863);_0x2a7035[_0x181aa4(0x192)]=class extends _0x1c0857['Plugin']{constructor(_0x2ac555=_0x2da823,_0x778947,_0x49be90){const _0x19cc9f=_0x181aa4;super(),this[_0x19cc9f(0x1cc)]=_0x2ac555,this['_injector']=_0x778947,this[_0x19cc9f(0x14e)]=_0x49be90;const {..._0x1e3f7b}=_0x1c0857[_0x19cc9f(0x1cd)]({},_0x2da823,this[_0x19cc9f(0x1cc)]);this[_0x19cc9f(0x14e)][_0x19cc9f(0x19e)](_0x45cd00,_0x1e3f7b);}[_0x181aa4(0x1a1)](){[[_0x23f438],[_0x35938c],[_0x36e91]]['forEach'](_0x339240=>{const _0x1d9d7a=_0x3dee;this[_0x1d9d7a(0x17e)][_0x1d9d7a(0x16d)](_0x339240);});}[_0x181aa4(0x164)](){const _0x18bce0=_0x181aa4;this[_0x18bce0(0x17e)][_0x18bce0(0x163)](_0x35938c),this[_0x18bce0(0x17e)]['get'](_0x36e91);}},_0x116e74(_0x2a7035['UniverThreadCommentDataSourcePlugin'],_0x181aa4(0x159),_0x17f6b6),_0x116e74(_0x2a7035[_0x181aa4(0x192)],_0x181aa4(0x152),_0x1c0857['UniverInstanceType'][_0x181aa4(0x19a)]),_0x2a7035[_0x181aa4(0x192)]=_0x58ce34([_0x1c0857[_0x181aa4(0x195)](_0x27f4fe[_0x181aa4(0x1d0)],_0x1089b[_0x181aa4(0x19d)],_0x4f1ae7['UniverLicensePlugin']),_0x1325a1(0x1,_0x1c0857[_0x181aa4(0x1ac)](_0x1c0857['Injector'])),_0x1325a1(0x2,_0x1c0857[_0x181aa4(0x179)])],_0x2a7035[_0x181aa4(0x192)]),Object['defineProperty'](_0x2a7035,Symbol[_0x181aa4(0x1d1)],{'value':_0x181aa4(0x1cb)});}));function _0x44ed(){const _0x2578d0=['getComment','addComment','length','comment','_initDataSource','Inject','UniverProLicense','user','map','replyId','unitId','replies','amd','code','exports','saveCommentToSnapshot','resolveComment','190261rkbevS','_userService','parse','1398500WrmvBE','CustomRangeType','stringify','_sessionService','rangeId','Delete','customRanges','createTimestamp','symbol','values','/list','error','_threadCommentModel','subscribe','Reply','updateComment','Module','_config','merge','Solved','slice','UniverThreadCommentUIPlugin','toStringTag','listComments','@univerjs-pro/license','_threadCommentDataSourceService','_configService','getUser','deleteComment','_init','type','UNRECOGNIZED','UniverThreadCommentUi','_httpService','getMemberID','UniverCore','/universer-api/user/list','pluginName','Unknown','userID','OpenOrReOpen','/delete','userId','dataSource','rangeType','payload','YYYY/MM/DD\x20HH:mm','get','onReady','ThreadCommentModel','6FzjLCR','CommentService','threadId','UniverProCollaborationClient','UniverThreadComment','/universer-api/comment/unit/','post','add','getCurrentUser','function','UniverNetwork','IThreadCommentDataSourceService','getUnit','size','COMMENT','HTTPService','8qfkCTL','CollaborationSessionService','@univerjs/network','IConfigService','bufferTime','24485292aUCWmi','717345yEnLWc','root','_injector','users','content','personId','ref','Injector','thread-comment-data-source.config','resolved','dayjs','solved','Edit','3583865xFdico','Solve','syncUpdateMutationToColla','8687231bEzChn','@univerjs/core','/solved','format','requireSession','@univerjs/thread-comment','UniverThreadCommentDataSourcePlugin','addUser','UserManagerService','DependentOn','object','Add','_commentService','rxjs','UNIVER_UNKNOWN','forEach','find','UniverCollaborationClientPlugin','setConfig','/edit','body','onStarting','filter','Disposable','getOwnPropertyDescriptor','@univerjs-pro/collaboration-client','1238044oqruBf'];_0x44ed=function(){return _0x2578d0;};return _0x44ed();}
|
|
1
|
+
function _0x27e6(_0x559ad2,_0x2081cf){const _0x2cebed=_0x2ceb();return _0x27e6=function(_0x27e662,_0x33e8b0){_0x27e662=_0x27e662-0x1c8;let _0xf5ac66=_0x2cebed[_0x27e662];return _0xf5ac66;},_0x27e6(_0x559ad2,_0x2081cf);}(function(_0x4b129f,_0x50260b){const _0x1ca192=_0x27e6,_0x324640=_0x4b129f();while(!![]){try{const _0x576709=-parseInt(_0x1ca192(0x1ed))/0x1+parseInt(_0x1ca192(0x20b))/0x2+parseInt(_0x1ca192(0x202))/0x3*(parseInt(_0x1ca192(0x211))/0x4)+parseInt(_0x1ca192(0x242))/0x5*(parseInt(_0x1ca192(0x1ea))/0x6)+-parseInt(_0x1ca192(0x1d4))/0x7*(-parseInt(_0x1ca192(0x244))/0x8)+parseInt(_0x1ca192(0x1f6))/0x9+-parseInt(_0x1ca192(0x1fb))/0xa;if(_0x576709===_0x50260b)break;else _0x324640['push'](_0x324640['shift']());}catch(_0x1b6323){_0x324640['push'](_0x324640['shift']());}}}(_0x2ceb,0x41bdd),function(_0x236263,_0x4c5c3e){const _0x557f2a=_0x27e6;typeof exports=='object'&&typeof module<'u'?_0x4c5c3e(exports,require(_0x557f2a(0x22d)),require(_0x557f2a(0x231)),require(_0x557f2a(0x210)),require(_0x557f2a(0x240)),require('@univerjs/thread-comment'),require(_0x557f2a(0x1f0)),require(_0x557f2a(0x21f))):typeof define==_0x557f2a(0x222)&&define[_0x557f2a(0x1db)]?define([_0x557f2a(0x1fe),_0x557f2a(0x22d),_0x557f2a(0x231),'@univerjs/core',_0x557f2a(0x240),_0x557f2a(0x1f7),_0x557f2a(0x1f0),'@univerjs/network'],_0x4c5c3e):(_0x236263=typeof globalThis<'u'?globalThis:_0x236263||self,_0x4c5c3e(_0x236263[_0x557f2a(0x20c)]={},_0x236263[_0x557f2a(0x248)],_0x236263[_0x557f2a(0x21e)],_0x236263[_0x557f2a(0x1ef)],_0x236263[_0x557f2a(0x1e6)],_0x236263[_0x557f2a(0x223)],_0x236263['rxjs'],_0x236263['UniverNetwork']));}(this,function(_0x4c7527,_0x5f0b14,_0x5cba6d,_0x2641c3,_0x5d900e,_0x280cac,_0x21e20e,_0x3d080e){'use strict';const _0x33216d=_0x27e6;const _0x3d8cac=_0x33216d(0x221);var _0x44bcec=(_0x519169=>(_0x519169[_0x519169[_0x33216d(0x208)]=0x0]=_0x33216d(0x208),_0x519169[_0x519169[_0x33216d(0x218)]=0x1]=_0x33216d(0x218),_0x519169[_0x519169[_0x33216d(0x236)]=-0x1]=_0x33216d(0x236),_0x519169))(_0x44bcec||{}),_0x34069e=(_0x544ffd=>(_0x544ffd[_0x544ffd['Unknown']=0x0]=_0x33216d(0x1ec),_0x544ffd[_0x544ffd[_0x33216d(0x1cc)]=0x1]=_0x33216d(0x1cc),_0x544ffd[_0x544ffd[_0x33216d(0x207)]=0x2]=_0x33216d(0x207),_0x544ffd[_0x544ffd['Edit']=0x3]='Edit',_0x544ffd[_0x544ffd['Delete']=0x4]=_0x33216d(0x247),_0x544ffd[_0x544ffd[_0x33216d(0x1d6)]=0x5]=_0x33216d(0x1d6),_0x544ffd[_0x544ffd[_0x33216d(0x236)]=-0x1]='UNRECOGNIZED',_0x544ffd))(_0x34069e||{});const _0x35b441=_0xe03ecf=>_0x2641c3[_0x33216d(0x245)](new Date(+_0xe03ecf))['format'](_0x33216d(0x212)),_0x34915b=async(_0x19e9de,_0x29f200)=>{const _0x1c4458=_0x33216d,_0x469c69=_0x19e9de[_0x1c4458(0x1f5)](_0x2641c3['UserManagerService']),_0x1fd13c=_0x19e9de[_0x1c4458(0x1f5)](_0x3d080e[_0x1c4458(0x1da)]);_0x29f200['forEach'](_0x5d2ba7=>{const _0x2fd712=_0x1c4458;_0x469c69[_0x2fd712(0x233)](_0x5d2ba7)&&_0x29f200['delete'](_0x5d2ba7);}),_0x29f200[_0x1c4458(0x23e)]&&(await _0x1fd13c[_0x1c4458(0x1f5)](_0x1c4458(0x217),{'params':{'userIDs':[..._0x29f200]}}))[_0x1c4458(0x1e9)]['users'][_0x1c4458(0x20f)](_0x41f555=>{const _0x59c8cf=_0x1c4458;_0x41f555&&_0x469c69[_0x59c8cf(0x1e2)](_0x41f555);});};var _0x479eda=Object[_0x33216d(0x1c8)],_0x25d7fd=(_0x54369c,_0x4f84d8,_0x23cea6,_0x45ea8e)=>{const _0x44fc98=_0x33216d;for(var _0x181a79=_0x45ea8e>0x1?void 0x0:_0x45ea8e?_0x479eda(_0x4f84d8,_0x23cea6):_0x4f84d8,_0x30582a=_0x54369c[_0x44fc98(0x1e0)]-0x1,_0xc6c43a;_0x30582a>=0x0;_0x30582a--)(_0xc6c43a=_0x54369c[_0x30582a])&&(_0x181a79=_0xc6c43a(_0x181a79)||_0x181a79);return _0x181a79;},_0x79dbae=(_0x57094b,_0x97aa1f)=>(_0x1f6c7d,_0x476f1d)=>_0x97aa1f(_0x1f6c7d,_0x476f1d,_0x57094b);let _0x3c9ce4=class extends _0x2641c3[_0x33216d(0x22a)]{constructor(_0x18a841,_0x12289f,_0x2a82e1,_0x269dbc){const _0x1611a6=_0x33216d;super(),this[_0x1611a6(0x1f3)]=_0x18a841,this['_threadCommentModel']=_0x12289f,this[_0x1611a6(0x214)]=_0x2a82e1,this[_0x1611a6(0x246)]=_0x269dbc,this[_0x1611a6(0x1ff)](),this[_0x1611a6(0x23a)]();}[_0x33216d(0x23a)](){const _0x4d7398=_0x33216d;this['disposeWithMe'](this[_0x4d7398(0x20e)][_0x4d7398(0x23c)]['pipe'](_0x21e20e[_0x4d7398(0x1c9)](0x10))['subscribe'](_0x332123=>{const _0x29ab75=_0x4d7398,_0x426460=new Set();_0x332123['forEach'](_0x175ec8=>{const _0x5ed125=_0x27e6;switch(_0x175ec8[_0x5ed125(0x213)]){case _0x5ed125(0x1cb):{const _0x4787c7=_0x175ec8[_0x5ed125(0x225)][_0x5ed125(0x22b)];_0x426460[_0x5ed125(0x1cb)](_0x4787c7);break;}}}),_0x34915b(this[_0x29ab75(0x246)],_0x426460);}));}['_init'](){const _0x1e02cb=_0x33216d;this[_0x1e02cb(0x206)](this[_0x1e02cb(0x1f3)][_0x1e02cb(0x23c)][_0x1e02cb(0x1f8)](async _0x43d9cc=>{const _0x2f1cce=_0x1e02cb;var _0x2a2dc8,_0x535407,_0x3f89fd,_0x17ed1f;const _0x4cab71=(_0x2a2dc8=this[_0x2f1cce(0x20e)]['getUnit'](_0x43d9cc['unitId'])['find'](_0x481bdb=>_0x481bdb[_0x2f1cce(0x22f)]===_0x43d9cc[_0x2f1cce(0x22f)]))==null?void 0x0:_0x2a2dc8[_0x2f1cce(0x1d5)];if(!_0x4cab71)return;const {unitId:_0x2714f9,subUnitId:_0xc04173}=_0x4cab71;switch(_0x43d9cc['user']&&this[_0x2f1cce(0x214)][_0x2f1cce(0x1e2)](_0x43d9cc[_0x2f1cce(0x227)]),_0x43d9cc[_0x2f1cce(0x213)]){case _0x34069e[_0x2f1cce(0x1cc)]:break;case _0x34069e[_0x2f1cce(0x207)]:{this[_0x2f1cce(0x20e)]['addComment'](_0x2714f9,_0xc04173,{'unitId':_0x2714f9,'subUnitId':_0xc04173,'ref':'','id':_0x43d9cc['replyId'],'dT':_0x35b441(+_0x43d9cc[_0x2f1cce(0x22c)]),'threadId':_0x43d9cc[_0x2f1cce(0x22f)],'personId':(_0x3f89fd=(_0x535407=_0x43d9cc[_0x2f1cce(0x227)])==null?void 0x0:_0x535407['userID'])!=null?_0x3f89fd:_0x43d9cc[_0x2f1cce(0x243)],'text':JSON[_0x2f1cce(0x23f)](_0x43d9cc[_0x2f1cce(0x209)]),'parentId':_0x4cab71['id']});break;}case _0x34069e[_0x2f1cce(0x247)]:{const _0x2f0889=this[_0x2f1cce(0x20e)][_0x2f1cce(0x1fd)](_0x2714f9,_0xc04173,_0x43d9cc['replyId']);_0x2f0889&&_0x2f0889['parentId']&&this[_0x2f1cce(0x20e)][_0x2f1cce(0x230)](_0x2714f9,_0xc04173,_0x43d9cc['replyId']);break;}case _0x34069e[_0x2f1cce(0x20d)]:{this['_threadCommentModel'][_0x2f1cce(0x1dc)](_0x2714f9,_0xc04173,{'commentId':_0x43d9cc['replyId'],'text':JSON[_0x2f1cce(0x23f)](_0x43d9cc[_0x2f1cce(0x209)])});break;}case _0x34069e[_0x2f1cce(0x1d6)]:{const _0x417253=(_0x17ed1f=this['_threadCommentModel'][_0x2f1cce(0x1e4)](_0x43d9cc[_0x2f1cce(0x220)])[_0x2f1cce(0x237)](_0x2e5685=>_0x2e5685[_0x2f1cce(0x22f)]===_0x43d9cc[_0x2f1cce(0x22f)]))==null?void 0x0:_0x17ed1f[_0x2f1cce(0x1d5)];_0x417253&&this['_threadCommentModel']['resolveComment'](_0x2714f9,_0xc04173,_0x417253['id'],_0x43d9cc[_0x2f1cce(0x205)]===_0x44bcec[_0x2f1cce(0x218)]);break;}}}));}};_0x3c9ce4=_0x25d7fd([_0x79dbae(0x0,_0x2641c3[_0x33216d(0x21d)](_0x5f0b14[_0x33216d(0x241)])),_0x79dbae(0x1,_0x2641c3['Inject'](_0x280cac[_0x33216d(0x1d8)])),_0x79dbae(0x2,_0x2641c3[_0x33216d(0x21d)](_0x2641c3[_0x33216d(0x1ca)])),_0x79dbae(0x3,_0x2641c3['Inject'](_0x2641c3[_0x33216d(0x1de)]))],_0x3c9ce4);const _0x1c5b97='thread-comment-data-source.config',_0x202251={};var _0xe9952c=Object[_0x33216d(0x1c8)],_0x3b14a1=(_0x162b00,_0x3633c8,_0x1023fa,_0x48b366)=>{const _0x2218e2=_0x33216d;for(var _0x549283=_0x48b366>0x1?void 0x0:_0x48b366?_0xe9952c(_0x3633c8,_0x1023fa):_0x3633c8,_0x54ce8f=_0x162b00[_0x2218e2(0x1e0)]-0x1,_0x1f73fe;_0x54ce8f>=0x0;_0x54ce8f--)(_0x1f73fe=_0x162b00[_0x54ce8f])&&(_0x549283=_0x1f73fe(_0x549283)||_0x549283);return _0x549283;},_0x4397bf=(_0x36d5ff,_0x330884)=>(_0x2ea923,_0x5ea62c)=>_0x330884(_0x2ea923,_0x5ea62c,_0x36d5ff);function _0x305d0a(_0x4756ec,_0x27dc13){const _0x16b509=_0x33216d,_0x21e131=_0x4756ec[_0x16b509(0x235)][0x0];return{..._0x27dc13,'id':_0x21e131['replyId'],'resolved':_0x4756ec[_0x16b509(0x205)]===0x1,'dT':_0x35b441(_0x21e131[_0x16b509(0x22c)]),'personId':_0x21e131[_0x16b509(0x243)],'threadId':_0x21e131[_0x16b509(0x22f)]};}function _0x401e8b(_0x3f9716,_0x39a0cb,_0x1ce892){const _0x323afd=_0x33216d;var _0x25940b,_0x416a35;if(((_0x416a35=(_0x25940b=_0x3f9716==null?void 0x0:_0x3f9716[_0x323afd(0x235)])==null?void 0x0:_0x25940b['length'])!=null?_0x416a35:0x0)>0x0){const _0x3c5f76=(_0x9b9088,_0x537c61)=>({'id':_0x9b9088[_0x323afd(0x215)],'threadId':_0x9b9088[_0x323afd(0x22f)],'dT':_0x35b441(_0x9b9088[_0x323afd(0x22c)]),'personId':_0x9b9088[_0x323afd(0x243)],'resolved':_0x3f9716[_0x323afd(0x205)]===_0x44bcec[_0x323afd(0x218)],'unitId':_0x39a0cb,'subUnitId':_0x1ce892,'text':JSON[_0x323afd(0x23f)](_0x9b9088[_0x323afd(0x209)]),'parentId':_0x537c61}),_0x5db7aa=_0x3c5f76(_0x3f9716[_0x323afd(0x235)][0x0]);return{..._0x5db7aa,'children':_0x3f9716[_0x323afd(0x235)][_0x323afd(0x21b)](0x1)['map'](_0x477a53=>_0x3c5f76(_0x477a53,_0x5db7aa['id']))};}return null;}let _0x14dca6=class{constructor(_0x11e174,_0x69b81c,_0xab7d57,_0x289cd8){const _0x38566e=_0x33216d;this[_0x38566e(0x226)]=_0x11e174,this[_0x38566e(0x214)]=_0x69b81c,this[_0x38566e(0x1d1)]=_0xab7d57,this[_0x38566e(0x246)]=_0x289cd8;}async[_0x33216d(0x1d7)](_0x26dc8d){const _0x14aa52=_0x33216d;var _0x435904,_0x29e846;const {parentId:_0xc4836a,unitId:_0x541faa,text:_0x47b14a,threadId:_0x5f0f5b}=_0x26dc8d,_0x54b5bc=(_0x29e846=(_0x435904=_0x47b14a[_0x14aa52(0x1e3)])==null?void 0x0:_0x435904['filter'](_0x5acdd8=>_0x5acdd8[_0x14aa52(0x1e7)]===_0x2641c3[_0x14aa52(0x1e1)][_0x14aa52(0x1fc)])[_0x14aa52(0x23d)](_0x352ff4=>_0x352ff4[_0x14aa52(0x238)]))!=null?_0x29e846:[],_0x333a6b=JSON[_0x14aa52(0x234)](_0x47b14a),_0x460653=(await this[_0x14aa52(0x1d1)][_0x14aa52(0x1cd)](_0x541faa))[_0x14aa52(0x1f9)]();if(_0xc4836a){const _0x5c4649={'memberId':_0x460653,'unitId':_0x541faa,'content':_0x333a6b,'mention':_0x54b5bc,'threadId':_0x5f0f5b},_0x5638bd=(await this[_0x14aa52(0x226)][_0x14aa52(0x228)](_0x14aa52(0x1e8)+_0x541faa+_0x14aa52(0x1f2),{'body':_0x5c4649}))[_0x14aa52(0x1e9)][_0x14aa52(0x1d0)];return{..._0x26dc8d,'id':_0x5638bd['replyId'],'dT':_0x2641c3[_0x14aa52(0x245)](+_0x5638bd[_0x14aa52(0x22c)])['format'](_0x14aa52(0x212)),'personId':_0x5638bd[_0x14aa52(0x243)]};}else{const _0x18d350={'memberId':_0x460653,'unitId':_0x541faa,'content':_0x333a6b,'mention':_0x54b5bc},_0x4a0a58=await this[_0x14aa52(0x226)][_0x14aa52(0x228)](_0x14aa52(0x1e8)+_0x541faa+_0x14aa52(0x24b),{'body':_0x18d350});return _0x305d0a(_0x4a0a58[_0x14aa52(0x1e9)][_0x14aa52(0x1eb)],_0x26dc8d);}}async[_0x33216d(0x1dc)](_0x127d4e){const _0x569e13=_0x33216d;var _0x5404a4,_0x211737;const {text:_0xb80d02,unitId:_0x75e889}=_0x127d4e,_0x4f5520=(_0x211737=(_0x5404a4=_0xb80d02[_0x569e13(0x1e3)])==null?void 0x0:_0x5404a4['filter'](_0x1f5b0a=>_0x1f5b0a[_0x569e13(0x1e7)]===_0x2641c3['CustomRangeType']['COMMENT'])[_0x569e13(0x23d)](_0x165491=>_0x165491['rangeId']))!=null?_0x211737:[],_0x572403=JSON[_0x569e13(0x234)](_0xb80d02),_0x120178=_0x127d4e['threadId'],_0x57db42=_0x127d4e['id'],_0x1aa1f0={'memberId':(await this[_0x569e13(0x1d1)][_0x569e13(0x1cd)](_0x75e889))[_0x569e13(0x1f9)](),'unitId':_0x75e889,'threadId':_0x120178,'mention':_0x4f5520,'content':_0x572403,'replyId':_0x57db42},_0x5d44c4=await this[_0x569e13(0x226)]['post'](_0x569e13(0x1e8)+_0x75e889+_0x569e13(0x229),{'body':_0x1aa1f0});return!_0x5d44c4[_0x569e13(0x1e9)][_0x569e13(0x1d3)]||_0x5d44c4[_0x569e13(0x1e9)][_0x569e13(0x1d3)]['code']===0x1;}async[_0x33216d(0x21c)](_0x20f269){const _0xc8282f=_0x33216d,{unitId:_0x25e9f7}=_0x20f269,_0x3f8614=_0x20f269['threadId'],_0x42ecbd={'memberId':this[_0xc8282f(0x214)]['getCurrentUser']()['userID'],'unitId':_0x25e9f7,'threadId':_0x3f8614,'solved':_0x20f269['resolved']?_0x44bcec[_0xc8282f(0x218)]:_0x44bcec[_0xc8282f(0x208)]},_0xecf04a=await this[_0xc8282f(0x226)][_0xc8282f(0x228)](_0xc8282f(0x1e8)+_0x25e9f7+_0xc8282f(0x201),{'body':_0x42ecbd});return!_0xecf04a[_0xc8282f(0x1e9)][_0xc8282f(0x1d3)]||_0xecf04a[_0xc8282f(0x1e9)][_0xc8282f(0x1d3)]['code']===0x1;}async['deleteComment'](_0x39ddf6,_0x26d254,_0x5dccfc,_0x267629){const _0x41e766=_0x33216d,_0x199fde={'memberId':(await this[_0x41e766(0x1d1)][_0x41e766(0x1cd)](_0x39ddf6))[_0x41e766(0x1f9)](),'threadId':_0x5dccfc,'replyId':_0x267629,'unitId':_0x39ddf6},_0x138296=await this['_httpService']['post'](_0x41e766(0x1e8)+_0x39ddf6+_0x41e766(0x1d2),{'body':_0x199fde});return!_0x138296[_0x41e766(0x1e9)][_0x41e766(0x1d3)]||_0x138296[_0x41e766(0x1e9)][_0x41e766(0x1d3)][_0x41e766(0x219)]===0x1;}async['listComments'](_0x433a98,_0x2f58e0,_0x1ab961){const _0x11b6f8=_0x33216d,_0x456148={'unitId':_0x433a98,'threadId':_0x1ab961},_0x189641=await this[_0x11b6f8(0x226)][_0x11b6f8(0x228)](_0x11b6f8(0x1e8)+_0x433a98+'/list',{'body':_0x456148}),_0x5ed1f1=_0x1ab961[_0x11b6f8(0x23d)](_0x4652e7=>_0x401e8b(_0x189641[_0x11b6f8(0x1e9)][_0x11b6f8(0x203)][_0x4652e7],_0x433a98,_0x2f58e0))[_0x11b6f8(0x22e)](Boolean);return Object[_0x11b6f8(0x239)](_0x189641[_0x11b6f8(0x1e9)][_0x11b6f8(0x1f1)])[_0x11b6f8(0x20f)](_0x51c8f1=>{const _0x3cb155=_0x11b6f8;this[_0x3cb155(0x214)][_0x3cb155(0x1e2)](_0x51c8f1);}),_0x5ed1f1;}[_0x33216d(0x1fa)](_0x1a8273){const _0x5103d6=_0x33216d;return{'id':_0x1a8273['id'],'threadId':_0x1a8273[_0x5103d6(0x22f)],'ref':_0x1a8273[_0x5103d6(0x1f4)]};}};_0x14dca6=_0x3b14a1([_0x4397bf(0x0,_0x2641c3['Inject'](_0x3d080e['HTTPService'])),_0x4397bf(0x1,_0x2641c3['Inject'](_0x2641c3[_0x33216d(0x1ca)])),_0x4397bf(0x2,_0x2641c3['Inject'](_0x5f0b14[_0x33216d(0x24c)])),_0x4397bf(0x3,_0x2641c3[_0x33216d(0x21d)](_0x2641c3['Injector']))],_0x14dca6);var _0x5c4d8d=Object['getOwnPropertyDescriptor'],_0xfe50e0=(_0x4ae5c4,_0x169b35,_0x17659f,_0x1d1593)=>{const _0x550004=_0x33216d;for(var _0x287fa5=_0x1d1593>0x1?void 0x0:_0x1d1593?_0x5c4d8d(_0x169b35,_0x17659f):_0x169b35,_0x244699=_0x4ae5c4[_0x550004(0x1e0)]-0x1,_0x4f0b14;_0x244699>=0x0;_0x244699--)(_0x4f0b14=_0x4ae5c4[_0x244699])&&(_0x287fa5=_0x4f0b14(_0x287fa5)||_0x287fa5);return _0x287fa5;},_0x488d23=(_0x21d486,_0x14ae3a)=>(_0x2da750,_0x49361e)=>_0x14ae3a(_0x2da750,_0x49361e,_0x21d486);let _0x5bef29=class extends _0x2641c3[_0x33216d(0x22a)]{constructor(_0xab76a5,_0x5e4a94){const _0x302c83=_0x33216d;super(),this['_threadCommentDataSourceService']=_0xab76a5,this[_0x302c83(0x249)]=_0x5e4a94,this[_0x302c83(0x1ce)]();}[_0x33216d(0x1ce)](){const _0x4c6e8e=_0x33216d;this[_0x4c6e8e(0x216)]['dataSource']=this['_threadCommentDataSource'],this[_0x4c6e8e(0x216)]['syncUpdateMutationToColla']=!0x1;}};_0x5bef29=_0xfe50e0([_0x488d23(0x0,_0x280cac[_0x33216d(0x1e5)]),_0x488d23(0x1,_0x2641c3[_0x33216d(0x21d)](_0x14dca6))],_0x5bef29);var _0x41a761=Object['defineProperty'],_0x5906b8=Object['getOwnPropertyDescriptor'],_0x40b2f9=(_0x40e717,_0x27d05d,_0x32e499)=>_0x27d05d in _0x40e717?_0x41a761(_0x40e717,_0x27d05d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x32e499}):_0x40e717[_0x27d05d]=_0x32e499,_0x529393=(_0x65cd56,_0x3ea24e,_0x10d09c,_0xbc0fb7)=>{const _0x50654f=_0x33216d;for(var _0x5e03a8=_0xbc0fb7>0x1?void 0x0:_0xbc0fb7?_0x5906b8(_0x3ea24e,_0x10d09c):_0x3ea24e,_0x887a62=_0x65cd56[_0x50654f(0x1e0)]-0x1,_0x4944df;_0x887a62>=0x0;_0x887a62--)(_0x4944df=_0x65cd56[_0x887a62])&&(_0x5e03a8=_0x4944df(_0x5e03a8)||_0x5e03a8);return _0x5e03a8;},_0x343d90=(_0x19e759,_0x190c32)=>(_0x4c64b3,_0x1002fa)=>_0x190c32(_0x4c64b3,_0x1002fa,_0x19e759),_0x5a014c=(_0x460ef7,_0x156caa,_0x467b68)=>_0x40b2f9(_0x460ef7,typeof _0x156caa!='symbol'?_0x156caa+'':_0x156caa,_0x467b68);_0x4c7527[_0x33216d(0x1df)]=class extends _0x2641c3['Plugin']{constructor(_0x52fe63=_0x202251,_0x2bb6ac,_0x433ef6){const _0x596931=_0x33216d;super(),this[_0x596931(0x200)]=_0x52fe63,this[_0x596931(0x246)]=_0x2bb6ac,this[_0x596931(0x21a)]=_0x433ef6;const {..._0x47f49c}=_0x2641c3[_0x596931(0x1ee)]({},_0x202251,this[_0x596931(0x200)]);this[_0x596931(0x21a)][_0x596931(0x23b)](_0x1c5b97,_0x47f49c);}['onStarting'](){const _0x5c72e8=_0x33216d;[[_0x14dca6],[_0x5bef29],[_0x3c9ce4]][_0x5c72e8(0x20f)](_0x59d807=>{const _0x141a95=_0x5c72e8;this[_0x141a95(0x246)]['add'](_0x59d807);});}[_0x33216d(0x224)](){const _0x165656=_0x33216d;this[_0x165656(0x246)][_0x165656(0x1f5)](_0x5bef29),this['_injector'][_0x165656(0x1f5)](_0x3c9ce4);}},_0x5a014c(_0x4c7527[_0x33216d(0x1df)],_0x33216d(0x1cf),_0x3d8cac),_0x5a014c(_0x4c7527[_0x33216d(0x1df)],_0x33216d(0x213),_0x2641c3[_0x33216d(0x204)]['UNIVER_UNKNOWN']),_0x4c7527[_0x33216d(0x1df)]=_0x529393([_0x2641c3[_0x33216d(0x1d9)](_0x5d900e[_0x33216d(0x1dd)],_0x5f0b14['UniverCollaborationClientPlugin'],_0x5cba6d[_0x33216d(0x24d)]),_0x343d90(0x1,_0x2641c3[_0x33216d(0x21d)](_0x2641c3[_0x33216d(0x1de)])),_0x343d90(0x2,_0x2641c3[_0x33216d(0x232)])],_0x4c7527[_0x33216d(0x1df)]),Object[_0x33216d(0x20a)](_0x4c7527,Symbol[_0x33216d(0x24a)],{'value':'Module'});}));function _0x2ceb(){const _0x16b30e=['find','rangeId','values','_initUserSync','setConfig','commentUpdate$','map','size','parse','@univerjs/thread-comment-ui','CommentService','365gxEdbp','userId','152PUxVYy','dayjs','_injector','Delete','UniverProCollaborationClient','_threadCommentDataSource','toStringTag','/add','CollaborationSessionService','UniverLicensePlugin','getOwnPropertyDescriptor','bufferTime','UserManagerService','add','Add','requireSession','_initDataSource','pluginName','reply','_sessionService','/delete','error','107030GaKlww','root','Solve','addComment','ThreadCommentModel','DependentOn','HTTPService','amd','updateComment','UniverThreadCommentUIPlugin','Injector','UniverThreadCommentDataSourcePlugin','length','CustomRangeType','addUser','customRanges','getUnit','IThreadCommentDataSourceService','UniverThreadCommentUi','rangeType','/universer-api/comment/unit/','body','25578mZgeTg','comment','Unknown','464246OAHMeA','merge','UniverCore','rxjs','users','/reply','_commentService','ref','get','3182589KKOQUB','@univerjs/thread-comment','subscribe','getMemberID','saveCommentToSnapshot','6438410KSTHYa','COMMENT','getComment','exports','_init','_config','/solved','2313tJANfG','comments','UniverInstanceType','solved','disposeWithMe','Reply','OpenOrReOpen','content','defineProperty','663654XOuKfZ','UniverProThreadCommentDatasource','Edit','_threadCommentModel','forEach','@univerjs/core','468FKqWUV','YYYY/MM/DD\x20HH:mm','type','_userService','replyId','_threadCommentDataSourceService','/universer-api/user/list','Solved','code','_configService','slice','resolveComment','Inject','UniverProLicense','@univerjs/network','unitId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','function','UniverThreadComment','onReady','payload','_httpService','user','post','/edit','Disposable','personId','createTimestamp','@univerjs-pro/collaboration-client','filter','threadId','deleteComment','@univerjs-pro/license','IConfigService','getUser','stringify','replies','UNRECOGNIZED'];_0x2ceb=function(){return _0x16b30e;};return _0x2ceb();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.6.6-nightly.
|
|
3
|
+
"version": "0.6.6-nightly.202503221606",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.6.6-nightly.
|
|
49
|
-
"@univerjs
|
|
50
|
-
"@univerjs/core": "0.6.6-nightly.
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.6.6-nightly.
|
|
54
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.6.6-nightly.202503221606",
|
|
49
|
+
"@univerjs/network": "0.6.6-nightly.202503221606",
|
|
50
|
+
"@univerjs/core": "0.6.6-nightly.202503221606",
|
|
51
|
+
"@univerjs-pro/license": "0.6.6-nightly.202503221606",
|
|
52
|
+
"@univerjs/thread-comment": "0.6.6-nightly.202503221606",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.6.6-nightly.202503221606",
|
|
54
|
+
"@univerjs/protocol": "0.1.44-alpha.3"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|