@univerjs-pro/thread-comment-datasource 0.12.2-experimental.20251129-0fa20cd → 0.12.2-experimental.20251202-45172c6
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 +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x1e7cb5=_0x5f4e;(function(_0x2061f0,_0x3bcba8){const _0x29fe78=_0x5f4e,_0x4db2b2=_0x2061f0();while(!![]){try{const _0xa47e75=-parseInt(_0x29fe78(0x188))/0x1*(-parseInt(_0x29fe78(0x139))/0x2)+-parseInt(_0x29fe78(0x16d))/0x3+-parseInt(_0x29fe78(0x12d))/0x4+parseInt(_0x29fe78(0x177))/0x5+-parseInt(_0x29fe78(0x182))/0x6+-parseInt(_0x29fe78(0x13a))/0x7+-parseInt(_0x29fe78(0x192))/0x8*(-parseInt(_0x29fe78(0x165))/0x9);if(_0xa47e75===_0x3bcba8)break;else _0x4db2b2['push'](_0x4db2b2['shift']());}catch(_0x44203e){_0x4db2b2['push'](_0x4db2b2['shift']());}}}(_0x3046,0x89aa2));Object['defineProperty'](exports,Symbol[_0x1e7cb5(0x15b)],{'value':_0x1e7cb5(0x184)});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=_0x1e7cb5(0x141);var I=(_0x2800ef=>(_0x2800ef[_0x2800ef['OpenOrReOpen']=0x0]=_0x1e7cb5(0x15c),_0x2800ef[_0x2800ef[_0x1e7cb5(0x1a3)]=0x1]=_0x1e7cb5(0x1a3),_0x2800ef[_0x2800ef[_0x1e7cb5(0x178)]=-0x1]=_0x1e7cb5(0x178),_0x2800ef))(I||{}),v=(_0x3448dc=>(_0x3448dc[_0x3448dc['Unknown']=0x0]=_0x1e7cb5(0x131),_0x3448dc[_0x3448dc[_0x1e7cb5(0x14d)]=0x1]=_0x1e7cb5(0x14d),_0x3448dc[_0x3448dc[_0x1e7cb5(0x17a)]=0x2]=_0x1e7cb5(0x17a),_0x3448dc[_0x3448dc[_0x1e7cb5(0x19d)]=0x3]='Edit',_0x3448dc[_0x3448dc[_0x1e7cb5(0x197)]=0x4]=_0x1e7cb5(0x197),_0x3448dc[_0x3448dc[_0x1e7cb5(0x132)]=0x5]='Solve',_0x3448dc[_0x3448dc[_0x1e7cb5(0x178)]=-0x1]=_0x1e7cb5(0x178),_0x3448dc))(v||{});const f=_0x2a64ab=>c[_0x1e7cb5(0x19e)](new Date(+_0x2a64ab))[_0x1e7cb5(0x172)](_0x1e7cb5(0x189)),R=async(_0x359d27,_0x2b078f)=>{const _0x4238c9=_0x1e7cb5,_0xe7c026=_0x359d27[_0x4238c9(0x15f)](c[_0x4238c9(0x175)]),_0x4ed49e=_0x359d27[_0x4238c9(0x15f)](P[_0x4238c9(0x128)]);_0x2b078f['forEach'](_0x10bc60=>{const _0x37ee00=_0x4238c9;_0xe7c026[_0x37ee00(0x195)](_0x10bc60)&&_0x2b078f[_0x37ee00(0x162)](_0x10bc60);}),_0x2b078f[_0x4238c9(0x137)]&&(await _0x4ed49e[_0x4238c9(0x15f)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2b078f]}}))[_0x4238c9(0x12b)][_0x4238c9(0x129)][_0x4238c9(0x159)](_0x18fffa=>{const _0x2c133f=_0x4238c9;_0x18fffa&&_0xe7c026[_0x2c133f(0x134)](_0x18fffa);});};var $=Object[_0x1e7cb5(0x174)],E=(_0x2bcbb3,_0x3b59b5,_0x361126,_0x3b466e)=>{const _0x4b67ed=_0x1e7cb5;for(var _0x1789bd=_0x3b466e>0x1?void 0x0:_0x3b466e?$(_0x3b59b5,_0x361126):_0x3b59b5,_0x2d686a=_0x2bcbb3[_0x4b67ed(0x160)]-0x1,_0x583293;_0x2d686a>=0x0;_0x2d686a--)(_0x583293=_0x2bcbb3[_0x2d686a])&&(_0x1789bd=_0x583293(_0x1789bd)||_0x1789bd);return _0x1789bd;},S=(_0x496b4f,_0x4cf4b9)=>(_0x4d679e,_0xb0d8f4)=>_0x4cf4b9(_0x4d679e,_0xb0d8f4,_0x496b4f);let _=class extends c['Disposable']{constructor(_0x51b070,_0x13dcc0,_0x41ab4b,_0x39b046){const _0x38652c=_0x1e7cb5;super(),this[_0x38652c(0x14e)]=_0x51b070,this[_0x38652c(0x18d)]=_0x13dcc0,this[_0x38652c(0x19b)]=_0x41ab4b,this['_injector']=_0x39b046,this['_init'](),this[_0x38652c(0x187)]();}[_0x1e7cb5(0x187)](){const _0x3005c9=_0x1e7cb5;this['disposeWithMe'](this[_0x3005c9(0x18d)][_0x3005c9(0x18c)]['pipe'](j[_0x3005c9(0x12c)](0x10))[_0x3005c9(0x161)](_0x4829c5=>{const _0x1e62fc=_0x3005c9,_0x2f0055=new Set();_0x4829c5['forEach'](_0xd2a82f=>{const _0x4e75e2=_0x5f4e;switch(_0xd2a82f[_0x4e75e2(0x18b)]){case'add':{const _0x18844c=_0xd2a82f[_0x4e75e2(0x171)][_0x4e75e2(0x167)];_0x2f0055[_0x4e75e2(0x19c)](_0x18844c);break;}}}),R(this[_0x1e62fc(0x133)],_0x2f0055);}));}[_0x1e7cb5(0x140)](){const _0x51aee0=_0x1e7cb5;this['disposeWithMe'](this[_0x51aee0(0x14e)]['commentUpdate$'][_0x51aee0(0x161)](async _0x2347a7=>{const _0x5811db=_0x51aee0;var _0x151c29,_0x51b07f,_0xec2dba,_0x23f185;const _0x1ef38e=(_0x151c29=this[_0x5811db(0x18d)][_0x5811db(0x16b)](_0x2347a7[_0x5811db(0x150)])[_0x5811db(0x148)](_0x17b92f=>_0x17b92f[_0x5811db(0x14c)]===_0x2347a7[_0x5811db(0x14c)]))==null?void 0x0:_0x151c29[_0x5811db(0x198)];if(!_0x1ef38e)return;const {unitId:_0x58f0dd,subUnitId:_0x1e7358}=_0x1ef38e;switch(_0x2347a7[_0x5811db(0x16f)]&&this[_0x5811db(0x19b)][_0x5811db(0x134)](_0x2347a7['user']),_0x2347a7[_0x5811db(0x18b)]){case v['Add']:break;case v['Reply']:{this[_0x5811db(0x18d)]['addComment'](_0x58f0dd,_0x1e7358,{'unitId':_0x58f0dd,'subUnitId':_0x1e7358,'ref':'','id':_0x2347a7['replyId'],'dT':f(+_0x2347a7['createTimestamp']),'threadId':_0x2347a7[_0x5811db(0x14c)],'personId':(_0xec2dba=(_0x51b07f=_0x2347a7['user'])==null?void 0x0:_0x51b07f[_0x5811db(0x15a)])!=null?_0xec2dba:_0x2347a7[_0x5811db(0x13e)],'text':JSON[_0x5811db(0x152)](_0x2347a7[_0x5811db(0x157)]),'parentId':_0x1ef38e['id']});break;}case v[_0x5811db(0x197)]:{const _0x227cea=this['_threadCommentModel'][_0x5811db(0x17c)](_0x58f0dd,_0x1e7358,_0x2347a7['replyId']);_0x227cea&&_0x227cea[_0x5811db(0x13c)]&&this[_0x5811db(0x18d)][_0x5811db(0x153)](_0x58f0dd,_0x1e7358,_0x2347a7[_0x5811db(0x17b)]);break;}case v[_0x5811db(0x19d)]:{this['_threadCommentModel']['updateComment'](_0x58f0dd,_0x1e7358,{'commentId':_0x2347a7[_0x5811db(0x17b)],'text':JSON[_0x5811db(0x152)](_0x2347a7[_0x5811db(0x157)])});break;}case v[_0x5811db(0x132)]:{const _0x47fb3c=(_0x23f185=this[_0x5811db(0x18d)]['getUnit'](_0x2347a7[_0x5811db(0x150)])[_0x5811db(0x148)](_0x2cf2dd=>_0x2cf2dd[_0x5811db(0x14c)]===_0x2347a7[_0x5811db(0x14c)]))==null?void 0x0:_0x23f185[_0x5811db(0x198)];_0x47fb3c&&this[_0x5811db(0x18d)][_0x5811db(0x168)](_0x58f0dd,_0x1e7358,_0x47fb3c['id'],_0x2347a7[_0x5811db(0x191)]===I[_0x5811db(0x1a3)]);break;}}}));}};_=E([S(0x0,c[_0x1e7cb5(0x196)](b[_0x1e7cb5(0x183)])),S(0x1,c['Inject'](M[_0x1e7cb5(0x142)])),S(0x2,c[_0x1e7cb5(0x196)](c['UserManagerService'])),S(0x3,c[_0x1e7cb5(0x196)](c[_0x1e7cb5(0x145)]))],_);const q=_0x1e7cb5(0x17e),D={};var A=Object[_0x1e7cb5(0x174)],x=(_0x1f28b6,_0x43ca8c,_0x21378a,_0x4a5ec9)=>{for(var _0x53cc0d=_0x4a5ec9>0x1?void 0x0:_0x4a5ec9?A(_0x43ca8c,_0x21378a):_0x43ca8c,_0x2d31fc=_0x1f28b6['length']-0x1,_0x496d5c;_0x2d31fc>=0x0;_0x2d31fc--)(_0x496d5c=_0x1f28b6[_0x2d31fc])&&(_0x53cc0d=_0x496d5c(_0x53cc0d)||_0x53cc0d);return _0x53cc0d;},C=(_0x3e91e1,_0x408eea)=>(_0x579df3,_0x3f8156)=>_0x408eea(_0x579df3,_0x3f8156,_0x3e91e1);function Y(_0x298722,_0x4c6eaf){const _0x399dce=_0x1e7cb5,_0x1580a0=_0x298722['replies'][0x0];return{..._0x4c6eaf,'id':_0x1580a0[_0x399dce(0x17b)],'resolved':_0x298722[_0x399dce(0x191)]===0x1,'dT':f(_0x1580a0['createTimestamp']),'personId':_0x1580a0[_0x399dce(0x13e)],'threadId':_0x1580a0['threadId']};}function G(_0x6dd30,_0x2684c7,_0x256ad6){const _0x3117df=_0x1e7cb5;var _0x55875f,_0xf992e7;if(((_0xf992e7=(_0x55875f=_0x6dd30==null?void 0x0:_0x6dd30[_0x3117df(0x146)])==null?void 0x0:_0x55875f[_0x3117df(0x160)])!=null?_0xf992e7:0x0)>0x0){const _0x225be5=(_0x44b1ed,_0x99de86)=>({'id':_0x44b1ed[_0x3117df(0x17b)],'threadId':_0x44b1ed['threadId'],'dT':f(_0x44b1ed[_0x3117df(0x17d)]),'personId':_0x44b1ed['userId'],'resolved':_0x6dd30['solved']===I[_0x3117df(0x1a3)],'unitId':_0x2684c7,'subUnitId':_0x256ad6,'text':JSON[_0x3117df(0x152)](_0x44b1ed[_0x3117df(0x157)]),'parentId':_0x99de86}),_0x3eb7cb=_0x225be5(_0x6dd30[_0x3117df(0x146)][0x0]);return{..._0x3eb7cb,'children':_0x6dd30[_0x3117df(0x146)][_0x3117df(0x185)](0x1)['map'](_0x53a68f=>_0x225be5(_0x53a68f,_0x3eb7cb['id']))};}return null;}let p=class{constructor(_0x55028b,_0x403b9d,_0x2e63a1){const _0x4727b2=_0x1e7cb5;this[_0x4727b2(0x13b)]=_0x55028b,this[_0x4727b2(0x19b)]=_0x403b9d,this[_0x4727b2(0x17f)]=_0x2e63a1;}async[_0x1e7cb5(0x14b)](_0x4b568a){const _0x491c80=_0x1e7cb5;var _0x15fec4,_0x4007b0;const {parentId:_0xfea93c,unitId:_0x2e8adc,text:_0x1bad22,threadId:_0xda7c73}=_0x4b568a,_0x29f89b=(_0x4007b0=(_0x15fec4=_0x1bad22[_0x491c80(0x180)])==null?void 0x0:_0x15fec4[_0x491c80(0x16a)](_0x40efd5=>_0x40efd5[_0x491c80(0x190)]===c[_0x491c80(0x14a)][_0x491c80(0x138)])[_0x491c80(0x18f)](_0x4d5b3b=>_0x4d5b3b[_0x491c80(0x156)]))!=null?_0x4007b0:[],_0x4d9f1d=JSON[_0x491c80(0x1a1)](_0x1bad22),_0x3eda97=(await this['_sessionService'][_0x491c80(0x164)](_0x2e8adc))[_0x491c80(0x14f)]();if(_0xfea93c){const _0x394315={'memberId':_0x3eda97,'unitId':_0x2e8adc,'content':_0x4d9f1d,'mention':_0x29f89b,'threadId':_0xda7c73},_0x5387ab=(await this[_0x491c80(0x13b)][_0x491c80(0x12e)](_0x491c80(0x19f)+_0x2e8adc+'/reply',{'body':_0x394315}))[_0x491c80(0x12b)][_0x491c80(0x15d)];return{..._0x4b568a,'id':_0x5387ab[_0x491c80(0x17b)],'dT':c[_0x491c80(0x19e)](+_0x5387ab[_0x491c80(0x17d)])[_0x491c80(0x172)](_0x491c80(0x189)),'personId':_0x5387ab['userId']};}else{const _0xdb8ce={'memberId':_0x3eda97,'unitId':_0x2e8adc,'content':_0x4d9f1d,'mention':_0x29f89b},_0x281353=await this[_0x491c80(0x13b)][_0x491c80(0x12e)]('/universer-api/comment/unit/'+_0x2e8adc+_0x491c80(0x12a),{'body':_0xdb8ce});return Y(_0x281353[_0x491c80(0x12b)][_0x491c80(0x158)],_0x4b568a);}}async[_0x1e7cb5(0x179)](_0x2b4a8e){const _0x41f6c6=_0x1e7cb5;var _0x1b7832,_0x15c3a4;const {text:_0xbb7631,unitId:_0x666f2d}=_0x2b4a8e,_0xadc1b2=(_0x15c3a4=(_0x1b7832=_0xbb7631[_0x41f6c6(0x180)])==null?void 0x0:_0x1b7832[_0x41f6c6(0x16a)](_0x1c432b=>_0x1c432b[_0x41f6c6(0x190)]===c[_0x41f6c6(0x14a)][_0x41f6c6(0x138)])[_0x41f6c6(0x18f)](_0x3e8c26=>_0x3e8c26[_0x41f6c6(0x156)]))!=null?_0x15c3a4:[],_0x4bf0d7=JSON[_0x41f6c6(0x1a1)](_0xbb7631),_0x5292ec=_0x2b4a8e[_0x41f6c6(0x14c)],_0x367973=_0x2b4a8e['id'],_0x185989={'memberId':(await this[_0x41f6c6(0x17f)]['requireSession'](_0x666f2d))[_0x41f6c6(0x14f)](),'unitId':_0x666f2d,'threadId':_0x5292ec,'mention':_0xadc1b2,'content':_0x4bf0d7,'replyId':_0x367973},_0x394ace=await this['_httpService'][_0x41f6c6(0x12e)](_0x41f6c6(0x19f)+_0x666f2d+'/edit',{'body':_0x185989});return!_0x394ace['body'][_0x41f6c6(0x199)]||_0x394ace['body']['error'][_0x41f6c6(0x143)]===0x1;}async[_0x1e7cb5(0x168)](_0x3ff9ea){const _0x2d4473=_0x1e7cb5,{unitId:_0x582c24}=_0x3ff9ea,_0x2729d1=_0x3ff9ea[_0x2d4473(0x14c)],_0xfc912e={'memberId':this['_userService'][_0x2d4473(0x13f)]()['userID'],'unitId':_0x582c24,'threadId':_0x2729d1,'solved':_0x3ff9ea[_0x2d4473(0x151)]?I[_0x2d4473(0x1a3)]:I['OpenOrReOpen']},_0x3ebc33=await this[_0x2d4473(0x13b)]['post']('/universer-api/comment/unit/'+_0x582c24+_0x2d4473(0x163),{'body':_0xfc912e});return!_0x3ebc33[_0x2d4473(0x12b)][_0x2d4473(0x199)]||_0x3ebc33['body']['error'][_0x2d4473(0x143)]===0x1;}async[_0x1e7cb5(0x153)](_0x1ca752,_0x386b12,_0x17bff5,_0x43ac6c){const _0x3e55e2=_0x1e7cb5,_0x59704f={'memberId':(await this['_sessionService'][_0x3e55e2(0x164)](_0x1ca752))[_0x3e55e2(0x14f)](),'threadId':_0x17bff5,'replyId':_0x43ac6c,'unitId':_0x1ca752},_0x936c02=await this['_httpService']['post'](_0x3e55e2(0x19f)+_0x1ca752+_0x3e55e2(0x154),{'body':_0x59704f});return!_0x936c02[_0x3e55e2(0x12b)][_0x3e55e2(0x199)]||_0x936c02[_0x3e55e2(0x12b)]['error'][_0x3e55e2(0x143)]===0x1;}async['listComments'](_0x94b353,_0x1f25cc,_0x4fa7f9){const _0x4a377f=_0x1e7cb5,_0x5eba11={'unitId':_0x94b353,'threadId':_0x4fa7f9},_0x2b708d=await this[_0x4a377f(0x13b)][_0x4a377f(0x12e)](_0x4a377f(0x19f)+_0x94b353+_0x4a377f(0x19a),{'body':_0x5eba11}),_0xf73ba7=_0x4fa7f9[_0x4a377f(0x18f)](_0xd023d8=>G(_0x2b708d[_0x4a377f(0x12b)][_0x4a377f(0x18a)][_0xd023d8],_0x94b353,_0x1f25cc))['filter'](Boolean);return Object[_0x4a377f(0x170)](_0x2b708d[_0x4a377f(0x12b)][_0x4a377f(0x129)])[_0x4a377f(0x159)](_0x56a594=>{const _0x599b12=_0x4a377f;this[_0x599b12(0x19b)][_0x599b12(0x134)](_0x56a594);}),_0xf73ba7;}[_0x1e7cb5(0x176)](_0x1af70c){const _0x56eac3=_0x1e7cb5;return{'id':_0x1af70c['id'],'threadId':_0x1af70c[_0x56eac3(0x14c)],'ref':_0x1af70c[_0x56eac3(0x1a6)]};}};p=x([C(0x0,c['Inject'](P['HTTPService'])),C(0x1,c[_0x1e7cb5(0x196)](c[_0x1e7cb5(0x175)])),C(0x2,c[_0x1e7cb5(0x196)](b[_0x1e7cb5(0x16e)]))],p);function _0x3046(){const _0x3ba01a=['Reply','replyId','getComment','createTimestamp','thread-comment-data-source.config','_sessionService','customRanges','_threadCommentDataSourceService','3367518tVwtpO','CommentService','Module','slice','symbol','_initUserSync','509nwvnhF','YYYY/MM/DD\x20HH:mm','comments','type','commentUpdate$','_threadCommentModel','pluginName','map','rangeType','solved','91912CEwTZg','UniverThreadCommentDataSourcePlugin','_initDataSource','getUser','Inject','Delete','root','error','/list','_userService','add','Edit','dayjs','/universer-api/comment/unit/','defineProperty','stringify','UniverThreadCommentUIPlugin','Solved','UniverCollaborationClientPlugin','_threadCommentDataSource','ref','HTTPService','users','/add','body','bufferTime','335812YeOHnO','post','Plugin','onReady','Unknown','Solve','_injector','addUser','_configService','syncUpdateMutationToColla','size','COMMENT','274xmtKkf','7305116genhgs','_httpService','parentId','_config','userId','getCurrentUser','_init','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','ThreadCommentModel','code','IThreadCommentDataSourceService','Injector','replies','DependentOn','find','Disposable','CustomRangeType','addComment','threadId','Add','_commentService','getMemberID','unitId','resolved','parse','deleteComment','/delete','merge','rangeId','content','comment','forEach','userID','toStringTag','OpenOrReOpen','reply','IConfigService','get','length','subscribe','delete','/solved','requireSession','1899wxfjqe','onStarting','personId','resolveComment','UniverInstanceType','filter','getUnit','UNIVER_UNKNOWN','2098425qjvEhV','CollaborationSessionService','user','values','payload','format','UniverLicensePlugin','getOwnPropertyDescriptor','UserManagerService','saveCommentToSnapshot','2291155Rmadms','UNRECOGNIZED','updateComment'];_0x3046=function(){return _0x3ba01a;};return _0x3046();}var H=Object[_0x1e7cb5(0x174)],J=(_0x19a4fe,_0x2848c5,_0x2892cf,_0x4d837d)=>{for(var _0x3b50eb=_0x4d837d>0x1?void 0x0:_0x4d837d?H(_0x2848c5,_0x2892cf):_0x2848c5,_0x103b65=_0x19a4fe['length']-0x1,_0x47dd99;_0x103b65>=0x0;_0x103b65--)(_0x47dd99=_0x19a4fe[_0x103b65])&&(_0x3b50eb=_0x47dd99(_0x3b50eb)||_0x3b50eb);return _0x3b50eb;},y=(_0x296e10,_0x4f249e)=>(_0x352eda,_0x9990eb)=>_0x4f249e(_0x352eda,_0x9990eb,_0x296e10);let g=class extends c[_0x1e7cb5(0x149)]{constructor(_0x43a265,_0x46edc2){const _0x423359=_0x1e7cb5;super(),this[_0x423359(0x181)]=_0x43a265,this[_0x423359(0x1a5)]=_0x46edc2,this[_0x423359(0x194)]();}[_0x1e7cb5(0x194)](){const _0x2a2b2e=_0x1e7cb5;this['_threadCommentDataSourceService']['dataSource']=this[_0x2a2b2e(0x1a5)],this['_threadCommentDataSourceService'][_0x2a2b2e(0x136)]=!0x1;}};g=J([y(0x0,M[_0x1e7cb5(0x144)]),y(0x1,c[_0x1e7cb5(0x196)](p))],g);var F=Object[_0x1e7cb5(0x1a0)],L=Object[_0x1e7cb5(0x174)],Z=(_0x1714a6,_0x26246f,_0xa7a2a5)=>_0x26246f in _0x1714a6?F(_0x1714a6,_0x26246f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xa7a2a5}):_0x1714a6[_0x26246f]=_0xa7a2a5,W=(_0x110216,_0x16a4b5,_0x995c46,_0x1d34bb)=>{const _0x5ced0f=_0x1e7cb5;for(var _0x444738=_0x1d34bb>0x1?void 0x0:_0x1d34bb?L(_0x16a4b5,_0x995c46):_0x16a4b5,_0x1095bf=_0x110216[_0x5ced0f(0x160)]-0x1,_0x2953db;_0x1095bf>=0x0;_0x1095bf--)(_0x2953db=_0x110216[_0x1095bf])&&(_0x444738=_0x2953db(_0x444738)||_0x444738);return _0x444738;},O=(_0x3e3397,_0x17d1cf)=>(_0x3576b8,_0x5c7fa7)=>_0x17d1cf(_0x3576b8,_0x5c7fa7,_0x3e3397),N=(_0x30bf33,_0xb8fa7e,_0x4e6001)=>Z(_0x30bf33,typeof _0xb8fa7e!=_0x1e7cb5(0x186)?_0xb8fa7e+'':_0xb8fa7e,_0x4e6001);function _0x5f4e(_0x581fe4,_0x19ee87){const _0x304638=_0x3046();return _0x5f4e=function(_0x5f4e89,_0x1056e5){_0x5f4e89=_0x5f4e89-0x128;let _0x59ef03=_0x304638[_0x5f4e89];return _0x59ef03;},_0x5f4e(_0x581fe4,_0x19ee87);}exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x1e7cb5(0x12f)]{constructor(_0x592498=D,_0x5d5ced,_0x25c828){const _0x2d34e2=_0x1e7cb5;super(),this[_0x2d34e2(0x13d)]=_0x592498,this['_injector']=_0x5d5ced,this[_0x2d34e2(0x135)]=_0x25c828;const {..._0x2d4576}=c[_0x2d34e2(0x155)]({},D,this[_0x2d34e2(0x13d)]);this['_configService']['setConfig'](q,_0x2d4576);}[_0x1e7cb5(0x166)](){const _0xc93a6d=_0x1e7cb5;[[p],[g],[_]][_0xc93a6d(0x159)](_0x24d615=>{const _0x29eb2d=_0xc93a6d;this[_0x29eb2d(0x133)][_0x29eb2d(0x19c)](_0x24d615);});}[_0x1e7cb5(0x130)](){const _0xceff50=_0x1e7cb5;this[_0xceff50(0x133)][_0xceff50(0x15f)](g),this[_0xceff50(0x133)][_0xceff50(0x15f)](_);}},N(exports[_0x1e7cb5(0x193)],_0x1e7cb5(0x18e),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x1e7cb5(0x18b),c[_0x1e7cb5(0x169)][_0x1e7cb5(0x16c)]),exports[_0x1e7cb5(0x193)]=W([c[_0x1e7cb5(0x147)](w[_0x1e7cb5(0x1a2)],b[_0x1e7cb5(0x1a4)],T[_0x1e7cb5(0x173)]),O(0x1,c[_0x1e7cb5(0x196)](c[_0x1e7cb5(0x145)])),O(0x2,c[_0x1e7cb5(0x15e)])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';const _0x4e2e0d=_0x3193;function _0x3193(_0x29b691,_0x4988e9){const _0x2bec4e=_0x2bec();return _0x3193=function(_0x31933c,_0x2d41f8){_0x31933c=_0x31933c-0x65;let _0x4e2287=_0x2bec4e[_0x31933c];return _0x4e2287;},_0x3193(_0x29b691,_0x4988e9);}(function(_0x8f4ccc,_0xb7a4){const _0x1e0885=_0x3193,_0x33dc1e=_0x8f4ccc();while(!![]){try{const _0x981bca=parseInt(_0x1e0885(0x70))/0x1+-parseInt(_0x1e0885(0xdf))/0x2+parseInt(_0x1e0885(0xc0))/0x3*(parseInt(_0x1e0885(0xaa))/0x4)+-parseInt(_0x1e0885(0x8b))/0x5*(parseInt(_0x1e0885(0x65))/0x6)+parseInt(_0x1e0885(0xd2))/0x7+parseInt(_0x1e0885(0x71))/0x8*(-parseInt(_0x1e0885(0xbb))/0x9)+-parseInt(_0x1e0885(0x7e))/0xa*(parseInt(_0x1e0885(0xd7))/0xb);if(_0x981bca===_0xb7a4)break;else _0x33dc1e['push'](_0x33dc1e['shift']());}catch(_0x1d7329){_0x33dc1e['push'](_0x33dc1e['shift']());}}}(_0x2bec,0x2feb3));function _0x2bec(){const _0x43f6e4=['resolveComment','listComments','Module','YYYY/MM/DD\x20HH:mm','331068rVkNTY','2648WNIGne','rangeId','comment','requireSession','_threadCommentDataSource','_httpService','onReady','UniverThreadCommentDataSourcePlugin','getComment','CommentService','UserManagerService','UniverThreadCommentUIPlugin','type','218130WNZclQ','/add','solved','/edit','map','add','threadId','setConfig','/universer-api/user/list','_userService','parse','replies','CustomRangeType','15FooPWI','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/list','_configService','getUnit','users','saveCommentToSnapshot','Delete','Unknown','deleteComment','_injector','OpenOrReOpen','userID','_sessionService','length','ref','addUser','getUser','customRanges','commentUpdate$','Disposable','updateComment','IThreadCommentDataSourceService','Edit','user','getOwnPropertyDescriptor','getMemberID','createTimestamp','filter','_config','UniverCollaborationClientPlugin','116612sDBbSO','_init','get','Solved','COMMENT','getCurrentUser','Add','/solved','Plugin','Inject','ThreadCommentModel','addComment','rangeType','dayjs','Solve','HTTPService','forEach','2853kCEhpU','resolved','merge','disposeWithMe','defineProperty','33GOSpnH','/reply','_initUserSync','IConfigService','UNIVER_UNKNOWN','DependentOn','Injector','dataSource','body','syncUpdateMutationToColla','error','_threadCommentModel','root','UniverLicensePlugin','CollaborationSessionService','_initDataSource','delete','/delete','2052939WAUmXm','Reply','find','replyId','onStarting','55BFLCLl','code','content','_threadCommentDataSourceService','/universer-api/comment/unit/','userId','stringify','UniverInstanceType','344092mhvlZR','values','subscribe','_commentService','725430yjnUKr','post','UNRECOGNIZED','bufferTime','format','symbol','unitId'];_0x2bec=function(){return _0x43f6e4;};return _0x2bec();}Object[_0x4e2e0d(0xbf)](exports,Symbol['toStringTag'],{'value':_0x4e2e0d(0x6e)});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=_0x4e2e0d(0x8c);var I=(_0x507fa5=>(_0x507fa5[_0x507fa5[_0x4e2e0d(0x96)]=0x0]=_0x4e2e0d(0x96),_0x507fa5[_0x507fa5['Solved']=0x1]=_0x4e2e0d(0xad),_0x507fa5[_0x507fa5['UNRECOGNIZED']=-0x1]=_0x4e2e0d(0x67),_0x507fa5))(I||{}),v=(_0x756f33=>(_0x756f33[_0x756f33[_0x4e2e0d(0x93)]=0x0]=_0x4e2e0d(0x93),_0x756f33[_0x756f33['Add']=0x1]='Add',_0x756f33[_0x756f33[_0x4e2e0d(0xd3)]=0x2]=_0x4e2e0d(0xd3),_0x756f33[_0x756f33[_0x4e2e0d(0xa2)]=0x3]=_0x4e2e0d(0xa2),_0x756f33[_0x756f33['Delete']=0x4]='Delete',_0x756f33[_0x756f33[_0x4e2e0d(0xb8)]=0x5]=_0x4e2e0d(0xb8),_0x756f33[_0x756f33['UNRECOGNIZED']=-0x1]=_0x4e2e0d(0x67),_0x756f33))(v||{});const f=_0x3e1958=>c[_0x4e2e0d(0xb7)](new Date(+_0x3e1958))['format'](_0x4e2e0d(0x6f)),R=async(_0x1adde0,_0x18c078)=>{const _0x2ca6c3=_0x4e2e0d,_0xf35ba4=_0x1adde0['get'](c['UserManagerService']),_0x494199=_0x1adde0[_0x2ca6c3(0xac)](P[_0x2ca6c3(0xb9)]);_0x18c078[_0x2ca6c3(0xba)](_0x3bf489=>{const _0x166ddc=_0x2ca6c3;_0xf35ba4[_0x166ddc(0x9c)](_0x3bf489)&&_0x18c078[_0x166ddc(0xd0)](_0x3bf489);}),_0x18c078['size']&&(await _0x494199[_0x2ca6c3(0xac)](_0x2ca6c3(0x86),{'params':{'userIDs':[..._0x18c078]}}))[_0x2ca6c3(0xc8)][_0x2ca6c3(0x90)]['forEach'](_0x37ddc4=>{_0x37ddc4&&_0xf35ba4['addUser'](_0x37ddc4);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x503f9b,_0x37f575,_0x2dcb6a,_0x39e33b)=>{const _0x207716=_0x4e2e0d;for(var _0x1a3c0c=_0x39e33b>0x1?void 0x0:_0x39e33b?$(_0x37f575,_0x2dcb6a):_0x37f575,_0x1df820=_0x503f9b[_0x207716(0x99)]-0x1,_0x2c6cc1;_0x1df820>=0x0;_0x1df820--)(_0x2c6cc1=_0x503f9b[_0x1df820])&&(_0x1a3c0c=_0x2c6cc1(_0x1a3c0c)||_0x1a3c0c);return _0x1a3c0c;},S=(_0x2266cc,_0x1592f6)=>(_0x4fec9e,_0x32bc04)=>_0x1592f6(_0x4fec9e,_0x32bc04,_0x2266cc);let _=class extends c[_0x4e2e0d(0x9f)]{constructor(_0x2a9b35,_0x1419fe,_0xaab04e,_0x1e1a15){const _0x330082=_0x4e2e0d;super(),this[_0x330082(0xe2)]=_0x2a9b35,this['_threadCommentModel']=_0x1419fe,this[_0x330082(0x87)]=_0xaab04e,this[_0x330082(0x95)]=_0x1e1a15,this[_0x330082(0xab)](),this[_0x330082(0xc2)]();}['_initUserSync'](){const _0x407299=_0x4e2e0d;this[_0x407299(0xbe)](this[_0x407299(0xcb)][_0x407299(0x9e)]['pipe'](j[_0x407299(0x68)](0x10))[_0x407299(0xe1)](_0x29df9f=>{const _0x4a47d2=_0x407299,_0x2348a1=new Set();_0x29df9f[_0x4a47d2(0xba)](_0x6fae5c=>{const _0x4d534c=_0x4a47d2;switch(_0x6fae5c['type']){case _0x4d534c(0x83):{const _0x539960=_0x6fae5c['payload']['personId'];_0x2348a1[_0x4d534c(0x83)](_0x539960);break;}}}),R(this['_injector'],_0x2348a1);}));}[_0x4e2e0d(0xab)](){const _0x37299d=_0x4e2e0d;this[_0x37299d(0xbe)](this['_commentService']['commentUpdate$']['subscribe'](async _0x4adb79=>{const _0x57c8d4=_0x37299d;var _0x57f0ce,_0x35e031,_0x2e73d6,_0x9907b0;const _0x2bb2fb=(_0x57f0ce=this[_0x57c8d4(0xcb)]['getUnit'](_0x4adb79[_0x57c8d4(0x6b)])[_0x57c8d4(0xd4)](_0x4ee8b6=>_0x4ee8b6[_0x57c8d4(0x84)]===_0x4adb79['threadId']))==null?void 0x0:_0x57f0ce[_0x57c8d4(0xcc)];if(!_0x2bb2fb)return;const {unitId:_0x32d8e4,subUnitId:_0x471d2e}=_0x2bb2fb;switch(_0x4adb79[_0x57c8d4(0xa3)]&&this[_0x57c8d4(0x87)][_0x57c8d4(0x9b)](_0x4adb79['user']),_0x4adb79[_0x57c8d4(0x7d)]){case v[_0x57c8d4(0xb0)]:break;case v[_0x57c8d4(0xd3)]:{this[_0x57c8d4(0xcb)][_0x57c8d4(0xb5)](_0x32d8e4,_0x471d2e,{'unitId':_0x32d8e4,'subUnitId':_0x471d2e,'ref':'','id':_0x4adb79[_0x57c8d4(0xd5)],'dT':f(+_0x4adb79['createTimestamp']),'threadId':_0x4adb79['threadId'],'personId':(_0x2e73d6=(_0x35e031=_0x4adb79[_0x57c8d4(0xa3)])==null?void 0x0:_0x35e031[_0x57c8d4(0x97)])!=null?_0x2e73d6:_0x4adb79[_0x57c8d4(0xdc)],'text':JSON[_0x57c8d4(0x88)](_0x4adb79[_0x57c8d4(0xd9)]),'parentId':_0x2bb2fb['id']});break;}case v[_0x57c8d4(0x92)]:{const _0x2accf2=this[_0x57c8d4(0xcb)][_0x57c8d4(0x79)](_0x32d8e4,_0x471d2e,_0x4adb79[_0x57c8d4(0xd5)]);_0x2accf2&&_0x2accf2['parentId']&&this[_0x57c8d4(0xcb)][_0x57c8d4(0x94)](_0x32d8e4,_0x471d2e,_0x4adb79['replyId']);break;}case v[_0x57c8d4(0xa2)]:{this[_0x57c8d4(0xcb)][_0x57c8d4(0xa0)](_0x32d8e4,_0x471d2e,{'commentId':_0x4adb79[_0x57c8d4(0xd5)],'text':JSON[_0x57c8d4(0x88)](_0x4adb79[_0x57c8d4(0xd9)])});break;}case v['Solve']:{const _0x5b6eef=(_0x9907b0=this[_0x57c8d4(0xcb)][_0x57c8d4(0x8f)](_0x4adb79['unitId'])['find'](_0x3d752a=>_0x3d752a[_0x57c8d4(0x84)]===_0x4adb79[_0x57c8d4(0x84)]))==null?void 0x0:_0x9907b0[_0x57c8d4(0xcc)];_0x5b6eef&&this[_0x57c8d4(0xcb)][_0x57c8d4(0x6c)](_0x32d8e4,_0x471d2e,_0x5b6eef['id'],_0x4adb79[_0x57c8d4(0x80)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x4e2e0d(0xb3)](b[_0x4e2e0d(0x7a)])),S(0x1,c[_0x4e2e0d(0xb3)](M[_0x4e2e0d(0xb4)])),S(0x2,c['Inject'](c[_0x4e2e0d(0x7b)])),S(0x3,c[_0x4e2e0d(0xb3)](c[_0x4e2e0d(0xc6)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x4e2e0d(0xa4)],x=(_0x249a33,_0x367be3,_0x338568,_0x3c2862)=>{const _0x1d056b=_0x4e2e0d;for(var _0x1d87b1=_0x3c2862>0x1?void 0x0:_0x3c2862?A(_0x367be3,_0x338568):_0x367be3,_0x5a7e96=_0x249a33[_0x1d056b(0x99)]-0x1,_0x36bb18;_0x5a7e96>=0x0;_0x5a7e96--)(_0x36bb18=_0x249a33[_0x5a7e96])&&(_0x1d87b1=_0x36bb18(_0x1d87b1)||_0x1d87b1);return _0x1d87b1;},C=(_0x40efc9,_0x26d6e1)=>(_0x27e70c,_0x15a8da)=>_0x26d6e1(_0x27e70c,_0x15a8da,_0x40efc9);function Y(_0x3f71db,_0x34f66e){const _0x3a4220=_0x4e2e0d,_0x543f05=_0x3f71db[_0x3a4220(0x89)][0x0];return{..._0x34f66e,'id':_0x543f05[_0x3a4220(0xd5)],'resolved':_0x3f71db[_0x3a4220(0x80)]===0x1,'dT':f(_0x543f05[_0x3a4220(0xa6)]),'personId':_0x543f05['userId'],'threadId':_0x543f05[_0x3a4220(0x84)]};}function G(_0x23f022,_0x4ff2d3,_0x4a266b){const _0x258329=_0x4e2e0d;var _0x2a4233,_0x8dd373;if(((_0x8dd373=(_0x2a4233=_0x23f022==null?void 0x0:_0x23f022[_0x258329(0x89)])==null?void 0x0:_0x2a4233['length'])!=null?_0x8dd373:0x0)>0x0){const _0x244147=(_0x38d184,_0x41f539)=>({'id':_0x38d184[_0x258329(0xd5)],'threadId':_0x38d184[_0x258329(0x84)],'dT':f(_0x38d184[_0x258329(0xa6)]),'personId':_0x38d184[_0x258329(0xdc)],'resolved':_0x23f022[_0x258329(0x80)]===I[_0x258329(0xad)],'unitId':_0x4ff2d3,'subUnitId':_0x4a266b,'text':JSON[_0x258329(0x88)](_0x38d184[_0x258329(0xd9)]),'parentId':_0x41f539}),_0x3b2edd=_0x244147(_0x23f022[_0x258329(0x89)][0x0]);return{..._0x3b2edd,'children':_0x23f022[_0x258329(0x89)]['slice'](0x1)[_0x258329(0x82)](_0x451352=>_0x244147(_0x451352,_0x3b2edd['id']))};}return null;}let p=class{constructor(_0x4a9cbf,_0x4dd4fc,_0x30030c){const _0x2477da=_0x4e2e0d;this['_httpService']=_0x4a9cbf,this['_userService']=_0x4dd4fc,this[_0x2477da(0x98)]=_0x30030c;}async[_0x4e2e0d(0xb5)](_0xfea832){const _0x186f0a=_0x4e2e0d;var _0x485c19,_0x267299;const {parentId:_0x508ec8,unitId:_0x22913a,text:_0x452216,threadId:_0x2f3de1}=_0xfea832,_0x285380=(_0x267299=(_0x485c19=_0x452216[_0x186f0a(0x9d)])==null?void 0x0:_0x485c19[_0x186f0a(0xa7)](_0x4fde3f=>_0x4fde3f[_0x186f0a(0xb6)]===c[_0x186f0a(0x8a)][_0x186f0a(0xae)])[_0x186f0a(0x82)](_0x3b833d=>_0x3b833d[_0x186f0a(0x72)]))!=null?_0x267299:[],_0x5b67fb=JSON[_0x186f0a(0xdd)](_0x452216),_0x45eade=(await this[_0x186f0a(0x98)]['requireSession'](_0x22913a))[_0x186f0a(0xa5)]();if(_0x508ec8){const _0x551da0={'memberId':_0x45eade,'unitId':_0x22913a,'content':_0x5b67fb,'mention':_0x285380,'threadId':_0x2f3de1},_0x5f832f=(await this['_httpService'][_0x186f0a(0x66)](_0x186f0a(0xdb)+_0x22913a+_0x186f0a(0xc1),{'body':_0x551da0}))['body']['reply'];return{..._0xfea832,'id':_0x5f832f['replyId'],'dT':c[_0x186f0a(0xb7)](+_0x5f832f[_0x186f0a(0xa6)])[_0x186f0a(0x69)](_0x186f0a(0x6f)),'personId':_0x5f832f[_0x186f0a(0xdc)]};}else{const _0x4b6dd5={'memberId':_0x45eade,'unitId':_0x22913a,'content':_0x5b67fb,'mention':_0x285380},_0x7bd316=await this['_httpService'][_0x186f0a(0x66)](_0x186f0a(0xdb)+_0x22913a+_0x186f0a(0x7f),{'body':_0x4b6dd5});return Y(_0x7bd316['body'][_0x186f0a(0x73)],_0xfea832);}}async[_0x4e2e0d(0xa0)](_0x235b33){const _0x333204=_0x4e2e0d;var _0x3c7b30,_0x192111;const {text:_0x584b2a,unitId:_0x8d8920}=_0x235b33,_0x1781d8=(_0x192111=(_0x3c7b30=_0x584b2a[_0x333204(0x9d)])==null?void 0x0:_0x3c7b30[_0x333204(0xa7)](_0x469472=>_0x469472[_0x333204(0xb6)]===c[_0x333204(0x8a)][_0x333204(0xae)])[_0x333204(0x82)](_0x10f38f=>_0x10f38f[_0x333204(0x72)]))!=null?_0x192111:[],_0x8445fa=JSON['stringify'](_0x584b2a),_0x286027=_0x235b33[_0x333204(0x84)],_0x20c5c7=_0x235b33['id'],_0x380baa={'memberId':(await this[_0x333204(0x98)]['requireSession'](_0x8d8920))[_0x333204(0xa5)](),'unitId':_0x8d8920,'threadId':_0x286027,'mention':_0x1781d8,'content':_0x8445fa,'replyId':_0x20c5c7},_0x24099c=await this[_0x333204(0x76)][_0x333204(0x66)](_0x333204(0xdb)+_0x8d8920+_0x333204(0x81),{'body':_0x380baa});return!_0x24099c[_0x333204(0xc8)][_0x333204(0xca)]||_0x24099c[_0x333204(0xc8)][_0x333204(0xca)][_0x333204(0xd8)]===0x1;}async['resolveComment'](_0x472201){const _0x67183=_0x4e2e0d,{unitId:_0x534e8d}=_0x472201,_0x498ac5=_0x472201['threadId'],_0x3bde8e={'memberId':this[_0x67183(0x87)][_0x67183(0xaf)]()[_0x67183(0x97)],'unitId':_0x534e8d,'threadId':_0x498ac5,'solved':_0x472201[_0x67183(0xbc)]?I['Solved']:I[_0x67183(0x96)]},_0x593930=await this[_0x67183(0x76)]['post'](_0x67183(0xdb)+_0x534e8d+_0x67183(0xb1),{'body':_0x3bde8e});return!_0x593930[_0x67183(0xc8)]['error']||_0x593930[_0x67183(0xc8)][_0x67183(0xca)]['code']===0x1;}async[_0x4e2e0d(0x94)](_0x17b029,_0x31897c,_0x2a6270,_0x599b9e){const _0x1c403b=_0x4e2e0d,_0x27fbc1={'memberId':(await this[_0x1c403b(0x98)][_0x1c403b(0x74)](_0x17b029))['getMemberID'](),'threadId':_0x2a6270,'replyId':_0x599b9e,'unitId':_0x17b029},_0x43a4a4=await this[_0x1c403b(0x76)][_0x1c403b(0x66)]('/universer-api/comment/unit/'+_0x17b029+_0x1c403b(0xd1),{'body':_0x27fbc1});return!_0x43a4a4[_0x1c403b(0xc8)]['error']||_0x43a4a4[_0x1c403b(0xc8)][_0x1c403b(0xca)]['code']===0x1;}async[_0x4e2e0d(0x6d)](_0x308f26,_0x2072b2,_0x49e953){const _0x7a079b=_0x4e2e0d,_0x4903f8={'unitId':_0x308f26,'threadId':_0x49e953},_0x33b163=await this[_0x7a079b(0x76)][_0x7a079b(0x66)](_0x7a079b(0xdb)+_0x308f26+_0x7a079b(0x8d),{'body':_0x4903f8}),_0x3ebdf2=_0x49e953[_0x7a079b(0x82)](_0x1c8ec4=>G(_0x33b163[_0x7a079b(0xc8)]['comments'][_0x1c8ec4],_0x308f26,_0x2072b2))[_0x7a079b(0xa7)](Boolean);return Object[_0x7a079b(0xe0)](_0x33b163[_0x7a079b(0xc8)]['users'])[_0x7a079b(0xba)](_0x7626b3=>{const _0x3cec63=_0x7a079b;this[_0x3cec63(0x87)]['addUser'](_0x7626b3);}),_0x3ebdf2;}[_0x4e2e0d(0x91)](_0x1bf3cb){const _0x4ee629=_0x4e2e0d;return{'id':_0x1bf3cb['id'],'threadId':_0x1bf3cb['threadId'],'ref':_0x1bf3cb[_0x4ee629(0x9a)]};}};p=x([C(0x0,c[_0x4e2e0d(0xb3)](P[_0x4e2e0d(0xb9)])),C(0x1,c['Inject'](c[_0x4e2e0d(0x7b)])),C(0x2,c['Inject'](b[_0x4e2e0d(0xce)]))],p);var H=Object[_0x4e2e0d(0xa4)],J=(_0x3cdf19,_0x17adf6,_0x161ed7,_0x39f555)=>{const _0x1e774f=_0x4e2e0d;for(var _0x413a79=_0x39f555>0x1?void 0x0:_0x39f555?H(_0x17adf6,_0x161ed7):_0x17adf6,_0x8c368f=_0x3cdf19[_0x1e774f(0x99)]-0x1,_0x560d67;_0x8c368f>=0x0;_0x8c368f--)(_0x560d67=_0x3cdf19[_0x8c368f])&&(_0x413a79=_0x560d67(_0x413a79)||_0x413a79);return _0x413a79;},y=(_0x4f5392,_0x44deaf)=>(_0x478088,_0x4071f0)=>_0x44deaf(_0x478088,_0x4071f0,_0x4f5392);let g=class extends c['Disposable']{constructor(_0x2388b6,_0x3d45a1){const _0x5c1854=_0x4e2e0d;super(),this['_threadCommentDataSourceService']=_0x2388b6,this['_threadCommentDataSource']=_0x3d45a1,this[_0x5c1854(0xcf)]();}[_0x4e2e0d(0xcf)](){const _0xb43b78=_0x4e2e0d;this[_0xb43b78(0xda)][_0xb43b78(0xc7)]=this[_0xb43b78(0x75)],this[_0xb43b78(0xda)][_0xb43b78(0xc9)]=!0x1;}};g=J([y(0x0,M[_0x4e2e0d(0xa1)]),y(0x1,c[_0x4e2e0d(0xb3)](p))],g);var F=Object[_0x4e2e0d(0xbf)],L=Object[_0x4e2e0d(0xa4)],Z=(_0x4d2418,_0x48cd65,_0x3d3b17)=>_0x48cd65 in _0x4d2418?F(_0x4d2418,_0x48cd65,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3d3b17}):_0x4d2418[_0x48cd65]=_0x3d3b17,W=(_0x3be615,_0x54cba2,_0x3becb2,_0x4b481f)=>{const _0x5eca7a=_0x4e2e0d;for(var _0x574605=_0x4b481f>0x1?void 0x0:_0x4b481f?L(_0x54cba2,_0x3becb2):_0x54cba2,_0x3b85fe=_0x3be615[_0x5eca7a(0x99)]-0x1,_0x1b064f;_0x3b85fe>=0x0;_0x3b85fe--)(_0x1b064f=_0x3be615[_0x3b85fe])&&(_0x574605=_0x1b064f(_0x574605)||_0x574605);return _0x574605;},O=(_0x3c70ab,_0x2e74ae)=>(_0x182ff3,_0x5bb4e8)=>_0x2e74ae(_0x182ff3,_0x5bb4e8,_0x3c70ab),N=(_0x102e49,_0x35ca61,_0xc18c06)=>Z(_0x102e49,typeof _0x35ca61!=_0x4e2e0d(0x6a)?_0x35ca61+'':_0x35ca61,_0xc18c06);exports[_0x4e2e0d(0x78)]=class extends c[_0x4e2e0d(0xb2)]{constructor(_0x1493dc=D,_0x30f83f,_0x568e97){const _0x4560b6=_0x4e2e0d;super(),this[_0x4560b6(0xa8)]=_0x1493dc,this[_0x4560b6(0x95)]=_0x30f83f,this[_0x4560b6(0x8e)]=_0x568e97;const {..._0xa19e3e}=c[_0x4560b6(0xbd)]({},D,this['_config']);this['_configService'][_0x4560b6(0x85)](q,_0xa19e3e);}[_0x4e2e0d(0xd6)](){[[p],[g],[_]]['forEach'](_0x3646ec=>{const _0x11f95d=_0x3193;this[_0x11f95d(0x95)][_0x11f95d(0x83)](_0x3646ec);});}[_0x4e2e0d(0x77)](){const _0x44e163=_0x4e2e0d;this[_0x44e163(0x95)]['get'](g),this[_0x44e163(0x95)]['get'](_);}},N(exports[_0x4e2e0d(0x78)],'pluginName',U),N(exports[_0x4e2e0d(0x78)],'type',c[_0x4e2e0d(0xde)][_0x4e2e0d(0xc4)]),exports[_0x4e2e0d(0x78)]=W([c[_0x4e2e0d(0xc5)](w[_0x4e2e0d(0x7c)],b[_0x4e2e0d(0xa9)],T[_0x4e2e0d(0xcd)]),O(0x1,c[_0x4e2e0d(0xb3)](c[_0x4e2e0d(0xc6)])),O(0x2,c[_0x4e2e0d(0xc3)])],exports[_0x4e2e0d(0x78)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x338a3e=_0x5a1c;(function(_0x421eef,_0x21576a){const _0x155f51=_0x5a1c,_0x1f40ca=_0x421eef();while(!![]){try{const _0x7a0bbb=-parseInt(_0x155f51(0x10b))/0x1*(-parseInt(_0x155f51(0x100))/0x2)+parseInt(_0x155f51(0x11b))/0x3+parseInt(_0x155f51(0x111))/0x4*(-parseInt(_0x155f51(0x14a))/0x5)+parseInt(_0x155f51(0x13a))/0x6+-parseInt(_0x155f51(0x156))/0x7+parseInt(_0x155f51(0x122))/0x8*(parseInt(_0x155f51(0x146))/0x9)+-parseInt(_0x155f51(0x12c))/0xa;if(_0x7a0bbb===_0x21576a)break;else _0x1f40ca['push'](_0x1f40ca['shift']());}catch(_0x2934f6){_0x1f40ca['push'](_0x1f40ca['shift']());}}}(_0x5587,0x4a60c));import{CommentService as _0x1def95,CollaborationSessionService as _0x2e0b26,UniverCollaborationClientPlugin as _0x5f22af}from'@univerjs-pro/collaboration-client';function _0x5587(){const _0x1ed97f=['add','defineProperty','/delete','error','_threadCommentDataSourceService','saveCommentToSnapshot','UNIVER_UNKNOWN','symbol','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','requireSession','11ZMXMml','Reply','find','getUnit','get','dataSource','995772toOZkT','getOwnPropertyDescriptor','_config','Edit','post','users','/list','filter','comment','Delete','1028079AWGkrD','updateComment','_threadCommentModel','getComment','format','code','solved','8dHujXV','subscribe','_httpService','_initDataSource','slice','YYYY/MM/DD\x20HH:mm','pipe','userId','root','_initUserSync','5072660gWPFPJ','resolveComment','/add','content','unitId','length','listComments','rangeId','reply','commentUpdate$','_init','_configService','Solve','customRanges','920280DFVkgd','_sessionService','Add','delete','createTimestamp','replyId','user','type','onReady','resolved','/reply','pluginName','2690757eNPXGv','getUser','/universer-api/comment/unit/','addUser','5HIVOuH','userID','rangeType','threadId','addComment','Solved','_userService','map','parse','body','stringify','COMMENT','1820896gWeTNH','_injector','getMemberID','getCurrentUser','size','_threadCommentDataSource','forEach','OpenOrReOpen','setConfig','syncUpdateMutationToColla','parentId','deleteComment','_commentService','replies','UNRECOGNIZED','95626EdJvYz'];_0x5587=function(){return _0x1ed97f;};return _0x5587();}import{UniverLicensePlugin as _0x1fa237}from'@univerjs-pro/license';import{dayjs as _0x2e89bc,UserManagerService as _0x1fa847,Inject as _0x3dcfa0,Injector as _0xac405f,Disposable as _0x4d943a,CustomRangeType as _0x265937,UniverInstanceType as _0x2d50f1,DependentOn as _0x266507,IConfigService as _0x108d43,Plugin as _0xc515d7,merge as _0xaa02ee}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3d6cdd}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2cf2a9,IThreadCommentDataSourceService as _0x4cbc34}from'@univerjs/thread-comment';import{bufferTime as _0x4bb671}from'rxjs';import{HTTPService as _0x112d55}from'@univerjs/network';const W=_0x338a3e(0x109);var I=(_0x4500c7=>(_0x4500c7[_0x4500c7[_0x338a3e(0x15d)]=0x0]='OpenOrReOpen',_0x4500c7[_0x4500c7['Solved']=0x1]=_0x338a3e(0x14f),_0x4500c7[_0x4500c7[_0x338a3e(0xff)]=-0x1]=_0x338a3e(0xff),_0x4500c7))(I||{}),v=(_0x35e1fb=>(_0x35e1fb[_0x35e1fb['Unknown']=0x0]='Unknown',_0x35e1fb[_0x35e1fb[_0x338a3e(0x13c)]=0x1]=_0x338a3e(0x13c),_0x35e1fb[_0x35e1fb[_0x338a3e(0x10c)]=0x2]=_0x338a3e(0x10c),_0x35e1fb[_0x35e1fb[_0x338a3e(0x114)]=0x3]=_0x338a3e(0x114),_0x35e1fb[_0x35e1fb[_0x338a3e(0x11a)]=0x4]='Delete',_0x35e1fb[_0x35e1fb[_0x338a3e(0x138)]=0x5]=_0x338a3e(0x138),_0x35e1fb[_0x35e1fb[_0x338a3e(0xff)]=-0x1]=_0x338a3e(0xff),_0x35e1fb))(v||{});const y=_0x226e89=>_0x2e89bc(new Date(+_0x226e89))[_0x338a3e(0x11f)](_0x338a3e(0x127)),B=async(_0x378fa9,_0x142af3)=>{const _0x447adb=_0x338a3e,_0x182c3d=_0x378fa9[_0x447adb(0x10f)](_0x1fa847),_0x3c579b=_0x378fa9[_0x447adb(0x10f)](_0x112d55);_0x142af3[_0x447adb(0x15c)](_0x41b28e=>{const _0x5da1c3=_0x447adb;_0x182c3d[_0x5da1c3(0x147)](_0x41b28e)&&_0x142af3[_0x5da1c3(0x13d)](_0x41b28e);}),_0x142af3[_0x447adb(0x15a)]&&(await _0x3c579b['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x142af3]}}))['body'][_0x447adb(0x116)][_0x447adb(0x15c)](_0x56e572=>{const _0x56958b=_0x447adb;_0x56e572&&_0x182c3d[_0x56958b(0x149)](_0x56e572);});};var K=Object[_0x338a3e(0x112)],V=(_0x4f6e70,_0x1b3a77,_0x548a66,_0x26bec7)=>{const _0x114894=_0x338a3e;for(var _0x2dc9f9=_0x26bec7>0x1?void 0x0:_0x26bec7?K(_0x1b3a77,_0x548a66):_0x1b3a77,_0x23d12d=_0x4f6e70[_0x114894(0x131)]-0x1,_0x21d864;_0x23d12d>=0x0;_0x23d12d--)(_0x21d864=_0x4f6e70[_0x23d12d])&&(_0x2dc9f9=_0x21d864(_0x2dc9f9)||_0x2dc9f9);return _0x2dc9f9;},p=(_0x351c9a,_0x4ffbb4)=>(_0x21d346,_0x4064a0)=>_0x4ffbb4(_0x21d346,_0x4064a0,_0x351c9a);let _=class extends _0x4d943a{constructor(_0x297217,_0xf241f0,_0x16f3f2,_0x543ccf){const _0x15c834=_0x338a3e;super(),this[_0x15c834(0xfd)]=_0x297217,this[_0x15c834(0x11d)]=_0xf241f0,this['_userService']=_0x16f3f2,this['_injector']=_0x543ccf,this['_init'](),this[_0x15c834(0x12b)]();}[_0x338a3e(0x12b)](){const _0x82eccc=_0x338a3e;this['disposeWithMe'](this[_0x82eccc(0x11d)]['commentUpdate$'][_0x82eccc(0x128)](_0x4bb671(0x10))[_0x82eccc(0x123)](_0x56da90=>{const _0x5d7d54=_0x82eccc,_0x44e3ee=new Set();_0x56da90[_0x5d7d54(0x15c)](_0x538286=>{const _0x4fcb7e=_0x5d7d54;switch(_0x538286[_0x4fcb7e(0x141)]){case _0x4fcb7e(0x101):{const _0x1cbb31=_0x538286['payload']['personId'];_0x44e3ee[_0x4fcb7e(0x101)](_0x1cbb31);break;}}}),B(this['_injector'],_0x44e3ee);}));}[_0x338a3e(0x136)](){const _0xa4ead8=_0x338a3e;this['disposeWithMe'](this['_commentService'][_0xa4ead8(0x135)][_0xa4ead8(0x123)](async _0x3694f6=>{const _0xcd9c24=_0xa4ead8;var _0x1f5d51,_0x41643d,_0x15beaf,_0x40b714;const _0x3d802e=(_0x1f5d51=this[_0xcd9c24(0x11d)][_0xcd9c24(0x10e)](_0x3694f6[_0xcd9c24(0x130)])[_0xcd9c24(0x10d)](_0x25f61f=>_0x25f61f[_0xcd9c24(0x14d)]===_0x3694f6['threadId']))==null?void 0x0:_0x1f5d51[_0xcd9c24(0x12a)];if(!_0x3d802e)return;const {unitId:_0x1363a9,subUnitId:_0x42d716}=_0x3d802e;switch(_0x3694f6[_0xcd9c24(0x140)]&&this[_0xcd9c24(0x150)][_0xcd9c24(0x149)](_0x3694f6[_0xcd9c24(0x140)]),_0x3694f6['type']){case v['Add']:break;case v[_0xcd9c24(0x10c)]:{this[_0xcd9c24(0x11d)][_0xcd9c24(0x14e)](_0x1363a9,_0x42d716,{'unitId':_0x1363a9,'subUnitId':_0x42d716,'ref':'','id':_0x3694f6[_0xcd9c24(0x13f)],'dT':y(+_0x3694f6[_0xcd9c24(0x13e)]),'threadId':_0x3694f6[_0xcd9c24(0x14d)],'personId':(_0x15beaf=(_0x41643d=_0x3694f6['user'])==null?void 0x0:_0x41643d[_0xcd9c24(0x14b)])!=null?_0x15beaf:_0x3694f6[_0xcd9c24(0x129)],'text':JSON[_0xcd9c24(0x152)](_0x3694f6[_0xcd9c24(0x12f)]),'parentId':_0x3d802e['id']});break;}case v[_0xcd9c24(0x11a)]:{const _0x1224f1=this[_0xcd9c24(0x11d)][_0xcd9c24(0x11e)](_0x1363a9,_0x42d716,_0x3694f6[_0xcd9c24(0x13f)]);_0x1224f1&&_0x1224f1[_0xcd9c24(0xfb)]&&this[_0xcd9c24(0x11d)][_0xcd9c24(0xfc)](_0x1363a9,_0x42d716,_0x3694f6[_0xcd9c24(0x13f)]);break;}case v[_0xcd9c24(0x114)]:{this[_0xcd9c24(0x11d)][_0xcd9c24(0x11c)](_0x1363a9,_0x42d716,{'commentId':_0x3694f6['replyId'],'text':JSON[_0xcd9c24(0x152)](_0x3694f6[_0xcd9c24(0x12f)])});break;}case v[_0xcd9c24(0x138)]:{const _0x32af58=(_0x40b714=this[_0xcd9c24(0x11d)][_0xcd9c24(0x10e)](_0x3694f6[_0xcd9c24(0x130)])[_0xcd9c24(0x10d)](_0x5edea5=>_0x5edea5[_0xcd9c24(0x14d)]===_0x3694f6['threadId']))==null?void 0x0:_0x40b714[_0xcd9c24(0x12a)];_0x32af58&&this[_0xcd9c24(0x11d)]['resolveComment'](_0x1363a9,_0x42d716,_0x32af58['id'],_0x3694f6[_0xcd9c24(0x121)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x3dcfa0(_0x1def95)),p(0x1,_0x3dcfa0(_0x2cf2a9)),p(0x2,_0x3dcfa0(_0x1fa847)),p(0x3,_0x3dcfa0(_0xac405f))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x338a3e(0x112)],Q=(_0x5cffac,_0x9fdacf,_0x1fcf1f,_0x4ac5c6)=>{const _0x5d2aab=_0x338a3e;for(var _0x3ea5c6=_0x4ac5c6>0x1?void 0x0:_0x4ac5c6?k(_0x9fdacf,_0x1fcf1f):_0x9fdacf,_0x5a1a7d=_0x5cffac[_0x5d2aab(0x131)]-0x1,_0x4220eb;_0x5a1a7d>=0x0;_0x5a1a7d--)(_0x4220eb=_0x5cffac[_0x5a1a7d])&&(_0x3ea5c6=_0x4220eb(_0x3ea5c6)||_0x3ea5c6);return _0x3ea5c6;},b=(_0x9731cc,_0x4af6e8)=>(_0x510a8d,_0x2c6b36)=>_0x4af6e8(_0x510a8d,_0x2c6b36,_0x9731cc);function X(_0x2ccde8,_0x176d52){const _0x3a1a10=_0x338a3e,_0x19bf87=_0x2ccde8['replies'][0x0];return{..._0x176d52,'id':_0x19bf87[_0x3a1a10(0x13f)],'resolved':_0x2ccde8[_0x3a1a10(0x121)]===0x1,'dT':y(_0x19bf87[_0x3a1a10(0x13e)]),'personId':_0x19bf87[_0x3a1a10(0x129)],'threadId':_0x19bf87['threadId']};}function ee(_0x2a1ce0,_0x451b4b,_0x22e8dc){const _0x5e87f7=_0x338a3e;var _0x3777e1,_0x30a3dc;if(((_0x30a3dc=(_0x3777e1=_0x2a1ce0==null?void 0x0:_0x2a1ce0['replies'])==null?void 0x0:_0x3777e1[_0x5e87f7(0x131)])!=null?_0x30a3dc:0x0)>0x0){const _0x147947=(_0x4a85a1,_0x5bd59b)=>({'id':_0x4a85a1[_0x5e87f7(0x13f)],'threadId':_0x4a85a1['threadId'],'dT':y(_0x4a85a1[_0x5e87f7(0x13e)]),'personId':_0x4a85a1[_0x5e87f7(0x129)],'resolved':_0x2a1ce0['solved']===I[_0x5e87f7(0x14f)],'unitId':_0x451b4b,'subUnitId':_0x22e8dc,'text':JSON['parse'](_0x4a85a1[_0x5e87f7(0x12f)]),'parentId':_0x5bd59b}),_0x968d23=_0x147947(_0x2a1ce0[_0x5e87f7(0xfe)][0x0]);return{..._0x968d23,'children':_0x2a1ce0[_0x5e87f7(0xfe)][_0x5e87f7(0x126)](0x1)[_0x5e87f7(0x151)](_0x54641e=>_0x147947(_0x54641e,_0x968d23['id']))};}return null;}let S=class{constructor(_0x3e1357,_0x2ca5a6,_0x44dade){const _0x2f836e=_0x338a3e;this['_httpService']=_0x3e1357,this[_0x2f836e(0x150)]=_0x2ca5a6,this[_0x2f836e(0x13b)]=_0x44dade;}async[_0x338a3e(0x14e)](_0x5b06db){const _0xb5aa14=_0x338a3e;var _0x54f22d,_0x598e90;const {parentId:_0x40580b,unitId:_0x1bea6d,text:_0x8a6db2,threadId:_0x4781a4}=_0x5b06db,_0x4db24c=(_0x598e90=(_0x54f22d=_0x8a6db2['customRanges'])==null?void 0x0:_0x54f22d[_0xb5aa14(0x118)](_0x359dc5=>_0x359dc5['rangeType']===_0x265937[_0xb5aa14(0x155)])['map'](_0x1bf44b=>_0x1bf44b[_0xb5aa14(0x133)]))!=null?_0x598e90:[],_0x2a07ba=JSON[_0xb5aa14(0x154)](_0x8a6db2),_0x488f3c=(await this[_0xb5aa14(0x13b)][_0xb5aa14(0x10a)](_0x1bea6d))[_0xb5aa14(0x158)]();if(_0x40580b){const _0x381699={'memberId':_0x488f3c,'unitId':_0x1bea6d,'content':_0x2a07ba,'mention':_0x4db24c,'threadId':_0x4781a4},_0x5a780b=(await this['_httpService'][_0xb5aa14(0x115)]('/universer-api/comment/unit/'+_0x1bea6d+_0xb5aa14(0x144),{'body':_0x381699}))[_0xb5aa14(0x153)][_0xb5aa14(0x134)];return{..._0x5b06db,'id':_0x5a780b[_0xb5aa14(0x13f)],'dT':_0x2e89bc(+_0x5a780b[_0xb5aa14(0x13e)])[_0xb5aa14(0x11f)](_0xb5aa14(0x127)),'personId':_0x5a780b[_0xb5aa14(0x129)]};}else{const _0x4e65e3={'memberId':_0x488f3c,'unitId':_0x1bea6d,'content':_0x2a07ba,'mention':_0x4db24c},_0xb727bf=await this[_0xb5aa14(0x124)]['post']('/universer-api/comment/unit/'+_0x1bea6d+_0xb5aa14(0x12e),{'body':_0x4e65e3});return X(_0xb727bf[_0xb5aa14(0x153)][_0xb5aa14(0x119)],_0x5b06db);}}async[_0x338a3e(0x11c)](_0x14f34d){const _0x32c5d4=_0x338a3e;var _0x5df3a9,_0x506e1c;const {text:_0x49c043,unitId:_0x24b95f}=_0x14f34d,_0x42e7fa=(_0x506e1c=(_0x5df3a9=_0x49c043[_0x32c5d4(0x139)])==null?void 0x0:_0x5df3a9[_0x32c5d4(0x118)](_0x418b2d=>_0x418b2d[_0x32c5d4(0x14c)]===_0x265937[_0x32c5d4(0x155)])[_0x32c5d4(0x151)](_0x4c4660=>_0x4c4660['rangeId']))!=null?_0x506e1c:[],_0x4fe81d=JSON['stringify'](_0x49c043),_0x5e7004=_0x14f34d[_0x32c5d4(0x14d)],_0x337074=_0x14f34d['id'],_0x56bedd={'memberId':(await this[_0x32c5d4(0x13b)]['requireSession'](_0x24b95f))[_0x32c5d4(0x158)](),'unitId':_0x24b95f,'threadId':_0x5e7004,'mention':_0x42e7fa,'content':_0x4fe81d,'replyId':_0x337074},_0x1dbc8e=await this[_0x32c5d4(0x124)][_0x32c5d4(0x115)]('/universer-api/comment/unit/'+_0x24b95f+'/edit',{'body':_0x56bedd});return!_0x1dbc8e['body'][_0x32c5d4(0x104)]||_0x1dbc8e['body'][_0x32c5d4(0x104)][_0x32c5d4(0x120)]===0x1;}async[_0x338a3e(0x12d)](_0x3382c9){const _0x150cc7=_0x338a3e,{unitId:_0x141cbe}=_0x3382c9,_0x334650=_0x3382c9['threadId'],_0x104119={'memberId':this['_userService'][_0x150cc7(0x159)]()[_0x150cc7(0x14b)],'unitId':_0x141cbe,'threadId':_0x334650,'solved':_0x3382c9[_0x150cc7(0x143)]?I[_0x150cc7(0x14f)]:I[_0x150cc7(0x15d)]},_0x64487c=await this[_0x150cc7(0x124)][_0x150cc7(0x115)]('/universer-api/comment/unit/'+_0x141cbe+'/solved',{'body':_0x104119});return!_0x64487c['body'][_0x150cc7(0x104)]||_0x64487c[_0x150cc7(0x153)][_0x150cc7(0x104)]['code']===0x1;}async['deleteComment'](_0x536d8b,_0x3b1700,_0x2d620a,_0x489a84){const _0x451505=_0x338a3e,_0x4bda8c={'memberId':(await this[_0x451505(0x13b)][_0x451505(0x10a)](_0x536d8b))[_0x451505(0x158)](),'threadId':_0x2d620a,'replyId':_0x489a84,'unitId':_0x536d8b},_0x38a2b3=await this[_0x451505(0x124)][_0x451505(0x115)](_0x451505(0x148)+_0x536d8b+_0x451505(0x103),{'body':_0x4bda8c});return!_0x38a2b3[_0x451505(0x153)][_0x451505(0x104)]||_0x38a2b3[_0x451505(0x153)]['error']['code']===0x1;}async[_0x338a3e(0x132)](_0x1c8cac,_0x5481b0,_0x831ede){const _0x5f4a19=_0x338a3e,_0x10092c={'unitId':_0x1c8cac,'threadId':_0x831ede},_0x157b19=await this[_0x5f4a19(0x124)][_0x5f4a19(0x115)](_0x5f4a19(0x148)+_0x1c8cac+_0x5f4a19(0x117),{'body':_0x10092c}),_0x46485d=_0x831ede[_0x5f4a19(0x151)](_0x132065=>ee(_0x157b19['body']['comments'][_0x132065],_0x1c8cac,_0x5481b0))[_0x5f4a19(0x118)](Boolean);return Object['values'](_0x157b19['body']['users'])[_0x5f4a19(0x15c)](_0x211611=>{const _0x4d090c=_0x5f4a19;this[_0x4d090c(0x150)][_0x4d090c(0x149)](_0x211611);}),_0x46485d;}[_0x338a3e(0x106)](_0x212752){return{'id':_0x212752['id'],'threadId':_0x212752['threadId'],'ref':_0x212752['ref']};}};S=Q([b(0x0,_0x3dcfa0(_0x112d55)),b(0x1,_0x3dcfa0(_0x1fa847)),b(0x2,_0x3dcfa0(_0x2e0b26))],S);var re=Object[_0x338a3e(0x112)],te=(_0x18f331,_0x795dbf,_0x3e4002,_0x33eb0f)=>{const _0x35834a=_0x338a3e;for(var _0x51100e=_0x33eb0f>0x1?void 0x0:_0x33eb0f?re(_0x795dbf,_0x3e4002):_0x795dbf,_0x5e9855=_0x18f331[_0x35834a(0x131)]-0x1,_0x5aba81;_0x5e9855>=0x0;_0x5e9855--)(_0x5aba81=_0x18f331[_0x5e9855])&&(_0x51100e=_0x5aba81(_0x51100e)||_0x51100e);return _0x51100e;},M=(_0x918176,_0x219454)=>(_0x244624,_0x48c445)=>_0x219454(_0x244624,_0x48c445,_0x918176);let f=class extends _0x4d943a{constructor(_0x2a873,_0x1a6cad){const _0x397510=_0x338a3e;super(),this[_0x397510(0x105)]=_0x2a873,this[_0x397510(0x15b)]=_0x1a6cad,this[_0x397510(0x125)]();}['_initDataSource'](){const _0xa8573=_0x338a3e;this[_0xa8573(0x105)][_0xa8573(0x110)]=this[_0xa8573(0x15b)],this[_0xa8573(0x105)][_0xa8573(0xfa)]=!0x1;}};f=te([M(0x0,_0x4cbc34),M(0x1,_0x3dcfa0(S))],f);var se=Object[_0x338a3e(0x102)],oe=Object[_0x338a3e(0x112)],ne=(_0x181a5a,_0x7a7a70,_0x5cbeb5)=>_0x7a7a70 in _0x181a5a?se(_0x181a5a,_0x7a7a70,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5cbeb5}):_0x181a5a[_0x7a7a70]=_0x5cbeb5,ie=(_0x328dfb,_0x5df7d7,_0x2b461b,_0x477789)=>{const _0x375b10=_0x338a3e;for(var _0x45ddc3=_0x477789>0x1?void 0x0:_0x477789?oe(_0x5df7d7,_0x2b461b):_0x5df7d7,_0x42a7c5=_0x328dfb[_0x375b10(0x131)]-0x1,_0x12e377;_0x42a7c5>=0x0;_0x42a7c5--)(_0x12e377=_0x328dfb[_0x42a7c5])&&(_0x45ddc3=_0x12e377(_0x45ddc3)||_0x45ddc3);return _0x45ddc3;},N=(_0x1dffd5,_0x13cbd7)=>(_0x352a40,_0x2a90f9)=>_0x13cbd7(_0x352a40,_0x2a90f9,_0x1dffd5),$=(_0x3a438f,_0x9d9e30,_0x155efe)=>ne(_0x3a438f,typeof _0x9d9e30!=_0x338a3e(0x108)?_0x9d9e30+'':_0x9d9e30,_0x155efe);let g=class extends _0xc515d7{constructor(_0x44dd69=O,_0x9b157c,_0x3d048f){const _0xabcd55=_0x338a3e;super(),this[_0xabcd55(0x113)]=_0x44dd69,this[_0xabcd55(0x157)]=_0x9b157c,this['_configService']=_0x3d048f;const {..._0x4cb607}=_0xaa02ee({},O,this['_config']);this[_0xabcd55(0x137)][_0xabcd55(0x15e)](z,_0x4cb607);}['onStarting'](){const _0x26d32d=_0x338a3e;[[S],[f],[_]][_0x26d32d(0x15c)](_0x361d75=>{const _0x5b897a=_0x26d32d;this[_0x5b897a(0x157)][_0x5b897a(0x101)](_0x361d75);});}[_0x338a3e(0x142)](){const _0x48806f=_0x338a3e;this['_injector'][_0x48806f(0x10f)](f),this[_0x48806f(0x157)][_0x48806f(0x10f)](_);}};function _0x5a1c(_0x3f2a5f,_0x50d58e){const _0x5587d2=_0x5587();return _0x5a1c=function(_0x5a1c5f,_0x46e39a){_0x5a1c5f=_0x5a1c5f-0xfa;let _0xdaf486=_0x5587d2[_0x5a1c5f];return _0xdaf486;},_0x5a1c(_0x3f2a5f,_0x50d58e);}$(g,_0x338a3e(0x145),W),$(g,_0x338a3e(0x141),_0x2d50f1[_0x338a3e(0x107)]),g=ie([_0x266507(_0x3d6cdd,_0x5f22af,_0x1fa237),N(0x1,_0x3dcfa0(_0xac405f)),N(0x2,_0x108d43)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x12894f=_0x3fe7;(function(_0x4241c7,_0x228c1d){const _0x48a928=_0x3fe7,_0x1f7ad7=_0x4241c7();while(!![]){try{const _0x391be9=parseInt(_0x48a928(0x1d8))/0x1+parseInt(_0x48a928(0x214))/0x2+parseInt(_0x48a928(0x1c1))/0x3+parseInt(_0x48a928(0x1ec))/0x4*(-parseInt(_0x48a928(0x1c3))/0x5)+-parseInt(_0x48a928(0x1c6))/0x6+-parseInt(_0x48a928(0x1e0))/0x7*(-parseInt(_0x48a928(0x204))/0x8)+parseInt(_0x48a928(0x1cc))/0x9*(-parseInt(_0x48a928(0x1bc))/0xa);if(_0x391be9===_0x228c1d)break;else _0x1f7ad7['push'](_0x1f7ad7['shift']());}catch(_0x37f110){_0x1f7ad7['push'](_0x1f7ad7['shift']());}}}(_0x38d5,0x4eb92));import{CommentService as _0x445f16,CollaborationSessionService as _0xd9eaa,UniverCollaborationClientPlugin as _0x2e9440}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xcc64cb}from'@univerjs-pro/license';import{dayjs as _0x296554,UserManagerService as _0x432413,Inject as _0x5eb5e8,Injector as _0x20ead0,Disposable as _0x38820b,CustomRangeType as _0x5ae08f,UniverInstanceType as _0x5951dd,DependentOn as _0x367889,IConfigService as _0x3c3855,Plugin as _0x53658c,merge as _0x44dca6}from'@univerjs/core';function _0x3fe7(_0x228d40,_0x5ee896){const _0x38d5a2=_0x38d5();return _0x3fe7=function(_0x3fe7e1,_0x1c39ef){_0x3fe7e1=_0x3fe7e1-0x1b9;let _0x234770=_0x38d5a2[_0x3fe7e1];return _0x234770;},_0x3fe7(_0x228d40,_0x5ee896);}import{UniverThreadCommentUIPlugin as _0x31077f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x146ac8,IThreadCommentDataSourceService as _0xe4ca}from'@univerjs/thread-comment';import{bufferTime as _0x10be62}from'rxjs';import{HTTPService as _0xc7007}from'@univerjs/network';function _0x38d5(){const _0x28c87d=['/solved','Edit','Unknown','userId','commentUpdate$','_configService','addUser','_config','type','onReady','556366uWqXwI','replyId','forEach','_threadCommentModel','getUser','UNRECOGNIZED','_init','body','217wFFqtx','parse','_injector','_threadCommentDataSource','find','rangeType','map','customRanges','content','Solve','ref','comment','20ZkrPWY','/edit','OpenOrReOpen','filter','saveCommentToSnapshot','payload','add','length','_sessionService','_threadCommentDataSourceService','unitId','getCurrentUser','subscribe','getOwnPropertyDescriptor','Reply','error','/universer-api/comment/unit/','delete','resolveComment','slice','updateComment','size','userID','solved','48440upNfrj','pipe','reply','_userService','stringify','_httpService','_initUserSync','resolved','createTimestamp','_commentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','get','getMemberID','user','post','Delete','981750CtZqlM','Solved','threadId','_initDataSource','getUnit','6258640qgZJGf','code','requireSession','/reply','setConfig','784614vdIMSc','users','296260hyDQnx','disposeWithMe','root','1511460uqbRGv','pluginName','COMMENT','replies','Add','/delete','9GDqplP','addComment'];_0x38d5=function(){return _0x28c87d;};return _0x38d5();}const W=_0x12894f(0x20e);var I=(_0x5e6cdb=>(_0x5e6cdb[_0x5e6cdb[_0x12894f(0x1ee)]=0x0]=_0x12894f(0x1ee),_0x5e6cdb[_0x5e6cdb[_0x12894f(0x215)]=0x1]=_0x12894f(0x215),_0x5e6cdb[_0x5e6cdb[_0x12894f(0x1dd)]=-0x1]='UNRECOGNIZED',_0x5e6cdb))(I||{}),v=(_0x54f5d3=>(_0x54f5d3[_0x54f5d3[_0x12894f(0x1d0)]=0x0]=_0x12894f(0x1d0),_0x54f5d3[_0x54f5d3[_0x12894f(0x1ca)]=0x1]=_0x12894f(0x1ca),_0x54f5d3[_0x54f5d3[_0x12894f(0x1fa)]=0x2]=_0x12894f(0x1fa),_0x54f5d3[_0x54f5d3[_0x12894f(0x1cf)]=0x3]=_0x12894f(0x1cf),_0x54f5d3[_0x54f5d3[_0x12894f(0x213)]=0x4]='Delete',_0x54f5d3[_0x54f5d3[_0x12894f(0x1e9)]=0x5]='Solve',_0x54f5d3[_0x54f5d3[_0x12894f(0x1dd)]=-0x1]=_0x12894f(0x1dd),_0x54f5d3))(v||{});const y=_0x4b5003=>_0x296554(new Date(+_0x4b5003))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x27e634,_0x4f92e7)=>{const _0x4d4a6f=_0x12894f,_0x5545db=_0x27e634[_0x4d4a6f(0x20f)](_0x432413),_0x3a66b4=_0x27e634[_0x4d4a6f(0x20f)](_0xc7007);_0x4f92e7['forEach'](_0x282d3e=>{const _0x2099c8=_0x4d4a6f;_0x5545db[_0x2099c8(0x1dc)](_0x282d3e)&&_0x4f92e7[_0x2099c8(0x1fd)](_0x282d3e);}),_0x4f92e7[_0x4d4a6f(0x201)]&&(await _0x3a66b4[_0x4d4a6f(0x20f)]('/universer-api/user/list',{'params':{'userIDs':[..._0x4f92e7]}}))[_0x4d4a6f(0x1df)]['users'][_0x4d4a6f(0x1da)](_0x591069=>{const _0x14076=_0x4d4a6f;_0x591069&&_0x5545db[_0x14076(0x1d4)](_0x591069);});};var K=Object[_0x12894f(0x1f9)],V=(_0x388a8c,_0x485b84,_0x4034a1,_0x59e21f)=>{for(var _0x2c347b=_0x59e21f>0x1?void 0x0:_0x59e21f?K(_0x485b84,_0x4034a1):_0x485b84,_0x40f523=_0x388a8c['length']-0x1,_0x210191;_0x40f523>=0x0;_0x40f523--)(_0x210191=_0x388a8c[_0x40f523])&&(_0x2c347b=_0x210191(_0x2c347b)||_0x2c347b);return _0x2c347b;},p=(_0x38683e,_0x4bb3a9)=>(_0x12710e,_0x526ee8)=>_0x4bb3a9(_0x12710e,_0x526ee8,_0x38683e);let _=class extends _0x38820b{constructor(_0x511fb8,_0x19c0b6,_0x49f806,_0x590578){const _0x54c3ff=_0x12894f;super(),this[_0x54c3ff(0x20d)]=_0x511fb8,this[_0x54c3ff(0x1db)]=_0x19c0b6,this[_0x54c3ff(0x207)]=_0x49f806,this[_0x54c3ff(0x1e2)]=_0x590578,this['_init'](),this[_0x54c3ff(0x20a)]();}[_0x12894f(0x20a)](){const _0x3a9cab=_0x12894f;this[_0x3a9cab(0x1c4)](this['_threadCommentModel']['commentUpdate$'][_0x3a9cab(0x205)](_0x10be62(0x10))[_0x3a9cab(0x1f8)](_0x4e7117=>{const _0x5a3a1d=_0x3a9cab,_0x28e2f0=new Set();_0x4e7117[_0x5a3a1d(0x1da)](_0x24e4d6=>{const _0x537130=_0x5a3a1d;switch(_0x24e4d6[_0x537130(0x1d6)]){case _0x537130(0x1f2):{const _0x236fd8=_0x24e4d6[_0x537130(0x1f1)]['personId'];_0x28e2f0[_0x537130(0x1f2)](_0x236fd8);break;}}}),B(this['_injector'],_0x28e2f0);}));}[_0x12894f(0x1de)](){const _0x2c0a8e=_0x12894f;this['disposeWithMe'](this[_0x2c0a8e(0x20d)][_0x2c0a8e(0x1d2)]['subscribe'](async _0x235e4a=>{const _0x46425a=_0x2c0a8e;var _0x5a9228,_0x402783,_0x38f22c,_0x5dfb17;const _0x356023=(_0x5a9228=this['_threadCommentModel'][_0x46425a(0x1bb)](_0x235e4a[_0x46425a(0x1f6)])[_0x46425a(0x1e4)](_0x781d6a=>_0x781d6a[_0x46425a(0x1b9)]===_0x235e4a[_0x46425a(0x1b9)]))==null?void 0x0:_0x5a9228[_0x46425a(0x1c5)];if(!_0x356023)return;const {unitId:_0x5757bd,subUnitId:_0x3c2137}=_0x356023;switch(_0x235e4a[_0x46425a(0x211)]&&this[_0x46425a(0x207)][_0x46425a(0x1d4)](_0x235e4a[_0x46425a(0x211)]),_0x235e4a[_0x46425a(0x1d6)]){case v[_0x46425a(0x1ca)]:break;case v[_0x46425a(0x1fa)]:{this[_0x46425a(0x1db)]['addComment'](_0x5757bd,_0x3c2137,{'unitId':_0x5757bd,'subUnitId':_0x3c2137,'ref':'','id':_0x235e4a[_0x46425a(0x1d9)],'dT':y(+_0x235e4a[_0x46425a(0x20c)]),'threadId':_0x235e4a['threadId'],'personId':(_0x38f22c=(_0x402783=_0x235e4a[_0x46425a(0x211)])==null?void 0x0:_0x402783['userID'])!=null?_0x38f22c:_0x235e4a[_0x46425a(0x1d1)],'text':JSON[_0x46425a(0x1e1)](_0x235e4a['content']),'parentId':_0x356023['id']});break;}case v[_0x46425a(0x213)]:{const _0x58afaa=this['_threadCommentModel']['getComment'](_0x5757bd,_0x3c2137,_0x235e4a[_0x46425a(0x1d9)]);_0x58afaa&&_0x58afaa['parentId']&&this[_0x46425a(0x1db)]['deleteComment'](_0x5757bd,_0x3c2137,_0x235e4a[_0x46425a(0x1d9)]);break;}case v['Edit']:{this[_0x46425a(0x1db)][_0x46425a(0x200)](_0x5757bd,_0x3c2137,{'commentId':_0x235e4a[_0x46425a(0x1d9)],'text':JSON[_0x46425a(0x1e1)](_0x235e4a['content'])});break;}case v[_0x46425a(0x1e9)]:{const _0x333175=(_0x5dfb17=this[_0x46425a(0x1db)][_0x46425a(0x1bb)](_0x235e4a[_0x46425a(0x1f6)])[_0x46425a(0x1e4)](_0x329a1c=>_0x329a1c['threadId']===_0x235e4a[_0x46425a(0x1b9)]))==null?void 0x0:_0x5dfb17['root'];_0x333175&&this[_0x46425a(0x1db)][_0x46425a(0x1fe)](_0x5757bd,_0x3c2137,_0x333175['id'],_0x235e4a['solved']===I[_0x46425a(0x215)]);break;}}}));}};_=V([p(0x0,_0x5eb5e8(_0x445f16)),p(0x1,_0x5eb5e8(_0x146ac8)),p(0x2,_0x5eb5e8(_0x432413)),p(0x3,_0x5eb5e8(_0x20ead0))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x12894f(0x1f9)],Q=(_0x2a5267,_0x3a5e11,_0x7a59c5,_0x1b7578)=>{for(var _0x5e1dc1=_0x1b7578>0x1?void 0x0:_0x1b7578?k(_0x3a5e11,_0x7a59c5):_0x3a5e11,_0x1d1259=_0x2a5267['length']-0x1,_0x4e53d3;_0x1d1259>=0x0;_0x1d1259--)(_0x4e53d3=_0x2a5267[_0x1d1259])&&(_0x5e1dc1=_0x4e53d3(_0x5e1dc1)||_0x5e1dc1);return _0x5e1dc1;},b=(_0x1951c9,_0x141460)=>(_0x38b238,_0x398b22)=>_0x141460(_0x38b238,_0x398b22,_0x1951c9);function X(_0x5269c2,_0x2a93ab){const _0x37c64f=_0x12894f,_0x58a858=_0x5269c2[_0x37c64f(0x1c9)][0x0];return{..._0x2a93ab,'id':_0x58a858['replyId'],'resolved':_0x5269c2[_0x37c64f(0x203)]===0x1,'dT':y(_0x58a858['createTimestamp']),'personId':_0x58a858[_0x37c64f(0x1d1)],'threadId':_0x58a858[_0x37c64f(0x1b9)]};}function ee(_0x27c05f,_0x3544af,_0x55c3ed){const _0x519424=_0x12894f;var _0x7526f8,_0x28e8c5;if(((_0x28e8c5=(_0x7526f8=_0x27c05f==null?void 0x0:_0x27c05f['replies'])==null?void 0x0:_0x7526f8[_0x519424(0x1f3)])!=null?_0x28e8c5:0x0)>0x0){const _0x1cca96=(_0x129c8a,_0x4b98b4)=>({'id':_0x129c8a[_0x519424(0x1d9)],'threadId':_0x129c8a[_0x519424(0x1b9)],'dT':y(_0x129c8a[_0x519424(0x20c)]),'personId':_0x129c8a['userId'],'resolved':_0x27c05f[_0x519424(0x203)]===I['Solved'],'unitId':_0x3544af,'subUnitId':_0x55c3ed,'text':JSON[_0x519424(0x1e1)](_0x129c8a[_0x519424(0x1e8)]),'parentId':_0x4b98b4}),_0x437622=_0x1cca96(_0x27c05f[_0x519424(0x1c9)][0x0]);return{..._0x437622,'children':_0x27c05f[_0x519424(0x1c9)][_0x519424(0x1ff)](0x1)['map'](_0xc3711b=>_0x1cca96(_0xc3711b,_0x437622['id']))};}return null;}let S=class{constructor(_0x15299a,_0x112297,_0x4adbfc){const _0x38f9a8=_0x12894f;this[_0x38f9a8(0x209)]=_0x15299a,this[_0x38f9a8(0x207)]=_0x112297,this[_0x38f9a8(0x1f4)]=_0x4adbfc;}async[_0x12894f(0x1cd)](_0x35699a){const _0x36cd44=_0x12894f;var _0x47a13e,_0x1d6034;const {parentId:_0x2194a0,unitId:_0xdc88c,text:_0x4d468d,threadId:_0x553009}=_0x35699a,_0x43e624=(_0x1d6034=(_0x47a13e=_0x4d468d[_0x36cd44(0x1e7)])==null?void 0x0:_0x47a13e[_0x36cd44(0x1ef)](_0x215166=>_0x215166[_0x36cd44(0x1e5)]===_0x5ae08f['COMMENT'])[_0x36cd44(0x1e6)](_0x3301e7=>_0x3301e7['rangeId']))!=null?_0x1d6034:[],_0x5cdeb7=JSON[_0x36cd44(0x208)](_0x4d468d),_0x19497b=(await this[_0x36cd44(0x1f4)]['requireSession'](_0xdc88c))['getMemberID']();if(_0x2194a0){const _0x253002={'memberId':_0x19497b,'unitId':_0xdc88c,'content':_0x5cdeb7,'mention':_0x43e624,'threadId':_0x553009},_0x110531=(await this[_0x36cd44(0x209)]['post'](_0x36cd44(0x1fc)+_0xdc88c+_0x36cd44(0x1bf),{'body':_0x253002}))[_0x36cd44(0x1df)][_0x36cd44(0x206)];return{..._0x35699a,'id':_0x110531['replyId'],'dT':_0x296554(+_0x110531[_0x36cd44(0x20c)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x110531[_0x36cd44(0x1d1)]};}else{const _0x495067={'memberId':_0x19497b,'unitId':_0xdc88c,'content':_0x5cdeb7,'mention':_0x43e624},_0x4d1b4e=await this[_0x36cd44(0x209)][_0x36cd44(0x212)]('/universer-api/comment/unit/'+_0xdc88c+'/add',{'body':_0x495067});return X(_0x4d1b4e[_0x36cd44(0x1df)][_0x36cd44(0x1eb)],_0x35699a);}}async[_0x12894f(0x200)](_0x4f3cc3){const _0x32795d=_0x12894f;var _0x1484a8,_0x48a30a;const {text:_0x137877,unitId:_0x58d298}=_0x4f3cc3,_0x4449a5=(_0x48a30a=(_0x1484a8=_0x137877[_0x32795d(0x1e7)])==null?void 0x0:_0x1484a8[_0x32795d(0x1ef)](_0x438e94=>_0x438e94[_0x32795d(0x1e5)]===_0x5ae08f[_0x32795d(0x1c8)])['map'](_0x55f744=>_0x55f744['rangeId']))!=null?_0x48a30a:[],_0x4d0dff=JSON[_0x32795d(0x208)](_0x137877),_0x4299a3=_0x4f3cc3['threadId'],_0x44a512=_0x4f3cc3['id'],_0x1f83ac={'memberId':(await this[_0x32795d(0x1f4)][_0x32795d(0x1be)](_0x58d298))[_0x32795d(0x210)](),'unitId':_0x58d298,'threadId':_0x4299a3,'mention':_0x4449a5,'content':_0x4d0dff,'replyId':_0x44a512},_0x240281=await this[_0x32795d(0x209)][_0x32795d(0x212)]('/universer-api/comment/unit/'+_0x58d298+_0x32795d(0x1ed),{'body':_0x1f83ac});return!_0x240281[_0x32795d(0x1df)][_0x32795d(0x1fb)]||_0x240281[_0x32795d(0x1df)][_0x32795d(0x1fb)][_0x32795d(0x1bd)]===0x1;}async['resolveComment'](_0x528a35){const _0x44eadd=_0x12894f,{unitId:_0x57b647}=_0x528a35,_0x55ba20=_0x528a35[_0x44eadd(0x1b9)],_0x5da35f={'memberId':this['_userService'][_0x44eadd(0x1f7)]()[_0x44eadd(0x202)],'unitId':_0x57b647,'threadId':_0x55ba20,'solved':_0x528a35[_0x44eadd(0x20b)]?I[_0x44eadd(0x215)]:I[_0x44eadd(0x1ee)]},_0x10c4d7=await this[_0x44eadd(0x209)]['post'](_0x44eadd(0x1fc)+_0x57b647+_0x44eadd(0x1ce),{'body':_0x5da35f});return!_0x10c4d7[_0x44eadd(0x1df)]['error']||_0x10c4d7[_0x44eadd(0x1df)][_0x44eadd(0x1fb)]['code']===0x1;}async['deleteComment'](_0x347be6,_0x135e48,_0xc659fc,_0x4bf134){const _0x30323f=_0x12894f,_0x3ba632={'memberId':(await this[_0x30323f(0x1f4)][_0x30323f(0x1be)](_0x347be6))[_0x30323f(0x210)](),'threadId':_0xc659fc,'replyId':_0x4bf134,'unitId':_0x347be6},_0x43f126=await this[_0x30323f(0x209)][_0x30323f(0x212)](_0x30323f(0x1fc)+_0x347be6+_0x30323f(0x1cb),{'body':_0x3ba632});return!_0x43f126['body'][_0x30323f(0x1fb)]||_0x43f126['body'][_0x30323f(0x1fb)]['code']===0x1;}async['listComments'](_0x5e4f1e,_0x459721,_0xd07ffc){const _0x5c431f=_0x12894f,_0x317050={'unitId':_0x5e4f1e,'threadId':_0xd07ffc},_0x4389a7=await this['_httpService'][_0x5c431f(0x212)](_0x5c431f(0x1fc)+_0x5e4f1e+'/list',{'body':_0x317050}),_0x1d9c9a=_0xd07ffc['map'](_0x12df22=>ee(_0x4389a7['body']['comments'][_0x12df22],_0x5e4f1e,_0x459721))[_0x5c431f(0x1ef)](Boolean);return Object['values'](_0x4389a7[_0x5c431f(0x1df)][_0x5c431f(0x1c2)])[_0x5c431f(0x1da)](_0x4350f8=>{this['_userService']['addUser'](_0x4350f8);}),_0x1d9c9a;}[_0x12894f(0x1f0)](_0x3a0aa2){const _0x3b5c0a=_0x12894f;return{'id':_0x3a0aa2['id'],'threadId':_0x3a0aa2['threadId'],'ref':_0x3a0aa2[_0x3b5c0a(0x1ea)]};}};S=Q([b(0x0,_0x5eb5e8(_0xc7007)),b(0x1,_0x5eb5e8(_0x432413)),b(0x2,_0x5eb5e8(_0xd9eaa))],S);var re=Object[_0x12894f(0x1f9)],te=(_0x1f6361,_0x4daec7,_0x154f16,_0x4fd746)=>{const _0x166ce0=_0x12894f;for(var _0x365aa8=_0x4fd746>0x1?void 0x0:_0x4fd746?re(_0x4daec7,_0x154f16):_0x4daec7,_0x43051c=_0x1f6361[_0x166ce0(0x1f3)]-0x1,_0x39e747;_0x43051c>=0x0;_0x43051c--)(_0x39e747=_0x1f6361[_0x43051c])&&(_0x365aa8=_0x39e747(_0x365aa8)||_0x365aa8);return _0x365aa8;},M=(_0x4d337f,_0x180353)=>(_0x4b374b,_0x523fa0)=>_0x180353(_0x4b374b,_0x523fa0,_0x4d337f);let f=class extends _0x38820b{constructor(_0x6cc9e0,_0x5bfc5f){const _0x8805fb=_0x12894f;super(),this[_0x8805fb(0x1f5)]=_0x6cc9e0,this[_0x8805fb(0x1e3)]=_0x5bfc5f,this[_0x8805fb(0x1ba)]();}[_0x12894f(0x1ba)](){const _0x11aea7=_0x12894f;this[_0x11aea7(0x1f5)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0xe4ca),M(0x1,_0x5eb5e8(S))],f);var se=Object['defineProperty'],oe=Object[_0x12894f(0x1f9)],ne=(_0x3fbdd6,_0x3e2ce9,_0x12fa4e)=>_0x3e2ce9 in _0x3fbdd6?se(_0x3fbdd6,_0x3e2ce9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x12fa4e}):_0x3fbdd6[_0x3e2ce9]=_0x12fa4e,ie=(_0x597d24,_0x145763,_0x4c7200,_0x185b46)=>{const _0x38acbb=_0x12894f;for(var _0x425dbe=_0x185b46>0x1?void 0x0:_0x185b46?oe(_0x145763,_0x4c7200):_0x145763,_0x17198f=_0x597d24[_0x38acbb(0x1f3)]-0x1,_0x20b13d;_0x17198f>=0x0;_0x17198f--)(_0x20b13d=_0x597d24[_0x17198f])&&(_0x425dbe=_0x20b13d(_0x425dbe)||_0x425dbe);return _0x425dbe;},N=(_0x5b67d6,_0x1167a8)=>(_0x180c89,_0x507609)=>_0x1167a8(_0x180c89,_0x507609,_0x5b67d6),$=(_0x434cd2,_0x243d71,_0x350a1b)=>ne(_0x434cd2,typeof _0x243d71!='symbol'?_0x243d71+'':_0x243d71,_0x350a1b);let g=class extends _0x53658c{constructor(_0x56acba=O,_0x32391f,_0x5993b8){const _0x2070d1=_0x12894f;super(),this[_0x2070d1(0x1d5)]=_0x56acba,this[_0x2070d1(0x1e2)]=_0x32391f,this['_configService']=_0x5993b8;const {..._0x5ccaad}=_0x44dca6({},O,this[_0x2070d1(0x1d5)]);this[_0x2070d1(0x1d3)][_0x2070d1(0x1c0)](z,_0x5ccaad);}['onStarting'](){[[S],[f],[_]]['forEach'](_0x450499=>{const _0x2f2707=_0x3fe7;this['_injector'][_0x2f2707(0x1f2)](_0x450499);});}[_0x12894f(0x1d7)](){const _0x47d22e=_0x12894f;this[_0x47d22e(0x1e2)][_0x47d22e(0x20f)](f),this[_0x47d22e(0x1e2)][_0x47d22e(0x20f)](_);}};$(g,_0x12894f(0x1c7),W),$(g,_0x12894f(0x1d6),_0x5951dd['UNIVER_UNKNOWN']),g=ie([_0x367889(_0x31077f,_0x2e9440,_0xcc64cb),N(0x1,_0x5eb5e8(_0x20ead0)),N(0x2,_0x3c3855)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x338a3e=_0x5a1c;(function(_0x421eef,_0x21576a){const _0x155f51=_0x5a1c,_0x1f40ca=_0x421eef();while(!![]){try{const _0x7a0bbb=-parseInt(_0x155f51(0x10b))/0x1*(-parseInt(_0x155f51(0x100))/0x2)+parseInt(_0x155f51(0x11b))/0x3+parseInt(_0x155f51(0x111))/0x4*(-parseInt(_0x155f51(0x14a))/0x5)+parseInt(_0x155f51(0x13a))/0x6+-parseInt(_0x155f51(0x156))/0x7+parseInt(_0x155f51(0x122))/0x8*(parseInt(_0x155f51(0x146))/0x9)+-parseInt(_0x155f51(0x12c))/0xa;if(_0x7a0bbb===_0x21576a)break;else _0x1f40ca['push'](_0x1f40ca['shift']());}catch(_0x2934f6){_0x1f40ca['push'](_0x1f40ca['shift']());}}}(_0x5587,0x4a60c));import{CommentService as _0x1def95,CollaborationSessionService as _0x2e0b26,UniverCollaborationClientPlugin as _0x5f22af}from'@univerjs-pro/collaboration-client';function _0x5587(){const _0x1ed97f=['add','defineProperty','/delete','error','_threadCommentDataSourceService','saveCommentToSnapshot','UNIVER_UNKNOWN','symbol','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','requireSession','11ZMXMml','Reply','find','getUnit','get','dataSource','995772toOZkT','getOwnPropertyDescriptor','_config','Edit','post','users','/list','filter','comment','Delete','1028079AWGkrD','updateComment','_threadCommentModel','getComment','format','code','solved','8dHujXV','subscribe','_httpService','_initDataSource','slice','YYYY/MM/DD\x20HH:mm','pipe','userId','root','_initUserSync','5072660gWPFPJ','resolveComment','/add','content','unitId','length','listComments','rangeId','reply','commentUpdate$','_init','_configService','Solve','customRanges','920280DFVkgd','_sessionService','Add','delete','createTimestamp','replyId','user','type','onReady','resolved','/reply','pluginName','2690757eNPXGv','getUser','/universer-api/comment/unit/','addUser','5HIVOuH','userID','rangeType','threadId','addComment','Solved','_userService','map','parse','body','stringify','COMMENT','1820896gWeTNH','_injector','getMemberID','getCurrentUser','size','_threadCommentDataSource','forEach','OpenOrReOpen','setConfig','syncUpdateMutationToColla','parentId','deleteComment','_commentService','replies','UNRECOGNIZED','95626EdJvYz'];_0x5587=function(){return _0x1ed97f;};return _0x5587();}import{UniverLicensePlugin as _0x1fa237}from'@univerjs-pro/license';import{dayjs as _0x2e89bc,UserManagerService as _0x1fa847,Inject as _0x3dcfa0,Injector as _0xac405f,Disposable as _0x4d943a,CustomRangeType as _0x265937,UniverInstanceType as _0x2d50f1,DependentOn as _0x266507,IConfigService as _0x108d43,Plugin as _0xc515d7,merge as _0xaa02ee}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3d6cdd}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2cf2a9,IThreadCommentDataSourceService as _0x4cbc34}from'@univerjs/thread-comment';import{bufferTime as _0x4bb671}from'rxjs';import{HTTPService as _0x112d55}from'@univerjs/network';const W=_0x338a3e(0x109);var I=(_0x4500c7=>(_0x4500c7[_0x4500c7[_0x338a3e(0x15d)]=0x0]='OpenOrReOpen',_0x4500c7[_0x4500c7['Solved']=0x1]=_0x338a3e(0x14f),_0x4500c7[_0x4500c7[_0x338a3e(0xff)]=-0x1]=_0x338a3e(0xff),_0x4500c7))(I||{}),v=(_0x35e1fb=>(_0x35e1fb[_0x35e1fb['Unknown']=0x0]='Unknown',_0x35e1fb[_0x35e1fb[_0x338a3e(0x13c)]=0x1]=_0x338a3e(0x13c),_0x35e1fb[_0x35e1fb[_0x338a3e(0x10c)]=0x2]=_0x338a3e(0x10c),_0x35e1fb[_0x35e1fb[_0x338a3e(0x114)]=0x3]=_0x338a3e(0x114),_0x35e1fb[_0x35e1fb[_0x338a3e(0x11a)]=0x4]='Delete',_0x35e1fb[_0x35e1fb[_0x338a3e(0x138)]=0x5]=_0x338a3e(0x138),_0x35e1fb[_0x35e1fb[_0x338a3e(0xff)]=-0x1]=_0x338a3e(0xff),_0x35e1fb))(v||{});const y=_0x226e89=>_0x2e89bc(new Date(+_0x226e89))[_0x338a3e(0x11f)](_0x338a3e(0x127)),B=async(_0x378fa9,_0x142af3)=>{const _0x447adb=_0x338a3e,_0x182c3d=_0x378fa9[_0x447adb(0x10f)](_0x1fa847),_0x3c579b=_0x378fa9[_0x447adb(0x10f)](_0x112d55);_0x142af3[_0x447adb(0x15c)](_0x41b28e=>{const _0x5da1c3=_0x447adb;_0x182c3d[_0x5da1c3(0x147)](_0x41b28e)&&_0x142af3[_0x5da1c3(0x13d)](_0x41b28e);}),_0x142af3[_0x447adb(0x15a)]&&(await _0x3c579b['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x142af3]}}))['body'][_0x447adb(0x116)][_0x447adb(0x15c)](_0x56e572=>{const _0x56958b=_0x447adb;_0x56e572&&_0x182c3d[_0x56958b(0x149)](_0x56e572);});};var K=Object[_0x338a3e(0x112)],V=(_0x4f6e70,_0x1b3a77,_0x548a66,_0x26bec7)=>{const _0x114894=_0x338a3e;for(var _0x2dc9f9=_0x26bec7>0x1?void 0x0:_0x26bec7?K(_0x1b3a77,_0x548a66):_0x1b3a77,_0x23d12d=_0x4f6e70[_0x114894(0x131)]-0x1,_0x21d864;_0x23d12d>=0x0;_0x23d12d--)(_0x21d864=_0x4f6e70[_0x23d12d])&&(_0x2dc9f9=_0x21d864(_0x2dc9f9)||_0x2dc9f9);return _0x2dc9f9;},p=(_0x351c9a,_0x4ffbb4)=>(_0x21d346,_0x4064a0)=>_0x4ffbb4(_0x21d346,_0x4064a0,_0x351c9a);let _=class extends _0x4d943a{constructor(_0x297217,_0xf241f0,_0x16f3f2,_0x543ccf){const _0x15c834=_0x338a3e;super(),this[_0x15c834(0xfd)]=_0x297217,this[_0x15c834(0x11d)]=_0xf241f0,this['_userService']=_0x16f3f2,this['_injector']=_0x543ccf,this['_init'](),this[_0x15c834(0x12b)]();}[_0x338a3e(0x12b)](){const _0x82eccc=_0x338a3e;this['disposeWithMe'](this[_0x82eccc(0x11d)]['commentUpdate$'][_0x82eccc(0x128)](_0x4bb671(0x10))[_0x82eccc(0x123)](_0x56da90=>{const _0x5d7d54=_0x82eccc,_0x44e3ee=new Set();_0x56da90[_0x5d7d54(0x15c)](_0x538286=>{const _0x4fcb7e=_0x5d7d54;switch(_0x538286[_0x4fcb7e(0x141)]){case _0x4fcb7e(0x101):{const _0x1cbb31=_0x538286['payload']['personId'];_0x44e3ee[_0x4fcb7e(0x101)](_0x1cbb31);break;}}}),B(this['_injector'],_0x44e3ee);}));}[_0x338a3e(0x136)](){const _0xa4ead8=_0x338a3e;this['disposeWithMe'](this['_commentService'][_0xa4ead8(0x135)][_0xa4ead8(0x123)](async _0x3694f6=>{const _0xcd9c24=_0xa4ead8;var _0x1f5d51,_0x41643d,_0x15beaf,_0x40b714;const _0x3d802e=(_0x1f5d51=this[_0xcd9c24(0x11d)][_0xcd9c24(0x10e)](_0x3694f6[_0xcd9c24(0x130)])[_0xcd9c24(0x10d)](_0x25f61f=>_0x25f61f[_0xcd9c24(0x14d)]===_0x3694f6['threadId']))==null?void 0x0:_0x1f5d51[_0xcd9c24(0x12a)];if(!_0x3d802e)return;const {unitId:_0x1363a9,subUnitId:_0x42d716}=_0x3d802e;switch(_0x3694f6[_0xcd9c24(0x140)]&&this[_0xcd9c24(0x150)][_0xcd9c24(0x149)](_0x3694f6[_0xcd9c24(0x140)]),_0x3694f6['type']){case v['Add']:break;case v[_0xcd9c24(0x10c)]:{this[_0xcd9c24(0x11d)][_0xcd9c24(0x14e)](_0x1363a9,_0x42d716,{'unitId':_0x1363a9,'subUnitId':_0x42d716,'ref':'','id':_0x3694f6[_0xcd9c24(0x13f)],'dT':y(+_0x3694f6[_0xcd9c24(0x13e)]),'threadId':_0x3694f6[_0xcd9c24(0x14d)],'personId':(_0x15beaf=(_0x41643d=_0x3694f6['user'])==null?void 0x0:_0x41643d[_0xcd9c24(0x14b)])!=null?_0x15beaf:_0x3694f6[_0xcd9c24(0x129)],'text':JSON[_0xcd9c24(0x152)](_0x3694f6[_0xcd9c24(0x12f)]),'parentId':_0x3d802e['id']});break;}case v[_0xcd9c24(0x11a)]:{const _0x1224f1=this[_0xcd9c24(0x11d)][_0xcd9c24(0x11e)](_0x1363a9,_0x42d716,_0x3694f6[_0xcd9c24(0x13f)]);_0x1224f1&&_0x1224f1[_0xcd9c24(0xfb)]&&this[_0xcd9c24(0x11d)][_0xcd9c24(0xfc)](_0x1363a9,_0x42d716,_0x3694f6[_0xcd9c24(0x13f)]);break;}case v[_0xcd9c24(0x114)]:{this[_0xcd9c24(0x11d)][_0xcd9c24(0x11c)](_0x1363a9,_0x42d716,{'commentId':_0x3694f6['replyId'],'text':JSON[_0xcd9c24(0x152)](_0x3694f6[_0xcd9c24(0x12f)])});break;}case v[_0xcd9c24(0x138)]:{const _0x32af58=(_0x40b714=this[_0xcd9c24(0x11d)][_0xcd9c24(0x10e)](_0x3694f6[_0xcd9c24(0x130)])[_0xcd9c24(0x10d)](_0x5edea5=>_0x5edea5[_0xcd9c24(0x14d)]===_0x3694f6['threadId']))==null?void 0x0:_0x40b714[_0xcd9c24(0x12a)];_0x32af58&&this[_0xcd9c24(0x11d)]['resolveComment'](_0x1363a9,_0x42d716,_0x32af58['id'],_0x3694f6[_0xcd9c24(0x121)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x3dcfa0(_0x1def95)),p(0x1,_0x3dcfa0(_0x2cf2a9)),p(0x2,_0x3dcfa0(_0x1fa847)),p(0x3,_0x3dcfa0(_0xac405f))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x338a3e(0x112)],Q=(_0x5cffac,_0x9fdacf,_0x1fcf1f,_0x4ac5c6)=>{const _0x5d2aab=_0x338a3e;for(var _0x3ea5c6=_0x4ac5c6>0x1?void 0x0:_0x4ac5c6?k(_0x9fdacf,_0x1fcf1f):_0x9fdacf,_0x5a1a7d=_0x5cffac[_0x5d2aab(0x131)]-0x1,_0x4220eb;_0x5a1a7d>=0x0;_0x5a1a7d--)(_0x4220eb=_0x5cffac[_0x5a1a7d])&&(_0x3ea5c6=_0x4220eb(_0x3ea5c6)||_0x3ea5c6);return _0x3ea5c6;},b=(_0x9731cc,_0x4af6e8)=>(_0x510a8d,_0x2c6b36)=>_0x4af6e8(_0x510a8d,_0x2c6b36,_0x9731cc);function X(_0x2ccde8,_0x176d52){const _0x3a1a10=_0x338a3e,_0x19bf87=_0x2ccde8['replies'][0x0];return{..._0x176d52,'id':_0x19bf87[_0x3a1a10(0x13f)],'resolved':_0x2ccde8[_0x3a1a10(0x121)]===0x1,'dT':y(_0x19bf87[_0x3a1a10(0x13e)]),'personId':_0x19bf87[_0x3a1a10(0x129)],'threadId':_0x19bf87['threadId']};}function ee(_0x2a1ce0,_0x451b4b,_0x22e8dc){const _0x5e87f7=_0x338a3e;var _0x3777e1,_0x30a3dc;if(((_0x30a3dc=(_0x3777e1=_0x2a1ce0==null?void 0x0:_0x2a1ce0['replies'])==null?void 0x0:_0x3777e1[_0x5e87f7(0x131)])!=null?_0x30a3dc:0x0)>0x0){const _0x147947=(_0x4a85a1,_0x5bd59b)=>({'id':_0x4a85a1[_0x5e87f7(0x13f)],'threadId':_0x4a85a1['threadId'],'dT':y(_0x4a85a1[_0x5e87f7(0x13e)]),'personId':_0x4a85a1[_0x5e87f7(0x129)],'resolved':_0x2a1ce0['solved']===I[_0x5e87f7(0x14f)],'unitId':_0x451b4b,'subUnitId':_0x22e8dc,'text':JSON['parse'](_0x4a85a1[_0x5e87f7(0x12f)]),'parentId':_0x5bd59b}),_0x968d23=_0x147947(_0x2a1ce0[_0x5e87f7(0xfe)][0x0]);return{..._0x968d23,'children':_0x2a1ce0[_0x5e87f7(0xfe)][_0x5e87f7(0x126)](0x1)[_0x5e87f7(0x151)](_0x54641e=>_0x147947(_0x54641e,_0x968d23['id']))};}return null;}let S=class{constructor(_0x3e1357,_0x2ca5a6,_0x44dade){const _0x2f836e=_0x338a3e;this['_httpService']=_0x3e1357,this[_0x2f836e(0x150)]=_0x2ca5a6,this[_0x2f836e(0x13b)]=_0x44dade;}async[_0x338a3e(0x14e)](_0x5b06db){const _0xb5aa14=_0x338a3e;var _0x54f22d,_0x598e90;const {parentId:_0x40580b,unitId:_0x1bea6d,text:_0x8a6db2,threadId:_0x4781a4}=_0x5b06db,_0x4db24c=(_0x598e90=(_0x54f22d=_0x8a6db2['customRanges'])==null?void 0x0:_0x54f22d[_0xb5aa14(0x118)](_0x359dc5=>_0x359dc5['rangeType']===_0x265937[_0xb5aa14(0x155)])['map'](_0x1bf44b=>_0x1bf44b[_0xb5aa14(0x133)]))!=null?_0x598e90:[],_0x2a07ba=JSON[_0xb5aa14(0x154)](_0x8a6db2),_0x488f3c=(await this[_0xb5aa14(0x13b)][_0xb5aa14(0x10a)](_0x1bea6d))[_0xb5aa14(0x158)]();if(_0x40580b){const _0x381699={'memberId':_0x488f3c,'unitId':_0x1bea6d,'content':_0x2a07ba,'mention':_0x4db24c,'threadId':_0x4781a4},_0x5a780b=(await this['_httpService'][_0xb5aa14(0x115)]('/universer-api/comment/unit/'+_0x1bea6d+_0xb5aa14(0x144),{'body':_0x381699}))[_0xb5aa14(0x153)][_0xb5aa14(0x134)];return{..._0x5b06db,'id':_0x5a780b[_0xb5aa14(0x13f)],'dT':_0x2e89bc(+_0x5a780b[_0xb5aa14(0x13e)])[_0xb5aa14(0x11f)](_0xb5aa14(0x127)),'personId':_0x5a780b[_0xb5aa14(0x129)]};}else{const _0x4e65e3={'memberId':_0x488f3c,'unitId':_0x1bea6d,'content':_0x2a07ba,'mention':_0x4db24c},_0xb727bf=await this[_0xb5aa14(0x124)]['post']('/universer-api/comment/unit/'+_0x1bea6d+_0xb5aa14(0x12e),{'body':_0x4e65e3});return X(_0xb727bf[_0xb5aa14(0x153)][_0xb5aa14(0x119)],_0x5b06db);}}async[_0x338a3e(0x11c)](_0x14f34d){const _0x32c5d4=_0x338a3e;var _0x5df3a9,_0x506e1c;const {text:_0x49c043,unitId:_0x24b95f}=_0x14f34d,_0x42e7fa=(_0x506e1c=(_0x5df3a9=_0x49c043[_0x32c5d4(0x139)])==null?void 0x0:_0x5df3a9[_0x32c5d4(0x118)](_0x418b2d=>_0x418b2d[_0x32c5d4(0x14c)]===_0x265937[_0x32c5d4(0x155)])[_0x32c5d4(0x151)](_0x4c4660=>_0x4c4660['rangeId']))!=null?_0x506e1c:[],_0x4fe81d=JSON['stringify'](_0x49c043),_0x5e7004=_0x14f34d[_0x32c5d4(0x14d)],_0x337074=_0x14f34d['id'],_0x56bedd={'memberId':(await this[_0x32c5d4(0x13b)]['requireSession'](_0x24b95f))[_0x32c5d4(0x158)](),'unitId':_0x24b95f,'threadId':_0x5e7004,'mention':_0x42e7fa,'content':_0x4fe81d,'replyId':_0x337074},_0x1dbc8e=await this[_0x32c5d4(0x124)][_0x32c5d4(0x115)]('/universer-api/comment/unit/'+_0x24b95f+'/edit',{'body':_0x56bedd});return!_0x1dbc8e['body'][_0x32c5d4(0x104)]||_0x1dbc8e['body'][_0x32c5d4(0x104)][_0x32c5d4(0x120)]===0x1;}async[_0x338a3e(0x12d)](_0x3382c9){const _0x150cc7=_0x338a3e,{unitId:_0x141cbe}=_0x3382c9,_0x334650=_0x3382c9['threadId'],_0x104119={'memberId':this['_userService'][_0x150cc7(0x159)]()[_0x150cc7(0x14b)],'unitId':_0x141cbe,'threadId':_0x334650,'solved':_0x3382c9[_0x150cc7(0x143)]?I[_0x150cc7(0x14f)]:I[_0x150cc7(0x15d)]},_0x64487c=await this[_0x150cc7(0x124)][_0x150cc7(0x115)]('/universer-api/comment/unit/'+_0x141cbe+'/solved',{'body':_0x104119});return!_0x64487c['body'][_0x150cc7(0x104)]||_0x64487c[_0x150cc7(0x153)][_0x150cc7(0x104)]['code']===0x1;}async['deleteComment'](_0x536d8b,_0x3b1700,_0x2d620a,_0x489a84){const _0x451505=_0x338a3e,_0x4bda8c={'memberId':(await this[_0x451505(0x13b)][_0x451505(0x10a)](_0x536d8b))[_0x451505(0x158)](),'threadId':_0x2d620a,'replyId':_0x489a84,'unitId':_0x536d8b},_0x38a2b3=await this[_0x451505(0x124)][_0x451505(0x115)](_0x451505(0x148)+_0x536d8b+_0x451505(0x103),{'body':_0x4bda8c});return!_0x38a2b3[_0x451505(0x153)][_0x451505(0x104)]||_0x38a2b3[_0x451505(0x153)]['error']['code']===0x1;}async[_0x338a3e(0x132)](_0x1c8cac,_0x5481b0,_0x831ede){const _0x5f4a19=_0x338a3e,_0x10092c={'unitId':_0x1c8cac,'threadId':_0x831ede},_0x157b19=await this[_0x5f4a19(0x124)][_0x5f4a19(0x115)](_0x5f4a19(0x148)+_0x1c8cac+_0x5f4a19(0x117),{'body':_0x10092c}),_0x46485d=_0x831ede[_0x5f4a19(0x151)](_0x132065=>ee(_0x157b19['body']['comments'][_0x132065],_0x1c8cac,_0x5481b0))[_0x5f4a19(0x118)](Boolean);return Object['values'](_0x157b19['body']['users'])[_0x5f4a19(0x15c)](_0x211611=>{const _0x4d090c=_0x5f4a19;this[_0x4d090c(0x150)][_0x4d090c(0x149)](_0x211611);}),_0x46485d;}[_0x338a3e(0x106)](_0x212752){return{'id':_0x212752['id'],'threadId':_0x212752['threadId'],'ref':_0x212752['ref']};}};S=Q([b(0x0,_0x3dcfa0(_0x112d55)),b(0x1,_0x3dcfa0(_0x1fa847)),b(0x2,_0x3dcfa0(_0x2e0b26))],S);var re=Object[_0x338a3e(0x112)],te=(_0x18f331,_0x795dbf,_0x3e4002,_0x33eb0f)=>{const _0x35834a=_0x338a3e;for(var _0x51100e=_0x33eb0f>0x1?void 0x0:_0x33eb0f?re(_0x795dbf,_0x3e4002):_0x795dbf,_0x5e9855=_0x18f331[_0x35834a(0x131)]-0x1,_0x5aba81;_0x5e9855>=0x0;_0x5e9855--)(_0x5aba81=_0x18f331[_0x5e9855])&&(_0x51100e=_0x5aba81(_0x51100e)||_0x51100e);return _0x51100e;},M=(_0x918176,_0x219454)=>(_0x244624,_0x48c445)=>_0x219454(_0x244624,_0x48c445,_0x918176);let f=class extends _0x4d943a{constructor(_0x2a873,_0x1a6cad){const _0x397510=_0x338a3e;super(),this[_0x397510(0x105)]=_0x2a873,this[_0x397510(0x15b)]=_0x1a6cad,this[_0x397510(0x125)]();}['_initDataSource'](){const _0xa8573=_0x338a3e;this[_0xa8573(0x105)][_0xa8573(0x110)]=this[_0xa8573(0x15b)],this[_0xa8573(0x105)][_0xa8573(0xfa)]=!0x1;}};f=te([M(0x0,_0x4cbc34),M(0x1,_0x3dcfa0(S))],f);var se=Object[_0x338a3e(0x102)],oe=Object[_0x338a3e(0x112)],ne=(_0x181a5a,_0x7a7a70,_0x5cbeb5)=>_0x7a7a70 in _0x181a5a?se(_0x181a5a,_0x7a7a70,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5cbeb5}):_0x181a5a[_0x7a7a70]=_0x5cbeb5,ie=(_0x328dfb,_0x5df7d7,_0x2b461b,_0x477789)=>{const _0x375b10=_0x338a3e;for(var _0x45ddc3=_0x477789>0x1?void 0x0:_0x477789?oe(_0x5df7d7,_0x2b461b):_0x5df7d7,_0x42a7c5=_0x328dfb[_0x375b10(0x131)]-0x1,_0x12e377;_0x42a7c5>=0x0;_0x42a7c5--)(_0x12e377=_0x328dfb[_0x42a7c5])&&(_0x45ddc3=_0x12e377(_0x45ddc3)||_0x45ddc3);return _0x45ddc3;},N=(_0x1dffd5,_0x13cbd7)=>(_0x352a40,_0x2a90f9)=>_0x13cbd7(_0x352a40,_0x2a90f9,_0x1dffd5),$=(_0x3a438f,_0x9d9e30,_0x155efe)=>ne(_0x3a438f,typeof _0x9d9e30!=_0x338a3e(0x108)?_0x9d9e30+'':_0x9d9e30,_0x155efe);let g=class extends _0xc515d7{constructor(_0x44dd69=O,_0x9b157c,_0x3d048f){const _0xabcd55=_0x338a3e;super(),this[_0xabcd55(0x113)]=_0x44dd69,this[_0xabcd55(0x157)]=_0x9b157c,this['_configService']=_0x3d048f;const {..._0x4cb607}=_0xaa02ee({},O,this['_config']);this[_0xabcd55(0x137)][_0xabcd55(0x15e)](z,_0x4cb607);}['onStarting'](){const _0x26d32d=_0x338a3e;[[S],[f],[_]][_0x26d32d(0x15c)](_0x361d75=>{const _0x5b897a=_0x26d32d;this[_0x5b897a(0x157)][_0x5b897a(0x101)](_0x361d75);});}[_0x338a3e(0x142)](){const _0x48806f=_0x338a3e;this['_injector'][_0x48806f(0x10f)](f),this[_0x48806f(0x157)][_0x48806f(0x10f)](_);}};function _0x5a1c(_0x3f2a5f,_0x50d58e){const _0x5587d2=_0x5587();return _0x5a1c=function(_0x5a1c5f,_0x46e39a){_0x5a1c5f=_0x5a1c5f-0xfa;let _0xdaf486=_0x5587d2[_0x5a1c5f];return _0xdaf486;},_0x5a1c(_0x3f2a5f,_0x50d58e);}$(g,_0x338a3e(0x145),W),$(g,_0x338a3e(0x141),_0x2d50f1[_0x338a3e(0x107)]),g=ie([_0x266507(_0x3d6cdd,_0x5f22af,_0x1fa237),N(0x1,_0x3dcfa0(_0xac405f)),N(0x2,_0x108d43)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x12894f=_0x3fe7;(function(_0x4241c7,_0x228c1d){const _0x48a928=_0x3fe7,_0x1f7ad7=_0x4241c7();while(!![]){try{const _0x391be9=parseInt(_0x48a928(0x1d8))/0x1+parseInt(_0x48a928(0x214))/0x2+parseInt(_0x48a928(0x1c1))/0x3+parseInt(_0x48a928(0x1ec))/0x4*(-parseInt(_0x48a928(0x1c3))/0x5)+-parseInt(_0x48a928(0x1c6))/0x6+-parseInt(_0x48a928(0x1e0))/0x7*(-parseInt(_0x48a928(0x204))/0x8)+parseInt(_0x48a928(0x1cc))/0x9*(-parseInt(_0x48a928(0x1bc))/0xa);if(_0x391be9===_0x228c1d)break;else _0x1f7ad7['push'](_0x1f7ad7['shift']());}catch(_0x37f110){_0x1f7ad7['push'](_0x1f7ad7['shift']());}}}(_0x38d5,0x4eb92));import{CommentService as _0x445f16,CollaborationSessionService as _0xd9eaa,UniverCollaborationClientPlugin as _0x2e9440}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xcc64cb}from'@univerjs-pro/license';import{dayjs as _0x296554,UserManagerService as _0x432413,Inject as _0x5eb5e8,Injector as _0x20ead0,Disposable as _0x38820b,CustomRangeType as _0x5ae08f,UniverInstanceType as _0x5951dd,DependentOn as _0x367889,IConfigService as _0x3c3855,Plugin as _0x53658c,merge as _0x44dca6}from'@univerjs/core';function _0x3fe7(_0x228d40,_0x5ee896){const _0x38d5a2=_0x38d5();return _0x3fe7=function(_0x3fe7e1,_0x1c39ef){_0x3fe7e1=_0x3fe7e1-0x1b9;let _0x234770=_0x38d5a2[_0x3fe7e1];return _0x234770;},_0x3fe7(_0x228d40,_0x5ee896);}import{UniverThreadCommentUIPlugin as _0x31077f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x146ac8,IThreadCommentDataSourceService as _0xe4ca}from'@univerjs/thread-comment';import{bufferTime as _0x10be62}from'rxjs';import{HTTPService as _0xc7007}from'@univerjs/network';function _0x38d5(){const _0x28c87d=['/solved','Edit','Unknown','userId','commentUpdate$','_configService','addUser','_config','type','onReady','556366uWqXwI','replyId','forEach','_threadCommentModel','getUser','UNRECOGNIZED','_init','body','217wFFqtx','parse','_injector','_threadCommentDataSource','find','rangeType','map','customRanges','content','Solve','ref','comment','20ZkrPWY','/edit','OpenOrReOpen','filter','saveCommentToSnapshot','payload','add','length','_sessionService','_threadCommentDataSourceService','unitId','getCurrentUser','subscribe','getOwnPropertyDescriptor','Reply','error','/universer-api/comment/unit/','delete','resolveComment','slice','updateComment','size','userID','solved','48440upNfrj','pipe','reply','_userService','stringify','_httpService','_initUserSync','resolved','createTimestamp','_commentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','get','getMemberID','user','post','Delete','981750CtZqlM','Solved','threadId','_initDataSource','getUnit','6258640qgZJGf','code','requireSession','/reply','setConfig','784614vdIMSc','users','296260hyDQnx','disposeWithMe','root','1511460uqbRGv','pluginName','COMMENT','replies','Add','/delete','9GDqplP','addComment'];_0x38d5=function(){return _0x28c87d;};return _0x38d5();}const W=_0x12894f(0x20e);var I=(_0x5e6cdb=>(_0x5e6cdb[_0x5e6cdb[_0x12894f(0x1ee)]=0x0]=_0x12894f(0x1ee),_0x5e6cdb[_0x5e6cdb[_0x12894f(0x215)]=0x1]=_0x12894f(0x215),_0x5e6cdb[_0x5e6cdb[_0x12894f(0x1dd)]=-0x1]='UNRECOGNIZED',_0x5e6cdb))(I||{}),v=(_0x54f5d3=>(_0x54f5d3[_0x54f5d3[_0x12894f(0x1d0)]=0x0]=_0x12894f(0x1d0),_0x54f5d3[_0x54f5d3[_0x12894f(0x1ca)]=0x1]=_0x12894f(0x1ca),_0x54f5d3[_0x54f5d3[_0x12894f(0x1fa)]=0x2]=_0x12894f(0x1fa),_0x54f5d3[_0x54f5d3[_0x12894f(0x1cf)]=0x3]=_0x12894f(0x1cf),_0x54f5d3[_0x54f5d3[_0x12894f(0x213)]=0x4]='Delete',_0x54f5d3[_0x54f5d3[_0x12894f(0x1e9)]=0x5]='Solve',_0x54f5d3[_0x54f5d3[_0x12894f(0x1dd)]=-0x1]=_0x12894f(0x1dd),_0x54f5d3))(v||{});const y=_0x4b5003=>_0x296554(new Date(+_0x4b5003))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x27e634,_0x4f92e7)=>{const _0x4d4a6f=_0x12894f,_0x5545db=_0x27e634[_0x4d4a6f(0x20f)](_0x432413),_0x3a66b4=_0x27e634[_0x4d4a6f(0x20f)](_0xc7007);_0x4f92e7['forEach'](_0x282d3e=>{const _0x2099c8=_0x4d4a6f;_0x5545db[_0x2099c8(0x1dc)](_0x282d3e)&&_0x4f92e7[_0x2099c8(0x1fd)](_0x282d3e);}),_0x4f92e7[_0x4d4a6f(0x201)]&&(await _0x3a66b4[_0x4d4a6f(0x20f)]('/universer-api/user/list',{'params':{'userIDs':[..._0x4f92e7]}}))[_0x4d4a6f(0x1df)]['users'][_0x4d4a6f(0x1da)](_0x591069=>{const _0x14076=_0x4d4a6f;_0x591069&&_0x5545db[_0x14076(0x1d4)](_0x591069);});};var K=Object[_0x12894f(0x1f9)],V=(_0x388a8c,_0x485b84,_0x4034a1,_0x59e21f)=>{for(var _0x2c347b=_0x59e21f>0x1?void 0x0:_0x59e21f?K(_0x485b84,_0x4034a1):_0x485b84,_0x40f523=_0x388a8c['length']-0x1,_0x210191;_0x40f523>=0x0;_0x40f523--)(_0x210191=_0x388a8c[_0x40f523])&&(_0x2c347b=_0x210191(_0x2c347b)||_0x2c347b);return _0x2c347b;},p=(_0x38683e,_0x4bb3a9)=>(_0x12710e,_0x526ee8)=>_0x4bb3a9(_0x12710e,_0x526ee8,_0x38683e);let _=class extends _0x38820b{constructor(_0x511fb8,_0x19c0b6,_0x49f806,_0x590578){const _0x54c3ff=_0x12894f;super(),this[_0x54c3ff(0x20d)]=_0x511fb8,this[_0x54c3ff(0x1db)]=_0x19c0b6,this[_0x54c3ff(0x207)]=_0x49f806,this[_0x54c3ff(0x1e2)]=_0x590578,this['_init'](),this[_0x54c3ff(0x20a)]();}[_0x12894f(0x20a)](){const _0x3a9cab=_0x12894f;this[_0x3a9cab(0x1c4)](this['_threadCommentModel']['commentUpdate$'][_0x3a9cab(0x205)](_0x10be62(0x10))[_0x3a9cab(0x1f8)](_0x4e7117=>{const _0x5a3a1d=_0x3a9cab,_0x28e2f0=new Set();_0x4e7117[_0x5a3a1d(0x1da)](_0x24e4d6=>{const _0x537130=_0x5a3a1d;switch(_0x24e4d6[_0x537130(0x1d6)]){case _0x537130(0x1f2):{const _0x236fd8=_0x24e4d6[_0x537130(0x1f1)]['personId'];_0x28e2f0[_0x537130(0x1f2)](_0x236fd8);break;}}}),B(this['_injector'],_0x28e2f0);}));}[_0x12894f(0x1de)](){const _0x2c0a8e=_0x12894f;this['disposeWithMe'](this[_0x2c0a8e(0x20d)][_0x2c0a8e(0x1d2)]['subscribe'](async _0x235e4a=>{const _0x46425a=_0x2c0a8e;var _0x5a9228,_0x402783,_0x38f22c,_0x5dfb17;const _0x356023=(_0x5a9228=this['_threadCommentModel'][_0x46425a(0x1bb)](_0x235e4a[_0x46425a(0x1f6)])[_0x46425a(0x1e4)](_0x781d6a=>_0x781d6a[_0x46425a(0x1b9)]===_0x235e4a[_0x46425a(0x1b9)]))==null?void 0x0:_0x5a9228[_0x46425a(0x1c5)];if(!_0x356023)return;const {unitId:_0x5757bd,subUnitId:_0x3c2137}=_0x356023;switch(_0x235e4a[_0x46425a(0x211)]&&this[_0x46425a(0x207)][_0x46425a(0x1d4)](_0x235e4a[_0x46425a(0x211)]),_0x235e4a[_0x46425a(0x1d6)]){case v[_0x46425a(0x1ca)]:break;case v[_0x46425a(0x1fa)]:{this[_0x46425a(0x1db)]['addComment'](_0x5757bd,_0x3c2137,{'unitId':_0x5757bd,'subUnitId':_0x3c2137,'ref':'','id':_0x235e4a[_0x46425a(0x1d9)],'dT':y(+_0x235e4a[_0x46425a(0x20c)]),'threadId':_0x235e4a['threadId'],'personId':(_0x38f22c=(_0x402783=_0x235e4a[_0x46425a(0x211)])==null?void 0x0:_0x402783['userID'])!=null?_0x38f22c:_0x235e4a[_0x46425a(0x1d1)],'text':JSON[_0x46425a(0x1e1)](_0x235e4a['content']),'parentId':_0x356023['id']});break;}case v[_0x46425a(0x213)]:{const _0x58afaa=this['_threadCommentModel']['getComment'](_0x5757bd,_0x3c2137,_0x235e4a[_0x46425a(0x1d9)]);_0x58afaa&&_0x58afaa['parentId']&&this[_0x46425a(0x1db)]['deleteComment'](_0x5757bd,_0x3c2137,_0x235e4a[_0x46425a(0x1d9)]);break;}case v['Edit']:{this[_0x46425a(0x1db)][_0x46425a(0x200)](_0x5757bd,_0x3c2137,{'commentId':_0x235e4a[_0x46425a(0x1d9)],'text':JSON[_0x46425a(0x1e1)](_0x235e4a['content'])});break;}case v[_0x46425a(0x1e9)]:{const _0x333175=(_0x5dfb17=this[_0x46425a(0x1db)][_0x46425a(0x1bb)](_0x235e4a[_0x46425a(0x1f6)])[_0x46425a(0x1e4)](_0x329a1c=>_0x329a1c['threadId']===_0x235e4a[_0x46425a(0x1b9)]))==null?void 0x0:_0x5dfb17['root'];_0x333175&&this[_0x46425a(0x1db)][_0x46425a(0x1fe)](_0x5757bd,_0x3c2137,_0x333175['id'],_0x235e4a['solved']===I[_0x46425a(0x215)]);break;}}}));}};_=V([p(0x0,_0x5eb5e8(_0x445f16)),p(0x1,_0x5eb5e8(_0x146ac8)),p(0x2,_0x5eb5e8(_0x432413)),p(0x3,_0x5eb5e8(_0x20ead0))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x12894f(0x1f9)],Q=(_0x2a5267,_0x3a5e11,_0x7a59c5,_0x1b7578)=>{for(var _0x5e1dc1=_0x1b7578>0x1?void 0x0:_0x1b7578?k(_0x3a5e11,_0x7a59c5):_0x3a5e11,_0x1d1259=_0x2a5267['length']-0x1,_0x4e53d3;_0x1d1259>=0x0;_0x1d1259--)(_0x4e53d3=_0x2a5267[_0x1d1259])&&(_0x5e1dc1=_0x4e53d3(_0x5e1dc1)||_0x5e1dc1);return _0x5e1dc1;},b=(_0x1951c9,_0x141460)=>(_0x38b238,_0x398b22)=>_0x141460(_0x38b238,_0x398b22,_0x1951c9);function X(_0x5269c2,_0x2a93ab){const _0x37c64f=_0x12894f,_0x58a858=_0x5269c2[_0x37c64f(0x1c9)][0x0];return{..._0x2a93ab,'id':_0x58a858['replyId'],'resolved':_0x5269c2[_0x37c64f(0x203)]===0x1,'dT':y(_0x58a858['createTimestamp']),'personId':_0x58a858[_0x37c64f(0x1d1)],'threadId':_0x58a858[_0x37c64f(0x1b9)]};}function ee(_0x27c05f,_0x3544af,_0x55c3ed){const _0x519424=_0x12894f;var _0x7526f8,_0x28e8c5;if(((_0x28e8c5=(_0x7526f8=_0x27c05f==null?void 0x0:_0x27c05f['replies'])==null?void 0x0:_0x7526f8[_0x519424(0x1f3)])!=null?_0x28e8c5:0x0)>0x0){const _0x1cca96=(_0x129c8a,_0x4b98b4)=>({'id':_0x129c8a[_0x519424(0x1d9)],'threadId':_0x129c8a[_0x519424(0x1b9)],'dT':y(_0x129c8a[_0x519424(0x20c)]),'personId':_0x129c8a['userId'],'resolved':_0x27c05f[_0x519424(0x203)]===I['Solved'],'unitId':_0x3544af,'subUnitId':_0x55c3ed,'text':JSON[_0x519424(0x1e1)](_0x129c8a[_0x519424(0x1e8)]),'parentId':_0x4b98b4}),_0x437622=_0x1cca96(_0x27c05f[_0x519424(0x1c9)][0x0]);return{..._0x437622,'children':_0x27c05f[_0x519424(0x1c9)][_0x519424(0x1ff)](0x1)['map'](_0xc3711b=>_0x1cca96(_0xc3711b,_0x437622['id']))};}return null;}let S=class{constructor(_0x15299a,_0x112297,_0x4adbfc){const _0x38f9a8=_0x12894f;this[_0x38f9a8(0x209)]=_0x15299a,this[_0x38f9a8(0x207)]=_0x112297,this[_0x38f9a8(0x1f4)]=_0x4adbfc;}async[_0x12894f(0x1cd)](_0x35699a){const _0x36cd44=_0x12894f;var _0x47a13e,_0x1d6034;const {parentId:_0x2194a0,unitId:_0xdc88c,text:_0x4d468d,threadId:_0x553009}=_0x35699a,_0x43e624=(_0x1d6034=(_0x47a13e=_0x4d468d[_0x36cd44(0x1e7)])==null?void 0x0:_0x47a13e[_0x36cd44(0x1ef)](_0x215166=>_0x215166[_0x36cd44(0x1e5)]===_0x5ae08f['COMMENT'])[_0x36cd44(0x1e6)](_0x3301e7=>_0x3301e7['rangeId']))!=null?_0x1d6034:[],_0x5cdeb7=JSON[_0x36cd44(0x208)](_0x4d468d),_0x19497b=(await this[_0x36cd44(0x1f4)]['requireSession'](_0xdc88c))['getMemberID']();if(_0x2194a0){const _0x253002={'memberId':_0x19497b,'unitId':_0xdc88c,'content':_0x5cdeb7,'mention':_0x43e624,'threadId':_0x553009},_0x110531=(await this[_0x36cd44(0x209)]['post'](_0x36cd44(0x1fc)+_0xdc88c+_0x36cd44(0x1bf),{'body':_0x253002}))[_0x36cd44(0x1df)][_0x36cd44(0x206)];return{..._0x35699a,'id':_0x110531['replyId'],'dT':_0x296554(+_0x110531[_0x36cd44(0x20c)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x110531[_0x36cd44(0x1d1)]};}else{const _0x495067={'memberId':_0x19497b,'unitId':_0xdc88c,'content':_0x5cdeb7,'mention':_0x43e624},_0x4d1b4e=await this[_0x36cd44(0x209)][_0x36cd44(0x212)]('/universer-api/comment/unit/'+_0xdc88c+'/add',{'body':_0x495067});return X(_0x4d1b4e[_0x36cd44(0x1df)][_0x36cd44(0x1eb)],_0x35699a);}}async[_0x12894f(0x200)](_0x4f3cc3){const _0x32795d=_0x12894f;var _0x1484a8,_0x48a30a;const {text:_0x137877,unitId:_0x58d298}=_0x4f3cc3,_0x4449a5=(_0x48a30a=(_0x1484a8=_0x137877[_0x32795d(0x1e7)])==null?void 0x0:_0x1484a8[_0x32795d(0x1ef)](_0x438e94=>_0x438e94[_0x32795d(0x1e5)]===_0x5ae08f[_0x32795d(0x1c8)])['map'](_0x55f744=>_0x55f744['rangeId']))!=null?_0x48a30a:[],_0x4d0dff=JSON[_0x32795d(0x208)](_0x137877),_0x4299a3=_0x4f3cc3['threadId'],_0x44a512=_0x4f3cc3['id'],_0x1f83ac={'memberId':(await this[_0x32795d(0x1f4)][_0x32795d(0x1be)](_0x58d298))[_0x32795d(0x210)](),'unitId':_0x58d298,'threadId':_0x4299a3,'mention':_0x4449a5,'content':_0x4d0dff,'replyId':_0x44a512},_0x240281=await this[_0x32795d(0x209)][_0x32795d(0x212)]('/universer-api/comment/unit/'+_0x58d298+_0x32795d(0x1ed),{'body':_0x1f83ac});return!_0x240281[_0x32795d(0x1df)][_0x32795d(0x1fb)]||_0x240281[_0x32795d(0x1df)][_0x32795d(0x1fb)][_0x32795d(0x1bd)]===0x1;}async['resolveComment'](_0x528a35){const _0x44eadd=_0x12894f,{unitId:_0x57b647}=_0x528a35,_0x55ba20=_0x528a35[_0x44eadd(0x1b9)],_0x5da35f={'memberId':this['_userService'][_0x44eadd(0x1f7)]()[_0x44eadd(0x202)],'unitId':_0x57b647,'threadId':_0x55ba20,'solved':_0x528a35[_0x44eadd(0x20b)]?I[_0x44eadd(0x215)]:I[_0x44eadd(0x1ee)]},_0x10c4d7=await this[_0x44eadd(0x209)]['post'](_0x44eadd(0x1fc)+_0x57b647+_0x44eadd(0x1ce),{'body':_0x5da35f});return!_0x10c4d7[_0x44eadd(0x1df)]['error']||_0x10c4d7[_0x44eadd(0x1df)][_0x44eadd(0x1fb)]['code']===0x1;}async['deleteComment'](_0x347be6,_0x135e48,_0xc659fc,_0x4bf134){const _0x30323f=_0x12894f,_0x3ba632={'memberId':(await this[_0x30323f(0x1f4)][_0x30323f(0x1be)](_0x347be6))[_0x30323f(0x210)](),'threadId':_0xc659fc,'replyId':_0x4bf134,'unitId':_0x347be6},_0x43f126=await this[_0x30323f(0x209)][_0x30323f(0x212)](_0x30323f(0x1fc)+_0x347be6+_0x30323f(0x1cb),{'body':_0x3ba632});return!_0x43f126['body'][_0x30323f(0x1fb)]||_0x43f126['body'][_0x30323f(0x1fb)]['code']===0x1;}async['listComments'](_0x5e4f1e,_0x459721,_0xd07ffc){const _0x5c431f=_0x12894f,_0x317050={'unitId':_0x5e4f1e,'threadId':_0xd07ffc},_0x4389a7=await this['_httpService'][_0x5c431f(0x212)](_0x5c431f(0x1fc)+_0x5e4f1e+'/list',{'body':_0x317050}),_0x1d9c9a=_0xd07ffc['map'](_0x12df22=>ee(_0x4389a7['body']['comments'][_0x12df22],_0x5e4f1e,_0x459721))[_0x5c431f(0x1ef)](Boolean);return Object['values'](_0x4389a7[_0x5c431f(0x1df)][_0x5c431f(0x1c2)])[_0x5c431f(0x1da)](_0x4350f8=>{this['_userService']['addUser'](_0x4350f8);}),_0x1d9c9a;}[_0x12894f(0x1f0)](_0x3a0aa2){const _0x3b5c0a=_0x12894f;return{'id':_0x3a0aa2['id'],'threadId':_0x3a0aa2['threadId'],'ref':_0x3a0aa2[_0x3b5c0a(0x1ea)]};}};S=Q([b(0x0,_0x5eb5e8(_0xc7007)),b(0x1,_0x5eb5e8(_0x432413)),b(0x2,_0x5eb5e8(_0xd9eaa))],S);var re=Object[_0x12894f(0x1f9)],te=(_0x1f6361,_0x4daec7,_0x154f16,_0x4fd746)=>{const _0x166ce0=_0x12894f;for(var _0x365aa8=_0x4fd746>0x1?void 0x0:_0x4fd746?re(_0x4daec7,_0x154f16):_0x4daec7,_0x43051c=_0x1f6361[_0x166ce0(0x1f3)]-0x1,_0x39e747;_0x43051c>=0x0;_0x43051c--)(_0x39e747=_0x1f6361[_0x43051c])&&(_0x365aa8=_0x39e747(_0x365aa8)||_0x365aa8);return _0x365aa8;},M=(_0x4d337f,_0x180353)=>(_0x4b374b,_0x523fa0)=>_0x180353(_0x4b374b,_0x523fa0,_0x4d337f);let f=class extends _0x38820b{constructor(_0x6cc9e0,_0x5bfc5f){const _0x8805fb=_0x12894f;super(),this[_0x8805fb(0x1f5)]=_0x6cc9e0,this[_0x8805fb(0x1e3)]=_0x5bfc5f,this[_0x8805fb(0x1ba)]();}[_0x12894f(0x1ba)](){const _0x11aea7=_0x12894f;this[_0x11aea7(0x1f5)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0xe4ca),M(0x1,_0x5eb5e8(S))],f);var se=Object['defineProperty'],oe=Object[_0x12894f(0x1f9)],ne=(_0x3fbdd6,_0x3e2ce9,_0x12fa4e)=>_0x3e2ce9 in _0x3fbdd6?se(_0x3fbdd6,_0x3e2ce9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x12fa4e}):_0x3fbdd6[_0x3e2ce9]=_0x12fa4e,ie=(_0x597d24,_0x145763,_0x4c7200,_0x185b46)=>{const _0x38acbb=_0x12894f;for(var _0x425dbe=_0x185b46>0x1?void 0x0:_0x185b46?oe(_0x145763,_0x4c7200):_0x145763,_0x17198f=_0x597d24[_0x38acbb(0x1f3)]-0x1,_0x20b13d;_0x17198f>=0x0;_0x17198f--)(_0x20b13d=_0x597d24[_0x17198f])&&(_0x425dbe=_0x20b13d(_0x425dbe)||_0x425dbe);return _0x425dbe;},N=(_0x5b67d6,_0x1167a8)=>(_0x180c89,_0x507609)=>_0x1167a8(_0x180c89,_0x507609,_0x5b67d6),$=(_0x434cd2,_0x243d71,_0x350a1b)=>ne(_0x434cd2,typeof _0x243d71!='symbol'?_0x243d71+'':_0x243d71,_0x350a1b);let g=class extends _0x53658c{constructor(_0x56acba=O,_0x32391f,_0x5993b8){const _0x2070d1=_0x12894f;super(),this[_0x2070d1(0x1d5)]=_0x56acba,this[_0x2070d1(0x1e2)]=_0x32391f,this['_configService']=_0x5993b8;const {..._0x5ccaad}=_0x44dca6({},O,this[_0x2070d1(0x1d5)]);this[_0x2070d1(0x1d3)][_0x2070d1(0x1c0)](z,_0x5ccaad);}['onStarting'](){[[S],[f],[_]]['forEach'](_0x450499=>{const _0x2f2707=_0x3fe7;this['_injector'][_0x2f2707(0x1f2)](_0x450499);});}[_0x12894f(0x1d7)](){const _0x47d22e=_0x12894f;this[_0x47d22e(0x1e2)][_0x47d22e(0x20f)](f),this[_0x47d22e(0x1e2)][_0x47d22e(0x20f)](_);}};$(g,_0x12894f(0x1c7),W),$(g,_0x12894f(0x1d6),_0x5951dd['UNIVER_UNKNOWN']),g=ie([_0x367889(_0x31077f,_0x2e9440,_0xcc64cb),N(0x1,_0x5eb5e8(_0x20ead0)),N(0x2,_0x3c3855)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x1f0c(_0x3ef45c,_0x4f2046){const _0x1fde67=_0x1fde();return _0x1f0c=function(_0x1f0c3b,_0x9900f4){_0x1f0c3b=_0x1f0c3b-0xe1;let _0x19e2c1=_0x1fde67[_0x1f0c3b];return _0x19e2c1;},_0x1f0c(_0x3ef45c,_0x4f2046);}(function(_0x4ca8f5,_0x43720e){const _0x221748=_0x1f0c,_0x377697=_0x4ca8f5();while(!![]){try{const _0x24a847=-parseInt(_0x221748(0x165))/0x1*(parseInt(_0x221748(0x146))/0x2)+parseInt(_0x221748(0x113))/0x3*(-parseInt(_0x221748(0x110))/0x4)+-parseInt(_0x221748(0xed))/0x5*(parseInt(_0x221748(0x109))/0x6)+-parseInt(_0x221748(0xe8))/0x7*(parseInt(_0x221748(0x14e))/0x8)+parseInt(_0x221748(0x117))/0x9*(parseInt(_0x221748(0x108))/0xa)+-parseInt(_0x221748(0x12e))/0xb*(parseInt(_0x221748(0xe7))/0xc)+parseInt(_0x221748(0x136))/0xd;if(_0x24a847===_0x43720e)break;else _0x377697['push'](_0x377697['shift']());}catch(_0xf97030){_0x377697['push'](_0x377697['shift']());}}}(_0x1fde,0x20b68),function(_0x3520e9,_0x449285){const _0x1d9584=_0x1f0c;typeof exports=='object'&&typeof module<'u'?_0x449285(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==_0x1d9584(0x153)&&define[_0x1d9584(0x118)]?define(['exports',_0x1d9584(0xf1),_0x1d9584(0xf8),_0x1d9584(0x15c),_0x1d9584(0xeb),_0x1d9584(0x132),_0x1d9584(0xec),_0x1d9584(0x107)],_0x449285):(_0x3520e9=typeof globalThis<'u'?globalThis:_0x3520e9||self,_0x449285(_0x3520e9[_0x1d9584(0x125)]={},_0x3520e9[_0x1d9584(0xe6)],_0x3520e9[_0x1d9584(0x162)],_0x3520e9[_0x1d9584(0x15b)],_0x3520e9['UniverThreadCommentUi'],_0x3520e9[_0x1d9584(0xfc)],_0x3520e9[_0x1d9584(0xec)],_0x3520e9['UniverNetwork']));}(this,function(_0x1812bf,_0x53a0d2,_0x481f6b,_0x4e03f5,_0x377150,_0x2f2ab9,_0x2cbfc0,_0x3ca965){'use strict';const _0x26004a=_0x1f0c;const _0x4a0e0e='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x40d01b=(_0x28a3a7=>(_0x28a3a7[_0x28a3a7[_0x26004a(0x13b)]=0x0]=_0x26004a(0x13b),_0x28a3a7[_0x28a3a7[_0x26004a(0xfa)]=0x1]=_0x26004a(0xfa),_0x28a3a7[_0x28a3a7[_0x26004a(0x131)]=-0x1]='UNRECOGNIZED',_0x28a3a7))(_0x40d01b||{}),_0x138f2b=(_0x2c9cb1=>(_0x2c9cb1[_0x2c9cb1[_0x26004a(0x10e)]=0x0]=_0x26004a(0x10e),_0x2c9cb1[_0x2c9cb1[_0x26004a(0x163)]=0x1]=_0x26004a(0x163),_0x2c9cb1[_0x2c9cb1['Reply']=0x2]=_0x26004a(0xfe),_0x2c9cb1[_0x2c9cb1[_0x26004a(0x11d)]=0x3]=_0x26004a(0x11d),_0x2c9cb1[_0x2c9cb1[_0x26004a(0x160)]=0x4]='Delete',_0x2c9cb1[_0x2c9cb1[_0x26004a(0x128)]=0x5]=_0x26004a(0x128),_0x2c9cb1[_0x2c9cb1[_0x26004a(0x131)]=-0x1]='UNRECOGNIZED',_0x2c9cb1))(_0x138f2b||{});const _0x1f5e7f=_0x45358a=>_0x4e03f5[_0x26004a(0x155)](new Date(+_0x45358a))['format']('YYYY/MM/DD\x20HH:mm'),_0x19bf2f=async(_0x27a385,_0x481241)=>{const _0x45b921=_0x26004a,_0x1aad2c=_0x27a385['get'](_0x4e03f5['UserManagerService']),_0x1d629a=_0x27a385[_0x45b921(0xfd)](_0x3ca965[_0x45b921(0x13a)]);_0x481241[_0x45b921(0x15a)](_0x373e72=>{const _0xd5b99e=_0x45b921;_0x1aad2c[_0xd5b99e(0x14a)](_0x373e72)&&_0x481241[_0xd5b99e(0x158)](_0x373e72);}),_0x481241[_0x45b921(0x11e)]&&(await _0x1d629a[_0x45b921(0xfd)](_0x45b921(0x15e),{'params':{'userIDs':[..._0x481241]}}))['body'][_0x45b921(0xe5)][_0x45b921(0x15a)](_0xd1ec02=>{const _0x50b3a5=_0x45b921;_0xd1ec02&&_0x1aad2c[_0x50b3a5(0x124)](_0xd1ec02);});};var _0x23dec8=Object[_0x26004a(0x10a)],_0x328dc9=(_0xffaa6c,_0x1e1908,_0x4dac8a,_0x559b0c)=>{const _0x1aa1b8=_0x26004a;for(var _0x299c0a=_0x559b0c>0x1?void 0x0:_0x559b0c?_0x23dec8(_0x1e1908,_0x4dac8a):_0x1e1908,_0x13f80b=_0xffaa6c[_0x1aa1b8(0x164)]-0x1,_0x4d7f36;_0x13f80b>=0x0;_0x13f80b--)(_0x4d7f36=_0xffaa6c[_0x13f80b])&&(_0x299c0a=_0x4d7f36(_0x299c0a)||_0x299c0a);return _0x299c0a;},_0x1a4246=(_0x3126f4,_0x387b67)=>(_0x5afcc9,_0x5831a2)=>_0x387b67(_0x5afcc9,_0x5831a2,_0x3126f4);let _0x4cd53f=class extends _0x4e03f5['Disposable']{constructor(_0x68f521,_0x21ef8f,_0x4d81f4,_0x4ee209){const _0xee2d65=_0x26004a;super(),this['_commentService']=_0x68f521,this[_0xee2d65(0x13d)]=_0x21ef8f,this[_0xee2d65(0x104)]=_0x4d81f4,this[_0xee2d65(0x10f)]=_0x4ee209,this[_0xee2d65(0xf6)](),this[_0xee2d65(0x134)]();}[_0x26004a(0x134)](){const _0x23b3b0=_0x26004a;this['disposeWithMe'](this[_0x23b3b0(0x13d)]['commentUpdate$'][_0x23b3b0(0x144)](_0x2cbfc0[_0x23b3b0(0xe1)](0x10))[_0x23b3b0(0xee)](_0x83bdaf=>{const _0x25da11=_0x23b3b0,_0x5635c4=new Set();_0x83bdaf[_0x25da11(0x15a)](_0x2fa831=>{const _0x39af63=_0x25da11;switch(_0x2fa831[_0x39af63(0x11c)]){case'add':{const _0xe4caa=_0x2fa831[_0x39af63(0x148)][_0x39af63(0x137)];_0x5635c4['add'](_0xe4caa);break;}}}),_0x19bf2f(this[_0x25da11(0x10f)],_0x5635c4);}));}[_0x26004a(0xf6)](){const _0x46acec=_0x26004a;this['disposeWithMe'](this['_commentService'][_0x46acec(0x142)][_0x46acec(0xee)](async _0x3ff8f5=>{const _0x4811ec=_0x46acec;var _0x597b64,_0x262bac,_0x32e883,_0x5774fa;const _0x266d8a=(_0x597b64=this[_0x4811ec(0x13d)][_0x4811ec(0x12c)](_0x3ff8f5['unitId'])[_0x4811ec(0x11b)](_0x4fe11c=>_0x4fe11c[_0x4811ec(0x12a)]===_0x3ff8f5[_0x4811ec(0x12a)]))==null?void 0x0:_0x597b64[_0x4811ec(0x100)];if(!_0x266d8a)return;const {unitId:_0x42098a,subUnitId:_0x5cfb33}=_0x266d8a;switch(_0x3ff8f5[_0x4811ec(0x16b)]&&this[_0x4811ec(0x104)][_0x4811ec(0x124)](_0x3ff8f5['user']),_0x3ff8f5[_0x4811ec(0x11c)]){case _0x138f2b[_0x4811ec(0x163)]:break;case _0x138f2b[_0x4811ec(0xfe)]:{this[_0x4811ec(0x13d)][_0x4811ec(0x14d)](_0x42098a,_0x5cfb33,{'unitId':_0x42098a,'subUnitId':_0x5cfb33,'ref':'','id':_0x3ff8f5['replyId'],'dT':_0x1f5e7f(+_0x3ff8f5[_0x4811ec(0x122)]),'threadId':_0x3ff8f5[_0x4811ec(0x12a)],'personId':(_0x32e883=(_0x262bac=_0x3ff8f5[_0x4811ec(0x16b)])==null?void 0x0:_0x262bac[_0x4811ec(0x13f)])!=null?_0x32e883:_0x3ff8f5['userId'],'text':JSON[_0x4811ec(0x167)](_0x3ff8f5[_0x4811ec(0x161)]),'parentId':_0x266d8a['id']});break;}case _0x138f2b[_0x4811ec(0x160)]:{const _0x27c838=this[_0x4811ec(0x13d)][_0x4811ec(0x10d)](_0x42098a,_0x5cfb33,_0x3ff8f5[_0x4811ec(0xe2)]);_0x27c838&&_0x27c838[_0x4811ec(0xf2)]&&this[_0x4811ec(0x13d)][_0x4811ec(0x157)](_0x42098a,_0x5cfb33,_0x3ff8f5[_0x4811ec(0xe2)]);break;}case _0x138f2b[_0x4811ec(0x11d)]:{this['_threadCommentModel'][_0x4811ec(0x135)](_0x42098a,_0x5cfb33,{'commentId':_0x3ff8f5[_0x4811ec(0xe2)],'text':JSON[_0x4811ec(0x167)](_0x3ff8f5['content'])});break;}case _0x138f2b['Solve']:{const _0x2dd667=(_0x5774fa=this['_threadCommentModel']['getUnit'](_0x3ff8f5[_0x4811ec(0x16c)])[_0x4811ec(0x11b)](_0x20b300=>_0x20b300[_0x4811ec(0x12a)]===_0x3ff8f5[_0x4811ec(0x12a)]))==null?void 0x0:_0x5774fa[_0x4811ec(0x100)];_0x2dd667&&this[_0x4811ec(0x13d)]['resolveComment'](_0x42098a,_0x5cfb33,_0x2dd667['id'],_0x3ff8f5['solved']===_0x40d01b[_0x4811ec(0xfa)]);break;}}}));}};_0x4cd53f=_0x328dc9([_0x1a4246(0x0,_0x4e03f5['Inject'](_0x53a0d2[_0x26004a(0x151)])),_0x1a4246(0x1,_0x4e03f5['Inject'](_0x2f2ab9['ThreadCommentModel'])),_0x1a4246(0x2,_0x4e03f5[_0x26004a(0xf0)](_0x4e03f5['UserManagerService'])),_0x1a4246(0x3,_0x4e03f5[_0x26004a(0xf0)](_0x4e03f5['Injector']))],_0x4cd53f);const _0x3f49b4=_0x26004a(0x13e),_0x32c45a={};var _0x2e3587=Object['getOwnPropertyDescriptor'],_0x23fee2=(_0x36feea,_0x3ca54f,_0x5c43b4,_0x2ce9eb)=>{const _0x5484b1=_0x26004a;for(var _0x3a69b8=_0x2ce9eb>0x1?void 0x0:_0x2ce9eb?_0x2e3587(_0x3ca54f,_0x5c43b4):_0x3ca54f,_0x1ed29c=_0x36feea[_0x5484b1(0x164)]-0x1,_0x2c4ee7;_0x1ed29c>=0x0;_0x1ed29c--)(_0x2c4ee7=_0x36feea[_0x1ed29c])&&(_0x3a69b8=_0x2c4ee7(_0x3a69b8)||_0x3a69b8);return _0x3a69b8;},_0x4a34ac=(_0x2e86b8,_0x5cfa71)=>(_0x57bf01,_0x56b91a)=>_0x5cfa71(_0x57bf01,_0x56b91a,_0x2e86b8);function _0x50f40d(_0x442064,_0xe5cb2f){const _0x3b0786=_0x26004a,_0x40b23b=_0x442064[_0x3b0786(0x145)][0x0];return{..._0xe5cb2f,'id':_0x40b23b[_0x3b0786(0xe2)],'resolved':_0x442064[_0x3b0786(0x150)]===0x1,'dT':_0x1f5e7f(_0x40b23b['createTimestamp']),'personId':_0x40b23b[_0x3b0786(0x14b)],'threadId':_0x40b23b[_0x3b0786(0x12a)]};}function _0x4161cc(_0x45038d,_0x23612d,_0x550362){const _0x28606c=_0x26004a;var _0x1b308a,_0x3c7f5c;if(((_0x3c7f5c=(_0x1b308a=_0x45038d==null?void 0x0:_0x45038d[_0x28606c(0x145)])==null?void 0x0:_0x1b308a[_0x28606c(0x164)])!=null?_0x3c7f5c:0x0)>0x0){const _0xd5ccc6=(_0x1c7c53,_0x5f399f)=>({'id':_0x1c7c53[_0x28606c(0xe2)],'threadId':_0x1c7c53[_0x28606c(0x12a)],'dT':_0x1f5e7f(_0x1c7c53['createTimestamp']),'personId':_0x1c7c53['userId'],'resolved':_0x45038d[_0x28606c(0x150)]===_0x40d01b[_0x28606c(0xfa)],'unitId':_0x23612d,'subUnitId':_0x550362,'text':JSON[_0x28606c(0x167)](_0x1c7c53[_0x28606c(0x161)]),'parentId':_0x5f399f}),_0x5510df=_0xd5ccc6(_0x45038d['replies'][0x0]);return{..._0x5510df,'children':_0x45038d[_0x28606c(0x145)][_0x28606c(0x12b)](0x1)[_0x28606c(0x111)](_0x5e344b=>_0xd5ccc6(_0x5e344b,_0x5510df['id']))};}return null;}let _0x4cdabd=class{constructor(_0x1c0ec5,_0x5999f3,_0x5dff14){const _0x470a39=_0x26004a;this['_httpService']=_0x1c0ec5,this[_0x470a39(0x104)]=_0x5999f3,this['_sessionService']=_0x5dff14;}async[_0x26004a(0x14d)](_0x4b5992){const _0x52736b=_0x26004a;var _0x466ea5,_0x10b189;const {parentId:_0x38841c,unitId:_0x4847ea,text:_0xfd9516,threadId:_0x5ae0e1}=_0x4b5992,_0x2a41f3=(_0x10b189=(_0x466ea5=_0xfd9516['customRanges'])==null?void 0x0:_0x466ea5[_0x52736b(0xf9)](_0x28702b=>_0x28702b[_0x52736b(0x102)]===_0x4e03f5[_0x52736b(0x106)][_0x52736b(0x12d)])[_0x52736b(0x111)](_0x32f29e=>_0x32f29e[_0x52736b(0x168)]))!=null?_0x10b189:[],_0xbe13e6=JSON[_0x52736b(0x130)](_0xfd9516),_0xcca53e=(await this[_0x52736b(0x159)]['requireSession'](_0x4847ea))[_0x52736b(0x12f)]();if(_0x38841c){const _0x36fbb6={'memberId':_0xcca53e,'unitId':_0x4847ea,'content':_0xbe13e6,'mention':_0x2a41f3,'threadId':_0x5ae0e1},_0x2c58f4=(await this[_0x52736b(0xfb)][_0x52736b(0xf3)](_0x52736b(0x129)+_0x4847ea+_0x52736b(0x13c),{'body':_0x36fbb6}))[_0x52736b(0x140)][_0x52736b(0x123)];return{..._0x4b5992,'id':_0x2c58f4[_0x52736b(0xe2)],'dT':_0x4e03f5[_0x52736b(0x155)](+_0x2c58f4[_0x52736b(0x122)])[_0x52736b(0x14f)](_0x52736b(0x139)),'personId':_0x2c58f4['userId']};}else{const _0x4028ba={'memberId':_0xcca53e,'unitId':_0x4847ea,'content':_0xbe13e6,'mention':_0x2a41f3},_0x425f8b=await this['_httpService']['post'](_0x52736b(0x129)+_0x4847ea+'/add',{'body':_0x4028ba});return _0x50f40d(_0x425f8b[_0x52736b(0x140)]['comment'],_0x4b5992);}}async['updateComment'](_0x51c7fe){const _0x360fe6=_0x26004a;var _0x254942,_0x3db29e;const {text:_0x29fb83,unitId:_0x3db13f}=_0x51c7fe,_0x4a955b=(_0x3db29e=(_0x254942=_0x29fb83[_0x360fe6(0xf4)])==null?void 0x0:_0x254942['filter'](_0x95a85f=>_0x95a85f[_0x360fe6(0x102)]===_0x4e03f5[_0x360fe6(0x106)][_0x360fe6(0x12d)])['map'](_0x24ab1b=>_0x24ab1b['rangeId']))!=null?_0x3db29e:[],_0x413ce1=JSON[_0x360fe6(0x130)](_0x29fb83),_0x422c5a=_0x51c7fe[_0x360fe6(0x12a)],_0x457950=_0x51c7fe['id'],_0x4714c1={'memberId':(await this[_0x360fe6(0x159)][_0x360fe6(0x101)](_0x3db13f))[_0x360fe6(0x12f)](),'unitId':_0x3db13f,'threadId':_0x422c5a,'mention':_0x4a955b,'content':_0x413ce1,'replyId':_0x457950},_0x5779f6=await this[_0x360fe6(0xfb)][_0x360fe6(0xf3)](_0x360fe6(0x129)+_0x3db13f+_0x360fe6(0x169),{'body':_0x4714c1});return!_0x5779f6[_0x360fe6(0x140)][_0x360fe6(0x138)]||_0x5779f6['body'][_0x360fe6(0x138)][_0x360fe6(0x126)]===0x1;}async['resolveComment'](_0x1767bc){const _0x8905da=_0x26004a,{unitId:_0x2feafd}=_0x1767bc,_0x2fc52c=_0x1767bc[_0x8905da(0x12a)],_0x36083f={'memberId':this['_userService'][_0x8905da(0x141)]()[_0x8905da(0x13f)],'unitId':_0x2feafd,'threadId':_0x2fc52c,'solved':_0x1767bc[_0x8905da(0x105)]?_0x40d01b[_0x8905da(0xfa)]:_0x40d01b[_0x8905da(0x13b)]},_0x163169=await this['_httpService'][_0x8905da(0xf3)](_0x8905da(0x129)+_0x2feafd+_0x8905da(0x166),{'body':_0x36083f});return!_0x163169[_0x8905da(0x140)]['error']||_0x163169[_0x8905da(0x140)][_0x8905da(0x138)][_0x8905da(0x126)]===0x1;}async['deleteComment'](_0x508045,_0x2e61ff,_0x42c85c,_0x4c765e){const _0x1d4220=_0x26004a,_0x33bc6e={'memberId':(await this[_0x1d4220(0x159)][_0x1d4220(0x101)](_0x508045))['getMemberID'](),'threadId':_0x42c85c,'replyId':_0x4c765e,'unitId':_0x508045},_0x1b9bd1=await this['_httpService'][_0x1d4220(0xf3)](_0x1d4220(0x129)+_0x508045+_0x1d4220(0x11f),{'body':_0x33bc6e});return!_0x1b9bd1['body'][_0x1d4220(0x138)]||_0x1b9bd1[_0x1d4220(0x140)]['error']['code']===0x1;}async[_0x26004a(0x147)](_0x23807b,_0x7e9b37,_0x3f112c){const _0x5a7ba1=_0x26004a,_0x4d711c={'unitId':_0x23807b,'threadId':_0x3f112c},_0x2ebd9c=await this[_0x5a7ba1(0xfb)][_0x5a7ba1(0xf3)](_0x5a7ba1(0x129)+_0x23807b+'/list',{'body':_0x4d711c}),_0x50df0f=_0x3f112c[_0x5a7ba1(0x111)](_0x4ecf7c=>_0x4161cc(_0x2ebd9c[_0x5a7ba1(0x140)][_0x5a7ba1(0x154)][_0x4ecf7c],_0x23807b,_0x7e9b37))[_0x5a7ba1(0xf9)](Boolean);return Object[_0x5a7ba1(0x133)](_0x2ebd9c[_0x5a7ba1(0x140)]['users'])[_0x5a7ba1(0x15a)](_0x175b77=>{const _0x107818=_0x5a7ba1;this[_0x107818(0x104)][_0x107818(0x124)](_0x175b77);}),_0x50df0f;}[_0x26004a(0xf7)](_0x4ba1ff){const _0x51214c=_0x26004a;return{'id':_0x4ba1ff['id'],'threadId':_0x4ba1ff[_0x51214c(0x12a)],'ref':_0x4ba1ff[_0x51214c(0x149)]};}};_0x4cdabd=_0x23fee2([_0x4a34ac(0x0,_0x4e03f5['Inject'](_0x3ca965['HTTPService'])),_0x4a34ac(0x1,_0x4e03f5[_0x26004a(0xf0)](_0x4e03f5['UserManagerService'])),_0x4a34ac(0x2,_0x4e03f5[_0x26004a(0xf0)](_0x53a0d2['CollaborationSessionService']))],_0x4cdabd);var _0x13d8c3=Object[_0x26004a(0x10a)],_0x23c0eb=(_0x182af6,_0x145463,_0x4ef266,_0x30d9c4)=>{const _0x2d81e8=_0x26004a;for(var _0x2f71e1=_0x30d9c4>0x1?void 0x0:_0x30d9c4?_0x13d8c3(_0x145463,_0x4ef266):_0x145463,_0x34d278=_0x182af6[_0x2d81e8(0x164)]-0x1,_0x416479;_0x34d278>=0x0;_0x34d278--)(_0x416479=_0x182af6[_0x34d278])&&(_0x2f71e1=_0x416479(_0x2f71e1)||_0x2f71e1);return _0x2f71e1;},_0x3c7fa9=(_0x28be74,_0x1b02ee)=>(_0x1c386c,_0x4919a4)=>_0x1b02ee(_0x1c386c,_0x4919a4,_0x28be74);let _0x406b40=class extends _0x4e03f5[_0x26004a(0x119)]{constructor(_0x4ab3a5,_0x3f0407){const _0x3900cc=_0x26004a;super(),this['_threadCommentDataSourceService']=_0x4ab3a5,this[_0x3900cc(0xef)]=_0x3f0407,this['_initDataSource']();}[_0x26004a(0xea)](){const _0x5b1292=_0x26004a;this[_0x5b1292(0x115)][_0x5b1292(0x120)]=this[_0x5b1292(0xef)],this[_0x5b1292(0x115)][_0x5b1292(0x116)]=!0x1;}};_0x406b40=_0x23c0eb([_0x3c7fa9(0x0,_0x2f2ab9[_0x26004a(0x127)]),_0x3c7fa9(0x1,_0x4e03f5['Inject'](_0x4cdabd))],_0x406b40);var _0x3ceb0a=Object['defineProperty'],_0x5c14f5=Object['getOwnPropertyDescriptor'],_0x3f9d24=(_0x1e5822,_0x310981,_0x5524f9)=>_0x310981 in _0x1e5822?_0x3ceb0a(_0x1e5822,_0x310981,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5524f9}):_0x1e5822[_0x310981]=_0x5524f9,_0x46b467=(_0x1fdec1,_0xa27ff5,_0x5709fc,_0x47eaf9)=>{const _0x554b8c=_0x26004a;for(var _0x167e3b=_0x47eaf9>0x1?void 0x0:_0x47eaf9?_0x5c14f5(_0xa27ff5,_0x5709fc):_0xa27ff5,_0x20d668=_0x1fdec1[_0x554b8c(0x164)]-0x1,_0x36d26a;_0x20d668>=0x0;_0x20d668--)(_0x36d26a=_0x1fdec1[_0x20d668])&&(_0x167e3b=_0x36d26a(_0x167e3b)||_0x167e3b);return _0x167e3b;},_0x3ee0c0=(_0x3af733,_0x269093)=>(_0x272494,_0x70b85e)=>_0x269093(_0x272494,_0x70b85e,_0x3af733),_0x52bb14=(_0xdd445d,_0xe53dbf,_0x4697e8)=>_0x3f9d24(_0xdd445d,typeof _0xe53dbf!=_0x26004a(0x11a)?_0xe53dbf+'':_0xe53dbf,_0x4697e8);_0x1812bf[_0x26004a(0x143)]=class extends _0x4e03f5[_0x26004a(0xe3)]{constructor(_0x4c2d6a=_0x32c45a,_0x120982,_0x3afc2a){const _0x2ba581=_0x26004a;super(),this['_config']=_0x4c2d6a,this[_0x2ba581(0x10f)]=_0x120982,this[_0x2ba581(0x156)]=_0x3afc2a;const {..._0xbd74b4}=_0x4e03f5[_0x2ba581(0xf5)]({},_0x32c45a,this[_0x2ba581(0xe9)]);this['_configService'][_0x2ba581(0x14c)](_0x3f49b4,_0xbd74b4);}[_0x26004a(0xff)](){[[_0x4cdabd],[_0x406b40],[_0x4cd53f]]['forEach'](_0x44d3b1=>{const _0x2cf0c6=_0x1f0c;this[_0x2cf0c6(0x10f)]['add'](_0x44d3b1);});}[_0x26004a(0x16e)](){const _0x4609cc=_0x26004a;this['_injector'][_0x4609cc(0xfd)](_0x406b40),this[_0x4609cc(0x10f)][_0x4609cc(0xfd)](_0x4cd53f);}},_0x52bb14(_0x1812bf['UniverThreadCommentDataSourcePlugin'],_0x26004a(0x114),_0x4a0e0e),_0x52bb14(_0x1812bf[_0x26004a(0x143)],_0x26004a(0x11c),_0x4e03f5[_0x26004a(0x121)][_0x26004a(0x15f)]),_0x1812bf[_0x26004a(0x143)]=_0x46b467([_0x4e03f5[_0x26004a(0x10c)](_0x377150[_0x26004a(0x16a)],_0x53a0d2[_0x26004a(0x112)],_0x481f6b[_0x26004a(0x16d)]),_0x3ee0c0(0x1,_0x4e03f5[_0x26004a(0xf0)](_0x4e03f5[_0x26004a(0x103)])),_0x3ee0c0(0x2,_0x4e03f5[_0x26004a(0x10b)])],_0x1812bf[_0x26004a(0x143)]),Object[_0x26004a(0x152)](_0x1812bf,Symbol[_0x26004a(0xe4)],{'value':_0x26004a(0x15d)});}));function _0x1fde(){const _0x43d12a=['updateComment','8543028GJENlb','personId','error','YYYY/MM/DD\x20HH:mm','HTTPService','OpenOrReOpen','/reply','_threadCommentModel','thread-comment-data-source.config','userID','body','getCurrentUser','commentUpdate$','UniverThreadCommentDataSourcePlugin','pipe','replies','518iCzsWJ','listComments','payload','ref','getUser','userId','setConfig','addComment','301448mRjRAB','format','solved','CommentService','defineProperty','function','comments','dayjs','_configService','deleteComment','delete','_sessionService','forEach','UniverCore','@univerjs/core','Module','/universer-api/user/list','UNIVER_UNKNOWN','Delete','content','UniverProLicense','Add','length','167OxYvaU','/solved','parse','rangeId','/edit','UniverThreadCommentUIPlugin','user','unitId','UniverLicensePlugin','onReady','bufferTime','replyId','Plugin','toStringTag','users','UniverProCollaborationClient','36CiEqvC','7WDzPAI','_config','_initDataSource','@univerjs/thread-comment-ui','rxjs','5iHOGFc','subscribe','_threadCommentDataSource','Inject','@univerjs-pro/collaboration-client','parentId','post','customRanges','merge','_init','saveCommentToSnapshot','@univerjs-pro/license','filter','Solved','_httpService','UniverThreadComment','get','Reply','onStarting','root','requireSession','rangeType','Injector','_userService','resolved','CustomRangeType','@univerjs/network','330dNgwMP','1074318uoDCJW','getOwnPropertyDescriptor','IConfigService','DependentOn','getComment','Unknown','_injector','269788HyGnjm','map','UniverCollaborationClientPlugin','6eZmizk','pluginName','_threadCommentDataSourceService','syncUpdateMutationToColla','27567wnNnov','amd','Disposable','symbol','find','type','Edit','size','/delete','dataSource','UniverInstanceType','createTimestamp','reply','addUser','UniverProThreadCommentDatasource','code','IThreadCommentDataSourceService','Solve','/universer-api/comment/unit/','threadId','slice','getUnit','COMMENT','840994ezrDAk','getMemberID','stringify','UNRECOGNIZED','@univerjs/thread-comment','values','_initUserSync'];_0x1fde=function(){return _0x43d12a;};return _0x1fde();}
|
|
1
|
+
function _0xebfc(){const _0x5b8e7c=['replyId','onReady','_initUserSync','resolved','UniverProThreadCommentDatasource','Edit','DependentOn','98166ZPjHjD','threadId','/delete','ThreadCommentModel','@univerjs/thread-comment-ui','OpenOrReOpen','users','_initDataSource','_sessionService','30wLBJQG','syncUpdateMutationToColla','_threadCommentDataSource','function','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','values','IThreadCommentDataSourceService','amd','userID','user','YYYY/MM/DD\x20HH:mm','resolveComment','pluginName','comments','COMMENT','setConfig','161541zaMyYw','dataSource','Solved','1600448aiJMBT','error','code','forEach','Module','get','slice','rangeId','_commentService','add','merge','Solve','/edit','personId','reply','content','@univerjs/network','updateComment','parse','Reply','CommentService','createTimestamp','CollaborationSessionService','@univerjs/thread-comment','Inject','delete','body','@univerjs-pro/license','_init','/universer-api/comment/unit/','defineProperty','Plugin','map','@univerjs/core','_threadCommentModel','UniverProLicense','UniverThreadComment','ref','UniverThreadCommentUIPlugin','UniverLicensePlugin','CustomRangeType','getCurrentUser','UserManagerService','rangeType','toStringTag','format','getMemberID','/reply','solved','296935KUOtMu','size','replies','parentId','stringify','dayjs','_userService','_configService','HTTPService','_httpService','unitId','Injector','rxjs','object','customRanges','UniverProCollaborationClient','130298FQZCKD','/add','@univerjs-pro/collaboration-client','getUser','thread-comment-data-source.config','IConfigService','pipe','comment','filter','_injector','userId','requireSession','Delete','find','Unknown','Disposable','getOwnPropertyDescriptor','_threadCommentDataSourceService','_config','UniverCollaborationClientPlugin','2037116kfOtVt','90tqNyYe','disposeWithMe','UniverThreadCommentDataSourcePlugin','onStarting','type','6rQGCqc','length','getUnit','/universer-api/user/list','UNRECOGNIZED','commentUpdate$','deleteComment','post','symbol','UniverNetwork','addComment','addUser','4449672yujJah'];_0xebfc=function(){return _0x5b8e7c;};return _0xebfc();}function _0x496a(_0x3a3347,_0xc008cc){const _0xebfc61=_0xebfc();return _0x496a=function(_0x496a30,_0x34fab1){_0x496a30=_0x496a30-0x1f4;let _0x4aef6c=_0xebfc61[_0x496a30];return _0x4aef6c;},_0x496a(_0x3a3347,_0xc008cc);}(function(_0x3708f5,_0x5bccda){const _0x52a883=_0x496a,_0x21df1f=_0x3708f5();while(!![]){try{const _0x46949b=-parseInt(_0x52a883(0x1fb))/0x1+parseInt(_0x52a883(0x26c))/0x2+parseInt(_0x52a883(0x272))/0x3*(-parseInt(_0x52a883(0x217))/0x4)+-parseInt(_0x52a883(0x248))/0x5*(parseInt(_0x52a883(0x204))/0x6)+parseInt(_0x52a883(0x258))/0x7+parseInt(_0x52a883(0x27e))/0x8+-parseInt(_0x52a883(0x214))/0x9*(-parseInt(_0x52a883(0x26d))/0xa);if(_0x46949b===_0x5bccda)break;else _0x21df1f['push'](_0x21df1f['shift']());}catch(_0x580356){_0x21df1f['push'](_0x21df1f['shift']());}}}(_0xebfc,0x889ed),function(_0x5ae38d,_0xd9c6ff){const _0xf71f6e=_0x496a;typeof exports==_0xf71f6e(0x255)&&typeof module<'u'?_0xd9c6ff(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==_0xf71f6e(0x207)&&define[_0xf71f6e(0x20b)]?define(['exports',_0xf71f6e(0x25a),_0xf71f6e(0x232),_0xf71f6e(0x238),_0xf71f6e(0x1ff),_0xf71f6e(0x22e),_0xf71f6e(0x254),_0xf71f6e(0x227)],_0xd9c6ff):(_0x5ae38d=typeof globalThis<'u'?globalThis:_0x5ae38d||self,_0xd9c6ff(_0x5ae38d[_0xf71f6e(0x1f8)]={},_0x5ae38d[_0xf71f6e(0x257)],_0x5ae38d[_0xf71f6e(0x23a)],_0x5ae38d['UniverCore'],_0x5ae38d['UniverThreadCommentUi'],_0x5ae38d[_0xf71f6e(0x23b)],_0x5ae38d['rxjs'],_0x5ae38d[_0xf71f6e(0x27b)]));}(this,function(_0x53a955,_0x3f1856,_0x22e19a,_0x240e31,_0x120f26,_0x42d5cb,_0x36f6af,_0x4adf4d){'use strict';const _0x371856=_0x496a;const _0x50a5ea=_0x371856(0x208);var _0x4c8ba8=(_0x193ccd=>(_0x193ccd[_0x193ccd[_0x371856(0x200)]=0x0]=_0x371856(0x200),_0x193ccd[_0x193ccd[_0x371856(0x216)]=0x1]=_0x371856(0x216),_0x193ccd[_0x193ccd[_0x371856(0x276)]=-0x1]=_0x371856(0x276),_0x193ccd))(_0x4c8ba8||{}),_0x4a1df8=(_0x252e12=>(_0x252e12[_0x252e12[_0x371856(0x266)]=0x0]=_0x371856(0x266),_0x252e12[_0x252e12['Add']=0x1]='Add',_0x252e12[_0x252e12[_0x371856(0x22a)]=0x2]=_0x371856(0x22a),_0x252e12[_0x252e12[_0x371856(0x1f9)]=0x3]=_0x371856(0x1f9),_0x252e12[_0x252e12[_0x371856(0x264)]=0x4]=_0x371856(0x264),_0x252e12[_0x252e12['Solve']=0x5]='Solve',_0x252e12[_0x252e12[_0x371856(0x276)]=-0x1]='UNRECOGNIZED',_0x252e12))(_0x4a1df8||{});const _0x3ea797=_0x596ef5=>_0x240e31[_0x371856(0x24d)](new Date(+_0x596ef5))[_0x371856(0x244)](_0x371856(0x20e)),_0x26d7b0=async(_0x35a04b,_0x5aa5a6)=>{const _0x311aef=_0x371856,_0x171a4a=_0x35a04b[_0x311aef(0x21c)](_0x240e31[_0x311aef(0x241)]),_0x2fe50f=_0x35a04b['get'](_0x4adf4d[_0x311aef(0x250)]);_0x5aa5a6[_0x311aef(0x21a)](_0x1e467b=>{const _0x35cd88=_0x311aef;_0x171a4a[_0x35cd88(0x25b)](_0x1e467b)&&_0x5aa5a6[_0x35cd88(0x230)](_0x1e467b);}),_0x5aa5a6[_0x311aef(0x249)]&&(await _0x2fe50f[_0x311aef(0x21c)](_0x311aef(0x275),{'params':{'userIDs':[..._0x5aa5a6]}}))['body'][_0x311aef(0x201)][_0x311aef(0x21a)](_0x16521a=>{_0x16521a&&_0x171a4a['addUser'](_0x16521a);});};var _0x3b2885=Object[_0x371856(0x268)],_0xe1cba1=(_0x400360,_0xf8ebe1,_0x51bdb1,_0x5e55d0)=>{const _0x38c506=_0x371856;for(var _0x128be9=_0x5e55d0>0x1?void 0x0:_0x5e55d0?_0x3b2885(_0xf8ebe1,_0x51bdb1):_0xf8ebe1,_0x357a70=_0x400360[_0x38c506(0x273)]-0x1,_0x3c0941;_0x357a70>=0x0;_0x357a70--)(_0x3c0941=_0x400360[_0x357a70])&&(_0x128be9=_0x3c0941(_0x128be9)||_0x128be9);return _0x128be9;},_0x2559b8=(_0x26fc54,_0x1ca2e3)=>(_0x5595a7,_0x40a3a3)=>_0x1ca2e3(_0x5595a7,_0x40a3a3,_0x26fc54);let _0x4a6f75=class extends _0x240e31[_0x371856(0x267)]{constructor(_0x5c30e2,_0x5e25cf,_0x46ca46,_0x1b11a0){const _0x3aba64=_0x371856;super(),this[_0x3aba64(0x21f)]=_0x5c30e2,this['_threadCommentModel']=_0x5e25cf,this['_userService']=_0x46ca46,this[_0x3aba64(0x261)]=_0x1b11a0,this[_0x3aba64(0x233)](),this['_initUserSync']();}[_0x371856(0x1f6)](){const _0x2da5f9=_0x371856;this[_0x2da5f9(0x26e)](this[_0x2da5f9(0x239)][_0x2da5f9(0x277)][_0x2da5f9(0x25e)](_0x36f6af['bufferTime'](0x10))['subscribe'](_0x579087=>{const _0x1e57a6=_0x2da5f9,_0x3ecd05=new Set();_0x579087[_0x1e57a6(0x21a)](_0x40ae21=>{const _0x4c2bc6=_0x1e57a6;switch(_0x40ae21[_0x4c2bc6(0x271)]){case'add':{const _0x5efc9c=_0x40ae21['payload'][_0x4c2bc6(0x224)];_0x3ecd05[_0x4c2bc6(0x220)](_0x5efc9c);break;}}}),_0x26d7b0(this['_injector'],_0x3ecd05);}));}[_0x371856(0x233)](){const _0x1d8b0a=_0x371856;this[_0x1d8b0a(0x26e)](this[_0x1d8b0a(0x21f)]['commentUpdate$']['subscribe'](async _0x18650b=>{const _0x3bcb63=_0x1d8b0a;var _0x3501fb,_0x5b287d,_0x358f21,_0x4bd757;const _0x555271=(_0x3501fb=this[_0x3bcb63(0x239)][_0x3bcb63(0x274)](_0x18650b[_0x3bcb63(0x252)])[_0x3bcb63(0x265)](_0x409c81=>_0x409c81[_0x3bcb63(0x1fc)]===_0x18650b[_0x3bcb63(0x1fc)]))==null?void 0x0:_0x3501fb['root'];if(!_0x555271)return;const {unitId:_0x36423d,subUnitId:_0x433a90}=_0x555271;switch(_0x18650b[_0x3bcb63(0x20d)]&&this[_0x3bcb63(0x24e)]['addUser'](_0x18650b[_0x3bcb63(0x20d)]),_0x18650b[_0x3bcb63(0x271)]){case _0x4a1df8['Add']:break;case _0x4a1df8[_0x3bcb63(0x22a)]:{this[_0x3bcb63(0x239)]['addComment'](_0x36423d,_0x433a90,{'unitId':_0x36423d,'subUnitId':_0x433a90,'ref':'','id':_0x18650b[_0x3bcb63(0x1f4)],'dT':_0x3ea797(+_0x18650b[_0x3bcb63(0x22c)]),'threadId':_0x18650b[_0x3bcb63(0x1fc)],'personId':(_0x358f21=(_0x5b287d=_0x18650b['user'])==null?void 0x0:_0x5b287d[_0x3bcb63(0x20c)])!=null?_0x358f21:_0x18650b['userId'],'text':JSON[_0x3bcb63(0x229)](_0x18650b[_0x3bcb63(0x226)]),'parentId':_0x555271['id']});break;}case _0x4a1df8['Delete']:{const _0x4552da=this[_0x3bcb63(0x239)]['getComment'](_0x36423d,_0x433a90,_0x18650b[_0x3bcb63(0x1f4)]);_0x4552da&&_0x4552da[_0x3bcb63(0x24b)]&&this[_0x3bcb63(0x239)][_0x3bcb63(0x278)](_0x36423d,_0x433a90,_0x18650b[_0x3bcb63(0x1f4)]);break;}case _0x4a1df8[_0x3bcb63(0x1f9)]:{this['_threadCommentModel'][_0x3bcb63(0x228)](_0x36423d,_0x433a90,{'commentId':_0x18650b[_0x3bcb63(0x1f4)],'text':JSON[_0x3bcb63(0x229)](_0x18650b[_0x3bcb63(0x226)])});break;}case _0x4a1df8[_0x3bcb63(0x222)]:{const _0x34f653=(_0x4bd757=this[_0x3bcb63(0x239)]['getUnit'](_0x18650b[_0x3bcb63(0x252)])[_0x3bcb63(0x265)](_0x73c5c5=>_0x73c5c5['threadId']===_0x18650b['threadId']))==null?void 0x0:_0x4bd757['root'];_0x34f653&&this['_threadCommentModel'][_0x3bcb63(0x20f)](_0x36423d,_0x433a90,_0x34f653['id'],_0x18650b[_0x3bcb63(0x247)]===_0x4c8ba8[_0x3bcb63(0x216)]);break;}}}));}};_0x4a6f75=_0xe1cba1([_0x2559b8(0x0,_0x240e31[_0x371856(0x22f)](_0x3f1856[_0x371856(0x22b)])),_0x2559b8(0x1,_0x240e31[_0x371856(0x22f)](_0x42d5cb[_0x371856(0x1fe)])),_0x2559b8(0x2,_0x240e31[_0x371856(0x22f)](_0x240e31['UserManagerService'])),_0x2559b8(0x3,_0x240e31[_0x371856(0x22f)](_0x240e31[_0x371856(0x253)]))],_0x4a6f75);const _0x328925=_0x371856(0x25c),_0x493836={};var _0x1933a6=Object[_0x371856(0x268)],_0x1fe353=(_0x2a502e,_0xffd8c4,_0x51c06d,_0x4a33e6)=>{const _0x319e9e=_0x371856;for(var _0x499444=_0x4a33e6>0x1?void 0x0:_0x4a33e6?_0x1933a6(_0xffd8c4,_0x51c06d):_0xffd8c4,_0xe9237e=_0x2a502e[_0x319e9e(0x273)]-0x1,_0x15da6a;_0xe9237e>=0x0;_0xe9237e--)(_0x15da6a=_0x2a502e[_0xe9237e])&&(_0x499444=_0x15da6a(_0x499444)||_0x499444);return _0x499444;},_0x4ee0c9=(_0x1225e8,_0x201026)=>(_0x360ace,_0x3864aa)=>_0x201026(_0x360ace,_0x3864aa,_0x1225e8);function _0x359072(_0x5db519,_0x2b2654){const _0x532cfe=_0x371856,_0x146d6f=_0x5db519['replies'][0x0];return{..._0x2b2654,'id':_0x146d6f[_0x532cfe(0x1f4)],'resolved':_0x5db519[_0x532cfe(0x247)]===0x1,'dT':_0x3ea797(_0x146d6f[_0x532cfe(0x22c)]),'personId':_0x146d6f[_0x532cfe(0x262)],'threadId':_0x146d6f[_0x532cfe(0x1fc)]};}function _0x128e6c(_0x40e901,_0x4bb4cc,_0xff1fca){const _0xaca5a7=_0x371856;var _0xbdb0b3,_0x20181b;if(((_0x20181b=(_0xbdb0b3=_0x40e901==null?void 0x0:_0x40e901[_0xaca5a7(0x24a)])==null?void 0x0:_0xbdb0b3[_0xaca5a7(0x273)])!=null?_0x20181b:0x0)>0x0){const _0x58b6c1=(_0xbd352,_0x208177)=>({'id':_0xbd352[_0xaca5a7(0x1f4)],'threadId':_0xbd352['threadId'],'dT':_0x3ea797(_0xbd352[_0xaca5a7(0x22c)]),'personId':_0xbd352[_0xaca5a7(0x262)],'resolved':_0x40e901['solved']===_0x4c8ba8[_0xaca5a7(0x216)],'unitId':_0x4bb4cc,'subUnitId':_0xff1fca,'text':JSON[_0xaca5a7(0x229)](_0xbd352[_0xaca5a7(0x226)]),'parentId':_0x208177}),_0x317f2d=_0x58b6c1(_0x40e901[_0xaca5a7(0x24a)][0x0]);return{..._0x317f2d,'children':_0x40e901[_0xaca5a7(0x24a)][_0xaca5a7(0x21d)](0x1)[_0xaca5a7(0x237)](_0x500c3c=>_0x58b6c1(_0x500c3c,_0x317f2d['id']))};}return null;}let _0x93fb38=class{constructor(_0x111fca,_0x44fb23,_0x5419d0){const _0x329960=_0x371856;this[_0x329960(0x251)]=_0x111fca,this[_0x329960(0x24e)]=_0x44fb23,this[_0x329960(0x203)]=_0x5419d0;}async[_0x371856(0x27c)](_0x18a15d){const _0x1b8fc3=_0x371856;var _0x10bdb2,_0x17341e;const {parentId:_0x51419e,unitId:_0x36a0aa,text:_0x32e09d,threadId:_0x73a2f1}=_0x18a15d,_0x5b7d84=(_0x17341e=(_0x10bdb2=_0x32e09d[_0x1b8fc3(0x256)])==null?void 0x0:_0x10bdb2[_0x1b8fc3(0x260)](_0x3a4a5c=>_0x3a4a5c[_0x1b8fc3(0x242)]===_0x240e31[_0x1b8fc3(0x23f)][_0x1b8fc3(0x212)])[_0x1b8fc3(0x237)](_0xec682f=>_0xec682f[_0x1b8fc3(0x21e)]))!=null?_0x17341e:[],_0x8a1aa8=JSON[_0x1b8fc3(0x24c)](_0x32e09d),_0x14db45=(await this['_sessionService'][_0x1b8fc3(0x263)](_0x36a0aa))[_0x1b8fc3(0x245)]();if(_0x51419e){const _0xb645ae={'memberId':_0x14db45,'unitId':_0x36a0aa,'content':_0x8a1aa8,'mention':_0x5b7d84,'threadId':_0x73a2f1},_0x5552ae=(await this[_0x1b8fc3(0x251)][_0x1b8fc3(0x279)](_0x1b8fc3(0x234)+_0x36a0aa+_0x1b8fc3(0x246),{'body':_0xb645ae}))[_0x1b8fc3(0x231)][_0x1b8fc3(0x225)];return{..._0x18a15d,'id':_0x5552ae[_0x1b8fc3(0x1f4)],'dT':_0x240e31['dayjs'](+_0x5552ae['createTimestamp'])[_0x1b8fc3(0x244)](_0x1b8fc3(0x20e)),'personId':_0x5552ae[_0x1b8fc3(0x262)]};}else{const _0x141ee0={'memberId':_0x14db45,'unitId':_0x36a0aa,'content':_0x8a1aa8,'mention':_0x5b7d84},_0x4aac1c=await this[_0x1b8fc3(0x251)][_0x1b8fc3(0x279)](_0x1b8fc3(0x234)+_0x36a0aa+_0x1b8fc3(0x259),{'body':_0x141ee0});return _0x359072(_0x4aac1c[_0x1b8fc3(0x231)][_0x1b8fc3(0x25f)],_0x18a15d);}}async[_0x371856(0x228)](_0xbf2fb4){const _0x481f8f=_0x371856;var _0x87d461,_0x53a495;const {text:_0x471a69,unitId:_0x4469b5}=_0xbf2fb4,_0x414a52=(_0x53a495=(_0x87d461=_0x471a69['customRanges'])==null?void 0x0:_0x87d461['filter'](_0x1907c9=>_0x1907c9[_0x481f8f(0x242)]===_0x240e31[_0x481f8f(0x23f)]['COMMENT'])[_0x481f8f(0x237)](_0x21eaa2=>_0x21eaa2[_0x481f8f(0x21e)]))!=null?_0x53a495:[],_0x454fd9=JSON[_0x481f8f(0x24c)](_0x471a69),_0x3a5e43=_0xbf2fb4[_0x481f8f(0x1fc)],_0x17970e=_0xbf2fb4['id'],_0x443c3a={'memberId':(await this[_0x481f8f(0x203)][_0x481f8f(0x263)](_0x4469b5))['getMemberID'](),'unitId':_0x4469b5,'threadId':_0x3a5e43,'mention':_0x414a52,'content':_0x454fd9,'replyId':_0x17970e},_0x190624=await this[_0x481f8f(0x251)][_0x481f8f(0x279)](_0x481f8f(0x234)+_0x4469b5+_0x481f8f(0x223),{'body':_0x443c3a});return!_0x190624[_0x481f8f(0x231)]['error']||_0x190624[_0x481f8f(0x231)][_0x481f8f(0x218)][_0x481f8f(0x219)]===0x1;}async[_0x371856(0x20f)](_0x1dd4f1){const _0x5f485e=_0x371856,{unitId:_0x21105c}=_0x1dd4f1,_0x261704=_0x1dd4f1[_0x5f485e(0x1fc)],_0x11e216={'memberId':this[_0x5f485e(0x24e)][_0x5f485e(0x240)]()[_0x5f485e(0x20c)],'unitId':_0x21105c,'threadId':_0x261704,'solved':_0x1dd4f1[_0x5f485e(0x1f7)]?_0x4c8ba8[_0x5f485e(0x216)]:_0x4c8ba8['OpenOrReOpen']},_0x22d660=await this['_httpService'][_0x5f485e(0x279)](_0x5f485e(0x234)+_0x21105c+'/solved',{'body':_0x11e216});return!_0x22d660[_0x5f485e(0x231)][_0x5f485e(0x218)]||_0x22d660['body'][_0x5f485e(0x218)][_0x5f485e(0x219)]===0x1;}async[_0x371856(0x278)](_0x4c5eb0,_0x52b854,_0x1f9e7d,_0x1e64ea){const _0x13ef34=_0x371856,_0x2e41b3={'memberId':(await this[_0x13ef34(0x203)]['requireSession'](_0x4c5eb0))[_0x13ef34(0x245)](),'threadId':_0x1f9e7d,'replyId':_0x1e64ea,'unitId':_0x4c5eb0},_0x1dd8d2=await this[_0x13ef34(0x251)][_0x13ef34(0x279)](_0x13ef34(0x234)+_0x4c5eb0+_0x13ef34(0x1fd),{'body':_0x2e41b3});return!_0x1dd8d2[_0x13ef34(0x231)]['error']||_0x1dd8d2[_0x13ef34(0x231)][_0x13ef34(0x218)][_0x13ef34(0x219)]===0x1;}async['listComments'](_0x4b27ab,_0x311038,_0xf3304f){const _0x570188=_0x371856,_0x5aeb9d={'unitId':_0x4b27ab,'threadId':_0xf3304f},_0x32d1f2=await this[_0x570188(0x251)]['post'](_0x570188(0x234)+_0x4b27ab+'/list',{'body':_0x5aeb9d}),_0x3993d9=_0xf3304f[_0x570188(0x237)](_0x160f02=>_0x128e6c(_0x32d1f2['body'][_0x570188(0x211)][_0x160f02],_0x4b27ab,_0x311038))[_0x570188(0x260)](Boolean);return Object[_0x570188(0x209)](_0x32d1f2[_0x570188(0x231)][_0x570188(0x201)])[_0x570188(0x21a)](_0x527938=>{const _0x3dc3ca=_0x570188;this[_0x3dc3ca(0x24e)][_0x3dc3ca(0x27d)](_0x527938);}),_0x3993d9;}['saveCommentToSnapshot'](_0x36da84){const _0x307fd9=_0x371856;return{'id':_0x36da84['id'],'threadId':_0x36da84['threadId'],'ref':_0x36da84[_0x307fd9(0x23c)]};}};_0x93fb38=_0x1fe353([_0x4ee0c9(0x0,_0x240e31[_0x371856(0x22f)](_0x4adf4d['HTTPService'])),_0x4ee0c9(0x1,_0x240e31[_0x371856(0x22f)](_0x240e31[_0x371856(0x241)])),_0x4ee0c9(0x2,_0x240e31[_0x371856(0x22f)](_0x3f1856[_0x371856(0x22d)]))],_0x93fb38);var _0xce737a=Object[_0x371856(0x268)],_0x2a4654=(_0x3c5d28,_0x15e574,_0x1fb832,_0x50c4d4)=>{for(var _0x14ea86=_0x50c4d4>0x1?void 0x0:_0x50c4d4?_0xce737a(_0x15e574,_0x1fb832):_0x15e574,_0x19a94e=_0x3c5d28['length']-0x1,_0x1dd077;_0x19a94e>=0x0;_0x19a94e--)(_0x1dd077=_0x3c5d28[_0x19a94e])&&(_0x14ea86=_0x1dd077(_0x14ea86)||_0x14ea86);return _0x14ea86;},_0x552a90=(_0x2ee940,_0x71e6de)=>(_0x51a751,_0x5e556f)=>_0x71e6de(_0x51a751,_0x5e556f,_0x2ee940);let _0x2ca56a=class extends _0x240e31[_0x371856(0x267)]{constructor(_0x2ea374,_0xd9ddcb){const _0x2a2889=_0x371856;super(),this[_0x2a2889(0x269)]=_0x2ea374,this['_threadCommentDataSource']=_0xd9ddcb,this['_initDataSource']();}[_0x371856(0x202)](){const _0x2ee10c=_0x371856;this['_threadCommentDataSourceService'][_0x2ee10c(0x215)]=this[_0x2ee10c(0x206)],this[_0x2ee10c(0x269)][_0x2ee10c(0x205)]=!0x1;}};_0x2ca56a=_0x2a4654([_0x552a90(0x0,_0x42d5cb[_0x371856(0x20a)]),_0x552a90(0x1,_0x240e31[_0x371856(0x22f)](_0x93fb38))],_0x2ca56a);var _0x504c0f=Object['defineProperty'],_0x46ff6e=Object[_0x371856(0x268)],_0x3c1328=(_0x54e746,_0x1ed308,_0x5dfcad)=>_0x1ed308 in _0x54e746?_0x504c0f(_0x54e746,_0x1ed308,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5dfcad}):_0x54e746[_0x1ed308]=_0x5dfcad,_0x11cb95=(_0x296433,_0x2d64d8,_0x18d8ed,_0x5b44da)=>{const _0x5a9f5a=_0x371856;for(var _0x300292=_0x5b44da>0x1?void 0x0:_0x5b44da?_0x46ff6e(_0x2d64d8,_0x18d8ed):_0x2d64d8,_0x1a08eb=_0x296433[_0x5a9f5a(0x273)]-0x1,_0x1c3524;_0x1a08eb>=0x0;_0x1a08eb--)(_0x1c3524=_0x296433[_0x1a08eb])&&(_0x300292=_0x1c3524(_0x300292)||_0x300292);return _0x300292;},_0x1eef18=(_0x19fba4,_0x27aa46)=>(_0x7acfd1,_0x4eeea6)=>_0x27aa46(_0x7acfd1,_0x4eeea6,_0x19fba4),_0xe9a4a9=(_0x3126aa,_0x4e0129,_0xd38648)=>_0x3c1328(_0x3126aa,typeof _0x4e0129!=_0x371856(0x27a)?_0x4e0129+'':_0x4e0129,_0xd38648);_0x53a955[_0x371856(0x26f)]=class extends _0x240e31[_0x371856(0x236)]{constructor(_0x326227=_0x493836,_0x320b63,_0x53cba3){const _0x484fa3=_0x371856;super(),this['_config']=_0x326227,this[_0x484fa3(0x261)]=_0x320b63,this[_0x484fa3(0x24f)]=_0x53cba3;const {..._0x5bfa21}=_0x240e31[_0x484fa3(0x221)]({},_0x493836,this[_0x484fa3(0x26a)]);this[_0x484fa3(0x24f)][_0x484fa3(0x213)](_0x328925,_0x5bfa21);}[_0x371856(0x270)](){const _0x12884a=_0x371856;[[_0x93fb38],[_0x2ca56a],[_0x4a6f75]][_0x12884a(0x21a)](_0x3846b0=>{const _0x591fb8=_0x12884a;this[_0x591fb8(0x261)]['add'](_0x3846b0);});}[_0x371856(0x1f5)](){const _0x51ebb9=_0x371856;this[_0x51ebb9(0x261)][_0x51ebb9(0x21c)](_0x2ca56a),this[_0x51ebb9(0x261)]['get'](_0x4a6f75);}},_0xe9a4a9(_0x53a955[_0x371856(0x26f)],_0x371856(0x210),_0x50a5ea),_0xe9a4a9(_0x53a955[_0x371856(0x26f)],_0x371856(0x271),_0x240e31['UniverInstanceType']['UNIVER_UNKNOWN']),_0x53a955[_0x371856(0x26f)]=_0x11cb95([_0x240e31[_0x371856(0x1fa)](_0x120f26[_0x371856(0x23d)],_0x3f1856[_0x371856(0x26b)],_0x22e19a[_0x371856(0x23e)]),_0x1eef18(0x1,_0x240e31[_0x371856(0x22f)](_0x240e31['Injector'])),_0x1eef18(0x2,_0x240e31[_0x371856(0x25d)])],_0x53a955[_0x371856(0x26f)]),Object[_0x371856(0x235)](_0x53a955,Symbol[_0x371856(0x243)],{'value':_0x371856(0x21b)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.12.2-experimental.
|
|
3
|
+
"version": "0.12.2-experimental.20251202-45172c6",
|
|
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/
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.12.2-experimental.
|
|
54
|
-
"@univerjs
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.12.2-experimental.20251202-45172c6",
|
|
49
|
+
"@univerjs-pro/license": "0.12.2-experimental.20251202-45172c6",
|
|
50
|
+
"@univerjs/core": "0.12.2-experimental.20251202-45172c6",
|
|
51
|
+
"@univerjs/network": "0.12.2-experimental.20251202-45172c6",
|
|
52
|
+
"@univerjs/thread-comment": "0.12.2-experimental.20251202-45172c6",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.12.2-experimental.20251202-45172c6",
|
|
54
|
+
"@univerjs/protocol": "0.1.47"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|