@univerjs-pro/thread-comment-datasource 0.8.3-nightly.202507011607 → 0.8.3-nightly.202507021607
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x4babf3=_0x2d55;(function(_0x6e66b8,_0x2570f7){const _0x1e3540=_0x2d55,_0x3c18db=_0x6e66b8();while(!![]){try{const _0x1382e1=-parseInt(_0x1e3540(0x1f1))/0x1+parseInt(_0x1e3540(0x262))/0x2*(-parseInt(_0x1e3540(0x202))/0x3)+parseInt(_0x1e3540(0x25d))/0x4*(parseInt(_0x1e3540(0x220))/0x5)+-parseInt(_0x1e3540(0x24a))/0x6*(parseInt(_0x1e3540(0x1f5))/0x7)+parseInt(_0x1e3540(0x266))/0x8*(-parseInt(_0x1e3540(0x22b))/0x9)+parseInt(_0x1e3540(0x1f7))/0xa*(parseInt(_0x1e3540(0x245))/0xb)+parseInt(_0x1e3540(0x261))/0xc;if(_0x1382e1===_0x2570f7)break;else _0x3c18db['push'](_0x3c18db['shift']());}catch(_0x1d83bb){_0x3c18db['push'](_0x3c18db['shift']());}}}(_0x5bde,0xb20a4));function _0x5bde(){const _0x3a1b3d=['/reply','Unknown','DependentOn','requireSession','Module','_config','/universer-api/user/list','users','2045960PRrqZy','root','getMemberID','CommentService','43092036nNaeYz','1170xBGAWC','parentId','resolveComment','format','104568CpZbad','getUser','getUnit','payload','syncUpdateMutationToColla','slice','comment','880774PzVBsd','comments','replyId','userId','3095099xbcupB','commentUpdate$','20DPolMa','find','toStringTag','_configService','addComment','_sessionService','/solved','map','forEach','/add','body','6804zfONDf','HTTPService','_initUserSync','personId','UniverInstanceType','rangeId','setConfig','defineProperty','disposeWithMe','Add','pluginName','type','getCurrentUser','error','UNRECOGNIZED','dataSource','resolved','customRanges','size','OpenOrReOpen','reply','Solved','YYYY/MM/DD\x20HH:mm','add','unitId','dayjs','rangeType','UniverThreadCommentDataSourcePlugin','Delete','userID','5YVrDdi','/universer-api/comment/unit/','replies','_commentService','Reply','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','code','stringify','_userService','UNIVER_UNKNOWN','CustomRangeType','882DZYHRJ','content','UserManagerService','Injector','/list','_httpService','_init','ThreadCommentModel','_threadCommentModel','UniverThreadCommentUIPlugin','_injector','getOwnPropertyDescriptor','delete','Solve','addUser','_initDataSource','user','length','merge','threadId','onStarting','solved','parse','_threadCommentDataSourceService','_threadCommentDataSource','Edit','3065854XWWORc','UniverLicensePlugin','Disposable','subscribe','createTimestamp','6ZDvAFq','filter','saveCommentToSnapshot','updateComment','Plugin','values','getComment','post','symbol','Inject','get'];_0x5bde=function(){return _0x3a1b3d;};return _0x5bde();}Object[_0x4babf3(0x209)](exports,Symbol[_0x4babf3(0x1f9)],{'value':_0x4babf3(0x259)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x4babf3(0x225);var I=(_0x52ed43=>(_0x52ed43[_0x52ed43['OpenOrReOpen']=0x0]=_0x4babf3(0x215),_0x52ed43[_0x52ed43[_0x4babf3(0x217)]=0x1]='Solved',_0x52ed43[_0x52ed43[_0x4babf3(0x210)]=-0x1]=_0x4babf3(0x210),_0x52ed43))(I||{}),v=(_0x2040cf=>(_0x2040cf[_0x2040cf[_0x4babf3(0x256)]=0x0]=_0x4babf3(0x256),_0x2040cf[_0x2040cf[_0x4babf3(0x20b)]=0x1]=_0x4babf3(0x20b),_0x2040cf[_0x2040cf[_0x4babf3(0x224)]=0x2]=_0x4babf3(0x224),_0x2040cf[_0x2040cf[_0x4babf3(0x244)]=0x3]='Edit',_0x2040cf[_0x2040cf[_0x4babf3(0x21e)]=0x4]='Delete',_0x2040cf[_0x2040cf[_0x4babf3(0x238)]=0x5]=_0x4babf3(0x238),_0x2040cf[_0x2040cf[_0x4babf3(0x210)]=-0x1]=_0x4babf3(0x210),_0x2040cf))(v||{});const f=_0x223876=>c[_0x4babf3(0x21b)](new Date(+_0x223876))[_0x4babf3(0x265)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x3ace4d,_0x2c961a)=>{const _0x56c63c=_0x4babf3,_0x186687=_0x3ace4d[_0x56c63c(0x254)](c['UserManagerService']),_0x41574e=_0x3ace4d[_0x56c63c(0x254)](P[_0x56c63c(0x203)]);_0x2c961a[_0x56c63c(0x1ff)](_0x433359=>{const _0x5615fc=_0x56c63c;_0x186687[_0x5615fc(0x267)](_0x433359)&&_0x2c961a[_0x5615fc(0x237)](_0x433359);}),_0x2c961a[_0x56c63c(0x214)]&&(await _0x41574e[_0x56c63c(0x254)](_0x56c63c(0x25b),{'params':{'userIDs':[..._0x2c961a]}}))['body'][_0x56c63c(0x25c)]['forEach'](_0x281dea=>{const _0x593599=_0x56c63c;_0x281dea&&_0x186687[_0x593599(0x239)](_0x281dea);});};var $=Object[_0x4babf3(0x236)],E=(_0x2ab57f,_0x39bce7,_0x5ca327,_0x394400)=>{const _0x505065=_0x4babf3;for(var _0x360e97=_0x394400>0x1?void 0x0:_0x394400?$(_0x39bce7,_0x5ca327):_0x39bce7,_0x1465c0=_0x2ab57f[_0x505065(0x23c)]-0x1,_0xc3bd3a;_0x1465c0>=0x0;_0x1465c0--)(_0xc3bd3a=_0x2ab57f[_0x1465c0])&&(_0x360e97=_0xc3bd3a(_0x360e97)||_0x360e97);return _0x360e97;},S=(_0x1fd4ca,_0x320e7f)=>(_0x51f2fb,_0x3d4424)=>_0x320e7f(_0x51f2fb,_0x3d4424,_0x1fd4ca);function _0x2d55(_0x3177b0,_0x176f4d){const _0x5bdedc=_0x5bde();return _0x2d55=function(_0x2d5525,_0x4d35ad){_0x2d5525=_0x2d5525-0x1f0;let _0x53780b=_0x5bdedc[_0x2d5525];return _0x53780b;},_0x2d55(_0x3177b0,_0x176f4d);}let p=class extends c[_0x4babf3(0x247)]{constructor(_0x5a920b,_0xe15aeb,_0x10a64b,_0x2e9194){const _0x36fa3a=_0x4babf3;super(),this['_commentService']=_0x5a920b,this[_0x36fa3a(0x233)]=_0xe15aeb,this['_userService']=_0x10a64b,this[_0x36fa3a(0x235)]=_0x2e9194,this[_0x36fa3a(0x231)](),this[_0x36fa3a(0x204)]();}[_0x4babf3(0x204)](){const _0x29644e=_0x4babf3;this[_0x29644e(0x20a)](this[_0x29644e(0x233)][_0x29644e(0x1f6)]['pipe'](w['bufferTime'](0x10))[_0x29644e(0x248)](_0x5d04cc=>{const _0x37de9e=_0x29644e,_0x1108c9=new Set();_0x5d04cc[_0x37de9e(0x1ff)](_0x46e08f=>{const _0x4449e0=_0x37de9e;switch(_0x46e08f[_0x4449e0(0x20d)]){case'add':{const _0x2c3a7a=_0x46e08f[_0x4449e0(0x269)][_0x4449e0(0x205)];_0x1108c9[_0x4449e0(0x219)](_0x2c3a7a);break;}}}),R(this[_0x37de9e(0x235)],_0x1108c9);}));}['_init'](){const _0x1e2644=_0x4babf3;this[_0x1e2644(0x20a)](this[_0x1e2644(0x223)][_0x1e2644(0x1f6)][_0x1e2644(0x248)](async _0x2c3ea5=>{const _0x233ebf=_0x1e2644;var _0x520e92,_0x4cfbec,_0x400fd6,_0x2b6909;const _0x2bd558=(_0x520e92=this[_0x233ebf(0x233)][_0x233ebf(0x268)](_0x2c3ea5['unitId'])[_0x233ebf(0x1f8)](_0x12a94d=>_0x12a94d[_0x233ebf(0x23e)]===_0x2c3ea5['threadId']))==null?void 0x0:_0x520e92[_0x233ebf(0x25e)];if(!_0x2bd558)return;const {unitId:_0xb314a0,subUnitId:_0x2ff14e}=_0x2bd558;switch(_0x2c3ea5[_0x233ebf(0x23b)]&&this[_0x233ebf(0x228)][_0x233ebf(0x239)](_0x2c3ea5[_0x233ebf(0x23b)]),_0x2c3ea5[_0x233ebf(0x20d)]){case v[_0x233ebf(0x20b)]:break;case v[_0x233ebf(0x224)]:{this[_0x233ebf(0x233)][_0x233ebf(0x1fb)](_0xb314a0,_0x2ff14e,{'unitId':_0xb314a0,'subUnitId':_0x2ff14e,'ref':'','id':_0x2c3ea5[_0x233ebf(0x1f3)],'dT':f(+_0x2c3ea5['createTimestamp']),'threadId':_0x2c3ea5['threadId'],'personId':(_0x400fd6=(_0x4cfbec=_0x2c3ea5['user'])==null?void 0x0:_0x4cfbec['userID'])!=null?_0x400fd6:_0x2c3ea5['userId'],'text':JSON['parse'](_0x2c3ea5[_0x233ebf(0x22c)]),'parentId':_0x2bd558['id']});break;}case v[_0x233ebf(0x21e)]:{const _0x35b3be=this[_0x233ebf(0x233)][_0x233ebf(0x250)](_0xb314a0,_0x2ff14e,_0x2c3ea5[_0x233ebf(0x1f3)]);_0x35b3be&&_0x35b3be[_0x233ebf(0x263)]&&this[_0x233ebf(0x233)]['deleteComment'](_0xb314a0,_0x2ff14e,_0x2c3ea5[_0x233ebf(0x1f3)]);break;}case v[_0x233ebf(0x244)]:{this[_0x233ebf(0x233)][_0x233ebf(0x24d)](_0xb314a0,_0x2ff14e,{'commentId':_0x2c3ea5['replyId'],'text':JSON['parse'](_0x2c3ea5[_0x233ebf(0x22c)])});break;}case v[_0x233ebf(0x238)]:{const _0x4e603b=(_0x2b6909=this[_0x233ebf(0x233)][_0x233ebf(0x268)](_0x2c3ea5[_0x233ebf(0x21a)])[_0x233ebf(0x1f8)](_0x4ddf0d=>_0x4ddf0d[_0x233ebf(0x23e)]===_0x2c3ea5[_0x233ebf(0x23e)]))==null?void 0x0:_0x2b6909[_0x233ebf(0x25e)];_0x4e603b&&this[_0x233ebf(0x233)][_0x233ebf(0x264)](_0xb314a0,_0x2ff14e,_0x4e603b['id'],_0x2c3ea5[_0x233ebf(0x240)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x4babf3(0x253)](b[_0x4babf3(0x260)])),S(0x1,c['Inject'](M[_0x4babf3(0x232)])),S(0x2,c[_0x4babf3(0x253)](c[_0x4babf3(0x22d)])),S(0x3,c[_0x4babf3(0x253)](c[_0x4babf3(0x22e)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x4babf3(0x236)],x=(_0x58f7df,_0x3cbaaa,_0x3c37d4,_0x490ab3)=>{const _0x4081e0=_0x4babf3;for(var _0x5a4ffb=_0x490ab3>0x1?void 0x0:_0x490ab3?A(_0x3cbaaa,_0x3c37d4):_0x3cbaaa,_0x1355c5=_0x58f7df[_0x4081e0(0x23c)]-0x1,_0x2682fb;_0x1355c5>=0x0;_0x1355c5--)(_0x2682fb=_0x58f7df[_0x1355c5])&&(_0x5a4ffb=_0x2682fb(_0x5a4ffb)||_0x5a4ffb);return _0x5a4ffb;},_=(_0x52eebb,_0x24e95a)=>(_0x5bb277,_0x36be26)=>_0x24e95a(_0x5bb277,_0x36be26,_0x52eebb);function Y(_0x55c67b,_0x507c92){const _0x1f1dd5=_0x4babf3,_0x197d3a=_0x55c67b[_0x1f1dd5(0x222)][0x0];return{..._0x507c92,'id':_0x197d3a[_0x1f1dd5(0x1f3)],'resolved':_0x55c67b[_0x1f1dd5(0x240)]===0x1,'dT':f(_0x197d3a[_0x1f1dd5(0x249)]),'personId':_0x197d3a[_0x1f1dd5(0x1f4)],'threadId':_0x197d3a['threadId']};}function G(_0x27e0d2,_0x469f9d,_0x551d49){const _0x18a139=_0x4babf3;var _0x4a8e37,_0x30d909;if(((_0x30d909=(_0x4a8e37=_0x27e0d2==null?void 0x0:_0x27e0d2[_0x18a139(0x222)])==null?void 0x0:_0x4a8e37[_0x18a139(0x23c)])!=null?_0x30d909:0x0)>0x0){const _0x6c78c7=(_0x5de07f,_0x286117)=>({'id':_0x5de07f[_0x18a139(0x1f3)],'threadId':_0x5de07f[_0x18a139(0x23e)],'dT':f(_0x5de07f['createTimestamp']),'personId':_0x5de07f[_0x18a139(0x1f4)],'resolved':_0x27e0d2[_0x18a139(0x240)]===I['Solved'],'unitId':_0x469f9d,'subUnitId':_0x551d49,'text':JSON[_0x18a139(0x241)](_0x5de07f[_0x18a139(0x22c)]),'parentId':_0x286117}),_0x54fec9=_0x6c78c7(_0x27e0d2[_0x18a139(0x222)][0x0]);return{..._0x54fec9,'children':_0x27e0d2[_0x18a139(0x222)][_0x18a139(0x26b)](0x1)[_0x18a139(0x1fe)](_0x6579e7=>_0x6c78c7(_0x6579e7,_0x54fec9['id']))};}return null;}let g=class{constructor(_0x2e1fba,_0x18a575,_0x50f479,_0x2b6076){const _0x1dbef9=_0x4babf3;this[_0x1dbef9(0x230)]=_0x2e1fba,this[_0x1dbef9(0x228)]=_0x18a575,this[_0x1dbef9(0x1fc)]=_0x50f479,this[_0x1dbef9(0x235)]=_0x2b6076;}async['addComment'](_0x3585e5){const _0x1dd893=_0x4babf3;var _0x38a70f,_0x4e9661;const {parentId:_0x59f47c,unitId:_0x15b7d4,text:_0x59b468,threadId:_0x59daab}=_0x3585e5,_0x3f2537=(_0x4e9661=(_0x38a70f=_0x59b468[_0x1dd893(0x213)])==null?void 0x0:_0x38a70f[_0x1dd893(0x24b)](_0x3fb9d3=>_0x3fb9d3[_0x1dd893(0x21c)]===c[_0x1dd893(0x22a)]['COMMENT'])[_0x1dd893(0x1fe)](_0x5dd6a7=>_0x5dd6a7[_0x1dd893(0x207)]))!=null?_0x4e9661:[],_0x4e536a=JSON[_0x1dd893(0x227)](_0x59b468),_0x99df47=(await this[_0x1dd893(0x1fc)]['requireSession'](_0x15b7d4))['getMemberID']();if(_0x59f47c){const _0x20e1f8={'memberId':_0x99df47,'unitId':_0x15b7d4,'content':_0x4e536a,'mention':_0x3f2537,'threadId':_0x59daab},_0xcc147b=(await this['_httpService']['post']('/universer-api/comment/unit/'+_0x15b7d4+_0x1dd893(0x255),{'body':_0x20e1f8}))[_0x1dd893(0x201)][_0x1dd893(0x216)];return{..._0x3585e5,'id':_0xcc147b[_0x1dd893(0x1f3)],'dT':c['dayjs'](+_0xcc147b[_0x1dd893(0x249)])['format'](_0x1dd893(0x218)),'personId':_0xcc147b['userId']};}else{const _0x24b762={'memberId':_0x99df47,'unitId':_0x15b7d4,'content':_0x4e536a,'mention':_0x3f2537},_0x1f21e8=await this[_0x1dd893(0x230)][_0x1dd893(0x251)](_0x1dd893(0x221)+_0x15b7d4+_0x1dd893(0x200),{'body':_0x24b762});return Y(_0x1f21e8[_0x1dd893(0x201)][_0x1dd893(0x1f0)],_0x3585e5);}}async[_0x4babf3(0x24d)](_0x40e15a){const _0x372623=_0x4babf3;var _0x2e2ee6,_0x55d550;const {text:_0xdbbdc4,unitId:_0x135487}=_0x40e15a,_0x82820b=(_0x55d550=(_0x2e2ee6=_0xdbbdc4[_0x372623(0x213)])==null?void 0x0:_0x2e2ee6['filter'](_0x22174a=>_0x22174a['rangeType']===c[_0x372623(0x22a)]['COMMENT'])[_0x372623(0x1fe)](_0x2cdf7b=>_0x2cdf7b['rangeId']))!=null?_0x55d550:[],_0x138322=JSON[_0x372623(0x227)](_0xdbbdc4),_0x515fe4=_0x40e15a[_0x372623(0x23e)],_0x19f336=_0x40e15a['id'],_0x262bdf={'memberId':(await this[_0x372623(0x1fc)]['requireSession'](_0x135487))[_0x372623(0x25f)](),'unitId':_0x135487,'threadId':_0x515fe4,'mention':_0x82820b,'content':_0x138322,'replyId':_0x19f336},_0x141c22=await this[_0x372623(0x230)][_0x372623(0x251)](_0x372623(0x221)+_0x135487+'/edit',{'body':_0x262bdf});return!_0x141c22[_0x372623(0x201)][_0x372623(0x20f)]||_0x141c22['body']['error']['code']===0x1;}async[_0x4babf3(0x264)](_0xe4a107){const _0x1003c6=_0x4babf3,{unitId:_0x397641}=_0xe4a107,_0x35dfcb=_0xe4a107['threadId'],_0x31f399={'memberId':this[_0x1003c6(0x228)][_0x1003c6(0x20e)]()[_0x1003c6(0x21f)],'unitId':_0x397641,'threadId':_0x35dfcb,'solved':_0xe4a107[_0x1003c6(0x212)]?I['Solved']:I[_0x1003c6(0x215)]},_0xc19b28=await this[_0x1003c6(0x230)][_0x1003c6(0x251)]('/universer-api/comment/unit/'+_0x397641+_0x1003c6(0x1fd),{'body':_0x31f399});return!_0xc19b28[_0x1003c6(0x201)]['error']||_0xc19b28[_0x1003c6(0x201)][_0x1003c6(0x20f)][_0x1003c6(0x226)]===0x1;}async['deleteComment'](_0x3c3b27,_0x4c8553,_0x55b5f9,_0x3424c1){const _0x20d82b=_0x4babf3,_0x1a2086={'memberId':(await this[_0x20d82b(0x1fc)][_0x20d82b(0x258)](_0x3c3b27))[_0x20d82b(0x25f)](),'threadId':_0x55b5f9,'replyId':_0x3424c1,'unitId':_0x3c3b27},_0x43d855=await this[_0x20d82b(0x230)][_0x20d82b(0x251)](_0x20d82b(0x221)+_0x3c3b27+'/delete',{'body':_0x1a2086});return!_0x43d855[_0x20d82b(0x201)]['error']||_0x43d855['body']['error'][_0x20d82b(0x226)]===0x1;}async['listComments'](_0x58c790,_0x1c9e1d,_0x432c29){const _0x1bc9a0=_0x4babf3,_0x13cf25={'unitId':_0x58c790,'threadId':_0x432c29},_0x36924e=await this[_0x1bc9a0(0x230)][_0x1bc9a0(0x251)](_0x1bc9a0(0x221)+_0x58c790+_0x1bc9a0(0x22f),{'body':_0x13cf25}),_0xa8e069=_0x432c29[_0x1bc9a0(0x1fe)](_0xc02db5=>G(_0x36924e[_0x1bc9a0(0x201)][_0x1bc9a0(0x1f2)][_0xc02db5],_0x58c790,_0x1c9e1d))[_0x1bc9a0(0x24b)](Boolean);return Object[_0x1bc9a0(0x24f)](_0x36924e[_0x1bc9a0(0x201)][_0x1bc9a0(0x25c)])[_0x1bc9a0(0x1ff)](_0xcebba0=>{const _0x568524=_0x1bc9a0;this[_0x568524(0x228)][_0x568524(0x239)](_0xcebba0);}),_0xa8e069;}[_0x4babf3(0x24c)](_0x3e8ffc){return{'id':_0x3e8ffc['id'],'threadId':_0x3e8ffc['threadId'],'ref':_0x3e8ffc['ref']};}};g=x([_(0x0,c[_0x4babf3(0x253)](P[_0x4babf3(0x203)])),_(0x1,c[_0x4babf3(0x253)](c[_0x4babf3(0x22d)])),_(0x2,c[_0x4babf3(0x253)](b['CollaborationSessionService'])),_(0x3,c[_0x4babf3(0x253)](c[_0x4babf3(0x22e)]))],g);var H=Object[_0x4babf3(0x236)],J=(_0x2b256c,_0x9fb4a7,_0x5d1c49,_0x19e5d8)=>{const _0x48840a=_0x4babf3;for(var _0x4f01fd=_0x19e5d8>0x1?void 0x0:_0x19e5d8?H(_0x9fb4a7,_0x5d1c49):_0x9fb4a7,_0x2eef37=_0x2b256c[_0x48840a(0x23c)]-0x1,_0xb69b6b;_0x2eef37>=0x0;_0x2eef37--)(_0xb69b6b=_0x2b256c[_0x2eef37])&&(_0x4f01fd=_0xb69b6b(_0x4f01fd)||_0x4f01fd);return _0x4f01fd;},y=(_0x31f95b,_0x138a5c)=>(_0x40efe3,_0xea7acf)=>_0x138a5c(_0x40efe3,_0xea7acf,_0x31f95b);let C=class extends c['Disposable']{constructor(_0xbc5627,_0x3ad1d){const _0x5a8f86=_0x4babf3;super(),this[_0x5a8f86(0x242)]=_0xbc5627,this[_0x5a8f86(0x243)]=_0x3ad1d,this[_0x5a8f86(0x23a)]();}[_0x4babf3(0x23a)](){const _0x51a50b=_0x4babf3;this[_0x51a50b(0x242)][_0x51a50b(0x211)]=this['_threadCommentDataSource'],this[_0x51a50b(0x242)][_0x51a50b(0x26a)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x4babf3(0x253)](g))],C);var F=Object[_0x4babf3(0x209)],L=Object[_0x4babf3(0x236)],Z=(_0x3c9017,_0x56af17,_0x6f0fb3)=>_0x56af17 in _0x3c9017?F(_0x3c9017,_0x56af17,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x6f0fb3}):_0x3c9017[_0x56af17]=_0x6f0fb3,W=(_0x354374,_0x2df8bd,_0x154e9e,_0x87673a)=>{for(var _0x4c392c=_0x87673a>0x1?void 0x0:_0x87673a?L(_0x2df8bd,_0x154e9e):_0x2df8bd,_0x1d20a8=_0x354374['length']-0x1,_0x42c182;_0x1d20a8>=0x0;_0x1d20a8--)(_0x42c182=_0x354374[_0x1d20a8])&&(_0x4c392c=_0x42c182(_0x4c392c)||_0x4c392c);return _0x4c392c;},O=(_0xf8f73e,_0x16ebe5)=>(_0x19c655,_0x3355c1)=>_0x16ebe5(_0x19c655,_0x3355c1,_0xf8f73e),N=(_0x5b3313,_0x5b6f2b,_0x3a3f95)=>Z(_0x5b3313,typeof _0x5b6f2b!=_0x4babf3(0x252)?_0x5b6f2b+'':_0x5b6f2b,_0x3a3f95);exports[_0x4babf3(0x21d)]=class extends c[_0x4babf3(0x24e)]{constructor(_0x3103c4=D,_0x19ce29,_0x4dcf9f){const _0xd88bc9=_0x4babf3;super(),this[_0xd88bc9(0x25a)]=_0x3103c4,this[_0xd88bc9(0x235)]=_0x19ce29,this[_0xd88bc9(0x1fa)]=_0x4dcf9f;const {..._0x2318e5}=c[_0xd88bc9(0x23d)]({},D,this['_config']);this[_0xd88bc9(0x1fa)][_0xd88bc9(0x208)](q,_0x2318e5);}[_0x4babf3(0x23f)](){const _0x4753ff=_0x4babf3;[[g],[C],[p]][_0x4753ff(0x1ff)](_0x196311=>{const _0x2f66d5=_0x4753ff;this[_0x2f66d5(0x235)][_0x2f66d5(0x219)](_0x196311);});}['onReady'](){const _0x42c438=_0x4babf3;this['_injector'][_0x42c438(0x254)](C),this[_0x42c438(0x235)][_0x42c438(0x254)](p);}},N(exports[_0x4babf3(0x21d)],_0x4babf3(0x20c),U),N(exports['UniverThreadCommentDataSourcePlugin'],'type',c[_0x4babf3(0x206)][_0x4babf3(0x229)]),exports[_0x4babf3(0x21d)]=W([c[_0x4babf3(0x257)](j[_0x4babf3(0x234)],b['UniverCollaborationClientPlugin'],T[_0x4babf3(0x246)]),O(0x1,c[_0x4babf3(0x253)](c[_0x4babf3(0x22e)])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';const _0x40798e=_0x1d14;function _0x1d14(_0x4a3085,_0x3fafd5){const _0x571d63=_0x571d();return _0x1d14=function(_0x1d14e6,_0x4e6e6f){_0x1d14e6=_0x1d14e6-0xef;let _0x326c10=_0x571d63[_0x1d14e6];return _0x326c10;},_0x1d14(_0x4a3085,_0x3fafd5);}(function(_0x578eb5,_0x21ba28){const _0xd19dcb=_0x1d14,_0x370dbe=_0x578eb5();while(!![]){try{const _0x25d615=-parseInt(_0xd19dcb(0x112))/0x1*(-parseInt(_0xd19dcb(0x127))/0x2)+-parseInt(_0xd19dcb(0x145))/0x3*(parseInt(_0xd19dcb(0x143))/0x4)+parseInt(_0xd19dcb(0x148))/0x5+-parseInt(_0xd19dcb(0x110))/0x6*(parseInt(_0xd19dcb(0x10a))/0x7)+parseInt(_0xd19dcb(0x119))/0x8+parseInt(_0xd19dcb(0x114))/0x9+-parseInt(_0xd19dcb(0x15e))/0xa*(parseInt(_0xd19dcb(0xf0))/0xb);if(_0x25d615===_0x21ba28)break;else _0x370dbe['push'](_0x370dbe['shift']());}catch(_0x513257){_0x370dbe['push'](_0x370dbe['shift']());}}}(_0x571d,0xeece1));Object[_0x40798e(0x108)](exports,Symbol[_0x40798e(0x128)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x40798e(0x14a);var I=(_0x38e03d=>(_0x38e03d[_0x38e03d[_0x40798e(0xff)]=0x0]=_0x40798e(0xff),_0x38e03d[_0x38e03d[_0x40798e(0x11f)]=0x1]='Solved',_0x38e03d[_0x38e03d['UNRECOGNIZED']=-0x1]=_0x40798e(0x155),_0x38e03d))(I||{}),v=(_0x10e497=>(_0x10e497[_0x10e497[_0x40798e(0x15d)]=0x0]=_0x40798e(0x15d),_0x10e497[_0x10e497[_0x40798e(0x11a)]=0x1]='Add',_0x10e497[_0x10e497[_0x40798e(0x13f)]=0x2]=_0x40798e(0x13f),_0x10e497[_0x10e497[_0x40798e(0x165)]=0x3]=_0x40798e(0x165),_0x10e497[_0x10e497[_0x40798e(0x130)]=0x4]='Delete',_0x10e497[_0x10e497[_0x40798e(0x14e)]=0x5]=_0x40798e(0x14e),_0x10e497[_0x10e497['UNRECOGNIZED']=-0x1]=_0x40798e(0x155),_0x10e497))(v||{});const f=_0x20964f=>c[_0x40798e(0x12f)](new Date(+_0x20964f))[_0x40798e(0x106)](_0x40798e(0x138)),R=async(_0x26322f,_0x1baf77)=>{const _0x5f0e7c=_0x40798e,_0x5f458a=_0x26322f[_0x5f0e7c(0x153)](c[_0x5f0e7c(0x11d)]),_0x640d3e=_0x26322f[_0x5f0e7c(0x153)](P[_0x5f0e7c(0xfe)]);_0x1baf77['forEach'](_0xbaadab=>{const _0x58b12f=_0x5f0e7c;_0x5f458a['getUser'](_0xbaadab)&&_0x1baf77[_0x58b12f(0x137)](_0xbaadab);}),_0x1baf77[_0x5f0e7c(0x140)]&&(await _0x640d3e[_0x5f0e7c(0x153)](_0x5f0e7c(0x154),{'params':{'userIDs':[..._0x1baf77]}}))[_0x5f0e7c(0x158)][_0x5f0e7c(0x13a)][_0x5f0e7c(0x163)](_0x2d7c41=>{_0x2d7c41&&_0x5f458a['addUser'](_0x2d7c41);});};var $=Object[_0x40798e(0xf1)],E=(_0x4b5627,_0x474e67,_0xe68e05,_0x3ac944)=>{const _0x527257=_0x40798e;for(var _0x5145f7=_0x3ac944>0x1?void 0x0:_0x3ac944?$(_0x474e67,_0xe68e05):_0x474e67,_0x558e4d=_0x4b5627[_0x527257(0x11b)]-0x1,_0x3fade1;_0x558e4d>=0x0;_0x558e4d--)(_0x3fade1=_0x4b5627[_0x558e4d])&&(_0x5145f7=_0x3fade1(_0x5145f7)||_0x5145f7);return _0x5145f7;},S=(_0x4166ae,_0x2f6fba)=>(_0x158919,_0x55d19a)=>_0x2f6fba(_0x158919,_0x55d19a,_0x4166ae);function _0x571d(){const _0x3699d1=['toStringTag','_threadCommentDataSourceService','error','map','thread-comment-data-source.config','post','reply','dayjs','Delete','_sessionService','comments','UniverLicensePlugin','Inject','UniverCollaborationClientPlugin','code','delete','YYYY/MM/DD\x20HH:mm','createTimestamp','users','DependentOn','_commentService','replies','_userService','Reply','size','getComment','resolved','8siAPBN','syncUpdateMutationToColla','2568219RCCGXe','personId','stringify','4139390vZUVJw','/solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/add','/reply','IConfigService','Solve','merge','/list','CollaborationSessionService','deleteComment','get','/universer-api/user/list','UNRECOGNIZED','content','user','body','getUnit','COMMENT','Injector','Plugin','Unknown','11630gMQJgq','rangeId','/universer-api/comment/unit/','_injector','addUser','forEach','resolveComment','Edit','payload','getMemberID','type','replyId','filter','132xQxwgj','getOwnPropertyDescriptor','saveCommentToSnapshot','_config','/delete','disposeWithMe','subscribe','addComment','userID','userId','threadId','UniverThreadCommentUIPlugin','solved','root','HTTPService','OpenOrReOpen','onStarting','CommentService','add','pluginName','pipe','ThreadCommentModel','format','parse','defineProperty','getCurrentUser','231CdgOch','UniverThreadCommentDataSourcePlugin','_init','parentId','IThreadCommentDataSourceService','_initUserSync','255174MIdWnV','_threadCommentDataSource','347828FDmCyR','updateComment','13768101MNbulV','slice','values','requireSession','onReady','8435048YzSfNt','Add','length','rangeType','UserManagerService','_threadCommentModel','Solved','customRanges','Disposable','listComments','_initDataSource','_httpService','/edit','CustomRangeType','4pIdeRO'];_0x571d=function(){return _0x3699d1;};return _0x571d();}let p=class extends c['Disposable']{constructor(_0x47dc7c,_0x20d08f,_0x1bf74c,_0x36ef46){const _0x10350d=_0x40798e;super(),this[_0x10350d(0x13c)]=_0x47dc7c,this[_0x10350d(0x11e)]=_0x20d08f,this[_0x10350d(0x13e)]=_0x1bf74c,this[_0x10350d(0x161)]=_0x36ef46,this[_0x10350d(0x10c)](),this['_initUserSync']();}[_0x40798e(0x10f)](){const _0x35f514=_0x40798e;this[_0x35f514(0xf5)](this[_0x35f514(0x11e)]['commentUpdate$'][_0x35f514(0x104)](w['bufferTime'](0x10))[_0x35f514(0xf6)](_0x14ccf4=>{const _0x623c4f=_0x35f514,_0xeeaed6=new Set();_0x14ccf4[_0x623c4f(0x163)](_0x5538cf=>{const _0x1102c3=_0x623c4f;switch(_0x5538cf['type']){case _0x1102c3(0x102):{const _0x3dcc8b=_0x5538cf[_0x1102c3(0x166)][_0x1102c3(0x146)];_0xeeaed6[_0x1102c3(0x102)](_0x3dcc8b);break;}}}),R(this[_0x623c4f(0x161)],_0xeeaed6);}));}['_init'](){const _0x3f43e3=_0x40798e;this['disposeWithMe'](this[_0x3f43e3(0x13c)]['commentUpdate$']['subscribe'](async _0xa15d29=>{const _0x443c6e=_0x3f43e3;var _0x446610,_0x2d9cf0,_0x1360c5,_0x1d0ad9;const _0x3bb8af=(_0x446610=this[_0x443c6e(0x11e)]['getUnit'](_0xa15d29['unitId'])['find'](_0x1b07b1=>_0x1b07b1['threadId']===_0xa15d29[_0x443c6e(0xfa)]))==null?void 0x0:_0x446610[_0x443c6e(0xfd)];if(!_0x3bb8af)return;const {unitId:_0x16220d,subUnitId:_0x4b8359}=_0x3bb8af;switch(_0xa15d29[_0x443c6e(0x157)]&&this['_userService'][_0x443c6e(0x162)](_0xa15d29[_0x443c6e(0x157)]),_0xa15d29[_0x443c6e(0x168)]){case v[_0x443c6e(0x11a)]:break;case v[_0x443c6e(0x13f)]:{this[_0x443c6e(0x11e)][_0x443c6e(0xf7)](_0x16220d,_0x4b8359,{'unitId':_0x16220d,'subUnitId':_0x4b8359,'ref':'','id':_0xa15d29[_0x443c6e(0x169)],'dT':f(+_0xa15d29['createTimestamp']),'threadId':_0xa15d29['threadId'],'personId':(_0x1360c5=(_0x2d9cf0=_0xa15d29[_0x443c6e(0x157)])==null?void 0x0:_0x2d9cf0[_0x443c6e(0xf8)])!=null?_0x1360c5:_0xa15d29[_0x443c6e(0xf9)],'text':JSON[_0x443c6e(0x107)](_0xa15d29['content']),'parentId':_0x3bb8af['id']});break;}case v[_0x443c6e(0x130)]:{const _0x1d17f1=this['_threadCommentModel'][_0x443c6e(0x141)](_0x16220d,_0x4b8359,_0xa15d29[_0x443c6e(0x169)]);_0x1d17f1&&_0x1d17f1[_0x443c6e(0x10d)]&&this['_threadCommentModel'][_0x443c6e(0x152)](_0x16220d,_0x4b8359,_0xa15d29['replyId']);break;}case v[_0x443c6e(0x165)]:{this['_threadCommentModel'][_0x443c6e(0x113)](_0x16220d,_0x4b8359,{'commentId':_0xa15d29[_0x443c6e(0x169)],'text':JSON[_0x443c6e(0x107)](_0xa15d29[_0x443c6e(0x156)])});break;}case v['Solve']:{const _0x49b380=(_0x1d0ad9=this[_0x443c6e(0x11e)][_0x443c6e(0x159)](_0xa15d29['unitId'])['find'](_0x355804=>_0x355804[_0x443c6e(0xfa)]===_0xa15d29[_0x443c6e(0xfa)]))==null?void 0x0:_0x1d0ad9[_0x443c6e(0xfd)];_0x49b380&&this[_0x443c6e(0x11e)][_0x443c6e(0x164)](_0x16220d,_0x4b8359,_0x49b380['id'],_0xa15d29[_0x443c6e(0xfc)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x40798e(0x134)](b[_0x40798e(0x101)])),S(0x1,c[_0x40798e(0x134)](M[_0x40798e(0x105)])),S(0x2,c['Inject'](c[_0x40798e(0x11d)])),S(0x3,c['Inject'](c[_0x40798e(0x15b)]))],p);const q=_0x40798e(0x12c),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x15197b,_0x2c11d2,_0x1f479f,_0x4fdae4)=>{const _0x4c25da=_0x40798e;for(var _0x56e961=_0x4fdae4>0x1?void 0x0:_0x4fdae4?A(_0x2c11d2,_0x1f479f):_0x2c11d2,_0x33fafc=_0x15197b[_0x4c25da(0x11b)]-0x1,_0x323baa;_0x33fafc>=0x0;_0x33fafc--)(_0x323baa=_0x15197b[_0x33fafc])&&(_0x56e961=_0x323baa(_0x56e961)||_0x56e961);return _0x56e961;},_=(_0x5861a6,_0x5b34ca)=>(_0x23bd4d,_0x5220a5)=>_0x5b34ca(_0x23bd4d,_0x5220a5,_0x5861a6);function Y(_0x13c486,_0x430008){const _0x21c137=_0x40798e,_0x4d6dd8=_0x13c486[_0x21c137(0x13d)][0x0];return{..._0x430008,'id':_0x4d6dd8['replyId'],'resolved':_0x13c486[_0x21c137(0xfc)]===0x1,'dT':f(_0x4d6dd8[_0x21c137(0x139)]),'personId':_0x4d6dd8[_0x21c137(0xf9)],'threadId':_0x4d6dd8[_0x21c137(0xfa)]};}function G(_0x3183ec,_0x813753,_0x516be9){const _0x4267c2=_0x40798e;var _0x41556e,_0x214a21;if(((_0x214a21=(_0x41556e=_0x3183ec==null?void 0x0:_0x3183ec[_0x4267c2(0x13d)])==null?void 0x0:_0x41556e[_0x4267c2(0x11b)])!=null?_0x214a21:0x0)>0x0){const _0x39cbf0=(_0x58f218,_0x479c13)=>({'id':_0x58f218['replyId'],'threadId':_0x58f218[_0x4267c2(0xfa)],'dT':f(_0x58f218['createTimestamp']),'personId':_0x58f218[_0x4267c2(0xf9)],'resolved':_0x3183ec[_0x4267c2(0xfc)]===I[_0x4267c2(0x11f)],'unitId':_0x813753,'subUnitId':_0x516be9,'text':JSON['parse'](_0x58f218[_0x4267c2(0x156)]),'parentId':_0x479c13}),_0x29ff4a=_0x39cbf0(_0x3183ec[_0x4267c2(0x13d)][0x0]);return{..._0x29ff4a,'children':_0x3183ec['replies'][_0x4267c2(0x115)](0x1)[_0x4267c2(0x12b)](_0x32615b=>_0x39cbf0(_0x32615b,_0x29ff4a['id']))};}return null;}let g=class{constructor(_0x5139be,_0xc72a93,_0x12259a,_0x4ec1de){const _0x226839=_0x40798e;this[_0x226839(0x124)]=_0x5139be,this[_0x226839(0x13e)]=_0xc72a93,this[_0x226839(0x131)]=_0x12259a,this[_0x226839(0x161)]=_0x4ec1de;}async[_0x40798e(0xf7)](_0x45fe02){const _0x923de7=_0x40798e;var _0x186aa9,_0x13eda2;const {parentId:_0x5dfb16,unitId:_0x4932c3,text:_0x3a2aa1,threadId:_0x488f5d}=_0x45fe02,_0x8c78a2=(_0x13eda2=(_0x186aa9=_0x3a2aa1[_0x923de7(0x120)])==null?void 0x0:_0x186aa9[_0x923de7(0xef)](_0x44ce20=>_0x44ce20[_0x923de7(0x11c)]===c[_0x923de7(0x126)][_0x923de7(0x15a)])[_0x923de7(0x12b)](_0x553e8a=>_0x553e8a[_0x923de7(0x15f)]))!=null?_0x13eda2:[],_0x369111=JSON['stringify'](_0x3a2aa1),_0x174b2d=(await this[_0x923de7(0x131)][_0x923de7(0x117)](_0x4932c3))[_0x923de7(0x167)]();if(_0x5dfb16){const _0x3d8610={'memberId':_0x174b2d,'unitId':_0x4932c3,'content':_0x369111,'mention':_0x8c78a2,'threadId':_0x488f5d},_0x49011c=(await this['_httpService'][_0x923de7(0x12d)](_0x923de7(0x160)+_0x4932c3+_0x923de7(0x14c),{'body':_0x3d8610}))['body'][_0x923de7(0x12e)];return{..._0x45fe02,'id':_0x49011c[_0x923de7(0x169)],'dT':c[_0x923de7(0x12f)](+_0x49011c[_0x923de7(0x139)])[_0x923de7(0x106)](_0x923de7(0x138)),'personId':_0x49011c['userId']};}else{const _0x3aac8c={'memberId':_0x174b2d,'unitId':_0x4932c3,'content':_0x369111,'mention':_0x8c78a2},_0x26d62f=await this[_0x923de7(0x124)]['post'](_0x923de7(0x160)+_0x4932c3+_0x923de7(0x14b),{'body':_0x3aac8c});return Y(_0x26d62f[_0x923de7(0x158)]['comment'],_0x45fe02);}}async['updateComment'](_0x188d77){const _0x218c4b=_0x40798e;var _0x3941b3,_0x570723;const {text:_0x584b27,unitId:_0x467f12}=_0x188d77,_0x5412e9=(_0x570723=(_0x3941b3=_0x584b27[_0x218c4b(0x120)])==null?void 0x0:_0x3941b3[_0x218c4b(0xef)](_0x15ecb6=>_0x15ecb6['rangeType']===c['CustomRangeType']['COMMENT'])['map'](_0x164968=>_0x164968['rangeId']))!=null?_0x570723:[],_0x356753=JSON[_0x218c4b(0x147)](_0x584b27),_0x57698f=_0x188d77[_0x218c4b(0xfa)],_0x4b1f8b=_0x188d77['id'],_0x65921e={'memberId':(await this[_0x218c4b(0x131)][_0x218c4b(0x117)](_0x467f12))['getMemberID'](),'unitId':_0x467f12,'threadId':_0x57698f,'mention':_0x5412e9,'content':_0x356753,'replyId':_0x4b1f8b},_0x4e2ec5=await this['_httpService'][_0x218c4b(0x12d)](_0x218c4b(0x160)+_0x467f12+_0x218c4b(0x125),{'body':_0x65921e});return!_0x4e2ec5[_0x218c4b(0x158)]['error']||_0x4e2ec5[_0x218c4b(0x158)]['error']['code']===0x1;}async[_0x40798e(0x164)](_0x3c2cf5){const _0x55e2a2=_0x40798e,{unitId:_0x185239}=_0x3c2cf5,_0x40cb72=_0x3c2cf5['threadId'],_0x113b15={'memberId':this[_0x55e2a2(0x13e)][_0x55e2a2(0x109)]()['userID'],'unitId':_0x185239,'threadId':_0x40cb72,'solved':_0x3c2cf5[_0x55e2a2(0x142)]?I[_0x55e2a2(0x11f)]:I[_0x55e2a2(0xff)]},_0x114d0d=await this[_0x55e2a2(0x124)][_0x55e2a2(0x12d)](_0x55e2a2(0x160)+_0x185239+_0x55e2a2(0x149),{'body':_0x113b15});return!_0x114d0d[_0x55e2a2(0x158)][_0x55e2a2(0x12a)]||_0x114d0d['body'][_0x55e2a2(0x12a)]['code']===0x1;}async[_0x40798e(0x152)](_0x33afcc,_0x4e0a32,_0x1071c6,_0x2bde7f){const _0x266519=_0x40798e,_0x4c5fe8={'memberId':(await this[_0x266519(0x131)][_0x266519(0x117)](_0x33afcc))[_0x266519(0x167)](),'threadId':_0x1071c6,'replyId':_0x2bde7f,'unitId':_0x33afcc},_0x137f76=await this[_0x266519(0x124)][_0x266519(0x12d)](_0x266519(0x160)+_0x33afcc+_0x266519(0xf4),{'body':_0x4c5fe8});return!_0x137f76['body'][_0x266519(0x12a)]||_0x137f76[_0x266519(0x158)][_0x266519(0x12a)][_0x266519(0x136)]===0x1;}async[_0x40798e(0x122)](_0x5b8429,_0x306226,_0x1370f1){const _0x35e9d3=_0x40798e,_0x1e7291={'unitId':_0x5b8429,'threadId':_0x1370f1},_0x35b716=await this['_httpService']['post'](_0x35e9d3(0x160)+_0x5b8429+_0x35e9d3(0x150),{'body':_0x1e7291}),_0x22f33b=_0x1370f1[_0x35e9d3(0x12b)](_0x2447ef=>G(_0x35b716['body'][_0x35e9d3(0x132)][_0x2447ef],_0x5b8429,_0x306226))[_0x35e9d3(0xef)](Boolean);return Object[_0x35e9d3(0x116)](_0x35b716[_0x35e9d3(0x158)][_0x35e9d3(0x13a)])[_0x35e9d3(0x163)](_0x3e0a5a=>{const _0x1323d8=_0x35e9d3;this[_0x1323d8(0x13e)][_0x1323d8(0x162)](_0x3e0a5a);}),_0x22f33b;}[_0x40798e(0xf2)](_0x56df15){const _0x7098f4=_0x40798e;return{'id':_0x56df15['id'],'threadId':_0x56df15[_0x7098f4(0xfa)],'ref':_0x56df15['ref']};}};g=x([_(0x0,c['Inject'](P[_0x40798e(0xfe)])),_(0x1,c['Inject'](c[_0x40798e(0x11d)])),_(0x2,c[_0x40798e(0x134)](b[_0x40798e(0x151)])),_(0x3,c[_0x40798e(0x134)](c['Injector']))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x5e976f,_0x3b490c,_0x3467fa,_0x5db027)=>{for(var _0x1fb190=_0x5db027>0x1?void 0x0:_0x5db027?H(_0x3b490c,_0x3467fa):_0x3b490c,_0x599c8b=_0x5e976f['length']-0x1,_0x5d1380;_0x599c8b>=0x0;_0x599c8b--)(_0x5d1380=_0x5e976f[_0x599c8b])&&(_0x1fb190=_0x5d1380(_0x1fb190)||_0x1fb190);return _0x1fb190;},y=(_0x2dd6d0,_0x49767c)=>(_0x36e196,_0x4c2c78)=>_0x49767c(_0x36e196,_0x4c2c78,_0x2dd6d0);let C=class extends c[_0x40798e(0x121)]{constructor(_0x39aa03,_0x4bb526){const _0x218095=_0x40798e;super(),this[_0x218095(0x129)]=_0x39aa03,this[_0x218095(0x111)]=_0x4bb526,this[_0x218095(0x123)]();}[_0x40798e(0x123)](){const _0x441661=_0x40798e;this[_0x441661(0x129)]['dataSource']=this[_0x441661(0x111)],this[_0x441661(0x129)][_0x441661(0x144)]=!0x1;}};C=J([y(0x0,M[_0x40798e(0x10e)]),y(0x1,c[_0x40798e(0x134)](g))],C);var F=Object[_0x40798e(0x108)],L=Object[_0x40798e(0xf1)],Z=(_0x259581,_0x1922c7,_0x1a80e3)=>_0x1922c7 in _0x259581?F(_0x259581,_0x1922c7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1a80e3}):_0x259581[_0x1922c7]=_0x1a80e3,W=(_0x2e8a60,_0x3ddae1,_0x14e091,_0x4699a0)=>{for(var _0xfe8abb=_0x4699a0>0x1?void 0x0:_0x4699a0?L(_0x3ddae1,_0x14e091):_0x3ddae1,_0x247c91=_0x2e8a60['length']-0x1,_0x635d6;_0x247c91>=0x0;_0x247c91--)(_0x635d6=_0x2e8a60[_0x247c91])&&(_0xfe8abb=_0x635d6(_0xfe8abb)||_0xfe8abb);return _0xfe8abb;},O=(_0x3a394e,_0xcea2f0)=>(_0x2995b5,_0x5b1d10)=>_0xcea2f0(_0x2995b5,_0x5b1d10,_0x3a394e),N=(_0x2d6e7b,_0x15ffe8,_0x309f17)=>Z(_0x2d6e7b,typeof _0x15ffe8!='symbol'?_0x15ffe8+'':_0x15ffe8,_0x309f17);exports[_0x40798e(0x10b)]=class extends c[_0x40798e(0x15c)]{constructor(_0x3973d3=D,_0x3628ae,_0x12a5a9){const _0x54dbb8=_0x40798e;super(),this[_0x54dbb8(0xf3)]=_0x3973d3,this[_0x54dbb8(0x161)]=_0x3628ae,this['_configService']=_0x12a5a9;const {..._0x5f376b}=c[_0x54dbb8(0x14f)]({},D,this[_0x54dbb8(0xf3)]);this['_configService']['setConfig'](q,_0x5f376b);}[_0x40798e(0x100)](){const _0x314986=_0x40798e;[[g],[C],[p]][_0x314986(0x163)](_0x541958=>{const _0x5d10bd=_0x314986;this[_0x5d10bd(0x161)]['add'](_0x541958);});}[_0x40798e(0x118)](){const _0x217db3=_0x40798e;this[_0x217db3(0x161)]['get'](C),this[_0x217db3(0x161)][_0x217db3(0x153)](p);}},N(exports[_0x40798e(0x10b)],_0x40798e(0x103),U),N(exports[_0x40798e(0x10b)],_0x40798e(0x168),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x40798e(0x13b)](j[_0x40798e(0xfb)],b[_0x40798e(0x135)],T[_0x40798e(0x133)]),O(0x1,c[_0x40798e(0x134)](c['Injector'])),O(0x2,c[_0x40798e(0x14d)])],exports[_0x40798e(0x10b)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x142e5a=_0x1064;(function(_0x5d0c7c,_0x4b2018){const _0x44a9e5=_0x1064,_0x8a2d5c=_0x5d0c7c();while(!![]){try{const _0x2ed859=parseInt(_0x44a9e5(0x210))/0x1+parseInt(_0x44a9e5(0x1fa))/0x2*(-parseInt(_0x44a9e5(0x1e7))/0x3)+parseInt(_0x44a9e5(0x1de))/0x4+parseInt(_0x44a9e5(0x1fe))/0x5+-parseInt(_0x44a9e5(0x1d7))/0x6*(-parseInt(_0x44a9e5(0x1bb))/0x7)+parseInt(_0x44a9e5(0x1d5))/0x8*(-parseInt(_0x44a9e5(0x1be))/0x9)+-parseInt(_0x44a9e5(0x21a))/0xa*(parseInt(_0x44a9e5(0x21d))/0xb);if(_0x2ed859===_0x4b2018)break;else _0x8a2d5c['push'](_0x8a2d5c['shift']());}catch(_0x5d8fe3){_0x8a2d5c['push'](_0x8a2d5c['shift']());}}}(_0x2a69,0x1d7af));import{CommentService as _0x34cb78,CollaborationSessionService as _0x3eadcd,UniverCollaborationClientPlugin as _0x2e3deb}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x30e77a}from'@univerjs-pro/license';import{dayjs as _0x547211,UserManagerService as _0x4e69f0,Inject as _0x1e832b,Injector as _0x980829,Disposable as _0x151986,CustomRangeType as _0x3a1ffb,UniverInstanceType as _0x2cb630,DependentOn as _0xdc1d9e,IConfigService as _0x265aa0,Plugin as _0x147f91,merge as _0x35d0e6}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x6ce37e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xef7d91,IThreadCommentDataSourceService as _0x40a1e3}from'@univerjs/thread-comment';function _0x1064(_0x5cc6da,_0x4dba66){const _0x2a6902=_0x2a69();return _0x1064=function(_0x1064e6,_0x25d54f){_0x1064e6=_0x1064e6-0x1b4;let _0x56022d=_0x2a6902[_0x1064e6];return _0x56022d;},_0x1064(_0x5cc6da,_0x4dba66);}import{bufferTime as _0x54d44a}from'rxjs';function _0x2a69(){const _0x2b26ce=['_configService','filter','getUser','body','defineProperty','206698eYTXBu','COMMENT','syncUpdateMutationToColla','replies','846065hfcdDB','userID','/solved','dataSource','payload','_initDataSource','onReady','Solved','getComment','Add','pipe','_threadCommentDataSourceService','/delete','OpenOrReOpen','values','/add','root','stringify','1508UGchQA','resolveComment','Unknown','rangeType','personId','/reply','_init','customRanges','code','reply','10EDsLGA','user','requireSession','3202672lfTuCY','map','format','getOwnPropertyDescriptor','parse','_threadCommentModel','createTimestamp','_threadCommentDataSource','error','5103IqPxhJ','disposeWithMe','commentUpdate$','80559fVtShR','/edit','size','find','onStarting','saveCommentToSnapshot','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','addUser','getMemberID','userId','Delete','delete','length','solved','_userService','listComments','updateComment','setConfig','getCurrentUser','Reply','_httpService','comments','comment','32XAXbwD','type','1314iacnbR','symbol','rangeId','thread-comment-data-source.config','threadId','replyId','users','882736HFFIuK','add','content','parentId','deleteComment','get','UNRECOGNIZED','Solve','pluginName','3tJDjTx','subscribe','getUnit','_config','Edit','_commentService','_initUserSync','unitId','_sessionService','_injector','/universer-api/comment/unit/','post','forEach','YYYY/MM/DD\x20HH:mm'];_0x2a69=function(){return _0x2b26ce;};return _0x2a69();}import{HTTPService as _0x177d81}from'@univerjs/network';const W=_0x142e5a(0x1c4);var I=(_0x14755c=>(_0x14755c[_0x14755c['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x14755c[_0x14755c[_0x142e5a(0x205)]=0x1]='Solved',_0x14755c[_0x14755c[_0x142e5a(0x1e4)]=-0x1]=_0x142e5a(0x1e4),_0x14755c))(I||{}),v=(_0x4c2198=>(_0x4c2198[_0x4c2198[_0x142e5a(0x212)]=0x0]=_0x142e5a(0x212),_0x4c2198[_0x4c2198[_0x142e5a(0x207)]=0x1]=_0x142e5a(0x207),_0x4c2198[_0x4c2198[_0x142e5a(0x1d1)]=0x2]=_0x142e5a(0x1d1),_0x4c2198[_0x4c2198['Edit']=0x3]='Edit',_0x4c2198[_0x4c2198[_0x142e5a(0x1c8)]=0x4]='Delete',_0x4c2198[_0x4c2198[_0x142e5a(0x1e5)]=0x5]=_0x142e5a(0x1e5),_0x4c2198[_0x4c2198[_0x142e5a(0x1e4)]=-0x1]=_0x142e5a(0x1e4),_0x4c2198))(v||{});const D=_0xaabda8=>_0x547211(new Date(+_0xaabda8))[_0x142e5a(0x1b4)](_0x142e5a(0x1f4)),B=async(_0x12cd49,_0x516fee)=>{const _0x4ba0b9=_0x142e5a,_0x576a7b=_0x12cd49[_0x4ba0b9(0x1e3)](_0x4e69f0),_0x4fe986=_0x12cd49[_0x4ba0b9(0x1e3)](_0x177d81);_0x516fee['forEach'](_0xbccfdb=>{const _0x1230a8=_0x4ba0b9;_0x576a7b[_0x1230a8(0x1f7)](_0xbccfdb)&&_0x516fee[_0x1230a8(0x1c9)](_0xbccfdb);}),_0x516fee[_0x4ba0b9(0x1c0)]&&(await _0x4fe986[_0x4ba0b9(0x1e3)]('/universer-api/user/list',{'params':{'userIDs':[..._0x516fee]}}))[_0x4ba0b9(0x1f8)][_0x4ba0b9(0x1dd)][_0x4ba0b9(0x1f3)](_0x385ed2=>{const _0x3a2a71=_0x4ba0b9;_0x385ed2&&_0x576a7b[_0x3a2a71(0x1c5)](_0x385ed2);});};var K=Object[_0x142e5a(0x1b5)],V=(_0xd9639d,_0xc51c7b,_0x5d8e70,_0x1d5194)=>{const _0x24e42c=_0x142e5a;for(var _0x1e3c35=_0x1d5194>0x1?void 0x0:_0x1d5194?K(_0xc51c7b,_0x5d8e70):_0xc51c7b,_0x17320d=_0xd9639d[_0x24e42c(0x1ca)]-0x1,_0x2a2331;_0x17320d>=0x0;_0x17320d--)(_0x2a2331=_0xd9639d[_0x17320d])&&(_0x1e3c35=_0x2a2331(_0x1e3c35)||_0x1e3c35);return _0x1e3c35;},p=(_0xc69db8,_0x10227a)=>(_0x3a64f7,_0x161329)=>_0x10227a(_0x3a64f7,_0x161329,_0xc69db8);let S=class extends _0x151986{constructor(_0x34bd5f,_0x3ee7f3,_0x330f47,_0x497047){const _0x1d578b=_0x142e5a;super(),this[_0x1d578b(0x1ec)]=_0x34bd5f,this[_0x1d578b(0x1b7)]=_0x3ee7f3,this['_userService']=_0x330f47,this[_0x1d578b(0x1f0)]=_0x497047,this[_0x1d578b(0x216)](),this[_0x1d578b(0x1ed)]();}['_initUserSync'](){const _0x59876a=_0x142e5a;this['disposeWithMe'](this[_0x59876a(0x1b7)]['commentUpdate$'][_0x59876a(0x208)](_0x54d44a(0x10))['subscribe'](_0xe561a7=>{const _0x47c1f7=_0x59876a,_0x55b9dc=new Set();_0xe561a7['forEach'](_0x40ad84=>{const _0x26bbdd=_0x1064;switch(_0x40ad84[_0x26bbdd(0x1d6)]){case _0x26bbdd(0x1df):{const _0x4a6beb=_0x40ad84[_0x26bbdd(0x202)][_0x26bbdd(0x214)];_0x55b9dc[_0x26bbdd(0x1df)](_0x4a6beb);break;}}}),B(this[_0x47c1f7(0x1f0)],_0x55b9dc);}));}[_0x142e5a(0x216)](){const _0x5b5e14=_0x142e5a;this[_0x5b5e14(0x1bc)](this[_0x5b5e14(0x1ec)][_0x5b5e14(0x1bd)][_0x5b5e14(0x1e8)](async _0x1cde6c=>{const _0x278f9c=_0x5b5e14;var _0x38b1f6,_0x6662f3,_0x2e12dc,_0x42ccd7;const _0x22f858=(_0x38b1f6=this[_0x278f9c(0x1b7)][_0x278f9c(0x1e9)](_0x1cde6c['unitId'])[_0x278f9c(0x1c1)](_0x5bc2f3=>_0x5bc2f3[_0x278f9c(0x1db)]===_0x1cde6c[_0x278f9c(0x1db)]))==null?void 0x0:_0x38b1f6['root'];if(!_0x22f858)return;const {unitId:_0x5dee63,subUnitId:_0x5a717b}=_0x22f858;switch(_0x1cde6c[_0x278f9c(0x21b)]&&this[_0x278f9c(0x1cc)]['addUser'](_0x1cde6c[_0x278f9c(0x21b)]),_0x1cde6c[_0x278f9c(0x1d6)]){case v['Add']:break;case v[_0x278f9c(0x1d1)]:{this[_0x278f9c(0x1b7)]['addComment'](_0x5dee63,_0x5a717b,{'unitId':_0x5dee63,'subUnitId':_0x5a717b,'ref':'','id':_0x1cde6c['replyId'],'dT':D(+_0x1cde6c['createTimestamp']),'threadId':_0x1cde6c[_0x278f9c(0x1db)],'personId':(_0x2e12dc=(_0x6662f3=_0x1cde6c['user'])==null?void 0x0:_0x6662f3[_0x278f9c(0x1ff)])!=null?_0x2e12dc:_0x1cde6c[_0x278f9c(0x1c7)],'text':JSON[_0x278f9c(0x1b6)](_0x1cde6c[_0x278f9c(0x1e0)]),'parentId':_0x22f858['id']});break;}case v['Delete']:{const _0x51d15a=this[_0x278f9c(0x1b7)][_0x278f9c(0x206)](_0x5dee63,_0x5a717b,_0x1cde6c[_0x278f9c(0x1dc)]);_0x51d15a&&_0x51d15a[_0x278f9c(0x1e1)]&&this[_0x278f9c(0x1b7)][_0x278f9c(0x1e2)](_0x5dee63,_0x5a717b,_0x1cde6c[_0x278f9c(0x1dc)]);break;}case v[_0x278f9c(0x1eb)]:{this[_0x278f9c(0x1b7)][_0x278f9c(0x1ce)](_0x5dee63,_0x5a717b,{'commentId':_0x1cde6c[_0x278f9c(0x1dc)],'text':JSON['parse'](_0x1cde6c['content'])});break;}case v['Solve']:{const _0x131da8=(_0x42ccd7=this[_0x278f9c(0x1b7)][_0x278f9c(0x1e9)](_0x1cde6c[_0x278f9c(0x1ee)])[_0x278f9c(0x1c1)](_0x25dcd6=>_0x25dcd6[_0x278f9c(0x1db)]===_0x1cde6c[_0x278f9c(0x1db)]))==null?void 0x0:_0x42ccd7[_0x278f9c(0x20e)];_0x131da8&&this[_0x278f9c(0x1b7)][_0x278f9c(0x211)](_0x5dee63,_0x5a717b,_0x131da8['id'],_0x1cde6c['solved']===I[_0x278f9c(0x205)]);break;}}}));}};S=V([p(0x0,_0x1e832b(_0x34cb78)),p(0x1,_0x1e832b(_0xef7d91)),p(0x2,_0x1e832b(_0x4e69f0)),p(0x3,_0x1e832b(_0x980829))],S);const z=_0x142e5a(0x1da),M={};var k=Object[_0x142e5a(0x1b5)],Q=(_0x17e0db,_0x463011,_0x20149d,_0x326dc1)=>{for(var _0x4423be=_0x326dc1>0x1?void 0x0:_0x326dc1?k(_0x463011,_0x20149d):_0x463011,_0x4fba6a=_0x17e0db['length']-0x1,_0x563e6c;_0x4fba6a>=0x0;_0x4fba6a--)(_0x563e6c=_0x17e0db[_0x4fba6a])&&(_0x4423be=_0x563e6c(_0x4423be)||_0x4423be);return _0x4423be;},_=(_0x28919e,_0x204370)=>(_0x596383,_0x1c9806)=>_0x204370(_0x596383,_0x1c9806,_0x28919e);function X(_0x185554,_0x2eb468){const _0x57d6c8=_0x142e5a,_0x6ac707=_0x185554['replies'][0x0];return{..._0x2eb468,'id':_0x6ac707[_0x57d6c8(0x1dc)],'resolved':_0x185554[_0x57d6c8(0x1cb)]===0x1,'dT':D(_0x6ac707[_0x57d6c8(0x1b8)]),'personId':_0x6ac707[_0x57d6c8(0x1c7)],'threadId':_0x6ac707[_0x57d6c8(0x1db)]};}function ee(_0x534dc0,_0xd16d73,_0x10a196){const _0x219210=_0x142e5a;var _0x1a920e,_0x3eee57;if(((_0x3eee57=(_0x1a920e=_0x534dc0==null?void 0x0:_0x534dc0['replies'])==null?void 0x0:_0x1a920e['length'])!=null?_0x3eee57:0x0)>0x0){const _0x1a7f56=(_0x58e1d9,_0x443b2c)=>({'id':_0x58e1d9[_0x219210(0x1dc)],'threadId':_0x58e1d9[_0x219210(0x1db)],'dT':D(_0x58e1d9[_0x219210(0x1b8)]),'personId':_0x58e1d9[_0x219210(0x1c7)],'resolved':_0x534dc0['solved']===I[_0x219210(0x205)],'unitId':_0xd16d73,'subUnitId':_0x10a196,'text':JSON[_0x219210(0x1b6)](_0x58e1d9['content']),'parentId':_0x443b2c}),_0x19a485=_0x1a7f56(_0x534dc0[_0x219210(0x1fd)][0x0]);return{..._0x19a485,'children':_0x534dc0['replies']['slice'](0x1)[_0x219210(0x21e)](_0x49300c=>_0x1a7f56(_0x49300c,_0x19a485['id']))};}return null;}let f=class{constructor(_0x4c7624,_0x39159a,_0x55907f,_0x476a84){const _0x27a9c2=_0x142e5a;this[_0x27a9c2(0x1d2)]=_0x4c7624,this[_0x27a9c2(0x1cc)]=_0x39159a,this['_sessionService']=_0x55907f,this[_0x27a9c2(0x1f0)]=_0x476a84;}async['addComment'](_0x31a310){const _0x2f0f29=_0x142e5a;var _0x403e0a,_0x12b136;const {parentId:_0x958274,unitId:_0x197c37,text:_0x270f51,threadId:_0x1a9d00}=_0x31a310,_0x3b26ed=(_0x12b136=(_0x403e0a=_0x270f51[_0x2f0f29(0x217)])==null?void 0x0:_0x403e0a[_0x2f0f29(0x1f6)](_0x4973f6=>_0x4973f6[_0x2f0f29(0x213)]===_0x3a1ffb[_0x2f0f29(0x1fb)])[_0x2f0f29(0x21e)](_0x129377=>_0x129377[_0x2f0f29(0x1d9)]))!=null?_0x12b136:[],_0x1b7874=JSON['stringify'](_0x270f51),_0x51bdd8=(await this[_0x2f0f29(0x1ef)][_0x2f0f29(0x21c)](_0x197c37))['getMemberID']();if(_0x958274){const _0x4fb131={'memberId':_0x51bdd8,'unitId':_0x197c37,'content':_0x1b7874,'mention':_0x3b26ed,'threadId':_0x1a9d00},_0x3d7fd0=(await this[_0x2f0f29(0x1d2)][_0x2f0f29(0x1f2)](_0x2f0f29(0x1f1)+_0x197c37+_0x2f0f29(0x215),{'body':_0x4fb131}))['body'][_0x2f0f29(0x219)];return{..._0x31a310,'id':_0x3d7fd0['replyId'],'dT':_0x547211(+_0x3d7fd0[_0x2f0f29(0x1b8)])[_0x2f0f29(0x1b4)](_0x2f0f29(0x1f4)),'personId':_0x3d7fd0[_0x2f0f29(0x1c7)]};}else{const _0x2767e7={'memberId':_0x51bdd8,'unitId':_0x197c37,'content':_0x1b7874,'mention':_0x3b26ed},_0x585b74=await this[_0x2f0f29(0x1d2)][_0x2f0f29(0x1f2)]('/universer-api/comment/unit/'+_0x197c37+_0x2f0f29(0x20d),{'body':_0x2767e7});return X(_0x585b74[_0x2f0f29(0x1f8)][_0x2f0f29(0x1d4)],_0x31a310);}}async[_0x142e5a(0x1ce)](_0x556e84){const _0x5c9682=_0x142e5a;var _0x2d24dd,_0x1f5a92;const {text:_0x52e779,unitId:_0x120c76}=_0x556e84,_0xeb2926=(_0x1f5a92=(_0x2d24dd=_0x52e779[_0x5c9682(0x217)])==null?void 0x0:_0x2d24dd[_0x5c9682(0x1f6)](_0x39ad03=>_0x39ad03[_0x5c9682(0x213)]===_0x3a1ffb['COMMENT'])['map'](_0x36f164=>_0x36f164['rangeId']))!=null?_0x1f5a92:[],_0x4a59e6=JSON[_0x5c9682(0x20f)](_0x52e779),_0x4b9534=_0x556e84[_0x5c9682(0x1db)],_0x34eb0b=_0x556e84['id'],_0x1e4a48={'memberId':(await this[_0x5c9682(0x1ef)][_0x5c9682(0x21c)](_0x120c76))[_0x5c9682(0x1c6)](),'unitId':_0x120c76,'threadId':_0x4b9534,'mention':_0xeb2926,'content':_0x4a59e6,'replyId':_0x34eb0b},_0x2dcb15=await this['_httpService'][_0x5c9682(0x1f2)](_0x5c9682(0x1f1)+_0x120c76+_0x5c9682(0x1bf),{'body':_0x1e4a48});return!_0x2dcb15['body'][_0x5c9682(0x1ba)]||_0x2dcb15[_0x5c9682(0x1f8)][_0x5c9682(0x1ba)][_0x5c9682(0x218)]===0x1;}async[_0x142e5a(0x211)](_0x1eac9e){const _0x41334d=_0x142e5a,{unitId:_0x7efe33}=_0x1eac9e,_0x4fd10e=_0x1eac9e[_0x41334d(0x1db)],_0x256002={'memberId':this[_0x41334d(0x1cc)][_0x41334d(0x1d0)]()[_0x41334d(0x1ff)],'unitId':_0x7efe33,'threadId':_0x4fd10e,'solved':_0x1eac9e['resolved']?I[_0x41334d(0x205)]:I[_0x41334d(0x20b)]},_0x5163d8=await this[_0x41334d(0x1d2)]['post']('/universer-api/comment/unit/'+_0x7efe33+_0x41334d(0x200),{'body':_0x256002});return!_0x5163d8[_0x41334d(0x1f8)][_0x41334d(0x1ba)]||_0x5163d8[_0x41334d(0x1f8)][_0x41334d(0x1ba)][_0x41334d(0x218)]===0x1;}async[_0x142e5a(0x1e2)](_0x4c1dfe,_0x4873c2,_0x29d9a5,_0x40f5b7){const _0x67988=_0x142e5a,_0x1db1b3={'memberId':(await this['_sessionService'][_0x67988(0x21c)](_0x4c1dfe))[_0x67988(0x1c6)](),'threadId':_0x29d9a5,'replyId':_0x40f5b7,'unitId':_0x4c1dfe},_0x4aae5d=await this[_0x67988(0x1d2)]['post'](_0x67988(0x1f1)+_0x4c1dfe+_0x67988(0x20a),{'body':_0x1db1b3});return!_0x4aae5d['body'][_0x67988(0x1ba)]||_0x4aae5d[_0x67988(0x1f8)]['error'][_0x67988(0x218)]===0x1;}async[_0x142e5a(0x1cd)](_0xd6a374,_0x470b89,_0x3660fd){const _0xd99151=_0x142e5a,_0x9ebdba={'unitId':_0xd6a374,'threadId':_0x3660fd},_0xb4375c=await this[_0xd99151(0x1d2)][_0xd99151(0x1f2)]('/universer-api/comment/unit/'+_0xd6a374+'/list',{'body':_0x9ebdba}),_0x11447c=_0x3660fd[_0xd99151(0x21e)](_0x5ad7f1=>ee(_0xb4375c['body'][_0xd99151(0x1d3)][_0x5ad7f1],_0xd6a374,_0x470b89))[_0xd99151(0x1f6)](Boolean);return Object[_0xd99151(0x20c)](_0xb4375c[_0xd99151(0x1f8)][_0xd99151(0x1dd)])[_0xd99151(0x1f3)](_0x14a34d=>{const _0x1105db=_0xd99151;this[_0x1105db(0x1cc)][_0x1105db(0x1c5)](_0x14a34d);}),_0x11447c;}[_0x142e5a(0x1c3)](_0x465a1d){const _0x1d5549=_0x142e5a;return{'id':_0x465a1d['id'],'threadId':_0x465a1d[_0x1d5549(0x1db)],'ref':_0x465a1d['ref']};}};f=Q([_(0x0,_0x1e832b(_0x177d81)),_(0x1,_0x1e832b(_0x4e69f0)),_(0x2,_0x1e832b(_0x3eadcd)),_(0x3,_0x1e832b(_0x980829))],f);var re=Object[_0x142e5a(0x1b5)],te=(_0x2f4364,_0x31d2f,_0x5c24e2,_0x2b68a3)=>{const _0x37ad1b=_0x142e5a;for(var _0x5d213a=_0x2b68a3>0x1?void 0x0:_0x2b68a3?re(_0x31d2f,_0x5c24e2):_0x31d2f,_0x2b8231=_0x2f4364[_0x37ad1b(0x1ca)]-0x1,_0x32b2f3;_0x2b8231>=0x0;_0x2b8231--)(_0x32b2f3=_0x2f4364[_0x2b8231])&&(_0x5d213a=_0x32b2f3(_0x5d213a)||_0x5d213a);return _0x5d213a;},N=(_0x2a3bf2,_0xf5bdde)=>(_0x53238f,_0x47e99e)=>_0xf5bdde(_0x53238f,_0x47e99e,_0x2a3bf2);let g=class extends _0x151986{constructor(_0x2f8896,_0x39b937){const _0x3b420c=_0x142e5a;super(),this[_0x3b420c(0x209)]=_0x2f8896,this[_0x3b420c(0x1b9)]=_0x39b937,this[_0x3b420c(0x203)]();}['_initDataSource'](){const _0x1a8097=_0x142e5a;this[_0x1a8097(0x209)][_0x1a8097(0x201)]=this['_threadCommentDataSource'],this[_0x1a8097(0x209)][_0x1a8097(0x1fc)]=!0x1;}};g=te([N(0x0,_0x40a1e3),N(0x1,_0x1e832b(f))],g);var se=Object[_0x142e5a(0x1f9)],oe=Object[_0x142e5a(0x1b5)],ne=(_0x4c139a,_0x2c9dee,_0xb2413b)=>_0x2c9dee in _0x4c139a?se(_0x4c139a,_0x2c9dee,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xb2413b}):_0x4c139a[_0x2c9dee]=_0xb2413b,ie=(_0x5491a0,_0x542e4d,_0x2fdd3a,_0x33240e)=>{const _0x1b44fb=_0x142e5a;for(var _0x3ea2ff=_0x33240e>0x1?void 0x0:_0x33240e?oe(_0x542e4d,_0x2fdd3a):_0x542e4d,_0x59d53e=_0x5491a0[_0x1b44fb(0x1ca)]-0x1,_0x57cdf4;_0x59d53e>=0x0;_0x59d53e--)(_0x57cdf4=_0x5491a0[_0x59d53e])&&(_0x3ea2ff=_0x57cdf4(_0x3ea2ff)||_0x3ea2ff);return _0x3ea2ff;},w=(_0x2937cb,_0x91a7ba)=>(_0x3cff63,_0x2eb371)=>_0x91a7ba(_0x3cff63,_0x2eb371,_0x2937cb),$=(_0x319e84,_0x53def7,_0x52e190)=>ne(_0x319e84,typeof _0x53def7!=_0x142e5a(0x1d8)?_0x53def7+'':_0x53def7,_0x52e190);let b=class extends _0x147f91{constructor(_0x19686e=M,_0x5ad295,_0x38c581){const _0x2866c9=_0x142e5a;super(),this[_0x2866c9(0x1ea)]=_0x19686e,this['_injector']=_0x5ad295,this['_configService']=_0x38c581;const {..._0x4aa37f}=_0x35d0e6({},M,this['_config']);this[_0x2866c9(0x1f5)][_0x2866c9(0x1cf)](z,_0x4aa37f);}[_0x142e5a(0x1c2)](){const _0x171f83=_0x142e5a;[[f],[g],[S]][_0x171f83(0x1f3)](_0xc3ec34=>{const _0x14d564=_0x171f83;this['_injector'][_0x14d564(0x1df)](_0xc3ec34);});}[_0x142e5a(0x204)](){const _0x41862e=_0x142e5a;this[_0x41862e(0x1f0)][_0x41862e(0x1e3)](g),this[_0x41862e(0x1f0)]['get'](S);}};$(b,_0x142e5a(0x1e6),W),$(b,_0x142e5a(0x1d6),_0x2cb630['UNIVER_UNKNOWN']),b=ie([_0xdc1d9e(_0x6ce37e,_0x2e3deb,_0x30e77a),w(0x1,_0x1e832b(_0x980829)),w(0x2,_0x265aa0)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x522987=_0x2161;(function(_0x2688fa,_0xd5e57){const _0x5507ad=_0x2161,_0x3ef85a=_0x2688fa();while(!![]){try{const _0x3533e0=-parseInt(_0x5507ad(0xea))/0x1*(-parseInt(_0x5507ad(0xad))/0x2)+-parseInt(_0x5507ad(0xf5))/0x3*(-parseInt(_0x5507ad(0xe1))/0x4)+parseInt(_0x5507ad(0xc0))/0x5*(parseInt(_0x5507ad(0xd6))/0x6)+-parseInt(_0x5507ad(0xf0))/0x7*(parseInt(_0x5507ad(0xf7))/0x8)+-parseInt(_0x5507ad(0xcc))/0x9+parseInt(_0x5507ad(0x96))/0xa+parseInt(_0x5507ad(0xe5))/0xb*(-parseInt(_0x5507ad(0xf8))/0xc);if(_0x3533e0===_0xd5e57)break;else _0x3ef85a['push'](_0x3ef85a['shift']());}catch(_0x4df065){_0x3ef85a['push'](_0x3ef85a['shift']());}}}(_0xe681,0x87140));function _0xe681(){const _0x3f8605=['_threadCommentModel','8DsQxNy','708BVUdEv','body','userID','user','content','_commentService','9559250OznUgH','getCurrentUser','/reply','/universer-api/comment/unit/','onReady','/add','UNIVER_UNKNOWN','payload','defineProperty','getUser','solved','slice','Solved','customRanges','rangeId','Delete','addComment','getUnit','ref','syncUpdateMutationToColla','comment','_config','root','30yHOuxf','add','deleteComment','filter','error','format','users','Add','pluginName','type','_sessionService','map','getMemberID','_initUserSync','parse','reply','resolved','requireSession','forEach','15HqkjhB','_httpService','subscribe','/edit','threadId','stringify','_initDataSource','onStarting','disposeWithMe','resolveComment','replyId','replies','9758340uOseKs','_configService','commentUpdate$','COMMENT','Solve','setConfig','addUser','get','Reply','_threadCommentDataSourceService','1399242QThYwk','Edit','listComments','length','comments','size','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getOwnPropertyDescriptor','/solved','_init','userId','2564416QIpoDa','unitId','values','rangeType','236687nHybkl','Unknown','_injector','post','UNRECOGNIZED','43969UoSnSH','_userService','YYYY/MM/DD\x20HH:mm','pipe','code','_threadCommentDataSource','343994VxSaIR','find','OpenOrReOpen','saveCommentToSnapshot','createTimestamp','3ZqJLFe'];_0xe681=function(){return _0x3f8605;};return _0xe681();}import{CommentService as _0x2428f5,CollaborationSessionService as _0x2f8845,UniverCollaborationClientPlugin as _0x10b110}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4c9a4e}from'@univerjs-pro/license';import{dayjs as _0x378f51,UserManagerService as _0x5a10c3,Inject as _0x2518d0,Injector as _0x5d3cee,Disposable as _0x6e4d38,CustomRangeType as _0x204202,UniverInstanceType as _0x5b882a,DependentOn as _0x4e1bfd,IConfigService as _0x51787d,Plugin as _0x2c9034,merge as _0x410a83}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x17dac6}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x59aa45,IThreadCommentDataSourceService as _0x3e559c}from'@univerjs/thread-comment';import{bufferTime as _0x50f19c}from'rxjs';import{HTTPService as _0xd30796}from'@univerjs/network';const W=_0x522987(0xdc);var I=(_0x2da422=>(_0x2da422[_0x2da422[_0x522987(0xf2)]=0x0]='OpenOrReOpen',_0x2da422[_0x2da422['Solved']=0x1]=_0x522987(0xa2),_0x2da422[_0x2da422[_0x522987(0xe9)]=-0x1]='UNRECOGNIZED',_0x2da422))(I||{}),v=(_0x5dc181=>(_0x5dc181[_0x5dc181['Unknown']=0x0]=_0x522987(0xe6),_0x5dc181[_0x5dc181[_0x522987(0xb4)]=0x1]=_0x522987(0xb4),_0x5dc181[_0x5dc181[_0x522987(0xd4)]=0x2]=_0x522987(0xd4),_0x5dc181[_0x5dc181[_0x522987(0xd7)]=0x3]=_0x522987(0xd7),_0x5dc181[_0x5dc181[_0x522987(0xa5)]=0x4]=_0x522987(0xa5),_0x5dc181[_0x5dc181[_0x522987(0xd0)]=0x5]=_0x522987(0xd0),_0x5dc181[_0x5dc181[_0x522987(0xe9)]=-0x1]='UNRECOGNIZED',_0x5dc181))(v||{});const D=_0x376f06=>_0x378f51(new Date(+_0x376f06))[_0x522987(0xb2)](_0x522987(0xec)),B=async(_0x1a2b62,_0x45ca7d)=>{const _0x3f9cbf=_0x522987,_0x1a8a54=_0x1a2b62[_0x3f9cbf(0xd3)](_0x5a10c3),_0x395f67=_0x1a2b62[_0x3f9cbf(0xd3)](_0xd30796);_0x45ca7d[_0x3f9cbf(0xbf)](_0x30136f=>{const _0x349cb2=_0x3f9cbf;_0x1a8a54[_0x349cb2(0x9f)](_0x30136f)&&_0x45ca7d['delete'](_0x30136f);}),_0x45ca7d[_0x3f9cbf(0xdb)]&&(await _0x395f67[_0x3f9cbf(0xd3)]('/universer-api/user/list',{'params':{'userIDs':[..._0x45ca7d]}}))[_0x3f9cbf(0xf9)][_0x3f9cbf(0xb3)]['forEach'](_0x3e8f72=>{const _0x2143a8=_0x3f9cbf;_0x3e8f72&&_0x1a8a54[_0x2143a8(0xd2)](_0x3e8f72);});};var K=Object[_0x522987(0xdd)],V=(_0x339ecc,_0x2d3d68,_0x4f8c64,_0x431291)=>{const _0x21e6f1=_0x522987;for(var _0x166369=_0x431291>0x1?void 0x0:_0x431291?K(_0x2d3d68,_0x4f8c64):_0x2d3d68,_0x1f8fae=_0x339ecc[_0x21e6f1(0xd9)]-0x1,_0x79512f;_0x1f8fae>=0x0;_0x1f8fae--)(_0x79512f=_0x339ecc[_0x1f8fae])&&(_0x166369=_0x79512f(_0x166369)||_0x166369);return _0x166369;},p=(_0x325c2d,_0x5e37b7)=>(_0x231b08,_0x27e5c3)=>_0x5e37b7(_0x231b08,_0x27e5c3,_0x325c2d);let S=class extends _0x6e4d38{constructor(_0x58f80a,_0x4d8abe,_0x17f978,_0x244822){const _0x5063d4=_0x522987;super(),this[_0x5063d4(0xfd)]=_0x58f80a,this['_threadCommentModel']=_0x4d8abe,this[_0x5063d4(0xeb)]=_0x17f978,this['_injector']=_0x244822,this['_init'](),this[_0x5063d4(0xba)]();}['_initUserSync'](){const _0xcbf5bd=_0x522987;this[_0xcbf5bd(0xc8)](this[_0xcbf5bd(0xf6)][_0xcbf5bd(0xce)][_0xcbf5bd(0xed)](_0x50f19c(0x10))[_0xcbf5bd(0xc2)](_0xa2d909=>{const _0x22d522=_0xcbf5bd,_0x3997cf=new Set();_0xa2d909[_0x22d522(0xbf)](_0x296b23=>{const _0x5f1fea=_0x22d522;switch(_0x296b23[_0x5f1fea(0xb6)]){case _0x5f1fea(0xae):{const _0x27cf85=_0x296b23[_0x5f1fea(0x9d)]['personId'];_0x3997cf[_0x5f1fea(0xae)](_0x27cf85);break;}}}),B(this[_0x22d522(0xe7)],_0x3997cf);}));}[_0x522987(0xdf)](){const _0x4a9d0c=_0x522987;this['disposeWithMe'](this[_0x4a9d0c(0xfd)]['commentUpdate$'][_0x4a9d0c(0xc2)](async _0x5995e1=>{const _0x1a30b2=_0x4a9d0c;var _0x27d087,_0x1afbd9,_0x4b2e9f,_0x47d3c6;const _0x4d0ddb=(_0x27d087=this[_0x1a30b2(0xf6)][_0x1a30b2(0xa7)](_0x5995e1[_0x1a30b2(0xe2)])['find'](_0x31a8e7=>_0x31a8e7['threadId']===_0x5995e1[_0x1a30b2(0xc4)]))==null?void 0x0:_0x27d087[_0x1a30b2(0xac)];if(!_0x4d0ddb)return;const {unitId:_0x32121f,subUnitId:_0x4ca891}=_0x4d0ddb;switch(_0x5995e1[_0x1a30b2(0xfb)]&&this[_0x1a30b2(0xeb)]['addUser'](_0x5995e1['user']),_0x5995e1[_0x1a30b2(0xb6)]){case v[_0x1a30b2(0xb4)]:break;case v[_0x1a30b2(0xd4)]:{this[_0x1a30b2(0xf6)]['addComment'](_0x32121f,_0x4ca891,{'unitId':_0x32121f,'subUnitId':_0x4ca891,'ref':'','id':_0x5995e1['replyId'],'dT':D(+_0x5995e1['createTimestamp']),'threadId':_0x5995e1[_0x1a30b2(0xc4)],'personId':(_0x4b2e9f=(_0x1afbd9=_0x5995e1[_0x1a30b2(0xfb)])==null?void 0x0:_0x1afbd9[_0x1a30b2(0xfa)])!=null?_0x4b2e9f:_0x5995e1['userId'],'text':JSON['parse'](_0x5995e1[_0x1a30b2(0xfc)]),'parentId':_0x4d0ddb['id']});break;}case v[_0x1a30b2(0xa5)]:{const _0x1e22b7=this[_0x1a30b2(0xf6)]['getComment'](_0x32121f,_0x4ca891,_0x5995e1[_0x1a30b2(0xca)]);_0x1e22b7&&_0x1e22b7['parentId']&&this['_threadCommentModel'][_0x1a30b2(0xaf)](_0x32121f,_0x4ca891,_0x5995e1[_0x1a30b2(0xca)]);break;}case v['Edit']:{this['_threadCommentModel']['updateComment'](_0x32121f,_0x4ca891,{'commentId':_0x5995e1['replyId'],'text':JSON[_0x1a30b2(0xbb)](_0x5995e1['content'])});break;}case v[_0x1a30b2(0xd0)]:{const _0x563b8c=(_0x47d3c6=this[_0x1a30b2(0xf6)]['getUnit'](_0x5995e1['unitId'])[_0x1a30b2(0xf1)](_0x55a2f8=>_0x55a2f8[_0x1a30b2(0xc4)]===_0x5995e1[_0x1a30b2(0xc4)]))==null?void 0x0:_0x47d3c6[_0x1a30b2(0xac)];_0x563b8c&&this[_0x1a30b2(0xf6)]['resolveComment'](_0x32121f,_0x4ca891,_0x563b8c['id'],_0x5995e1[_0x1a30b2(0xa0)]===I[_0x1a30b2(0xa2)]);break;}}}));}};S=V([p(0x0,_0x2518d0(_0x2428f5)),p(0x1,_0x2518d0(_0x59aa45)),p(0x2,_0x2518d0(_0x5a10c3)),p(0x3,_0x2518d0(_0x5d3cee))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x522987(0xdd)],Q=(_0xc7cf80,_0x2dc0c2,_0x43ef35,_0x3b5749)=>{const _0x3bd44d=_0x522987;for(var _0x5474ee=_0x3b5749>0x1?void 0x0:_0x3b5749?k(_0x2dc0c2,_0x43ef35):_0x2dc0c2,_0x19436d=_0xc7cf80[_0x3bd44d(0xd9)]-0x1,_0x385204;_0x19436d>=0x0;_0x19436d--)(_0x385204=_0xc7cf80[_0x19436d])&&(_0x5474ee=_0x385204(_0x5474ee)||_0x5474ee);return _0x5474ee;},_=(_0x3816e2,_0x25acd3)=>(_0x2cde7d,_0x175371)=>_0x25acd3(_0x2cde7d,_0x175371,_0x3816e2);function X(_0x468bcc,_0x1be89e){const _0x1b2ef8=_0x522987,_0x3074e1=_0x468bcc['replies'][0x0];return{..._0x1be89e,'id':_0x3074e1[_0x1b2ef8(0xca)],'resolved':_0x468bcc[_0x1b2ef8(0xa0)]===0x1,'dT':D(_0x3074e1[_0x1b2ef8(0xf4)]),'personId':_0x3074e1[_0x1b2ef8(0xe0)],'threadId':_0x3074e1[_0x1b2ef8(0xc4)]};}function ee(_0x42db8c,_0x32055f,_0x2e313d){const _0x47e4e8=_0x522987;var _0x5f719,_0x340b68;if(((_0x340b68=(_0x5f719=_0x42db8c==null?void 0x0:_0x42db8c['replies'])==null?void 0x0:_0x5f719['length'])!=null?_0x340b68:0x0)>0x0){const _0x43c09e=(_0x361da2,_0x16f9be)=>({'id':_0x361da2[_0x47e4e8(0xca)],'threadId':_0x361da2['threadId'],'dT':D(_0x361da2['createTimestamp']),'personId':_0x361da2['userId'],'resolved':_0x42db8c[_0x47e4e8(0xa0)]===I['Solved'],'unitId':_0x32055f,'subUnitId':_0x2e313d,'text':JSON[_0x47e4e8(0xbb)](_0x361da2[_0x47e4e8(0xfc)]),'parentId':_0x16f9be}),_0x584e96=_0x43c09e(_0x42db8c[_0x47e4e8(0xcb)][0x0]);return{..._0x584e96,'children':_0x42db8c['replies'][_0x47e4e8(0xa1)](0x1)[_0x47e4e8(0xb8)](_0x2617dd=>_0x43c09e(_0x2617dd,_0x584e96['id']))};}return null;}let f=class{constructor(_0x3b0e2c,_0x2510cb,_0xa4a287,_0xcec989){const _0x5957c6=_0x522987;this[_0x5957c6(0xc1)]=_0x3b0e2c,this[_0x5957c6(0xeb)]=_0x2510cb,this[_0x5957c6(0xb7)]=_0xa4a287,this['_injector']=_0xcec989;}async[_0x522987(0xa6)](_0x3e76b1){const _0x432314=_0x522987;var _0x1d0f8e,_0x2f5089;const {parentId:_0x5226e8,unitId:_0xbd3ae5,text:_0x30f583,threadId:_0x5ebefa}=_0x3e76b1,_0x512b79=(_0x2f5089=(_0x1d0f8e=_0x30f583[_0x432314(0xa3)])==null?void 0x0:_0x1d0f8e[_0x432314(0xb0)](_0x287682=>_0x287682[_0x432314(0xe4)]===_0x204202[_0x432314(0xcf)])[_0x432314(0xb8)](_0x415593=>_0x415593[_0x432314(0xa4)]))!=null?_0x2f5089:[],_0x3decfa=JSON['stringify'](_0x30f583),_0x2f97c2=(await this[_0x432314(0xb7)][_0x432314(0xbe)](_0xbd3ae5))[_0x432314(0xb9)]();if(_0x5226e8){const _0x14c681={'memberId':_0x2f97c2,'unitId':_0xbd3ae5,'content':_0x3decfa,'mention':_0x512b79,'threadId':_0x5ebefa},_0x1a2472=(await this[_0x432314(0xc1)]['post'](_0x432314(0x99)+_0xbd3ae5+_0x432314(0x98),{'body':_0x14c681}))[_0x432314(0xf9)][_0x432314(0xbc)];return{..._0x3e76b1,'id':_0x1a2472[_0x432314(0xca)],'dT':_0x378f51(+_0x1a2472[_0x432314(0xf4)])[_0x432314(0xb2)](_0x432314(0xec)),'personId':_0x1a2472['userId']};}else{const _0x3ec21d={'memberId':_0x2f97c2,'unitId':_0xbd3ae5,'content':_0x3decfa,'mention':_0x512b79},_0x3a311b=await this[_0x432314(0xc1)][_0x432314(0xe8)](_0x432314(0x99)+_0xbd3ae5+_0x432314(0x9b),{'body':_0x3ec21d});return X(_0x3a311b[_0x432314(0xf9)][_0x432314(0xaa)],_0x3e76b1);}}async['updateComment'](_0x3bae78){const _0x579241=_0x522987;var _0x4a77a5,_0x282a83;const {text:_0x4b05bc,unitId:_0x1a3bdf}=_0x3bae78,_0x27896c=(_0x282a83=(_0x4a77a5=_0x4b05bc[_0x579241(0xa3)])==null?void 0x0:_0x4a77a5['filter'](_0x411985=>_0x411985[_0x579241(0xe4)]===_0x204202[_0x579241(0xcf)])[_0x579241(0xb8)](_0x3fd34d=>_0x3fd34d[_0x579241(0xa4)]))!=null?_0x282a83:[],_0x5aa046=JSON[_0x579241(0xc5)](_0x4b05bc),_0x27368c=_0x3bae78[_0x579241(0xc4)],_0xdc28ec=_0x3bae78['id'],_0xf492bc={'memberId':(await this[_0x579241(0xb7)][_0x579241(0xbe)](_0x1a3bdf))[_0x579241(0xb9)](),'unitId':_0x1a3bdf,'threadId':_0x27368c,'mention':_0x27896c,'content':_0x5aa046,'replyId':_0xdc28ec},_0x501f07=await this[_0x579241(0xc1)]['post'](_0x579241(0x99)+_0x1a3bdf+_0x579241(0xc3),{'body':_0xf492bc});return!_0x501f07[_0x579241(0xf9)]['error']||_0x501f07['body'][_0x579241(0xb1)][_0x579241(0xee)]===0x1;}async[_0x522987(0xc9)](_0x2a7f13){const _0x278190=_0x522987,{unitId:_0x3c18f8}=_0x2a7f13,_0x56ede8=_0x2a7f13['threadId'],_0x2fa7a2={'memberId':this[_0x278190(0xeb)][_0x278190(0x97)]()[_0x278190(0xfa)],'unitId':_0x3c18f8,'threadId':_0x56ede8,'solved':_0x2a7f13[_0x278190(0xbd)]?I['Solved']:I[_0x278190(0xf2)]},_0x472706=await this[_0x278190(0xc1)][_0x278190(0xe8)](_0x278190(0x99)+_0x3c18f8+_0x278190(0xde),{'body':_0x2fa7a2});return!_0x472706[_0x278190(0xf9)][_0x278190(0xb1)]||_0x472706[_0x278190(0xf9)]['error'][_0x278190(0xee)]===0x1;}async[_0x522987(0xaf)](_0x5a3c3b,_0x4afe57,_0x2df827,_0x31cda6){const _0x1b9bed=_0x522987,_0x58a29a={'memberId':(await this[_0x1b9bed(0xb7)][_0x1b9bed(0xbe)](_0x5a3c3b))[_0x1b9bed(0xb9)](),'threadId':_0x2df827,'replyId':_0x31cda6,'unitId':_0x5a3c3b},_0x37fbd0=await this[_0x1b9bed(0xc1)][_0x1b9bed(0xe8)]('/universer-api/comment/unit/'+_0x5a3c3b+'/delete',{'body':_0x58a29a});return!_0x37fbd0[_0x1b9bed(0xf9)][_0x1b9bed(0xb1)]||_0x37fbd0[_0x1b9bed(0xf9)]['error']['code']===0x1;}async[_0x522987(0xd8)](_0x14f650,_0x4cc032,_0x28bf4a){const _0x3caefd=_0x522987,_0xa0d393={'unitId':_0x14f650,'threadId':_0x28bf4a},_0x3d0294=await this[_0x3caefd(0xc1)]['post'](_0x3caefd(0x99)+_0x14f650+'/list',{'body':_0xa0d393}),_0x4aebbe=_0x28bf4a[_0x3caefd(0xb8)](_0xa0e440=>ee(_0x3d0294['body'][_0x3caefd(0xda)][_0xa0e440],_0x14f650,_0x4cc032))[_0x3caefd(0xb0)](Boolean);return Object[_0x3caefd(0xe3)](_0x3d0294[_0x3caefd(0xf9)][_0x3caefd(0xb3)])[_0x3caefd(0xbf)](_0x56652f=>{const _0x3868f5=_0x3caefd;this['_userService'][_0x3868f5(0xd2)](_0x56652f);}),_0x4aebbe;}[_0x522987(0xf3)](_0x87a8b8){const _0x5b106c=_0x522987;return{'id':_0x87a8b8['id'],'threadId':_0x87a8b8[_0x5b106c(0xc4)],'ref':_0x87a8b8[_0x5b106c(0xa8)]};}};f=Q([_(0x0,_0x2518d0(_0xd30796)),_(0x1,_0x2518d0(_0x5a10c3)),_(0x2,_0x2518d0(_0x2f8845)),_(0x3,_0x2518d0(_0x5d3cee))],f);var re=Object[_0x522987(0xdd)],te=(_0x3f6d6f,_0x3ef338,_0x1f913d,_0x1fa1cf)=>{const _0x11a954=_0x522987;for(var _0x248338=_0x1fa1cf>0x1?void 0x0:_0x1fa1cf?re(_0x3ef338,_0x1f913d):_0x3ef338,_0x1f69d3=_0x3f6d6f[_0x11a954(0xd9)]-0x1,_0x49c5dc;_0x1f69d3>=0x0;_0x1f69d3--)(_0x49c5dc=_0x3f6d6f[_0x1f69d3])&&(_0x248338=_0x49c5dc(_0x248338)||_0x248338);return _0x248338;},N=(_0x32c5e9,_0x3265b0)=>(_0x1414f2,_0x44e43c)=>_0x3265b0(_0x1414f2,_0x44e43c,_0x32c5e9);let g=class extends _0x6e4d38{constructor(_0x3bd67a,_0x46c6db){const _0x713701=_0x522987;super(),this[_0x713701(0xd5)]=_0x3bd67a,this[_0x713701(0xef)]=_0x46c6db,this[_0x713701(0xc6)]();}['_initDataSource'](){const _0x2c1189=_0x522987;this[_0x2c1189(0xd5)]['dataSource']=this[_0x2c1189(0xef)],this[_0x2c1189(0xd5)][_0x2c1189(0xa9)]=!0x1;}};function _0x2161(_0x41c1b7,_0x2832b2){const _0xe6816e=_0xe681();return _0x2161=function(_0x21614d,_0x14d3c2){_0x21614d=_0x21614d-0x96;let _0x579043=_0xe6816e[_0x21614d];return _0x579043;},_0x2161(_0x41c1b7,_0x2832b2);}g=te([N(0x0,_0x3e559c),N(0x1,_0x2518d0(f))],g);var se=Object[_0x522987(0x9e)],oe=Object[_0x522987(0xdd)],ne=(_0x46b57e,_0x5f54c1,_0x513596)=>_0x5f54c1 in _0x46b57e?se(_0x46b57e,_0x5f54c1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x513596}):_0x46b57e[_0x5f54c1]=_0x513596,ie=(_0x2b1da5,_0x3906a7,_0x55dfc3,_0x57c459)=>{const _0x36354a=_0x522987;for(var _0x1deec0=_0x57c459>0x1?void 0x0:_0x57c459?oe(_0x3906a7,_0x55dfc3):_0x3906a7,_0x24b9da=_0x2b1da5[_0x36354a(0xd9)]-0x1,_0x248c04;_0x24b9da>=0x0;_0x24b9da--)(_0x248c04=_0x2b1da5[_0x24b9da])&&(_0x1deec0=_0x248c04(_0x1deec0)||_0x1deec0);return _0x1deec0;},w=(_0x3d63ce,_0x302982)=>(_0x5bf970,_0x2fc8b5)=>_0x302982(_0x5bf970,_0x2fc8b5,_0x3d63ce),$=(_0x2f1e41,_0x59a26b,_0x20bce3)=>ne(_0x2f1e41,typeof _0x59a26b!='symbol'?_0x59a26b+'':_0x59a26b,_0x20bce3);let b=class extends _0x2c9034{constructor(_0x120d09=M,_0x37434c,_0x1e543b){const _0x34b58d=_0x522987;super(),this[_0x34b58d(0xab)]=_0x120d09,this['_injector']=_0x37434c,this[_0x34b58d(0xcd)]=_0x1e543b;const {..._0xba917c}=_0x410a83({},M,this['_config']);this['_configService'][_0x34b58d(0xd1)](z,_0xba917c);}[_0x522987(0xc7)](){const _0x31f9bc=_0x522987;[[f],[g],[S]][_0x31f9bc(0xbf)](_0x5c723e=>{const _0x15fd0e=_0x31f9bc;this[_0x15fd0e(0xe7)]['add'](_0x5c723e);});}[_0x522987(0x9a)](){const _0x127f55=_0x522987;this[_0x127f55(0xe7)][_0x127f55(0xd3)](g),this[_0x127f55(0xe7)][_0x127f55(0xd3)](S);}};$(b,_0x522987(0xb5),W),$(b,_0x522987(0xb6),_0x5b882a[_0x522987(0x9c)]),b=ie([_0x4e1bfd(_0x17dac6,_0x10b110,_0x4c9a4e),w(0x1,_0x2518d0(_0x5d3cee)),w(0x2,_0x51787d)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x142e5a=_0x1064;(function(_0x5d0c7c,_0x4b2018){const _0x44a9e5=_0x1064,_0x8a2d5c=_0x5d0c7c();while(!![]){try{const _0x2ed859=parseInt(_0x44a9e5(0x210))/0x1+parseInt(_0x44a9e5(0x1fa))/0x2*(-parseInt(_0x44a9e5(0x1e7))/0x3)+parseInt(_0x44a9e5(0x1de))/0x4+parseInt(_0x44a9e5(0x1fe))/0x5+-parseInt(_0x44a9e5(0x1d7))/0x6*(-parseInt(_0x44a9e5(0x1bb))/0x7)+parseInt(_0x44a9e5(0x1d5))/0x8*(-parseInt(_0x44a9e5(0x1be))/0x9)+-parseInt(_0x44a9e5(0x21a))/0xa*(parseInt(_0x44a9e5(0x21d))/0xb);if(_0x2ed859===_0x4b2018)break;else _0x8a2d5c['push'](_0x8a2d5c['shift']());}catch(_0x5d8fe3){_0x8a2d5c['push'](_0x8a2d5c['shift']());}}}(_0x2a69,0x1d7af));import{CommentService as _0x34cb78,CollaborationSessionService as _0x3eadcd,UniverCollaborationClientPlugin as _0x2e3deb}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x30e77a}from'@univerjs-pro/license';import{dayjs as _0x547211,UserManagerService as _0x4e69f0,Inject as _0x1e832b,Injector as _0x980829,Disposable as _0x151986,CustomRangeType as _0x3a1ffb,UniverInstanceType as _0x2cb630,DependentOn as _0xdc1d9e,IConfigService as _0x265aa0,Plugin as _0x147f91,merge as _0x35d0e6}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x6ce37e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xef7d91,IThreadCommentDataSourceService as _0x40a1e3}from'@univerjs/thread-comment';function _0x1064(_0x5cc6da,_0x4dba66){const _0x2a6902=_0x2a69();return _0x1064=function(_0x1064e6,_0x25d54f){_0x1064e6=_0x1064e6-0x1b4;let _0x56022d=_0x2a6902[_0x1064e6];return _0x56022d;},_0x1064(_0x5cc6da,_0x4dba66);}import{bufferTime as _0x54d44a}from'rxjs';function _0x2a69(){const _0x2b26ce=['_configService','filter','getUser','body','defineProperty','206698eYTXBu','COMMENT','syncUpdateMutationToColla','replies','846065hfcdDB','userID','/solved','dataSource','payload','_initDataSource','onReady','Solved','getComment','Add','pipe','_threadCommentDataSourceService','/delete','OpenOrReOpen','values','/add','root','stringify','1508UGchQA','resolveComment','Unknown','rangeType','personId','/reply','_init','customRanges','code','reply','10EDsLGA','user','requireSession','3202672lfTuCY','map','format','getOwnPropertyDescriptor','parse','_threadCommentModel','createTimestamp','_threadCommentDataSource','error','5103IqPxhJ','disposeWithMe','commentUpdate$','80559fVtShR','/edit','size','find','onStarting','saveCommentToSnapshot','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','addUser','getMemberID','userId','Delete','delete','length','solved','_userService','listComments','updateComment','setConfig','getCurrentUser','Reply','_httpService','comments','comment','32XAXbwD','type','1314iacnbR','symbol','rangeId','thread-comment-data-source.config','threadId','replyId','users','882736HFFIuK','add','content','parentId','deleteComment','get','UNRECOGNIZED','Solve','pluginName','3tJDjTx','subscribe','getUnit','_config','Edit','_commentService','_initUserSync','unitId','_sessionService','_injector','/universer-api/comment/unit/','post','forEach','YYYY/MM/DD\x20HH:mm'];_0x2a69=function(){return _0x2b26ce;};return _0x2a69();}import{HTTPService as _0x177d81}from'@univerjs/network';const W=_0x142e5a(0x1c4);var I=(_0x14755c=>(_0x14755c[_0x14755c['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x14755c[_0x14755c[_0x142e5a(0x205)]=0x1]='Solved',_0x14755c[_0x14755c[_0x142e5a(0x1e4)]=-0x1]=_0x142e5a(0x1e4),_0x14755c))(I||{}),v=(_0x4c2198=>(_0x4c2198[_0x4c2198[_0x142e5a(0x212)]=0x0]=_0x142e5a(0x212),_0x4c2198[_0x4c2198[_0x142e5a(0x207)]=0x1]=_0x142e5a(0x207),_0x4c2198[_0x4c2198[_0x142e5a(0x1d1)]=0x2]=_0x142e5a(0x1d1),_0x4c2198[_0x4c2198['Edit']=0x3]='Edit',_0x4c2198[_0x4c2198[_0x142e5a(0x1c8)]=0x4]='Delete',_0x4c2198[_0x4c2198[_0x142e5a(0x1e5)]=0x5]=_0x142e5a(0x1e5),_0x4c2198[_0x4c2198[_0x142e5a(0x1e4)]=-0x1]=_0x142e5a(0x1e4),_0x4c2198))(v||{});const D=_0xaabda8=>_0x547211(new Date(+_0xaabda8))[_0x142e5a(0x1b4)](_0x142e5a(0x1f4)),B=async(_0x12cd49,_0x516fee)=>{const _0x4ba0b9=_0x142e5a,_0x576a7b=_0x12cd49[_0x4ba0b9(0x1e3)](_0x4e69f0),_0x4fe986=_0x12cd49[_0x4ba0b9(0x1e3)](_0x177d81);_0x516fee['forEach'](_0xbccfdb=>{const _0x1230a8=_0x4ba0b9;_0x576a7b[_0x1230a8(0x1f7)](_0xbccfdb)&&_0x516fee[_0x1230a8(0x1c9)](_0xbccfdb);}),_0x516fee[_0x4ba0b9(0x1c0)]&&(await _0x4fe986[_0x4ba0b9(0x1e3)]('/universer-api/user/list',{'params':{'userIDs':[..._0x516fee]}}))[_0x4ba0b9(0x1f8)][_0x4ba0b9(0x1dd)][_0x4ba0b9(0x1f3)](_0x385ed2=>{const _0x3a2a71=_0x4ba0b9;_0x385ed2&&_0x576a7b[_0x3a2a71(0x1c5)](_0x385ed2);});};var K=Object[_0x142e5a(0x1b5)],V=(_0xd9639d,_0xc51c7b,_0x5d8e70,_0x1d5194)=>{const _0x24e42c=_0x142e5a;for(var _0x1e3c35=_0x1d5194>0x1?void 0x0:_0x1d5194?K(_0xc51c7b,_0x5d8e70):_0xc51c7b,_0x17320d=_0xd9639d[_0x24e42c(0x1ca)]-0x1,_0x2a2331;_0x17320d>=0x0;_0x17320d--)(_0x2a2331=_0xd9639d[_0x17320d])&&(_0x1e3c35=_0x2a2331(_0x1e3c35)||_0x1e3c35);return _0x1e3c35;},p=(_0xc69db8,_0x10227a)=>(_0x3a64f7,_0x161329)=>_0x10227a(_0x3a64f7,_0x161329,_0xc69db8);let S=class extends _0x151986{constructor(_0x34bd5f,_0x3ee7f3,_0x330f47,_0x497047){const _0x1d578b=_0x142e5a;super(),this[_0x1d578b(0x1ec)]=_0x34bd5f,this[_0x1d578b(0x1b7)]=_0x3ee7f3,this['_userService']=_0x330f47,this[_0x1d578b(0x1f0)]=_0x497047,this[_0x1d578b(0x216)](),this[_0x1d578b(0x1ed)]();}['_initUserSync'](){const _0x59876a=_0x142e5a;this['disposeWithMe'](this[_0x59876a(0x1b7)]['commentUpdate$'][_0x59876a(0x208)](_0x54d44a(0x10))['subscribe'](_0xe561a7=>{const _0x47c1f7=_0x59876a,_0x55b9dc=new Set();_0xe561a7['forEach'](_0x40ad84=>{const _0x26bbdd=_0x1064;switch(_0x40ad84[_0x26bbdd(0x1d6)]){case _0x26bbdd(0x1df):{const _0x4a6beb=_0x40ad84[_0x26bbdd(0x202)][_0x26bbdd(0x214)];_0x55b9dc[_0x26bbdd(0x1df)](_0x4a6beb);break;}}}),B(this[_0x47c1f7(0x1f0)],_0x55b9dc);}));}[_0x142e5a(0x216)](){const _0x5b5e14=_0x142e5a;this[_0x5b5e14(0x1bc)](this[_0x5b5e14(0x1ec)][_0x5b5e14(0x1bd)][_0x5b5e14(0x1e8)](async _0x1cde6c=>{const _0x278f9c=_0x5b5e14;var _0x38b1f6,_0x6662f3,_0x2e12dc,_0x42ccd7;const _0x22f858=(_0x38b1f6=this[_0x278f9c(0x1b7)][_0x278f9c(0x1e9)](_0x1cde6c['unitId'])[_0x278f9c(0x1c1)](_0x5bc2f3=>_0x5bc2f3[_0x278f9c(0x1db)]===_0x1cde6c[_0x278f9c(0x1db)]))==null?void 0x0:_0x38b1f6['root'];if(!_0x22f858)return;const {unitId:_0x5dee63,subUnitId:_0x5a717b}=_0x22f858;switch(_0x1cde6c[_0x278f9c(0x21b)]&&this[_0x278f9c(0x1cc)]['addUser'](_0x1cde6c[_0x278f9c(0x21b)]),_0x1cde6c[_0x278f9c(0x1d6)]){case v['Add']:break;case v[_0x278f9c(0x1d1)]:{this[_0x278f9c(0x1b7)]['addComment'](_0x5dee63,_0x5a717b,{'unitId':_0x5dee63,'subUnitId':_0x5a717b,'ref':'','id':_0x1cde6c['replyId'],'dT':D(+_0x1cde6c['createTimestamp']),'threadId':_0x1cde6c[_0x278f9c(0x1db)],'personId':(_0x2e12dc=(_0x6662f3=_0x1cde6c['user'])==null?void 0x0:_0x6662f3[_0x278f9c(0x1ff)])!=null?_0x2e12dc:_0x1cde6c[_0x278f9c(0x1c7)],'text':JSON[_0x278f9c(0x1b6)](_0x1cde6c[_0x278f9c(0x1e0)]),'parentId':_0x22f858['id']});break;}case v['Delete']:{const _0x51d15a=this[_0x278f9c(0x1b7)][_0x278f9c(0x206)](_0x5dee63,_0x5a717b,_0x1cde6c[_0x278f9c(0x1dc)]);_0x51d15a&&_0x51d15a[_0x278f9c(0x1e1)]&&this[_0x278f9c(0x1b7)][_0x278f9c(0x1e2)](_0x5dee63,_0x5a717b,_0x1cde6c[_0x278f9c(0x1dc)]);break;}case v[_0x278f9c(0x1eb)]:{this[_0x278f9c(0x1b7)][_0x278f9c(0x1ce)](_0x5dee63,_0x5a717b,{'commentId':_0x1cde6c[_0x278f9c(0x1dc)],'text':JSON['parse'](_0x1cde6c['content'])});break;}case v['Solve']:{const _0x131da8=(_0x42ccd7=this[_0x278f9c(0x1b7)][_0x278f9c(0x1e9)](_0x1cde6c[_0x278f9c(0x1ee)])[_0x278f9c(0x1c1)](_0x25dcd6=>_0x25dcd6[_0x278f9c(0x1db)]===_0x1cde6c[_0x278f9c(0x1db)]))==null?void 0x0:_0x42ccd7[_0x278f9c(0x20e)];_0x131da8&&this[_0x278f9c(0x1b7)][_0x278f9c(0x211)](_0x5dee63,_0x5a717b,_0x131da8['id'],_0x1cde6c['solved']===I[_0x278f9c(0x205)]);break;}}}));}};S=V([p(0x0,_0x1e832b(_0x34cb78)),p(0x1,_0x1e832b(_0xef7d91)),p(0x2,_0x1e832b(_0x4e69f0)),p(0x3,_0x1e832b(_0x980829))],S);const z=_0x142e5a(0x1da),M={};var k=Object[_0x142e5a(0x1b5)],Q=(_0x17e0db,_0x463011,_0x20149d,_0x326dc1)=>{for(var _0x4423be=_0x326dc1>0x1?void 0x0:_0x326dc1?k(_0x463011,_0x20149d):_0x463011,_0x4fba6a=_0x17e0db['length']-0x1,_0x563e6c;_0x4fba6a>=0x0;_0x4fba6a--)(_0x563e6c=_0x17e0db[_0x4fba6a])&&(_0x4423be=_0x563e6c(_0x4423be)||_0x4423be);return _0x4423be;},_=(_0x28919e,_0x204370)=>(_0x596383,_0x1c9806)=>_0x204370(_0x596383,_0x1c9806,_0x28919e);function X(_0x185554,_0x2eb468){const _0x57d6c8=_0x142e5a,_0x6ac707=_0x185554['replies'][0x0];return{..._0x2eb468,'id':_0x6ac707[_0x57d6c8(0x1dc)],'resolved':_0x185554[_0x57d6c8(0x1cb)]===0x1,'dT':D(_0x6ac707[_0x57d6c8(0x1b8)]),'personId':_0x6ac707[_0x57d6c8(0x1c7)],'threadId':_0x6ac707[_0x57d6c8(0x1db)]};}function ee(_0x534dc0,_0xd16d73,_0x10a196){const _0x219210=_0x142e5a;var _0x1a920e,_0x3eee57;if(((_0x3eee57=(_0x1a920e=_0x534dc0==null?void 0x0:_0x534dc0['replies'])==null?void 0x0:_0x1a920e['length'])!=null?_0x3eee57:0x0)>0x0){const _0x1a7f56=(_0x58e1d9,_0x443b2c)=>({'id':_0x58e1d9[_0x219210(0x1dc)],'threadId':_0x58e1d9[_0x219210(0x1db)],'dT':D(_0x58e1d9[_0x219210(0x1b8)]),'personId':_0x58e1d9[_0x219210(0x1c7)],'resolved':_0x534dc0['solved']===I[_0x219210(0x205)],'unitId':_0xd16d73,'subUnitId':_0x10a196,'text':JSON[_0x219210(0x1b6)](_0x58e1d9['content']),'parentId':_0x443b2c}),_0x19a485=_0x1a7f56(_0x534dc0[_0x219210(0x1fd)][0x0]);return{..._0x19a485,'children':_0x534dc0['replies']['slice'](0x1)[_0x219210(0x21e)](_0x49300c=>_0x1a7f56(_0x49300c,_0x19a485['id']))};}return null;}let f=class{constructor(_0x4c7624,_0x39159a,_0x55907f,_0x476a84){const _0x27a9c2=_0x142e5a;this[_0x27a9c2(0x1d2)]=_0x4c7624,this[_0x27a9c2(0x1cc)]=_0x39159a,this['_sessionService']=_0x55907f,this[_0x27a9c2(0x1f0)]=_0x476a84;}async['addComment'](_0x31a310){const _0x2f0f29=_0x142e5a;var _0x403e0a,_0x12b136;const {parentId:_0x958274,unitId:_0x197c37,text:_0x270f51,threadId:_0x1a9d00}=_0x31a310,_0x3b26ed=(_0x12b136=(_0x403e0a=_0x270f51[_0x2f0f29(0x217)])==null?void 0x0:_0x403e0a[_0x2f0f29(0x1f6)](_0x4973f6=>_0x4973f6[_0x2f0f29(0x213)]===_0x3a1ffb[_0x2f0f29(0x1fb)])[_0x2f0f29(0x21e)](_0x129377=>_0x129377[_0x2f0f29(0x1d9)]))!=null?_0x12b136:[],_0x1b7874=JSON['stringify'](_0x270f51),_0x51bdd8=(await this[_0x2f0f29(0x1ef)][_0x2f0f29(0x21c)](_0x197c37))['getMemberID']();if(_0x958274){const _0x4fb131={'memberId':_0x51bdd8,'unitId':_0x197c37,'content':_0x1b7874,'mention':_0x3b26ed,'threadId':_0x1a9d00},_0x3d7fd0=(await this[_0x2f0f29(0x1d2)][_0x2f0f29(0x1f2)](_0x2f0f29(0x1f1)+_0x197c37+_0x2f0f29(0x215),{'body':_0x4fb131}))['body'][_0x2f0f29(0x219)];return{..._0x31a310,'id':_0x3d7fd0['replyId'],'dT':_0x547211(+_0x3d7fd0[_0x2f0f29(0x1b8)])[_0x2f0f29(0x1b4)](_0x2f0f29(0x1f4)),'personId':_0x3d7fd0[_0x2f0f29(0x1c7)]};}else{const _0x2767e7={'memberId':_0x51bdd8,'unitId':_0x197c37,'content':_0x1b7874,'mention':_0x3b26ed},_0x585b74=await this[_0x2f0f29(0x1d2)][_0x2f0f29(0x1f2)]('/universer-api/comment/unit/'+_0x197c37+_0x2f0f29(0x20d),{'body':_0x2767e7});return X(_0x585b74[_0x2f0f29(0x1f8)][_0x2f0f29(0x1d4)],_0x31a310);}}async[_0x142e5a(0x1ce)](_0x556e84){const _0x5c9682=_0x142e5a;var _0x2d24dd,_0x1f5a92;const {text:_0x52e779,unitId:_0x120c76}=_0x556e84,_0xeb2926=(_0x1f5a92=(_0x2d24dd=_0x52e779[_0x5c9682(0x217)])==null?void 0x0:_0x2d24dd[_0x5c9682(0x1f6)](_0x39ad03=>_0x39ad03[_0x5c9682(0x213)]===_0x3a1ffb['COMMENT'])['map'](_0x36f164=>_0x36f164['rangeId']))!=null?_0x1f5a92:[],_0x4a59e6=JSON[_0x5c9682(0x20f)](_0x52e779),_0x4b9534=_0x556e84[_0x5c9682(0x1db)],_0x34eb0b=_0x556e84['id'],_0x1e4a48={'memberId':(await this[_0x5c9682(0x1ef)][_0x5c9682(0x21c)](_0x120c76))[_0x5c9682(0x1c6)](),'unitId':_0x120c76,'threadId':_0x4b9534,'mention':_0xeb2926,'content':_0x4a59e6,'replyId':_0x34eb0b},_0x2dcb15=await this['_httpService'][_0x5c9682(0x1f2)](_0x5c9682(0x1f1)+_0x120c76+_0x5c9682(0x1bf),{'body':_0x1e4a48});return!_0x2dcb15['body'][_0x5c9682(0x1ba)]||_0x2dcb15[_0x5c9682(0x1f8)][_0x5c9682(0x1ba)][_0x5c9682(0x218)]===0x1;}async[_0x142e5a(0x211)](_0x1eac9e){const _0x41334d=_0x142e5a,{unitId:_0x7efe33}=_0x1eac9e,_0x4fd10e=_0x1eac9e[_0x41334d(0x1db)],_0x256002={'memberId':this[_0x41334d(0x1cc)][_0x41334d(0x1d0)]()[_0x41334d(0x1ff)],'unitId':_0x7efe33,'threadId':_0x4fd10e,'solved':_0x1eac9e['resolved']?I[_0x41334d(0x205)]:I[_0x41334d(0x20b)]},_0x5163d8=await this[_0x41334d(0x1d2)]['post']('/universer-api/comment/unit/'+_0x7efe33+_0x41334d(0x200),{'body':_0x256002});return!_0x5163d8[_0x41334d(0x1f8)][_0x41334d(0x1ba)]||_0x5163d8[_0x41334d(0x1f8)][_0x41334d(0x1ba)][_0x41334d(0x218)]===0x1;}async[_0x142e5a(0x1e2)](_0x4c1dfe,_0x4873c2,_0x29d9a5,_0x40f5b7){const _0x67988=_0x142e5a,_0x1db1b3={'memberId':(await this['_sessionService'][_0x67988(0x21c)](_0x4c1dfe))[_0x67988(0x1c6)](),'threadId':_0x29d9a5,'replyId':_0x40f5b7,'unitId':_0x4c1dfe},_0x4aae5d=await this[_0x67988(0x1d2)]['post'](_0x67988(0x1f1)+_0x4c1dfe+_0x67988(0x20a),{'body':_0x1db1b3});return!_0x4aae5d['body'][_0x67988(0x1ba)]||_0x4aae5d[_0x67988(0x1f8)]['error'][_0x67988(0x218)]===0x1;}async[_0x142e5a(0x1cd)](_0xd6a374,_0x470b89,_0x3660fd){const _0xd99151=_0x142e5a,_0x9ebdba={'unitId':_0xd6a374,'threadId':_0x3660fd},_0xb4375c=await this[_0xd99151(0x1d2)][_0xd99151(0x1f2)]('/universer-api/comment/unit/'+_0xd6a374+'/list',{'body':_0x9ebdba}),_0x11447c=_0x3660fd[_0xd99151(0x21e)](_0x5ad7f1=>ee(_0xb4375c['body'][_0xd99151(0x1d3)][_0x5ad7f1],_0xd6a374,_0x470b89))[_0xd99151(0x1f6)](Boolean);return Object[_0xd99151(0x20c)](_0xb4375c[_0xd99151(0x1f8)][_0xd99151(0x1dd)])[_0xd99151(0x1f3)](_0x14a34d=>{const _0x1105db=_0xd99151;this[_0x1105db(0x1cc)][_0x1105db(0x1c5)](_0x14a34d);}),_0x11447c;}[_0x142e5a(0x1c3)](_0x465a1d){const _0x1d5549=_0x142e5a;return{'id':_0x465a1d['id'],'threadId':_0x465a1d[_0x1d5549(0x1db)],'ref':_0x465a1d['ref']};}};f=Q([_(0x0,_0x1e832b(_0x177d81)),_(0x1,_0x1e832b(_0x4e69f0)),_(0x2,_0x1e832b(_0x3eadcd)),_(0x3,_0x1e832b(_0x980829))],f);var re=Object[_0x142e5a(0x1b5)],te=(_0x2f4364,_0x31d2f,_0x5c24e2,_0x2b68a3)=>{const _0x37ad1b=_0x142e5a;for(var _0x5d213a=_0x2b68a3>0x1?void 0x0:_0x2b68a3?re(_0x31d2f,_0x5c24e2):_0x31d2f,_0x2b8231=_0x2f4364[_0x37ad1b(0x1ca)]-0x1,_0x32b2f3;_0x2b8231>=0x0;_0x2b8231--)(_0x32b2f3=_0x2f4364[_0x2b8231])&&(_0x5d213a=_0x32b2f3(_0x5d213a)||_0x5d213a);return _0x5d213a;},N=(_0x2a3bf2,_0xf5bdde)=>(_0x53238f,_0x47e99e)=>_0xf5bdde(_0x53238f,_0x47e99e,_0x2a3bf2);let g=class extends _0x151986{constructor(_0x2f8896,_0x39b937){const _0x3b420c=_0x142e5a;super(),this[_0x3b420c(0x209)]=_0x2f8896,this[_0x3b420c(0x1b9)]=_0x39b937,this[_0x3b420c(0x203)]();}['_initDataSource'](){const _0x1a8097=_0x142e5a;this[_0x1a8097(0x209)][_0x1a8097(0x201)]=this['_threadCommentDataSource'],this[_0x1a8097(0x209)][_0x1a8097(0x1fc)]=!0x1;}};g=te([N(0x0,_0x40a1e3),N(0x1,_0x1e832b(f))],g);var se=Object[_0x142e5a(0x1f9)],oe=Object[_0x142e5a(0x1b5)],ne=(_0x4c139a,_0x2c9dee,_0xb2413b)=>_0x2c9dee in _0x4c139a?se(_0x4c139a,_0x2c9dee,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xb2413b}):_0x4c139a[_0x2c9dee]=_0xb2413b,ie=(_0x5491a0,_0x542e4d,_0x2fdd3a,_0x33240e)=>{const _0x1b44fb=_0x142e5a;for(var _0x3ea2ff=_0x33240e>0x1?void 0x0:_0x33240e?oe(_0x542e4d,_0x2fdd3a):_0x542e4d,_0x59d53e=_0x5491a0[_0x1b44fb(0x1ca)]-0x1,_0x57cdf4;_0x59d53e>=0x0;_0x59d53e--)(_0x57cdf4=_0x5491a0[_0x59d53e])&&(_0x3ea2ff=_0x57cdf4(_0x3ea2ff)||_0x3ea2ff);return _0x3ea2ff;},w=(_0x2937cb,_0x91a7ba)=>(_0x3cff63,_0x2eb371)=>_0x91a7ba(_0x3cff63,_0x2eb371,_0x2937cb),$=(_0x319e84,_0x53def7,_0x52e190)=>ne(_0x319e84,typeof _0x53def7!=_0x142e5a(0x1d8)?_0x53def7+'':_0x53def7,_0x52e190);let b=class extends _0x147f91{constructor(_0x19686e=M,_0x5ad295,_0x38c581){const _0x2866c9=_0x142e5a;super(),this[_0x2866c9(0x1ea)]=_0x19686e,this['_injector']=_0x5ad295,this['_configService']=_0x38c581;const {..._0x4aa37f}=_0x35d0e6({},M,this['_config']);this[_0x2866c9(0x1f5)][_0x2866c9(0x1cf)](z,_0x4aa37f);}[_0x142e5a(0x1c2)](){const _0x171f83=_0x142e5a;[[f],[g],[S]][_0x171f83(0x1f3)](_0xc3ec34=>{const _0x14d564=_0x171f83;this['_injector'][_0x14d564(0x1df)](_0xc3ec34);});}[_0x142e5a(0x204)](){const _0x41862e=_0x142e5a;this[_0x41862e(0x1f0)][_0x41862e(0x1e3)](g),this[_0x41862e(0x1f0)]['get'](S);}};$(b,_0x142e5a(0x1e6),W),$(b,_0x142e5a(0x1d6),_0x2cb630['UNIVER_UNKNOWN']),b=ie([_0xdc1d9e(_0x6ce37e,_0x2e3deb,_0x30e77a),w(0x1,_0x1e832b(_0x980829)),w(0x2,_0x265aa0)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x522987=_0x2161;(function(_0x2688fa,_0xd5e57){const _0x5507ad=_0x2161,_0x3ef85a=_0x2688fa();while(!![]){try{const _0x3533e0=-parseInt(_0x5507ad(0xea))/0x1*(-parseInt(_0x5507ad(0xad))/0x2)+-parseInt(_0x5507ad(0xf5))/0x3*(-parseInt(_0x5507ad(0xe1))/0x4)+parseInt(_0x5507ad(0xc0))/0x5*(parseInt(_0x5507ad(0xd6))/0x6)+-parseInt(_0x5507ad(0xf0))/0x7*(parseInt(_0x5507ad(0xf7))/0x8)+-parseInt(_0x5507ad(0xcc))/0x9+parseInt(_0x5507ad(0x96))/0xa+parseInt(_0x5507ad(0xe5))/0xb*(-parseInt(_0x5507ad(0xf8))/0xc);if(_0x3533e0===_0xd5e57)break;else _0x3ef85a['push'](_0x3ef85a['shift']());}catch(_0x4df065){_0x3ef85a['push'](_0x3ef85a['shift']());}}}(_0xe681,0x87140));function _0xe681(){const _0x3f8605=['_threadCommentModel','8DsQxNy','708BVUdEv','body','userID','user','content','_commentService','9559250OznUgH','getCurrentUser','/reply','/universer-api/comment/unit/','onReady','/add','UNIVER_UNKNOWN','payload','defineProperty','getUser','solved','slice','Solved','customRanges','rangeId','Delete','addComment','getUnit','ref','syncUpdateMutationToColla','comment','_config','root','30yHOuxf','add','deleteComment','filter','error','format','users','Add','pluginName','type','_sessionService','map','getMemberID','_initUserSync','parse','reply','resolved','requireSession','forEach','15HqkjhB','_httpService','subscribe','/edit','threadId','stringify','_initDataSource','onStarting','disposeWithMe','resolveComment','replyId','replies','9758340uOseKs','_configService','commentUpdate$','COMMENT','Solve','setConfig','addUser','get','Reply','_threadCommentDataSourceService','1399242QThYwk','Edit','listComments','length','comments','size','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getOwnPropertyDescriptor','/solved','_init','userId','2564416QIpoDa','unitId','values','rangeType','236687nHybkl','Unknown','_injector','post','UNRECOGNIZED','43969UoSnSH','_userService','YYYY/MM/DD\x20HH:mm','pipe','code','_threadCommentDataSource','343994VxSaIR','find','OpenOrReOpen','saveCommentToSnapshot','createTimestamp','3ZqJLFe'];_0xe681=function(){return _0x3f8605;};return _0xe681();}import{CommentService as _0x2428f5,CollaborationSessionService as _0x2f8845,UniverCollaborationClientPlugin as _0x10b110}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4c9a4e}from'@univerjs-pro/license';import{dayjs as _0x378f51,UserManagerService as _0x5a10c3,Inject as _0x2518d0,Injector as _0x5d3cee,Disposable as _0x6e4d38,CustomRangeType as _0x204202,UniverInstanceType as _0x5b882a,DependentOn as _0x4e1bfd,IConfigService as _0x51787d,Plugin as _0x2c9034,merge as _0x410a83}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x17dac6}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x59aa45,IThreadCommentDataSourceService as _0x3e559c}from'@univerjs/thread-comment';import{bufferTime as _0x50f19c}from'rxjs';import{HTTPService as _0xd30796}from'@univerjs/network';const W=_0x522987(0xdc);var I=(_0x2da422=>(_0x2da422[_0x2da422[_0x522987(0xf2)]=0x0]='OpenOrReOpen',_0x2da422[_0x2da422['Solved']=0x1]=_0x522987(0xa2),_0x2da422[_0x2da422[_0x522987(0xe9)]=-0x1]='UNRECOGNIZED',_0x2da422))(I||{}),v=(_0x5dc181=>(_0x5dc181[_0x5dc181['Unknown']=0x0]=_0x522987(0xe6),_0x5dc181[_0x5dc181[_0x522987(0xb4)]=0x1]=_0x522987(0xb4),_0x5dc181[_0x5dc181[_0x522987(0xd4)]=0x2]=_0x522987(0xd4),_0x5dc181[_0x5dc181[_0x522987(0xd7)]=0x3]=_0x522987(0xd7),_0x5dc181[_0x5dc181[_0x522987(0xa5)]=0x4]=_0x522987(0xa5),_0x5dc181[_0x5dc181[_0x522987(0xd0)]=0x5]=_0x522987(0xd0),_0x5dc181[_0x5dc181[_0x522987(0xe9)]=-0x1]='UNRECOGNIZED',_0x5dc181))(v||{});const D=_0x376f06=>_0x378f51(new Date(+_0x376f06))[_0x522987(0xb2)](_0x522987(0xec)),B=async(_0x1a2b62,_0x45ca7d)=>{const _0x3f9cbf=_0x522987,_0x1a8a54=_0x1a2b62[_0x3f9cbf(0xd3)](_0x5a10c3),_0x395f67=_0x1a2b62[_0x3f9cbf(0xd3)](_0xd30796);_0x45ca7d[_0x3f9cbf(0xbf)](_0x30136f=>{const _0x349cb2=_0x3f9cbf;_0x1a8a54[_0x349cb2(0x9f)](_0x30136f)&&_0x45ca7d['delete'](_0x30136f);}),_0x45ca7d[_0x3f9cbf(0xdb)]&&(await _0x395f67[_0x3f9cbf(0xd3)]('/universer-api/user/list',{'params':{'userIDs':[..._0x45ca7d]}}))[_0x3f9cbf(0xf9)][_0x3f9cbf(0xb3)]['forEach'](_0x3e8f72=>{const _0x2143a8=_0x3f9cbf;_0x3e8f72&&_0x1a8a54[_0x2143a8(0xd2)](_0x3e8f72);});};var K=Object[_0x522987(0xdd)],V=(_0x339ecc,_0x2d3d68,_0x4f8c64,_0x431291)=>{const _0x21e6f1=_0x522987;for(var _0x166369=_0x431291>0x1?void 0x0:_0x431291?K(_0x2d3d68,_0x4f8c64):_0x2d3d68,_0x1f8fae=_0x339ecc[_0x21e6f1(0xd9)]-0x1,_0x79512f;_0x1f8fae>=0x0;_0x1f8fae--)(_0x79512f=_0x339ecc[_0x1f8fae])&&(_0x166369=_0x79512f(_0x166369)||_0x166369);return _0x166369;},p=(_0x325c2d,_0x5e37b7)=>(_0x231b08,_0x27e5c3)=>_0x5e37b7(_0x231b08,_0x27e5c3,_0x325c2d);let S=class extends _0x6e4d38{constructor(_0x58f80a,_0x4d8abe,_0x17f978,_0x244822){const _0x5063d4=_0x522987;super(),this[_0x5063d4(0xfd)]=_0x58f80a,this['_threadCommentModel']=_0x4d8abe,this[_0x5063d4(0xeb)]=_0x17f978,this['_injector']=_0x244822,this['_init'](),this[_0x5063d4(0xba)]();}['_initUserSync'](){const _0xcbf5bd=_0x522987;this[_0xcbf5bd(0xc8)](this[_0xcbf5bd(0xf6)][_0xcbf5bd(0xce)][_0xcbf5bd(0xed)](_0x50f19c(0x10))[_0xcbf5bd(0xc2)](_0xa2d909=>{const _0x22d522=_0xcbf5bd,_0x3997cf=new Set();_0xa2d909[_0x22d522(0xbf)](_0x296b23=>{const _0x5f1fea=_0x22d522;switch(_0x296b23[_0x5f1fea(0xb6)]){case _0x5f1fea(0xae):{const _0x27cf85=_0x296b23[_0x5f1fea(0x9d)]['personId'];_0x3997cf[_0x5f1fea(0xae)](_0x27cf85);break;}}}),B(this[_0x22d522(0xe7)],_0x3997cf);}));}[_0x522987(0xdf)](){const _0x4a9d0c=_0x522987;this['disposeWithMe'](this[_0x4a9d0c(0xfd)]['commentUpdate$'][_0x4a9d0c(0xc2)](async _0x5995e1=>{const _0x1a30b2=_0x4a9d0c;var _0x27d087,_0x1afbd9,_0x4b2e9f,_0x47d3c6;const _0x4d0ddb=(_0x27d087=this[_0x1a30b2(0xf6)][_0x1a30b2(0xa7)](_0x5995e1[_0x1a30b2(0xe2)])['find'](_0x31a8e7=>_0x31a8e7['threadId']===_0x5995e1[_0x1a30b2(0xc4)]))==null?void 0x0:_0x27d087[_0x1a30b2(0xac)];if(!_0x4d0ddb)return;const {unitId:_0x32121f,subUnitId:_0x4ca891}=_0x4d0ddb;switch(_0x5995e1[_0x1a30b2(0xfb)]&&this[_0x1a30b2(0xeb)]['addUser'](_0x5995e1['user']),_0x5995e1[_0x1a30b2(0xb6)]){case v[_0x1a30b2(0xb4)]:break;case v[_0x1a30b2(0xd4)]:{this[_0x1a30b2(0xf6)]['addComment'](_0x32121f,_0x4ca891,{'unitId':_0x32121f,'subUnitId':_0x4ca891,'ref':'','id':_0x5995e1['replyId'],'dT':D(+_0x5995e1['createTimestamp']),'threadId':_0x5995e1[_0x1a30b2(0xc4)],'personId':(_0x4b2e9f=(_0x1afbd9=_0x5995e1[_0x1a30b2(0xfb)])==null?void 0x0:_0x1afbd9[_0x1a30b2(0xfa)])!=null?_0x4b2e9f:_0x5995e1['userId'],'text':JSON['parse'](_0x5995e1[_0x1a30b2(0xfc)]),'parentId':_0x4d0ddb['id']});break;}case v[_0x1a30b2(0xa5)]:{const _0x1e22b7=this[_0x1a30b2(0xf6)]['getComment'](_0x32121f,_0x4ca891,_0x5995e1[_0x1a30b2(0xca)]);_0x1e22b7&&_0x1e22b7['parentId']&&this['_threadCommentModel'][_0x1a30b2(0xaf)](_0x32121f,_0x4ca891,_0x5995e1[_0x1a30b2(0xca)]);break;}case v['Edit']:{this['_threadCommentModel']['updateComment'](_0x32121f,_0x4ca891,{'commentId':_0x5995e1['replyId'],'text':JSON[_0x1a30b2(0xbb)](_0x5995e1['content'])});break;}case v[_0x1a30b2(0xd0)]:{const _0x563b8c=(_0x47d3c6=this[_0x1a30b2(0xf6)]['getUnit'](_0x5995e1['unitId'])[_0x1a30b2(0xf1)](_0x55a2f8=>_0x55a2f8[_0x1a30b2(0xc4)]===_0x5995e1[_0x1a30b2(0xc4)]))==null?void 0x0:_0x47d3c6[_0x1a30b2(0xac)];_0x563b8c&&this[_0x1a30b2(0xf6)]['resolveComment'](_0x32121f,_0x4ca891,_0x563b8c['id'],_0x5995e1[_0x1a30b2(0xa0)]===I[_0x1a30b2(0xa2)]);break;}}}));}};S=V([p(0x0,_0x2518d0(_0x2428f5)),p(0x1,_0x2518d0(_0x59aa45)),p(0x2,_0x2518d0(_0x5a10c3)),p(0x3,_0x2518d0(_0x5d3cee))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x522987(0xdd)],Q=(_0xc7cf80,_0x2dc0c2,_0x43ef35,_0x3b5749)=>{const _0x3bd44d=_0x522987;for(var _0x5474ee=_0x3b5749>0x1?void 0x0:_0x3b5749?k(_0x2dc0c2,_0x43ef35):_0x2dc0c2,_0x19436d=_0xc7cf80[_0x3bd44d(0xd9)]-0x1,_0x385204;_0x19436d>=0x0;_0x19436d--)(_0x385204=_0xc7cf80[_0x19436d])&&(_0x5474ee=_0x385204(_0x5474ee)||_0x5474ee);return _0x5474ee;},_=(_0x3816e2,_0x25acd3)=>(_0x2cde7d,_0x175371)=>_0x25acd3(_0x2cde7d,_0x175371,_0x3816e2);function X(_0x468bcc,_0x1be89e){const _0x1b2ef8=_0x522987,_0x3074e1=_0x468bcc['replies'][0x0];return{..._0x1be89e,'id':_0x3074e1[_0x1b2ef8(0xca)],'resolved':_0x468bcc[_0x1b2ef8(0xa0)]===0x1,'dT':D(_0x3074e1[_0x1b2ef8(0xf4)]),'personId':_0x3074e1[_0x1b2ef8(0xe0)],'threadId':_0x3074e1[_0x1b2ef8(0xc4)]};}function ee(_0x42db8c,_0x32055f,_0x2e313d){const _0x47e4e8=_0x522987;var _0x5f719,_0x340b68;if(((_0x340b68=(_0x5f719=_0x42db8c==null?void 0x0:_0x42db8c['replies'])==null?void 0x0:_0x5f719['length'])!=null?_0x340b68:0x0)>0x0){const _0x43c09e=(_0x361da2,_0x16f9be)=>({'id':_0x361da2[_0x47e4e8(0xca)],'threadId':_0x361da2['threadId'],'dT':D(_0x361da2['createTimestamp']),'personId':_0x361da2['userId'],'resolved':_0x42db8c[_0x47e4e8(0xa0)]===I['Solved'],'unitId':_0x32055f,'subUnitId':_0x2e313d,'text':JSON[_0x47e4e8(0xbb)](_0x361da2[_0x47e4e8(0xfc)]),'parentId':_0x16f9be}),_0x584e96=_0x43c09e(_0x42db8c[_0x47e4e8(0xcb)][0x0]);return{..._0x584e96,'children':_0x42db8c['replies'][_0x47e4e8(0xa1)](0x1)[_0x47e4e8(0xb8)](_0x2617dd=>_0x43c09e(_0x2617dd,_0x584e96['id']))};}return null;}let f=class{constructor(_0x3b0e2c,_0x2510cb,_0xa4a287,_0xcec989){const _0x5957c6=_0x522987;this[_0x5957c6(0xc1)]=_0x3b0e2c,this[_0x5957c6(0xeb)]=_0x2510cb,this[_0x5957c6(0xb7)]=_0xa4a287,this['_injector']=_0xcec989;}async[_0x522987(0xa6)](_0x3e76b1){const _0x432314=_0x522987;var _0x1d0f8e,_0x2f5089;const {parentId:_0x5226e8,unitId:_0xbd3ae5,text:_0x30f583,threadId:_0x5ebefa}=_0x3e76b1,_0x512b79=(_0x2f5089=(_0x1d0f8e=_0x30f583[_0x432314(0xa3)])==null?void 0x0:_0x1d0f8e[_0x432314(0xb0)](_0x287682=>_0x287682[_0x432314(0xe4)]===_0x204202[_0x432314(0xcf)])[_0x432314(0xb8)](_0x415593=>_0x415593[_0x432314(0xa4)]))!=null?_0x2f5089:[],_0x3decfa=JSON['stringify'](_0x30f583),_0x2f97c2=(await this[_0x432314(0xb7)][_0x432314(0xbe)](_0xbd3ae5))[_0x432314(0xb9)]();if(_0x5226e8){const _0x14c681={'memberId':_0x2f97c2,'unitId':_0xbd3ae5,'content':_0x3decfa,'mention':_0x512b79,'threadId':_0x5ebefa},_0x1a2472=(await this[_0x432314(0xc1)]['post'](_0x432314(0x99)+_0xbd3ae5+_0x432314(0x98),{'body':_0x14c681}))[_0x432314(0xf9)][_0x432314(0xbc)];return{..._0x3e76b1,'id':_0x1a2472[_0x432314(0xca)],'dT':_0x378f51(+_0x1a2472[_0x432314(0xf4)])[_0x432314(0xb2)](_0x432314(0xec)),'personId':_0x1a2472['userId']};}else{const _0x3ec21d={'memberId':_0x2f97c2,'unitId':_0xbd3ae5,'content':_0x3decfa,'mention':_0x512b79},_0x3a311b=await this[_0x432314(0xc1)][_0x432314(0xe8)](_0x432314(0x99)+_0xbd3ae5+_0x432314(0x9b),{'body':_0x3ec21d});return X(_0x3a311b[_0x432314(0xf9)][_0x432314(0xaa)],_0x3e76b1);}}async['updateComment'](_0x3bae78){const _0x579241=_0x522987;var _0x4a77a5,_0x282a83;const {text:_0x4b05bc,unitId:_0x1a3bdf}=_0x3bae78,_0x27896c=(_0x282a83=(_0x4a77a5=_0x4b05bc[_0x579241(0xa3)])==null?void 0x0:_0x4a77a5['filter'](_0x411985=>_0x411985[_0x579241(0xe4)]===_0x204202[_0x579241(0xcf)])[_0x579241(0xb8)](_0x3fd34d=>_0x3fd34d[_0x579241(0xa4)]))!=null?_0x282a83:[],_0x5aa046=JSON[_0x579241(0xc5)](_0x4b05bc),_0x27368c=_0x3bae78[_0x579241(0xc4)],_0xdc28ec=_0x3bae78['id'],_0xf492bc={'memberId':(await this[_0x579241(0xb7)][_0x579241(0xbe)](_0x1a3bdf))[_0x579241(0xb9)](),'unitId':_0x1a3bdf,'threadId':_0x27368c,'mention':_0x27896c,'content':_0x5aa046,'replyId':_0xdc28ec},_0x501f07=await this[_0x579241(0xc1)]['post'](_0x579241(0x99)+_0x1a3bdf+_0x579241(0xc3),{'body':_0xf492bc});return!_0x501f07[_0x579241(0xf9)]['error']||_0x501f07['body'][_0x579241(0xb1)][_0x579241(0xee)]===0x1;}async[_0x522987(0xc9)](_0x2a7f13){const _0x278190=_0x522987,{unitId:_0x3c18f8}=_0x2a7f13,_0x56ede8=_0x2a7f13['threadId'],_0x2fa7a2={'memberId':this[_0x278190(0xeb)][_0x278190(0x97)]()[_0x278190(0xfa)],'unitId':_0x3c18f8,'threadId':_0x56ede8,'solved':_0x2a7f13[_0x278190(0xbd)]?I['Solved']:I[_0x278190(0xf2)]},_0x472706=await this[_0x278190(0xc1)][_0x278190(0xe8)](_0x278190(0x99)+_0x3c18f8+_0x278190(0xde),{'body':_0x2fa7a2});return!_0x472706[_0x278190(0xf9)][_0x278190(0xb1)]||_0x472706[_0x278190(0xf9)]['error'][_0x278190(0xee)]===0x1;}async[_0x522987(0xaf)](_0x5a3c3b,_0x4afe57,_0x2df827,_0x31cda6){const _0x1b9bed=_0x522987,_0x58a29a={'memberId':(await this[_0x1b9bed(0xb7)][_0x1b9bed(0xbe)](_0x5a3c3b))[_0x1b9bed(0xb9)](),'threadId':_0x2df827,'replyId':_0x31cda6,'unitId':_0x5a3c3b},_0x37fbd0=await this[_0x1b9bed(0xc1)][_0x1b9bed(0xe8)]('/universer-api/comment/unit/'+_0x5a3c3b+'/delete',{'body':_0x58a29a});return!_0x37fbd0[_0x1b9bed(0xf9)][_0x1b9bed(0xb1)]||_0x37fbd0[_0x1b9bed(0xf9)]['error']['code']===0x1;}async[_0x522987(0xd8)](_0x14f650,_0x4cc032,_0x28bf4a){const _0x3caefd=_0x522987,_0xa0d393={'unitId':_0x14f650,'threadId':_0x28bf4a},_0x3d0294=await this[_0x3caefd(0xc1)]['post'](_0x3caefd(0x99)+_0x14f650+'/list',{'body':_0xa0d393}),_0x4aebbe=_0x28bf4a[_0x3caefd(0xb8)](_0xa0e440=>ee(_0x3d0294['body'][_0x3caefd(0xda)][_0xa0e440],_0x14f650,_0x4cc032))[_0x3caefd(0xb0)](Boolean);return Object[_0x3caefd(0xe3)](_0x3d0294[_0x3caefd(0xf9)][_0x3caefd(0xb3)])[_0x3caefd(0xbf)](_0x56652f=>{const _0x3868f5=_0x3caefd;this['_userService'][_0x3868f5(0xd2)](_0x56652f);}),_0x4aebbe;}[_0x522987(0xf3)](_0x87a8b8){const _0x5b106c=_0x522987;return{'id':_0x87a8b8['id'],'threadId':_0x87a8b8[_0x5b106c(0xc4)],'ref':_0x87a8b8[_0x5b106c(0xa8)]};}};f=Q([_(0x0,_0x2518d0(_0xd30796)),_(0x1,_0x2518d0(_0x5a10c3)),_(0x2,_0x2518d0(_0x2f8845)),_(0x3,_0x2518d0(_0x5d3cee))],f);var re=Object[_0x522987(0xdd)],te=(_0x3f6d6f,_0x3ef338,_0x1f913d,_0x1fa1cf)=>{const _0x11a954=_0x522987;for(var _0x248338=_0x1fa1cf>0x1?void 0x0:_0x1fa1cf?re(_0x3ef338,_0x1f913d):_0x3ef338,_0x1f69d3=_0x3f6d6f[_0x11a954(0xd9)]-0x1,_0x49c5dc;_0x1f69d3>=0x0;_0x1f69d3--)(_0x49c5dc=_0x3f6d6f[_0x1f69d3])&&(_0x248338=_0x49c5dc(_0x248338)||_0x248338);return _0x248338;},N=(_0x32c5e9,_0x3265b0)=>(_0x1414f2,_0x44e43c)=>_0x3265b0(_0x1414f2,_0x44e43c,_0x32c5e9);let g=class extends _0x6e4d38{constructor(_0x3bd67a,_0x46c6db){const _0x713701=_0x522987;super(),this[_0x713701(0xd5)]=_0x3bd67a,this[_0x713701(0xef)]=_0x46c6db,this[_0x713701(0xc6)]();}['_initDataSource'](){const _0x2c1189=_0x522987;this[_0x2c1189(0xd5)]['dataSource']=this[_0x2c1189(0xef)],this[_0x2c1189(0xd5)][_0x2c1189(0xa9)]=!0x1;}};function _0x2161(_0x41c1b7,_0x2832b2){const _0xe6816e=_0xe681();return _0x2161=function(_0x21614d,_0x14d3c2){_0x21614d=_0x21614d-0x96;let _0x579043=_0xe6816e[_0x21614d];return _0x579043;},_0x2161(_0x41c1b7,_0x2832b2);}g=te([N(0x0,_0x3e559c),N(0x1,_0x2518d0(f))],g);var se=Object[_0x522987(0x9e)],oe=Object[_0x522987(0xdd)],ne=(_0x46b57e,_0x5f54c1,_0x513596)=>_0x5f54c1 in _0x46b57e?se(_0x46b57e,_0x5f54c1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x513596}):_0x46b57e[_0x5f54c1]=_0x513596,ie=(_0x2b1da5,_0x3906a7,_0x55dfc3,_0x57c459)=>{const _0x36354a=_0x522987;for(var _0x1deec0=_0x57c459>0x1?void 0x0:_0x57c459?oe(_0x3906a7,_0x55dfc3):_0x3906a7,_0x24b9da=_0x2b1da5[_0x36354a(0xd9)]-0x1,_0x248c04;_0x24b9da>=0x0;_0x24b9da--)(_0x248c04=_0x2b1da5[_0x24b9da])&&(_0x1deec0=_0x248c04(_0x1deec0)||_0x1deec0);return _0x1deec0;},w=(_0x3d63ce,_0x302982)=>(_0x5bf970,_0x2fc8b5)=>_0x302982(_0x5bf970,_0x2fc8b5,_0x3d63ce),$=(_0x2f1e41,_0x59a26b,_0x20bce3)=>ne(_0x2f1e41,typeof _0x59a26b!='symbol'?_0x59a26b+'':_0x59a26b,_0x20bce3);let b=class extends _0x2c9034{constructor(_0x120d09=M,_0x37434c,_0x1e543b){const _0x34b58d=_0x522987;super(),this[_0x34b58d(0xab)]=_0x120d09,this['_injector']=_0x37434c,this[_0x34b58d(0xcd)]=_0x1e543b;const {..._0xba917c}=_0x410a83({},M,this['_config']);this['_configService'][_0x34b58d(0xd1)](z,_0xba917c);}[_0x522987(0xc7)](){const _0x31f9bc=_0x522987;[[f],[g],[S]][_0x31f9bc(0xbf)](_0x5c723e=>{const _0x15fd0e=_0x31f9bc;this[_0x15fd0e(0xe7)]['add'](_0x5c723e);});}[_0x522987(0x9a)](){const _0x127f55=_0x522987;this[_0x127f55(0xe7)][_0x127f55(0xd3)](g),this[_0x127f55(0xe7)][_0x127f55(0xd3)](S);}};$(b,_0x522987(0xb5),W),$(b,_0x522987(0xb6),_0x5b882a[_0x522987(0x9c)]),b=ie([_0x4e1bfd(_0x17dac6,_0x10b110,_0x4c9a4e),w(0x1,_0x2518d0(_0x5d3cee)),w(0x2,_0x51787d)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x465d(_0x2953ca,_0x3765ac){const _0x3becdd=_0x3bec();return _0x465d=function(_0x465d81,_0xaf54a0){_0x465d81=_0x465d81-0x169;let _0x39e2a8=_0x3becdd[_0x465d81];return _0x39e2a8;},_0x465d(_0x2953ca,_0x3765ac);}(function(_0x5e4b97,_0x519035){const _0x3058ae=_0x465d,_0x3e6826=_0x5e4b97();while(!![]){try{const _0x1ae0d9=parseInt(_0x3058ae(0x197))/0x1*(-parseInt(_0x3058ae(0x1a1))/0x2)+-parseInt(_0x3058ae(0x17c))/0x3*(parseInt(_0x3058ae(0x1a6))/0x4)+parseInt(_0x3058ae(0x193))/0x5+parseInt(_0x3058ae(0x176))/0x6*(-parseInt(_0x3058ae(0x1bf))/0x7)+-parseInt(_0x3058ae(0x17d))/0x8+parseInt(_0x3058ae(0x1be))/0x9+parseInt(_0x3058ae(0x19d))/0xa*(parseInt(_0x3058ae(0x1df))/0xb);if(_0x1ae0d9===_0x519035)break;else _0x3e6826['push'](_0x3e6826['shift']());}catch(_0x471b73){_0x3e6826['push'](_0x3e6826['shift']());}}}(_0x3bec,0x1fb55),function(_0x22b699,_0x5107e7){const _0x2c6260=_0x465d;typeof exports==_0x2c6260(0x1db)&&typeof module<'u'?_0x5107e7(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x2c6260(0x179)&&define[_0x2c6260(0x1d0)]?define([_0x2c6260(0x188),_0x2c6260(0x1d6),_0x2c6260(0x1b4),'@univerjs/core',_0x2c6260(0x1c9),_0x2c6260(0x16e),_0x2c6260(0x1c7),_0x2c6260(0x1e6)],_0x5107e7):(_0x22b699=typeof globalThis<'u'?globalThis:_0x22b699||self,_0x5107e7(_0x22b699[_0x2c6260(0x1ca)]={},_0x22b699['UniverProCollaborationClient'],_0x22b699[_0x2c6260(0x198)],_0x22b699[_0x2c6260(0x1ae)],_0x22b699[_0x2c6260(0x1ba)],_0x22b699[_0x2c6260(0x1b3)],_0x22b699[_0x2c6260(0x1c7)],_0x22b699['UniverNetwork']));}(this,function(_0x12aa20,_0x367d8a,_0x2a0d00,_0x4ae14d,_0x581c88,_0x88cf62,_0x50b15e,_0x32f3a8){'use strict';const _0x3c21f3=_0x465d;const _0x1e9891=_0x3c21f3(0x1e3);var _0x328b5a=(_0x126ff9=>(_0x126ff9[_0x126ff9[_0x3c21f3(0x184)]=0x0]=_0x3c21f3(0x184),_0x126ff9[_0x126ff9[_0x3c21f3(0x1bc)]=0x1]=_0x3c21f3(0x1bc),_0x126ff9[_0x126ff9[_0x3c21f3(0x1ab)]=-0x1]=_0x3c21f3(0x1ab),_0x126ff9))(_0x328b5a||{}),_0x401444=(_0xefbc67=>(_0xefbc67[_0xefbc67[_0x3c21f3(0x1b0)]=0x0]=_0x3c21f3(0x1b0),_0xefbc67[_0xefbc67[_0x3c21f3(0x1ed)]=0x1]='Add',_0xefbc67[_0xefbc67[_0x3c21f3(0x1e5)]=0x2]='Reply',_0xefbc67[_0xefbc67['Edit']=0x3]=_0x3c21f3(0x1b8),_0xefbc67[_0xefbc67[_0x3c21f3(0x1cc)]=0x4]=_0x3c21f3(0x1cc),_0xefbc67[_0xefbc67[_0x3c21f3(0x1cb)]=0x5]=_0x3c21f3(0x1cb),_0xefbc67[_0xefbc67[_0x3c21f3(0x1ab)]=-0x1]=_0x3c21f3(0x1ab),_0xefbc67))(_0x401444||{});const _0x7a1c8c=_0x3c658b=>_0x4ae14d[_0x3c21f3(0x1b1)](new Date(+_0x3c658b))[_0x3c21f3(0x190)](_0x3c21f3(0x199)),_0x85501d=async(_0x4e41a0,_0x413891)=>{const _0x1d0751=_0x3c21f3,_0x34a519=_0x4e41a0[_0x1d0751(0x1e1)](_0x4ae14d[_0x1d0751(0x1d1)]),_0x5072ea=_0x4e41a0[_0x1d0751(0x1e1)](_0x32f3a8[_0x1d0751(0x181)]);_0x413891[_0x1d0751(0x1ac)](_0x503abb=>{const _0x4c6036=_0x1d0751;_0x34a519[_0x4c6036(0x182)](_0x503abb)&&_0x413891[_0x4c6036(0x17f)](_0x503abb);}),_0x413891[_0x1d0751(0x171)]&&(await _0x5072ea['get'](_0x1d0751(0x1e4),{'params':{'userIDs':[..._0x413891]}}))[_0x1d0751(0x174)][_0x1d0751(0x185)][_0x1d0751(0x1ac)](_0x385424=>{_0x385424&&_0x34a519['addUser'](_0x385424);});};var _0x1b2ba8=Object['getOwnPropertyDescriptor'],_0x4abf10=(_0x2b4682,_0x20619b,_0x59802a,_0x101cb5)=>{const _0x407b60=_0x3c21f3;for(var _0x50fc63=_0x101cb5>0x1?void 0x0:_0x101cb5?_0x1b2ba8(_0x20619b,_0x59802a):_0x20619b,_0x2b9c36=_0x2b4682[_0x407b60(0x170)]-0x1,_0x3fc1f8;_0x2b9c36>=0x0;_0x2b9c36--)(_0x3fc1f8=_0x2b4682[_0x2b9c36])&&(_0x50fc63=_0x3fc1f8(_0x50fc63)||_0x50fc63);return _0x50fc63;},_0x127c34=(_0xd0e39a,_0xccd3b5)=>(_0x2e02df,_0x31c00e)=>_0xccd3b5(_0x2e02df,_0x31c00e,_0xd0e39a);let _0x34b68f=class extends _0x4ae14d[_0x3c21f3(0x1b6)]{constructor(_0x473d29,_0x2b4b6a,_0x7e1045,_0x589762){const _0x4c723a=_0x3c21f3;super(),this[_0x4c723a(0x1ef)]=_0x473d29,this[_0x4c723a(0x18b)]=_0x2b4b6a,this[_0x4c723a(0x19a)]=_0x7e1045,this[_0x4c723a(0x1c1)]=_0x589762,this[_0x4c723a(0x195)](),this[_0x4c723a(0x1b9)]();}[_0x3c21f3(0x1b9)](){const _0x16e2dc=_0x3c21f3;this[_0x16e2dc(0x18c)](this[_0x16e2dc(0x18b)]['commentUpdate$']['pipe'](_0x50b15e[_0x16e2dc(0x1d3)](0x10))['subscribe'](_0x5de446=>{const _0x5305b9=_0x16e2dc,_0x5dfe0e=new Set();_0x5de446[_0x5305b9(0x1ac)](_0x2270cd=>{const _0x320f49=_0x5305b9;switch(_0x2270cd[_0x320f49(0x17e)]){case _0x320f49(0x1e7):{const _0x2619a6=_0x2270cd[_0x320f49(0x1eb)][_0x320f49(0x1e2)];_0x5dfe0e['add'](_0x2619a6);break;}}}),_0x85501d(this[_0x5305b9(0x1c1)],_0x5dfe0e);}));}[_0x3c21f3(0x195)](){const _0x54e438=_0x3c21f3;this[_0x54e438(0x18c)](this['_commentService']['commentUpdate$']['subscribe'](async _0x4881b8=>{const _0x5ccb51=_0x54e438;var _0x47d58e,_0x5ba6c9,_0x4b860c,_0x4a67d1;const _0x58ac37=(_0x47d58e=this['_threadCommentModel'][_0x5ccb51(0x194)](_0x4881b8[_0x5ccb51(0x177)])['find'](_0x4b9c7d=>_0x4b9c7d[_0x5ccb51(0x16d)]===_0x4881b8[_0x5ccb51(0x16d)]))==null?void 0x0:_0x47d58e[_0x5ccb51(0x1c3)];if(!_0x58ac37)return;const {unitId:_0x2e263e,subUnitId:_0x24d391}=_0x58ac37;switch(_0x4881b8[_0x5ccb51(0x1c8)]&&this['_userService'][_0x5ccb51(0x16c)](_0x4881b8[_0x5ccb51(0x1c8)]),_0x4881b8[_0x5ccb51(0x17e)]){case _0x401444[_0x5ccb51(0x1ed)]:break;case _0x401444[_0x5ccb51(0x1e5)]:{this['_threadCommentModel'][_0x5ccb51(0x172)](_0x2e263e,_0x24d391,{'unitId':_0x2e263e,'subUnitId':_0x24d391,'ref':'','id':_0x4881b8[_0x5ccb51(0x173)],'dT':_0x7a1c8c(+_0x4881b8[_0x5ccb51(0x1c4)]),'threadId':_0x4881b8['threadId'],'personId':(_0x4b860c=(_0x5ba6c9=_0x4881b8[_0x5ccb51(0x1c8)])==null?void 0x0:_0x5ba6c9['userID'])!=null?_0x4b860c:_0x4881b8[_0x5ccb51(0x19b)],'text':JSON[_0x5ccb51(0x1d8)](_0x4881b8[_0x5ccb51(0x18d)]),'parentId':_0x58ac37['id']});break;}case _0x401444[_0x5ccb51(0x1cc)]:{const _0x209a09=this['_threadCommentModel'][_0x5ccb51(0x1d4)](_0x2e263e,_0x24d391,_0x4881b8[_0x5ccb51(0x173)]);_0x209a09&&_0x209a09[_0x5ccb51(0x1a8)]&&this[_0x5ccb51(0x18b)][_0x5ccb51(0x1a0)](_0x2e263e,_0x24d391,_0x4881b8[_0x5ccb51(0x173)]);break;}case _0x401444['Edit']:{this[_0x5ccb51(0x18b)][_0x5ccb51(0x1cd)](_0x2e263e,_0x24d391,{'commentId':_0x4881b8[_0x5ccb51(0x173)],'text':JSON['parse'](_0x4881b8[_0x5ccb51(0x18d)])});break;}case _0x401444['Solve']:{const _0x367372=(_0x4a67d1=this[_0x5ccb51(0x18b)][_0x5ccb51(0x194)](_0x4881b8[_0x5ccb51(0x177)])['find'](_0x351412=>_0x351412[_0x5ccb51(0x16d)]===_0x4881b8['threadId']))==null?void 0x0:_0x4a67d1[_0x5ccb51(0x1c3)];_0x367372&&this[_0x5ccb51(0x18b)][_0x5ccb51(0x1a2)](_0x2e263e,_0x24d391,_0x367372['id'],_0x4881b8['solved']===_0x328b5a['Solved']);break;}}}));}};_0x34b68f=_0x4abf10([_0x127c34(0x0,_0x4ae14d[_0x3c21f3(0x1e9)](_0x367d8a['CommentService'])),_0x127c34(0x1,_0x4ae14d[_0x3c21f3(0x1e9)](_0x88cf62[_0x3c21f3(0x1da)])),_0x127c34(0x2,_0x4ae14d['Inject'](_0x4ae14d[_0x3c21f3(0x1d1)])),_0x127c34(0x3,_0x4ae14d[_0x3c21f3(0x1e9)](_0x4ae14d[_0x3c21f3(0x1aa)]))],_0x34b68f);const _0x1410af='thread-comment-data-source.config',_0x253f65={};var _0x38624b=Object[_0x3c21f3(0x1dd)],_0x5ed4f5=(_0x2647b9,_0x44e19d,_0x307d65,_0x328c8c)=>{const _0x243d98=_0x3c21f3;for(var _0x2dacff=_0x328c8c>0x1?void 0x0:_0x328c8c?_0x38624b(_0x44e19d,_0x307d65):_0x44e19d,_0x18b4fe=_0x2647b9[_0x243d98(0x170)]-0x1,_0x33b05a;_0x18b4fe>=0x0;_0x18b4fe--)(_0x33b05a=_0x2647b9[_0x18b4fe])&&(_0x2dacff=_0x33b05a(_0x2dacff)||_0x2dacff);return _0x2dacff;},_0x10faf6=(_0x21e575,_0xfb05f6)=>(_0xf631c,_0x425a9e)=>_0xfb05f6(_0xf631c,_0x425a9e,_0x21e575);function _0x3a94b2(_0xc3eb96,_0x45da5b){const _0x55df17=_0x3c21f3,_0x118376=_0xc3eb96['replies'][0x0];return{..._0x45da5b,'id':_0x118376['replyId'],'resolved':_0xc3eb96['solved']===0x1,'dT':_0x7a1c8c(_0x118376[_0x55df17(0x1c4)]),'personId':_0x118376['userId'],'threadId':_0x118376[_0x55df17(0x16d)]};}function _0x188b6b(_0x1f4148,_0x5f787b,_0x200069){const _0x35f2ac=_0x3c21f3;var _0x2fca65,_0x5c680c;if(((_0x5c680c=(_0x2fca65=_0x1f4148==null?void 0x0:_0x1f4148['replies'])==null?void 0x0:_0x2fca65[_0x35f2ac(0x170)])!=null?_0x5c680c:0x0)>0x0){const _0x45dd82=(_0x1cdce1,_0x70126c)=>({'id':_0x1cdce1[_0x35f2ac(0x173)],'threadId':_0x1cdce1[_0x35f2ac(0x16d)],'dT':_0x7a1c8c(_0x1cdce1['createTimestamp']),'personId':_0x1cdce1[_0x35f2ac(0x19b)],'resolved':_0x1f4148[_0x35f2ac(0x187)]===_0x328b5a[_0x35f2ac(0x1bc)],'unitId':_0x5f787b,'subUnitId':_0x200069,'text':JSON[_0x35f2ac(0x1d8)](_0x1cdce1[_0x35f2ac(0x18d)]),'parentId':_0x70126c}),_0x30a365=_0x45dd82(_0x1f4148[_0x35f2ac(0x183)][0x0]);return{..._0x30a365,'children':_0x1f4148[_0x35f2ac(0x183)][_0x35f2ac(0x175)](0x1)[_0x35f2ac(0x1af)](_0x22fdbf=>_0x45dd82(_0x22fdbf,_0x30a365['id']))};}return null;}let _0x3d748f=class{constructor(_0x59ce2a,_0x595e64,_0x393dd6,_0x36f904){const _0x3ef4e5=_0x3c21f3;this['_httpService']=_0x59ce2a,this['_userService']=_0x595e64,this['_sessionService']=_0x393dd6,this[_0x3ef4e5(0x1c1)]=_0x36f904;}async[_0x3c21f3(0x172)](_0x391ef4){const _0x319010=_0x3c21f3;var _0x18f96f,_0x16c73b;const {parentId:_0x5ae994,unitId:_0x483c84,text:_0x448c9c,threadId:_0x5d6e92}=_0x391ef4,_0x33363b=(_0x16c73b=(_0x18f96f=_0x448c9c['customRanges'])==null?void 0x0:_0x18f96f[_0x319010(0x18e)](_0x3f4b31=>_0x3f4b31[_0x319010(0x1ad)]===_0x4ae14d['CustomRangeType'][_0x319010(0x1ec)])[_0x319010(0x1af)](_0x1fc306=>_0x1fc306[_0x319010(0x178)]))!=null?_0x16c73b:[],_0x95f366=JSON[_0x319010(0x1e8)](_0x448c9c),_0x23a083=(await this['_sessionService'][_0x319010(0x1de)](_0x483c84))[_0x319010(0x1a7)]();if(_0x5ae994){const _0x112e61={'memberId':_0x23a083,'unitId':_0x483c84,'content':_0x95f366,'mention':_0x33363b,'threadId':_0x5d6e92},_0x944cb2=(await this[_0x319010(0x1a9)]['post']('/universer-api/comment/unit/'+_0x483c84+'/reply',{'body':_0x112e61}))[_0x319010(0x174)][_0x319010(0x1a3)];return{..._0x391ef4,'id':_0x944cb2['replyId'],'dT':_0x4ae14d[_0x319010(0x1b1)](+_0x944cb2[_0x319010(0x1c4)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x944cb2[_0x319010(0x19b)]};}else{const _0x22855d={'memberId':_0x23a083,'unitId':_0x483c84,'content':_0x95f366,'mention':_0x33363b},_0x2a1e49=await this['_httpService'][_0x319010(0x17b)](_0x319010(0x169)+_0x483c84+_0x319010(0x191),{'body':_0x22855d});return _0x3a94b2(_0x2a1e49[_0x319010(0x174)]['comment'],_0x391ef4);}}async[_0x3c21f3(0x1cd)](_0xfafe8c){const _0x48c10c=_0x3c21f3;var _0x17c0f1,_0x185db8;const {text:_0x75a389,unitId:_0x4feeb3}=_0xfafe8c,_0x50746a=(_0x185db8=(_0x17c0f1=_0x75a389[_0x48c10c(0x1b5)])==null?void 0x0:_0x17c0f1['filter'](_0x316400=>_0x316400['rangeType']===_0x4ae14d[_0x48c10c(0x180)][_0x48c10c(0x1ec)])[_0x48c10c(0x1af)](_0x172878=>_0x172878[_0x48c10c(0x178)]))!=null?_0x185db8:[],_0x2711b3=JSON['stringify'](_0x75a389),_0x3ccc25=_0xfafe8c['threadId'],_0x512370=_0xfafe8c['id'],_0x59f9e2={'memberId':(await this[_0x48c10c(0x16b)][_0x48c10c(0x1de)](_0x4feeb3))[_0x48c10c(0x1a7)](),'unitId':_0x4feeb3,'threadId':_0x3ccc25,'mention':_0x50746a,'content':_0x2711b3,'replyId':_0x512370},_0x43e910=await this[_0x48c10c(0x1a9)][_0x48c10c(0x17b)]('/universer-api/comment/unit/'+_0x4feeb3+'/edit',{'body':_0x59f9e2});return!_0x43e910[_0x48c10c(0x174)][_0x48c10c(0x192)]||_0x43e910[_0x48c10c(0x174)][_0x48c10c(0x192)][_0x48c10c(0x19c)]===0x1;}async[_0x3c21f3(0x1a2)](_0x219791){const _0x4bbe71=_0x3c21f3,{unitId:_0x422cef}=_0x219791,_0x2411c5=_0x219791[_0x4bbe71(0x16d)],_0x4a8e58={'memberId':this[_0x4bbe71(0x19a)][_0x4bbe71(0x1cf)]()[_0x4bbe71(0x1e0)],'unitId':_0x422cef,'threadId':_0x2411c5,'solved':_0x219791[_0x4bbe71(0x19e)]?_0x328b5a[_0x4bbe71(0x1bc)]:_0x328b5a[_0x4bbe71(0x184)]},_0x3256bc=await this[_0x4bbe71(0x1a9)][_0x4bbe71(0x17b)](_0x4bbe71(0x169)+_0x422cef+_0x4bbe71(0x1ce),{'body':_0x4a8e58});return!_0x3256bc['body'][_0x4bbe71(0x192)]||_0x3256bc['body'][_0x4bbe71(0x192)][_0x4bbe71(0x19c)]===0x1;}async[_0x3c21f3(0x1a0)](_0x32d5b5,_0x58ca5d,_0x219ee5,_0x91544b){const _0x4b9a93=_0x3c21f3,_0x443b94={'memberId':(await this[_0x4b9a93(0x16b)]['requireSession'](_0x32d5b5))['getMemberID'](),'threadId':_0x219ee5,'replyId':_0x91544b,'unitId':_0x32d5b5},_0x367146=await this[_0x4b9a93(0x1a9)]['post'](_0x4b9a93(0x169)+_0x32d5b5+_0x4b9a93(0x19f),{'body':_0x443b94});return!_0x367146[_0x4b9a93(0x174)][_0x4b9a93(0x192)]||_0x367146[_0x4b9a93(0x174)][_0x4b9a93(0x192)]['code']===0x1;}async[_0x3c21f3(0x1d5)](_0x105688,_0x294fa1,_0x5f57c9){const _0x2aa183=_0x3c21f3,_0xa5b941={'unitId':_0x105688,'threadId':_0x5f57c9},_0xb52679=await this['_httpService'][_0x2aa183(0x17b)]('/universer-api/comment/unit/'+_0x105688+'/list',{'body':_0xa5b941}),_0x5c9379=_0x5f57c9[_0x2aa183(0x1af)](_0x219d13=>_0x188b6b(_0xb52679['body'][_0x2aa183(0x1b7)][_0x219d13],_0x105688,_0x294fa1))[_0x2aa183(0x18e)](Boolean);return Object[_0x2aa183(0x1b2)](_0xb52679[_0x2aa183(0x174)]['users'])[_0x2aa183(0x1ac)](_0x2dabdd=>{const _0x2dad8d=_0x2aa183;this[_0x2dad8d(0x19a)][_0x2dad8d(0x16c)](_0x2dabdd);}),_0x5c9379;}[_0x3c21f3(0x189)](_0x42e697){const _0x349c09=_0x3c21f3;return{'id':_0x42e697['id'],'threadId':_0x42e697['threadId'],'ref':_0x42e697[_0x349c09(0x1d9)]};}};_0x3d748f=_0x5ed4f5([_0x10faf6(0x0,_0x4ae14d['Inject'](_0x32f3a8['HTTPService'])),_0x10faf6(0x1,_0x4ae14d[_0x3c21f3(0x1e9)](_0x4ae14d[_0x3c21f3(0x1d1)])),_0x10faf6(0x2,_0x4ae14d[_0x3c21f3(0x1e9)](_0x367d8a[_0x3c21f3(0x1c0)])),_0x10faf6(0x3,_0x4ae14d[_0x3c21f3(0x1e9)](_0x4ae14d[_0x3c21f3(0x1aa)]))],_0x3d748f);var _0x5f3532=Object[_0x3c21f3(0x1dd)],_0x272f51=(_0xf120fd,_0x5c57db,_0x1927fe,_0x4e3ca2)=>{const _0x55510e=_0x3c21f3;for(var _0x19d373=_0x4e3ca2>0x1?void 0x0:_0x4e3ca2?_0x5f3532(_0x5c57db,_0x1927fe):_0x5c57db,_0x66643a=_0xf120fd[_0x55510e(0x170)]-0x1,_0x254aad;_0x66643a>=0x0;_0x66643a--)(_0x254aad=_0xf120fd[_0x66643a])&&(_0x19d373=_0x254aad(_0x19d373)||_0x19d373);return _0x19d373;},_0x3d9381=(_0x42826d,_0x29c87a)=>(_0x323e47,_0x4396cb)=>_0x29c87a(_0x323e47,_0x4396cb,_0x42826d);let _0x884f8=class extends _0x4ae14d[_0x3c21f3(0x1b6)]{constructor(_0x1fa325,_0x17651d){const _0x53f78d=_0x3c21f3;super(),this[_0x53f78d(0x16a)]=_0x1fa325,this[_0x53f78d(0x1bb)]=_0x17651d,this['_initDataSource']();}['_initDataSource'](){const _0x2475a6=_0x3c21f3;this[_0x2475a6(0x16a)][_0x2475a6(0x1bd)]=this[_0x2475a6(0x1bb)],this[_0x2475a6(0x16a)][_0x2475a6(0x1a4)]=!0x1;}};_0x884f8=_0x272f51([_0x3d9381(0x0,_0x88cf62['IThreadCommentDataSourceService']),_0x3d9381(0x1,_0x4ae14d['Inject'](_0x3d748f))],_0x884f8);var _0x47309f=Object[_0x3c21f3(0x1c6)],_0x19fffa=Object['getOwnPropertyDescriptor'],_0xef827e=(_0x1841aa,_0x2d070a,_0x9d4e6)=>_0x2d070a in _0x1841aa?_0x47309f(_0x1841aa,_0x2d070a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x9d4e6}):_0x1841aa[_0x2d070a]=_0x9d4e6,_0x20531c=(_0x18b10f,_0x38d744,_0x30fced,_0x474a09)=>{const _0x1f136b=_0x3c21f3;for(var _0x3feda2=_0x474a09>0x1?void 0x0:_0x474a09?_0x19fffa(_0x38d744,_0x30fced):_0x38d744,_0x15215c=_0x18b10f[_0x1f136b(0x170)]-0x1,_0x55a595;_0x15215c>=0x0;_0x15215c--)(_0x55a595=_0x18b10f[_0x15215c])&&(_0x3feda2=_0x55a595(_0x3feda2)||_0x3feda2);return _0x3feda2;},_0x464968=(_0x58fc90,_0x101b8f)=>(_0xb9c705,_0x370b9f)=>_0x101b8f(_0xb9c705,_0x370b9f,_0x58fc90),_0xc8eb08=(_0xa4591d,_0x399a91,_0x10f320)=>_0xef827e(_0xa4591d,typeof _0x399a91!=_0x3c21f3(0x1c2)?_0x399a91+'':_0x399a91,_0x10f320);_0x12aa20[_0x3c21f3(0x1ea)]=class extends _0x4ae14d[_0x3c21f3(0x1d7)]{constructor(_0x1b66f5=_0x253f65,_0xa9e65c,_0x5042e9){const _0x38558c=_0x3c21f3;super(),this['_config']=_0x1b66f5,this[_0x38558c(0x1c1)]=_0xa9e65c,this[_0x38558c(0x18a)]=_0x5042e9;const {..._0x4fae36}=_0x4ae14d[_0x38558c(0x17a)]({},_0x253f65,this[_0x38558c(0x18f)]);this[_0x38558c(0x18a)][_0x38558c(0x1d2)](_0x1410af,_0x4fae36);}[_0x3c21f3(0x196)](){const _0x1caa2b=_0x3c21f3;[[_0x3d748f],[_0x884f8],[_0x34b68f]][_0x1caa2b(0x1ac)](_0x4a8bca=>{const _0x2415e5=_0x1caa2b;this['_injector'][_0x2415e5(0x1e7)](_0x4a8bca);});}[_0x3c21f3(0x1a5)](){const _0x2349e3=_0x3c21f3;this[_0x2349e3(0x1c1)][_0x2349e3(0x1e1)](_0x884f8),this[_0x2349e3(0x1c1)][_0x2349e3(0x1e1)](_0x34b68f);}},_0xc8eb08(_0x12aa20[_0x3c21f3(0x1ea)],'pluginName',_0x1e9891),_0xc8eb08(_0x12aa20[_0x3c21f3(0x1ea)],'type',_0x4ae14d[_0x3c21f3(0x186)]['UNIVER_UNKNOWN']),_0x12aa20[_0x3c21f3(0x1ea)]=_0x20531c([_0x4ae14d[_0x3c21f3(0x1ee)](_0x581c88['UniverThreadCommentUIPlugin'],_0x367d8a[_0x3c21f3(0x1dc)],_0x2a0d00[_0x3c21f3(0x16f)]),_0x464968(0x1,_0x4ae14d[_0x3c21f3(0x1e9)](_0x4ae14d[_0x3c21f3(0x1aa)])),_0x464968(0x2,_0x4ae14d['IConfigService'])],_0x12aa20['UniverThreadCommentDataSourcePlugin']),Object[_0x3c21f3(0x1c6)](_0x12aa20,Symbol[_0x3c21f3(0x1c5)],{'value':'Module'});}));function _0x3bec(){const _0xaea526=['getCurrentUser','amd','UserManagerService','setConfig','bufferTime','getComment','listComments','@univerjs-pro/collaboration-client','Plugin','parse','ref','ThreadCommentModel','object','UniverCollaborationClientPlugin','getOwnPropertyDescriptor','requireSession','374cmOeMq','userID','get','personId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/universer-api/user/list','Reply','@univerjs/network','add','stringify','Inject','UniverThreadCommentDataSourcePlugin','payload','COMMENT','Add','DependentOn','_commentService','/universer-api/comment/unit/','_threadCommentDataSourceService','_sessionService','addUser','threadId','@univerjs/thread-comment','UniverLicensePlugin','length','size','addComment','replyId','body','slice','54slXdiT','unitId','rangeId','function','merge','post','20859JNEurO','1959536asmugJ','type','delete','CustomRangeType','HTTPService','getUser','replies','OpenOrReOpen','users','UniverInstanceType','solved','exports','saveCommentToSnapshot','_configService','_threadCommentModel','disposeWithMe','content','filter','_config','format','/add','error','294270bxizhS','getUnit','_init','onStarting','213987YUFmJf','UniverProLicense','YYYY/MM/DD\x20HH:mm','_userService','userId','code','147790KREcTt','resolved','/delete','deleteComment','2nykKAf','resolveComment','reply','syncUpdateMutationToColla','onReady','12jRyAmd','getMemberID','parentId','_httpService','Injector','UNRECOGNIZED','forEach','rangeType','UniverCore','map','Unknown','dayjs','values','UniverThreadComment','@univerjs-pro/license','customRanges','Disposable','comments','Edit','_initUserSync','UniverThreadCommentUi','_threadCommentDataSource','Solved','dataSource','787194ndgqCr','30443sPkcqM','CollaborationSessionService','_injector','symbol','root','createTimestamp','toStringTag','defineProperty','rxjs','user','@univerjs/thread-comment-ui','UniverProThreadCommentDatasource','Solve','Delete','updateComment','/solved'];_0x3bec=function(){return _0xaea526;};return _0x3bec();}
|
|
1
|
+
function _0x27ba(){const _0x5dbe36=['length','body','YYYY/MM/DD\x20HH:mm','get','Edit','/solved','UniverNetwork','Inject','getUser','_initDataSource','_config','parentId','getMemberID','20989xUHvlc','filter','disposeWithMe','values','listComments','_userService','function','OpenOrReOpen','commentUpdate$','size','HTTPService','UniverThreadCommentUIPlugin','Solve','bufferTime','rxjs','@univerjs/core','Reply','UniverInstanceType','addUser','user','_sessionService','stringify','Disposable','UserManagerService','@univerjs-pro/collaboration-client','1817792rWquJj','resolveComment','Injector','36ioeyGu','post','UniverCore','userID','_threadCommentDataSourceService','/list','saveCommentToSnapshot','UniverProCollaborationClient','slice','_injector','requireSession','@univerjs/thread-comment-ui','getUnit','Module','@univerjs/network','UniverProThreadCommentDatasource','addComment','map','error','getCurrentUser','parse','UNRECOGNIZED','_initUserSync','Delete','onStarting','root','_commentService','find','UNIVER_UNKNOWN','reply','IConfigService','threadId','users','IThreadCommentDataSourceService','Plugin','UniverThreadCommentUi','715680SJjxOX','dayjs','thread-comment-data-source.config','defineProperty','_threadCommentDataSource','merge','exports','@univerjs-pro/license','UniverProLicense','type','Add','userId','pipe','syncUpdateMutationToColla','createTimestamp','format','CollaborationSessionService','object','_threadCommentModel','unitId','onReady','rangeType','replies','Solved','amd','@univerjs/thread-comment','rangeId','388080nQucPE','_httpService','setConfig','ThreadCommentModel','79107ifHWnh','12104prPIsh','getComment','_configService','customRanges','getOwnPropertyDescriptor','UniverThreadCommentDataSourcePlugin','/universer-api/comment/unit/','Unknown','ref','dataSource','solved','subscribe','/add','replyId','forEach','code','284075TPXikQ','updateComment','add','content','UniverCollaborationClientPlugin'];_0x27ba=function(){return _0x5dbe36;};return _0x27ba();}function _0x296e(_0x182cbb,_0x2d3252){const _0x27baaa=_0x27ba();return _0x296e=function(_0x296e1f,_0x38be05){_0x296e1f=_0x296e1f-0x15f;let _0x418931=_0x27baaa[_0x296e1f];return _0x418931;},_0x296e(_0x182cbb,_0x2d3252);}(function(_0x463bf2,_0x416852){const _0x48c2e3=_0x296e,_0x49cb11=_0x463bf2();while(!![]){try{const _0x3c84f2=-parseInt(_0x48c2e3(0x189))/0x1+-parseInt(_0x48c2e3(0x167))/0x2+parseInt(_0x48c2e3(0x162))/0x3+-parseInt(_0x48c2e3(0x1c9))/0x4+-parseInt(_0x48c2e3(0x177))/0x5+parseInt(_0x48c2e3(0x1a5))/0x6*(parseInt(_0x48c2e3(0x166))/0x7)+parseInt(_0x48c2e3(0x1a2))/0x8;if(_0x3c84f2===_0x416852)break;else _0x49cb11['push'](_0x49cb11['shift']());}catch(_0x40249e){_0x49cb11['push'](_0x49cb11['shift']());}}}(_0x27ba,0x2774e),function(_0x11eb3e,_0x3e13ac){const _0x3afeee=_0x296e;typeof exports==_0x3afeee(0x1da)&&typeof module<'u'?_0x3e13ac(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x3afeee(0x18f)&&define[_0x3afeee(0x15f)]?define([_0x3afeee(0x1cf),_0x3afeee(0x1a1),_0x3afeee(0x1d0),_0x3afeee(0x198),_0x3afeee(0x1b0),_0x3afeee(0x160),_0x3afeee(0x197),_0x3afeee(0x1b3)],_0x3e13ac):(_0x11eb3e=typeof globalThis<'u'?globalThis:_0x11eb3e||self,_0x3e13ac(_0x11eb3e[_0x3afeee(0x1b4)]={},_0x11eb3e[_0x3afeee(0x1ac)],_0x11eb3e[_0x3afeee(0x1d1)],_0x11eb3e[_0x3afeee(0x1a7)],_0x11eb3e[_0x3afeee(0x1c8)],_0x11eb3e['UniverThreadComment'],_0x11eb3e['rxjs'],_0x11eb3e[_0x3afeee(0x182)]));}(this,function(_0x1be192,_0x122ca6,_0x1662bf,_0x327e68,_0x51d297,_0x5ca066,_0x454cf7,_0x555e23){'use strict';const _0x542998=_0x296e;const _0x5f15e8='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x45144=(_0x3e5794=>(_0x3e5794[_0x3e5794[_0x542998(0x190)]=0x0]=_0x542998(0x190),_0x3e5794[_0x3e5794['Solved']=0x1]=_0x542998(0x1e0),_0x3e5794[_0x3e5794[_0x542998(0x1ba)]=-0x1]=_0x542998(0x1ba),_0x3e5794))(_0x45144||{}),_0x3b98c8=(_0x42cc59=>(_0x42cc59[_0x42cc59[_0x542998(0x16e)]=0x0]=_0x542998(0x16e),_0x42cc59[_0x42cc59[_0x542998(0x1d3)]=0x1]=_0x542998(0x1d3),_0x42cc59[_0x42cc59[_0x542998(0x199)]=0x2]=_0x542998(0x199),_0x42cc59[_0x42cc59['Edit']=0x3]=_0x542998(0x180),_0x42cc59[_0x42cc59[_0x542998(0x1bc)]=0x4]=_0x542998(0x1bc),_0x42cc59[_0x42cc59[_0x542998(0x195)]=0x5]=_0x542998(0x195),_0x42cc59[_0x42cc59[_0x542998(0x1ba)]=-0x1]=_0x542998(0x1ba),_0x42cc59))(_0x3b98c8||{});const _0x265423=_0x3a8748=>_0x327e68[_0x542998(0x1ca)](new Date(+_0x3a8748))[_0x542998(0x1d8)](_0x542998(0x17e)),_0x5938c1=async(_0x414d93,_0x15c403)=>{const _0x3e7b95=_0x542998,_0x35eb17=_0x414d93['get'](_0x327e68[_0x3e7b95(0x1a0)]),_0x1335fd=_0x414d93[_0x3e7b95(0x17f)](_0x555e23[_0x3e7b95(0x193)]);_0x15c403[_0x3e7b95(0x175)](_0x5e8af0=>{const _0x264f91=_0x3e7b95;_0x35eb17[_0x264f91(0x184)](_0x5e8af0)&&_0x15c403['delete'](_0x5e8af0);}),_0x15c403[_0x3e7b95(0x192)]&&(await _0x1335fd[_0x3e7b95(0x17f)]('/universer-api/user/list',{'params':{'userIDs':[..._0x15c403]}}))['body'][_0x3e7b95(0x1c5)][_0x3e7b95(0x175)](_0x415064=>{const _0x1e9c7a=_0x3e7b95;_0x415064&&_0x35eb17[_0x1e9c7a(0x19b)](_0x415064);});};var _0x48ac66=Object[_0x542998(0x16b)],_0x39d7c6=(_0x24bf4c,_0x4247c5,_0x83987e,_0x29471f)=>{const _0x190849=_0x542998;for(var _0x49a9e1=_0x29471f>0x1?void 0x0:_0x29471f?_0x48ac66(_0x4247c5,_0x83987e):_0x4247c5,_0x42acb3=_0x24bf4c[_0x190849(0x17c)]-0x1,_0x75d734;_0x42acb3>=0x0;_0x42acb3--)(_0x75d734=_0x24bf4c[_0x42acb3])&&(_0x49a9e1=_0x75d734(_0x49a9e1)||_0x49a9e1);return _0x49a9e1;},_0x23a466=(_0x23ae46,_0x4fcb85)=>(_0x390b73,_0x360bbe)=>_0x4fcb85(_0x390b73,_0x360bbe,_0x23ae46);let _0x4fddc2=class extends _0x327e68[_0x542998(0x19f)]{constructor(_0x2df145,_0x338b28,_0x84aee,_0x3377d3){const _0x36d213=_0x542998;super(),this['_commentService']=_0x2df145,this[_0x36d213(0x1db)]=_0x338b28,this['_userService']=_0x84aee,this[_0x36d213(0x1ae)]=_0x3377d3,this['_init'](),this[_0x36d213(0x1bb)]();}[_0x542998(0x1bb)](){const _0x4573b9=_0x542998;this[_0x4573b9(0x18b)](this[_0x4573b9(0x1db)][_0x4573b9(0x191)][_0x4573b9(0x1d5)](_0x454cf7[_0x4573b9(0x196)](0x10))[_0x4573b9(0x172)](_0x3c0048=>{const _0x51f84e=_0x4573b9,_0xadd4d3=new Set();_0x3c0048[_0x51f84e(0x175)](_0x1140cf=>{const _0x1deab7=_0x51f84e;switch(_0x1140cf[_0x1deab7(0x1d2)]){case'add':{const _0x1d4410=_0x1140cf['payload']['personId'];_0xadd4d3[_0x1deab7(0x179)](_0x1d4410);break;}}}),_0x5938c1(this[_0x51f84e(0x1ae)],_0xadd4d3);}));}['_init'](){const _0x357909=_0x542998;this['disposeWithMe'](this[_0x357909(0x1bf)][_0x357909(0x191)][_0x357909(0x172)](async _0x35ce5a=>{const _0xbc713a=_0x357909;var _0x2f3cc1,_0x26025d,_0x46d40f,_0x9b8d98;const _0x477d2d=(_0x2f3cc1=this['_threadCommentModel'][_0xbc713a(0x1b1)](_0x35ce5a[_0xbc713a(0x1dc)])[_0xbc713a(0x1c0)](_0x37067e=>_0x37067e[_0xbc713a(0x1c4)]===_0x35ce5a[_0xbc713a(0x1c4)]))==null?void 0x0:_0x2f3cc1[_0xbc713a(0x1be)];if(!_0x477d2d)return;const {unitId:_0x3b1f3a,subUnitId:_0x381d36}=_0x477d2d;switch(_0x35ce5a['user']&&this[_0xbc713a(0x18e)][_0xbc713a(0x19b)](_0x35ce5a[_0xbc713a(0x19c)]),_0x35ce5a[_0xbc713a(0x1d2)]){case _0x3b98c8[_0xbc713a(0x1d3)]:break;case _0x3b98c8['Reply']:{this[_0xbc713a(0x1db)][_0xbc713a(0x1b5)](_0x3b1f3a,_0x381d36,{'unitId':_0x3b1f3a,'subUnitId':_0x381d36,'ref':'','id':_0x35ce5a[_0xbc713a(0x174)],'dT':_0x265423(+_0x35ce5a[_0xbc713a(0x1d7)]),'threadId':_0x35ce5a[_0xbc713a(0x1c4)],'personId':(_0x46d40f=(_0x26025d=_0x35ce5a[_0xbc713a(0x19c)])==null?void 0x0:_0x26025d[_0xbc713a(0x1a8)])!=null?_0x46d40f:_0x35ce5a['userId'],'text':JSON[_0xbc713a(0x1b9)](_0x35ce5a[_0xbc713a(0x17a)]),'parentId':_0x477d2d['id']});break;}case _0x3b98c8['Delete']:{const _0x1a4e94=this[_0xbc713a(0x1db)][_0xbc713a(0x168)](_0x3b1f3a,_0x381d36,_0x35ce5a['replyId']);_0x1a4e94&&_0x1a4e94[_0xbc713a(0x187)]&&this[_0xbc713a(0x1db)]['deleteComment'](_0x3b1f3a,_0x381d36,_0x35ce5a[_0xbc713a(0x174)]);break;}case _0x3b98c8['Edit']:{this['_threadCommentModel'][_0xbc713a(0x178)](_0x3b1f3a,_0x381d36,{'commentId':_0x35ce5a[_0xbc713a(0x174)],'text':JSON[_0xbc713a(0x1b9)](_0x35ce5a[_0xbc713a(0x17a)])});break;}case _0x3b98c8[_0xbc713a(0x195)]:{const _0x40b1eb=(_0x9b8d98=this[_0xbc713a(0x1db)][_0xbc713a(0x1b1)](_0x35ce5a['unitId'])[_0xbc713a(0x1c0)](_0x3f9703=>_0x3f9703[_0xbc713a(0x1c4)]===_0x35ce5a['threadId']))==null?void 0x0:_0x9b8d98[_0xbc713a(0x1be)];_0x40b1eb&&this['_threadCommentModel'][_0xbc713a(0x1a3)](_0x3b1f3a,_0x381d36,_0x40b1eb['id'],_0x35ce5a['solved']===_0x45144[_0xbc713a(0x1e0)]);break;}}}));}};_0x4fddc2=_0x39d7c6([_0x23a466(0x0,_0x327e68['Inject'](_0x122ca6['CommentService'])),_0x23a466(0x1,_0x327e68['Inject'](_0x5ca066[_0x542998(0x165)])),_0x23a466(0x2,_0x327e68[_0x542998(0x183)](_0x327e68[_0x542998(0x1a0)])),_0x23a466(0x3,_0x327e68[_0x542998(0x183)](_0x327e68['Injector']))],_0x4fddc2);const _0x2131b9=_0x542998(0x1cb),_0x5ebf10={};var _0xc0c187=Object[_0x542998(0x16b)],_0x110c54=(_0xb09ccb,_0x2da39d,_0x1e180b,_0x2a1f16)=>{const _0x1336c9=_0x542998;for(var _0x334584=_0x2a1f16>0x1?void 0x0:_0x2a1f16?_0xc0c187(_0x2da39d,_0x1e180b):_0x2da39d,_0x2c710d=_0xb09ccb[_0x1336c9(0x17c)]-0x1,_0x284f93;_0x2c710d>=0x0;_0x2c710d--)(_0x284f93=_0xb09ccb[_0x2c710d])&&(_0x334584=_0x284f93(_0x334584)||_0x334584);return _0x334584;},_0x5cb78e=(_0x41ee6f,_0x4840b7)=>(_0xdc7dbd,_0x1597c5)=>_0x4840b7(_0xdc7dbd,_0x1597c5,_0x41ee6f);function _0xfaf8c5(_0x37d33d,_0x28d5cf){const _0x3dbfe3=_0x542998,_0x129fbe=_0x37d33d['replies'][0x0];return{..._0x28d5cf,'id':_0x129fbe[_0x3dbfe3(0x174)],'resolved':_0x37d33d[_0x3dbfe3(0x171)]===0x1,'dT':_0x265423(_0x129fbe[_0x3dbfe3(0x1d7)]),'personId':_0x129fbe['userId'],'threadId':_0x129fbe[_0x3dbfe3(0x1c4)]};}function _0x32399e(_0x448255,_0x4332d3,_0x12188e){const _0x1a657a=_0x542998;var _0x2035d5,_0x53cf7b;if(((_0x53cf7b=(_0x2035d5=_0x448255==null?void 0x0:_0x448255[_0x1a657a(0x1df)])==null?void 0x0:_0x2035d5[_0x1a657a(0x17c)])!=null?_0x53cf7b:0x0)>0x0){const _0x3217de=(_0x37bbaa,_0x306200)=>({'id':_0x37bbaa[_0x1a657a(0x174)],'threadId':_0x37bbaa[_0x1a657a(0x1c4)],'dT':_0x265423(_0x37bbaa[_0x1a657a(0x1d7)]),'personId':_0x37bbaa[_0x1a657a(0x1d4)],'resolved':_0x448255['solved']===_0x45144[_0x1a657a(0x1e0)],'unitId':_0x4332d3,'subUnitId':_0x12188e,'text':JSON[_0x1a657a(0x1b9)](_0x37bbaa[_0x1a657a(0x17a)]),'parentId':_0x306200}),_0x204038=_0x3217de(_0x448255['replies'][0x0]);return{..._0x204038,'children':_0x448255[_0x1a657a(0x1df)][_0x1a657a(0x1ad)](0x1)['map'](_0xa3c506=>_0x3217de(_0xa3c506,_0x204038['id']))};}return null;}let _0x2f1f5d=class{constructor(_0x2b2d86,_0x173476,_0x338d37,_0x22ce25){const _0x27787d=_0x542998;this[_0x27787d(0x163)]=_0x2b2d86,this[_0x27787d(0x18e)]=_0x173476,this[_0x27787d(0x19d)]=_0x338d37,this['_injector']=_0x22ce25;}async['addComment'](_0xe177fc){const _0x388a42=_0x542998;var _0xea8184,_0x1e3a35;const {parentId:_0x1af885,unitId:_0x25f6d3,text:_0x7b2c95,threadId:_0x46b19b}=_0xe177fc,_0x5c170b=(_0x1e3a35=(_0xea8184=_0x7b2c95[_0x388a42(0x16a)])==null?void 0x0:_0xea8184[_0x388a42(0x18a)](_0x5f07ca=>_0x5f07ca[_0x388a42(0x1de)]===_0x327e68['CustomRangeType']['COMMENT'])[_0x388a42(0x1b6)](_0x311eec=>_0x311eec[_0x388a42(0x161)]))!=null?_0x1e3a35:[],_0x560396=JSON[_0x388a42(0x19e)](_0x7b2c95),_0x1aea31=(await this[_0x388a42(0x19d)][_0x388a42(0x1af)](_0x25f6d3))[_0x388a42(0x188)]();if(_0x1af885){const _0x38e4ed={'memberId':_0x1aea31,'unitId':_0x25f6d3,'content':_0x560396,'mention':_0x5c170b,'threadId':_0x46b19b},_0xa3b14a=(await this[_0x388a42(0x163)]['post']('/universer-api/comment/unit/'+_0x25f6d3+'/reply',{'body':_0x38e4ed}))[_0x388a42(0x17d)][_0x388a42(0x1c2)];return{..._0xe177fc,'id':_0xa3b14a[_0x388a42(0x174)],'dT':_0x327e68[_0x388a42(0x1ca)](+_0xa3b14a[_0x388a42(0x1d7)])[_0x388a42(0x1d8)](_0x388a42(0x17e)),'personId':_0xa3b14a[_0x388a42(0x1d4)]};}else{const _0x288a07={'memberId':_0x1aea31,'unitId':_0x25f6d3,'content':_0x560396,'mention':_0x5c170b},_0x5b47ad=await this[_0x388a42(0x163)]['post'](_0x388a42(0x16d)+_0x25f6d3+_0x388a42(0x173),{'body':_0x288a07});return _0xfaf8c5(_0x5b47ad[_0x388a42(0x17d)]['comment'],_0xe177fc);}}async['updateComment'](_0x163eec){const _0x198991=_0x542998;var _0x4f0916,_0x139af0;const {text:_0xa3b9c6,unitId:_0xd43ec5}=_0x163eec,_0x1e0eda=(_0x139af0=(_0x4f0916=_0xa3b9c6[_0x198991(0x16a)])==null?void 0x0:_0x4f0916['filter'](_0x228b39=>_0x228b39[_0x198991(0x1de)]===_0x327e68['CustomRangeType']['COMMENT'])['map'](_0x3877ba=>_0x3877ba['rangeId']))!=null?_0x139af0:[],_0x482065=JSON[_0x198991(0x19e)](_0xa3b9c6),_0x5b990f=_0x163eec[_0x198991(0x1c4)],_0x3466c8=_0x163eec['id'],_0xff7332={'memberId':(await this[_0x198991(0x19d)][_0x198991(0x1af)](_0xd43ec5))['getMemberID'](),'unitId':_0xd43ec5,'threadId':_0x5b990f,'mention':_0x1e0eda,'content':_0x482065,'replyId':_0x3466c8},_0x1f696e=await this['_httpService']['post']('/universer-api/comment/unit/'+_0xd43ec5+'/edit',{'body':_0xff7332});return!_0x1f696e[_0x198991(0x17d)][_0x198991(0x1b7)]||_0x1f696e[_0x198991(0x17d)][_0x198991(0x1b7)][_0x198991(0x176)]===0x1;}async[_0x542998(0x1a3)](_0x52e0e0){const _0x4b4d37=_0x542998,{unitId:_0x5e2b21}=_0x52e0e0,_0x436ad6=_0x52e0e0['threadId'],_0x10c36f={'memberId':this[_0x4b4d37(0x18e)][_0x4b4d37(0x1b8)]()[_0x4b4d37(0x1a8)],'unitId':_0x5e2b21,'threadId':_0x436ad6,'solved':_0x52e0e0['resolved']?_0x45144[_0x4b4d37(0x1e0)]:_0x45144[_0x4b4d37(0x190)]},_0x2cf535=await this[_0x4b4d37(0x163)][_0x4b4d37(0x1a6)](_0x4b4d37(0x16d)+_0x5e2b21+_0x4b4d37(0x181),{'body':_0x10c36f});return!_0x2cf535[_0x4b4d37(0x17d)][_0x4b4d37(0x1b7)]||_0x2cf535[_0x4b4d37(0x17d)][_0x4b4d37(0x1b7)][_0x4b4d37(0x176)]===0x1;}async['deleteComment'](_0x113d09,_0x4c0177,_0x27828c,_0x192149){const _0x52003d=_0x542998,_0x37b9a3={'memberId':(await this[_0x52003d(0x19d)][_0x52003d(0x1af)](_0x113d09))['getMemberID'](),'threadId':_0x27828c,'replyId':_0x192149,'unitId':_0x113d09},_0x3ae68c=await this[_0x52003d(0x163)][_0x52003d(0x1a6)]('/universer-api/comment/unit/'+_0x113d09+'/delete',{'body':_0x37b9a3});return!_0x3ae68c['body'][_0x52003d(0x1b7)]||_0x3ae68c[_0x52003d(0x17d)]['error'][_0x52003d(0x176)]===0x1;}async[_0x542998(0x18d)](_0x5833e0,_0x26918c,_0x7e744a){const _0x1259a2=_0x542998,_0x46f268={'unitId':_0x5833e0,'threadId':_0x7e744a},_0x1b19f4=await this[_0x1259a2(0x163)][_0x1259a2(0x1a6)](_0x1259a2(0x16d)+_0x5833e0+_0x1259a2(0x1aa),{'body':_0x46f268}),_0xe4a7dd=_0x7e744a['map'](_0x173af6=>_0x32399e(_0x1b19f4[_0x1259a2(0x17d)]['comments'][_0x173af6],_0x5833e0,_0x26918c))[_0x1259a2(0x18a)](Boolean);return Object[_0x1259a2(0x18c)](_0x1b19f4['body']['users'])['forEach'](_0x41b001=>{const _0x52ec2e=_0x1259a2;this['_userService'][_0x52ec2e(0x19b)](_0x41b001);}),_0xe4a7dd;}[_0x542998(0x1ab)](_0x219377){const _0x4a839b=_0x542998;return{'id':_0x219377['id'],'threadId':_0x219377['threadId'],'ref':_0x219377[_0x4a839b(0x16f)]};}};_0x2f1f5d=_0x110c54([_0x5cb78e(0x0,_0x327e68[_0x542998(0x183)](_0x555e23[_0x542998(0x193)])),_0x5cb78e(0x1,_0x327e68['Inject'](_0x327e68['UserManagerService'])),_0x5cb78e(0x2,_0x327e68[_0x542998(0x183)](_0x122ca6[_0x542998(0x1d9)])),_0x5cb78e(0x3,_0x327e68[_0x542998(0x183)](_0x327e68[_0x542998(0x1a4)]))],_0x2f1f5d);var _0x4abc6c=Object[_0x542998(0x16b)],_0x1e343c=(_0xc55116,_0x374047,_0x178d8d,_0x5884bf)=>{const _0x5d0900=_0x542998;for(var _0xeddeb4=_0x5884bf>0x1?void 0x0:_0x5884bf?_0x4abc6c(_0x374047,_0x178d8d):_0x374047,_0x2a54b4=_0xc55116[_0x5d0900(0x17c)]-0x1,_0x498758;_0x2a54b4>=0x0;_0x2a54b4--)(_0x498758=_0xc55116[_0x2a54b4])&&(_0xeddeb4=_0x498758(_0xeddeb4)||_0xeddeb4);return _0xeddeb4;},_0x45cf08=(_0x1595f5,_0x13b866)=>(_0x6a0b3e,_0x1cf3e2)=>_0x13b866(_0x6a0b3e,_0x1cf3e2,_0x1595f5);let _0x1a21cd=class extends _0x327e68[_0x542998(0x19f)]{constructor(_0x9c1652,_0x4aa572){const _0x1770cb=_0x542998;super(),this['_threadCommentDataSourceService']=_0x9c1652,this[_0x1770cb(0x1cd)]=_0x4aa572,this['_initDataSource']();}[_0x542998(0x185)](){const _0x1c8dba=_0x542998;this[_0x1c8dba(0x1a9)][_0x1c8dba(0x170)]=this[_0x1c8dba(0x1cd)],this[_0x1c8dba(0x1a9)][_0x1c8dba(0x1d6)]=!0x1;}};_0x1a21cd=_0x1e343c([_0x45cf08(0x0,_0x5ca066[_0x542998(0x1c6)]),_0x45cf08(0x1,_0x327e68['Inject'](_0x2f1f5d))],_0x1a21cd);var _0x970ffe=Object[_0x542998(0x1cc)],_0x1babb7=Object[_0x542998(0x16b)],_0x5770d7=(_0x10f72d,_0x4f9fa8,_0x523104)=>_0x4f9fa8 in _0x10f72d?_0x970ffe(_0x10f72d,_0x4f9fa8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x523104}):_0x10f72d[_0x4f9fa8]=_0x523104,_0x15b045=(_0x5972ca,_0x1c82c3,_0x222997,_0x259707)=>{const _0x1e56b3=_0x542998;for(var _0xef5c35=_0x259707>0x1?void 0x0:_0x259707?_0x1babb7(_0x1c82c3,_0x222997):_0x1c82c3,_0x232e15=_0x5972ca[_0x1e56b3(0x17c)]-0x1,_0x510f0b;_0x232e15>=0x0;_0x232e15--)(_0x510f0b=_0x5972ca[_0x232e15])&&(_0xef5c35=_0x510f0b(_0xef5c35)||_0xef5c35);return _0xef5c35;},_0x30d85d=(_0x3239ee,_0x5d99c2)=>(_0x432cad,_0x54728a)=>_0x5d99c2(_0x432cad,_0x54728a,_0x3239ee),_0x80ba86=(_0x836921,_0x4d0245,_0x246af9)=>_0x5770d7(_0x836921,typeof _0x4d0245!='symbol'?_0x4d0245+'':_0x4d0245,_0x246af9);_0x1be192[_0x542998(0x16c)]=class extends _0x327e68[_0x542998(0x1c7)]{constructor(_0x76f47d=_0x5ebf10,_0x4aa71b,_0x6ce721){const _0x589d28=_0x542998;super(),this['_config']=_0x76f47d,this['_injector']=_0x4aa71b,this[_0x589d28(0x169)]=_0x6ce721;const {..._0x94503d}=_0x327e68[_0x589d28(0x1ce)]({},_0x5ebf10,this[_0x589d28(0x186)]);this[_0x589d28(0x169)][_0x589d28(0x164)](_0x2131b9,_0x94503d);}[_0x542998(0x1bd)](){[[_0x2f1f5d],[_0x1a21cd],[_0x4fddc2]]['forEach'](_0x395d3f=>{const _0x19b598=_0x296e;this[_0x19b598(0x1ae)][_0x19b598(0x179)](_0x395d3f);});}[_0x542998(0x1dd)](){const _0x16f704=_0x542998;this[_0x16f704(0x1ae)][_0x16f704(0x17f)](_0x1a21cd),this[_0x16f704(0x1ae)][_0x16f704(0x17f)](_0x4fddc2);}},_0x80ba86(_0x1be192[_0x542998(0x16c)],'pluginName',_0x5f15e8),_0x80ba86(_0x1be192[_0x542998(0x16c)],'type',_0x327e68[_0x542998(0x19a)][_0x542998(0x1c1)]),_0x1be192[_0x542998(0x16c)]=_0x15b045([_0x327e68['DependentOn'](_0x51d297[_0x542998(0x194)],_0x122ca6[_0x542998(0x17b)],_0x1662bf['UniverLicensePlugin']),_0x30d85d(0x1,_0x327e68[_0x542998(0x183)](_0x327e68[_0x542998(0x1a4)])),_0x30d85d(0x2,_0x327e68[_0x542998(0x1c3)])],_0x1be192[_0x542998(0x16c)]),Object[_0x542998(0x1cc)](_0x1be192,Symbol['toStringTag'],{'value':_0x542998(0x1b2)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.8.3-nightly.
|
|
3
|
+
"version": "0.8.3-nightly.202507021607",
|
|
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.8.3-nightly.
|
|
49
|
-
"@univerjs
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/thread-comment": "0.8.3-nightly.202507011607",
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.8.3-nightly.202507021607",
|
|
49
|
+
"@univerjs/network": "0.8.3-nightly.202507021607",
|
|
50
|
+
"@univerjs/core": "0.8.3-nightly.202507021607",
|
|
51
|
+
"@univerjs-pro/license": "0.8.3-nightly.202507021607",
|
|
53
52
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.8.3-nightly.
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.8.3-nightly.202507021607",
|
|
54
|
+
"@univerjs/thread-comment": "0.8.3-nightly.202507021607"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|