@univerjs-pro/thread-comment-datasource 0.15.0-insiders.20260106-79b11f9 → 0.15.0-insiders.20260107-3441c7a
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 _0x490bf3=_0x340a;function _0x340a(_0x483ae0,_0x1dd40c){_0x483ae0=_0x483ae0-0x131;const _0xfd9d8d=_0xfd9d();let _0x340a21=_0xfd9d8d[_0x483ae0];return _0x340a21;}(function(_0x256f54,_0x36c615){const _0x177f0d=_0x340a,_0x339d18=_0x256f54();while(!![]){try{const _0x4e7fee=parseInt(_0x177f0d(0x166))/0x1+parseInt(_0x177f0d(0x13e))/0x2*(-parseInt(_0x177f0d(0x150))/0x3)+-parseInt(_0x177f0d(0x182))/0x4+parseInt(_0x177f0d(0x18d))/0x5+-parseInt(_0x177f0d(0x153))/0x6+-parseInt(_0x177f0d(0x142))/0x7+-parseInt(_0x177f0d(0x17d))/0x8*(-parseInt(_0x177f0d(0x1a6))/0x9);if(_0x4e7fee===_0x36c615)break;else _0x339d18['push'](_0x339d18['shift']());}catch(_0x1effd7){_0x339d18['push'](_0x339d18['shift']());}}}(_0xfd9d,0xb47c8));Object[_0x490bf3(0x179)](exports,Symbol[_0x490bf3(0x140)],{'value':_0x490bf3(0x168)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x490bf3(0x136);var I=(_0x318737=>(_0x318737[_0x318737[_0x490bf3(0x16a)]=0x0]=_0x490bf3(0x16a),_0x318737[_0x318737[_0x490bf3(0x138)]=0x1]=_0x490bf3(0x138),_0x318737[_0x318737['UNRECOGNIZED']=-0x1]=_0x490bf3(0x13d),_0x318737))(I||{}),v=(_0x577594=>(_0x577594[_0x577594[_0x490bf3(0x169)]=0x0]=_0x490bf3(0x169),_0x577594[_0x577594[_0x490bf3(0x15e)]=0x1]='Add',_0x577594[_0x577594[_0x490bf3(0x13c)]=0x2]=_0x490bf3(0x13c),_0x577594[_0x577594[_0x490bf3(0x1a1)]=0x3]='Edit',_0x577594[_0x577594['Delete']=0x4]=_0x490bf3(0x18b),_0x577594[_0x577594['Solve']=0x5]='Solve',_0x577594[_0x577594['UNRECOGNIZED']=-0x1]=_0x490bf3(0x13d),_0x577594))(v||{});function _0xfd9d(){const _0x458331=['Inject','disposeWithMe','_commentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','setConfig','Solved','length','_threadCommentModel','post','Reply','UNRECOGNIZED','511148wVBHVm','Solve','toStringTag','thread-comment-data-source.config','21203XSfjga','replies','slice','_config','/edit','find','requireSession','values','resolveComment','COMMENT','content','resolved','body','customRanges','3BcPYEz','Injector','CollaborationSessionService','3945684kGzqjy','onStarting','filter','_initDataSource','UNIVER_UNKNOWN','YYYY/MM/DD\x20HH:mm','commentUpdate$','error','user','createTimestamp','_httpService','Add','replyId','getUser','unitId','reply','_userService','comment','_injector','1058715MJENlw','get','Module','Unknown','OpenOrReOpen','add','getComment','dataSource','syncUpdateMutationToColla','CommentService','delete','DependentOn','ref','/list','getMemberID','UniverLicensePlugin','getUnit','userId','HTTPService','defineProperty','symbol','bufferTime','subscribe','7056072KXperW','UniverCollaborationClientPlugin','Disposable','/universer-api/user/list','_sessionService','5840396mqRTqi','ThreadCommentModel','payload','forEach','threadId','addUser','solved','_threadCommentDataSource','rangeId','Delete','users','5874320ejhsxM','UniverInstanceType','_threadCommentDataSourceService','personId','map','pluginName','code','format','addComment','pipe','type','_initUserSync','root','/universer-api/comment/unit/','/add','deleteComment','IConfigService','stringify','userID','merge','Edit','parse','UniverThreadCommentUIPlugin','getCurrentUser','_configService','9bTkOEu','UniverThreadCommentDataSourcePlugin','CustomRangeType','rangeType','/delete','getOwnPropertyDescriptor','_init','dayjs','onReady'];_0xfd9d=function(){return _0x458331;};return _0xfd9d();}const f=_0xa993d2=>c[_0x490bf3(0x131)](new Date(+_0xa993d2))[_0x490bf3(0x194)](_0x490bf3(0x158)),R=async(_0x23a129,_0x2a585a)=>{const _0x1e9b40=_0x490bf3,_0x495c5d=_0x23a129['get'](c['UserManagerService']),_0x283e82=_0x23a129['get'](P[_0x1e9b40(0x178)]);_0x2a585a[_0x1e9b40(0x185)](_0x4630d5=>{const _0x594da2=_0x1e9b40;_0x495c5d[_0x594da2(0x160)](_0x4630d5)&&_0x2a585a[_0x594da2(0x170)](_0x4630d5);}),_0x2a585a['size']&&(await _0x283e82[_0x1e9b40(0x167)](_0x1e9b40(0x180),{'params':{'userIDs':[..._0x2a585a]}}))[_0x1e9b40(0x14e)][_0x1e9b40(0x18c)][_0x1e9b40(0x185)](_0x33c13c=>{const _0x58369e=_0x1e9b40;_0x33c13c&&_0x495c5d[_0x58369e(0x187)](_0x33c13c);});};var $=Object[_0x490bf3(0x1ab)],E=(_0x34869a,_0x152c12,_0x3fcc0e,_0x2a826e)=>{const _0x226fbb=_0x490bf3;for(var _0x224121=_0x2a826e>0x1?void 0x0:_0x2a826e?$(_0x152c12,_0x3fcc0e):_0x152c12,_0x3da877=_0x34869a[_0x226fbb(0x139)]-0x1,_0x229124;_0x3da877>=0x0;_0x3da877--)(_0x229124=_0x34869a[_0x3da877])&&(_0x224121=_0x229124(_0x224121)||_0x224121);return _0x224121;},S=(_0x6cec02,_0x2fa9b1)=>(_0x1991db,_0x3ef992)=>_0x2fa9b1(_0x1991db,_0x3ef992,_0x6cec02);let _=class extends c[_0x490bf3(0x17f)]{constructor(_0x7a9083,_0x76f598,_0x27bfc3,_0x2bc52d){const _0x2a1681=_0x490bf3;super(),this[_0x2a1681(0x135)]=_0x7a9083,this['_threadCommentModel']=_0x76f598,this[_0x2a1681(0x163)]=_0x27bfc3,this[_0x2a1681(0x165)]=_0x2bc52d,this[_0x2a1681(0x1ac)](),this[_0x2a1681(0x198)]();}[_0x490bf3(0x198)](){const _0x2e71b8=_0x490bf3;this['disposeWithMe'](this[_0x2e71b8(0x13a)][_0x2e71b8(0x159)][_0x2e71b8(0x196)](j[_0x2e71b8(0x17b)](0x10))[_0x2e71b8(0x17c)](_0x59a7fc=>{const _0x5793ca=_0x2e71b8,_0x179c4c=new Set();_0x59a7fc['forEach'](_0xf2d7b7=>{const _0x1f97db=_0x340a;if(_0xf2d7b7[_0x1f97db(0x197)]===_0x1f97db(0x16b)){const _0xd91582=_0xf2d7b7[_0x1f97db(0x184)][_0x1f97db(0x190)];_0x179c4c['add'](_0xd91582);}}),R(this[_0x5793ca(0x165)],_0x179c4c);}));}['_init'](){const _0x46db6e=_0x490bf3;this[_0x46db6e(0x134)](this[_0x46db6e(0x135)][_0x46db6e(0x159)][_0x46db6e(0x17c)](async _0x2ecb69=>{const _0x3a3ec4=_0x46db6e;var _0x1a6a5c,_0x173f1a,_0x5e0f0d,_0x3fab7f;const _0x163aa4=(_0x1a6a5c=this[_0x3a3ec4(0x13a)]['getUnit'](_0x2ecb69[_0x3a3ec4(0x161)])[_0x3a3ec4(0x147)](_0x4baab6=>_0x4baab6[_0x3a3ec4(0x186)]===_0x2ecb69[_0x3a3ec4(0x186)]))==null?void 0x0:_0x1a6a5c[_0x3a3ec4(0x199)];if(!_0x163aa4)return;const {unitId:_0x5bf306,subUnitId:_0x18f5fe}=_0x163aa4;switch(_0x2ecb69[_0x3a3ec4(0x15b)]&&this[_0x3a3ec4(0x163)]['addUser'](_0x2ecb69['user']),_0x2ecb69[_0x3a3ec4(0x197)]){case v[_0x3a3ec4(0x15e)]:break;case v[_0x3a3ec4(0x13c)]:{this[_0x3a3ec4(0x13a)][_0x3a3ec4(0x195)](_0x5bf306,_0x18f5fe,{'unitId':_0x5bf306,'subUnitId':_0x18f5fe,'ref':'','id':_0x2ecb69[_0x3a3ec4(0x15f)],'dT':f(+_0x2ecb69[_0x3a3ec4(0x15c)]),'threadId':_0x2ecb69['threadId'],'personId':(_0x5e0f0d=(_0x173f1a=_0x2ecb69[_0x3a3ec4(0x15b)])==null?void 0x0:_0x173f1a[_0x3a3ec4(0x19f)])!=null?_0x5e0f0d:_0x2ecb69[_0x3a3ec4(0x177)],'text':JSON[_0x3a3ec4(0x1a2)](_0x2ecb69[_0x3a3ec4(0x14c)]),'parentId':_0x163aa4['id']});break;}case v['Delete']:{const _0x73b6a9=this[_0x3a3ec4(0x13a)][_0x3a3ec4(0x16c)](_0x5bf306,_0x18f5fe,_0x2ecb69['replyId']);_0x73b6a9&&_0x73b6a9['parentId']&&this[_0x3a3ec4(0x13a)][_0x3a3ec4(0x19c)](_0x5bf306,_0x18f5fe,_0x2ecb69[_0x3a3ec4(0x15f)]);break;}case v[_0x3a3ec4(0x1a1)]:{this[_0x3a3ec4(0x13a)]['updateComment'](_0x5bf306,_0x18f5fe,{'commentId':_0x2ecb69[_0x3a3ec4(0x15f)],'text':JSON[_0x3a3ec4(0x1a2)](_0x2ecb69[_0x3a3ec4(0x14c)])});break;}case v[_0x3a3ec4(0x13f)]:{const _0x1b1103=(_0x3fab7f=this[_0x3a3ec4(0x13a)][_0x3a3ec4(0x176)](_0x2ecb69[_0x3a3ec4(0x161)])[_0x3a3ec4(0x147)](_0x415622=>_0x415622['threadId']===_0x2ecb69['threadId']))==null?void 0x0:_0x3fab7f[_0x3a3ec4(0x199)];_0x1b1103&&this['_threadCommentModel']['resolveComment'](_0x5bf306,_0x18f5fe,_0x1b1103['id'],_0x2ecb69['solved']===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x490bf3(0x133)](b[_0x490bf3(0x16f)])),S(0x1,c[_0x490bf3(0x133)](M[_0x490bf3(0x183)])),S(0x2,c['Inject'](c['UserManagerService'])),S(0x3,c[_0x490bf3(0x133)](c[_0x490bf3(0x151)]))],_);const q=_0x490bf3(0x141),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x897f50,_0x316e8f,_0x2a53de,_0x5c9af9)=>{const _0x1c1a0b=_0x490bf3;for(var _0x45a3c6=_0x5c9af9>0x1?void 0x0:_0x5c9af9?A(_0x316e8f,_0x2a53de):_0x316e8f,_0x336113=_0x897f50[_0x1c1a0b(0x139)]-0x1,_0x1b20e7;_0x336113>=0x0;_0x336113--)(_0x1b20e7=_0x897f50[_0x336113])&&(_0x45a3c6=_0x1b20e7(_0x45a3c6)||_0x45a3c6);return _0x45a3c6;},C=(_0x26be76,_0x6c6374)=>(_0xc72fb5,_0x4dc27d)=>_0x6c6374(_0xc72fb5,_0x4dc27d,_0x26be76);function Y(_0x4cecdf,_0x316c4a){const _0x23f83f=_0x490bf3,_0x5cc2e9=_0x4cecdf['replies'][0x0];return{..._0x316c4a,'id':_0x5cc2e9[_0x23f83f(0x15f)],'resolved':_0x4cecdf[_0x23f83f(0x188)]===0x1,'dT':f(_0x5cc2e9[_0x23f83f(0x15c)]),'personId':_0x5cc2e9[_0x23f83f(0x177)],'threadId':_0x5cc2e9[_0x23f83f(0x186)]};}function G(_0x457cb1,_0x298fde,_0x6579f6){const _0x328a37=_0x490bf3;var _0xc9debc,_0x4c15d3;if(((_0x4c15d3=(_0xc9debc=_0x457cb1==null?void 0x0:_0x457cb1[_0x328a37(0x143)])==null?void 0x0:_0xc9debc[_0x328a37(0x139)])!=null?_0x4c15d3:0x0)>0x0){const _0x1095a9=(_0x3210e1,_0x2b293f)=>({'id':_0x3210e1['replyId'],'threadId':_0x3210e1[_0x328a37(0x186)],'dT':f(_0x3210e1[_0x328a37(0x15c)]),'personId':_0x3210e1[_0x328a37(0x177)],'resolved':_0x457cb1[_0x328a37(0x188)]===I['Solved'],'unitId':_0x298fde,'subUnitId':_0x6579f6,'text':JSON[_0x328a37(0x1a2)](_0x3210e1[_0x328a37(0x14c)]),'parentId':_0x2b293f}),_0x35c2b2=_0x1095a9(_0x457cb1[_0x328a37(0x143)][0x0]);return{..._0x35c2b2,'children':_0x457cb1['replies'][_0x328a37(0x144)](0x1)[_0x328a37(0x191)](_0x41d6fb=>_0x1095a9(_0x41d6fb,_0x35c2b2['id']))};}return null;}let p=class{constructor(_0x3a37db,_0x12cd94,_0x3bc7e4){const _0x4b3446=_0x490bf3;this[_0x4b3446(0x15d)]=_0x3a37db,this['_userService']=_0x12cd94,this[_0x4b3446(0x181)]=_0x3bc7e4;}async['addComment'](_0x5234df){const _0xbd8121=_0x490bf3;var _0x42620f,_0x23062d;const {parentId:_0x1e4ccf,unitId:_0x3c492e,text:_0x2ff610,threadId:_0x401e93}=_0x5234df,_0x2f080e=(_0x23062d=(_0x42620f=_0x2ff610[_0xbd8121(0x14f)])==null?void 0x0:_0x42620f[_0xbd8121(0x155)](_0x156a25=>_0x156a25['rangeType']===c[_0xbd8121(0x1a8)][_0xbd8121(0x14b)])[_0xbd8121(0x191)](_0x483abd=>_0x483abd[_0xbd8121(0x18a)]))!=null?_0x23062d:[],_0x2718eb=JSON[_0xbd8121(0x19e)](_0x2ff610),_0x6fcd92=(await this['_sessionService']['requireSession'](_0x3c492e))['getMemberID']();if(_0x1e4ccf){const _0x348535={'memberId':_0x6fcd92,'unitId':_0x3c492e,'content':_0x2718eb,'mention':_0x2f080e,'threadId':_0x401e93},_0x42501d=(await this[_0xbd8121(0x15d)][_0xbd8121(0x13b)](_0xbd8121(0x19a)+_0x3c492e+'/reply',{'body':_0x348535}))['body'][_0xbd8121(0x162)];return{..._0x5234df,'id':_0x42501d['replyId'],'dT':c[_0xbd8121(0x131)](+_0x42501d[_0xbd8121(0x15c)])[_0xbd8121(0x194)](_0xbd8121(0x158)),'personId':_0x42501d['userId']};}else{const _0x280a08={'memberId':_0x6fcd92,'unitId':_0x3c492e,'content':_0x2718eb,'mention':_0x2f080e},_0x562084=await this[_0xbd8121(0x15d)][_0xbd8121(0x13b)](_0xbd8121(0x19a)+_0x3c492e+_0xbd8121(0x19b),{'body':_0x280a08});return Y(_0x562084['body'][_0xbd8121(0x164)],_0x5234df);}}async['updateComment'](_0x160f0d){const _0x2ec0da=_0x490bf3;var _0x5666d9,_0x2cc852;const {text:_0xdba490,unitId:_0x161b16}=_0x160f0d,_0x11c674=(_0x2cc852=(_0x5666d9=_0xdba490[_0x2ec0da(0x14f)])==null?void 0x0:_0x5666d9[_0x2ec0da(0x155)](_0x59350f=>_0x59350f[_0x2ec0da(0x1a9)]===c[_0x2ec0da(0x1a8)][_0x2ec0da(0x14b)])[_0x2ec0da(0x191)](_0x1654e5=>_0x1654e5[_0x2ec0da(0x18a)]))!=null?_0x2cc852:[],_0x548fb4=JSON[_0x2ec0da(0x19e)](_0xdba490),_0xdb0f89=_0x160f0d[_0x2ec0da(0x186)],_0x57df65=_0x160f0d['id'],_0x395e43={'memberId':(await this[_0x2ec0da(0x181)]['requireSession'](_0x161b16))[_0x2ec0da(0x174)](),'unitId':_0x161b16,'threadId':_0xdb0f89,'mention':_0x11c674,'content':_0x548fb4,'replyId':_0x57df65},_0x180507=await this[_0x2ec0da(0x15d)][_0x2ec0da(0x13b)](_0x2ec0da(0x19a)+_0x161b16+_0x2ec0da(0x146),{'body':_0x395e43});return!_0x180507[_0x2ec0da(0x14e)]['error']||_0x180507['body'][_0x2ec0da(0x15a)][_0x2ec0da(0x193)]===0x1;}async[_0x490bf3(0x14a)](_0x329d97){const _0xa39596=_0x490bf3,{unitId:_0x366840}=_0x329d97,_0x59901d=_0x329d97['threadId'],_0x15152d={'memberId':this[_0xa39596(0x163)][_0xa39596(0x1a4)]()['userID'],'unitId':_0x366840,'threadId':_0x59901d,'solved':_0x329d97[_0xa39596(0x14d)]?I[_0xa39596(0x138)]:I['OpenOrReOpen']},_0xbeeeb0=await this[_0xa39596(0x15d)]['post']('/universer-api/comment/unit/'+_0x366840+'/solved',{'body':_0x15152d});return!_0xbeeeb0[_0xa39596(0x14e)][_0xa39596(0x15a)]||_0xbeeeb0['body'][_0xa39596(0x15a)][_0xa39596(0x193)]===0x1;}async[_0x490bf3(0x19c)](_0x5f35e2,_0x304d05,_0xdfffbe,_0x5d31eb){const _0x3fe81b=_0x490bf3,_0xe65a32={'memberId':(await this[_0x3fe81b(0x181)][_0x3fe81b(0x148)](_0x5f35e2))[_0x3fe81b(0x174)](),'threadId':_0xdfffbe,'replyId':_0x5d31eb,'unitId':_0x5f35e2},_0x43d306=await this[_0x3fe81b(0x15d)]['post']('/universer-api/comment/unit/'+_0x5f35e2+_0x3fe81b(0x1aa),{'body':_0xe65a32});return!_0x43d306['body'][_0x3fe81b(0x15a)]||_0x43d306[_0x3fe81b(0x14e)][_0x3fe81b(0x15a)][_0x3fe81b(0x193)]===0x1;}async['listComments'](_0x1e43af,_0x3678d1,_0x4abdee){const _0x529a23=_0x490bf3,_0x96859a={'unitId':_0x1e43af,'threadId':_0x4abdee},_0x426afc=await this[_0x529a23(0x15d)][_0x529a23(0x13b)](_0x529a23(0x19a)+_0x1e43af+_0x529a23(0x173),{'body':_0x96859a}),_0x1058ab=_0x4abdee[_0x529a23(0x191)](_0x3a58fb=>G(_0x426afc['body']['comments'][_0x3a58fb],_0x1e43af,_0x3678d1))[_0x529a23(0x155)](Boolean);return Object[_0x529a23(0x149)](_0x426afc[_0x529a23(0x14e)][_0x529a23(0x18c)])[_0x529a23(0x185)](_0x1956d2=>{const _0x38e302=_0x529a23;this[_0x38e302(0x163)][_0x38e302(0x187)](_0x1956d2);}),_0x1058ab;}['saveCommentToSnapshot'](_0x4fa31f){const _0x3ae513=_0x490bf3;return{'id':_0x4fa31f['id'],'threadId':_0x4fa31f['threadId'],'ref':_0x4fa31f[_0x3ae513(0x172)]};}};p=x([C(0x0,c['Inject'](P['HTTPService'])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c[_0x490bf3(0x133)](b[_0x490bf3(0x152)]))],p);var H=Object[_0x490bf3(0x1ab)],J=(_0x48e188,_0x576b2a,_0x5bd139,_0x5f0fd6)=>{const _0x3f63af=_0x490bf3;for(var _0x12a5a9=_0x5f0fd6>0x1?void 0x0:_0x5f0fd6?H(_0x576b2a,_0x5bd139):_0x576b2a,_0x1f1469=_0x48e188[_0x3f63af(0x139)]-0x1,_0x46796c;_0x1f1469>=0x0;_0x1f1469--)(_0x46796c=_0x48e188[_0x1f1469])&&(_0x12a5a9=_0x46796c(_0x12a5a9)||_0x12a5a9);return _0x12a5a9;},y=(_0x430236,_0x274343)=>(_0x541bf2,_0x286562)=>_0x274343(_0x541bf2,_0x286562,_0x430236);let g=class extends c[_0x490bf3(0x17f)]{constructor(_0x59d932,_0x902a20){const _0x496d30=_0x490bf3;super(),this['_threadCommentDataSourceService']=_0x59d932,this[_0x496d30(0x189)]=_0x902a20,this[_0x496d30(0x156)]();}['_initDataSource'](){const _0x3026f0=_0x490bf3;this[_0x3026f0(0x18f)][_0x3026f0(0x16d)]=this[_0x3026f0(0x189)],this[_0x3026f0(0x18f)][_0x3026f0(0x16e)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x490bf3(0x133)](p))],g);var F=Object['defineProperty'],L=Object[_0x490bf3(0x1ab)],Z=(_0x148c62,_0x313b9c,_0x4c5ed3)=>_0x313b9c in _0x148c62?F(_0x148c62,_0x313b9c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4c5ed3}):_0x148c62[_0x313b9c]=_0x4c5ed3,W=(_0x54300a,_0x2d322b,_0x1403b7,_0xf5ccc0)=>{for(var _0x25cd08=_0xf5ccc0>0x1?void 0x0:_0xf5ccc0?L(_0x2d322b,_0x1403b7):_0x2d322b,_0xf87bac=_0x54300a['length']-0x1,_0x4b44c4;_0xf87bac>=0x0;_0xf87bac--)(_0x4b44c4=_0x54300a[_0xf87bac])&&(_0x25cd08=_0x4b44c4(_0x25cd08)||_0x25cd08);return _0x25cd08;},O=(_0x536880,_0x284c0e)=>(_0x5960cd,_0x37d45a)=>_0x284c0e(_0x5960cd,_0x37d45a,_0x536880),N=(_0x3000ba,_0x2a81e8,_0x507168)=>Z(_0x3000ba,typeof _0x2a81e8!=_0x490bf3(0x17a)?_0x2a81e8+'':_0x2a81e8,_0x507168);exports[_0x490bf3(0x1a7)]=class extends c['Plugin']{constructor(_0x591c8f=D,_0x102092,_0x42fa98){const _0x705b86=_0x490bf3;super(),this[_0x705b86(0x145)]=_0x591c8f,this[_0x705b86(0x165)]=_0x102092,this['_configService']=_0x42fa98;const {..._0x2019b9}=c[_0x705b86(0x1a0)]({},D,this[_0x705b86(0x145)]);this[_0x705b86(0x1a5)][_0x705b86(0x137)](q,_0x2019b9);}[_0x490bf3(0x154)](){const _0x3867cf=_0x490bf3;[[p],[g],[_]][_0x3867cf(0x185)](_0x347f46=>{const _0xb28030=_0x3867cf;this['_injector'][_0xb28030(0x16b)](_0x347f46);});}[_0x490bf3(0x132)](){const _0x176727=_0x490bf3;this[_0x176727(0x165)][_0x176727(0x167)](g),this[_0x176727(0x165)][_0x176727(0x167)](_);}},N(exports[_0x490bf3(0x1a7)],_0x490bf3(0x192),U),N(exports['UniverThreadCommentDataSourcePlugin'],'type',c[_0x490bf3(0x18e)][_0x490bf3(0x157)]),exports[_0x490bf3(0x1a7)]=W([c[_0x490bf3(0x171)](w[_0x490bf3(0x1a3)],b[_0x490bf3(0x17e)],T[_0x490bf3(0x175)]),O(0x1,c[_0x490bf3(0x133)](c[_0x490bf3(0x151)])),O(0x2,c[_0x490bf3(0x19d)])],exports[_0x490bf3(0x1a7)]);
|
|
1
|
+
'use strict';function _0x3d53(){const _0x5aea27=['resolved','rangeType','type','_commentService','values','/universer-api/comment/unit/','Delete','format','_configService','subscribe','defineProperty','stringify','_threadCommentDataSource','Injector','onStarting','Disposable','UNRECOGNIZED','get','Module','/universer-api/user/list','createTimestamp','35916YrQSlg','Solve','listComments','getCurrentUser','/solved','add','_initUserSync','deleteComment','Solved','forEach','Add','dayjs','body','toStringTag','/edit','post','_init','parse','CustomRangeType','135084qmDzsd','replies','ThreadCommentModel','162Kckdvg','error','filter','personId','UserManagerService','UniverThreadCommentDataSourcePlugin','_config','Reply','disposeWithMe','Plugin','saveCommentToSnapshot','customRanges','Unknown','unitId','1iAZnQT','updateComment','_sessionService','userID','thread-comment-data-source.config','ref','resolveComment','UniverInstanceType','_initDataSource','symbol','DependentOn','replyId','423930qFYlBG','_threadCommentDataSourceService','user','3040366vEwWdD','requireSession','COMMENT','UNIVER_UNKNOWN','Inject','180efnObD','bufferTime','_threadCommentModel','threadId','content','84914eiFWDX','getMemberID','OpenOrReOpen','_injector','addUser','addComment','771650XUMmRS','pluginName','pipe','Edit','UniverLicensePlugin','setConfig','_httpService','root','getUnit','parentId','payload','userId','CollaborationSessionService','getOwnPropertyDescriptor','length','/delete','rangeId','_userService','find','commentUpdate$','YYYY/MM/DD\x20HH:mm','/add','map','solved','70120rpRTui'];_0x3d53=function(){return _0x5aea27;};return _0x3d53();}const _0x130f3d=_0x44ca;(function(_0x82a7e0,_0xa92ffe){const _0x1f3bf2=_0x44ca,_0x277588=_0x82a7e0();while(!![]){try{const _0x22a130=parseInt(_0x1f3bf2(0xf0))/0x1*(parseInt(_0x1f3bf2(0x98))/0x2)+-parseInt(_0x1f3bf2(0x8b))/0x3+-parseInt(_0x1f3bf2(0xcc))/0x4*(parseInt(_0x1f3bf2(0x93))/0x5)+-parseInt(_0x1f3bf2(0xdf))/0x6+parseInt(_0x1f3bf2(0x8e))/0x7+parseInt(_0x1f3bf2(0xb6))/0x8*(parseInt(_0x1f3bf2(0xe2))/0x9)+parseInt(_0x1f3bf2(0x9e))/0xa;if(_0x22a130===_0xa92ffe)break;else _0x277588['push'](_0x277588['shift']());}catch(_0x21ea19){_0x277588['push'](_0x277588['shift']());}}}(_0x3d53,0x36d96));Object[_0x130f3d(0xc1)](exports,Symbol[_0x130f3d(0xd9)],{'value':_0x130f3d(0xc9)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x53d79a=>(_0x53d79a[_0x53d79a[_0x130f3d(0x9a)]=0x0]=_0x130f3d(0x9a),_0x53d79a[_0x53d79a['Solved']=0x1]='Solved',_0x53d79a[_0x53d79a[_0x130f3d(0xc7)]=-0x1]=_0x130f3d(0xc7),_0x53d79a))(I||{}),v=(_0x12c017=>(_0x12c017[_0x12c017[_0x130f3d(0xee)]=0x0]='Unknown',_0x12c017[_0x12c017[_0x130f3d(0xd6)]=0x1]=_0x130f3d(0xd6),_0x12c017[_0x12c017[_0x130f3d(0xe9)]=0x2]=_0x130f3d(0xe9),_0x12c017[_0x12c017[_0x130f3d(0xa1)]=0x3]='Edit',_0x12c017[_0x12c017[_0x130f3d(0xbd)]=0x4]=_0x130f3d(0xbd),_0x12c017[_0x12c017[_0x130f3d(0xcd)]=0x5]=_0x130f3d(0xcd),_0x12c017[_0x12c017['UNRECOGNIZED']=-0x1]=_0x130f3d(0xc7),_0x12c017))(v||{});const f=_0xcb6650=>c[_0x130f3d(0xd7)](new Date(+_0xcb6650))[_0x130f3d(0xbe)](_0x130f3d(0xb2)),R=async(_0x225802,_0xcddfe3)=>{const _0x310583=_0x130f3d,_0x32318c=_0x225802['get'](c[_0x310583(0xe6)]),_0x909559=_0x225802[_0x310583(0xc8)](P['HTTPService']);_0xcddfe3[_0x310583(0xd5)](_0x52a842=>{_0x32318c['getUser'](_0x52a842)&&_0xcddfe3['delete'](_0x52a842);}),_0xcddfe3['size']&&(await _0x909559['get'](_0x310583(0xca),{'params':{'userIDs':[..._0xcddfe3]}}))['body']['users']['forEach'](_0x33358e=>{const _0x5bc904=_0x310583;_0x33358e&&_0x32318c[_0x5bc904(0x9c)](_0x33358e);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x4129f0,_0x3cfd4c,_0x58528d,_0x143ae1)=>{const _0x93241a=_0x130f3d;for(var _0x378f74=_0x143ae1>0x1?void 0x0:_0x143ae1?$(_0x3cfd4c,_0x58528d):_0x3cfd4c,_0x3bdd05=_0x4129f0[_0x93241a(0xac)]-0x1,_0x3b4965;_0x3bdd05>=0x0;_0x3bdd05--)(_0x3b4965=_0x4129f0[_0x3bdd05])&&(_0x378f74=_0x3b4965(_0x378f74)||_0x378f74);return _0x378f74;},S=(_0x19c960,_0xdfe99a)=>(_0x6c79d7,_0x5c1e30)=>_0xdfe99a(_0x6c79d7,_0x5c1e30,_0x19c960);let _=class extends c[_0x130f3d(0xc6)]{constructor(_0x4dc1cf,_0x42116d,_0x1ab2db,_0x5b8e69){const _0xc3428e=_0x130f3d;super(),this[_0xc3428e(0xba)]=_0x4dc1cf,this[_0xc3428e(0x95)]=_0x42116d,this['_userService']=_0x1ab2db,this[_0xc3428e(0x9b)]=_0x5b8e69,this[_0xc3428e(0xdc)](),this[_0xc3428e(0xd2)]();}[_0x130f3d(0xd2)](){const _0x1a384a=_0x130f3d;this[_0x1a384a(0xea)](this[_0x1a384a(0x95)][_0x1a384a(0xb1)][_0x1a384a(0xa0)](j[_0x1a384a(0x94)](0x10))[_0x1a384a(0xc0)](_0x59ab84=>{const _0x2041ee=_0x1a384a,_0x2a94ff=new Set();_0x59ab84[_0x2041ee(0xd5)](_0x2259ad=>{const _0x2b7ff0=_0x2041ee;if(_0x2259ad[_0x2b7ff0(0xb9)]===_0x2b7ff0(0xd1)){const _0x196942=_0x2259ad[_0x2b7ff0(0xa8)][_0x2b7ff0(0xe5)];_0x2a94ff[_0x2b7ff0(0xd1)](_0x196942);}}),R(this[_0x2041ee(0x9b)],_0x2a94ff);}));}[_0x130f3d(0xdc)](){const _0x252178=_0x130f3d;this['disposeWithMe'](this[_0x252178(0xba)][_0x252178(0xb1)][_0x252178(0xc0)](async _0x1640f2=>{const _0x28e9ef=_0x252178;var _0x4a4399,_0x4bd22f,_0x462043,_0x216369;const _0x88828=(_0x4a4399=this[_0x28e9ef(0x95)][_0x28e9ef(0xa6)](_0x1640f2['unitId'])[_0x28e9ef(0xb0)](_0x5cdc21=>_0x5cdc21[_0x28e9ef(0x96)]===_0x1640f2['threadId']))==null?void 0x0:_0x4a4399[_0x28e9ef(0xa5)];if(!_0x88828)return;const {unitId:_0x5dfc42,subUnitId:_0x53b980}=_0x88828;switch(_0x1640f2[_0x28e9ef(0x8d)]&&this[_0x28e9ef(0xaf)][_0x28e9ef(0x9c)](_0x1640f2[_0x28e9ef(0x8d)]),_0x1640f2[_0x28e9ef(0xb9)]){case v[_0x28e9ef(0xd6)]:break;case v[_0x28e9ef(0xe9)]:{this[_0x28e9ef(0x95)][_0x28e9ef(0x9d)](_0x5dfc42,_0x53b980,{'unitId':_0x5dfc42,'subUnitId':_0x53b980,'ref':'','id':_0x1640f2[_0x28e9ef(0x8a)],'dT':f(+_0x1640f2['createTimestamp']),'threadId':_0x1640f2['threadId'],'personId':(_0x462043=(_0x4bd22f=_0x1640f2['user'])==null?void 0x0:_0x4bd22f[_0x28e9ef(0xf3)])!=null?_0x462043:_0x1640f2['userId'],'text':JSON[_0x28e9ef(0xdd)](_0x1640f2[_0x28e9ef(0x97)]),'parentId':_0x88828['id']});break;}case v['Delete']:{const _0x574d6f=this[_0x28e9ef(0x95)]['getComment'](_0x5dfc42,_0x53b980,_0x1640f2[_0x28e9ef(0x8a)]);_0x574d6f&&_0x574d6f[_0x28e9ef(0xa7)]&&this[_0x28e9ef(0x95)][_0x28e9ef(0xd3)](_0x5dfc42,_0x53b980,_0x1640f2[_0x28e9ef(0x8a)]);break;}case v[_0x28e9ef(0xa1)]:{this[_0x28e9ef(0x95)][_0x28e9ef(0xf1)](_0x5dfc42,_0x53b980,{'commentId':_0x1640f2[_0x28e9ef(0x8a)],'text':JSON[_0x28e9ef(0xdd)](_0x1640f2['content'])});break;}case v[_0x28e9ef(0xcd)]:{const _0x2829e6=(_0x216369=this[_0x28e9ef(0x95)][_0x28e9ef(0xa6)](_0x1640f2[_0x28e9ef(0xef)])[_0x28e9ef(0xb0)](_0x4baf0d=>_0x4baf0d[_0x28e9ef(0x96)]===_0x1640f2[_0x28e9ef(0x96)]))==null?void 0x0:_0x216369['root'];_0x2829e6&&this[_0x28e9ef(0x95)][_0x28e9ef(0x85)](_0x5dfc42,_0x53b980,_0x2829e6['id'],_0x1640f2[_0x28e9ef(0xb5)]===I[_0x28e9ef(0xd4)]);break;}}}));}};_=E([S(0x0,c[_0x130f3d(0x92)](b['CommentService'])),S(0x1,c[_0x130f3d(0x92)](M[_0x130f3d(0xe1)])),S(0x2,c[_0x130f3d(0x92)](c['UserManagerService'])),S(0x3,c[_0x130f3d(0x92)](c['Injector']))],_);function _0x44ca(_0x495dbc,_0x27f845){_0x495dbc=_0x495dbc-0x84;const _0x3d531f=_0x3d53();let _0x44cabe=_0x3d531f[_0x495dbc];return _0x44cabe;}const q=_0x130f3d(0xf4),D={};var A=Object[_0x130f3d(0xab)],x=(_0x362ce1,_0xa46904,_0x5bfe71,_0x6833b6)=>{const _0x8b3e52=_0x130f3d;for(var _0x20e6e7=_0x6833b6>0x1?void 0x0:_0x6833b6?A(_0xa46904,_0x5bfe71):_0xa46904,_0x60c8b8=_0x362ce1[_0x8b3e52(0xac)]-0x1,_0x170cb5;_0x60c8b8>=0x0;_0x60c8b8--)(_0x170cb5=_0x362ce1[_0x60c8b8])&&(_0x20e6e7=_0x170cb5(_0x20e6e7)||_0x20e6e7);return _0x20e6e7;},C=(_0x40207e,_0x1032bb)=>(_0x12501e,_0x2af5d9)=>_0x1032bb(_0x12501e,_0x2af5d9,_0x40207e);function Y(_0x129b9a,_0x46ea75){const _0x3b43bc=_0x130f3d,_0x3265cc=_0x129b9a[_0x3b43bc(0xe0)][0x0];return{..._0x46ea75,'id':_0x3265cc[_0x3b43bc(0x8a)],'resolved':_0x129b9a[_0x3b43bc(0xb5)]===0x1,'dT':f(_0x3265cc['createTimestamp']),'personId':_0x3265cc[_0x3b43bc(0xa9)],'threadId':_0x3265cc[_0x3b43bc(0x96)]};}function G(_0x38fa14,_0x121658,_0x4236cd){const _0x3c0dd8=_0x130f3d;var _0x5be02a,_0x271eae;if(((_0x271eae=(_0x5be02a=_0x38fa14==null?void 0x0:_0x38fa14[_0x3c0dd8(0xe0)])==null?void 0x0:_0x5be02a[_0x3c0dd8(0xac)])!=null?_0x271eae:0x0)>0x0){const _0x1558e9=(_0x12fca9,_0x49cb93)=>({'id':_0x12fca9[_0x3c0dd8(0x8a)],'threadId':_0x12fca9['threadId'],'dT':f(_0x12fca9[_0x3c0dd8(0xcb)]),'personId':_0x12fca9[_0x3c0dd8(0xa9)],'resolved':_0x38fa14[_0x3c0dd8(0xb5)]===I['Solved'],'unitId':_0x121658,'subUnitId':_0x4236cd,'text':JSON['parse'](_0x12fca9[_0x3c0dd8(0x97)]),'parentId':_0x49cb93}),_0x427ccf=_0x1558e9(_0x38fa14[_0x3c0dd8(0xe0)][0x0]);return{..._0x427ccf,'children':_0x38fa14['replies']['slice'](0x1)[_0x3c0dd8(0xb4)](_0x5439b2=>_0x1558e9(_0x5439b2,_0x427ccf['id']))};}return null;}let p=class{constructor(_0x682874,_0x4547ec,_0x29d65b){const _0x2c1e37=_0x130f3d;this[_0x2c1e37(0xa4)]=_0x682874,this[_0x2c1e37(0xaf)]=_0x4547ec,this[_0x2c1e37(0xf2)]=_0x29d65b;}async[_0x130f3d(0x9d)](_0x12be05){const _0xc6533c=_0x130f3d;var _0x339dc3,_0x413b7a;const {parentId:_0x15a471,unitId:_0x24897e,text:_0x3e70b4,threadId:_0x5184fc}=_0x12be05,_0x4eee95=(_0x413b7a=(_0x339dc3=_0x3e70b4[_0xc6533c(0xed)])==null?void 0x0:_0x339dc3[_0xc6533c(0xe4)](_0x347f3d=>_0x347f3d[_0xc6533c(0xb8)]===c[_0xc6533c(0xde)][_0xc6533c(0x90)])[_0xc6533c(0xb4)](_0x4ff636=>_0x4ff636[_0xc6533c(0xae)]))!=null?_0x413b7a:[],_0x5edf7f=JSON[_0xc6533c(0xc2)](_0x3e70b4),_0x552ed5=(await this[_0xc6533c(0xf2)][_0xc6533c(0x8f)](_0x24897e))[_0xc6533c(0x99)]();if(_0x15a471){const _0x23c4c5={'memberId':_0x552ed5,'unitId':_0x24897e,'content':_0x5edf7f,'mention':_0x4eee95,'threadId':_0x5184fc},_0x534d24=(await this[_0xc6533c(0xa4)][_0xc6533c(0xdb)](_0xc6533c(0xbc)+_0x24897e+'/reply',{'body':_0x23c4c5}))['body']['reply'];return{..._0x12be05,'id':_0x534d24[_0xc6533c(0x8a)],'dT':c[_0xc6533c(0xd7)](+_0x534d24[_0xc6533c(0xcb)])[_0xc6533c(0xbe)](_0xc6533c(0xb2)),'personId':_0x534d24[_0xc6533c(0xa9)]};}else{const _0x39307f={'memberId':_0x552ed5,'unitId':_0x24897e,'content':_0x5edf7f,'mention':_0x4eee95},_0x3ab7da=await this[_0xc6533c(0xa4)]['post']('/universer-api/comment/unit/'+_0x24897e+_0xc6533c(0xb3),{'body':_0x39307f});return Y(_0x3ab7da['body']['comment'],_0x12be05);}}async[_0x130f3d(0xf1)](_0x56a694){const _0x18ca72=_0x130f3d;var _0x309d21,_0x43fa2c;const {text:_0x443688,unitId:_0x3aa3ab}=_0x56a694,_0x163a13=(_0x43fa2c=(_0x309d21=_0x443688[_0x18ca72(0xed)])==null?void 0x0:_0x309d21[_0x18ca72(0xe4)](_0xad30ec=>_0xad30ec[_0x18ca72(0xb8)]===c[_0x18ca72(0xde)][_0x18ca72(0x90)])[_0x18ca72(0xb4)](_0x5cb169=>_0x5cb169['rangeId']))!=null?_0x43fa2c:[],_0x3f25b3=JSON[_0x18ca72(0xc2)](_0x443688),_0x23b4b2=_0x56a694[_0x18ca72(0x96)],_0x382896=_0x56a694['id'],_0x411835={'memberId':(await this[_0x18ca72(0xf2)][_0x18ca72(0x8f)](_0x3aa3ab))['getMemberID'](),'unitId':_0x3aa3ab,'threadId':_0x23b4b2,'mention':_0x163a13,'content':_0x3f25b3,'replyId':_0x382896},_0x3d705f=await this[_0x18ca72(0xa4)][_0x18ca72(0xdb)]('/universer-api/comment/unit/'+_0x3aa3ab+_0x18ca72(0xda),{'body':_0x411835});return!_0x3d705f[_0x18ca72(0xd8)][_0x18ca72(0xe3)]||_0x3d705f[_0x18ca72(0xd8)][_0x18ca72(0xe3)]['code']===0x1;}async['resolveComment'](_0x19210e){const _0x46f77e=_0x130f3d,{unitId:_0x94e1a9}=_0x19210e,_0x2787c3=_0x19210e['threadId'],_0xc86817={'memberId':this['_userService'][_0x46f77e(0xcf)]()['userID'],'unitId':_0x94e1a9,'threadId':_0x2787c3,'solved':_0x19210e[_0x46f77e(0xb7)]?I['Solved']:I[_0x46f77e(0x9a)]},_0x44dead=await this[_0x46f77e(0xa4)][_0x46f77e(0xdb)](_0x46f77e(0xbc)+_0x94e1a9+_0x46f77e(0xd0),{'body':_0xc86817});return!_0x44dead['body']['error']||_0x44dead[_0x46f77e(0xd8)][_0x46f77e(0xe3)]['code']===0x1;}async[_0x130f3d(0xd3)](_0x2c31e1,_0x15e2e4,_0x1e2da1,_0x1dc24c){const _0x507b70=_0x130f3d,_0x1153e8={'memberId':(await this[_0x507b70(0xf2)][_0x507b70(0x8f)](_0x2c31e1))['getMemberID'](),'threadId':_0x1e2da1,'replyId':_0x1dc24c,'unitId':_0x2c31e1},_0xf53f80=await this[_0x507b70(0xa4)][_0x507b70(0xdb)](_0x507b70(0xbc)+_0x2c31e1+_0x507b70(0xad),{'body':_0x1153e8});return!_0xf53f80['body'][_0x507b70(0xe3)]||_0xf53f80['body'][_0x507b70(0xe3)]['code']===0x1;}async[_0x130f3d(0xce)](_0x106ea6,_0x5d5732,_0x5e0809){const _0x1a8842=_0x130f3d,_0xde3d7={'unitId':_0x106ea6,'threadId':_0x5e0809},_0x43ff6f=await this[_0x1a8842(0xa4)]['post']('/universer-api/comment/unit/'+_0x106ea6+'/list',{'body':_0xde3d7}),_0x261c6d=_0x5e0809['map'](_0x5d258e=>G(_0x43ff6f[_0x1a8842(0xd8)]['comments'][_0x5d258e],_0x106ea6,_0x5d5732))[_0x1a8842(0xe4)](Boolean);return Object[_0x1a8842(0xbb)](_0x43ff6f[_0x1a8842(0xd8)]['users'])[_0x1a8842(0xd5)](_0x4bac30=>{const _0x52d80f=_0x1a8842;this['_userService'][_0x52d80f(0x9c)](_0x4bac30);}),_0x261c6d;}[_0x130f3d(0xec)](_0x14152a){const _0x2363b2=_0x130f3d;return{'id':_0x14152a['id'],'threadId':_0x14152a[_0x2363b2(0x96)],'ref':_0x14152a[_0x2363b2(0x84)]};}};p=x([C(0x0,c['Inject'](P['HTTPService'])),C(0x1,c[_0x130f3d(0x92)](c['UserManagerService'])),C(0x2,c[_0x130f3d(0x92)](b[_0x130f3d(0xaa)]))],p);var H=Object[_0x130f3d(0xab)],J=(_0x47cb3c,_0xa47be9,_0x3b11fe,_0x388ab8)=>{for(var _0x54e563=_0x388ab8>0x1?void 0x0:_0x388ab8?H(_0xa47be9,_0x3b11fe):_0xa47be9,_0x30c339=_0x47cb3c['length']-0x1,_0x5d86c1;_0x30c339>=0x0;_0x30c339--)(_0x5d86c1=_0x47cb3c[_0x30c339])&&(_0x54e563=_0x5d86c1(_0x54e563)||_0x54e563);return _0x54e563;},y=(_0x5a24e7,_0x2591da)=>(_0x45239f,_0x3576ec)=>_0x2591da(_0x45239f,_0x3576ec,_0x5a24e7);let g=class extends c[_0x130f3d(0xc6)]{constructor(_0x1eddd7,_0xb664d5){const _0xbead58=_0x130f3d;super(),this['_threadCommentDataSourceService']=_0x1eddd7,this[_0xbead58(0xc3)]=_0xb664d5,this[_0xbead58(0x87)]();}[_0x130f3d(0x87)](){const _0x4db67f=_0x130f3d;this[_0x4db67f(0x8c)]['dataSource']=this[_0x4db67f(0xc3)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x130f3d(0x92)](p))],g);var F=Object[_0x130f3d(0xc1)],L=Object[_0x130f3d(0xab)],Z=(_0x3d7987,_0x1bee36,_0x4b6614)=>_0x1bee36 in _0x3d7987?F(_0x3d7987,_0x1bee36,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4b6614}):_0x3d7987[_0x1bee36]=_0x4b6614,W=(_0x4d2bf0,_0x4a3b8b,_0x54c867,_0x8808f6)=>{for(var _0x61da75=_0x8808f6>0x1?void 0x0:_0x8808f6?L(_0x4a3b8b,_0x54c867):_0x4a3b8b,_0x2df76d=_0x4d2bf0['length']-0x1,_0x189803;_0x2df76d>=0x0;_0x2df76d--)(_0x189803=_0x4d2bf0[_0x2df76d])&&(_0x61da75=_0x189803(_0x61da75)||_0x61da75);return _0x61da75;},O=(_0x8eac6,_0x8217e1)=>(_0x5e9983,_0x3ba774)=>_0x8217e1(_0x5e9983,_0x3ba774,_0x8eac6),N=(_0x1364d3,_0x3d5a53,_0x1898a7)=>Z(_0x1364d3,typeof _0x3d5a53!=_0x130f3d(0x88)?_0x3d5a53+'':_0x3d5a53,_0x1898a7);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x130f3d(0xeb)]{constructor(_0x1ffe61=D,_0xa2d47b,_0x3faa0c){const _0x52c83b=_0x130f3d;super(),this['_config']=_0x1ffe61,this[_0x52c83b(0x9b)]=_0xa2d47b,this['_configService']=_0x3faa0c;const {..._0x4d7db4}=c['merge']({},D,this[_0x52c83b(0xe8)]);this[_0x52c83b(0xbf)][_0x52c83b(0xa3)](q,_0x4d7db4);}[_0x130f3d(0xc5)](){const _0x18d547=_0x130f3d;[[p],[g],[_]][_0x18d547(0xd5)](_0x370e1f=>{const _0x7c127a=_0x18d547;this[_0x7c127a(0x9b)]['add'](_0x370e1f);});}['onReady'](){const _0x25628d=_0x130f3d;this['_injector'][_0x25628d(0xc8)](g),this[_0x25628d(0x9b)][_0x25628d(0xc8)](_);}},N(exports[_0x130f3d(0xe7)],_0x130f3d(0x9f),U),N(exports[_0x130f3d(0xe7)],'type',c[_0x130f3d(0x86)][_0x130f3d(0x91)]),exports[_0x130f3d(0xe7)]=W([c[_0x130f3d(0x89)](w['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T[_0x130f3d(0xa2)]),O(0x1,c[_0x130f3d(0x92)](c[_0x130f3d(0xc4)])),O(0x2,c['IConfigService'])],exports[_0x130f3d(0xe7)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x1db4(_0x2b44be,_0x19edba){_0x2b44be=_0x2b44be-0xf9;const _0x17c55a=_0x17c5();let _0x1db470=_0x17c55a[_0x2b44be];return _0x1db470;}const _0x452b23=_0x1db4;(function(_0x49ca60,_0x45c3b0){const _0x4a8af5=_0x1db4,_0x218d70=_0x49ca60();while(!![]){try{const _0x377ab4=parseInt(_0x4a8af5(0x11b))/0x1+-parseInt(_0x4a8af5(0x128))/0x2*(parseInt(_0x4a8af5(0x115))/0x3)+parseInt(_0x4a8af5(0x104))/0x4+-parseInt(_0x4a8af5(0x132))/0x5*(-parseInt(_0x4a8af5(0x126))/0x6)+-parseInt(_0x4a8af5(0x107))/0x7+-parseInt(_0x4a8af5(0x10a))/0x8+parseInt(_0x4a8af5(0x117))/0x9;if(_0x377ab4===_0x45c3b0)break;else _0x218d70['push'](_0x218d70['shift']());}catch(_0x47539c){_0x218d70['push'](_0x218d70['shift']());}}}(_0x17c5,0xec0b8));import{CommentService as _0x12c24f,CollaborationSessionService as _0x395936,UniverCollaborationClientPlugin as _0x354fd9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3ba035}from'@univerjs-pro/license';import{dayjs as _0xe06112,UserManagerService as _0x48d6a8,Inject as _0x437e4f,Injector as _0x50e8a0,Disposable as _0x4f537f,CustomRangeType as _0x128584,UniverInstanceType as _0x41babf,DependentOn as _0x49f4f5,IConfigService as _0x4181a7,Plugin as _0x37f55a,merge as _0x127711}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x36ebce}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3e56e2,IThreadCommentDataSourceService as _0x33be8b}from'@univerjs/thread-comment';import{bufferTime as _0x458aca}from'rxjs';import{HTTPService as _0x37c7be}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0x17c5(){const _0x762096=['get','add','onReady','map','addComment','getCurrentUser','setConfig','customRanges','unitId','stringify','_threadCommentDataSourceService','replies','Reply','root','/add','resolved','/reply','replyId','disposeWithMe','reply','delete','userId','YYYY/MM/DD\x20HH:mm','dataSource','createTimestamp','/solved','commentUpdate$','subscribe','Add','comments','_threadCommentModel','format','onStarting','code','solved','_commentService','deleteComment','_config','defineProperty','_configService','userID','Delete','requireSession','UNIVER_UNKNOWN','Solved','getOwnPropertyDescriptor','values','5244256aaUntP','OpenOrReOpen','Solve','13519107xfKIVV','symbol','comment','1519848WYhYRI','parse','UNRECOGNIZED','length','_sessionService','getMemberID','updateComment','personId','thread-comment-data-source.config','threadId','listComments','3ZlkCIH','syncUpdateMutationToColla','11280600tmtsGf','resolveComment','_threadCommentDataSource','getUnit','314846PavOvV','COMMENT','Edit','addUser','/universer-api/comment/unit/','pluginName','_initUserSync','/list','user','rangeType','filter','6clGQyu','_injector','2378942HBpgKQ','Unknown','post','_httpService','/universer-api/user/list','payload','forEach','getUser','_init','body','6991415ejHbDA','slice','_initDataSource','parentId','error','content','_userService','type','rangeId'];_0x17c5=function(){return _0x762096;};return _0x17c5();}var I=(_0x10eddc=>(_0x10eddc[_0x10eddc[_0x452b23(0x105)]=0x0]='OpenOrReOpen',_0x10eddc[_0x10eddc[_0x452b23(0x101)]=0x1]=_0x452b23(0x101),_0x10eddc[_0x10eddc[_0x452b23(0x10c)]=-0x1]='UNRECOGNIZED',_0x10eddc))(I||{}),v=(_0x569aa1=>(_0x569aa1[_0x569aa1[_0x452b23(0x129)]=0x0]=_0x452b23(0x129),_0x569aa1[_0x569aa1[_0x452b23(0x157)]=0x1]=_0x452b23(0x157),_0x569aa1[_0x569aa1[_0x452b23(0x147)]=0x2]=_0x452b23(0x147),_0x569aa1[_0x569aa1[_0x452b23(0x11d)]=0x3]=_0x452b23(0x11d),_0x569aa1[_0x569aa1[_0x452b23(0xfe)]=0x4]=_0x452b23(0xfe),_0x569aa1[_0x569aa1[_0x452b23(0x106)]=0x5]='Solve',_0x569aa1[_0x569aa1[_0x452b23(0x10c)]=-0x1]=_0x452b23(0x10c),_0x569aa1))(v||{});const y=_0x3f4573=>_0xe06112(new Date(+_0x3f4573))[_0x452b23(0x15a)](_0x452b23(0x151)),B=async(_0x1e7ec3,_0x2b0b8d)=>{const _0x3a75d8=_0x452b23,_0x37a653=_0x1e7ec3['get'](_0x48d6a8),_0xc7daa2=_0x1e7ec3['get'](_0x37c7be);_0x2b0b8d['forEach'](_0x2f2895=>{const _0x1c235c=_0x1db4;_0x37a653[_0x1c235c(0x12f)](_0x2f2895)&&_0x2b0b8d[_0x1c235c(0x14f)](_0x2f2895);}),_0x2b0b8d['size']&&(await _0xc7daa2[_0x3a75d8(0x13b)](_0x3a75d8(0x12c),{'params':{'userIDs':[..._0x2b0b8d]}}))[_0x3a75d8(0x131)]['users'][_0x3a75d8(0x12e)](_0x3f0e93=>{const _0x8a7620=_0x3a75d8;_0x3f0e93&&_0x37a653[_0x8a7620(0x11e)](_0x3f0e93);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x1c7b92,_0x4c514b,_0x1f7845,_0x37e144)=>{for(var _0x2ed57f=_0x37e144>0x1?void 0x0:_0x37e144?K(_0x4c514b,_0x1f7845):_0x4c514b,_0x130caa=_0x1c7b92['length']-0x1,_0x20e6e0;_0x130caa>=0x0;_0x130caa--)(_0x20e6e0=_0x1c7b92[_0x130caa])&&(_0x2ed57f=_0x20e6e0(_0x2ed57f)||_0x2ed57f);return _0x2ed57f;},p=(_0x5af7b0,_0x493324)=>(_0x5c53d8,_0x508315)=>_0x493324(_0x5c53d8,_0x508315,_0x5af7b0);let _=class extends _0x4f537f{constructor(_0x507d4a,_0x1402d9,_0x203982,_0xedaf3c){const _0x5f530c=_0x452b23;super(),this[_0x5f530c(0x15e)]=_0x507d4a,this[_0x5f530c(0x159)]=_0x1402d9,this[_0x5f530c(0x138)]=_0x203982,this[_0x5f530c(0x127)]=_0xedaf3c,this[_0x5f530c(0x130)](),this[_0x5f530c(0x121)]();}['_initUserSync'](){const _0x53a591=_0x452b23;this[_0x53a591(0x14d)](this[_0x53a591(0x159)][_0x53a591(0x155)]['pipe'](_0x458aca(0x10))[_0x53a591(0x156)](_0x179017=>{const _0x201e87=_0x53a591,_0x2c2a9a=new Set();_0x179017[_0x201e87(0x12e)](_0x516510=>{const _0x12be3d=_0x201e87;if(_0x516510['type']===_0x12be3d(0x13c)){const _0x13152f=_0x516510[_0x12be3d(0x12d)][_0x12be3d(0x111)];_0x2c2a9a[_0x12be3d(0x13c)](_0x13152f);}}),B(this[_0x201e87(0x127)],_0x2c2a9a);}));}[_0x452b23(0x130)](){const _0x5d1f11=_0x452b23;this['disposeWithMe'](this['_commentService'][_0x5d1f11(0x155)][_0x5d1f11(0x156)](async _0x3031b1=>{const _0x316597=_0x5d1f11;var _0x2cc02c,_0x3b51d2,_0x37cab6,_0x5e8d73;const _0x268e04=(_0x2cc02c=this['_threadCommentModel'][_0x316597(0x11a)](_0x3031b1[_0x316597(0x143)])['find'](_0x473154=>_0x473154[_0x316597(0x113)]===_0x3031b1[_0x316597(0x113)]))==null?void 0x0:_0x2cc02c['root'];if(!_0x268e04)return;const {unitId:_0x5b3d28,subUnitId:_0x435b55}=_0x268e04;switch(_0x3031b1[_0x316597(0x123)]&&this['_userService'][_0x316597(0x11e)](_0x3031b1[_0x316597(0x123)]),_0x3031b1[_0x316597(0x139)]){case v[_0x316597(0x157)]:break;case v[_0x316597(0x147)]:{this['_threadCommentModel'][_0x316597(0x13f)](_0x5b3d28,_0x435b55,{'unitId':_0x5b3d28,'subUnitId':_0x435b55,'ref':'','id':_0x3031b1[_0x316597(0x14c)],'dT':y(+_0x3031b1[_0x316597(0x153)]),'threadId':_0x3031b1[_0x316597(0x113)],'personId':(_0x37cab6=(_0x3b51d2=_0x3031b1[_0x316597(0x123)])==null?void 0x0:_0x3b51d2[_0x316597(0xfd)])!=null?_0x37cab6:_0x3031b1[_0x316597(0x150)],'text':JSON[_0x316597(0x10b)](_0x3031b1[_0x316597(0x137)]),'parentId':_0x268e04['id']});break;}case v[_0x316597(0xfe)]:{const _0xeaa323=this[_0x316597(0x159)]['getComment'](_0x5b3d28,_0x435b55,_0x3031b1[_0x316597(0x14c)]);_0xeaa323&&_0xeaa323[_0x316597(0x135)]&&this[_0x316597(0x159)]['deleteComment'](_0x5b3d28,_0x435b55,_0x3031b1[_0x316597(0x14c)]);break;}case v[_0x316597(0x11d)]:{this[_0x316597(0x159)][_0x316597(0x110)](_0x5b3d28,_0x435b55,{'commentId':_0x3031b1[_0x316597(0x14c)],'text':JSON['parse'](_0x3031b1[_0x316597(0x137)])});break;}case v[_0x316597(0x106)]:{const _0x854ef1=(_0x5e8d73=this[_0x316597(0x159)]['getUnit'](_0x3031b1[_0x316597(0x143)])['find'](_0x2f3487=>_0x2f3487['threadId']===_0x3031b1[_0x316597(0x113)]))==null?void 0x0:_0x5e8d73[_0x316597(0x148)];_0x854ef1&&this[_0x316597(0x159)][_0x316597(0x118)](_0x5b3d28,_0x435b55,_0x854ef1['id'],_0x3031b1['solved']===I[_0x316597(0x101)]);break;}}}));}};_=V([p(0x0,_0x437e4f(_0x12c24f)),p(0x1,_0x437e4f(_0x3e56e2)),p(0x2,_0x437e4f(_0x48d6a8)),p(0x3,_0x437e4f(_0x50e8a0))],_);const z=_0x452b23(0x112),O={};var k=Object[_0x452b23(0x102)],Q=(_0x41e29a,_0x2956a7,_0x2595eb,_0x36088d)=>{for(var _0xaad226=_0x36088d>0x1?void 0x0:_0x36088d?k(_0x2956a7,_0x2595eb):_0x2956a7,_0x40a588=_0x41e29a['length']-0x1,_0x133b4d;_0x40a588>=0x0;_0x40a588--)(_0x133b4d=_0x41e29a[_0x40a588])&&(_0xaad226=_0x133b4d(_0xaad226)||_0xaad226);return _0xaad226;},b=(_0x4f7c9a,_0x168885)=>(_0x2bd8fc,_0x37a43b)=>_0x168885(_0x2bd8fc,_0x37a43b,_0x4f7c9a);function X(_0x350da9,_0x151f36){const _0x509d5d=_0x452b23,_0xa08899=_0x350da9[_0x509d5d(0x146)][0x0];return{..._0x151f36,'id':_0xa08899[_0x509d5d(0x14c)],'resolved':_0x350da9[_0x509d5d(0x15d)]===0x1,'dT':y(_0xa08899[_0x509d5d(0x153)]),'personId':_0xa08899[_0x509d5d(0x150)],'threadId':_0xa08899[_0x509d5d(0x113)]};}function ee(_0x1ddb27,_0x1e05f0,_0x306943){const _0x1128d1=_0x452b23;var _0x5dca3b,_0x169bd6;if(((_0x169bd6=(_0x5dca3b=_0x1ddb27==null?void 0x0:_0x1ddb27[_0x1128d1(0x146)])==null?void 0x0:_0x5dca3b['length'])!=null?_0x169bd6:0x0)>0x0){const _0x3fb377=(_0x52495b,_0x297119)=>({'id':_0x52495b['replyId'],'threadId':_0x52495b[_0x1128d1(0x113)],'dT':y(_0x52495b[_0x1128d1(0x153)]),'personId':_0x52495b['userId'],'resolved':_0x1ddb27[_0x1128d1(0x15d)]===I['Solved'],'unitId':_0x1e05f0,'subUnitId':_0x306943,'text':JSON[_0x1128d1(0x10b)](_0x52495b['content']),'parentId':_0x297119}),_0x2d13c4=_0x3fb377(_0x1ddb27[_0x1128d1(0x146)][0x0]);return{..._0x2d13c4,'children':_0x1ddb27['replies'][_0x1128d1(0x133)](0x1)[_0x1128d1(0x13e)](_0x3ef85a=>_0x3fb377(_0x3ef85a,_0x2d13c4['id']))};}return null;}let S=class{constructor(_0x7d1fcd,_0xce3f7,_0x157859){const _0x442d80=_0x452b23;this[_0x442d80(0x12b)]=_0x7d1fcd,this['_userService']=_0xce3f7,this[_0x442d80(0x10e)]=_0x157859;}async[_0x452b23(0x13f)](_0x19b0d3){const _0x5e68aa=_0x452b23;var _0x27e403,_0x29b3af;const {parentId:_0x36f965,unitId:_0x10ccae,text:_0x334a8b,threadId:_0x58c016}=_0x19b0d3,_0x1ed14e=(_0x29b3af=(_0x27e403=_0x334a8b[_0x5e68aa(0x142)])==null?void 0x0:_0x27e403[_0x5e68aa(0x125)](_0x50765c=>_0x50765c[_0x5e68aa(0x124)]===_0x128584[_0x5e68aa(0x11c)])[_0x5e68aa(0x13e)](_0xf4ee76=>_0xf4ee76['rangeId']))!=null?_0x29b3af:[],_0x3a8913=JSON['stringify'](_0x334a8b),_0x324d21=(await this[_0x5e68aa(0x10e)]['requireSession'](_0x10ccae))[_0x5e68aa(0x10f)]();if(_0x36f965){const _0x46402b={'memberId':_0x324d21,'unitId':_0x10ccae,'content':_0x3a8913,'mention':_0x1ed14e,'threadId':_0x58c016},_0x60c34b=(await this[_0x5e68aa(0x12b)][_0x5e68aa(0x12a)](_0x5e68aa(0x11f)+_0x10ccae+_0x5e68aa(0x14b),{'body':_0x46402b}))[_0x5e68aa(0x131)][_0x5e68aa(0x14e)];return{..._0x19b0d3,'id':_0x60c34b['replyId'],'dT':_0xe06112(+_0x60c34b['createTimestamp'])[_0x5e68aa(0x15a)](_0x5e68aa(0x151)),'personId':_0x60c34b[_0x5e68aa(0x150)]};}else{const _0x21ed5c={'memberId':_0x324d21,'unitId':_0x10ccae,'content':_0x3a8913,'mention':_0x1ed14e},_0x438825=await this['_httpService']['post'](_0x5e68aa(0x11f)+_0x10ccae+_0x5e68aa(0x149),{'body':_0x21ed5c});return X(_0x438825[_0x5e68aa(0x131)][_0x5e68aa(0x109)],_0x19b0d3);}}async[_0x452b23(0x110)](_0x42822e){const _0xd9dd6c=_0x452b23;var _0x38626c,_0x48240f;const {text:_0x1825a0,unitId:_0x449a64}=_0x42822e,_0x2037a7=(_0x48240f=(_0x38626c=_0x1825a0['customRanges'])==null?void 0x0:_0x38626c[_0xd9dd6c(0x125)](_0x26bb4e=>_0x26bb4e[_0xd9dd6c(0x124)]===_0x128584[_0xd9dd6c(0x11c)])[_0xd9dd6c(0x13e)](_0xf3484e=>_0xf3484e[_0xd9dd6c(0x13a)]))!=null?_0x48240f:[],_0x585f4a=JSON[_0xd9dd6c(0x144)](_0x1825a0),_0x2d8dde=_0x42822e[_0xd9dd6c(0x113)],_0x23f0c7=_0x42822e['id'],_0x5426c7={'memberId':(await this[_0xd9dd6c(0x10e)]['requireSession'](_0x449a64))[_0xd9dd6c(0x10f)](),'unitId':_0x449a64,'threadId':_0x2d8dde,'mention':_0x2037a7,'content':_0x585f4a,'replyId':_0x23f0c7},_0x56e7a7=await this['_httpService']['post'](_0xd9dd6c(0x11f)+_0x449a64+'/edit',{'body':_0x5426c7});return!_0x56e7a7['body'][_0xd9dd6c(0x136)]||_0x56e7a7['body'][_0xd9dd6c(0x136)][_0xd9dd6c(0x15c)]===0x1;}async[_0x452b23(0x118)](_0x3b4fe3){const _0xa112e8=_0x452b23,{unitId:_0x43bc74}=_0x3b4fe3,_0x3d1767=_0x3b4fe3[_0xa112e8(0x113)],_0x1b3b62={'memberId':this[_0xa112e8(0x138)][_0xa112e8(0x140)]()['userID'],'unitId':_0x43bc74,'threadId':_0x3d1767,'solved':_0x3b4fe3[_0xa112e8(0x14a)]?I[_0xa112e8(0x101)]:I[_0xa112e8(0x105)]},_0xc7700d=await this[_0xa112e8(0x12b)][_0xa112e8(0x12a)]('/universer-api/comment/unit/'+_0x43bc74+_0xa112e8(0x154),{'body':_0x1b3b62});return!_0xc7700d[_0xa112e8(0x131)][_0xa112e8(0x136)]||_0xc7700d[_0xa112e8(0x131)][_0xa112e8(0x136)]['code']===0x1;}async[_0x452b23(0xf9)](_0xdc9ee5,_0x2f425f,_0x2a74cb,_0x27dc83){const _0x593d3f=_0x452b23,_0x23fbea={'memberId':(await this['_sessionService'][_0x593d3f(0xff)](_0xdc9ee5))['getMemberID'](),'threadId':_0x2a74cb,'replyId':_0x27dc83,'unitId':_0xdc9ee5},_0x556321=await this[_0x593d3f(0x12b)][_0x593d3f(0x12a)](_0x593d3f(0x11f)+_0xdc9ee5+'/delete',{'body':_0x23fbea});return!_0x556321[_0x593d3f(0x131)][_0x593d3f(0x136)]||_0x556321[_0x593d3f(0x131)][_0x593d3f(0x136)][_0x593d3f(0x15c)]===0x1;}async[_0x452b23(0x114)](_0x304ca5,_0x40c13a,_0x1f35f7){const _0x2ea717=_0x452b23,_0x3639bb={'unitId':_0x304ca5,'threadId':_0x1f35f7},_0x144cc6=await this[_0x2ea717(0x12b)][_0x2ea717(0x12a)](_0x2ea717(0x11f)+_0x304ca5+_0x2ea717(0x122),{'body':_0x3639bb}),_0x343d2c=_0x1f35f7[_0x2ea717(0x13e)](_0x2f8761=>ee(_0x144cc6['body'][_0x2ea717(0x158)][_0x2f8761],_0x304ca5,_0x40c13a))[_0x2ea717(0x125)](Boolean);return Object[_0x2ea717(0x103)](_0x144cc6['body']['users'])['forEach'](_0x3b7e69=>{const _0x435c67=_0x2ea717;this[_0x435c67(0x138)][_0x435c67(0x11e)](_0x3b7e69);}),_0x343d2c;}['saveCommentToSnapshot'](_0x7a6e89){const _0x73331c=_0x452b23;return{'id':_0x7a6e89['id'],'threadId':_0x7a6e89[_0x73331c(0x113)],'ref':_0x7a6e89['ref']};}};S=Q([b(0x0,_0x437e4f(_0x37c7be)),b(0x1,_0x437e4f(_0x48d6a8)),b(0x2,_0x437e4f(_0x395936))],S);var re=Object[_0x452b23(0x102)],te=(_0x29be48,_0x2c84ec,_0x4a7ebd,_0x1af60a)=>{const _0x42d23f=_0x452b23;for(var _0x5391e7=_0x1af60a>0x1?void 0x0:_0x1af60a?re(_0x2c84ec,_0x4a7ebd):_0x2c84ec,_0x70053c=_0x29be48[_0x42d23f(0x10d)]-0x1,_0x19d67d;_0x70053c>=0x0;_0x70053c--)(_0x19d67d=_0x29be48[_0x70053c])&&(_0x5391e7=_0x19d67d(_0x5391e7)||_0x5391e7);return _0x5391e7;},M=(_0x2ad0cf,_0x516c13)=>(_0x55be30,_0x24d0d2)=>_0x516c13(_0x55be30,_0x24d0d2,_0x2ad0cf);let f=class extends _0x4f537f{constructor(_0x5f2187,_0x347bd3){const _0x46b6b9=_0x452b23;super(),this[_0x46b6b9(0x145)]=_0x5f2187,this[_0x46b6b9(0x119)]=_0x347bd3,this['_initDataSource']();}[_0x452b23(0x134)](){const _0x2a12ca=_0x452b23;this[_0x2a12ca(0x145)][_0x2a12ca(0x152)]=this[_0x2a12ca(0x119)],this[_0x2a12ca(0x145)][_0x2a12ca(0x116)]=!0x1;}};f=te([M(0x0,_0x33be8b),M(0x1,_0x437e4f(S))],f);var se=Object[_0x452b23(0xfb)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x252929,_0x35f054,_0x39c7fd)=>_0x35f054 in _0x252929?se(_0x252929,_0x35f054,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x39c7fd}):_0x252929[_0x35f054]=_0x39c7fd,ie=(_0x587562,_0x49e33e,_0x34a790,_0x194ee)=>{const _0x5029aa=_0x452b23;for(var _0x52634c=_0x194ee>0x1?void 0x0:_0x194ee?oe(_0x49e33e,_0x34a790):_0x49e33e,_0x3111eb=_0x587562[_0x5029aa(0x10d)]-0x1,_0x404025;_0x3111eb>=0x0;_0x3111eb--)(_0x404025=_0x587562[_0x3111eb])&&(_0x52634c=_0x404025(_0x52634c)||_0x52634c);return _0x52634c;},N=(_0x13861f,_0x59622a)=>(_0x2849c4,_0x218c94)=>_0x59622a(_0x2849c4,_0x218c94,_0x13861f),$=(_0x1138f2,_0x322a97,_0x2cc85b)=>ne(_0x1138f2,typeof _0x322a97!=_0x452b23(0x108)?_0x322a97+'':_0x322a97,_0x2cc85b);let g=class extends _0x37f55a{constructor(_0x3a6c21=O,_0x25385d,_0x48ead6){const _0x437700=_0x452b23;super(),this[_0x437700(0xfa)]=_0x3a6c21,this[_0x437700(0x127)]=_0x25385d,this[_0x437700(0xfc)]=_0x48ead6;const {..._0x2c64dc}=_0x127711({},O,this[_0x437700(0xfa)]);this[_0x437700(0xfc)][_0x437700(0x141)](z,_0x2c64dc);}[_0x452b23(0x15b)](){const _0x23a1ac=_0x452b23;[[S],[f],[_]][_0x23a1ac(0x12e)](_0x5d54e9=>{const _0x54a9c1=_0x23a1ac;this['_injector'][_0x54a9c1(0x13c)](_0x5d54e9);});}[_0x452b23(0x13d)](){const _0x17c8b4=_0x452b23;this[_0x17c8b4(0x127)][_0x17c8b4(0x13b)](f),this['_injector'][_0x17c8b4(0x13b)](_);}};$(g,_0x452b23(0x120),W),$(g,_0x452b23(0x139),_0x41babf[_0x452b23(0x100)]),g=ie([_0x49f4f5(_0x36ebce,_0x354fd9,_0x3ba035),N(0x1,_0x437e4f(_0x50e8a0)),N(0x2,_0x4181a7)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x4e6633=_0x5f0e;function _0x238f(){const _0x3248d2=['1327404bPHrJY','dataSource','reply','add','saveCommentToSnapshot','1133530jOLYBC','getOwnPropertyDescriptor','_commentService','YYYY/MM/DD\x20HH:mm','Solve','user','_configService','pluginName','type','/reply','find','parentId','comment','body','onStarting','users','Add','solved','replies','_init','_sessionService','_initDataSource','slice','addComment','syncUpdateMutationToColla','threadId','defineProperty','5688179OEGoRC','requireSession','20zJuRBB','23MkBQQs','forEach','length','getMemberID','addUser','getUnit','_initUserSync','error','Delete','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','post','/solved','COMMENT','_userService','Reply','customRanges','rangeType','/add','_threadCommentDataSource','parse','get','5729874WSqVhZ','OpenOrReOpen','ref','root','_httpService','updateComment','/universer-api/comment/unit/','_config','filter','/list','deleteComment','rangeId','userID','commentUpdate$','pipe','code','/universer-api/user/list','_threadCommentDataSourceService','_threadCommentModel','UNRECOGNIZED','subscribe','Edit','resolveComment','createTimestamp','6171520BKqFDy','onReady','unitId','map','personId','122586bVjpeH','comments','resolved','disposeWithMe','size','format','listComments','replyId','thread-comment-data-source.config','content','_injector','14848371jYQZJy','/edit','Unknown','payload','Solved','getCurrentUser','setConfig','userId'];_0x238f=function(){return _0x3248d2;};return _0x238f();}(function(_0x88fc0d,_0x2cb5ee){const _0x4ca88f=_0x5f0e,_0xfc3d08=_0x88fc0d();while(!![]){try{const _0x37d617=parseInt(_0x4ca88f(0x100))/0x1*(parseInt(_0x4ca88f(0x132))/0x2)+-parseInt(_0x4ca88f(0xdd))/0x3+parseInt(_0x4ca88f(0xff))/0x4*(-parseInt(_0x4ca88f(0xe2))/0x5)+parseInt(_0x4ca88f(0x115))/0x6+-parseInt(_0x4ca88f(0xfd))/0x7+-parseInt(_0x4ca88f(0x12d))/0x8+parseInt(_0x4ca88f(0x13d))/0x9;if(_0x37d617===_0x2cb5ee)break;else _0xfc3d08['push'](_0xfc3d08['shift']());}catch(_0x3ec3f2){_0xfc3d08['push'](_0xfc3d08['shift']());}}}(_0x238f,0xd09e6));import{CommentService as _0x51f550,CollaborationSessionService as _0xa66c1b,UniverCollaborationClientPlugin as _0x4407ef}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x211b08}from'@univerjs-pro/license';import{dayjs as _0x5a368a,UserManagerService as _0x14c9e0,Inject as _0x59c243,Injector as _0xeb12e8,Disposable as _0x31c99b,CustomRangeType as _0x507b57,UniverInstanceType as _0x6e2e34,DependentOn as _0x356271,IConfigService as _0x40e862,Plugin as _0x3c3863,merge as _0x1f9a22}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1aeb4f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5a5cbf,IThreadCommentDataSourceService as _0x4c2523}from'@univerjs/thread-comment';import{bufferTime as _0x1340dd}from'rxjs';import{HTTPService as _0x168213}from'@univerjs/network';const W=_0x4e6633(0x109);var I=(_0x26ccf4=>(_0x26ccf4[_0x26ccf4[_0x4e6633(0x116)]=0x0]=_0x4e6633(0x116),_0x26ccf4[_0x26ccf4[_0x4e6633(0x141)]=0x1]='Solved',_0x26ccf4[_0x26ccf4[_0x4e6633(0x128)]=-0x1]=_0x4e6633(0x128),_0x26ccf4))(I||{}),v=(_0x208890=>(_0x208890[_0x208890[_0x4e6633(0x13f)]=0x0]=_0x4e6633(0x13f),_0x208890[_0x208890[_0x4e6633(0xf2)]=0x1]=_0x4e6633(0xf2),_0x208890[_0x208890[_0x4e6633(0x10e)]=0x2]=_0x4e6633(0x10e),_0x208890[_0x208890[_0x4e6633(0x12a)]=0x3]=_0x4e6633(0x12a),_0x208890[_0x208890[_0x4e6633(0x108)]=0x4]=_0x4e6633(0x108),_0x208890[_0x208890[_0x4e6633(0xe6)]=0x5]=_0x4e6633(0xe6),_0x208890[_0x208890[_0x4e6633(0x128)]=-0x1]=_0x4e6633(0x128),_0x208890))(v||{});const y=_0x25a459=>_0x5a368a(new Date(+_0x25a459))['format'](_0x4e6633(0xe5)),B=async(_0x431041,_0x25de81)=>{const _0x32550e=_0x4e6633,_0x277cb3=_0x431041[_0x32550e(0x114)](_0x14c9e0),_0x465395=_0x431041[_0x32550e(0x114)](_0x168213);_0x25de81[_0x32550e(0x101)](_0x178848=>{_0x277cb3['getUser'](_0x178848)&&_0x25de81['delete'](_0x178848);}),_0x25de81[_0x32550e(0x136)]&&(await _0x465395['get'](_0x32550e(0x125),{'params':{'userIDs':[..._0x25de81]}}))[_0x32550e(0xef)][_0x32550e(0xf1)]['forEach'](_0x3afec7=>{const _0x1b7025=_0x32550e;_0x3afec7&&_0x277cb3[_0x1b7025(0x104)](_0x3afec7);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2b4356,_0x2109cb,_0x48a9db,_0x2f45e5)=>{const _0x40ad24=_0x4e6633;for(var _0x45b082=_0x2f45e5>0x1?void 0x0:_0x2f45e5?K(_0x2109cb,_0x48a9db):_0x2109cb,_0x598075=_0x2b4356[_0x40ad24(0x102)]-0x1,_0x31d7a8;_0x598075>=0x0;_0x598075--)(_0x31d7a8=_0x2b4356[_0x598075])&&(_0x45b082=_0x31d7a8(_0x45b082)||_0x45b082);return _0x45b082;},p=(_0x3dbfa5,_0x4d7856)=>(_0x18c9f1,_0x2990b0)=>_0x4d7856(_0x18c9f1,_0x2990b0,_0x3dbfa5);let _=class extends _0x31c99b{constructor(_0x18b7f0,_0xe886ac,_0x518a17,_0x37259a){const _0x559942=_0x4e6633;super(),this[_0x559942(0xe4)]=_0x18b7f0,this[_0x559942(0x127)]=_0xe886ac,this['_userService']=_0x518a17,this[_0x559942(0x13c)]=_0x37259a,this['_init'](),this[_0x559942(0x106)]();}['_initUserSync'](){const _0x15d712=_0x4e6633;this[_0x15d712(0x135)](this['_threadCommentModel'][_0x15d712(0x122)][_0x15d712(0x123)](_0x1340dd(0x10))[_0x15d712(0x129)](_0x3e4ad0=>{const _0x1af7c8=_0x15d712,_0x4317f7=new Set();_0x3e4ad0[_0x1af7c8(0x101)](_0x1c5a17=>{const _0x43c63e=_0x1af7c8;if(_0x1c5a17['type']===_0x43c63e(0xe0)){const _0x29e438=_0x1c5a17[_0x43c63e(0x140)][_0x43c63e(0x131)];_0x4317f7['add'](_0x29e438);}}),B(this[_0x1af7c8(0x13c)],_0x4317f7);}));}[_0x4e6633(0xf5)](){const _0x3194c5=_0x4e6633;this['disposeWithMe'](this[_0x3194c5(0xe4)][_0x3194c5(0x122)][_0x3194c5(0x129)](async _0x5069f6=>{const _0x3836f6=_0x3194c5;var _0x421829,_0x2bcc3d,_0xfaada0,_0x104ed9;const _0x27ec06=(_0x421829=this['_threadCommentModel'][_0x3836f6(0x105)](_0x5069f6[_0x3836f6(0x12f)])[_0x3836f6(0xec)](_0x2484b1=>_0x2484b1[_0x3836f6(0xfb)]===_0x5069f6[_0x3836f6(0xfb)]))==null?void 0x0:_0x421829['root'];if(!_0x27ec06)return;const {unitId:_0x59a87e,subUnitId:_0x1dade0}=_0x27ec06;switch(_0x5069f6[_0x3836f6(0xe7)]&&this[_0x3836f6(0x10d)][_0x3836f6(0x104)](_0x5069f6[_0x3836f6(0xe7)]),_0x5069f6[_0x3836f6(0xea)]){case v['Add']:break;case v[_0x3836f6(0x10e)]:{this[_0x3836f6(0x127)][_0x3836f6(0xf9)](_0x59a87e,_0x1dade0,{'unitId':_0x59a87e,'subUnitId':_0x1dade0,'ref':'','id':_0x5069f6['replyId'],'dT':y(+_0x5069f6[_0x3836f6(0x12c)]),'threadId':_0x5069f6['threadId'],'personId':(_0xfaada0=(_0x2bcc3d=_0x5069f6[_0x3836f6(0xe7)])==null?void 0x0:_0x2bcc3d['userID'])!=null?_0xfaada0:_0x5069f6[_0x3836f6(0xdc)],'text':JSON[_0x3836f6(0x113)](_0x5069f6[_0x3836f6(0x13b)]),'parentId':_0x27ec06['id']});break;}case v[_0x3836f6(0x108)]:{const _0xd124b=this[_0x3836f6(0x127)]['getComment'](_0x59a87e,_0x1dade0,_0x5069f6[_0x3836f6(0x139)]);_0xd124b&&_0xd124b[_0x3836f6(0xed)]&&this[_0x3836f6(0x127)][_0x3836f6(0x11f)](_0x59a87e,_0x1dade0,_0x5069f6['replyId']);break;}case v[_0x3836f6(0x12a)]:{this[_0x3836f6(0x127)][_0x3836f6(0x11a)](_0x59a87e,_0x1dade0,{'commentId':_0x5069f6[_0x3836f6(0x139)],'text':JSON[_0x3836f6(0x113)](_0x5069f6[_0x3836f6(0x13b)])});break;}case v[_0x3836f6(0xe6)]:{const _0x145c08=(_0x104ed9=this[_0x3836f6(0x127)][_0x3836f6(0x105)](_0x5069f6[_0x3836f6(0x12f)])[_0x3836f6(0xec)](_0x2c30a0=>_0x2c30a0['threadId']===_0x5069f6[_0x3836f6(0xfb)]))==null?void 0x0:_0x104ed9[_0x3836f6(0x118)];_0x145c08&&this[_0x3836f6(0x127)][_0x3836f6(0x12b)](_0x59a87e,_0x1dade0,_0x145c08['id'],_0x5069f6['solved']===I[_0x3836f6(0x141)]);break;}}}));}};_=V([p(0x0,_0x59c243(_0x51f550)),p(0x1,_0x59c243(_0x5a5cbf)),p(0x2,_0x59c243(_0x14c9e0)),p(0x3,_0x59c243(_0xeb12e8))],_);const z=_0x4e6633(0x13a),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x17a9c7,_0x5a5276,_0x555dce,_0x1a3123)=>{const _0xf93cb9=_0x4e6633;for(var _0x3a512f=_0x1a3123>0x1?void 0x0:_0x1a3123?k(_0x5a5276,_0x555dce):_0x5a5276,_0xf825ae=_0x17a9c7[_0xf93cb9(0x102)]-0x1,_0x789ec1;_0xf825ae>=0x0;_0xf825ae--)(_0x789ec1=_0x17a9c7[_0xf825ae])&&(_0x3a512f=_0x789ec1(_0x3a512f)||_0x3a512f);return _0x3a512f;},b=(_0x5ee1c6,_0x424906)=>(_0x5b85c2,_0x2bc98e)=>_0x424906(_0x5b85c2,_0x2bc98e,_0x5ee1c6);function X(_0x5e99cb,_0x50b5d1){const _0x53ec89=_0x4e6633,_0x46df1d=_0x5e99cb['replies'][0x0];return{..._0x50b5d1,'id':_0x46df1d['replyId'],'resolved':_0x5e99cb['solved']===0x1,'dT':y(_0x46df1d[_0x53ec89(0x12c)]),'personId':_0x46df1d[_0x53ec89(0xdc)],'threadId':_0x46df1d['threadId']};}function ee(_0xea4671,_0x12c5dc,_0x39dafd){const _0x7065e2=_0x4e6633;var _0x5b1eb4,_0x4b953f;if(((_0x4b953f=(_0x5b1eb4=_0xea4671==null?void 0x0:_0xea4671[_0x7065e2(0xf4)])==null?void 0x0:_0x5b1eb4['length'])!=null?_0x4b953f:0x0)>0x0){const _0x139d94=(_0x2922d0,_0x5db686)=>({'id':_0x2922d0[_0x7065e2(0x139)],'threadId':_0x2922d0[_0x7065e2(0xfb)],'dT':y(_0x2922d0['createTimestamp']),'personId':_0x2922d0[_0x7065e2(0xdc)],'resolved':_0xea4671[_0x7065e2(0xf3)]===I[_0x7065e2(0x141)],'unitId':_0x12c5dc,'subUnitId':_0x39dafd,'text':JSON[_0x7065e2(0x113)](_0x2922d0['content']),'parentId':_0x5db686}),_0x146cc3=_0x139d94(_0xea4671['replies'][0x0]);return{..._0x146cc3,'children':_0xea4671[_0x7065e2(0xf4)][_0x7065e2(0xf8)](0x1)[_0x7065e2(0x130)](_0x4fbbaf=>_0x139d94(_0x4fbbaf,_0x146cc3['id']))};}return null;}let S=class{constructor(_0x3252fb,_0x45f3f6,_0xc9c70){const _0x471900=_0x4e6633;this[_0x471900(0x119)]=_0x3252fb,this['_userService']=_0x45f3f6,this[_0x471900(0xf6)]=_0xc9c70;}async[_0x4e6633(0xf9)](_0xb56829){const _0x47a5ee=_0x4e6633;var _0x813225,_0x1f7312;const {parentId:_0x100853,unitId:_0x573b9d,text:_0x435aaa,threadId:_0x252015}=_0xb56829,_0x13e0ff=(_0x1f7312=(_0x813225=_0x435aaa[_0x47a5ee(0x10f)])==null?void 0x0:_0x813225[_0x47a5ee(0x11d)](_0xc78e3=>_0xc78e3[_0x47a5ee(0x110)]===_0x507b57[_0x47a5ee(0x10c)])[_0x47a5ee(0x130)](_0x4e4773=>_0x4e4773[_0x47a5ee(0x120)]))!=null?_0x1f7312:[],_0xe10e94=JSON['stringify'](_0x435aaa),_0x5bc071=(await this[_0x47a5ee(0xf6)][_0x47a5ee(0xfe)](_0x573b9d))['getMemberID']();if(_0x100853){const _0x3ea10c={'memberId':_0x5bc071,'unitId':_0x573b9d,'content':_0xe10e94,'mention':_0x13e0ff,'threadId':_0x252015},_0x2b6183=(await this[_0x47a5ee(0x119)][_0x47a5ee(0x10a)]('/universer-api/comment/unit/'+_0x573b9d+_0x47a5ee(0xeb),{'body':_0x3ea10c}))[_0x47a5ee(0xef)][_0x47a5ee(0xdf)];return{..._0xb56829,'id':_0x2b6183['replyId'],'dT':_0x5a368a(+_0x2b6183[_0x47a5ee(0x12c)])[_0x47a5ee(0x137)](_0x47a5ee(0xe5)),'personId':_0x2b6183[_0x47a5ee(0xdc)]};}else{const _0x3bf463={'memberId':_0x5bc071,'unitId':_0x573b9d,'content':_0xe10e94,'mention':_0x13e0ff},_0x19eb77=await this[_0x47a5ee(0x119)][_0x47a5ee(0x10a)](_0x47a5ee(0x11b)+_0x573b9d+_0x47a5ee(0x111),{'body':_0x3bf463});return X(_0x19eb77[_0x47a5ee(0xef)][_0x47a5ee(0xee)],_0xb56829);}}async[_0x4e6633(0x11a)](_0x18b8de){const _0x1ed4a9=_0x4e6633;var _0x1294d1,_0x3a6392;const {text:_0x56a80b,unitId:_0x530052}=_0x18b8de,_0x32b931=(_0x3a6392=(_0x1294d1=_0x56a80b[_0x1ed4a9(0x10f)])==null?void 0x0:_0x1294d1[_0x1ed4a9(0x11d)](_0x5e4052=>_0x5e4052['rangeType']===_0x507b57[_0x1ed4a9(0x10c)])['map'](_0x58aef8=>_0x58aef8[_0x1ed4a9(0x120)]))!=null?_0x3a6392:[],_0x4459ff=JSON['stringify'](_0x56a80b),_0x56aeb3=_0x18b8de[_0x1ed4a9(0xfb)],_0x230239=_0x18b8de['id'],_0x5f2b30={'memberId':(await this[_0x1ed4a9(0xf6)][_0x1ed4a9(0xfe)](_0x530052))[_0x1ed4a9(0x103)](),'unitId':_0x530052,'threadId':_0x56aeb3,'mention':_0x32b931,'content':_0x4459ff,'replyId':_0x230239},_0x566307=await this[_0x1ed4a9(0x119)][_0x1ed4a9(0x10a)]('/universer-api/comment/unit/'+_0x530052+_0x1ed4a9(0x13e),{'body':_0x5f2b30});return!_0x566307['body'][_0x1ed4a9(0x107)]||_0x566307[_0x1ed4a9(0xef)][_0x1ed4a9(0x107)][_0x1ed4a9(0x124)]===0x1;}async[_0x4e6633(0x12b)](_0x118a61){const _0x4555dc=_0x4e6633,{unitId:_0x5939e5}=_0x118a61,_0x268203=_0x118a61[_0x4555dc(0xfb)],_0x432e79={'memberId':this[_0x4555dc(0x10d)][_0x4555dc(0x142)]()[_0x4555dc(0x121)],'unitId':_0x5939e5,'threadId':_0x268203,'solved':_0x118a61[_0x4555dc(0x134)]?I['Solved']:I[_0x4555dc(0x116)]},_0x2b7ced=await this[_0x4555dc(0x119)][_0x4555dc(0x10a)](_0x4555dc(0x11b)+_0x5939e5+_0x4555dc(0x10b),{'body':_0x432e79});return!_0x2b7ced['body']['error']||_0x2b7ced[_0x4555dc(0xef)][_0x4555dc(0x107)][_0x4555dc(0x124)]===0x1;}async[_0x4e6633(0x11f)](_0x1a03c6,_0x507932,_0xf3ecfc,_0x438c97){const _0x47b3c4=_0x4e6633,_0x1caae2={'memberId':(await this[_0x47b3c4(0xf6)][_0x47b3c4(0xfe)](_0x1a03c6))[_0x47b3c4(0x103)](),'threadId':_0xf3ecfc,'replyId':_0x438c97,'unitId':_0x1a03c6},_0x24eb38=await this[_0x47b3c4(0x119)][_0x47b3c4(0x10a)](_0x47b3c4(0x11b)+_0x1a03c6+'/delete',{'body':_0x1caae2});return!_0x24eb38[_0x47b3c4(0xef)][_0x47b3c4(0x107)]||_0x24eb38[_0x47b3c4(0xef)]['error'][_0x47b3c4(0x124)]===0x1;}async[_0x4e6633(0x138)](_0x324fcc,_0xa7fde8,_0x15a6ef){const _0x49f7e6=_0x4e6633,_0x1b87d4={'unitId':_0x324fcc,'threadId':_0x15a6ef},_0x15a7dc=await this[_0x49f7e6(0x119)][_0x49f7e6(0x10a)](_0x49f7e6(0x11b)+_0x324fcc+_0x49f7e6(0x11e),{'body':_0x1b87d4}),_0x37a446=_0x15a6ef[_0x49f7e6(0x130)](_0x26e25c=>ee(_0x15a7dc['body'][_0x49f7e6(0x133)][_0x26e25c],_0x324fcc,_0xa7fde8))[_0x49f7e6(0x11d)](Boolean);return Object['values'](_0x15a7dc[_0x49f7e6(0xef)][_0x49f7e6(0xf1)])['forEach'](_0x56c66b=>{const _0x508dd6=_0x49f7e6;this[_0x508dd6(0x10d)][_0x508dd6(0x104)](_0x56c66b);}),_0x37a446;}[_0x4e6633(0xe1)](_0x2fdd62){const _0x26f10f=_0x4e6633;return{'id':_0x2fdd62['id'],'threadId':_0x2fdd62[_0x26f10f(0xfb)],'ref':_0x2fdd62[_0x26f10f(0x117)]};}};S=Q([b(0x0,_0x59c243(_0x168213)),b(0x1,_0x59c243(_0x14c9e0)),b(0x2,_0x59c243(_0xa66c1b))],S);var re=Object[_0x4e6633(0xe3)],te=(_0x40c8f6,_0x823409,_0x4b5d99,_0x1d41dc)=>{for(var _0xd10a8=_0x1d41dc>0x1?void 0x0:_0x1d41dc?re(_0x823409,_0x4b5d99):_0x823409,_0x419cd9=_0x40c8f6['length']-0x1,_0x55be1c;_0x419cd9>=0x0;_0x419cd9--)(_0x55be1c=_0x40c8f6[_0x419cd9])&&(_0xd10a8=_0x55be1c(_0xd10a8)||_0xd10a8);return _0xd10a8;},M=(_0x1c7f58,_0x19937b)=>(_0x3292a0,_0x2fe54b)=>_0x19937b(_0x3292a0,_0x2fe54b,_0x1c7f58);let f=class extends _0x31c99b{constructor(_0x27dd17,_0x1aaa59){const _0x50c989=_0x4e6633;super(),this[_0x50c989(0x126)]=_0x27dd17,this[_0x50c989(0x112)]=_0x1aaa59,this[_0x50c989(0xf7)]();}[_0x4e6633(0xf7)](){const _0x35b4cd=_0x4e6633;this[_0x35b4cd(0x126)][_0x35b4cd(0xde)]=this[_0x35b4cd(0x112)],this[_0x35b4cd(0x126)][_0x35b4cd(0xfa)]=!0x1;}};f=te([M(0x0,_0x4c2523),M(0x1,_0x59c243(S))],f);var se=Object[_0x4e6633(0xfc)],oe=Object[_0x4e6633(0xe3)],ne=(_0x4c5daf,_0x380fa3,_0x4b9ee7)=>_0x380fa3 in _0x4c5daf?se(_0x4c5daf,_0x380fa3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4b9ee7}):_0x4c5daf[_0x380fa3]=_0x4b9ee7,ie=(_0x2d3d4f,_0x55daa3,_0x211fba,_0x5e3b55)=>{const _0xb4cca4=_0x4e6633;for(var _0x193e4a=_0x5e3b55>0x1?void 0x0:_0x5e3b55?oe(_0x55daa3,_0x211fba):_0x55daa3,_0x3b55d1=_0x2d3d4f[_0xb4cca4(0x102)]-0x1,_0x589348;_0x3b55d1>=0x0;_0x3b55d1--)(_0x589348=_0x2d3d4f[_0x3b55d1])&&(_0x193e4a=_0x589348(_0x193e4a)||_0x193e4a);return _0x193e4a;},N=(_0x240564,_0x4dc48b)=>(_0x2b9c66,_0x3181d9)=>_0x4dc48b(_0x2b9c66,_0x3181d9,_0x240564),$=(_0x2d1798,_0x4a9f2f,_0x328cc4)=>ne(_0x2d1798,typeof _0x4a9f2f!='symbol'?_0x4a9f2f+'':_0x4a9f2f,_0x328cc4);let g=class extends _0x3c3863{constructor(_0x4ef847=O,_0x270a18,_0x24cb99){const _0x5b9b7f=_0x4e6633;super(),this[_0x5b9b7f(0x11c)]=_0x4ef847,this[_0x5b9b7f(0x13c)]=_0x270a18,this[_0x5b9b7f(0xe8)]=_0x24cb99;const {..._0x369556}=_0x1f9a22({},O,this[_0x5b9b7f(0x11c)]);this[_0x5b9b7f(0xe8)][_0x5b9b7f(0x143)](z,_0x369556);}[_0x4e6633(0xf0)](){const _0x49a3b8=_0x4e6633;[[S],[f],[_]][_0x49a3b8(0x101)](_0x4ae5c3=>{const _0x222584=_0x49a3b8;this[_0x222584(0x13c)][_0x222584(0xe0)](_0x4ae5c3);});}[_0x4e6633(0x12e)](){const _0x18a20c=_0x4e6633;this[_0x18a20c(0x13c)][_0x18a20c(0x114)](f),this[_0x18a20c(0x13c)]['get'](_);}};function _0x5f0e(_0x4ba7b8,_0x48f542){_0x4ba7b8=_0x4ba7b8-0xdc;const _0x238f7d=_0x238f();let _0x5f0e4f=_0x238f7d[_0x4ba7b8];return _0x5f0e4f;}$(g,_0x4e6633(0xe9),W),$(g,_0x4e6633(0xea),_0x6e2e34['UNIVER_UNKNOWN']),g=ie([_0x356271(_0x1aeb4f,_0x4407ef,_0x211b08),N(0x1,_0x59c243(_0xeb12e8)),N(0x2,_0x40e862)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x1db4(_0x2b44be,_0x19edba){_0x2b44be=_0x2b44be-0xf9;const _0x17c55a=_0x17c5();let _0x1db470=_0x17c55a[_0x2b44be];return _0x1db470;}const _0x452b23=_0x1db4;(function(_0x49ca60,_0x45c3b0){const _0x4a8af5=_0x1db4,_0x218d70=_0x49ca60();while(!![]){try{const _0x377ab4=parseInt(_0x4a8af5(0x11b))/0x1+-parseInt(_0x4a8af5(0x128))/0x2*(parseInt(_0x4a8af5(0x115))/0x3)+parseInt(_0x4a8af5(0x104))/0x4+-parseInt(_0x4a8af5(0x132))/0x5*(-parseInt(_0x4a8af5(0x126))/0x6)+-parseInt(_0x4a8af5(0x107))/0x7+-parseInt(_0x4a8af5(0x10a))/0x8+parseInt(_0x4a8af5(0x117))/0x9;if(_0x377ab4===_0x45c3b0)break;else _0x218d70['push'](_0x218d70['shift']());}catch(_0x47539c){_0x218d70['push'](_0x218d70['shift']());}}}(_0x17c5,0xec0b8));import{CommentService as _0x12c24f,CollaborationSessionService as _0x395936,UniverCollaborationClientPlugin as _0x354fd9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3ba035}from'@univerjs-pro/license';import{dayjs as _0xe06112,UserManagerService as _0x48d6a8,Inject as _0x437e4f,Injector as _0x50e8a0,Disposable as _0x4f537f,CustomRangeType as _0x128584,UniverInstanceType as _0x41babf,DependentOn as _0x49f4f5,IConfigService as _0x4181a7,Plugin as _0x37f55a,merge as _0x127711}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x36ebce}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3e56e2,IThreadCommentDataSourceService as _0x33be8b}from'@univerjs/thread-comment';import{bufferTime as _0x458aca}from'rxjs';import{HTTPService as _0x37c7be}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0x17c5(){const _0x762096=['get','add','onReady','map','addComment','getCurrentUser','setConfig','customRanges','unitId','stringify','_threadCommentDataSourceService','replies','Reply','root','/add','resolved','/reply','replyId','disposeWithMe','reply','delete','userId','YYYY/MM/DD\x20HH:mm','dataSource','createTimestamp','/solved','commentUpdate$','subscribe','Add','comments','_threadCommentModel','format','onStarting','code','solved','_commentService','deleteComment','_config','defineProperty','_configService','userID','Delete','requireSession','UNIVER_UNKNOWN','Solved','getOwnPropertyDescriptor','values','5244256aaUntP','OpenOrReOpen','Solve','13519107xfKIVV','symbol','comment','1519848WYhYRI','parse','UNRECOGNIZED','length','_sessionService','getMemberID','updateComment','personId','thread-comment-data-source.config','threadId','listComments','3ZlkCIH','syncUpdateMutationToColla','11280600tmtsGf','resolveComment','_threadCommentDataSource','getUnit','314846PavOvV','COMMENT','Edit','addUser','/universer-api/comment/unit/','pluginName','_initUserSync','/list','user','rangeType','filter','6clGQyu','_injector','2378942HBpgKQ','Unknown','post','_httpService','/universer-api/user/list','payload','forEach','getUser','_init','body','6991415ejHbDA','slice','_initDataSource','parentId','error','content','_userService','type','rangeId'];_0x17c5=function(){return _0x762096;};return _0x17c5();}var I=(_0x10eddc=>(_0x10eddc[_0x10eddc[_0x452b23(0x105)]=0x0]='OpenOrReOpen',_0x10eddc[_0x10eddc[_0x452b23(0x101)]=0x1]=_0x452b23(0x101),_0x10eddc[_0x10eddc[_0x452b23(0x10c)]=-0x1]='UNRECOGNIZED',_0x10eddc))(I||{}),v=(_0x569aa1=>(_0x569aa1[_0x569aa1[_0x452b23(0x129)]=0x0]=_0x452b23(0x129),_0x569aa1[_0x569aa1[_0x452b23(0x157)]=0x1]=_0x452b23(0x157),_0x569aa1[_0x569aa1[_0x452b23(0x147)]=0x2]=_0x452b23(0x147),_0x569aa1[_0x569aa1[_0x452b23(0x11d)]=0x3]=_0x452b23(0x11d),_0x569aa1[_0x569aa1[_0x452b23(0xfe)]=0x4]=_0x452b23(0xfe),_0x569aa1[_0x569aa1[_0x452b23(0x106)]=0x5]='Solve',_0x569aa1[_0x569aa1[_0x452b23(0x10c)]=-0x1]=_0x452b23(0x10c),_0x569aa1))(v||{});const y=_0x3f4573=>_0xe06112(new Date(+_0x3f4573))[_0x452b23(0x15a)](_0x452b23(0x151)),B=async(_0x1e7ec3,_0x2b0b8d)=>{const _0x3a75d8=_0x452b23,_0x37a653=_0x1e7ec3['get'](_0x48d6a8),_0xc7daa2=_0x1e7ec3['get'](_0x37c7be);_0x2b0b8d['forEach'](_0x2f2895=>{const _0x1c235c=_0x1db4;_0x37a653[_0x1c235c(0x12f)](_0x2f2895)&&_0x2b0b8d[_0x1c235c(0x14f)](_0x2f2895);}),_0x2b0b8d['size']&&(await _0xc7daa2[_0x3a75d8(0x13b)](_0x3a75d8(0x12c),{'params':{'userIDs':[..._0x2b0b8d]}}))[_0x3a75d8(0x131)]['users'][_0x3a75d8(0x12e)](_0x3f0e93=>{const _0x8a7620=_0x3a75d8;_0x3f0e93&&_0x37a653[_0x8a7620(0x11e)](_0x3f0e93);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x1c7b92,_0x4c514b,_0x1f7845,_0x37e144)=>{for(var _0x2ed57f=_0x37e144>0x1?void 0x0:_0x37e144?K(_0x4c514b,_0x1f7845):_0x4c514b,_0x130caa=_0x1c7b92['length']-0x1,_0x20e6e0;_0x130caa>=0x0;_0x130caa--)(_0x20e6e0=_0x1c7b92[_0x130caa])&&(_0x2ed57f=_0x20e6e0(_0x2ed57f)||_0x2ed57f);return _0x2ed57f;},p=(_0x5af7b0,_0x493324)=>(_0x5c53d8,_0x508315)=>_0x493324(_0x5c53d8,_0x508315,_0x5af7b0);let _=class extends _0x4f537f{constructor(_0x507d4a,_0x1402d9,_0x203982,_0xedaf3c){const _0x5f530c=_0x452b23;super(),this[_0x5f530c(0x15e)]=_0x507d4a,this[_0x5f530c(0x159)]=_0x1402d9,this[_0x5f530c(0x138)]=_0x203982,this[_0x5f530c(0x127)]=_0xedaf3c,this[_0x5f530c(0x130)](),this[_0x5f530c(0x121)]();}['_initUserSync'](){const _0x53a591=_0x452b23;this[_0x53a591(0x14d)](this[_0x53a591(0x159)][_0x53a591(0x155)]['pipe'](_0x458aca(0x10))[_0x53a591(0x156)](_0x179017=>{const _0x201e87=_0x53a591,_0x2c2a9a=new Set();_0x179017[_0x201e87(0x12e)](_0x516510=>{const _0x12be3d=_0x201e87;if(_0x516510['type']===_0x12be3d(0x13c)){const _0x13152f=_0x516510[_0x12be3d(0x12d)][_0x12be3d(0x111)];_0x2c2a9a[_0x12be3d(0x13c)](_0x13152f);}}),B(this[_0x201e87(0x127)],_0x2c2a9a);}));}[_0x452b23(0x130)](){const _0x5d1f11=_0x452b23;this['disposeWithMe'](this['_commentService'][_0x5d1f11(0x155)][_0x5d1f11(0x156)](async _0x3031b1=>{const _0x316597=_0x5d1f11;var _0x2cc02c,_0x3b51d2,_0x37cab6,_0x5e8d73;const _0x268e04=(_0x2cc02c=this['_threadCommentModel'][_0x316597(0x11a)](_0x3031b1[_0x316597(0x143)])['find'](_0x473154=>_0x473154[_0x316597(0x113)]===_0x3031b1[_0x316597(0x113)]))==null?void 0x0:_0x2cc02c['root'];if(!_0x268e04)return;const {unitId:_0x5b3d28,subUnitId:_0x435b55}=_0x268e04;switch(_0x3031b1[_0x316597(0x123)]&&this['_userService'][_0x316597(0x11e)](_0x3031b1[_0x316597(0x123)]),_0x3031b1[_0x316597(0x139)]){case v[_0x316597(0x157)]:break;case v[_0x316597(0x147)]:{this['_threadCommentModel'][_0x316597(0x13f)](_0x5b3d28,_0x435b55,{'unitId':_0x5b3d28,'subUnitId':_0x435b55,'ref':'','id':_0x3031b1[_0x316597(0x14c)],'dT':y(+_0x3031b1[_0x316597(0x153)]),'threadId':_0x3031b1[_0x316597(0x113)],'personId':(_0x37cab6=(_0x3b51d2=_0x3031b1[_0x316597(0x123)])==null?void 0x0:_0x3b51d2[_0x316597(0xfd)])!=null?_0x37cab6:_0x3031b1[_0x316597(0x150)],'text':JSON[_0x316597(0x10b)](_0x3031b1[_0x316597(0x137)]),'parentId':_0x268e04['id']});break;}case v[_0x316597(0xfe)]:{const _0xeaa323=this[_0x316597(0x159)]['getComment'](_0x5b3d28,_0x435b55,_0x3031b1[_0x316597(0x14c)]);_0xeaa323&&_0xeaa323[_0x316597(0x135)]&&this[_0x316597(0x159)]['deleteComment'](_0x5b3d28,_0x435b55,_0x3031b1[_0x316597(0x14c)]);break;}case v[_0x316597(0x11d)]:{this[_0x316597(0x159)][_0x316597(0x110)](_0x5b3d28,_0x435b55,{'commentId':_0x3031b1[_0x316597(0x14c)],'text':JSON['parse'](_0x3031b1[_0x316597(0x137)])});break;}case v[_0x316597(0x106)]:{const _0x854ef1=(_0x5e8d73=this[_0x316597(0x159)]['getUnit'](_0x3031b1[_0x316597(0x143)])['find'](_0x2f3487=>_0x2f3487['threadId']===_0x3031b1[_0x316597(0x113)]))==null?void 0x0:_0x5e8d73[_0x316597(0x148)];_0x854ef1&&this[_0x316597(0x159)][_0x316597(0x118)](_0x5b3d28,_0x435b55,_0x854ef1['id'],_0x3031b1['solved']===I[_0x316597(0x101)]);break;}}}));}};_=V([p(0x0,_0x437e4f(_0x12c24f)),p(0x1,_0x437e4f(_0x3e56e2)),p(0x2,_0x437e4f(_0x48d6a8)),p(0x3,_0x437e4f(_0x50e8a0))],_);const z=_0x452b23(0x112),O={};var k=Object[_0x452b23(0x102)],Q=(_0x41e29a,_0x2956a7,_0x2595eb,_0x36088d)=>{for(var _0xaad226=_0x36088d>0x1?void 0x0:_0x36088d?k(_0x2956a7,_0x2595eb):_0x2956a7,_0x40a588=_0x41e29a['length']-0x1,_0x133b4d;_0x40a588>=0x0;_0x40a588--)(_0x133b4d=_0x41e29a[_0x40a588])&&(_0xaad226=_0x133b4d(_0xaad226)||_0xaad226);return _0xaad226;},b=(_0x4f7c9a,_0x168885)=>(_0x2bd8fc,_0x37a43b)=>_0x168885(_0x2bd8fc,_0x37a43b,_0x4f7c9a);function X(_0x350da9,_0x151f36){const _0x509d5d=_0x452b23,_0xa08899=_0x350da9[_0x509d5d(0x146)][0x0];return{..._0x151f36,'id':_0xa08899[_0x509d5d(0x14c)],'resolved':_0x350da9[_0x509d5d(0x15d)]===0x1,'dT':y(_0xa08899[_0x509d5d(0x153)]),'personId':_0xa08899[_0x509d5d(0x150)],'threadId':_0xa08899[_0x509d5d(0x113)]};}function ee(_0x1ddb27,_0x1e05f0,_0x306943){const _0x1128d1=_0x452b23;var _0x5dca3b,_0x169bd6;if(((_0x169bd6=(_0x5dca3b=_0x1ddb27==null?void 0x0:_0x1ddb27[_0x1128d1(0x146)])==null?void 0x0:_0x5dca3b['length'])!=null?_0x169bd6:0x0)>0x0){const _0x3fb377=(_0x52495b,_0x297119)=>({'id':_0x52495b['replyId'],'threadId':_0x52495b[_0x1128d1(0x113)],'dT':y(_0x52495b[_0x1128d1(0x153)]),'personId':_0x52495b['userId'],'resolved':_0x1ddb27[_0x1128d1(0x15d)]===I['Solved'],'unitId':_0x1e05f0,'subUnitId':_0x306943,'text':JSON[_0x1128d1(0x10b)](_0x52495b['content']),'parentId':_0x297119}),_0x2d13c4=_0x3fb377(_0x1ddb27[_0x1128d1(0x146)][0x0]);return{..._0x2d13c4,'children':_0x1ddb27['replies'][_0x1128d1(0x133)](0x1)[_0x1128d1(0x13e)](_0x3ef85a=>_0x3fb377(_0x3ef85a,_0x2d13c4['id']))};}return null;}let S=class{constructor(_0x7d1fcd,_0xce3f7,_0x157859){const _0x442d80=_0x452b23;this[_0x442d80(0x12b)]=_0x7d1fcd,this['_userService']=_0xce3f7,this[_0x442d80(0x10e)]=_0x157859;}async[_0x452b23(0x13f)](_0x19b0d3){const _0x5e68aa=_0x452b23;var _0x27e403,_0x29b3af;const {parentId:_0x36f965,unitId:_0x10ccae,text:_0x334a8b,threadId:_0x58c016}=_0x19b0d3,_0x1ed14e=(_0x29b3af=(_0x27e403=_0x334a8b[_0x5e68aa(0x142)])==null?void 0x0:_0x27e403[_0x5e68aa(0x125)](_0x50765c=>_0x50765c[_0x5e68aa(0x124)]===_0x128584[_0x5e68aa(0x11c)])[_0x5e68aa(0x13e)](_0xf4ee76=>_0xf4ee76['rangeId']))!=null?_0x29b3af:[],_0x3a8913=JSON['stringify'](_0x334a8b),_0x324d21=(await this[_0x5e68aa(0x10e)]['requireSession'](_0x10ccae))[_0x5e68aa(0x10f)]();if(_0x36f965){const _0x46402b={'memberId':_0x324d21,'unitId':_0x10ccae,'content':_0x3a8913,'mention':_0x1ed14e,'threadId':_0x58c016},_0x60c34b=(await this[_0x5e68aa(0x12b)][_0x5e68aa(0x12a)](_0x5e68aa(0x11f)+_0x10ccae+_0x5e68aa(0x14b),{'body':_0x46402b}))[_0x5e68aa(0x131)][_0x5e68aa(0x14e)];return{..._0x19b0d3,'id':_0x60c34b['replyId'],'dT':_0xe06112(+_0x60c34b['createTimestamp'])[_0x5e68aa(0x15a)](_0x5e68aa(0x151)),'personId':_0x60c34b[_0x5e68aa(0x150)]};}else{const _0x21ed5c={'memberId':_0x324d21,'unitId':_0x10ccae,'content':_0x3a8913,'mention':_0x1ed14e},_0x438825=await this['_httpService']['post'](_0x5e68aa(0x11f)+_0x10ccae+_0x5e68aa(0x149),{'body':_0x21ed5c});return X(_0x438825[_0x5e68aa(0x131)][_0x5e68aa(0x109)],_0x19b0d3);}}async[_0x452b23(0x110)](_0x42822e){const _0xd9dd6c=_0x452b23;var _0x38626c,_0x48240f;const {text:_0x1825a0,unitId:_0x449a64}=_0x42822e,_0x2037a7=(_0x48240f=(_0x38626c=_0x1825a0['customRanges'])==null?void 0x0:_0x38626c[_0xd9dd6c(0x125)](_0x26bb4e=>_0x26bb4e[_0xd9dd6c(0x124)]===_0x128584[_0xd9dd6c(0x11c)])[_0xd9dd6c(0x13e)](_0xf3484e=>_0xf3484e[_0xd9dd6c(0x13a)]))!=null?_0x48240f:[],_0x585f4a=JSON[_0xd9dd6c(0x144)](_0x1825a0),_0x2d8dde=_0x42822e[_0xd9dd6c(0x113)],_0x23f0c7=_0x42822e['id'],_0x5426c7={'memberId':(await this[_0xd9dd6c(0x10e)]['requireSession'](_0x449a64))[_0xd9dd6c(0x10f)](),'unitId':_0x449a64,'threadId':_0x2d8dde,'mention':_0x2037a7,'content':_0x585f4a,'replyId':_0x23f0c7},_0x56e7a7=await this['_httpService']['post'](_0xd9dd6c(0x11f)+_0x449a64+'/edit',{'body':_0x5426c7});return!_0x56e7a7['body'][_0xd9dd6c(0x136)]||_0x56e7a7['body'][_0xd9dd6c(0x136)][_0xd9dd6c(0x15c)]===0x1;}async[_0x452b23(0x118)](_0x3b4fe3){const _0xa112e8=_0x452b23,{unitId:_0x43bc74}=_0x3b4fe3,_0x3d1767=_0x3b4fe3[_0xa112e8(0x113)],_0x1b3b62={'memberId':this[_0xa112e8(0x138)][_0xa112e8(0x140)]()['userID'],'unitId':_0x43bc74,'threadId':_0x3d1767,'solved':_0x3b4fe3[_0xa112e8(0x14a)]?I[_0xa112e8(0x101)]:I[_0xa112e8(0x105)]},_0xc7700d=await this[_0xa112e8(0x12b)][_0xa112e8(0x12a)]('/universer-api/comment/unit/'+_0x43bc74+_0xa112e8(0x154),{'body':_0x1b3b62});return!_0xc7700d[_0xa112e8(0x131)][_0xa112e8(0x136)]||_0xc7700d[_0xa112e8(0x131)][_0xa112e8(0x136)]['code']===0x1;}async[_0x452b23(0xf9)](_0xdc9ee5,_0x2f425f,_0x2a74cb,_0x27dc83){const _0x593d3f=_0x452b23,_0x23fbea={'memberId':(await this['_sessionService'][_0x593d3f(0xff)](_0xdc9ee5))['getMemberID'](),'threadId':_0x2a74cb,'replyId':_0x27dc83,'unitId':_0xdc9ee5},_0x556321=await this[_0x593d3f(0x12b)][_0x593d3f(0x12a)](_0x593d3f(0x11f)+_0xdc9ee5+'/delete',{'body':_0x23fbea});return!_0x556321[_0x593d3f(0x131)][_0x593d3f(0x136)]||_0x556321[_0x593d3f(0x131)][_0x593d3f(0x136)][_0x593d3f(0x15c)]===0x1;}async[_0x452b23(0x114)](_0x304ca5,_0x40c13a,_0x1f35f7){const _0x2ea717=_0x452b23,_0x3639bb={'unitId':_0x304ca5,'threadId':_0x1f35f7},_0x144cc6=await this[_0x2ea717(0x12b)][_0x2ea717(0x12a)](_0x2ea717(0x11f)+_0x304ca5+_0x2ea717(0x122),{'body':_0x3639bb}),_0x343d2c=_0x1f35f7[_0x2ea717(0x13e)](_0x2f8761=>ee(_0x144cc6['body'][_0x2ea717(0x158)][_0x2f8761],_0x304ca5,_0x40c13a))[_0x2ea717(0x125)](Boolean);return Object[_0x2ea717(0x103)](_0x144cc6['body']['users'])['forEach'](_0x3b7e69=>{const _0x435c67=_0x2ea717;this[_0x435c67(0x138)][_0x435c67(0x11e)](_0x3b7e69);}),_0x343d2c;}['saveCommentToSnapshot'](_0x7a6e89){const _0x73331c=_0x452b23;return{'id':_0x7a6e89['id'],'threadId':_0x7a6e89[_0x73331c(0x113)],'ref':_0x7a6e89['ref']};}};S=Q([b(0x0,_0x437e4f(_0x37c7be)),b(0x1,_0x437e4f(_0x48d6a8)),b(0x2,_0x437e4f(_0x395936))],S);var re=Object[_0x452b23(0x102)],te=(_0x29be48,_0x2c84ec,_0x4a7ebd,_0x1af60a)=>{const _0x42d23f=_0x452b23;for(var _0x5391e7=_0x1af60a>0x1?void 0x0:_0x1af60a?re(_0x2c84ec,_0x4a7ebd):_0x2c84ec,_0x70053c=_0x29be48[_0x42d23f(0x10d)]-0x1,_0x19d67d;_0x70053c>=0x0;_0x70053c--)(_0x19d67d=_0x29be48[_0x70053c])&&(_0x5391e7=_0x19d67d(_0x5391e7)||_0x5391e7);return _0x5391e7;},M=(_0x2ad0cf,_0x516c13)=>(_0x55be30,_0x24d0d2)=>_0x516c13(_0x55be30,_0x24d0d2,_0x2ad0cf);let f=class extends _0x4f537f{constructor(_0x5f2187,_0x347bd3){const _0x46b6b9=_0x452b23;super(),this[_0x46b6b9(0x145)]=_0x5f2187,this[_0x46b6b9(0x119)]=_0x347bd3,this['_initDataSource']();}[_0x452b23(0x134)](){const _0x2a12ca=_0x452b23;this[_0x2a12ca(0x145)][_0x2a12ca(0x152)]=this[_0x2a12ca(0x119)],this[_0x2a12ca(0x145)][_0x2a12ca(0x116)]=!0x1;}};f=te([M(0x0,_0x33be8b),M(0x1,_0x437e4f(S))],f);var se=Object[_0x452b23(0xfb)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x252929,_0x35f054,_0x39c7fd)=>_0x35f054 in _0x252929?se(_0x252929,_0x35f054,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x39c7fd}):_0x252929[_0x35f054]=_0x39c7fd,ie=(_0x587562,_0x49e33e,_0x34a790,_0x194ee)=>{const _0x5029aa=_0x452b23;for(var _0x52634c=_0x194ee>0x1?void 0x0:_0x194ee?oe(_0x49e33e,_0x34a790):_0x49e33e,_0x3111eb=_0x587562[_0x5029aa(0x10d)]-0x1,_0x404025;_0x3111eb>=0x0;_0x3111eb--)(_0x404025=_0x587562[_0x3111eb])&&(_0x52634c=_0x404025(_0x52634c)||_0x52634c);return _0x52634c;},N=(_0x13861f,_0x59622a)=>(_0x2849c4,_0x218c94)=>_0x59622a(_0x2849c4,_0x218c94,_0x13861f),$=(_0x1138f2,_0x322a97,_0x2cc85b)=>ne(_0x1138f2,typeof _0x322a97!=_0x452b23(0x108)?_0x322a97+'':_0x322a97,_0x2cc85b);let g=class extends _0x37f55a{constructor(_0x3a6c21=O,_0x25385d,_0x48ead6){const _0x437700=_0x452b23;super(),this[_0x437700(0xfa)]=_0x3a6c21,this[_0x437700(0x127)]=_0x25385d,this[_0x437700(0xfc)]=_0x48ead6;const {..._0x2c64dc}=_0x127711({},O,this[_0x437700(0xfa)]);this[_0x437700(0xfc)][_0x437700(0x141)](z,_0x2c64dc);}[_0x452b23(0x15b)](){const _0x23a1ac=_0x452b23;[[S],[f],[_]][_0x23a1ac(0x12e)](_0x5d54e9=>{const _0x54a9c1=_0x23a1ac;this['_injector'][_0x54a9c1(0x13c)](_0x5d54e9);});}[_0x452b23(0x13d)](){const _0x17c8b4=_0x452b23;this[_0x17c8b4(0x127)][_0x17c8b4(0x13b)](f),this['_injector'][_0x17c8b4(0x13b)](_);}};$(g,_0x452b23(0x120),W),$(g,_0x452b23(0x139),_0x41babf[_0x452b23(0x100)]),g=ie([_0x49f4f5(_0x36ebce,_0x354fd9,_0x3ba035),N(0x1,_0x437e4f(_0x50e8a0)),N(0x2,_0x4181a7)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x4e6633=_0x5f0e;function _0x238f(){const _0x3248d2=['1327404bPHrJY','dataSource','reply','add','saveCommentToSnapshot','1133530jOLYBC','getOwnPropertyDescriptor','_commentService','YYYY/MM/DD\x20HH:mm','Solve','user','_configService','pluginName','type','/reply','find','parentId','comment','body','onStarting','users','Add','solved','replies','_init','_sessionService','_initDataSource','slice','addComment','syncUpdateMutationToColla','threadId','defineProperty','5688179OEGoRC','requireSession','20zJuRBB','23MkBQQs','forEach','length','getMemberID','addUser','getUnit','_initUserSync','error','Delete','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','post','/solved','COMMENT','_userService','Reply','customRanges','rangeType','/add','_threadCommentDataSource','parse','get','5729874WSqVhZ','OpenOrReOpen','ref','root','_httpService','updateComment','/universer-api/comment/unit/','_config','filter','/list','deleteComment','rangeId','userID','commentUpdate$','pipe','code','/universer-api/user/list','_threadCommentDataSourceService','_threadCommentModel','UNRECOGNIZED','subscribe','Edit','resolveComment','createTimestamp','6171520BKqFDy','onReady','unitId','map','personId','122586bVjpeH','comments','resolved','disposeWithMe','size','format','listComments','replyId','thread-comment-data-source.config','content','_injector','14848371jYQZJy','/edit','Unknown','payload','Solved','getCurrentUser','setConfig','userId'];_0x238f=function(){return _0x3248d2;};return _0x238f();}(function(_0x88fc0d,_0x2cb5ee){const _0x4ca88f=_0x5f0e,_0xfc3d08=_0x88fc0d();while(!![]){try{const _0x37d617=parseInt(_0x4ca88f(0x100))/0x1*(parseInt(_0x4ca88f(0x132))/0x2)+-parseInt(_0x4ca88f(0xdd))/0x3+parseInt(_0x4ca88f(0xff))/0x4*(-parseInt(_0x4ca88f(0xe2))/0x5)+parseInt(_0x4ca88f(0x115))/0x6+-parseInt(_0x4ca88f(0xfd))/0x7+-parseInt(_0x4ca88f(0x12d))/0x8+parseInt(_0x4ca88f(0x13d))/0x9;if(_0x37d617===_0x2cb5ee)break;else _0xfc3d08['push'](_0xfc3d08['shift']());}catch(_0x3ec3f2){_0xfc3d08['push'](_0xfc3d08['shift']());}}}(_0x238f,0xd09e6));import{CommentService as _0x51f550,CollaborationSessionService as _0xa66c1b,UniverCollaborationClientPlugin as _0x4407ef}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x211b08}from'@univerjs-pro/license';import{dayjs as _0x5a368a,UserManagerService as _0x14c9e0,Inject as _0x59c243,Injector as _0xeb12e8,Disposable as _0x31c99b,CustomRangeType as _0x507b57,UniverInstanceType as _0x6e2e34,DependentOn as _0x356271,IConfigService as _0x40e862,Plugin as _0x3c3863,merge as _0x1f9a22}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1aeb4f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5a5cbf,IThreadCommentDataSourceService as _0x4c2523}from'@univerjs/thread-comment';import{bufferTime as _0x1340dd}from'rxjs';import{HTTPService as _0x168213}from'@univerjs/network';const W=_0x4e6633(0x109);var I=(_0x26ccf4=>(_0x26ccf4[_0x26ccf4[_0x4e6633(0x116)]=0x0]=_0x4e6633(0x116),_0x26ccf4[_0x26ccf4[_0x4e6633(0x141)]=0x1]='Solved',_0x26ccf4[_0x26ccf4[_0x4e6633(0x128)]=-0x1]=_0x4e6633(0x128),_0x26ccf4))(I||{}),v=(_0x208890=>(_0x208890[_0x208890[_0x4e6633(0x13f)]=0x0]=_0x4e6633(0x13f),_0x208890[_0x208890[_0x4e6633(0xf2)]=0x1]=_0x4e6633(0xf2),_0x208890[_0x208890[_0x4e6633(0x10e)]=0x2]=_0x4e6633(0x10e),_0x208890[_0x208890[_0x4e6633(0x12a)]=0x3]=_0x4e6633(0x12a),_0x208890[_0x208890[_0x4e6633(0x108)]=0x4]=_0x4e6633(0x108),_0x208890[_0x208890[_0x4e6633(0xe6)]=0x5]=_0x4e6633(0xe6),_0x208890[_0x208890[_0x4e6633(0x128)]=-0x1]=_0x4e6633(0x128),_0x208890))(v||{});const y=_0x25a459=>_0x5a368a(new Date(+_0x25a459))['format'](_0x4e6633(0xe5)),B=async(_0x431041,_0x25de81)=>{const _0x32550e=_0x4e6633,_0x277cb3=_0x431041[_0x32550e(0x114)](_0x14c9e0),_0x465395=_0x431041[_0x32550e(0x114)](_0x168213);_0x25de81[_0x32550e(0x101)](_0x178848=>{_0x277cb3['getUser'](_0x178848)&&_0x25de81['delete'](_0x178848);}),_0x25de81[_0x32550e(0x136)]&&(await _0x465395['get'](_0x32550e(0x125),{'params':{'userIDs':[..._0x25de81]}}))[_0x32550e(0xef)][_0x32550e(0xf1)]['forEach'](_0x3afec7=>{const _0x1b7025=_0x32550e;_0x3afec7&&_0x277cb3[_0x1b7025(0x104)](_0x3afec7);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2b4356,_0x2109cb,_0x48a9db,_0x2f45e5)=>{const _0x40ad24=_0x4e6633;for(var _0x45b082=_0x2f45e5>0x1?void 0x0:_0x2f45e5?K(_0x2109cb,_0x48a9db):_0x2109cb,_0x598075=_0x2b4356[_0x40ad24(0x102)]-0x1,_0x31d7a8;_0x598075>=0x0;_0x598075--)(_0x31d7a8=_0x2b4356[_0x598075])&&(_0x45b082=_0x31d7a8(_0x45b082)||_0x45b082);return _0x45b082;},p=(_0x3dbfa5,_0x4d7856)=>(_0x18c9f1,_0x2990b0)=>_0x4d7856(_0x18c9f1,_0x2990b0,_0x3dbfa5);let _=class extends _0x31c99b{constructor(_0x18b7f0,_0xe886ac,_0x518a17,_0x37259a){const _0x559942=_0x4e6633;super(),this[_0x559942(0xe4)]=_0x18b7f0,this[_0x559942(0x127)]=_0xe886ac,this['_userService']=_0x518a17,this[_0x559942(0x13c)]=_0x37259a,this['_init'](),this[_0x559942(0x106)]();}['_initUserSync'](){const _0x15d712=_0x4e6633;this[_0x15d712(0x135)](this['_threadCommentModel'][_0x15d712(0x122)][_0x15d712(0x123)](_0x1340dd(0x10))[_0x15d712(0x129)](_0x3e4ad0=>{const _0x1af7c8=_0x15d712,_0x4317f7=new Set();_0x3e4ad0[_0x1af7c8(0x101)](_0x1c5a17=>{const _0x43c63e=_0x1af7c8;if(_0x1c5a17['type']===_0x43c63e(0xe0)){const _0x29e438=_0x1c5a17[_0x43c63e(0x140)][_0x43c63e(0x131)];_0x4317f7['add'](_0x29e438);}}),B(this[_0x1af7c8(0x13c)],_0x4317f7);}));}[_0x4e6633(0xf5)](){const _0x3194c5=_0x4e6633;this['disposeWithMe'](this[_0x3194c5(0xe4)][_0x3194c5(0x122)][_0x3194c5(0x129)](async _0x5069f6=>{const _0x3836f6=_0x3194c5;var _0x421829,_0x2bcc3d,_0xfaada0,_0x104ed9;const _0x27ec06=(_0x421829=this['_threadCommentModel'][_0x3836f6(0x105)](_0x5069f6[_0x3836f6(0x12f)])[_0x3836f6(0xec)](_0x2484b1=>_0x2484b1[_0x3836f6(0xfb)]===_0x5069f6[_0x3836f6(0xfb)]))==null?void 0x0:_0x421829['root'];if(!_0x27ec06)return;const {unitId:_0x59a87e,subUnitId:_0x1dade0}=_0x27ec06;switch(_0x5069f6[_0x3836f6(0xe7)]&&this[_0x3836f6(0x10d)][_0x3836f6(0x104)](_0x5069f6[_0x3836f6(0xe7)]),_0x5069f6[_0x3836f6(0xea)]){case v['Add']:break;case v[_0x3836f6(0x10e)]:{this[_0x3836f6(0x127)][_0x3836f6(0xf9)](_0x59a87e,_0x1dade0,{'unitId':_0x59a87e,'subUnitId':_0x1dade0,'ref':'','id':_0x5069f6['replyId'],'dT':y(+_0x5069f6[_0x3836f6(0x12c)]),'threadId':_0x5069f6['threadId'],'personId':(_0xfaada0=(_0x2bcc3d=_0x5069f6[_0x3836f6(0xe7)])==null?void 0x0:_0x2bcc3d['userID'])!=null?_0xfaada0:_0x5069f6[_0x3836f6(0xdc)],'text':JSON[_0x3836f6(0x113)](_0x5069f6[_0x3836f6(0x13b)]),'parentId':_0x27ec06['id']});break;}case v[_0x3836f6(0x108)]:{const _0xd124b=this[_0x3836f6(0x127)]['getComment'](_0x59a87e,_0x1dade0,_0x5069f6[_0x3836f6(0x139)]);_0xd124b&&_0xd124b[_0x3836f6(0xed)]&&this[_0x3836f6(0x127)][_0x3836f6(0x11f)](_0x59a87e,_0x1dade0,_0x5069f6['replyId']);break;}case v[_0x3836f6(0x12a)]:{this[_0x3836f6(0x127)][_0x3836f6(0x11a)](_0x59a87e,_0x1dade0,{'commentId':_0x5069f6[_0x3836f6(0x139)],'text':JSON[_0x3836f6(0x113)](_0x5069f6[_0x3836f6(0x13b)])});break;}case v[_0x3836f6(0xe6)]:{const _0x145c08=(_0x104ed9=this[_0x3836f6(0x127)][_0x3836f6(0x105)](_0x5069f6[_0x3836f6(0x12f)])[_0x3836f6(0xec)](_0x2c30a0=>_0x2c30a0['threadId']===_0x5069f6[_0x3836f6(0xfb)]))==null?void 0x0:_0x104ed9[_0x3836f6(0x118)];_0x145c08&&this[_0x3836f6(0x127)][_0x3836f6(0x12b)](_0x59a87e,_0x1dade0,_0x145c08['id'],_0x5069f6['solved']===I[_0x3836f6(0x141)]);break;}}}));}};_=V([p(0x0,_0x59c243(_0x51f550)),p(0x1,_0x59c243(_0x5a5cbf)),p(0x2,_0x59c243(_0x14c9e0)),p(0x3,_0x59c243(_0xeb12e8))],_);const z=_0x4e6633(0x13a),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x17a9c7,_0x5a5276,_0x555dce,_0x1a3123)=>{const _0xf93cb9=_0x4e6633;for(var _0x3a512f=_0x1a3123>0x1?void 0x0:_0x1a3123?k(_0x5a5276,_0x555dce):_0x5a5276,_0xf825ae=_0x17a9c7[_0xf93cb9(0x102)]-0x1,_0x789ec1;_0xf825ae>=0x0;_0xf825ae--)(_0x789ec1=_0x17a9c7[_0xf825ae])&&(_0x3a512f=_0x789ec1(_0x3a512f)||_0x3a512f);return _0x3a512f;},b=(_0x5ee1c6,_0x424906)=>(_0x5b85c2,_0x2bc98e)=>_0x424906(_0x5b85c2,_0x2bc98e,_0x5ee1c6);function X(_0x5e99cb,_0x50b5d1){const _0x53ec89=_0x4e6633,_0x46df1d=_0x5e99cb['replies'][0x0];return{..._0x50b5d1,'id':_0x46df1d['replyId'],'resolved':_0x5e99cb['solved']===0x1,'dT':y(_0x46df1d[_0x53ec89(0x12c)]),'personId':_0x46df1d[_0x53ec89(0xdc)],'threadId':_0x46df1d['threadId']};}function ee(_0xea4671,_0x12c5dc,_0x39dafd){const _0x7065e2=_0x4e6633;var _0x5b1eb4,_0x4b953f;if(((_0x4b953f=(_0x5b1eb4=_0xea4671==null?void 0x0:_0xea4671[_0x7065e2(0xf4)])==null?void 0x0:_0x5b1eb4['length'])!=null?_0x4b953f:0x0)>0x0){const _0x139d94=(_0x2922d0,_0x5db686)=>({'id':_0x2922d0[_0x7065e2(0x139)],'threadId':_0x2922d0[_0x7065e2(0xfb)],'dT':y(_0x2922d0['createTimestamp']),'personId':_0x2922d0[_0x7065e2(0xdc)],'resolved':_0xea4671[_0x7065e2(0xf3)]===I[_0x7065e2(0x141)],'unitId':_0x12c5dc,'subUnitId':_0x39dafd,'text':JSON[_0x7065e2(0x113)](_0x2922d0['content']),'parentId':_0x5db686}),_0x146cc3=_0x139d94(_0xea4671['replies'][0x0]);return{..._0x146cc3,'children':_0xea4671[_0x7065e2(0xf4)][_0x7065e2(0xf8)](0x1)[_0x7065e2(0x130)](_0x4fbbaf=>_0x139d94(_0x4fbbaf,_0x146cc3['id']))};}return null;}let S=class{constructor(_0x3252fb,_0x45f3f6,_0xc9c70){const _0x471900=_0x4e6633;this[_0x471900(0x119)]=_0x3252fb,this['_userService']=_0x45f3f6,this[_0x471900(0xf6)]=_0xc9c70;}async[_0x4e6633(0xf9)](_0xb56829){const _0x47a5ee=_0x4e6633;var _0x813225,_0x1f7312;const {parentId:_0x100853,unitId:_0x573b9d,text:_0x435aaa,threadId:_0x252015}=_0xb56829,_0x13e0ff=(_0x1f7312=(_0x813225=_0x435aaa[_0x47a5ee(0x10f)])==null?void 0x0:_0x813225[_0x47a5ee(0x11d)](_0xc78e3=>_0xc78e3[_0x47a5ee(0x110)]===_0x507b57[_0x47a5ee(0x10c)])[_0x47a5ee(0x130)](_0x4e4773=>_0x4e4773[_0x47a5ee(0x120)]))!=null?_0x1f7312:[],_0xe10e94=JSON['stringify'](_0x435aaa),_0x5bc071=(await this[_0x47a5ee(0xf6)][_0x47a5ee(0xfe)](_0x573b9d))['getMemberID']();if(_0x100853){const _0x3ea10c={'memberId':_0x5bc071,'unitId':_0x573b9d,'content':_0xe10e94,'mention':_0x13e0ff,'threadId':_0x252015},_0x2b6183=(await this[_0x47a5ee(0x119)][_0x47a5ee(0x10a)]('/universer-api/comment/unit/'+_0x573b9d+_0x47a5ee(0xeb),{'body':_0x3ea10c}))[_0x47a5ee(0xef)][_0x47a5ee(0xdf)];return{..._0xb56829,'id':_0x2b6183['replyId'],'dT':_0x5a368a(+_0x2b6183[_0x47a5ee(0x12c)])[_0x47a5ee(0x137)](_0x47a5ee(0xe5)),'personId':_0x2b6183[_0x47a5ee(0xdc)]};}else{const _0x3bf463={'memberId':_0x5bc071,'unitId':_0x573b9d,'content':_0xe10e94,'mention':_0x13e0ff},_0x19eb77=await this[_0x47a5ee(0x119)][_0x47a5ee(0x10a)](_0x47a5ee(0x11b)+_0x573b9d+_0x47a5ee(0x111),{'body':_0x3bf463});return X(_0x19eb77[_0x47a5ee(0xef)][_0x47a5ee(0xee)],_0xb56829);}}async[_0x4e6633(0x11a)](_0x18b8de){const _0x1ed4a9=_0x4e6633;var _0x1294d1,_0x3a6392;const {text:_0x56a80b,unitId:_0x530052}=_0x18b8de,_0x32b931=(_0x3a6392=(_0x1294d1=_0x56a80b[_0x1ed4a9(0x10f)])==null?void 0x0:_0x1294d1[_0x1ed4a9(0x11d)](_0x5e4052=>_0x5e4052['rangeType']===_0x507b57[_0x1ed4a9(0x10c)])['map'](_0x58aef8=>_0x58aef8[_0x1ed4a9(0x120)]))!=null?_0x3a6392:[],_0x4459ff=JSON['stringify'](_0x56a80b),_0x56aeb3=_0x18b8de[_0x1ed4a9(0xfb)],_0x230239=_0x18b8de['id'],_0x5f2b30={'memberId':(await this[_0x1ed4a9(0xf6)][_0x1ed4a9(0xfe)](_0x530052))[_0x1ed4a9(0x103)](),'unitId':_0x530052,'threadId':_0x56aeb3,'mention':_0x32b931,'content':_0x4459ff,'replyId':_0x230239},_0x566307=await this[_0x1ed4a9(0x119)][_0x1ed4a9(0x10a)]('/universer-api/comment/unit/'+_0x530052+_0x1ed4a9(0x13e),{'body':_0x5f2b30});return!_0x566307['body'][_0x1ed4a9(0x107)]||_0x566307[_0x1ed4a9(0xef)][_0x1ed4a9(0x107)][_0x1ed4a9(0x124)]===0x1;}async[_0x4e6633(0x12b)](_0x118a61){const _0x4555dc=_0x4e6633,{unitId:_0x5939e5}=_0x118a61,_0x268203=_0x118a61[_0x4555dc(0xfb)],_0x432e79={'memberId':this[_0x4555dc(0x10d)][_0x4555dc(0x142)]()[_0x4555dc(0x121)],'unitId':_0x5939e5,'threadId':_0x268203,'solved':_0x118a61[_0x4555dc(0x134)]?I['Solved']:I[_0x4555dc(0x116)]},_0x2b7ced=await this[_0x4555dc(0x119)][_0x4555dc(0x10a)](_0x4555dc(0x11b)+_0x5939e5+_0x4555dc(0x10b),{'body':_0x432e79});return!_0x2b7ced['body']['error']||_0x2b7ced[_0x4555dc(0xef)][_0x4555dc(0x107)][_0x4555dc(0x124)]===0x1;}async[_0x4e6633(0x11f)](_0x1a03c6,_0x507932,_0xf3ecfc,_0x438c97){const _0x47b3c4=_0x4e6633,_0x1caae2={'memberId':(await this[_0x47b3c4(0xf6)][_0x47b3c4(0xfe)](_0x1a03c6))[_0x47b3c4(0x103)](),'threadId':_0xf3ecfc,'replyId':_0x438c97,'unitId':_0x1a03c6},_0x24eb38=await this[_0x47b3c4(0x119)][_0x47b3c4(0x10a)](_0x47b3c4(0x11b)+_0x1a03c6+'/delete',{'body':_0x1caae2});return!_0x24eb38[_0x47b3c4(0xef)][_0x47b3c4(0x107)]||_0x24eb38[_0x47b3c4(0xef)]['error'][_0x47b3c4(0x124)]===0x1;}async[_0x4e6633(0x138)](_0x324fcc,_0xa7fde8,_0x15a6ef){const _0x49f7e6=_0x4e6633,_0x1b87d4={'unitId':_0x324fcc,'threadId':_0x15a6ef},_0x15a7dc=await this[_0x49f7e6(0x119)][_0x49f7e6(0x10a)](_0x49f7e6(0x11b)+_0x324fcc+_0x49f7e6(0x11e),{'body':_0x1b87d4}),_0x37a446=_0x15a6ef[_0x49f7e6(0x130)](_0x26e25c=>ee(_0x15a7dc['body'][_0x49f7e6(0x133)][_0x26e25c],_0x324fcc,_0xa7fde8))[_0x49f7e6(0x11d)](Boolean);return Object['values'](_0x15a7dc[_0x49f7e6(0xef)][_0x49f7e6(0xf1)])['forEach'](_0x56c66b=>{const _0x508dd6=_0x49f7e6;this[_0x508dd6(0x10d)][_0x508dd6(0x104)](_0x56c66b);}),_0x37a446;}[_0x4e6633(0xe1)](_0x2fdd62){const _0x26f10f=_0x4e6633;return{'id':_0x2fdd62['id'],'threadId':_0x2fdd62[_0x26f10f(0xfb)],'ref':_0x2fdd62[_0x26f10f(0x117)]};}};S=Q([b(0x0,_0x59c243(_0x168213)),b(0x1,_0x59c243(_0x14c9e0)),b(0x2,_0x59c243(_0xa66c1b))],S);var re=Object[_0x4e6633(0xe3)],te=(_0x40c8f6,_0x823409,_0x4b5d99,_0x1d41dc)=>{for(var _0xd10a8=_0x1d41dc>0x1?void 0x0:_0x1d41dc?re(_0x823409,_0x4b5d99):_0x823409,_0x419cd9=_0x40c8f6['length']-0x1,_0x55be1c;_0x419cd9>=0x0;_0x419cd9--)(_0x55be1c=_0x40c8f6[_0x419cd9])&&(_0xd10a8=_0x55be1c(_0xd10a8)||_0xd10a8);return _0xd10a8;},M=(_0x1c7f58,_0x19937b)=>(_0x3292a0,_0x2fe54b)=>_0x19937b(_0x3292a0,_0x2fe54b,_0x1c7f58);let f=class extends _0x31c99b{constructor(_0x27dd17,_0x1aaa59){const _0x50c989=_0x4e6633;super(),this[_0x50c989(0x126)]=_0x27dd17,this[_0x50c989(0x112)]=_0x1aaa59,this[_0x50c989(0xf7)]();}[_0x4e6633(0xf7)](){const _0x35b4cd=_0x4e6633;this[_0x35b4cd(0x126)][_0x35b4cd(0xde)]=this[_0x35b4cd(0x112)],this[_0x35b4cd(0x126)][_0x35b4cd(0xfa)]=!0x1;}};f=te([M(0x0,_0x4c2523),M(0x1,_0x59c243(S))],f);var se=Object[_0x4e6633(0xfc)],oe=Object[_0x4e6633(0xe3)],ne=(_0x4c5daf,_0x380fa3,_0x4b9ee7)=>_0x380fa3 in _0x4c5daf?se(_0x4c5daf,_0x380fa3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4b9ee7}):_0x4c5daf[_0x380fa3]=_0x4b9ee7,ie=(_0x2d3d4f,_0x55daa3,_0x211fba,_0x5e3b55)=>{const _0xb4cca4=_0x4e6633;for(var _0x193e4a=_0x5e3b55>0x1?void 0x0:_0x5e3b55?oe(_0x55daa3,_0x211fba):_0x55daa3,_0x3b55d1=_0x2d3d4f[_0xb4cca4(0x102)]-0x1,_0x589348;_0x3b55d1>=0x0;_0x3b55d1--)(_0x589348=_0x2d3d4f[_0x3b55d1])&&(_0x193e4a=_0x589348(_0x193e4a)||_0x193e4a);return _0x193e4a;},N=(_0x240564,_0x4dc48b)=>(_0x2b9c66,_0x3181d9)=>_0x4dc48b(_0x2b9c66,_0x3181d9,_0x240564),$=(_0x2d1798,_0x4a9f2f,_0x328cc4)=>ne(_0x2d1798,typeof _0x4a9f2f!='symbol'?_0x4a9f2f+'':_0x4a9f2f,_0x328cc4);let g=class extends _0x3c3863{constructor(_0x4ef847=O,_0x270a18,_0x24cb99){const _0x5b9b7f=_0x4e6633;super(),this[_0x5b9b7f(0x11c)]=_0x4ef847,this[_0x5b9b7f(0x13c)]=_0x270a18,this[_0x5b9b7f(0xe8)]=_0x24cb99;const {..._0x369556}=_0x1f9a22({},O,this[_0x5b9b7f(0x11c)]);this[_0x5b9b7f(0xe8)][_0x5b9b7f(0x143)](z,_0x369556);}[_0x4e6633(0xf0)](){const _0x49a3b8=_0x4e6633;[[S],[f],[_]][_0x49a3b8(0x101)](_0x4ae5c3=>{const _0x222584=_0x49a3b8;this[_0x222584(0x13c)][_0x222584(0xe0)](_0x4ae5c3);});}[_0x4e6633(0x12e)](){const _0x18a20c=_0x4e6633;this[_0x18a20c(0x13c)][_0x18a20c(0x114)](f),this[_0x18a20c(0x13c)]['get'](_);}};function _0x5f0e(_0x4ba7b8,_0x48f542){_0x4ba7b8=_0x4ba7b8-0xdc;const _0x238f7d=_0x238f();let _0x5f0e4f=_0x238f7d[_0x4ba7b8];return _0x5f0e4f;}$(g,_0x4e6633(0xe9),W),$(g,_0x4e6633(0xea),_0x6e2e34['UNIVER_UNKNOWN']),g=ie([_0x356271(_0x1aeb4f,_0x4407ef,_0x211b08),N(0x1,_0x59c243(_0xeb12e8)),N(0x2,_0x40e862)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x6550cd,_0x2eb606){const _0x1d761e=_0x15ba,_0xc5ea97=_0x6550cd();while(!![]){try{const _0x5dd57e=-parseInt(_0x1d761e(0x1a5))/0x1+parseInt(_0x1d761e(0x171))/0x2*(parseInt(_0x1d761e(0x12f))/0x3)+parseInt(_0x1d761e(0x197))/0x4*(parseInt(_0x1d761e(0x15e))/0x5)+-parseInt(_0x1d761e(0x14e))/0x6*(parseInt(_0x1d761e(0x1a6))/0x7)+-parseInt(_0x1d761e(0x149))/0x8*(parseInt(_0x1d761e(0x1a4))/0x9)+-parseInt(_0x1d761e(0x175))/0xa+parseInt(_0x1d761e(0x12c))/0xb;if(_0x5dd57e===_0x2eb606)break;else _0xc5ea97['push'](_0xc5ea97['shift']());}catch(_0x13960d){_0xc5ea97['push'](_0xc5ea97['shift']());}}}(_0x5cb6,0xe64fb),function(_0x5ea73e,_0x20781c){const _0x48a8df=_0x15ba;typeof exports==_0x48a8df(0x19b)&&typeof module<'u'?_0x20781c(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==_0x48a8df(0x189)&&define[_0x48a8df(0x18f)]?define([_0x48a8df(0x18d),'@univerjs-pro/collaboration-client','@univerjs-pro/license','@univerjs/core',_0x48a8df(0x127),'@univerjs/thread-comment',_0x48a8df(0x15f),_0x48a8df(0x13b)],_0x20781c):(_0x5ea73e=typeof globalThis<'u'?globalThis:_0x5ea73e||self,_0x20781c(_0x5ea73e[_0x48a8df(0x140)]={},_0x5ea73e[_0x48a8df(0x157)],_0x5ea73e['UniverProLicense'],_0x5ea73e[_0x48a8df(0x18a)],_0x5ea73e[_0x48a8df(0x160)],_0x5ea73e[_0x48a8df(0x15c)],_0x5ea73e[_0x48a8df(0x15f)],_0x5ea73e[_0x48a8df(0x159)]));}(this,function(_0x3030e3,_0x4b21ca,_0x39a910,_0xf3e837,_0x4d34f3,_0x1ba242,_0x1b952c,_0x582645){'use strict';const _0x5696b7=_0x15ba;const _0x2c6c06=_0x5696b7(0x165);var _0x5a3be1=(_0x36909a=>(_0x36909a[_0x36909a[_0x5696b7(0x198)]=0x0]='OpenOrReOpen',_0x36909a[_0x36909a[_0x5696b7(0x17a)]=0x1]=_0x5696b7(0x17a),_0x36909a[_0x36909a[_0x5696b7(0x16c)]=-0x1]=_0x5696b7(0x16c),_0x36909a))(_0x5a3be1||{}),_0x345e42=(_0x95e09f=>(_0x95e09f[_0x95e09f[_0x5696b7(0x19d)]=0x0]=_0x5696b7(0x19d),_0x95e09f[_0x95e09f[_0x5696b7(0x135)]=0x1]=_0x5696b7(0x135),_0x95e09f[_0x95e09f[_0x5696b7(0x187)]=0x2]='Reply',_0x95e09f[_0x95e09f[_0x5696b7(0x177)]=0x3]=_0x5696b7(0x177),_0x95e09f[_0x95e09f[_0x5696b7(0x18b)]=0x4]=_0x5696b7(0x18b),_0x95e09f[_0x95e09f[_0x5696b7(0x191)]=0x5]=_0x5696b7(0x191),_0x95e09f[_0x95e09f['UNRECOGNIZED']=-0x1]=_0x5696b7(0x16c),_0x95e09f))(_0x345e42||{});const _0x13673c=_0x56710=>_0xf3e837[_0x5696b7(0x14d)](new Date(+_0x56710))[_0x5696b7(0x17b)](_0x5696b7(0x17f)),_0x11ea32=async(_0x5badde,_0x5cd8e4)=>{const _0x2490d7=_0x5696b7,_0x48f2b8=_0x5badde[_0x2490d7(0x16b)](_0xf3e837[_0x2490d7(0x132)]),_0x5124c4=_0x5badde[_0x2490d7(0x16b)](_0x582645[_0x2490d7(0x133)]);_0x5cd8e4[_0x2490d7(0x146)](_0x3d76c5=>{const _0x171825=_0x2490d7;_0x48f2b8[_0x171825(0x17d)](_0x3d76c5)&&_0x5cd8e4[_0x171825(0x16e)](_0x3d76c5);}),_0x5cd8e4['size']&&(await _0x5124c4[_0x2490d7(0x16b)](_0x2490d7(0x12a),{'params':{'userIDs':[..._0x5cd8e4]}}))[_0x2490d7(0x153)]['users'][_0x2490d7(0x146)](_0xd8c44f=>{const _0x1b63bf=_0x2490d7;_0xd8c44f&&_0x48f2b8[_0x1b63bf(0x17e)](_0xd8c44f);});};var _0x27188e=Object['getOwnPropertyDescriptor'],_0x52eae1=(_0x2270b8,_0x1df32f,_0x5a1edd,_0x464991)=>{for(var _0x4ea30d=_0x464991>0x1?void 0x0:_0x464991?_0x27188e(_0x1df32f,_0x5a1edd):_0x1df32f,_0x313a48=_0x2270b8['length']-0x1,_0x34c47b;_0x313a48>=0x0;_0x313a48--)(_0x34c47b=_0x2270b8[_0x313a48])&&(_0x4ea30d=_0x34c47b(_0x4ea30d)||_0x4ea30d);return _0x4ea30d;},_0x11270a=(_0x47fe00,_0x28116f)=>(_0x57922d,_0x520ec9)=>_0x28116f(_0x57922d,_0x520ec9,_0x47fe00);let _0x166c78=class extends _0xf3e837[_0x5696b7(0x156)]{constructor(_0x3f1495,_0x2d4d78,_0x4b2d0a,_0x5f3ab9){const _0x5822d4=_0x5696b7;super(),this[_0x5822d4(0x152)]=_0x3f1495,this['_threadCommentModel']=_0x2d4d78,this[_0x5822d4(0x14f)]=_0x4b2d0a,this[_0x5822d4(0x199)]=_0x5f3ab9,this[_0x5822d4(0x188)](),this[_0x5822d4(0x128)]();}[_0x5696b7(0x128)](){const _0x22704c=_0x5696b7;this[_0x22704c(0x167)](this[_0x22704c(0x12e)][_0x22704c(0x1a2)][_0x22704c(0x147)](_0x1b952c[_0x22704c(0x186)](0x10))[_0x22704c(0x16a)](_0x182182=>{const _0x42fbae=_0x22704c,_0x288c5c=new Set();_0x182182[_0x42fbae(0x146)](_0x29558b=>{const _0x169b3c=_0x42fbae;if(_0x29558b[_0x169b3c(0x13f)]==='add'){const _0x45063b=_0x29558b[_0x169b3c(0x164)]['personId'];_0x288c5c[_0x169b3c(0x15b)](_0x45063b);}}),_0x11ea32(this['_injector'],_0x288c5c);}));}[_0x5696b7(0x188)](){const _0x48c9ab=_0x5696b7;this['disposeWithMe'](this['_commentService'][_0x48c9ab(0x1a2)][_0x48c9ab(0x16a)](async _0x14fe3b=>{const _0x2df067=_0x48c9ab;var _0x167e1e,_0x15abe3,_0x4b9a73,_0x5e4953;const _0x24d0b8=(_0x167e1e=this[_0x2df067(0x12e)][_0x2df067(0x1a1)](_0x14fe3b[_0x2df067(0x155)])[_0x2df067(0x194)](_0x212605=>_0x212605[_0x2df067(0x141)]===_0x14fe3b['threadId']))==null?void 0x0:_0x167e1e[_0x2df067(0x1a3)];if(!_0x24d0b8)return;const {unitId:_0xdd0181,subUnitId:_0x131cbe}=_0x24d0b8;switch(_0x14fe3b[_0x2df067(0x172)]&&this[_0x2df067(0x14f)]['addUser'](_0x14fe3b[_0x2df067(0x172)]),_0x14fe3b[_0x2df067(0x13f)]){case _0x345e42[_0x2df067(0x135)]:break;case _0x345e42[_0x2df067(0x187)]:{this[_0x2df067(0x12e)][_0x2df067(0x143)](_0xdd0181,_0x131cbe,{'unitId':_0xdd0181,'subUnitId':_0x131cbe,'ref':'','id':_0x14fe3b[_0x2df067(0x131)],'dT':_0x13673c(+_0x14fe3b['createTimestamp']),'threadId':_0x14fe3b[_0x2df067(0x141)],'personId':(_0x4b9a73=(_0x15abe3=_0x14fe3b[_0x2df067(0x172)])==null?void 0x0:_0x15abe3[_0x2df067(0x13c)])!=null?_0x4b9a73:_0x14fe3b[_0x2df067(0x148)],'text':JSON[_0x2df067(0x16f)](_0x14fe3b[_0x2df067(0x151)]),'parentId':_0x24d0b8['id']});break;}case _0x345e42[_0x2df067(0x18b)]:{const _0x4e008b=this[_0x2df067(0x12e)]['getComment'](_0xdd0181,_0x131cbe,_0x14fe3b['replyId']);_0x4e008b&&_0x4e008b[_0x2df067(0x1a0)]&&this[_0x2df067(0x12e)][_0x2df067(0x192)](_0xdd0181,_0x131cbe,_0x14fe3b[_0x2df067(0x131)]);break;}case _0x345e42[_0x2df067(0x177)]:{this[_0x2df067(0x12e)][_0x2df067(0x129)](_0xdd0181,_0x131cbe,{'commentId':_0x14fe3b[_0x2df067(0x131)],'text':JSON[_0x2df067(0x16f)](_0x14fe3b[_0x2df067(0x151)])});break;}case _0x345e42['Solve']:{const _0x14203b=(_0x5e4953=this[_0x2df067(0x12e)]['getUnit'](_0x14fe3b['unitId'])['find'](_0x39744b=>_0x39744b[_0x2df067(0x141)]===_0x14fe3b[_0x2df067(0x141)]))==null?void 0x0:_0x5e4953['root'];_0x14203b&&this['_threadCommentModel']['resolveComment'](_0xdd0181,_0x131cbe,_0x14203b['id'],_0x14fe3b[_0x2df067(0x181)]===_0x5a3be1[_0x2df067(0x17a)]);break;}}}));}};_0x166c78=_0x52eae1([_0x11270a(0x0,_0xf3e837[_0x5696b7(0x176)](_0x4b21ca[_0x5696b7(0x19a)])),_0x11270a(0x1,_0xf3e837['Inject'](_0x1ba242[_0x5696b7(0x13d)])),_0x11270a(0x2,_0xf3e837[_0x5696b7(0x176)](_0xf3e837['UserManagerService'])),_0x11270a(0x3,_0xf3e837[_0x5696b7(0x176)](_0xf3e837[_0x5696b7(0x183)]))],_0x166c78);const _0x21e22f=_0x5696b7(0x195),_0x3c2b35={};var _0x5d48b9=Object[_0x5696b7(0x19f)],_0x4a8a0b=(_0xe42466,_0x3fd2dc,_0x455b39,_0x36774f)=>{for(var _0x9a409c=_0x36774f>0x1?void 0x0:_0x36774f?_0x5d48b9(_0x3fd2dc,_0x455b39):_0x3fd2dc,_0x5f4236=_0xe42466['length']-0x1,_0x566a2f;_0x5f4236>=0x0;_0x5f4236--)(_0x566a2f=_0xe42466[_0x5f4236])&&(_0x9a409c=_0x566a2f(_0x9a409c)||_0x9a409c);return _0x9a409c;},_0x1bf7aa=(_0x2dbde4,_0x1bc2e6)=>(_0x3321c9,_0x435e6a)=>_0x1bc2e6(_0x3321c9,_0x435e6a,_0x2dbde4);function _0x19252b(_0x4318ec,_0x40f306){const _0x216b1c=_0x5696b7,_0x9bea02=_0x4318ec[_0x216b1c(0x130)][0x0];return{..._0x40f306,'id':_0x9bea02[_0x216b1c(0x131)],'resolved':_0x4318ec[_0x216b1c(0x181)]===0x1,'dT':_0x13673c(_0x9bea02['createTimestamp']),'personId':_0x9bea02[_0x216b1c(0x148)],'threadId':_0x9bea02[_0x216b1c(0x141)]};}function _0x5c0df3(_0x19bbfa,_0x46d949,_0x1cd642){const _0xcda27c=_0x5696b7;var _0x34898e,_0x18b4b6;if(((_0x18b4b6=(_0x34898e=_0x19bbfa==null?void 0x0:_0x19bbfa['replies'])==null?void 0x0:_0x34898e['length'])!=null?_0x18b4b6:0x0)>0x0){const _0xb0149f=(_0x4ef017,_0x560f3f)=>({'id':_0x4ef017[_0xcda27c(0x131)],'threadId':_0x4ef017[_0xcda27c(0x141)],'dT':_0x13673c(_0x4ef017[_0xcda27c(0x169)]),'personId':_0x4ef017[_0xcda27c(0x148)],'resolved':_0x19bbfa[_0xcda27c(0x181)]===_0x5a3be1['Solved'],'unitId':_0x46d949,'subUnitId':_0x1cd642,'text':JSON['parse'](_0x4ef017['content']),'parentId':_0x560f3f}),_0x544745=_0xb0149f(_0x19bbfa[_0xcda27c(0x130)][0x0]);return{..._0x544745,'children':_0x19bbfa[_0xcda27c(0x130)][_0xcda27c(0x142)](0x1)[_0xcda27c(0x17c)](_0x2e7ede=>_0xb0149f(_0x2e7ede,_0x544745['id']))};}return null;}let _0x306148=class{constructor(_0x2a0bbd,_0x2b7e8b,_0xda57d4){const _0xf6c084=_0x5696b7;this[_0xf6c084(0x166)]=_0x2a0bbd,this[_0xf6c084(0x14f)]=_0x2b7e8b,this[_0xf6c084(0x138)]=_0xda57d4;}async[_0x5696b7(0x143)](_0x3dc416){const _0x24dea8=_0x5696b7;var _0x2782ff,_0xa6b69;const {parentId:_0x2e4142,unitId:_0x4f28d7,text:_0x337380,threadId:_0x4666cb}=_0x3dc416,_0x536ee4=(_0xa6b69=(_0x2782ff=_0x337380['customRanges'])==null?void 0x0:_0x2782ff['filter'](_0x335c23=>_0x335c23[_0x24dea8(0x193)]===_0xf3e837['CustomRangeType'][_0x24dea8(0x182)])[_0x24dea8(0x17c)](_0x2d1f7f=>_0x2d1f7f[_0x24dea8(0x13e)]))!=null?_0xa6b69:[],_0xedd2db=JSON['stringify'](_0x337380),_0x425038=(await this[_0x24dea8(0x138)][_0x24dea8(0x18c)](_0x4f28d7))['getMemberID']();if(_0x2e4142){const _0x4691e3={'memberId':_0x425038,'unitId':_0x4f28d7,'content':_0xedd2db,'mention':_0x536ee4,'threadId':_0x4666cb},_0xe7b8e7=(await this[_0x24dea8(0x166)]['post'](_0x24dea8(0x163)+_0x4f28d7+'/reply',{'body':_0x4691e3}))[_0x24dea8(0x153)][_0x24dea8(0x162)];return{..._0x3dc416,'id':_0xe7b8e7[_0x24dea8(0x131)],'dT':_0xf3e837['dayjs'](+_0xe7b8e7['createTimestamp'])[_0x24dea8(0x17b)](_0x24dea8(0x17f)),'personId':_0xe7b8e7['userId']};}else{const _0x5f5acf={'memberId':_0x425038,'unitId':_0x4f28d7,'content':_0xedd2db,'mention':_0x536ee4},_0x47adcd=await this[_0x24dea8(0x166)]['post'](_0x24dea8(0x163)+_0x4f28d7+_0x24dea8(0x145),{'body':_0x5f5acf});return _0x19252b(_0x47adcd[_0x24dea8(0x153)]['comment'],_0x3dc416);}}async['updateComment'](_0x4c7a9a){const _0x252cdf=_0x5696b7;var _0x42e865,_0x25d07d;const {text:_0x52273d,unitId:_0x34481b}=_0x4c7a9a,_0x52b3d8=(_0x25d07d=(_0x42e865=_0x52273d[_0x252cdf(0x161)])==null?void 0x0:_0x42e865[_0x252cdf(0x136)](_0x21334b=>_0x21334b[_0x252cdf(0x193)]===_0xf3e837[_0x252cdf(0x154)][_0x252cdf(0x182)])[_0x252cdf(0x17c)](_0x205f0d=>_0x205f0d[_0x252cdf(0x13e)]))!=null?_0x25d07d:[],_0x39602b=JSON['stringify'](_0x52273d),_0x58c1b=_0x4c7a9a['threadId'],_0x3bbfaa=_0x4c7a9a['id'],_0x36deca={'memberId':(await this[_0x252cdf(0x138)][_0x252cdf(0x18c)](_0x34481b))['getMemberID'](),'unitId':_0x34481b,'threadId':_0x58c1b,'mention':_0x52b3d8,'content':_0x39602b,'replyId':_0x3bbfaa},_0x103748=await this[_0x252cdf(0x166)][_0x252cdf(0x150)](_0x252cdf(0x163)+_0x34481b+_0x252cdf(0x139),{'body':_0x36deca});return!_0x103748[_0x252cdf(0x153)][_0x252cdf(0x158)]||_0x103748['body'][_0x252cdf(0x158)]['code']===0x1;}async[_0x5696b7(0x178)](_0x1c554e){const _0x5e5c2=_0x5696b7,{unitId:_0x1cad5f}=_0x1c554e,_0x1762c0=_0x1c554e[_0x5e5c2(0x141)],_0x575e45={'memberId':this[_0x5e5c2(0x14f)][_0x5e5c2(0x16d)]()[_0x5e5c2(0x13c)],'unitId':_0x1cad5f,'threadId':_0x1762c0,'solved':_0x1c554e[_0x5e5c2(0x1a7)]?_0x5a3be1[_0x5e5c2(0x17a)]:_0x5a3be1[_0x5e5c2(0x198)]},_0x252fef=await this['_httpService'][_0x5e5c2(0x150)](_0x5e5c2(0x163)+_0x1cad5f+_0x5e5c2(0x13a),{'body':_0x575e45});return!_0x252fef[_0x5e5c2(0x153)]['error']||_0x252fef[_0x5e5c2(0x153)][_0x5e5c2(0x158)]['code']===0x1;}async[_0x5696b7(0x192)](_0xfe8767,_0x38598f,_0x5eb1b6,_0x184ea1){const _0x54c1fb=_0x5696b7,_0x3804f1={'memberId':(await this[_0x54c1fb(0x138)][_0x54c1fb(0x18c)](_0xfe8767))['getMemberID'](),'threadId':_0x5eb1b6,'replyId':_0x184ea1,'unitId':_0xfe8767},_0x14332b=await this[_0x54c1fb(0x166)][_0x54c1fb(0x150)](_0x54c1fb(0x163)+_0xfe8767+_0x54c1fb(0x173),{'body':_0x3804f1});return!_0x14332b[_0x54c1fb(0x153)][_0x54c1fb(0x158)]||_0x14332b[_0x54c1fb(0x153)]['error']['code']===0x1;}async[_0x5696b7(0x179)](_0xa9b151,_0x135923,_0x1c1684){const _0x56cf82=_0x5696b7,_0x4703de={'unitId':_0xa9b151,'threadId':_0x1c1684},_0x21ef16=await this[_0x56cf82(0x166)]['post']('/universer-api/comment/unit/'+_0xa9b151+_0x56cf82(0x170),{'body':_0x4703de}),_0x38a1b7=_0x1c1684[_0x56cf82(0x17c)](_0x167696=>_0x5c0df3(_0x21ef16[_0x56cf82(0x153)]['comments'][_0x167696],_0xa9b151,_0x135923))[_0x56cf82(0x136)](Boolean);return Object['values'](_0x21ef16['body'][_0x56cf82(0x190)])[_0x56cf82(0x146)](_0xb2718a=>{const _0x298770=_0x56cf82;this['_userService'][_0x298770(0x17e)](_0xb2718a);}),_0x38a1b7;}['saveCommentToSnapshot'](_0x4dfc69){const _0x513504=_0x5696b7;return{'id':_0x4dfc69['id'],'threadId':_0x4dfc69[_0x513504(0x141)],'ref':_0x4dfc69[_0x513504(0x185)]};}};_0x306148=_0x4a8a0b([_0x1bf7aa(0x0,_0xf3e837[_0x5696b7(0x176)](_0x582645[_0x5696b7(0x133)])),_0x1bf7aa(0x1,_0xf3e837[_0x5696b7(0x176)](_0xf3e837[_0x5696b7(0x132)])),_0x1bf7aa(0x2,_0xf3e837[_0x5696b7(0x176)](_0x4b21ca[_0x5696b7(0x14b)]))],_0x306148);var _0x271b18=Object['getOwnPropertyDescriptor'],_0x49190f=(_0x3dcb0f,_0x2ac2ce,_0x538c39,_0x573f94)=>{const _0x5e49c7=_0x5696b7;for(var _0x4d836c=_0x573f94>0x1?void 0x0:_0x573f94?_0x271b18(_0x2ac2ce,_0x538c39):_0x2ac2ce,_0x8cd7cd=_0x3dcb0f[_0x5e49c7(0x196)]-0x1,_0x40d342;_0x8cd7cd>=0x0;_0x8cd7cd--)(_0x40d342=_0x3dcb0f[_0x8cd7cd])&&(_0x4d836c=_0x40d342(_0x4d836c)||_0x4d836c);return _0x4d836c;},_0x63cf87=(_0x2f94fc,_0x166b1f)=>(_0x4592e3,_0x300a28)=>_0x166b1f(_0x4592e3,_0x300a28,_0x2f94fc);let _0x561121=class extends _0xf3e837['Disposable']{constructor(_0x256854,_0x488ca7){const _0x14a100=_0x5696b7;super(),this[_0x14a100(0x14c)]=_0x256854,this[_0x14a100(0x12d)]=_0x488ca7,this[_0x14a100(0x180)]();}[_0x5696b7(0x180)](){const _0x444090=_0x5696b7;this[_0x444090(0x14c)][_0x444090(0x12b)]=this[_0x444090(0x12d)],this[_0x444090(0x14c)]['syncUpdateMutationToColla']=!0x1;}};_0x561121=_0x49190f([_0x63cf87(0x0,_0x1ba242[_0x5696b7(0x137)]),_0x63cf87(0x1,_0xf3e837[_0x5696b7(0x176)](_0x306148))],_0x561121);var _0xa4e1f0=Object['defineProperty'],_0x341afc=Object[_0x5696b7(0x19f)],_0x6d96e8=(_0x277830,_0x300906,_0xf45da6)=>_0x300906 in _0x277830?_0xa4e1f0(_0x277830,_0x300906,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf45da6}):_0x277830[_0x300906]=_0xf45da6,_0x3bd1ee=(_0x22f38b,_0x518c4a,_0x3c00c6,_0x41f6ec)=>{const _0x3379bd=_0x5696b7;for(var _0x12bf69=_0x41f6ec>0x1?void 0x0:_0x41f6ec?_0x341afc(_0x518c4a,_0x3c00c6):_0x518c4a,_0x58d7ac=_0x22f38b[_0x3379bd(0x196)]-0x1,_0x58e8fa;_0x58d7ac>=0x0;_0x58d7ac--)(_0x58e8fa=_0x22f38b[_0x58d7ac])&&(_0x12bf69=_0x58e8fa(_0x12bf69)||_0x12bf69);return _0x12bf69;},_0x3e4c9d=(_0x38f261,_0x32e982)=>(_0x179c9c,_0x510ba6)=>_0x32e982(_0x179c9c,_0x510ba6,_0x38f261),_0x5f0088=(_0x4eb085,_0x5a8226,_0x485513)=>_0x6d96e8(_0x4eb085,typeof _0x5a8226!='symbol'?_0x5a8226+'':_0x5a8226,_0x485513);_0x3030e3['UniverThreadCommentDataSourcePlugin']=class extends _0xf3e837['Plugin']{constructor(_0x35d621=_0x3c2b35,_0x67a318,_0x2e6db4){const _0x279b61=_0x5696b7;super(),this['_config']=_0x35d621,this['_injector']=_0x67a318,this[_0x279b61(0x18e)]=_0x2e6db4;const {..._0x30c316}=_0xf3e837['merge']({},_0x3c2b35,this['_config']);this[_0x279b61(0x18e)][_0x279b61(0x144)](_0x21e22f,_0x30c316);}['onStarting'](){[[_0x306148],[_0x561121],[_0x166c78]]['forEach'](_0x580514=>{const _0xd81108=_0x15ba;this[_0xd81108(0x199)][_0xd81108(0x15b)](_0x580514);});}[_0x5696b7(0x184)](){const _0x53a71d=_0x5696b7;this[_0x53a71d(0x199)][_0x53a71d(0x16b)](_0x561121),this[_0x53a71d(0x199)]['get'](_0x166c78);}},_0x5f0088(_0x3030e3['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x2c6c06),_0x5f0088(_0x3030e3[_0x5696b7(0x134)],_0x5696b7(0x13f),_0xf3e837[_0x5696b7(0x14a)][_0x5696b7(0x15a)]),_0x3030e3[_0x5696b7(0x134)]=_0x3bd1ee([_0xf3e837[_0x5696b7(0x19c)](_0x4d34f3['UniverThreadCommentUIPlugin'],_0x4b21ca['UniverCollaborationClientPlugin'],_0x39a910[_0x5696b7(0x174)]),_0x3e4c9d(0x1,_0xf3e837[_0x5696b7(0x176)](_0xf3e837[_0x5696b7(0x183)])),_0x3e4c9d(0x2,_0xf3e837[_0x5696b7(0x168)])],_0x3030e3[_0x5696b7(0x134)]),Object['defineProperty'](_0x3030e3,Symbol[_0x5696b7(0x15d)],{'value':_0x5696b7(0x19e)});}));function _0x15ba(_0x2f81b3,_0x385dfb){_0x2f81b3=_0x2f81b3-0x127;const _0x5cb612=_0x5cb6();let _0x15ba8f=_0x5cb612[_0x2f81b3];return _0x15ba8f;}function _0x5cb6(){const _0x5b3ed9=['/solved','@univerjs/network','userID','ThreadCommentModel','rangeId','type','UniverProThreadCommentDatasource','threadId','slice','addComment','setConfig','/add','forEach','pipe','userId','8768SaqAmt','UniverInstanceType','CollaborationSessionService','_threadCommentDataSourceService','dayjs','186OcwdcY','_userService','post','content','_commentService','body','CustomRangeType','unitId','Disposable','UniverProCollaborationClient','error','UniverNetwork','UNIVER_UNKNOWN','add','UniverThreadComment','toStringTag','19395uWJpgm','rxjs','UniverThreadCommentUi','customRanges','reply','/universer-api/comment/unit/','payload','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_httpService','disposeWithMe','IConfigService','createTimestamp','subscribe','get','UNRECOGNIZED','getCurrentUser','delete','parse','/list','10ywvzXw','user','/delete','UniverLicensePlugin','16103540zDUHGf','Inject','Edit','resolveComment','listComments','Solved','format','map','getUser','addUser','YYYY/MM/DD\x20HH:mm','_initDataSource','solved','COMMENT','Injector','onReady','ref','bufferTime','Reply','_init','function','UniverCore','Delete','requireSession','exports','_configService','amd','users','Solve','deleteComment','rangeType','find','thread-comment-data-source.config','length','1436ruTQpX','OpenOrReOpen','_injector','CommentService','object','DependentOn','Unknown','Module','getOwnPropertyDescriptor','parentId','getUnit','commentUpdate$','root','13779hoxkUf','1231907uTSKFW','66626CupMtI','resolved','@univerjs/thread-comment-ui','_initUserSync','updateComment','/universer-api/user/list','dataSource','36675254DnhVPD','_threadCommentDataSource','_threadCommentModel','619185CsdpRS','replies','replyId','UserManagerService','HTTPService','UniverThreadCommentDataSourcePlugin','Add','filter','IThreadCommentDataSourceService','_sessionService','/edit'];_0x5cb6=function(){return _0x5b3ed9;};return _0x5cb6();}
|
|
1
|
+
(function(_0x179b88,_0x57c26e){const _0x1c2191=_0x1a3d,_0x4dd0e6=_0x179b88();while(!![]){try{const _0x4d1e42=parseInt(_0x1c2191(0x17a))/0x1+-parseInt(_0x1c2191(0x102))/0x2*(-parseInt(_0x1c2191(0x122))/0x3)+parseInt(_0x1c2191(0x150))/0x4*(parseInt(_0x1c2191(0x110))/0x5)+parseInt(_0x1c2191(0xf8))/0x6+parseInt(_0x1c2191(0x13b))/0x7+-parseInt(_0x1c2191(0x131))/0x8*(parseInt(_0x1c2191(0x137))/0x9)+-parseInt(_0x1c2191(0xfe))/0xa;if(_0x4d1e42===_0x57c26e)break;else _0x4dd0e6['push'](_0x4dd0e6['shift']());}catch(_0x441432){_0x4dd0e6['push'](_0x4dd0e6['shift']());}}}(_0x4504,0xc458d),function(_0x490213,_0x567dcc){const _0x53f9ff=_0x1a3d;typeof exports==_0x53f9ff(0x132)&&typeof module<'u'?_0x567dcc(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=='function'&&define[_0x53f9ff(0x162)]?define(['exports',_0x53f9ff(0x141),_0x53f9ff(0xfa),'@univerjs/core','@univerjs/thread-comment-ui',_0x53f9ff(0x11a),_0x53f9ff(0x157),_0x53f9ff(0x108)],_0x567dcc):(_0x490213=typeof globalThis<'u'?globalThis:_0x490213||self,_0x567dcc(_0x490213[_0x53f9ff(0x12f)]={},_0x490213[_0x53f9ff(0x11b)],_0x490213['UniverProLicense'],_0x490213[_0x53f9ff(0x14b)],_0x490213[_0x53f9ff(0x156)],_0x490213['UniverThreadComment'],_0x490213[_0x53f9ff(0x157)],_0x490213[_0x53f9ff(0x166)]));}(this,function(_0xe88295,_0x2d76f5,_0x2ad5ed,_0x280873,_0x3e5f69,_0x5c61de,_0x257451,_0x2574b8){'use strict';const _0x5f4109=_0x1a3d;const _0x5f522e=_0x5f4109(0x101);var _0x54239f=(_0x52e6a6=>(_0x52e6a6[_0x52e6a6['OpenOrReOpen']=0x0]=_0x5f4109(0x11e),_0x52e6a6[_0x52e6a6['Solved']=0x1]=_0x5f4109(0x160),_0x52e6a6[_0x52e6a6[_0x5f4109(0x155)]=-0x1]=_0x5f4109(0x155),_0x52e6a6))(_0x54239f||{}),_0x345605=(_0x21a68f=>(_0x21a68f[_0x21a68f[_0x5f4109(0x15b)]=0x0]=_0x5f4109(0x15b),_0x21a68f[_0x21a68f[_0x5f4109(0x165)]=0x1]=_0x5f4109(0x165),_0x21a68f[_0x21a68f[_0x5f4109(0x103)]=0x2]=_0x5f4109(0x103),_0x21a68f[_0x21a68f[_0x5f4109(0x100)]=0x3]='Edit',_0x21a68f[_0x21a68f[_0x5f4109(0x12d)]=0x4]='Delete',_0x21a68f[_0x21a68f['Solve']=0x5]=_0x5f4109(0x16b),_0x21a68f[_0x21a68f[_0x5f4109(0x155)]=-0x1]=_0x5f4109(0x155),_0x21a68f))(_0x345605||{});const _0x32b9d2=_0x3253e9=>_0x280873[_0x5f4109(0xff)](new Date(+_0x3253e9))[_0x5f4109(0x126)](_0x5f4109(0x169)),_0x2e444d=async(_0x5c0021,_0x62dbaa)=>{const _0x40b962=_0x5f4109,_0x16863b=_0x5c0021['get'](_0x280873[_0x40b962(0x14e)]),_0xed33c=_0x5c0021['get'](_0x2574b8['HTTPService']);_0x62dbaa[_0x40b962(0xf9)](_0x34a4be=>{const _0xa5afbd=_0x40b962;_0x16863b[_0xa5afbd(0x17c)](_0x34a4be)&&_0x62dbaa[_0xa5afbd(0x10b)](_0x34a4be);}),_0x62dbaa[_0x40b962(0x135)]&&(await _0xed33c[_0x40b962(0x114)](_0x40b962(0x136),{'params':{'userIDs':[..._0x62dbaa]}}))[_0x40b962(0x168)][_0x40b962(0x14c)][_0x40b962(0xf9)](_0x28899d=>{const _0x2d6415=_0x40b962;_0x28899d&&_0x16863b[_0x2d6415(0x170)](_0x28899d);});};var _0x4753be=Object[_0x5f4109(0x119)],_0x5dc35d=(_0x85bc05,_0x36bc87,_0x25869d,_0x5500e5)=>{const _0x330c64=_0x5f4109;for(var _0x52919d=_0x5500e5>0x1?void 0x0:_0x5500e5?_0x4753be(_0x36bc87,_0x25869d):_0x36bc87,_0x403957=_0x85bc05[_0x330c64(0x178)]-0x1,_0x475b64;_0x403957>=0x0;_0x403957--)(_0x475b64=_0x85bc05[_0x403957])&&(_0x52919d=_0x475b64(_0x52919d)||_0x52919d);return _0x52919d;},_0x115363=(_0x492f11,_0x346ed9)=>(_0x296e21,_0x2905b3)=>_0x346ed9(_0x296e21,_0x2905b3,_0x492f11);let _0x3c7110=class extends _0x280873['Disposable']{constructor(_0x4e98a6,_0x2eb17c,_0x1773ff,_0x49051d){const _0x1f2cbe=_0x5f4109;super(),this[_0x1f2cbe(0x11c)]=_0x4e98a6,this[_0x1f2cbe(0x175)]=_0x2eb17c,this['_userService']=_0x1773ff,this[_0x1f2cbe(0x147)]=_0x49051d,this[_0x1f2cbe(0x179)](),this[_0x1f2cbe(0x144)]();}[_0x5f4109(0x144)](){const _0x2bc7bf=_0x5f4109;this['disposeWithMe'](this[_0x2bc7bf(0x175)][_0x2bc7bf(0xfd)][_0x2bc7bf(0x128)](_0x257451['bufferTime'](0x10))[_0x2bc7bf(0x14f)](_0x69fce7=>{const _0x373d4c=_0x2bc7bf,_0x43fa46=new Set();_0x69fce7[_0x373d4c(0xf9)](_0x4440c5=>{const _0x31991d=_0x373d4c;if(_0x4440c5['type']==='add'){const _0x5f0c6e=_0x4440c5['payload'][_0x31991d(0x10c)];_0x43fa46['add'](_0x5f0c6e);}}),_0x2e444d(this[_0x373d4c(0x147)],_0x43fa46);}));}[_0x5f4109(0x179)](){const _0x521a37=_0x5f4109;this['disposeWithMe'](this['_commentService'][_0x521a37(0xfd)][_0x521a37(0x14f)](async _0x272f2e=>{const _0x1db5aa=_0x521a37;var _0x4f01f2,_0x3596be,_0x56d097,_0xf10f7a;const _0x217bc6=(_0x4f01f2=this[_0x1db5aa(0x175)][_0x1db5aa(0x173)](_0x272f2e[_0x1db5aa(0x138)])[_0x1db5aa(0x174)](_0x2006c5=>_0x2006c5[_0x1db5aa(0x164)]===_0x272f2e[_0x1db5aa(0x164)]))==null?void 0x0:_0x4f01f2[_0x1db5aa(0x152)];if(!_0x217bc6)return;const {unitId:_0xc78800,subUnitId:_0x226233}=_0x217bc6;switch(_0x272f2e[_0x1db5aa(0x153)]&&this['_userService'][_0x1db5aa(0x170)](_0x272f2e[_0x1db5aa(0x153)]),_0x272f2e[_0x1db5aa(0x12a)]){case _0x345605[_0x1db5aa(0x165)]:break;case _0x345605[_0x1db5aa(0x103)]:{this['_threadCommentModel'][_0x1db5aa(0x118)](_0xc78800,_0x226233,{'unitId':_0xc78800,'subUnitId':_0x226233,'ref':'','id':_0x272f2e[_0x1db5aa(0x12c)],'dT':_0x32b9d2(+_0x272f2e[_0x1db5aa(0x15d)]),'threadId':_0x272f2e['threadId'],'personId':(_0x56d097=(_0x3596be=_0x272f2e[_0x1db5aa(0x153)])==null?void 0x0:_0x3596be[_0x1db5aa(0x163)])!=null?_0x56d097:_0x272f2e['userId'],'text':JSON[_0x1db5aa(0x161)](_0x272f2e[_0x1db5aa(0x111)]),'parentId':_0x217bc6['id']});break;}case _0x345605['Delete']:{const _0x5f04fb=this[_0x1db5aa(0x175)][_0x1db5aa(0x145)](_0xc78800,_0x226233,_0x272f2e['replyId']);_0x5f04fb&&_0x5f04fb[_0x1db5aa(0x11f)]&&this[_0x1db5aa(0x175)]['deleteComment'](_0xc78800,_0x226233,_0x272f2e['replyId']);break;}case _0x345605[_0x1db5aa(0x100)]:{this[_0x1db5aa(0x175)][_0x1db5aa(0x16a)](_0xc78800,_0x226233,{'commentId':_0x272f2e[_0x1db5aa(0x12c)],'text':JSON[_0x1db5aa(0x161)](_0x272f2e[_0x1db5aa(0x111)])});break;}case _0x345605[_0x1db5aa(0x16b)]:{const _0x203962=(_0xf10f7a=this['_threadCommentModel']['getUnit'](_0x272f2e[_0x1db5aa(0x138)])[_0x1db5aa(0x174)](_0x8bbfc3=>_0x8bbfc3[_0x1db5aa(0x164)]===_0x272f2e[_0x1db5aa(0x164)]))==null?void 0x0:_0xf10f7a[_0x1db5aa(0x152)];_0x203962&&this[_0x1db5aa(0x175)][_0x1db5aa(0x140)](_0xc78800,_0x226233,_0x203962['id'],_0x272f2e[_0x1db5aa(0x14a)]===_0x54239f[_0x1db5aa(0x160)]);break;}}}));}};_0x3c7110=_0x5dc35d([_0x115363(0x0,_0x280873[_0x5f4109(0x17b)](_0x2d76f5[_0x5f4109(0x133)])),_0x115363(0x1,_0x280873['Inject'](_0x5c61de['ThreadCommentModel'])),_0x115363(0x2,_0x280873[_0x5f4109(0x17b)](_0x280873[_0x5f4109(0x14e)])),_0x115363(0x3,_0x280873[_0x5f4109(0x17b)](_0x280873['Injector']))],_0x3c7110);const _0x29658a=_0x5f4109(0x149),_0x3184c6={};var _0xfd088=Object[_0x5f4109(0x119)],_0x1602d3=(_0x294bed,_0x446b11,_0x3ce91d,_0x2fc2f5)=>{const _0x35c307=_0x5f4109;for(var _0x12b8e5=_0x2fc2f5>0x1?void 0x0:_0x2fc2f5?_0xfd088(_0x446b11,_0x3ce91d):_0x446b11,_0x23d6e1=_0x294bed[_0x35c307(0x178)]-0x1,_0x38cb82;_0x23d6e1>=0x0;_0x23d6e1--)(_0x38cb82=_0x294bed[_0x23d6e1])&&(_0x12b8e5=_0x38cb82(_0x12b8e5)||_0x12b8e5);return _0x12b8e5;},_0x1b1871=(_0x18dd7b,_0x1fd214)=>(_0x28ac19,_0x2c6406)=>_0x1fd214(_0x28ac19,_0x2c6406,_0x18dd7b);function _0x1a4cc2(_0x5a1ccc,_0x310768){const _0x678748=_0x5f4109,_0x3f9ac3=_0x5a1ccc[_0x678748(0x12e)][0x0];return{..._0x310768,'id':_0x3f9ac3[_0x678748(0x12c)],'resolved':_0x5a1ccc[_0x678748(0x14a)]===0x1,'dT':_0x32b9d2(_0x3f9ac3[_0x678748(0x15d)]),'personId':_0x3f9ac3[_0x678748(0x10e)],'threadId':_0x3f9ac3[_0x678748(0x164)]};}function _0x1908dc(_0x4b8626,_0x314f96,_0x453c67){const _0x155cf1=_0x5f4109;var _0x1fb9b4,_0x517ea0;if(((_0x517ea0=(_0x1fb9b4=_0x4b8626==null?void 0x0:_0x4b8626[_0x155cf1(0x12e)])==null?void 0x0:_0x1fb9b4[_0x155cf1(0x178)])!=null?_0x517ea0:0x0)>0x0){const _0x5ccc7c=(_0x187928,_0x1f25b8)=>({'id':_0x187928[_0x155cf1(0x12c)],'threadId':_0x187928['threadId'],'dT':_0x32b9d2(_0x187928[_0x155cf1(0x15d)]),'personId':_0x187928[_0x155cf1(0x10e)],'resolved':_0x4b8626['solved']===_0x54239f[_0x155cf1(0x160)],'unitId':_0x314f96,'subUnitId':_0x453c67,'text':JSON[_0x155cf1(0x161)](_0x187928[_0x155cf1(0x111)]),'parentId':_0x1f25b8}),_0x1d31a7=_0x5ccc7c(_0x4b8626['replies'][0x0]);return{..._0x1d31a7,'children':_0x4b8626['replies'][_0x155cf1(0xfc)](0x1)[_0x155cf1(0x13c)](_0x51ee7e=>_0x5ccc7c(_0x51ee7e,_0x1d31a7['id']))};}return null;}let _0x149527=class{constructor(_0x2cb7b5,_0x3e16a4,_0x69d262){const _0x34c722=_0x5f4109;this['_httpService']=_0x2cb7b5,this[_0x34c722(0x113)]=_0x3e16a4,this[_0x34c722(0xfb)]=_0x69d262;}async[_0x5f4109(0x118)](_0x1e6663){const _0x114eb8=_0x5f4109;var _0x5d7706,_0x2651af;const {parentId:_0x12f013,unitId:_0x511d2f,text:_0xfb7c2,threadId:_0x35b44c}=_0x1e6663,_0x4212b2=(_0x2651af=(_0x5d7706=_0xfb7c2[_0x114eb8(0x127)])==null?void 0x0:_0x5d7706[_0x114eb8(0x159)](_0x478c39=>_0x478c39[_0x114eb8(0x123)]===_0x280873[_0x114eb8(0x139)][_0x114eb8(0x124)])[_0x114eb8(0x13c)](_0x38c869=>_0x38c869[_0x114eb8(0x16c)]))!=null?_0x2651af:[],_0x5b5116=JSON[_0x114eb8(0x121)](_0xfb7c2),_0x5b9868=(await this[_0x114eb8(0xfb)]['requireSession'](_0x511d2f))['getMemberID']();if(_0x12f013){const _0x2a7776={'memberId':_0x5b9868,'unitId':_0x511d2f,'content':_0x5b5116,'mention':_0x4212b2,'threadId':_0x35b44c},_0x19dd5a=(await this[_0x114eb8(0x172)][_0x114eb8(0x125)](_0x114eb8(0x171)+_0x511d2f+_0x114eb8(0x158),{'body':_0x2a7776}))[_0x114eb8(0x168)]['reply'];return{..._0x1e6663,'id':_0x19dd5a[_0x114eb8(0x12c)],'dT':_0x280873[_0x114eb8(0xff)](+_0x19dd5a['createTimestamp'])[_0x114eb8(0x126)](_0x114eb8(0x169)),'personId':_0x19dd5a[_0x114eb8(0x10e)]};}else{const _0x4f4b98={'memberId':_0x5b9868,'unitId':_0x511d2f,'content':_0x5b5116,'mention':_0x4212b2},_0x7c8c1=await this[_0x114eb8(0x172)]['post'](_0x114eb8(0x171)+_0x511d2f+_0x114eb8(0x143),{'body':_0x4f4b98});return _0x1a4cc2(_0x7c8c1['body'][_0x114eb8(0x16f)],_0x1e6663);}}async['updateComment'](_0x289822){const _0x1d8f7e=_0x5f4109;var _0x3dd845,_0x301967;const {text:_0x1fa52e,unitId:_0x2cf95d}=_0x289822,_0x428331=(_0x301967=(_0x3dd845=_0x1fa52e['customRanges'])==null?void 0x0:_0x3dd845[_0x1d8f7e(0x159)](_0x13bbfd=>_0x13bbfd['rangeType']===_0x280873[_0x1d8f7e(0x139)][_0x1d8f7e(0x124)])['map'](_0x2994b3=>_0x2994b3[_0x1d8f7e(0x16c)]))!=null?_0x301967:[],_0x3b26d0=JSON[_0x1d8f7e(0x121)](_0x1fa52e),_0x4cb62f=_0x289822[_0x1d8f7e(0x164)],_0x2c3423=_0x289822['id'],_0x5e76c1={'memberId':(await this[_0x1d8f7e(0xfb)][_0x1d8f7e(0x151)](_0x2cf95d))[_0x1d8f7e(0x167)](),'unitId':_0x2cf95d,'threadId':_0x4cb62f,'mention':_0x428331,'content':_0x3b26d0,'replyId':_0x2c3423},_0x1ae2ca=await this[_0x1d8f7e(0x172)][_0x1d8f7e(0x125)](_0x1d8f7e(0x171)+_0x2cf95d+_0x1d8f7e(0x10a),{'body':_0x5e76c1});return!_0x1ae2ca['body']['error']||_0x1ae2ca[_0x1d8f7e(0x168)][_0x1d8f7e(0x176)][_0x1d8f7e(0x16d)]===0x1;}async[_0x5f4109(0x140)](_0x3c110d){const _0x46e2dc=_0x5f4109,{unitId:_0x169628}=_0x3c110d,_0x1b65c5=_0x3c110d['threadId'],_0x4682f4={'memberId':this[_0x46e2dc(0x113)][_0x46e2dc(0x13e)]()['userID'],'unitId':_0x169628,'threadId':_0x1b65c5,'solved':_0x3c110d[_0x46e2dc(0x11d)]?_0x54239f[_0x46e2dc(0x160)]:_0x54239f[_0x46e2dc(0x11e)]},_0x27c4c1=await this['_httpService'][_0x46e2dc(0x125)](_0x46e2dc(0x171)+_0x169628+_0x46e2dc(0x142),{'body':_0x4682f4});return!_0x27c4c1[_0x46e2dc(0x168)]['error']||_0x27c4c1[_0x46e2dc(0x168)]['error']['code']===0x1;}async['deleteComment'](_0x12bcc4,_0x402b3e,_0x293f1b,_0x3524a9){const _0x219490=_0x5f4109,_0x27e3db={'memberId':(await this['_sessionService'][_0x219490(0x151)](_0x12bcc4))[_0x219490(0x167)](),'threadId':_0x293f1b,'replyId':_0x3524a9,'unitId':_0x12bcc4},_0x4536e5=await this[_0x219490(0x172)][_0x219490(0x125)]('/universer-api/comment/unit/'+_0x12bcc4+_0x219490(0x106),{'body':_0x27e3db});return!_0x4536e5[_0x219490(0x168)][_0x219490(0x176)]||_0x4536e5['body']['error'][_0x219490(0x16d)]===0x1;}async[_0x5f4109(0x146)](_0x5e3e93,_0x2f0b36,_0x29d55f){const _0x105afa=_0x5f4109,_0x528e4a={'unitId':_0x5e3e93,'threadId':_0x29d55f},_0x26fecf=await this[_0x105afa(0x172)][_0x105afa(0x125)](_0x105afa(0x171)+_0x5e3e93+_0x105afa(0x120),{'body':_0x528e4a}),_0x47b9a6=_0x29d55f[_0x105afa(0x13c)](_0x5a2d20=>_0x1908dc(_0x26fecf[_0x105afa(0x168)][_0x105afa(0x177)][_0x5a2d20],_0x5e3e93,_0x2f0b36))[_0x105afa(0x159)](Boolean);return Object[_0x105afa(0x116)](_0x26fecf[_0x105afa(0x168)]['users'])[_0x105afa(0xf9)](_0x3ebb22=>{const _0x591d0b=_0x105afa;this['_userService'][_0x591d0b(0x170)](_0x3ebb22);}),_0x47b9a6;}[_0x5f4109(0x16e)](_0x118eaf){const _0x20097d=_0x5f4109;return{'id':_0x118eaf['id'],'threadId':_0x118eaf[_0x20097d(0x164)],'ref':_0x118eaf[_0x20097d(0x15a)]};}};_0x149527=_0x1602d3([_0x1b1871(0x0,_0x280873[_0x5f4109(0x17b)](_0x2574b8[_0x5f4109(0x104)])),_0x1b1871(0x1,_0x280873[_0x5f4109(0x17b)](_0x280873[_0x5f4109(0x14e)])),_0x1b1871(0x2,_0x280873[_0x5f4109(0x17b)](_0x2d76f5[_0x5f4109(0x117)]))],_0x149527);var _0x2c8db5=Object[_0x5f4109(0x119)],_0x3db69b=(_0x3f6df7,_0xed6e2b,_0x59219a,_0x1b6b45)=>{const _0x2c9e65=_0x5f4109;for(var _0x1a562e=_0x1b6b45>0x1?void 0x0:_0x1b6b45?_0x2c8db5(_0xed6e2b,_0x59219a):_0xed6e2b,_0xec1add=_0x3f6df7[_0x2c9e65(0x178)]-0x1,_0x2a08f1;_0xec1add>=0x0;_0xec1add--)(_0x2a08f1=_0x3f6df7[_0xec1add])&&(_0x1a562e=_0x2a08f1(_0x1a562e)||_0x1a562e);return _0x1a562e;},_0x381911=(_0x409c92,_0xe4d8c)=>(_0x4dd532,_0x38d4a0)=>_0xe4d8c(_0x4dd532,_0x38d4a0,_0x409c92);let _0x154b2a=class extends _0x280873[_0x5f4109(0x13d)]{constructor(_0x1975dd,_0x352822){const _0x45ddab=_0x5f4109;super(),this[_0x45ddab(0x105)]=_0x1975dd,this[_0x45ddab(0x15e)]=_0x352822,this[_0x45ddab(0x154)]();}[_0x5f4109(0x154)](){const _0x57ae3d=_0x5f4109;this['_threadCommentDataSourceService'][_0x57ae3d(0x129)]=this[_0x57ae3d(0x15e)],this[_0x57ae3d(0x105)][_0x57ae3d(0x115)]=!0x1;}};_0x154b2a=_0x3db69b([_0x381911(0x0,_0x5c61de[_0x5f4109(0xf7)]),_0x381911(0x1,_0x280873[_0x5f4109(0x17b)](_0x149527))],_0x154b2a);var _0x27a350=Object[_0x5f4109(0x148)],_0x1f90f7=Object['getOwnPropertyDescriptor'],_0x302d20=(_0x581dcf,_0xa3f833,_0x3161a0)=>_0xa3f833 in _0x581dcf?_0x27a350(_0x581dcf,_0xa3f833,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3161a0}):_0x581dcf[_0xa3f833]=_0x3161a0,_0x475134=(_0x92b75a,_0x1dac9d,_0x267ba2,_0x452b09)=>{const _0x5dff20=_0x5f4109;for(var _0x620595=_0x452b09>0x1?void 0x0:_0x452b09?_0x1f90f7(_0x1dac9d,_0x267ba2):_0x1dac9d,_0x3b2277=_0x92b75a[_0x5dff20(0x178)]-0x1,_0x339e92;_0x3b2277>=0x0;_0x3b2277--)(_0x339e92=_0x92b75a[_0x3b2277])&&(_0x620595=_0x339e92(_0x620595)||_0x620595);return _0x620595;},_0x557e5d=(_0x4fc85f,_0x34b564)=>(_0x3c4791,_0x39452f)=>_0x34b564(_0x3c4791,_0x39452f,_0x4fc85f),_0x1b28e5=(_0x49fa16,_0x32d083,_0x46fbd5)=>_0x302d20(_0x49fa16,typeof _0x32d083!='symbol'?_0x32d083+'':_0x32d083,_0x46fbd5);_0xe88295[_0x5f4109(0x112)]=class extends _0x280873['Plugin']{constructor(_0x466093=_0x3184c6,_0xf2c4e,_0x492a44){const _0x41adf6=_0x5f4109;super(),this[_0x41adf6(0x15c)]=_0x466093,this[_0x41adf6(0x147)]=_0xf2c4e,this[_0x41adf6(0x13f)]=_0x492a44;const {..._0x6c2889}=_0x280873[_0x41adf6(0x13a)]({},_0x3184c6,this['_config']);this[_0x41adf6(0x13f)][_0x41adf6(0x15f)](_0x29658a,_0x6c2889);}[_0x5f4109(0x134)](){[[_0x149527],[_0x154b2a],[_0x3c7110]]['forEach'](_0x4302d7=>{const _0x3f6499=_0x1a3d;this[_0x3f6499(0x147)][_0x3f6499(0x130)](_0x4302d7);});}[_0x5f4109(0x12b)](){const _0x9756d2=_0x5f4109;this[_0x9756d2(0x147)][_0x9756d2(0x114)](_0x154b2a),this['_injector']['get'](_0x3c7110);}},_0x1b28e5(_0xe88295['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x5f522e),_0x1b28e5(_0xe88295[_0x5f4109(0x112)],_0x5f4109(0x12a),_0x280873[_0x5f4109(0x10d)][_0x5f4109(0x107)]),_0xe88295[_0x5f4109(0x112)]=_0x475134([_0x280873['DependentOn'](_0x3e5f69['UniverThreadCommentUIPlugin'],_0x2d76f5[_0x5f4109(0x10f)],_0x2ad5ed[_0x5f4109(0x14d)]),_0x557e5d(0x1,_0x280873[_0x5f4109(0x17b)](_0x280873['Injector'])),_0x557e5d(0x2,_0x280873[_0x5f4109(0x109)])],_0xe88295[_0x5f4109(0x112)]),Object['defineProperty'](_0xe88295,Symbol['toStringTag'],{'value':'Module'});}));function _0x1a3d(_0x124fcb,_0x504843){_0x124fcb=_0x124fcb-0xf7;const _0x450494=_0x4504();let _0x1a3dbf=_0x450494[_0x124fcb];return _0x1a3dbf;}function _0x4504(){const _0x426ab0=['IThreadCommentDataSourceService','5138160ShGnmL','forEach','@univerjs-pro/license','_sessionService','slice','commentUpdate$','13740450ICjAWp','dayjs','Edit','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','4GZKnQj','Reply','HTTPService','_threadCommentDataSourceService','/delete','UNIVER_UNKNOWN','@univerjs/network','IConfigService','/edit','delete','personId','UniverInstanceType','userId','UniverCollaborationClientPlugin','5BqigKI','content','UniverThreadCommentDataSourcePlugin','_userService','get','syncUpdateMutationToColla','values','CollaborationSessionService','addComment','getOwnPropertyDescriptor','@univerjs/thread-comment','UniverProCollaborationClient','_commentService','resolved','OpenOrReOpen','parentId','/list','stringify','50349zWfENm','rangeType','COMMENT','post','format','customRanges','pipe','dataSource','type','onReady','replyId','Delete','replies','UniverProThreadCommentDatasource','add','12844088SkVaSn','object','CommentService','onStarting','size','/universer-api/user/list','9FzGKmc','unitId','CustomRangeType','merge','9037896ieKxSc','map','Disposable','getCurrentUser','_configService','resolveComment','@univerjs-pro/collaboration-client','/solved','/add','_initUserSync','getComment','listComments','_injector','defineProperty','thread-comment-data-source.config','solved','UniverCore','users','UniverLicensePlugin','UserManagerService','subscribe','5643028RuHGOx','requireSession','root','user','_initDataSource','UNRECOGNIZED','UniverThreadCommentUi','rxjs','/reply','filter','ref','Unknown','_config','createTimestamp','_threadCommentDataSource','setConfig','Solved','parse','amd','userID','threadId','Add','UniverNetwork','getMemberID','body','YYYY/MM/DD\x20HH:mm','updateComment','Solve','rangeId','code','saveCommentToSnapshot','comment','addUser','/universer-api/comment/unit/','_httpService','getUnit','find','_threadCommentModel','error','comments','length','_init','191982kTPpEd','Inject','getUser'];_0x4504=function(){return _0x426ab0;};return _0x4504();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.15.0-insiders.
|
|
3
|
+
"version": "0.15.0-insiders.20260107-3441c7a",
|
|
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/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.15.0-insiders.20260107-3441c7a",
|
|
49
|
+
"@univerjs-pro/license": "0.15.0-insiders.20260107-3441c7a",
|
|
50
|
+
"@univerjs/network": "0.15.0-insiders.20260107-3441c7a",
|
|
51
|
+
"@univerjs/thread-comment": "0.15.0-insiders.20260107-3441c7a",
|
|
49
52
|
"@univerjs/protocol": "0.1.48",
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/thread-comment": "0.15.0-insiders.20260106-79b11f9",
|
|
53
|
-
"@univerjs-pro/collaboration-client": "0.15.0-insiders.20260106-79b11f9",
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.15.0-insiders.20260106-79b11f9"
|
|
53
|
+
"@univerjs/core": "0.15.0-insiders.20260107-3441c7a",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.15.0-insiders.20260107-3441c7a"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|