@univerjs-pro/thread-comment-datasource 0.8.2-nightly.202506251607 → 0.8.2
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 _0x158931=_0x28f2;(function(_0x146e4c,_0x16ca2b){const _0x4ebdf9=_0x28f2,_0x100225=_0x146e4c();while(!![]){try{const _0x1334e6=parseInt(_0x4ebdf9(0x22f))/0x1+parseInt(_0x4ebdf9(0x1ee))/0x2*(parseInt(_0x4ebdf9(0x223))/0x3)+parseInt(_0x4ebdf9(0x228))/0x4*(-parseInt(_0x4ebdf9(0x1cd))/0x5)+parseInt(_0x4ebdf9(0x202))/0x6*(-parseInt(_0x4ebdf9(0x1fe))/0x7)+parseInt(_0x4ebdf9(0x1dd))/0x8*(parseInt(_0x4ebdf9(0x1ce))/0x9)+parseInt(_0x4ebdf9(0x1e4))/0xa+-parseInt(_0x4ebdf9(0x1bf))/0xb;if(_0x1334e6===_0x16ca2b)break;else _0x100225['push'](_0x100225['shift']());}catch(_0x20a37f){_0x100225['push'](_0x100225['shift']());}}}(_0x5eac,0x94a98));Object[_0x158931(0x207)](exports,Symbol[_0x158931(0x1d1)],{'value':_0x158931(0x212)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x158931(0x211)),c=require(_0x158931(0x203)),j=require('@univerjs/thread-comment-ui'),M=require(_0x158931(0x1ec)),w=require(_0x158931(0x20b)),P=require(_0x158931(0x1e9)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x48ac9=>(_0x48ac9[_0x48ac9['OpenOrReOpen']=0x0]=_0x158931(0x1ca),_0x48ac9[_0x48ac9['Solved']=0x1]=_0x158931(0x206),_0x48ac9[_0x48ac9[_0x158931(0x1ea)]=-0x1]='UNRECOGNIZED',_0x48ac9))(I||{}),v=(_0x192042=>(_0x192042[_0x192042['Unknown']=0x0]=_0x158931(0x230),_0x192042[_0x192042[_0x158931(0x226)]=0x1]=_0x158931(0x226),_0x192042[_0x192042['Reply']=0x2]=_0x158931(0x1f6),_0x192042[_0x192042[_0x158931(0x1bb)]=0x3]=_0x158931(0x1bb),_0x192042[_0x192042[_0x158931(0x208)]=0x4]=_0x158931(0x208),_0x192042[_0x192042[_0x158931(0x1de)]=0x5]=_0x158931(0x1de),_0x192042[_0x192042['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x192042))(v||{});const f=_0x5a18ff=>c[_0x158931(0x22e)](new Date(+_0x5a18ff))['format'](_0x158931(0x200)),R=async(_0x385a2a,_0x530b85)=>{const _0x5a5526=_0x158931,_0x148e37=_0x385a2a[_0x5a5526(0x20e)](c['UserManagerService']),_0x7b086=_0x385a2a[_0x5a5526(0x20e)](P[_0x5a5526(0x1d7)]);_0x530b85[_0x5a5526(0x1f4)](_0x1753e7=>{const _0x241ec8=_0x5a5526;_0x148e37['getUser'](_0x1753e7)&&_0x530b85[_0x241ec8(0x20c)](_0x1753e7);}),_0x530b85['size']&&(await _0x7b086[_0x5a5526(0x20e)](_0x5a5526(0x22d),{'params':{'userIDs':[..._0x530b85]}}))[_0x5a5526(0x1cc)][_0x5a5526(0x225)][_0x5a5526(0x1f4)](_0x270629=>{const _0x46ff0e=_0x5a5526;_0x270629&&_0x148e37[_0x46ff0e(0x227)](_0x270629);});};var $=Object[_0x158931(0x1f1)],E=(_0x4d70aa,_0x39a52e,_0x341b2a,_0x5e0fb6)=>{const _0x1b42e3=_0x158931;for(var _0xc3ee4f=_0x5e0fb6>0x1?void 0x0:_0x5e0fb6?$(_0x39a52e,_0x341b2a):_0x39a52e,_0x5a6c40=_0x4d70aa[_0x1b42e3(0x1da)]-0x1,_0x19e564;_0x5a6c40>=0x0;_0x5a6c40--)(_0x19e564=_0x4d70aa[_0x5a6c40])&&(_0xc3ee4f=_0x19e564(_0xc3ee4f)||_0xc3ee4f);return _0xc3ee4f;},S=(_0x28e9b9,_0x572796)=>(_0x42f913,_0x52df6a)=>_0x572796(_0x42f913,_0x52df6a,_0x28e9b9);function _0x5eac(){const _0x17d47a=['4010770BGXyJl','27CNSPdn','symbol','CustomRangeType','toStringTag','CommentService','_config','/reply','slice','UniverThreadCommentDataSourcePlugin','HTTPService','ref','userId','length','_initUserSync','replyId','2833672vGvzsS','Solve','COMMENT','UniverThreadCommentUIPlugin','getUnit','payload','UniverCollaborationClientPlugin','2623760nLNOBV','getCurrentUser','merge','UserManagerService','resolved','@univerjs/network','UNRECOGNIZED','parse','@univerjs/thread-comment','customRanges','5378lzEwZG','_threadCommentDataSourceService','requireSession','getOwnPropertyDescriptor','_threadCommentModel','code','forEach','setConfig','Reply','threadId','pipe','disposeWithMe','_initDataSource','root','saveCommentToSnapshot','resolveComment','21287iVnxeF','UniverInstanceType','YYYY/MM/DD\x20HH:mm','format','894aBoMCg','@univerjs/core','rangeId','CollaborationSessionService','Solved','defineProperty','Delete','_threadCommentDataSource','_userService','rxjs','delete','pluginName','get','Injector','type','@univerjs-pro/license','Module','listComments','_sessionService','/list','/universer-api/comment/unit/','reply','stringify','post','replies','_commentService','rangeType','getMemberID','dataSource','UNIVER_UNKNOWN','addComment','unitId','filter','831mXjbpp','_configService','users','Add','addUser','4XcgsUb','userID','map','deleteComment','updateComment','/universer-api/user/list','dayjs','880880IcNkAH','Unknown','_injector','solved','commentUpdate$','user','values','/solved','UniverLicensePlugin','thread-comment-data-source.config','syncUpdateMutationToColla','Edit','content','Disposable','onStarting','11952083NmFcTX','Inject','createTimestamp','/edit','error','ThreadCommentModel','add','_httpService','comments','personId','_init','OpenOrReOpen','subscribe','body'];_0x5eac=function(){return _0x17d47a;};return _0x5eac();}let p=class extends c[_0x158931(0x1bd)]{constructor(_0x340a89,_0x5b2988,_0xe0f02,_0x1c5668){const _0x13f81b=_0x158931;super(),this[_0x13f81b(0x21b)]=_0x340a89,this['_threadCommentModel']=_0x5b2988,this['_userService']=_0xe0f02,this[_0x13f81b(0x231)]=_0x1c5668,this[_0x13f81b(0x1c9)](),this['_initUserSync']();}[_0x158931(0x1db)](){const _0x5263fb=_0x158931;this[_0x5263fb(0x1f9)](this[_0x5263fb(0x1f2)][_0x5263fb(0x1b4)][_0x5263fb(0x1f8)](w['bufferTime'](0x10))[_0x5263fb(0x1cb)](_0x23d91a=>{const _0x1f676c=_0x5263fb,_0x47cb6a=new Set();_0x23d91a[_0x1f676c(0x1f4)](_0x542242=>{const _0x1a58d4=_0x1f676c;switch(_0x542242[_0x1a58d4(0x210)]){case'add':{const _0x569471=_0x542242[_0x1a58d4(0x1e2)][_0x1a58d4(0x1c8)];_0x47cb6a[_0x1a58d4(0x1c5)](_0x569471);break;}}}),R(this['_injector'],_0x47cb6a);}));}[_0x158931(0x1c9)](){const _0x6cadbd=_0x158931;this['disposeWithMe'](this[_0x6cadbd(0x21b)]['commentUpdate$'][_0x6cadbd(0x1cb)](async _0x4aac9e=>{const _0x10c3da=_0x6cadbd;var _0x19d279,_0x4de46a,_0xa3c30b,_0x2d1e5c;const _0x3ba44e=(_0x19d279=this[_0x10c3da(0x1f2)][_0x10c3da(0x1e1)](_0x4aac9e[_0x10c3da(0x221)])['find'](_0x359ab5=>_0x359ab5[_0x10c3da(0x1f7)]===_0x4aac9e[_0x10c3da(0x1f7)]))==null?void 0x0:_0x19d279[_0x10c3da(0x1fb)];if(!_0x3ba44e)return;const {unitId:_0x9c7b7f,subUnitId:_0x62f4fe}=_0x3ba44e;switch(_0x4aac9e['user']&&this[_0x10c3da(0x20a)][_0x10c3da(0x227)](_0x4aac9e[_0x10c3da(0x1b5)]),_0x4aac9e[_0x10c3da(0x210)]){case v['Add']:break;case v['Reply']:{this[_0x10c3da(0x1f2)]['addComment'](_0x9c7b7f,_0x62f4fe,{'unitId':_0x9c7b7f,'subUnitId':_0x62f4fe,'ref':'','id':_0x4aac9e['replyId'],'dT':f(+_0x4aac9e[_0x10c3da(0x1c1)]),'threadId':_0x4aac9e[_0x10c3da(0x1f7)],'personId':(_0xa3c30b=(_0x4de46a=_0x4aac9e[_0x10c3da(0x1b5)])==null?void 0x0:_0x4de46a['userID'])!=null?_0xa3c30b:_0x4aac9e[_0x10c3da(0x1d9)],'text':JSON[_0x10c3da(0x1eb)](_0x4aac9e[_0x10c3da(0x1bc)]),'parentId':_0x3ba44e['id']});break;}case v[_0x10c3da(0x208)]:{const _0xe3d3f5=this[_0x10c3da(0x1f2)]['getComment'](_0x9c7b7f,_0x62f4fe,_0x4aac9e['replyId']);_0xe3d3f5&&_0xe3d3f5['parentId']&&this['_threadCommentModel'][_0x10c3da(0x22b)](_0x9c7b7f,_0x62f4fe,_0x4aac9e[_0x10c3da(0x1dc)]);break;}case v[_0x10c3da(0x1bb)]:{this['_threadCommentModel']['updateComment'](_0x9c7b7f,_0x62f4fe,{'commentId':_0x4aac9e[_0x10c3da(0x1dc)],'text':JSON[_0x10c3da(0x1eb)](_0x4aac9e[_0x10c3da(0x1bc)])});break;}case v[_0x10c3da(0x1de)]:{const _0x30c956=(_0x2d1e5c=this[_0x10c3da(0x1f2)]['getUnit'](_0x4aac9e[_0x10c3da(0x221)])['find'](_0x248813=>_0x248813[_0x10c3da(0x1f7)]===_0x4aac9e[_0x10c3da(0x1f7)]))==null?void 0x0:_0x2d1e5c[_0x10c3da(0x1fb)];_0x30c956&&this[_0x10c3da(0x1f2)]['resolveComment'](_0x9c7b7f,_0x62f4fe,_0x30c956['id'],_0x4aac9e[_0x10c3da(0x1b3)]===I[_0x10c3da(0x206)]);break;}}}));}};p=E([S(0x0,c[_0x158931(0x1c0)](b[_0x158931(0x1d2)])),S(0x1,c[_0x158931(0x1c0)](M[_0x158931(0x1c4)])),S(0x2,c[_0x158931(0x1c0)](c[_0x158931(0x1e7)])),S(0x3,c[_0x158931(0x1c0)](c['Injector']))],p);const q=_0x158931(0x1b9),D={};var A=Object[_0x158931(0x1f1)],x=(_0x90c38d,_0x39bbd3,_0x3b0582,_0x125c05)=>{const _0x2cdedc=_0x158931;for(var _0x2320f6=_0x125c05>0x1?void 0x0:_0x125c05?A(_0x39bbd3,_0x3b0582):_0x39bbd3,_0x25b688=_0x90c38d[_0x2cdedc(0x1da)]-0x1,_0xe1caa7;_0x25b688>=0x0;_0x25b688--)(_0xe1caa7=_0x90c38d[_0x25b688])&&(_0x2320f6=_0xe1caa7(_0x2320f6)||_0x2320f6);return _0x2320f6;},_=(_0x271df0,_0x4569a9)=>(_0x30eafc,_0x392d6a)=>_0x4569a9(_0x30eafc,_0x392d6a,_0x271df0);function Y(_0x16cbf5,_0x1d0aa6){const _0x53d53a=_0x158931,_0x16e58b=_0x16cbf5[_0x53d53a(0x21a)][0x0];return{..._0x1d0aa6,'id':_0x16e58b[_0x53d53a(0x1dc)],'resolved':_0x16cbf5[_0x53d53a(0x1b3)]===0x1,'dT':f(_0x16e58b[_0x53d53a(0x1c1)]),'personId':_0x16e58b['userId'],'threadId':_0x16e58b['threadId']};}function G(_0x5f297d,_0x48d27a,_0x5c5414){const _0x4037e3=_0x158931;var _0x31a287,_0x57f4c4;if(((_0x57f4c4=(_0x31a287=_0x5f297d==null?void 0x0:_0x5f297d[_0x4037e3(0x21a)])==null?void 0x0:_0x31a287[_0x4037e3(0x1da)])!=null?_0x57f4c4:0x0)>0x0){const _0x123463=(_0x3e013d,_0x25640b)=>({'id':_0x3e013d[_0x4037e3(0x1dc)],'threadId':_0x3e013d[_0x4037e3(0x1f7)],'dT':f(_0x3e013d['createTimestamp']),'personId':_0x3e013d[_0x4037e3(0x1d9)],'resolved':_0x5f297d[_0x4037e3(0x1b3)]===I[_0x4037e3(0x206)],'unitId':_0x48d27a,'subUnitId':_0x5c5414,'text':JSON[_0x4037e3(0x1eb)](_0x3e013d[_0x4037e3(0x1bc)]),'parentId':_0x25640b}),_0x5754f2=_0x123463(_0x5f297d[_0x4037e3(0x21a)][0x0]);return{..._0x5754f2,'children':_0x5f297d[_0x4037e3(0x21a)][_0x4037e3(0x1d5)](0x1)[_0x4037e3(0x22a)](_0x3044e8=>_0x123463(_0x3044e8,_0x5754f2['id']))};}return null;}let g=class{constructor(_0x3ee451,_0x542e5e,_0x1f69e9,_0x3ef7){const _0x32da29=_0x158931;this[_0x32da29(0x1c6)]=_0x3ee451,this[_0x32da29(0x20a)]=_0x542e5e,this['_sessionService']=_0x1f69e9,this[_0x32da29(0x231)]=_0x3ef7;}async[_0x158931(0x220)](_0x279f17){const _0x2c93fe=_0x158931;var _0x2196af,_0x3042df;const {parentId:_0x4b19ac,unitId:_0x4a4f58,text:_0x5bc48f,threadId:_0x21f34a}=_0x279f17,_0x3235cc=(_0x3042df=(_0x2196af=_0x5bc48f[_0x2c93fe(0x1ed)])==null?void 0x0:_0x2196af[_0x2c93fe(0x222)](_0x4e6037=>_0x4e6037[_0x2c93fe(0x21c)]===c[_0x2c93fe(0x1d0)]['COMMENT'])[_0x2c93fe(0x22a)](_0x57973f=>_0x57973f[_0x2c93fe(0x204)]))!=null?_0x3042df:[],_0x2f7b9c=JSON[_0x2c93fe(0x218)](_0x5bc48f),_0x8cd3e8=(await this[_0x2c93fe(0x214)]['requireSession'](_0x4a4f58))[_0x2c93fe(0x21d)]();if(_0x4b19ac){const _0x3022fb={'memberId':_0x8cd3e8,'unitId':_0x4a4f58,'content':_0x2f7b9c,'mention':_0x3235cc,'threadId':_0x21f34a},_0x1228f5=(await this[_0x2c93fe(0x1c6)]['post'](_0x2c93fe(0x216)+_0x4a4f58+_0x2c93fe(0x1d4),{'body':_0x3022fb}))[_0x2c93fe(0x1cc)][_0x2c93fe(0x217)];return{..._0x279f17,'id':_0x1228f5[_0x2c93fe(0x1dc)],'dT':c[_0x2c93fe(0x22e)](+_0x1228f5[_0x2c93fe(0x1c1)])[_0x2c93fe(0x201)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1228f5[_0x2c93fe(0x1d9)]};}else{const _0x4a6cf1={'memberId':_0x8cd3e8,'unitId':_0x4a4f58,'content':_0x2f7b9c,'mention':_0x3235cc},_0x3675cd=await this['_httpService'][_0x2c93fe(0x219)](_0x2c93fe(0x216)+_0x4a4f58+'/add',{'body':_0x4a6cf1});return Y(_0x3675cd[_0x2c93fe(0x1cc)]['comment'],_0x279f17);}}async[_0x158931(0x22c)](_0x38cdb0){const _0x1df6d9=_0x158931;var _0x32b87f,_0x1ab023;const {text:_0x2ca191,unitId:_0x4dff63}=_0x38cdb0,_0x312220=(_0x1ab023=(_0x32b87f=_0x2ca191[_0x1df6d9(0x1ed)])==null?void 0x0:_0x32b87f['filter'](_0x20032f=>_0x20032f['rangeType']===c[_0x1df6d9(0x1d0)][_0x1df6d9(0x1df)])[_0x1df6d9(0x22a)](_0xecc09d=>_0xecc09d[_0x1df6d9(0x204)]))!=null?_0x1ab023:[],_0x46bccc=JSON['stringify'](_0x2ca191),_0x97af81=_0x38cdb0[_0x1df6d9(0x1f7)],_0x43752f=_0x38cdb0['id'],_0x32a7c3={'memberId':(await this[_0x1df6d9(0x214)][_0x1df6d9(0x1f0)](_0x4dff63))[_0x1df6d9(0x21d)](),'unitId':_0x4dff63,'threadId':_0x97af81,'mention':_0x312220,'content':_0x46bccc,'replyId':_0x43752f},_0x41b31c=await this[_0x1df6d9(0x1c6)][_0x1df6d9(0x219)](_0x1df6d9(0x216)+_0x4dff63+_0x1df6d9(0x1c2),{'body':_0x32a7c3});return!_0x41b31c[_0x1df6d9(0x1cc)][_0x1df6d9(0x1c3)]||_0x41b31c[_0x1df6d9(0x1cc)]['error'][_0x1df6d9(0x1f3)]===0x1;}async[_0x158931(0x1fd)](_0x552a0c){const _0x1d393a=_0x158931,{unitId:_0x548338}=_0x552a0c,_0x2cfe85=_0x552a0c[_0x1d393a(0x1f7)],_0x38bfd1={'memberId':this[_0x1d393a(0x20a)][_0x1d393a(0x1e5)]()[_0x1d393a(0x229)],'unitId':_0x548338,'threadId':_0x2cfe85,'solved':_0x552a0c[_0x1d393a(0x1e8)]?I[_0x1d393a(0x206)]:I[_0x1d393a(0x1ca)]},_0xe2fc40=await this[_0x1d393a(0x1c6)]['post'](_0x1d393a(0x216)+_0x548338+_0x1d393a(0x1b7),{'body':_0x38bfd1});return!_0xe2fc40[_0x1d393a(0x1cc)]['error']||_0xe2fc40[_0x1d393a(0x1cc)][_0x1d393a(0x1c3)]['code']===0x1;}async['deleteComment'](_0x52c44a,_0x1d61e9,_0x2e5193,_0x5685bd){const _0x32868c=_0x158931,_0x2d6d4d={'memberId':(await this['_sessionService']['requireSession'](_0x52c44a))['getMemberID'](),'threadId':_0x2e5193,'replyId':_0x5685bd,'unitId':_0x52c44a},_0x294596=await this[_0x32868c(0x1c6)]['post'](_0x32868c(0x216)+_0x52c44a+'/delete',{'body':_0x2d6d4d});return!_0x294596[_0x32868c(0x1cc)][_0x32868c(0x1c3)]||_0x294596[_0x32868c(0x1cc)][_0x32868c(0x1c3)][_0x32868c(0x1f3)]===0x1;}async[_0x158931(0x213)](_0x3e973f,_0x55b0e8,_0x204538){const _0x3360ad=_0x158931,_0x5120d5={'unitId':_0x3e973f,'threadId':_0x204538},_0x32b1e4=await this[_0x3360ad(0x1c6)][_0x3360ad(0x219)](_0x3360ad(0x216)+_0x3e973f+_0x3360ad(0x215),{'body':_0x5120d5}),_0x1ffab3=_0x204538[_0x3360ad(0x22a)](_0x64e86d=>G(_0x32b1e4[_0x3360ad(0x1cc)][_0x3360ad(0x1c7)][_0x64e86d],_0x3e973f,_0x55b0e8))[_0x3360ad(0x222)](Boolean);return Object[_0x3360ad(0x1b6)](_0x32b1e4[_0x3360ad(0x1cc)]['users'])[_0x3360ad(0x1f4)](_0x33d752=>{const _0xe47e6c=_0x3360ad;this[_0xe47e6c(0x20a)]['addUser'](_0x33d752);}),_0x1ffab3;}[_0x158931(0x1fc)](_0x2aa3ac){const _0x804706=_0x158931;return{'id':_0x2aa3ac['id'],'threadId':_0x2aa3ac[_0x804706(0x1f7)],'ref':_0x2aa3ac[_0x804706(0x1d8)]};}};g=x([_(0x0,c[_0x158931(0x1c0)](P[_0x158931(0x1d7)])),_(0x1,c[_0x158931(0x1c0)](c[_0x158931(0x1e7)])),_(0x2,c[_0x158931(0x1c0)](b[_0x158931(0x205)])),_(0x3,c[_0x158931(0x1c0)](c['Injector']))],g);var H=Object[_0x158931(0x1f1)],J=(_0x513be3,_0x4223ca,_0x4d2eec,_0x3a9b44)=>{for(var _0x5dfafe=_0x3a9b44>0x1?void 0x0:_0x3a9b44?H(_0x4223ca,_0x4d2eec):_0x4223ca,_0x1fc26e=_0x513be3['length']-0x1,_0x46141f;_0x1fc26e>=0x0;_0x1fc26e--)(_0x46141f=_0x513be3[_0x1fc26e])&&(_0x5dfafe=_0x46141f(_0x5dfafe)||_0x5dfafe);return _0x5dfafe;},y=(_0x5c64f2,_0x3fa192)=>(_0x33b06c,_0x29c5e9)=>_0x3fa192(_0x33b06c,_0x29c5e9,_0x5c64f2);let C=class extends c[_0x158931(0x1bd)]{constructor(_0x56b5fb,_0x294926){const _0x17c7d8=_0x158931;super(),this[_0x17c7d8(0x1ef)]=_0x56b5fb,this[_0x17c7d8(0x209)]=_0x294926,this[_0x17c7d8(0x1fa)]();}['_initDataSource'](){const _0x41cdde=_0x158931;this[_0x41cdde(0x1ef)][_0x41cdde(0x21e)]=this['_threadCommentDataSource'],this[_0x41cdde(0x1ef)][_0x41cdde(0x1ba)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x158931(0x1c0)](g))],C);function _0x28f2(_0x23d46a,_0x4f6001){const _0x5eac43=_0x5eac();return _0x28f2=function(_0x28f244,_0x2ba7ac){_0x28f244=_0x28f244-0x1b3;let _0x1d6f0f=_0x5eac43[_0x28f244];return _0x1d6f0f;},_0x28f2(_0x23d46a,_0x4f6001);}var F=Object[_0x158931(0x207)],L=Object[_0x158931(0x1f1)],Z=(_0x1b338a,_0x45bef5,_0x35310c)=>_0x45bef5 in _0x1b338a?F(_0x1b338a,_0x45bef5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x35310c}):_0x1b338a[_0x45bef5]=_0x35310c,W=(_0x593acc,_0x3bb8bd,_0x3a7a70,_0x4f026d)=>{const _0x4cb1ec=_0x158931;for(var _0x51c1a6=_0x4f026d>0x1?void 0x0:_0x4f026d?L(_0x3bb8bd,_0x3a7a70):_0x3bb8bd,_0x1f7862=_0x593acc[_0x4cb1ec(0x1da)]-0x1,_0x554758;_0x1f7862>=0x0;_0x1f7862--)(_0x554758=_0x593acc[_0x1f7862])&&(_0x51c1a6=_0x554758(_0x51c1a6)||_0x51c1a6);return _0x51c1a6;},O=(_0x36d558,_0x1ef2fd)=>(_0x4247a8,_0x2da1b2)=>_0x1ef2fd(_0x4247a8,_0x2da1b2,_0x36d558),N=(_0x338eeb,_0x29b9f3,_0x4ce28a)=>Z(_0x338eeb,typeof _0x29b9f3!=_0x158931(0x1cf)?_0x29b9f3+'':_0x29b9f3,_0x4ce28a);exports[_0x158931(0x1d6)]=class extends c['Plugin']{constructor(_0x50616f=D,_0x53dba1,_0x590c2c){const _0x102fd6=_0x158931;super(),this['_config']=_0x50616f,this[_0x102fd6(0x231)]=_0x53dba1,this['_configService']=_0x590c2c;const {..._0x51f745}=c[_0x102fd6(0x1e6)]({},D,this[_0x102fd6(0x1d3)]);this[_0x102fd6(0x224)][_0x102fd6(0x1f5)](q,_0x51f745);}[_0x158931(0x1be)](){const _0x194f6b=_0x158931;[[g],[C],[p]][_0x194f6b(0x1f4)](_0x57a134=>{const _0x1d3779=_0x194f6b;this[_0x1d3779(0x231)][_0x1d3779(0x1c5)](_0x57a134);});}['onReady'](){const _0x2bf1ff=_0x158931;this[_0x2bf1ff(0x231)][_0x2bf1ff(0x20e)](C),this['_injector']['get'](p);}},N(exports[_0x158931(0x1d6)],_0x158931(0x20d),U),N(exports[_0x158931(0x1d6)],_0x158931(0x210),c[_0x158931(0x1ff)][_0x158931(0x21f)]),exports[_0x158931(0x1d6)]=W([c['DependentOn'](j[_0x158931(0x1e0)],b[_0x158931(0x1e3)],T[_0x158931(0x1b8)]),O(0x1,c['Inject'](c[_0x158931(0x20f)])),O(0x2,c['IConfigService'])],exports[_0x158931(0x1d6)]);
|
|
1
|
+
'use strict';const _0x35e1eb=_0x5736;(function(_0x5dc7ac,_0x4ac240){const _0x19488d=_0x5736,_0x2e976d=_0x5dc7ac();while(!![]){try{const _0x526c68=parseInt(_0x19488d(0x1b5))/0x1+parseInt(_0x19488d(0x1e2))/0x2+-parseInt(_0x19488d(0x1d7))/0x3*(parseInt(_0x19488d(0x21a))/0x4)+parseInt(_0x19488d(0x1e0))/0x5*(-parseInt(_0x19488d(0x1d2))/0x6)+-parseInt(_0x19488d(0x20d))/0x7+parseInt(_0x19488d(0x1cb))/0x8*(-parseInt(_0x19488d(0x1c1))/0x9)+parseInt(_0x19488d(0x222))/0xa*(parseInt(_0x19488d(0x204))/0xb);if(_0x526c68===_0x4ac240)break;else _0x2e976d['push'](_0x2e976d['shift']());}catch(_0x51d92c){_0x2e976d['push'](_0x2e976d['shift']());}}}(_0x5046,0xd8c10));function _0x5046(){const _0x10f8a5=['Edit','disposeWithMe','_threadCommentModel','addComment','UniverCollaborationClientPlugin','IConfigService','rxjs','threadId','531UMtQWQ','@univerjs/thread-comment-ui','content','rangeId','getUnit','updateComment','UNIVER_UNKNOWN','dayjs','toStringTag','_threadCommentDataSource','86200zPvmlc','CustomRangeType','_config','body','Module','UniverLicensePlugin','/list','318834jQeNDa','find','UniverThreadCommentDataSourcePlugin','user','size','181704xUTuXj','UniverInstanceType','Injector','HTTPService','onReady','replies','getMemberID','addUser','Delete','165gRJcoO','resolved','1250488Akqtrw','UserManagerService','@univerjs/thread-comment','CommentService','type','parse','delete','get','_userService','syncUpdateMutationToColla','userID','_sessionService','slice','unitId','pluginName','setConfig','symbol','listComments','format','length','getCurrentUser','defineProperty','createTimestamp','values','YYYY/MM/DD\x20HH:mm','map','COMMENT','requireSession','Solved','stringify','UniverThreadCommentUIPlugin','/add','customRanges','/universer-api/comment/unit/','23462857kDhAuX','CollaborationSessionService','bufferTime','users','forEach','_initUserSync','_httpService','_configService','subscribe','2739548fFjTIx','replyId','personId','userId','UNRECOGNIZED','Disposable','_initDataSource','/universer-api/user/list','_injector','solved','Reply','_commentService','code','20HykTFb','/edit','@univerjs-pro/collaboration-client','merge','_threadCommentDataSourceService','OpenOrReOpen','Unknown','error','10ASvMTM','filter','commentUpdate$','pipe','post','thread-comment-data-source.config','Solve','add','@univerjs-pro/license','getOwnPropertyDescriptor','@univerjs/core','onStarting','rangeType','Inject','Add','1213109yZwvAM','resolveComment','root','_init'];_0x5046=function(){return _0x10f8a5;};return _0x5046();}Object['defineProperty'](exports,Symbol[_0x35e1eb(0x1c9)],{'value':_0x35e1eb(0x1cf)});const b=require(_0x35e1eb(0x21c)),T=require(_0x35e1eb(0x1ae)),c=require(_0x35e1eb(0x1b0)),j=require(_0x35e1eb(0x1c2)),M=require(_0x35e1eb(0x1e4)),w=require(_0x35e1eb(0x1bf)),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x4f3bcc=>(_0x4f3bcc[_0x4f3bcc[_0x35e1eb(0x21f)]=0x0]='OpenOrReOpen',_0x4f3bcc[_0x4f3bcc[_0x35e1eb(0x1fe)]=0x1]=_0x35e1eb(0x1fe),_0x4f3bcc[_0x4f3bcc['UNRECOGNIZED']=-0x1]=_0x35e1eb(0x211),_0x4f3bcc))(I||{}),v=(_0x165961=>(_0x165961[_0x165961['Unknown']=0x0]=_0x35e1eb(0x220),_0x165961[_0x165961[_0x35e1eb(0x1b4)]=0x1]=_0x35e1eb(0x1b4),_0x165961[_0x165961[_0x35e1eb(0x217)]=0x2]=_0x35e1eb(0x217),_0x165961[_0x165961[_0x35e1eb(0x1b9)]=0x3]='Edit',_0x165961[_0x165961['Delete']=0x4]=_0x35e1eb(0x1df),_0x165961[_0x165961[_0x35e1eb(0x1ac)]=0x5]=_0x35e1eb(0x1ac),_0x165961[_0x165961[_0x35e1eb(0x211)]=-0x1]=_0x35e1eb(0x211),_0x165961))(v||{});const f=_0x37915f=>c[_0x35e1eb(0x1c8)](new Date(+_0x37915f))[_0x35e1eb(0x1f4)](_0x35e1eb(0x1fa)),R=async(_0xc128bb,_0x13bb89)=>{const _0x3432a3=_0x35e1eb,_0xc4c89b=_0xc128bb[_0x3432a3(0x1e9)](c[_0x3432a3(0x1e3)]),_0x1ce5a0=_0xc128bb[_0x3432a3(0x1e9)](P[_0x3432a3(0x1da)]);_0x13bb89['forEach'](_0x2e7fac=>{const _0x3ebd2f=_0x3432a3;_0xc4c89b['getUser'](_0x2e7fac)&&_0x13bb89[_0x3ebd2f(0x1e8)](_0x2e7fac);}),_0x13bb89[_0x3432a3(0x1d6)]&&(await _0x1ce5a0[_0x3432a3(0x1e9)](_0x3432a3(0x214),{'params':{'userIDs':[..._0x13bb89]}}))[_0x3432a3(0x1ce)][_0x3432a3(0x207)][_0x3432a3(0x208)](_0x332acf=>{const _0x1f9d1d=_0x3432a3;_0x332acf&&_0xc4c89b[_0x1f9d1d(0x1de)](_0x332acf);});};var $=Object[_0x35e1eb(0x1af)],E=(_0xe73c04,_0x4d525f,_0x4d4bcd,_0x4ecc06)=>{const _0x11d028=_0x35e1eb;for(var _0x1b3318=_0x4ecc06>0x1?void 0x0:_0x4ecc06?$(_0x4d525f,_0x4d4bcd):_0x4d525f,_0x140e2e=_0xe73c04[_0x11d028(0x1f5)]-0x1,_0x4e6a7a;_0x140e2e>=0x0;_0x140e2e--)(_0x4e6a7a=_0xe73c04[_0x140e2e])&&(_0x1b3318=_0x4e6a7a(_0x1b3318)||_0x1b3318);return _0x1b3318;},S=(_0x304e84,_0x42bdc1)=>(_0x189d24,_0x25bab5)=>_0x42bdc1(_0x189d24,_0x25bab5,_0x304e84);let p=class extends c['Disposable']{constructor(_0x2d7276,_0x2de50a,_0x477a8b,_0x38ba92){const _0xdf0361=_0x35e1eb;super(),this[_0xdf0361(0x218)]=_0x2d7276,this['_threadCommentModel']=_0x2de50a,this[_0xdf0361(0x1ea)]=_0x477a8b,this[_0xdf0361(0x215)]=_0x38ba92,this[_0xdf0361(0x1b8)](),this[_0xdf0361(0x209)]();}['_initUserSync'](){const _0x42b612=_0x35e1eb;this[_0x42b612(0x1ba)](this['_threadCommentModel'][_0x42b612(0x224)][_0x42b612(0x1a9)](w[_0x42b612(0x206)](0x10))[_0x42b612(0x20c)](_0x51e805=>{const _0x87491c=_0x42b612,_0x34d1e5=new Set();_0x51e805[_0x87491c(0x208)](_0x109329=>{const _0x5ce027=_0x87491c;switch(_0x109329[_0x5ce027(0x1e6)]){case _0x5ce027(0x1ad):{const _0x287f7f=_0x109329['payload'][_0x5ce027(0x20f)];_0x34d1e5['add'](_0x287f7f);break;}}}),R(this[_0x87491c(0x215)],_0x34d1e5);}));}[_0x35e1eb(0x1b8)](){const _0x88635f=_0x35e1eb;this[_0x88635f(0x1ba)](this[_0x88635f(0x218)][_0x88635f(0x224)][_0x88635f(0x20c)](async _0x5d0126=>{const _0x28795c=_0x88635f;var _0x33ec7f,_0x57fde7,_0x52853d,_0x283371;const _0x385d5f=(_0x33ec7f=this[_0x28795c(0x1bb)][_0x28795c(0x1c5)](_0x5d0126[_0x28795c(0x1ef)])[_0x28795c(0x1d3)](_0x583f5f=>_0x583f5f[_0x28795c(0x1c0)]===_0x5d0126[_0x28795c(0x1c0)]))==null?void 0x0:_0x33ec7f[_0x28795c(0x1b7)];if(!_0x385d5f)return;const {unitId:_0x13db76,subUnitId:_0xe28fc5}=_0x385d5f;switch(_0x5d0126['user']&&this[_0x28795c(0x1ea)]['addUser'](_0x5d0126[_0x28795c(0x1d5)]),_0x5d0126['type']){case v[_0x28795c(0x1b4)]:break;case v[_0x28795c(0x217)]:{this[_0x28795c(0x1bb)][_0x28795c(0x1bc)](_0x13db76,_0xe28fc5,{'unitId':_0x13db76,'subUnitId':_0xe28fc5,'ref':'','id':_0x5d0126[_0x28795c(0x20e)],'dT':f(+_0x5d0126[_0x28795c(0x1f8)]),'threadId':_0x5d0126[_0x28795c(0x1c0)],'personId':(_0x52853d=(_0x57fde7=_0x5d0126['user'])==null?void 0x0:_0x57fde7['userID'])!=null?_0x52853d:_0x5d0126['userId'],'text':JSON[_0x28795c(0x1e7)](_0x5d0126[_0x28795c(0x1c3)]),'parentId':_0x385d5f['id']});break;}case v[_0x28795c(0x1df)]:{const _0x27786d=this[_0x28795c(0x1bb)]['getComment'](_0x13db76,_0xe28fc5,_0x5d0126[_0x28795c(0x20e)]);_0x27786d&&_0x27786d['parentId']&&this[_0x28795c(0x1bb)]['deleteComment'](_0x13db76,_0xe28fc5,_0x5d0126[_0x28795c(0x20e)]);break;}case v[_0x28795c(0x1b9)]:{this['_threadCommentModel'][_0x28795c(0x1c6)](_0x13db76,_0xe28fc5,{'commentId':_0x5d0126[_0x28795c(0x20e)],'text':JSON[_0x28795c(0x1e7)](_0x5d0126[_0x28795c(0x1c3)])});break;}case v['Solve']:{const _0x57721d=(_0x283371=this[_0x28795c(0x1bb)]['getUnit'](_0x5d0126[_0x28795c(0x1ef)])[_0x28795c(0x1d3)](_0x36b693=>_0x36b693[_0x28795c(0x1c0)]===_0x5d0126['threadId']))==null?void 0x0:_0x283371[_0x28795c(0x1b7)];_0x57721d&&this[_0x28795c(0x1bb)][_0x28795c(0x1b6)](_0x13db76,_0xe28fc5,_0x57721d['id'],_0x5d0126[_0x28795c(0x216)]===I[_0x28795c(0x1fe)]);break;}}}));}};p=E([S(0x0,c[_0x35e1eb(0x1b3)](b[_0x35e1eb(0x1e5)])),S(0x1,c[_0x35e1eb(0x1b3)](M['ThreadCommentModel'])),S(0x2,c[_0x35e1eb(0x1b3)](c[_0x35e1eb(0x1e3)])),S(0x3,c[_0x35e1eb(0x1b3)](c[_0x35e1eb(0x1d9)]))],p);const q=_0x35e1eb(0x1ab),D={};var A=Object[_0x35e1eb(0x1af)],x=(_0x4b1d79,_0x423d88,_0x20efa0,_0x410955)=>{const _0x5595fb=_0x35e1eb;for(var _0x5933b6=_0x410955>0x1?void 0x0:_0x410955?A(_0x423d88,_0x20efa0):_0x423d88,_0x3966f1=_0x4b1d79[_0x5595fb(0x1f5)]-0x1,_0x42fc31;_0x3966f1>=0x0;_0x3966f1--)(_0x42fc31=_0x4b1d79[_0x3966f1])&&(_0x5933b6=_0x42fc31(_0x5933b6)||_0x5933b6);return _0x5933b6;},_=(_0x481e7c,_0x42e483)=>(_0x20527c,_0x33c48c)=>_0x42e483(_0x20527c,_0x33c48c,_0x481e7c);function Y(_0x4818d9,_0x40df53){const _0x375bb5=_0x35e1eb,_0x145604=_0x4818d9[_0x375bb5(0x1dc)][0x0];return{..._0x40df53,'id':_0x145604[_0x375bb5(0x20e)],'resolved':_0x4818d9[_0x375bb5(0x216)]===0x1,'dT':f(_0x145604['createTimestamp']),'personId':_0x145604['userId'],'threadId':_0x145604['threadId']};}function _0x5736(_0xe558e6,_0x2be086){const _0x5046b9=_0x5046();return _0x5736=function(_0x57368a,_0x40b533){_0x57368a=_0x57368a-0x1a9;let _0xa422f7=_0x5046b9[_0x57368a];return _0xa422f7;},_0x5736(_0xe558e6,_0x2be086);}function G(_0x189228,_0xd25bf3,_0x5b57c7){const _0x36526f=_0x35e1eb;var _0x2d4082,_0x324eda;if(((_0x324eda=(_0x2d4082=_0x189228==null?void 0x0:_0x189228[_0x36526f(0x1dc)])==null?void 0x0:_0x2d4082['length'])!=null?_0x324eda:0x0)>0x0){const _0x393485=(_0x1c5a99,_0x16d93d)=>({'id':_0x1c5a99[_0x36526f(0x20e)],'threadId':_0x1c5a99[_0x36526f(0x1c0)],'dT':f(_0x1c5a99['createTimestamp']),'personId':_0x1c5a99[_0x36526f(0x210)],'resolved':_0x189228[_0x36526f(0x216)]===I[_0x36526f(0x1fe)],'unitId':_0xd25bf3,'subUnitId':_0x5b57c7,'text':JSON[_0x36526f(0x1e7)](_0x1c5a99[_0x36526f(0x1c3)]),'parentId':_0x16d93d}),_0x2d45ab=_0x393485(_0x189228[_0x36526f(0x1dc)][0x0]);return{..._0x2d45ab,'children':_0x189228[_0x36526f(0x1dc)][_0x36526f(0x1ee)](0x1)['map'](_0x4efdc8=>_0x393485(_0x4efdc8,_0x2d45ab['id']))};}return null;}let g=class{constructor(_0x5e620f,_0xb52abc,_0x52b318,_0xaf19d6){const _0x224ede=_0x35e1eb;this[_0x224ede(0x20a)]=_0x5e620f,this['_userService']=_0xb52abc,this[_0x224ede(0x1ed)]=_0x52b318,this['_injector']=_0xaf19d6;}async[_0x35e1eb(0x1bc)](_0x45e7a2){const _0x3f6525=_0x35e1eb;var _0xfc67b8,_0x2565b6;const {parentId:_0x53fac4,unitId:_0x3e9f6e,text:_0x5137cd,threadId:_0x30c241}=_0x45e7a2,_0x447c85=(_0x2565b6=(_0xfc67b8=_0x5137cd[_0x3f6525(0x202)])==null?void 0x0:_0xfc67b8[_0x3f6525(0x223)](_0x527a88=>_0x527a88[_0x3f6525(0x1b2)]===c[_0x3f6525(0x1cc)][_0x3f6525(0x1fc)])[_0x3f6525(0x1fb)](_0x216826=>_0x216826[_0x3f6525(0x1c4)]))!=null?_0x2565b6:[],_0x206b8e=JSON[_0x3f6525(0x1ff)](_0x5137cd),_0x4d4164=(await this[_0x3f6525(0x1ed)]['requireSession'](_0x3e9f6e))[_0x3f6525(0x1dd)]();if(_0x53fac4){const _0x273344={'memberId':_0x4d4164,'unitId':_0x3e9f6e,'content':_0x206b8e,'mention':_0x447c85,'threadId':_0x30c241},_0x5c9d62=(await this['_httpService'][_0x3f6525(0x1aa)](_0x3f6525(0x203)+_0x3e9f6e+'/reply',{'body':_0x273344}))[_0x3f6525(0x1ce)]['reply'];return{..._0x45e7a2,'id':_0x5c9d62[_0x3f6525(0x20e)],'dT':c['dayjs'](+_0x5c9d62[_0x3f6525(0x1f8)])[_0x3f6525(0x1f4)](_0x3f6525(0x1fa)),'personId':_0x5c9d62[_0x3f6525(0x210)]};}else{const _0x5a6903={'memberId':_0x4d4164,'unitId':_0x3e9f6e,'content':_0x206b8e,'mention':_0x447c85},_0x2ea5d6=await this[_0x3f6525(0x20a)]['post']('/universer-api/comment/unit/'+_0x3e9f6e+_0x3f6525(0x201),{'body':_0x5a6903});return Y(_0x2ea5d6[_0x3f6525(0x1ce)]['comment'],_0x45e7a2);}}async['updateComment'](_0x58c5d8){const _0x47e37e=_0x35e1eb;var _0xc9882,_0x3a3dc6;const {text:_0x34e90b,unitId:_0x2af8da}=_0x58c5d8,_0x14b918=(_0x3a3dc6=(_0xc9882=_0x34e90b[_0x47e37e(0x202)])==null?void 0x0:_0xc9882[_0x47e37e(0x223)](_0x14bd37=>_0x14bd37['rangeType']===c['CustomRangeType'][_0x47e37e(0x1fc)])['map'](_0x5e0a2c=>_0x5e0a2c['rangeId']))!=null?_0x3a3dc6:[],_0x3ab1b2=JSON['stringify'](_0x34e90b),_0x2bb5d3=_0x58c5d8[_0x47e37e(0x1c0)],_0x289449=_0x58c5d8['id'],_0x172873={'memberId':(await this[_0x47e37e(0x1ed)]['requireSession'](_0x2af8da))[_0x47e37e(0x1dd)](),'unitId':_0x2af8da,'threadId':_0x2bb5d3,'mention':_0x14b918,'content':_0x3ab1b2,'replyId':_0x289449},_0xaf660e=await this['_httpService'][_0x47e37e(0x1aa)](_0x47e37e(0x203)+_0x2af8da+_0x47e37e(0x21b),{'body':_0x172873});return!_0xaf660e[_0x47e37e(0x1ce)][_0x47e37e(0x221)]||_0xaf660e[_0x47e37e(0x1ce)]['error'][_0x47e37e(0x219)]===0x1;}async[_0x35e1eb(0x1b6)](_0x15978c){const _0x540a22=_0x35e1eb,{unitId:_0x43eb27}=_0x15978c,_0xb07047=_0x15978c[_0x540a22(0x1c0)],_0x3f8115={'memberId':this[_0x540a22(0x1ea)][_0x540a22(0x1f6)]()[_0x540a22(0x1ec)],'unitId':_0x43eb27,'threadId':_0xb07047,'solved':_0x15978c[_0x540a22(0x1e1)]?I[_0x540a22(0x1fe)]:I['OpenOrReOpen']},_0x50e518=await this[_0x540a22(0x20a)][_0x540a22(0x1aa)]('/universer-api/comment/unit/'+_0x43eb27+'/solved',{'body':_0x3f8115});return!_0x50e518[_0x540a22(0x1ce)][_0x540a22(0x221)]||_0x50e518['body'][_0x540a22(0x221)][_0x540a22(0x219)]===0x1;}async['deleteComment'](_0x353ad8,_0x35ad3e,_0x6e747,_0x64bb12){const _0x424a6c=_0x35e1eb,_0x356759={'memberId':(await this[_0x424a6c(0x1ed)][_0x424a6c(0x1fd)](_0x353ad8))[_0x424a6c(0x1dd)](),'threadId':_0x6e747,'replyId':_0x64bb12,'unitId':_0x353ad8},_0x3d2f2d=await this[_0x424a6c(0x20a)]['post'](_0x424a6c(0x203)+_0x353ad8+'/delete',{'body':_0x356759});return!_0x3d2f2d[_0x424a6c(0x1ce)][_0x424a6c(0x221)]||_0x3d2f2d['body'][_0x424a6c(0x221)][_0x424a6c(0x219)]===0x1;}async[_0x35e1eb(0x1f3)](_0x3fe6c5,_0xab3b24,_0x45578d){const _0x23b4c0=_0x35e1eb,_0x3e80a2={'unitId':_0x3fe6c5,'threadId':_0x45578d},_0x468d9d=await this[_0x23b4c0(0x20a)]['post'](_0x23b4c0(0x203)+_0x3fe6c5+_0x23b4c0(0x1d1),{'body':_0x3e80a2}),_0x3c0fbe=_0x45578d[_0x23b4c0(0x1fb)](_0x2dd00d=>G(_0x468d9d['body']['comments'][_0x2dd00d],_0x3fe6c5,_0xab3b24))[_0x23b4c0(0x223)](Boolean);return Object[_0x23b4c0(0x1f9)](_0x468d9d[_0x23b4c0(0x1ce)][_0x23b4c0(0x207)])[_0x23b4c0(0x208)](_0x1c9bae=>{const _0x14e259=_0x23b4c0;this[_0x14e259(0x1ea)][_0x14e259(0x1de)](_0x1c9bae);}),_0x3c0fbe;}['saveCommentToSnapshot'](_0x3764e1){const _0x385934=_0x35e1eb;return{'id':_0x3764e1['id'],'threadId':_0x3764e1[_0x385934(0x1c0)],'ref':_0x3764e1['ref']};}};g=x([_(0x0,c['Inject'](P[_0x35e1eb(0x1da)])),_(0x1,c[_0x35e1eb(0x1b3)](c[_0x35e1eb(0x1e3)])),_(0x2,c[_0x35e1eb(0x1b3)](b[_0x35e1eb(0x205)])),_(0x3,c[_0x35e1eb(0x1b3)](c[_0x35e1eb(0x1d9)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0xeb86ed,_0x362e5e,_0x18a204,_0x215802)=>{const _0x477612=_0x35e1eb;for(var _0x34bad4=_0x215802>0x1?void 0x0:_0x215802?H(_0x362e5e,_0x18a204):_0x362e5e,_0x38a719=_0xeb86ed[_0x477612(0x1f5)]-0x1,_0x4718f9;_0x38a719>=0x0;_0x38a719--)(_0x4718f9=_0xeb86ed[_0x38a719])&&(_0x34bad4=_0x4718f9(_0x34bad4)||_0x34bad4);return _0x34bad4;},y=(_0x2767ba,_0x43f5fb)=>(_0x3f1147,_0x5eef15)=>_0x43f5fb(_0x3f1147,_0x5eef15,_0x2767ba);let C=class extends c[_0x35e1eb(0x212)]{constructor(_0x451958,_0x54cd37){const _0x2e0641=_0x35e1eb;super(),this[_0x2e0641(0x21e)]=_0x451958,this[_0x2e0641(0x1ca)]=_0x54cd37,this[_0x2e0641(0x213)]();}['_initDataSource'](){const _0x3da379=_0x35e1eb;this[_0x3da379(0x21e)]['dataSource']=this[_0x3da379(0x1ca)],this[_0x3da379(0x21e)][_0x3da379(0x1eb)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x35e1eb(0x1b3)](g))],C);var F=Object[_0x35e1eb(0x1f7)],L=Object['getOwnPropertyDescriptor'],Z=(_0x5a6d04,_0x19b0e9,_0x8c0d9d)=>_0x19b0e9 in _0x5a6d04?F(_0x5a6d04,_0x19b0e9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x8c0d9d}):_0x5a6d04[_0x19b0e9]=_0x8c0d9d,W=(_0x53ef3c,_0x52f358,_0x3bc9cf,_0xb85674)=>{const _0x56b8fd=_0x35e1eb;for(var _0x3a7da7=_0xb85674>0x1?void 0x0:_0xb85674?L(_0x52f358,_0x3bc9cf):_0x52f358,_0x2da7c3=_0x53ef3c[_0x56b8fd(0x1f5)]-0x1,_0x1e5b64;_0x2da7c3>=0x0;_0x2da7c3--)(_0x1e5b64=_0x53ef3c[_0x2da7c3])&&(_0x3a7da7=_0x1e5b64(_0x3a7da7)||_0x3a7da7);return _0x3a7da7;},O=(_0x329119,_0x130388)=>(_0x53fdd1,_0x583843)=>_0x130388(_0x53fdd1,_0x583843,_0x329119),N=(_0x599595,_0xbb0f27,_0x2b81e5)=>Z(_0x599595,typeof _0xbb0f27!=_0x35e1eb(0x1f2)?_0xbb0f27+'':_0xbb0f27,_0x2b81e5);exports[_0x35e1eb(0x1d4)]=class extends c['Plugin']{constructor(_0x312a43=D,_0x31d7fb,_0x38a85d){const _0x560b6e=_0x35e1eb;super(),this[_0x560b6e(0x1cd)]=_0x312a43,this[_0x560b6e(0x215)]=_0x31d7fb,this['_configService']=_0x38a85d;const {..._0x43e069}=c[_0x560b6e(0x21d)]({},D,this['_config']);this[_0x560b6e(0x20b)][_0x560b6e(0x1f1)](q,_0x43e069);}[_0x35e1eb(0x1b1)](){[[g],[C],[p]]['forEach'](_0x3dfc46=>{this['_injector']['add'](_0x3dfc46);});}[_0x35e1eb(0x1db)](){const _0x16ee8a=_0x35e1eb;this[_0x16ee8a(0x215)][_0x16ee8a(0x1e9)](C),this[_0x16ee8a(0x215)]['get'](p);}},N(exports[_0x35e1eb(0x1d4)],_0x35e1eb(0x1f0),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x35e1eb(0x1e6),c[_0x35e1eb(0x1d8)][_0x35e1eb(0x1c7)]),exports[_0x35e1eb(0x1d4)]=W([c['DependentOn'](j[_0x35e1eb(0x200)],b[_0x35e1eb(0x1bd)],T[_0x35e1eb(0x1d0)]),O(0x1,c[_0x35e1eb(0x1b3)](c[_0x35e1eb(0x1d9)])),O(0x2,c[_0x35e1eb(0x1be)])],exports[_0x35e1eb(0x1d4)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x1735(_0x778d9a,_0x1c306c){const _0x23e795=_0x23e7();return _0x1735=function(_0x173590,_0x359c10){_0x173590=_0x173590-0x14e;let _0xa0a074=_0x23e795[_0x173590];return _0xa0a074;},_0x1735(_0x778d9a,_0x1c306c);}const _0x116374=_0x1735;(function(_0x26eb43,_0x3f69dd){const _0x5b2552=_0x1735,_0x515c47=_0x26eb43();while(!![]){try{const _0x148429=-parseInt(_0x5b2552(0x1a9))/0x1*(parseInt(_0x5b2552(0x15b))/0x2)+parseInt(_0x5b2552(0x180))/0x3+-parseInt(_0x5b2552(0x1a4))/0x4+-parseInt(_0x5b2552(0x190))/0x5*(parseInt(_0x5b2552(0x162))/0x6)+-parseInt(_0x5b2552(0x1a3))/0x7+parseInt(_0x5b2552(0x174))/0x8*(parseInt(_0x5b2552(0x150))/0x9)+parseInt(_0x5b2552(0x19d))/0xa;if(_0x148429===_0x3f69dd)break;else _0x515c47['push'](_0x515c47['shift']());}catch(_0x11ab6b){_0x515c47['push'](_0x515c47['shift']());}}}(_0x23e7,0x76571));import{CommentService as _0x2aeaf0,CollaborationSessionService as _0x3affa4,UniverCollaborationClientPlugin as _0x30e333}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x187856}from'@univerjs-pro/license';import{dayjs as _0x35302d,UserManagerService as _0x3dd59f,Inject as _0x2edfc9,Injector as _0x348e3e,Disposable as _0x5700d0,CustomRangeType as _0x56b39f,UniverInstanceType as _0x2b4fac,DependentOn as _0x50dc84,IConfigService as _0x136480,Plugin as _0x11dac9,merge as _0x150f9d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x19c732}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xf188f2,IThreadCommentDataSourceService as _0x6d41c1}from'@univerjs/thread-comment';import{bufferTime as _0x175c95}from'rxjs';import{HTTPService as _0x53d244}from'@univerjs/network';const W=_0x116374(0x179);var I=(_0x48e472=>(_0x48e472[_0x48e472[_0x116374(0x18a)]=0x0]=_0x116374(0x18a),_0x48e472[_0x48e472[_0x116374(0x175)]=0x1]=_0x116374(0x175),_0x48e472[_0x48e472[_0x116374(0x193)]=-0x1]=_0x116374(0x193),_0x48e472))(I||{}),v=(_0x50b41f=>(_0x50b41f[_0x50b41f['Unknown']=0x0]='Unknown',_0x50b41f[_0x50b41f[_0x116374(0x187)]=0x1]='Add',_0x50b41f[_0x50b41f['Reply']=0x2]=_0x116374(0x195),_0x50b41f[_0x50b41f[_0x116374(0x160)]=0x3]=_0x116374(0x160),_0x50b41f[_0x50b41f[_0x116374(0x18d)]=0x4]='Delete',_0x50b41f[_0x50b41f[_0x116374(0x1a0)]=0x5]=_0x116374(0x1a0),_0x50b41f[_0x50b41f['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x50b41f))(v||{});const D=_0x34c161=>_0x35302d(new Date(+_0x34c161))[_0x116374(0x199)](_0x116374(0x14e)),B=async(_0x40db99,_0x475f0b)=>{const _0xf8b387=_0x116374,_0x270f7a=_0x40db99[_0xf8b387(0x15c)](_0x3dd59f),_0x2f80de=_0x40db99[_0xf8b387(0x15c)](_0x53d244);_0x475f0b[_0xf8b387(0x1ac)](_0x3e35ee=>{const _0x439cec=_0xf8b387;_0x270f7a[_0x439cec(0x1a5)](_0x3e35ee)&&_0x475f0b[_0x439cec(0x1ae)](_0x3e35ee);}),_0x475f0b[_0xf8b387(0x18c)]&&(await _0x2f80de[_0xf8b387(0x15c)](_0xf8b387(0x194),{'params':{'userIDs':[..._0x475f0b]}}))['body']['users'][_0xf8b387(0x1ac)](_0x4a69a5=>{const _0xa2bc8=_0xf8b387;_0x4a69a5&&_0x270f7a[_0xa2bc8(0x17b)](_0x4a69a5);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x13929a,_0x506617,_0x412337,_0x231677)=>{const _0x1bd7d2=_0x116374;for(var _0x46b080=_0x231677>0x1?void 0x0:_0x231677?K(_0x506617,_0x412337):_0x506617,_0x32c7ca=_0x13929a[_0x1bd7d2(0x197)]-0x1,_0x4e0438;_0x32c7ca>=0x0;_0x32c7ca--)(_0x4e0438=_0x13929a[_0x32c7ca])&&(_0x46b080=_0x4e0438(_0x46b080)||_0x46b080);return _0x46b080;},p=(_0x1b22dc,_0x519dff)=>(_0xde4d01,_0x5b223b)=>_0x519dff(_0xde4d01,_0x5b223b,_0x1b22dc);let S=class extends _0x5700d0{constructor(_0x1c00a7,_0x2b10ec,_0x145751,_0x3d6de2){const _0x2754fa=_0x116374;super(),this['_commentService']=_0x1c00a7,this[_0x2754fa(0x188)]=_0x2b10ec,this[_0x2754fa(0x17f)]=_0x145751,this[_0x2754fa(0x17e)]=_0x3d6de2,this[_0x2754fa(0x1ad)](),this[_0x2754fa(0x171)]();}[_0x116374(0x171)](){const _0x5c2dce=_0x116374;this[_0x5c2dce(0x14f)](this[_0x5c2dce(0x188)][_0x5c2dce(0x17c)][_0x5c2dce(0x17a)](_0x175c95(0x10))[_0x5c2dce(0x177)](_0x3d117b=>{const _0x2fb3fe=_0x5c2dce,_0xdbd7db=new Set();_0x3d117b[_0x2fb3fe(0x1ac)](_0x1f1c71=>{const _0x3afc58=_0x2fb3fe;switch(_0x1f1c71[_0x3afc58(0x19f)]){case _0x3afc58(0x17d):{const _0x381b08=_0x1f1c71[_0x3afc58(0x15f)]['personId'];_0xdbd7db[_0x3afc58(0x17d)](_0x381b08);break;}}}),B(this[_0x2fb3fe(0x17e)],_0xdbd7db);}));}[_0x116374(0x1ad)](){const _0x103284=_0x116374;this[_0x103284(0x14f)](this['_commentService']['commentUpdate$'][_0x103284(0x177)](async _0x8cd26f=>{const _0x1bdeac=_0x103284;var _0x572d65,_0x200475,_0x3bf3b8,_0x81f1d4;const _0x5e8e58=(_0x572d65=this[_0x1bdeac(0x188)][_0x1bdeac(0x1a7)](_0x8cd26f[_0x1bdeac(0x1a1)])[_0x1bdeac(0x196)](_0x34a130=>_0x34a130[_0x1bdeac(0x15e)]===_0x8cd26f[_0x1bdeac(0x15e)]))==null?void 0x0:_0x572d65[_0x1bdeac(0x198)];if(!_0x5e8e58)return;const {unitId:_0x15f5f1,subUnitId:_0x2745ed}=_0x5e8e58;switch(_0x8cd26f['user']&&this['_userService'][_0x1bdeac(0x17b)](_0x8cd26f[_0x1bdeac(0x15d)]),_0x8cd26f['type']){case v['Add']:break;case v[_0x1bdeac(0x195)]:{this[_0x1bdeac(0x188)][_0x1bdeac(0x1aa)](_0x15f5f1,_0x2745ed,{'unitId':_0x15f5f1,'subUnitId':_0x2745ed,'ref':'','id':_0x8cd26f[_0x1bdeac(0x16b)],'dT':D(+_0x8cd26f[_0x1bdeac(0x181)]),'threadId':_0x8cd26f[_0x1bdeac(0x15e)],'personId':(_0x3bf3b8=(_0x200475=_0x8cd26f[_0x1bdeac(0x15d)])==null?void 0x0:_0x200475[_0x1bdeac(0x155)])!=null?_0x3bf3b8:_0x8cd26f[_0x1bdeac(0x1a8)],'text':JSON[_0x1bdeac(0x166)](_0x8cd26f[_0x1bdeac(0x186)]),'parentId':_0x5e8e58['id']});break;}case v[_0x1bdeac(0x18d)]:{const _0x4e6d88=this['_threadCommentModel'][_0x1bdeac(0x1af)](_0x15f5f1,_0x2745ed,_0x8cd26f[_0x1bdeac(0x16b)]);_0x4e6d88&&_0x4e6d88[_0x1bdeac(0x16e)]&&this[_0x1bdeac(0x188)][_0x1bdeac(0x18b)](_0x15f5f1,_0x2745ed,_0x8cd26f['replyId']);break;}case v[_0x1bdeac(0x160)]:{this['_threadCommentModel'][_0x1bdeac(0x151)](_0x15f5f1,_0x2745ed,{'commentId':_0x8cd26f['replyId'],'text':JSON[_0x1bdeac(0x166)](_0x8cd26f['content'])});break;}case v[_0x1bdeac(0x1a0)]:{const _0x201a48=(_0x81f1d4=this[_0x1bdeac(0x188)]['getUnit'](_0x8cd26f[_0x1bdeac(0x1a1)])['find'](_0x8af8ef=>_0x8af8ef[_0x1bdeac(0x15e)]===_0x8cd26f[_0x1bdeac(0x15e)]))==null?void 0x0:_0x81f1d4[_0x1bdeac(0x198)];_0x201a48&&this[_0x1bdeac(0x188)][_0x1bdeac(0x169)](_0x15f5f1,_0x2745ed,_0x201a48['id'],_0x8cd26f[_0x1bdeac(0x167)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x2edfc9(_0x2aeaf0)),p(0x1,_0x2edfc9(_0xf188f2)),p(0x2,_0x2edfc9(_0x3dd59f)),p(0x3,_0x2edfc9(_0x348e3e))],S);const z=_0x116374(0x1a6),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x2cad97,_0x6f6385,_0x150dce,_0x23857a)=>{for(var _0x1dbb96=_0x23857a>0x1?void 0x0:_0x23857a?k(_0x6f6385,_0x150dce):_0x6f6385,_0x17df6d=_0x2cad97['length']-0x1,_0xa4edc2;_0x17df6d>=0x0;_0x17df6d--)(_0xa4edc2=_0x2cad97[_0x17df6d])&&(_0x1dbb96=_0xa4edc2(_0x1dbb96)||_0x1dbb96);return _0x1dbb96;},_=(_0x5c6a68,_0x1d25d1)=>(_0x81adca,_0x3f0690)=>_0x1d25d1(_0x81adca,_0x3f0690,_0x5c6a68);function X(_0x707c11,_0x16def3){const _0x488570=_0x116374,_0x4f717f=_0x707c11[_0x488570(0x19e)][0x0];return{..._0x16def3,'id':_0x4f717f[_0x488570(0x16b)],'resolved':_0x707c11[_0x488570(0x167)]===0x1,'dT':D(_0x4f717f[_0x488570(0x181)]),'personId':_0x4f717f[_0x488570(0x1a8)],'threadId':_0x4f717f[_0x488570(0x15e)]};}function ee(_0x4bfacf,_0x203f22,_0x49d656){const _0x23943a=_0x116374;var _0x3927f5,_0x4e01bf;if(((_0x4e01bf=(_0x3927f5=_0x4bfacf==null?void 0x0:_0x4bfacf[_0x23943a(0x19e)])==null?void 0x0:_0x3927f5[_0x23943a(0x197)])!=null?_0x4e01bf:0x0)>0x0){const _0x1355d0=(_0x320949,_0x501c56)=>({'id':_0x320949[_0x23943a(0x16b)],'threadId':_0x320949[_0x23943a(0x15e)],'dT':D(_0x320949[_0x23943a(0x181)]),'personId':_0x320949[_0x23943a(0x1a8)],'resolved':_0x4bfacf[_0x23943a(0x167)]===I['Solved'],'unitId':_0x203f22,'subUnitId':_0x49d656,'text':JSON[_0x23943a(0x166)](_0x320949[_0x23943a(0x186)]),'parentId':_0x501c56}),_0x5ad73a=_0x1355d0(_0x4bfacf['replies'][0x0]);return{..._0x5ad73a,'children':_0x4bfacf['replies']['slice'](0x1)[_0x23943a(0x159)](_0x5c24d1=>_0x1355d0(_0x5c24d1,_0x5ad73a['id']))};}return null;}let f=class{constructor(_0x20d50f,_0x21b918,_0x469c96,_0x1347cd){const _0x14282a=_0x116374;this[_0x14282a(0x1b0)]=_0x20d50f,this['_userService']=_0x21b918,this[_0x14282a(0x176)]=_0x469c96,this[_0x14282a(0x17e)]=_0x1347cd;}async[_0x116374(0x1aa)](_0x1739a1){const _0x324369=_0x116374;var _0x1434cd,_0x3ba30b;const {parentId:_0x283db9,unitId:_0x422fb3,text:_0x448c94,threadId:_0x3c0bae}=_0x1739a1,_0x30f165=(_0x3ba30b=(_0x1434cd=_0x448c94[_0x324369(0x16d)])==null?void 0x0:_0x1434cd['filter'](_0x5e21d4=>_0x5e21d4[_0x324369(0x172)]===_0x56b39f[_0x324369(0x16c)])[_0x324369(0x159)](_0x271869=>_0x271869[_0x324369(0x1ab)]))!=null?_0x3ba30b:[],_0xa817c3=JSON[_0x324369(0x170)](_0x448c94),_0x57a03d=(await this[_0x324369(0x176)][_0x324369(0x158)](_0x422fb3))[_0x324369(0x189)]();if(_0x283db9){const _0x365756={'memberId':_0x57a03d,'unitId':_0x422fb3,'content':_0xa817c3,'mention':_0x30f165,'threadId':_0x3c0bae},_0x6257be=(await this[_0x324369(0x1b0)][_0x324369(0x183)](_0x324369(0x182)+_0x422fb3+'/reply',{'body':_0x365756}))[_0x324369(0x154)][_0x324369(0x18f)];return{..._0x1739a1,'id':_0x6257be[_0x324369(0x16b)],'dT':_0x35302d(+_0x6257be[_0x324369(0x181)])[_0x324369(0x199)](_0x324369(0x14e)),'personId':_0x6257be[_0x324369(0x1a8)]};}else{const _0x4d8812={'memberId':_0x57a03d,'unitId':_0x422fb3,'content':_0xa817c3,'mention':_0x30f165},_0x2cdfed=await this[_0x324369(0x1b0)][_0x324369(0x183)](_0x324369(0x182)+_0x422fb3+'/add',{'body':_0x4d8812});return X(_0x2cdfed['body'][_0x324369(0x15a)],_0x1739a1);}}async[_0x116374(0x151)](_0x23ac2e){const _0x30f721=_0x116374;var _0x509e8d,_0x471e59;const {text:_0x468c62,unitId:_0x3650dd}=_0x23ac2e,_0xe4063d=(_0x471e59=(_0x509e8d=_0x468c62['customRanges'])==null?void 0x0:_0x509e8d['filter'](_0x2111af=>_0x2111af['rangeType']===_0x56b39f[_0x30f721(0x16c)])['map'](_0x54583a=>_0x54583a[_0x30f721(0x1ab)]))!=null?_0x471e59:[],_0x2b6678=JSON[_0x30f721(0x170)](_0x468c62),_0x5342b8=_0x23ac2e['threadId'],_0x2bb4f1=_0x23ac2e['id'],_0x2cc32c={'memberId':(await this['_sessionService']['requireSession'](_0x3650dd))[_0x30f721(0x189)](),'unitId':_0x3650dd,'threadId':_0x5342b8,'mention':_0xe4063d,'content':_0x2b6678,'replyId':_0x2bb4f1},_0x45e27a=await this[_0x30f721(0x1b0)][_0x30f721(0x183)](_0x30f721(0x182)+_0x3650dd+_0x30f721(0x185),{'body':_0x2cc32c});return!_0x45e27a[_0x30f721(0x154)]['error']||_0x45e27a[_0x30f721(0x154)][_0x30f721(0x157)][_0x30f721(0x16f)]===0x1;}async[_0x116374(0x169)](_0x122aef){const _0x135b1f=_0x116374,{unitId:_0x5f274b}=_0x122aef,_0x1a9a1b=_0x122aef[_0x135b1f(0x15e)],_0x3d4bee={'memberId':this['_userService'][_0x135b1f(0x1a2)]()['userID'],'unitId':_0x5f274b,'threadId':_0x1a9a1b,'solved':_0x122aef[_0x135b1f(0x153)]?I[_0x135b1f(0x175)]:I[_0x135b1f(0x18a)]},_0xe08d89=await this['_httpService'][_0x135b1f(0x183)](_0x135b1f(0x182)+_0x5f274b+_0x135b1f(0x19a),{'body':_0x3d4bee});return!_0xe08d89[_0x135b1f(0x154)][_0x135b1f(0x157)]||_0xe08d89[_0x135b1f(0x154)][_0x135b1f(0x157)][_0x135b1f(0x16f)]===0x1;}async[_0x116374(0x18b)](_0x4c52d9,_0x593095,_0x7a0b28,_0x25c531){const _0x146f79=_0x116374,_0x1a18e9={'memberId':(await this[_0x146f79(0x176)][_0x146f79(0x158)](_0x4c52d9))[_0x146f79(0x189)](),'threadId':_0x7a0b28,'replyId':_0x25c531,'unitId':_0x4c52d9},_0x3bc7ee=await this['_httpService'][_0x146f79(0x183)](_0x146f79(0x182)+_0x4c52d9+_0x146f79(0x19b),{'body':_0x1a18e9});return!_0x3bc7ee[_0x146f79(0x154)][_0x146f79(0x157)]||_0x3bc7ee[_0x146f79(0x154)][_0x146f79(0x157)][_0x146f79(0x16f)]===0x1;}async['listComments'](_0x32b5ff,_0xca5af3,_0x5318a4){const _0x2379e5=_0x116374,_0x4be2ef={'unitId':_0x32b5ff,'threadId':_0x5318a4},_0x106ecf=await this[_0x2379e5(0x1b0)][_0x2379e5(0x183)]('/universer-api/comment/unit/'+_0x32b5ff+_0x2379e5(0x152),{'body':_0x4be2ef}),_0x16bb9a=_0x5318a4['map'](_0x1014a3=>ee(_0x106ecf[_0x2379e5(0x154)][_0x2379e5(0x173)][_0x1014a3],_0x32b5ff,_0xca5af3))['filter'](Boolean);return Object['values'](_0x106ecf[_0x2379e5(0x154)][_0x2379e5(0x16a)])[_0x2379e5(0x1ac)](_0x5b09d5=>{const _0x443159=_0x2379e5;this[_0x443159(0x17f)]['addUser'](_0x5b09d5);}),_0x16bb9a;}[_0x116374(0x19c)](_0x215c21){const _0x179729=_0x116374;return{'id':_0x215c21['id'],'threadId':_0x215c21[_0x179729(0x15e)],'ref':_0x215c21[_0x179729(0x164)]};}};f=Q([_(0x0,_0x2edfc9(_0x53d244)),_(0x1,_0x2edfc9(_0x3dd59f)),_(0x2,_0x2edfc9(_0x3affa4)),_(0x3,_0x2edfc9(_0x348e3e))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x12cf35,_0x3d7be7,_0x53eab4,_0x2a0d30)=>{for(var _0x34a019=_0x2a0d30>0x1?void 0x0:_0x2a0d30?re(_0x3d7be7,_0x53eab4):_0x3d7be7,_0x583e10=_0x12cf35['length']-0x1,_0xdba7c3;_0x583e10>=0x0;_0x583e10--)(_0xdba7c3=_0x12cf35[_0x583e10])&&(_0x34a019=_0xdba7c3(_0x34a019)||_0x34a019);return _0x34a019;},N=(_0x4242ae,_0xa0f25)=>(_0x56bdc7,_0x4ae986)=>_0xa0f25(_0x56bdc7,_0x4ae986,_0x4242ae);let g=class extends _0x5700d0{constructor(_0x1efbad,_0x3f4476){const _0x7959cd=_0x116374;super(),this[_0x7959cd(0x165)]=_0x1efbad,this[_0x7959cd(0x191)]=_0x3f4476,this['_initDataSource']();}['_initDataSource'](){const _0x4fdb0c=_0x116374;this['_threadCommentDataSourceService']['dataSource']=this[_0x4fdb0c(0x191)],this[_0x4fdb0c(0x165)][_0x4fdb0c(0x168)]=!0x1;}};g=te([N(0x0,_0x6d41c1),N(0x1,_0x2edfc9(f))],g);var se=Object['defineProperty'],oe=Object[_0x116374(0x184)],ne=(_0x1b4eb1,_0x2595c4,_0xeb91c0)=>_0x2595c4 in _0x1b4eb1?se(_0x1b4eb1,_0x2595c4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xeb91c0}):_0x1b4eb1[_0x2595c4]=_0xeb91c0,ie=(_0x57dd14,_0x61d335,_0xe3efff,_0xa2f0e2)=>{const _0x326a4d=_0x116374;for(var _0x1a7e36=_0xa2f0e2>0x1?void 0x0:_0xa2f0e2?oe(_0x61d335,_0xe3efff):_0x61d335,_0xc93381=_0x57dd14[_0x326a4d(0x197)]-0x1,_0x389a49;_0xc93381>=0x0;_0xc93381--)(_0x389a49=_0x57dd14[_0xc93381])&&(_0x1a7e36=_0x389a49(_0x1a7e36)||_0x1a7e36);return _0x1a7e36;},w=(_0x226709,_0x103323)=>(_0x4b2a49,_0x2380af)=>_0x103323(_0x4b2a49,_0x2380af,_0x226709),$=(_0x258fd7,_0x47eb50,_0x343202)=>ne(_0x258fd7,typeof _0x47eb50!=_0x116374(0x178)?_0x47eb50+'':_0x47eb50,_0x343202);let b=class extends _0x11dac9{constructor(_0x2816b6=M,_0xe0c638,_0x1c6c1d){const _0x5373d2=_0x116374;super(),this[_0x5373d2(0x161)]=_0x2816b6,this['_injector']=_0xe0c638,this[_0x5373d2(0x163)]=_0x1c6c1d;const {..._0xefe40e}=_0x150f9d({},M,this[_0x5373d2(0x161)]);this['_configService'][_0x5373d2(0x192)](z,_0xefe40e);}['onStarting'](){const _0x49448a=_0x116374;[[f],[g],[S]][_0x49448a(0x1ac)](_0x33aa6b=>{const _0x6e829f=_0x49448a;this[_0x6e829f(0x17e)][_0x6e829f(0x17d)](_0x33aa6b);});}[_0x116374(0x156)](){const _0x11aadd=_0x116374;this[_0x11aadd(0x17e)][_0x11aadd(0x15c)](g),this[_0x11aadd(0x17e)][_0x11aadd(0x15c)](S);}};$(b,'pluginName',W),$(b,_0x116374(0x19f),_0x2b4fac[_0x116374(0x18e)]),b=ie([_0x50dc84(_0x19c732,_0x30e333,_0x187856),w(0x1,_0x2edfc9(_0x348e3e)),w(0x2,_0x136480)],b);export{b as UniverThreadCommentDataSourcePlugin};function _0x23e7(){const _0xc3551=['size','Delete','UNIVER_UNKNOWN','reply','95uEDwRV','_threadCommentDataSource','setConfig','UNRECOGNIZED','/universer-api/user/list','Reply','find','length','root','format','/solved','/delete','saveCommentToSnapshot','15259900gvRydS','replies','type','Solve','unitId','getCurrentUser','6271867PuqDmH','1772416YhzFes','getUser','thread-comment-data-source.config','getUnit','userId','994JXGTuA','addComment','rangeId','forEach','_init','delete','getComment','_httpService','YYYY/MM/DD\x20HH:mm','disposeWithMe','101844VRVIQV','updateComment','/list','resolved','body','userID','onReady','error','requireSession','map','comment','538SWsdiY','get','user','threadId','payload','Edit','_config','27738rcTfNH','_configService','ref','_threadCommentDataSourceService','parse','solved','syncUpdateMutationToColla','resolveComment','users','replyId','COMMENT','customRanges','parentId','code','stringify','_initUserSync','rangeType','comments','24GZLJFy','Solved','_sessionService','subscribe','symbol','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','pipe','addUser','commentUpdate$','add','_injector','_userService','1857273JsZHbq','createTimestamp','/universer-api/comment/unit/','post','getOwnPropertyDescriptor','/edit','content','Add','_threadCommentModel','getMemberID','OpenOrReOpen','deleteComment'];_0x23e7=function(){return _0xc3551;};return _0x23e7();}
|
|
1
|
+
const _0x3125a2=_0x44fb;(function(_0x41e1e5,_0xe00b07){const _0x1c28cb=_0x44fb,_0x39dbf5=_0x41e1e5();while(!![]){try{const _0x17feb2=parseInt(_0x1c28cb(0x18f))/0x1*(-parseInt(_0x1c28cb(0x199))/0x2)+parseInt(_0x1c28cb(0x1a9))/0x3+-parseInt(_0x1c28cb(0x1a5))/0x4+-parseInt(_0x1c28cb(0x1d2))/0x5+-parseInt(_0x1c28cb(0x1a8))/0x6*(-parseInt(_0x1c28cb(0x1b1))/0x7)+-parseInt(_0x1c28cb(0x1d1))/0x8*(-parseInt(_0x1c28cb(0x1b7))/0x9)+parseInt(_0x1c28cb(0x1c9))/0xa*(parseInt(_0x1c28cb(0x1a2))/0xb);if(_0x17feb2===_0xe00b07)break;else _0x39dbf5['push'](_0x39dbf5['shift']());}catch(_0x24c704){_0x39dbf5['push'](_0x39dbf5['shift']());}}}(_0x2427,0xd6d34));import{CommentService as _0x28c565,CollaborationSessionService as _0x3cf7e3,UniverCollaborationClientPlugin as _0x12a624}from'@univerjs-pro/collaboration-client';function _0x2427(){const _0x2925b9=['payload','format','8dncZuI','1515075ShBbBd','_userService','parse','getMemberID','solved','find','resolveComment','unitId','Delete','delete','post','_commentService','pluginName','getUnit','UNRECOGNIZED','/add','Solve','_httpService','/universer-api/user/list','size','resolved','userId','root','_config','rangeType','Solved','onReady','syncUpdateMutationToColla','forEach','saveCommentToSnapshot','get','YYYY/MM/DD\x20HH:mm','comments','Add','OpenOrReOpen','subscribe','personId','requireSession','9bcyeDc','/universer-api/comment/unit/','userID','getComment','threadId','slice','Edit','_initDataSource','replies','_configService','356744Wubiae','body','commentUpdate$','Reply','rangeId','code','/delete','_sessionService','length','22bNUBak','stringify','customRanges','4074688hpXWEt','dataSource','reply','194478OnvweG','4268274oFerap','error','/edit','createTimestamp','pipe','/reply','deleteComment','parentId','98BfMYpU','_init','Unknown','replyId','_threadCommentModel','_initUserSync','11508309wjDKyO','addUser','_threadCommentDataSource','_threadCommentDataSourceService','COMMENT','getUser','users','add','disposeWithMe','_injector','setConfig','addComment','content','map','defineProperty','comment','user','ref','3258590oXsteK','UNIVER_UNKNOWN','updateComment','type','filter','getOwnPropertyDescriptor'];_0x2427=function(){return _0x2925b9;};return _0x2427();}function _0x44fb(_0x3ffcd7,_0x2b8992){const _0x24278a=_0x2427();return _0x44fb=function(_0x44fb18,_0x8e07fd){_0x44fb18=_0x44fb18-0x183;let _0x18e74e=_0x24278a[_0x44fb18];return _0x18e74e;},_0x44fb(_0x3ffcd7,_0x2b8992);}import{UniverLicensePlugin as _0x2e3ca3}from'@univerjs-pro/license';import{dayjs as _0x466984,UserManagerService as _0x877d29,Inject as _0x5223ea,Injector as _0x579925,Disposable as _0x2c471d,CustomRangeType as _0x1659d6,UniverInstanceType as _0x4f26b0,DependentOn as _0x3f95ef,IConfigService as _0x5a7661,Plugin as _0x42ff71,merge as _0x497adb}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x479164}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2de7ff,IThreadCommentDataSourceService as _0x1af45c}from'@univerjs/thread-comment';import{bufferTime as _0x5a8fb7}from'rxjs';import{HTTPService as _0x3180ef}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xe3f0c8=>(_0xe3f0c8[_0xe3f0c8[_0x3125a2(0x18b)]=0x0]='OpenOrReOpen',_0xe3f0c8[_0xe3f0c8[_0x3125a2(0x1eb)]=0x1]=_0x3125a2(0x1eb),_0xe3f0c8[_0xe3f0c8['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0xe3f0c8))(I||{}),v=(_0x4c5f55=>(_0x4c5f55[_0x4c5f55[_0x3125a2(0x1b3)]=0x0]=_0x3125a2(0x1b3),_0x4c5f55[_0x4c5f55['Add']=0x1]=_0x3125a2(0x18a),_0x4c5f55[_0x4c5f55[_0x3125a2(0x19c)]=0x2]=_0x3125a2(0x19c),_0x4c5f55[_0x4c5f55[_0x3125a2(0x195)]=0x3]=_0x3125a2(0x195),_0x4c5f55[_0x4c5f55[_0x3125a2(0x1da)]=0x4]=_0x3125a2(0x1da),_0x4c5f55[_0x4c5f55['Solve']=0x5]='Solve',_0x4c5f55[_0x4c5f55[_0x3125a2(0x1e0)]=-0x1]='UNRECOGNIZED',_0x4c5f55))(v||{});const D=_0x2b313a=>_0x466984(new Date(+_0x2b313a))[_0x3125a2(0x1d0)](_0x3125a2(0x188)),B=async(_0x3202d6,_0x270c55)=>{const _0x51211b=_0x3125a2,_0x1628b6=_0x3202d6[_0x51211b(0x187)](_0x877d29),_0x519477=_0x3202d6[_0x51211b(0x187)](_0x3180ef);_0x270c55[_0x51211b(0x185)](_0x42b6d9=>{const _0x4213e7=_0x51211b;_0x1628b6[_0x4213e7(0x1bc)](_0x42b6d9)&&_0x270c55[_0x4213e7(0x1db)](_0x42b6d9);}),_0x270c55[_0x51211b(0x1e5)]&&(await _0x519477['get'](_0x51211b(0x1e4),{'params':{'userIDs':[..._0x270c55]}}))[_0x51211b(0x19a)][_0x51211b(0x1bd)][_0x51211b(0x185)](_0x837705=>{const _0x2f9e68=_0x51211b;_0x837705&&_0x1628b6[_0x2f9e68(0x1b8)](_0x837705);});};var K=Object[_0x3125a2(0x1ce)],V=(_0x3a9b9d,_0x397d31,_0x59d0e8,_0x582354)=>{for(var _0x136155=_0x582354>0x1?void 0x0:_0x582354?K(_0x397d31,_0x59d0e8):_0x397d31,_0x11ff5a=_0x3a9b9d['length']-0x1,_0x5c633b;_0x11ff5a>=0x0;_0x11ff5a--)(_0x5c633b=_0x3a9b9d[_0x11ff5a])&&(_0x136155=_0x5c633b(_0x136155)||_0x136155);return _0x136155;},p=(_0x48c30e,_0x3f79eb)=>(_0x2d6beb,_0x41d856)=>_0x3f79eb(_0x2d6beb,_0x41d856,_0x48c30e);let S=class extends _0x2c471d{constructor(_0x2aa13d,_0x1c09b5,_0x3581e4,_0x53cd1c){const _0x396faf=_0x3125a2;super(),this['_commentService']=_0x2aa13d,this[_0x396faf(0x1b5)]=_0x1c09b5,this[_0x396faf(0x1d3)]=_0x3581e4,this[_0x396faf(0x1c0)]=_0x53cd1c,this['_init'](),this[_0x396faf(0x1b6)]();}[_0x3125a2(0x1b6)](){const _0x2ceda4=_0x3125a2;this[_0x2ceda4(0x1bf)](this[_0x2ceda4(0x1b5)]['commentUpdate$'][_0x2ceda4(0x1ad)](_0x5a8fb7(0x10))[_0x2ceda4(0x18c)](_0x424028=>{const _0x256207=_0x2ceda4,_0x5cf6ca=new Set();_0x424028['forEach'](_0x2c3930=>{const _0x4fb22f=_0x44fb;switch(_0x2c3930[_0x4fb22f(0x1cc)]){case _0x4fb22f(0x1be):{const _0x464d2d=_0x2c3930[_0x4fb22f(0x1cf)][_0x4fb22f(0x18d)];_0x5cf6ca[_0x4fb22f(0x1be)](_0x464d2d);break;}}}),B(this[_0x256207(0x1c0)],_0x5cf6ca);}));}[_0x3125a2(0x1b2)](){const _0x1bcace=_0x3125a2;this[_0x1bcace(0x1bf)](this[_0x1bcace(0x1dd)][_0x1bcace(0x19b)][_0x1bcace(0x18c)](async _0x431dcc=>{const _0x48128a=_0x1bcace;var _0x44c3ab,_0x26b813,_0x2dc8b6,_0xfdc3bc;const _0x3829b4=(_0x44c3ab=this[_0x48128a(0x1b5)][_0x48128a(0x1df)](_0x431dcc[_0x48128a(0x1d9)])['find'](_0x1b27dc=>_0x1b27dc[_0x48128a(0x193)]===_0x431dcc[_0x48128a(0x193)]))==null?void 0x0:_0x44c3ab[_0x48128a(0x1e8)];if(!_0x3829b4)return;const {unitId:_0x5101e9,subUnitId:_0x441c03}=_0x3829b4;switch(_0x431dcc[_0x48128a(0x1c7)]&&this[_0x48128a(0x1d3)]['addUser'](_0x431dcc[_0x48128a(0x1c7)]),_0x431dcc[_0x48128a(0x1cc)]){case v[_0x48128a(0x18a)]:break;case v[_0x48128a(0x19c)]:{this[_0x48128a(0x1b5)][_0x48128a(0x1c2)](_0x5101e9,_0x441c03,{'unitId':_0x5101e9,'subUnitId':_0x441c03,'ref':'','id':_0x431dcc['replyId'],'dT':D(+_0x431dcc[_0x48128a(0x1ac)]),'threadId':_0x431dcc[_0x48128a(0x193)],'personId':(_0x2dc8b6=(_0x26b813=_0x431dcc[_0x48128a(0x1c7)])==null?void 0x0:_0x26b813[_0x48128a(0x191)])!=null?_0x2dc8b6:_0x431dcc[_0x48128a(0x1e7)],'text':JSON[_0x48128a(0x1d4)](_0x431dcc[_0x48128a(0x1c3)]),'parentId':_0x3829b4['id']});break;}case v[_0x48128a(0x1da)]:{const _0x9fbc9a=this[_0x48128a(0x1b5)][_0x48128a(0x192)](_0x5101e9,_0x441c03,_0x431dcc['replyId']);_0x9fbc9a&&_0x9fbc9a[_0x48128a(0x1b0)]&&this[_0x48128a(0x1b5)][_0x48128a(0x1af)](_0x5101e9,_0x441c03,_0x431dcc[_0x48128a(0x1b4)]);break;}case v['Edit']:{this[_0x48128a(0x1b5)]['updateComment'](_0x5101e9,_0x441c03,{'commentId':_0x431dcc[_0x48128a(0x1b4)],'text':JSON[_0x48128a(0x1d4)](_0x431dcc[_0x48128a(0x1c3)])});break;}case v[_0x48128a(0x1e2)]:{const _0x9c79a4=(_0xfdc3bc=this[_0x48128a(0x1b5)][_0x48128a(0x1df)](_0x431dcc[_0x48128a(0x1d9)])[_0x48128a(0x1d7)](_0x4ee24d=>_0x4ee24d[_0x48128a(0x193)]===_0x431dcc[_0x48128a(0x193)]))==null?void 0x0:_0xfdc3bc[_0x48128a(0x1e8)];_0x9c79a4&&this[_0x48128a(0x1b5)][_0x48128a(0x1d8)](_0x5101e9,_0x441c03,_0x9c79a4['id'],_0x431dcc[_0x48128a(0x1d6)]===I[_0x48128a(0x1eb)]);break;}}}));}};S=V([p(0x0,_0x5223ea(_0x28c565)),p(0x1,_0x5223ea(_0x2de7ff)),p(0x2,_0x5223ea(_0x877d29)),p(0x3,_0x5223ea(_0x579925))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x339343,_0x5ca4ea,_0x515898,_0x5ad8d2)=>{const _0x562ed1=_0x3125a2;for(var _0x514722=_0x5ad8d2>0x1?void 0x0:_0x5ad8d2?k(_0x5ca4ea,_0x515898):_0x5ca4ea,_0x45b5b1=_0x339343[_0x562ed1(0x1a1)]-0x1,_0x5827c5;_0x45b5b1>=0x0;_0x45b5b1--)(_0x5827c5=_0x339343[_0x45b5b1])&&(_0x514722=_0x5827c5(_0x514722)||_0x514722);return _0x514722;},_=(_0x217570,_0x353cd8)=>(_0x34130b,_0x4bc6f3)=>_0x353cd8(_0x34130b,_0x4bc6f3,_0x217570);function X(_0x52403d,_0x146f9e){const _0x3523f6=_0x3125a2,_0x128473=_0x52403d[_0x3523f6(0x197)][0x0];return{..._0x146f9e,'id':_0x128473[_0x3523f6(0x1b4)],'resolved':_0x52403d[_0x3523f6(0x1d6)]===0x1,'dT':D(_0x128473[_0x3523f6(0x1ac)]),'personId':_0x128473[_0x3523f6(0x1e7)],'threadId':_0x128473[_0x3523f6(0x193)]};}function ee(_0x1db493,_0x512efd,_0xfd8a7f){const _0x2c1385=_0x3125a2;var _0x3b0383,_0xeaafa9;if(((_0xeaafa9=(_0x3b0383=_0x1db493==null?void 0x0:_0x1db493['replies'])==null?void 0x0:_0x3b0383[_0x2c1385(0x1a1)])!=null?_0xeaafa9:0x0)>0x0){const _0x28fc8a=(_0x3402db,_0x3712e2)=>({'id':_0x3402db[_0x2c1385(0x1b4)],'threadId':_0x3402db['threadId'],'dT':D(_0x3402db[_0x2c1385(0x1ac)]),'personId':_0x3402db[_0x2c1385(0x1e7)],'resolved':_0x1db493['solved']===I[_0x2c1385(0x1eb)],'unitId':_0x512efd,'subUnitId':_0xfd8a7f,'text':JSON[_0x2c1385(0x1d4)](_0x3402db['content']),'parentId':_0x3712e2}),_0x464864=_0x28fc8a(_0x1db493[_0x2c1385(0x197)][0x0]);return{..._0x464864,'children':_0x1db493[_0x2c1385(0x197)][_0x2c1385(0x194)](0x1)[_0x2c1385(0x1c4)](_0x443b83=>_0x28fc8a(_0x443b83,_0x464864['id']))};}return null;}let f=class{constructor(_0x5e7810,_0x244858,_0x16f12e,_0x4b3b62){const _0x85b0bf=_0x3125a2;this[_0x85b0bf(0x1e3)]=_0x5e7810,this[_0x85b0bf(0x1d3)]=_0x244858,this[_0x85b0bf(0x1a0)]=_0x16f12e,this[_0x85b0bf(0x1c0)]=_0x4b3b62;}async['addComment'](_0x3ee18f){const _0x1a78c9=_0x3125a2;var _0x133bf3,_0x3d7aa0;const {parentId:_0x5f38a5,unitId:_0x5cb725,text:_0x3a8071,threadId:_0x7bc1d3}=_0x3ee18f,_0x5b316b=(_0x3d7aa0=(_0x133bf3=_0x3a8071[_0x1a78c9(0x1a4)])==null?void 0x0:_0x133bf3[_0x1a78c9(0x1cd)](_0x4bd2d1=>_0x4bd2d1['rangeType']===_0x1659d6[_0x1a78c9(0x1bb)])[_0x1a78c9(0x1c4)](_0x1bb3bc=>_0x1bb3bc[_0x1a78c9(0x19d)]))!=null?_0x3d7aa0:[],_0x4b28c0=JSON[_0x1a78c9(0x1a3)](_0x3a8071),_0x33d650=(await this[_0x1a78c9(0x1a0)][_0x1a78c9(0x18e)](_0x5cb725))[_0x1a78c9(0x1d5)]();if(_0x5f38a5){const _0x2afe42={'memberId':_0x33d650,'unitId':_0x5cb725,'content':_0x4b28c0,'mention':_0x5b316b,'threadId':_0x7bc1d3},_0x1d8332=(await this[_0x1a78c9(0x1e3)][_0x1a78c9(0x1dc)](_0x1a78c9(0x190)+_0x5cb725+_0x1a78c9(0x1ae),{'body':_0x2afe42}))[_0x1a78c9(0x19a)][_0x1a78c9(0x1a7)];return{..._0x3ee18f,'id':_0x1d8332[_0x1a78c9(0x1b4)],'dT':_0x466984(+_0x1d8332['createTimestamp'])[_0x1a78c9(0x1d0)](_0x1a78c9(0x188)),'personId':_0x1d8332[_0x1a78c9(0x1e7)]};}else{const _0x41a107={'memberId':_0x33d650,'unitId':_0x5cb725,'content':_0x4b28c0,'mention':_0x5b316b},_0x2b65d3=await this[_0x1a78c9(0x1e3)]['post']('/universer-api/comment/unit/'+_0x5cb725+_0x1a78c9(0x1e1),{'body':_0x41a107});return X(_0x2b65d3[_0x1a78c9(0x19a)][_0x1a78c9(0x1c6)],_0x3ee18f);}}async[_0x3125a2(0x1cb)](_0x37eeec){const _0x25041b=_0x3125a2;var _0x121bec,_0x57373c;const {text:_0x5b7800,unitId:_0x5e4448}=_0x37eeec,_0x1f7640=(_0x57373c=(_0x121bec=_0x5b7800[_0x25041b(0x1a4)])==null?void 0x0:_0x121bec['filter'](_0x381e66=>_0x381e66[_0x25041b(0x1ea)]===_0x1659d6[_0x25041b(0x1bb)])[_0x25041b(0x1c4)](_0x3dedb5=>_0x3dedb5['rangeId']))!=null?_0x57373c:[],_0x311b66=JSON[_0x25041b(0x1a3)](_0x5b7800),_0x59f8fc=_0x37eeec[_0x25041b(0x193)],_0x25b162=_0x37eeec['id'],_0x30c16b={'memberId':(await this['_sessionService'][_0x25041b(0x18e)](_0x5e4448))['getMemberID'](),'unitId':_0x5e4448,'threadId':_0x59f8fc,'mention':_0x1f7640,'content':_0x311b66,'replyId':_0x25b162},_0x22749f=await this[_0x25041b(0x1e3)][_0x25041b(0x1dc)](_0x25041b(0x190)+_0x5e4448+_0x25041b(0x1ab),{'body':_0x30c16b});return!_0x22749f[_0x25041b(0x19a)]['error']||_0x22749f['body'][_0x25041b(0x1aa)]['code']===0x1;}async[_0x3125a2(0x1d8)](_0x2a14f8){const _0x40ccaf=_0x3125a2,{unitId:_0x489c2b}=_0x2a14f8,_0x52e3b4=_0x2a14f8['threadId'],_0x4e21bf={'memberId':this[_0x40ccaf(0x1d3)]['getCurrentUser']()[_0x40ccaf(0x191)],'unitId':_0x489c2b,'threadId':_0x52e3b4,'solved':_0x2a14f8[_0x40ccaf(0x1e6)]?I[_0x40ccaf(0x1eb)]:I[_0x40ccaf(0x18b)]},_0x1db968=await this[_0x40ccaf(0x1e3)][_0x40ccaf(0x1dc)]('/universer-api/comment/unit/'+_0x489c2b+'/solved',{'body':_0x4e21bf});return!_0x1db968[_0x40ccaf(0x19a)][_0x40ccaf(0x1aa)]||_0x1db968['body']['error'][_0x40ccaf(0x19e)]===0x1;}async[_0x3125a2(0x1af)](_0x47ea3b,_0x575d24,_0x5a38fc,_0x37576b){const _0x427b51=_0x3125a2,_0x20b236={'memberId':(await this[_0x427b51(0x1a0)][_0x427b51(0x18e)](_0x47ea3b))[_0x427b51(0x1d5)](),'threadId':_0x5a38fc,'replyId':_0x37576b,'unitId':_0x47ea3b},_0x29988b=await this[_0x427b51(0x1e3)]['post'](_0x427b51(0x190)+_0x47ea3b+_0x427b51(0x19f),{'body':_0x20b236});return!_0x29988b[_0x427b51(0x19a)][_0x427b51(0x1aa)]||_0x29988b[_0x427b51(0x19a)][_0x427b51(0x1aa)]['code']===0x1;}async['listComments'](_0x2bc9fe,_0x39697a,_0x40d39f){const _0x1cd8f2=_0x3125a2,_0x37e3a6={'unitId':_0x2bc9fe,'threadId':_0x40d39f},_0x4035ea=await this[_0x1cd8f2(0x1e3)][_0x1cd8f2(0x1dc)]('/universer-api/comment/unit/'+_0x2bc9fe+'/list',{'body':_0x37e3a6}),_0x5d87a3=_0x40d39f[_0x1cd8f2(0x1c4)](_0x3bfb6f=>ee(_0x4035ea[_0x1cd8f2(0x19a)][_0x1cd8f2(0x189)][_0x3bfb6f],_0x2bc9fe,_0x39697a))[_0x1cd8f2(0x1cd)](Boolean);return Object['values'](_0x4035ea[_0x1cd8f2(0x19a)][_0x1cd8f2(0x1bd)])[_0x1cd8f2(0x185)](_0x2d6c53=>{const _0x4c22e6=_0x1cd8f2;this[_0x4c22e6(0x1d3)][_0x4c22e6(0x1b8)](_0x2d6c53);}),_0x5d87a3;}[_0x3125a2(0x186)](_0x4e731a){const _0x1b5ee4=_0x3125a2;return{'id':_0x4e731a['id'],'threadId':_0x4e731a['threadId'],'ref':_0x4e731a[_0x1b5ee4(0x1c8)]};}};f=Q([_(0x0,_0x5223ea(_0x3180ef)),_(0x1,_0x5223ea(_0x877d29)),_(0x2,_0x5223ea(_0x3cf7e3)),_(0x3,_0x5223ea(_0x579925))],f);var re=Object[_0x3125a2(0x1ce)],te=(_0xd462e3,_0x16abe7,_0xe23e81,_0x459ecf)=>{const _0x26a76c=_0x3125a2;for(var _0x335403=_0x459ecf>0x1?void 0x0:_0x459ecf?re(_0x16abe7,_0xe23e81):_0x16abe7,_0x4be48d=_0xd462e3[_0x26a76c(0x1a1)]-0x1,_0x52836a;_0x4be48d>=0x0;_0x4be48d--)(_0x52836a=_0xd462e3[_0x4be48d])&&(_0x335403=_0x52836a(_0x335403)||_0x335403);return _0x335403;},N=(_0x96acf6,_0x39be77)=>(_0x214eb2,_0x18c445)=>_0x39be77(_0x214eb2,_0x18c445,_0x96acf6);let g=class extends _0x2c471d{constructor(_0x15a458,_0x597fbd){const _0x286543=_0x3125a2;super(),this[_0x286543(0x1ba)]=_0x15a458,this['_threadCommentDataSource']=_0x597fbd,this[_0x286543(0x196)]();}[_0x3125a2(0x196)](){const _0x50f769=_0x3125a2;this['_threadCommentDataSourceService'][_0x50f769(0x1a6)]=this[_0x50f769(0x1b9)],this[_0x50f769(0x1ba)][_0x50f769(0x184)]=!0x1;}};g=te([N(0x0,_0x1af45c),N(0x1,_0x5223ea(f))],g);var se=Object[_0x3125a2(0x1c5)],oe=Object[_0x3125a2(0x1ce)],ne=(_0x266f15,_0x503b35,_0x1e4829)=>_0x503b35 in _0x266f15?se(_0x266f15,_0x503b35,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1e4829}):_0x266f15[_0x503b35]=_0x1e4829,ie=(_0x56f65e,_0x129f98,_0x146749,_0x2413be)=>{const _0x2d529f=_0x3125a2;for(var _0x38eb4a=_0x2413be>0x1?void 0x0:_0x2413be?oe(_0x129f98,_0x146749):_0x129f98,_0x3d30d3=_0x56f65e[_0x2d529f(0x1a1)]-0x1,_0x54434a;_0x3d30d3>=0x0;_0x3d30d3--)(_0x54434a=_0x56f65e[_0x3d30d3])&&(_0x38eb4a=_0x54434a(_0x38eb4a)||_0x38eb4a);return _0x38eb4a;},w=(_0x4fb7e9,_0x58466c)=>(_0x1e8905,_0x2fd2c6)=>_0x58466c(_0x1e8905,_0x2fd2c6,_0x4fb7e9),$=(_0x22094a,_0x250a00,_0x46b1e7)=>ne(_0x22094a,typeof _0x250a00!='symbol'?_0x250a00+'':_0x250a00,_0x46b1e7);let b=class extends _0x42ff71{constructor(_0x58ce75=M,_0x22ad1f,_0x293b86){const _0xed3bcc=_0x3125a2;super(),this[_0xed3bcc(0x1e9)]=_0x58ce75,this[_0xed3bcc(0x1c0)]=_0x22ad1f,this[_0xed3bcc(0x198)]=_0x293b86;const {..._0x3d5040}=_0x497adb({},M,this['_config']);this['_configService'][_0xed3bcc(0x1c1)](z,_0x3d5040);}['onStarting'](){const _0x11568e=_0x3125a2;[[f],[g],[S]][_0x11568e(0x185)](_0x2bf256=>{const _0x465e08=_0x11568e;this['_injector'][_0x465e08(0x1be)](_0x2bf256);});}[_0x3125a2(0x183)](){const _0x4da96d=_0x3125a2;this[_0x4da96d(0x1c0)][_0x4da96d(0x187)](g),this[_0x4da96d(0x1c0)][_0x4da96d(0x187)](S);}};$(b,_0x3125a2(0x1de),W),$(b,'type',_0x4f26b0[_0x3125a2(0x1ca)]),b=ie([_0x3f95ef(_0x479164,_0x12a624,_0x2e3ca3),w(0x1,_0x5223ea(_0x579925)),w(0x2,_0x5a7661)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x1735(_0x778d9a,_0x1c306c){const _0x23e795=_0x23e7();return _0x1735=function(_0x173590,_0x359c10){_0x173590=_0x173590-0x14e;let _0xa0a074=_0x23e795[_0x173590];return _0xa0a074;},_0x1735(_0x778d9a,_0x1c306c);}const _0x116374=_0x1735;(function(_0x26eb43,_0x3f69dd){const _0x5b2552=_0x1735,_0x515c47=_0x26eb43();while(!![]){try{const _0x148429=-parseInt(_0x5b2552(0x1a9))/0x1*(parseInt(_0x5b2552(0x15b))/0x2)+parseInt(_0x5b2552(0x180))/0x3+-parseInt(_0x5b2552(0x1a4))/0x4+-parseInt(_0x5b2552(0x190))/0x5*(parseInt(_0x5b2552(0x162))/0x6)+-parseInt(_0x5b2552(0x1a3))/0x7+parseInt(_0x5b2552(0x174))/0x8*(parseInt(_0x5b2552(0x150))/0x9)+parseInt(_0x5b2552(0x19d))/0xa;if(_0x148429===_0x3f69dd)break;else _0x515c47['push'](_0x515c47['shift']());}catch(_0x11ab6b){_0x515c47['push'](_0x515c47['shift']());}}}(_0x23e7,0x76571));import{CommentService as _0x2aeaf0,CollaborationSessionService as _0x3affa4,UniverCollaborationClientPlugin as _0x30e333}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x187856}from'@univerjs-pro/license';import{dayjs as _0x35302d,UserManagerService as _0x3dd59f,Inject as _0x2edfc9,Injector as _0x348e3e,Disposable as _0x5700d0,CustomRangeType as _0x56b39f,UniverInstanceType as _0x2b4fac,DependentOn as _0x50dc84,IConfigService as _0x136480,Plugin as _0x11dac9,merge as _0x150f9d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x19c732}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xf188f2,IThreadCommentDataSourceService as _0x6d41c1}from'@univerjs/thread-comment';import{bufferTime as _0x175c95}from'rxjs';import{HTTPService as _0x53d244}from'@univerjs/network';const W=_0x116374(0x179);var I=(_0x48e472=>(_0x48e472[_0x48e472[_0x116374(0x18a)]=0x0]=_0x116374(0x18a),_0x48e472[_0x48e472[_0x116374(0x175)]=0x1]=_0x116374(0x175),_0x48e472[_0x48e472[_0x116374(0x193)]=-0x1]=_0x116374(0x193),_0x48e472))(I||{}),v=(_0x50b41f=>(_0x50b41f[_0x50b41f['Unknown']=0x0]='Unknown',_0x50b41f[_0x50b41f[_0x116374(0x187)]=0x1]='Add',_0x50b41f[_0x50b41f['Reply']=0x2]=_0x116374(0x195),_0x50b41f[_0x50b41f[_0x116374(0x160)]=0x3]=_0x116374(0x160),_0x50b41f[_0x50b41f[_0x116374(0x18d)]=0x4]='Delete',_0x50b41f[_0x50b41f[_0x116374(0x1a0)]=0x5]=_0x116374(0x1a0),_0x50b41f[_0x50b41f['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x50b41f))(v||{});const D=_0x34c161=>_0x35302d(new Date(+_0x34c161))[_0x116374(0x199)](_0x116374(0x14e)),B=async(_0x40db99,_0x475f0b)=>{const _0xf8b387=_0x116374,_0x270f7a=_0x40db99[_0xf8b387(0x15c)](_0x3dd59f),_0x2f80de=_0x40db99[_0xf8b387(0x15c)](_0x53d244);_0x475f0b[_0xf8b387(0x1ac)](_0x3e35ee=>{const _0x439cec=_0xf8b387;_0x270f7a[_0x439cec(0x1a5)](_0x3e35ee)&&_0x475f0b[_0x439cec(0x1ae)](_0x3e35ee);}),_0x475f0b[_0xf8b387(0x18c)]&&(await _0x2f80de[_0xf8b387(0x15c)](_0xf8b387(0x194),{'params':{'userIDs':[..._0x475f0b]}}))['body']['users'][_0xf8b387(0x1ac)](_0x4a69a5=>{const _0xa2bc8=_0xf8b387;_0x4a69a5&&_0x270f7a[_0xa2bc8(0x17b)](_0x4a69a5);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x13929a,_0x506617,_0x412337,_0x231677)=>{const _0x1bd7d2=_0x116374;for(var _0x46b080=_0x231677>0x1?void 0x0:_0x231677?K(_0x506617,_0x412337):_0x506617,_0x32c7ca=_0x13929a[_0x1bd7d2(0x197)]-0x1,_0x4e0438;_0x32c7ca>=0x0;_0x32c7ca--)(_0x4e0438=_0x13929a[_0x32c7ca])&&(_0x46b080=_0x4e0438(_0x46b080)||_0x46b080);return _0x46b080;},p=(_0x1b22dc,_0x519dff)=>(_0xde4d01,_0x5b223b)=>_0x519dff(_0xde4d01,_0x5b223b,_0x1b22dc);let S=class extends _0x5700d0{constructor(_0x1c00a7,_0x2b10ec,_0x145751,_0x3d6de2){const _0x2754fa=_0x116374;super(),this['_commentService']=_0x1c00a7,this[_0x2754fa(0x188)]=_0x2b10ec,this[_0x2754fa(0x17f)]=_0x145751,this[_0x2754fa(0x17e)]=_0x3d6de2,this[_0x2754fa(0x1ad)](),this[_0x2754fa(0x171)]();}[_0x116374(0x171)](){const _0x5c2dce=_0x116374;this[_0x5c2dce(0x14f)](this[_0x5c2dce(0x188)][_0x5c2dce(0x17c)][_0x5c2dce(0x17a)](_0x175c95(0x10))[_0x5c2dce(0x177)](_0x3d117b=>{const _0x2fb3fe=_0x5c2dce,_0xdbd7db=new Set();_0x3d117b[_0x2fb3fe(0x1ac)](_0x1f1c71=>{const _0x3afc58=_0x2fb3fe;switch(_0x1f1c71[_0x3afc58(0x19f)]){case _0x3afc58(0x17d):{const _0x381b08=_0x1f1c71[_0x3afc58(0x15f)]['personId'];_0xdbd7db[_0x3afc58(0x17d)](_0x381b08);break;}}}),B(this[_0x2fb3fe(0x17e)],_0xdbd7db);}));}[_0x116374(0x1ad)](){const _0x103284=_0x116374;this[_0x103284(0x14f)](this['_commentService']['commentUpdate$'][_0x103284(0x177)](async _0x8cd26f=>{const _0x1bdeac=_0x103284;var _0x572d65,_0x200475,_0x3bf3b8,_0x81f1d4;const _0x5e8e58=(_0x572d65=this[_0x1bdeac(0x188)][_0x1bdeac(0x1a7)](_0x8cd26f[_0x1bdeac(0x1a1)])[_0x1bdeac(0x196)](_0x34a130=>_0x34a130[_0x1bdeac(0x15e)]===_0x8cd26f[_0x1bdeac(0x15e)]))==null?void 0x0:_0x572d65[_0x1bdeac(0x198)];if(!_0x5e8e58)return;const {unitId:_0x15f5f1,subUnitId:_0x2745ed}=_0x5e8e58;switch(_0x8cd26f['user']&&this['_userService'][_0x1bdeac(0x17b)](_0x8cd26f[_0x1bdeac(0x15d)]),_0x8cd26f['type']){case v['Add']:break;case v[_0x1bdeac(0x195)]:{this[_0x1bdeac(0x188)][_0x1bdeac(0x1aa)](_0x15f5f1,_0x2745ed,{'unitId':_0x15f5f1,'subUnitId':_0x2745ed,'ref':'','id':_0x8cd26f[_0x1bdeac(0x16b)],'dT':D(+_0x8cd26f[_0x1bdeac(0x181)]),'threadId':_0x8cd26f[_0x1bdeac(0x15e)],'personId':(_0x3bf3b8=(_0x200475=_0x8cd26f[_0x1bdeac(0x15d)])==null?void 0x0:_0x200475[_0x1bdeac(0x155)])!=null?_0x3bf3b8:_0x8cd26f[_0x1bdeac(0x1a8)],'text':JSON[_0x1bdeac(0x166)](_0x8cd26f[_0x1bdeac(0x186)]),'parentId':_0x5e8e58['id']});break;}case v[_0x1bdeac(0x18d)]:{const _0x4e6d88=this['_threadCommentModel'][_0x1bdeac(0x1af)](_0x15f5f1,_0x2745ed,_0x8cd26f[_0x1bdeac(0x16b)]);_0x4e6d88&&_0x4e6d88[_0x1bdeac(0x16e)]&&this[_0x1bdeac(0x188)][_0x1bdeac(0x18b)](_0x15f5f1,_0x2745ed,_0x8cd26f['replyId']);break;}case v[_0x1bdeac(0x160)]:{this['_threadCommentModel'][_0x1bdeac(0x151)](_0x15f5f1,_0x2745ed,{'commentId':_0x8cd26f['replyId'],'text':JSON[_0x1bdeac(0x166)](_0x8cd26f['content'])});break;}case v[_0x1bdeac(0x1a0)]:{const _0x201a48=(_0x81f1d4=this[_0x1bdeac(0x188)]['getUnit'](_0x8cd26f[_0x1bdeac(0x1a1)])['find'](_0x8af8ef=>_0x8af8ef[_0x1bdeac(0x15e)]===_0x8cd26f[_0x1bdeac(0x15e)]))==null?void 0x0:_0x81f1d4[_0x1bdeac(0x198)];_0x201a48&&this[_0x1bdeac(0x188)][_0x1bdeac(0x169)](_0x15f5f1,_0x2745ed,_0x201a48['id'],_0x8cd26f[_0x1bdeac(0x167)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x2edfc9(_0x2aeaf0)),p(0x1,_0x2edfc9(_0xf188f2)),p(0x2,_0x2edfc9(_0x3dd59f)),p(0x3,_0x2edfc9(_0x348e3e))],S);const z=_0x116374(0x1a6),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x2cad97,_0x6f6385,_0x150dce,_0x23857a)=>{for(var _0x1dbb96=_0x23857a>0x1?void 0x0:_0x23857a?k(_0x6f6385,_0x150dce):_0x6f6385,_0x17df6d=_0x2cad97['length']-0x1,_0xa4edc2;_0x17df6d>=0x0;_0x17df6d--)(_0xa4edc2=_0x2cad97[_0x17df6d])&&(_0x1dbb96=_0xa4edc2(_0x1dbb96)||_0x1dbb96);return _0x1dbb96;},_=(_0x5c6a68,_0x1d25d1)=>(_0x81adca,_0x3f0690)=>_0x1d25d1(_0x81adca,_0x3f0690,_0x5c6a68);function X(_0x707c11,_0x16def3){const _0x488570=_0x116374,_0x4f717f=_0x707c11[_0x488570(0x19e)][0x0];return{..._0x16def3,'id':_0x4f717f[_0x488570(0x16b)],'resolved':_0x707c11[_0x488570(0x167)]===0x1,'dT':D(_0x4f717f[_0x488570(0x181)]),'personId':_0x4f717f[_0x488570(0x1a8)],'threadId':_0x4f717f[_0x488570(0x15e)]};}function ee(_0x4bfacf,_0x203f22,_0x49d656){const _0x23943a=_0x116374;var _0x3927f5,_0x4e01bf;if(((_0x4e01bf=(_0x3927f5=_0x4bfacf==null?void 0x0:_0x4bfacf[_0x23943a(0x19e)])==null?void 0x0:_0x3927f5[_0x23943a(0x197)])!=null?_0x4e01bf:0x0)>0x0){const _0x1355d0=(_0x320949,_0x501c56)=>({'id':_0x320949[_0x23943a(0x16b)],'threadId':_0x320949[_0x23943a(0x15e)],'dT':D(_0x320949[_0x23943a(0x181)]),'personId':_0x320949[_0x23943a(0x1a8)],'resolved':_0x4bfacf[_0x23943a(0x167)]===I['Solved'],'unitId':_0x203f22,'subUnitId':_0x49d656,'text':JSON[_0x23943a(0x166)](_0x320949[_0x23943a(0x186)]),'parentId':_0x501c56}),_0x5ad73a=_0x1355d0(_0x4bfacf['replies'][0x0]);return{..._0x5ad73a,'children':_0x4bfacf['replies']['slice'](0x1)[_0x23943a(0x159)](_0x5c24d1=>_0x1355d0(_0x5c24d1,_0x5ad73a['id']))};}return null;}let f=class{constructor(_0x20d50f,_0x21b918,_0x469c96,_0x1347cd){const _0x14282a=_0x116374;this[_0x14282a(0x1b0)]=_0x20d50f,this['_userService']=_0x21b918,this[_0x14282a(0x176)]=_0x469c96,this[_0x14282a(0x17e)]=_0x1347cd;}async[_0x116374(0x1aa)](_0x1739a1){const _0x324369=_0x116374;var _0x1434cd,_0x3ba30b;const {parentId:_0x283db9,unitId:_0x422fb3,text:_0x448c94,threadId:_0x3c0bae}=_0x1739a1,_0x30f165=(_0x3ba30b=(_0x1434cd=_0x448c94[_0x324369(0x16d)])==null?void 0x0:_0x1434cd['filter'](_0x5e21d4=>_0x5e21d4[_0x324369(0x172)]===_0x56b39f[_0x324369(0x16c)])[_0x324369(0x159)](_0x271869=>_0x271869[_0x324369(0x1ab)]))!=null?_0x3ba30b:[],_0xa817c3=JSON[_0x324369(0x170)](_0x448c94),_0x57a03d=(await this[_0x324369(0x176)][_0x324369(0x158)](_0x422fb3))[_0x324369(0x189)]();if(_0x283db9){const _0x365756={'memberId':_0x57a03d,'unitId':_0x422fb3,'content':_0xa817c3,'mention':_0x30f165,'threadId':_0x3c0bae},_0x6257be=(await this[_0x324369(0x1b0)][_0x324369(0x183)](_0x324369(0x182)+_0x422fb3+'/reply',{'body':_0x365756}))[_0x324369(0x154)][_0x324369(0x18f)];return{..._0x1739a1,'id':_0x6257be[_0x324369(0x16b)],'dT':_0x35302d(+_0x6257be[_0x324369(0x181)])[_0x324369(0x199)](_0x324369(0x14e)),'personId':_0x6257be[_0x324369(0x1a8)]};}else{const _0x4d8812={'memberId':_0x57a03d,'unitId':_0x422fb3,'content':_0xa817c3,'mention':_0x30f165},_0x2cdfed=await this[_0x324369(0x1b0)][_0x324369(0x183)](_0x324369(0x182)+_0x422fb3+'/add',{'body':_0x4d8812});return X(_0x2cdfed['body'][_0x324369(0x15a)],_0x1739a1);}}async[_0x116374(0x151)](_0x23ac2e){const _0x30f721=_0x116374;var _0x509e8d,_0x471e59;const {text:_0x468c62,unitId:_0x3650dd}=_0x23ac2e,_0xe4063d=(_0x471e59=(_0x509e8d=_0x468c62['customRanges'])==null?void 0x0:_0x509e8d['filter'](_0x2111af=>_0x2111af['rangeType']===_0x56b39f[_0x30f721(0x16c)])['map'](_0x54583a=>_0x54583a[_0x30f721(0x1ab)]))!=null?_0x471e59:[],_0x2b6678=JSON[_0x30f721(0x170)](_0x468c62),_0x5342b8=_0x23ac2e['threadId'],_0x2bb4f1=_0x23ac2e['id'],_0x2cc32c={'memberId':(await this['_sessionService']['requireSession'](_0x3650dd))[_0x30f721(0x189)](),'unitId':_0x3650dd,'threadId':_0x5342b8,'mention':_0xe4063d,'content':_0x2b6678,'replyId':_0x2bb4f1},_0x45e27a=await this[_0x30f721(0x1b0)][_0x30f721(0x183)](_0x30f721(0x182)+_0x3650dd+_0x30f721(0x185),{'body':_0x2cc32c});return!_0x45e27a[_0x30f721(0x154)]['error']||_0x45e27a[_0x30f721(0x154)][_0x30f721(0x157)][_0x30f721(0x16f)]===0x1;}async[_0x116374(0x169)](_0x122aef){const _0x135b1f=_0x116374,{unitId:_0x5f274b}=_0x122aef,_0x1a9a1b=_0x122aef[_0x135b1f(0x15e)],_0x3d4bee={'memberId':this['_userService'][_0x135b1f(0x1a2)]()['userID'],'unitId':_0x5f274b,'threadId':_0x1a9a1b,'solved':_0x122aef[_0x135b1f(0x153)]?I[_0x135b1f(0x175)]:I[_0x135b1f(0x18a)]},_0xe08d89=await this['_httpService'][_0x135b1f(0x183)](_0x135b1f(0x182)+_0x5f274b+_0x135b1f(0x19a),{'body':_0x3d4bee});return!_0xe08d89[_0x135b1f(0x154)][_0x135b1f(0x157)]||_0xe08d89[_0x135b1f(0x154)][_0x135b1f(0x157)][_0x135b1f(0x16f)]===0x1;}async[_0x116374(0x18b)](_0x4c52d9,_0x593095,_0x7a0b28,_0x25c531){const _0x146f79=_0x116374,_0x1a18e9={'memberId':(await this[_0x146f79(0x176)][_0x146f79(0x158)](_0x4c52d9))[_0x146f79(0x189)](),'threadId':_0x7a0b28,'replyId':_0x25c531,'unitId':_0x4c52d9},_0x3bc7ee=await this['_httpService'][_0x146f79(0x183)](_0x146f79(0x182)+_0x4c52d9+_0x146f79(0x19b),{'body':_0x1a18e9});return!_0x3bc7ee[_0x146f79(0x154)][_0x146f79(0x157)]||_0x3bc7ee[_0x146f79(0x154)][_0x146f79(0x157)][_0x146f79(0x16f)]===0x1;}async['listComments'](_0x32b5ff,_0xca5af3,_0x5318a4){const _0x2379e5=_0x116374,_0x4be2ef={'unitId':_0x32b5ff,'threadId':_0x5318a4},_0x106ecf=await this[_0x2379e5(0x1b0)][_0x2379e5(0x183)]('/universer-api/comment/unit/'+_0x32b5ff+_0x2379e5(0x152),{'body':_0x4be2ef}),_0x16bb9a=_0x5318a4['map'](_0x1014a3=>ee(_0x106ecf[_0x2379e5(0x154)][_0x2379e5(0x173)][_0x1014a3],_0x32b5ff,_0xca5af3))['filter'](Boolean);return Object['values'](_0x106ecf[_0x2379e5(0x154)][_0x2379e5(0x16a)])[_0x2379e5(0x1ac)](_0x5b09d5=>{const _0x443159=_0x2379e5;this[_0x443159(0x17f)]['addUser'](_0x5b09d5);}),_0x16bb9a;}[_0x116374(0x19c)](_0x215c21){const _0x179729=_0x116374;return{'id':_0x215c21['id'],'threadId':_0x215c21[_0x179729(0x15e)],'ref':_0x215c21[_0x179729(0x164)]};}};f=Q([_(0x0,_0x2edfc9(_0x53d244)),_(0x1,_0x2edfc9(_0x3dd59f)),_(0x2,_0x2edfc9(_0x3affa4)),_(0x3,_0x2edfc9(_0x348e3e))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x12cf35,_0x3d7be7,_0x53eab4,_0x2a0d30)=>{for(var _0x34a019=_0x2a0d30>0x1?void 0x0:_0x2a0d30?re(_0x3d7be7,_0x53eab4):_0x3d7be7,_0x583e10=_0x12cf35['length']-0x1,_0xdba7c3;_0x583e10>=0x0;_0x583e10--)(_0xdba7c3=_0x12cf35[_0x583e10])&&(_0x34a019=_0xdba7c3(_0x34a019)||_0x34a019);return _0x34a019;},N=(_0x4242ae,_0xa0f25)=>(_0x56bdc7,_0x4ae986)=>_0xa0f25(_0x56bdc7,_0x4ae986,_0x4242ae);let g=class extends _0x5700d0{constructor(_0x1efbad,_0x3f4476){const _0x7959cd=_0x116374;super(),this[_0x7959cd(0x165)]=_0x1efbad,this[_0x7959cd(0x191)]=_0x3f4476,this['_initDataSource']();}['_initDataSource'](){const _0x4fdb0c=_0x116374;this['_threadCommentDataSourceService']['dataSource']=this[_0x4fdb0c(0x191)],this[_0x4fdb0c(0x165)][_0x4fdb0c(0x168)]=!0x1;}};g=te([N(0x0,_0x6d41c1),N(0x1,_0x2edfc9(f))],g);var se=Object['defineProperty'],oe=Object[_0x116374(0x184)],ne=(_0x1b4eb1,_0x2595c4,_0xeb91c0)=>_0x2595c4 in _0x1b4eb1?se(_0x1b4eb1,_0x2595c4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xeb91c0}):_0x1b4eb1[_0x2595c4]=_0xeb91c0,ie=(_0x57dd14,_0x61d335,_0xe3efff,_0xa2f0e2)=>{const _0x326a4d=_0x116374;for(var _0x1a7e36=_0xa2f0e2>0x1?void 0x0:_0xa2f0e2?oe(_0x61d335,_0xe3efff):_0x61d335,_0xc93381=_0x57dd14[_0x326a4d(0x197)]-0x1,_0x389a49;_0xc93381>=0x0;_0xc93381--)(_0x389a49=_0x57dd14[_0xc93381])&&(_0x1a7e36=_0x389a49(_0x1a7e36)||_0x1a7e36);return _0x1a7e36;},w=(_0x226709,_0x103323)=>(_0x4b2a49,_0x2380af)=>_0x103323(_0x4b2a49,_0x2380af,_0x226709),$=(_0x258fd7,_0x47eb50,_0x343202)=>ne(_0x258fd7,typeof _0x47eb50!=_0x116374(0x178)?_0x47eb50+'':_0x47eb50,_0x343202);let b=class extends _0x11dac9{constructor(_0x2816b6=M,_0xe0c638,_0x1c6c1d){const _0x5373d2=_0x116374;super(),this[_0x5373d2(0x161)]=_0x2816b6,this['_injector']=_0xe0c638,this[_0x5373d2(0x163)]=_0x1c6c1d;const {..._0xefe40e}=_0x150f9d({},M,this[_0x5373d2(0x161)]);this['_configService'][_0x5373d2(0x192)](z,_0xefe40e);}['onStarting'](){const _0x49448a=_0x116374;[[f],[g],[S]][_0x49448a(0x1ac)](_0x33aa6b=>{const _0x6e829f=_0x49448a;this[_0x6e829f(0x17e)][_0x6e829f(0x17d)](_0x33aa6b);});}[_0x116374(0x156)](){const _0x11aadd=_0x116374;this[_0x11aadd(0x17e)][_0x11aadd(0x15c)](g),this[_0x11aadd(0x17e)][_0x11aadd(0x15c)](S);}};$(b,'pluginName',W),$(b,_0x116374(0x19f),_0x2b4fac[_0x116374(0x18e)]),b=ie([_0x50dc84(_0x19c732,_0x30e333,_0x187856),w(0x1,_0x2edfc9(_0x348e3e)),w(0x2,_0x136480)],b);export{b as UniverThreadCommentDataSourcePlugin};function _0x23e7(){const _0xc3551=['size','Delete','UNIVER_UNKNOWN','reply','95uEDwRV','_threadCommentDataSource','setConfig','UNRECOGNIZED','/universer-api/user/list','Reply','find','length','root','format','/solved','/delete','saveCommentToSnapshot','15259900gvRydS','replies','type','Solve','unitId','getCurrentUser','6271867PuqDmH','1772416YhzFes','getUser','thread-comment-data-source.config','getUnit','userId','994JXGTuA','addComment','rangeId','forEach','_init','delete','getComment','_httpService','YYYY/MM/DD\x20HH:mm','disposeWithMe','101844VRVIQV','updateComment','/list','resolved','body','userID','onReady','error','requireSession','map','comment','538SWsdiY','get','user','threadId','payload','Edit','_config','27738rcTfNH','_configService','ref','_threadCommentDataSourceService','parse','solved','syncUpdateMutationToColla','resolveComment','users','replyId','COMMENT','customRanges','parentId','code','stringify','_initUserSync','rangeType','comments','24GZLJFy','Solved','_sessionService','subscribe','symbol','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','pipe','addUser','commentUpdate$','add','_injector','_userService','1857273JsZHbq','createTimestamp','/universer-api/comment/unit/','post','getOwnPropertyDescriptor','/edit','content','Add','_threadCommentModel','getMemberID','OpenOrReOpen','deleteComment'];_0x23e7=function(){return _0xc3551;};return _0x23e7();}
|
|
1
|
+
const _0x3125a2=_0x44fb;(function(_0x41e1e5,_0xe00b07){const _0x1c28cb=_0x44fb,_0x39dbf5=_0x41e1e5();while(!![]){try{const _0x17feb2=parseInt(_0x1c28cb(0x18f))/0x1*(-parseInt(_0x1c28cb(0x199))/0x2)+parseInt(_0x1c28cb(0x1a9))/0x3+-parseInt(_0x1c28cb(0x1a5))/0x4+-parseInt(_0x1c28cb(0x1d2))/0x5+-parseInt(_0x1c28cb(0x1a8))/0x6*(-parseInt(_0x1c28cb(0x1b1))/0x7)+-parseInt(_0x1c28cb(0x1d1))/0x8*(-parseInt(_0x1c28cb(0x1b7))/0x9)+parseInt(_0x1c28cb(0x1c9))/0xa*(parseInt(_0x1c28cb(0x1a2))/0xb);if(_0x17feb2===_0xe00b07)break;else _0x39dbf5['push'](_0x39dbf5['shift']());}catch(_0x24c704){_0x39dbf5['push'](_0x39dbf5['shift']());}}}(_0x2427,0xd6d34));import{CommentService as _0x28c565,CollaborationSessionService as _0x3cf7e3,UniverCollaborationClientPlugin as _0x12a624}from'@univerjs-pro/collaboration-client';function _0x2427(){const _0x2925b9=['payload','format','8dncZuI','1515075ShBbBd','_userService','parse','getMemberID','solved','find','resolveComment','unitId','Delete','delete','post','_commentService','pluginName','getUnit','UNRECOGNIZED','/add','Solve','_httpService','/universer-api/user/list','size','resolved','userId','root','_config','rangeType','Solved','onReady','syncUpdateMutationToColla','forEach','saveCommentToSnapshot','get','YYYY/MM/DD\x20HH:mm','comments','Add','OpenOrReOpen','subscribe','personId','requireSession','9bcyeDc','/universer-api/comment/unit/','userID','getComment','threadId','slice','Edit','_initDataSource','replies','_configService','356744Wubiae','body','commentUpdate$','Reply','rangeId','code','/delete','_sessionService','length','22bNUBak','stringify','customRanges','4074688hpXWEt','dataSource','reply','194478OnvweG','4268274oFerap','error','/edit','createTimestamp','pipe','/reply','deleteComment','parentId','98BfMYpU','_init','Unknown','replyId','_threadCommentModel','_initUserSync','11508309wjDKyO','addUser','_threadCommentDataSource','_threadCommentDataSourceService','COMMENT','getUser','users','add','disposeWithMe','_injector','setConfig','addComment','content','map','defineProperty','comment','user','ref','3258590oXsteK','UNIVER_UNKNOWN','updateComment','type','filter','getOwnPropertyDescriptor'];_0x2427=function(){return _0x2925b9;};return _0x2427();}function _0x44fb(_0x3ffcd7,_0x2b8992){const _0x24278a=_0x2427();return _0x44fb=function(_0x44fb18,_0x8e07fd){_0x44fb18=_0x44fb18-0x183;let _0x18e74e=_0x24278a[_0x44fb18];return _0x18e74e;},_0x44fb(_0x3ffcd7,_0x2b8992);}import{UniverLicensePlugin as _0x2e3ca3}from'@univerjs-pro/license';import{dayjs as _0x466984,UserManagerService as _0x877d29,Inject as _0x5223ea,Injector as _0x579925,Disposable as _0x2c471d,CustomRangeType as _0x1659d6,UniverInstanceType as _0x4f26b0,DependentOn as _0x3f95ef,IConfigService as _0x5a7661,Plugin as _0x42ff71,merge as _0x497adb}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x479164}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2de7ff,IThreadCommentDataSourceService as _0x1af45c}from'@univerjs/thread-comment';import{bufferTime as _0x5a8fb7}from'rxjs';import{HTTPService as _0x3180ef}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xe3f0c8=>(_0xe3f0c8[_0xe3f0c8[_0x3125a2(0x18b)]=0x0]='OpenOrReOpen',_0xe3f0c8[_0xe3f0c8[_0x3125a2(0x1eb)]=0x1]=_0x3125a2(0x1eb),_0xe3f0c8[_0xe3f0c8['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0xe3f0c8))(I||{}),v=(_0x4c5f55=>(_0x4c5f55[_0x4c5f55[_0x3125a2(0x1b3)]=0x0]=_0x3125a2(0x1b3),_0x4c5f55[_0x4c5f55['Add']=0x1]=_0x3125a2(0x18a),_0x4c5f55[_0x4c5f55[_0x3125a2(0x19c)]=0x2]=_0x3125a2(0x19c),_0x4c5f55[_0x4c5f55[_0x3125a2(0x195)]=0x3]=_0x3125a2(0x195),_0x4c5f55[_0x4c5f55[_0x3125a2(0x1da)]=0x4]=_0x3125a2(0x1da),_0x4c5f55[_0x4c5f55['Solve']=0x5]='Solve',_0x4c5f55[_0x4c5f55[_0x3125a2(0x1e0)]=-0x1]='UNRECOGNIZED',_0x4c5f55))(v||{});const D=_0x2b313a=>_0x466984(new Date(+_0x2b313a))[_0x3125a2(0x1d0)](_0x3125a2(0x188)),B=async(_0x3202d6,_0x270c55)=>{const _0x51211b=_0x3125a2,_0x1628b6=_0x3202d6[_0x51211b(0x187)](_0x877d29),_0x519477=_0x3202d6[_0x51211b(0x187)](_0x3180ef);_0x270c55[_0x51211b(0x185)](_0x42b6d9=>{const _0x4213e7=_0x51211b;_0x1628b6[_0x4213e7(0x1bc)](_0x42b6d9)&&_0x270c55[_0x4213e7(0x1db)](_0x42b6d9);}),_0x270c55[_0x51211b(0x1e5)]&&(await _0x519477['get'](_0x51211b(0x1e4),{'params':{'userIDs':[..._0x270c55]}}))[_0x51211b(0x19a)][_0x51211b(0x1bd)][_0x51211b(0x185)](_0x837705=>{const _0x2f9e68=_0x51211b;_0x837705&&_0x1628b6[_0x2f9e68(0x1b8)](_0x837705);});};var K=Object[_0x3125a2(0x1ce)],V=(_0x3a9b9d,_0x397d31,_0x59d0e8,_0x582354)=>{for(var _0x136155=_0x582354>0x1?void 0x0:_0x582354?K(_0x397d31,_0x59d0e8):_0x397d31,_0x11ff5a=_0x3a9b9d['length']-0x1,_0x5c633b;_0x11ff5a>=0x0;_0x11ff5a--)(_0x5c633b=_0x3a9b9d[_0x11ff5a])&&(_0x136155=_0x5c633b(_0x136155)||_0x136155);return _0x136155;},p=(_0x48c30e,_0x3f79eb)=>(_0x2d6beb,_0x41d856)=>_0x3f79eb(_0x2d6beb,_0x41d856,_0x48c30e);let S=class extends _0x2c471d{constructor(_0x2aa13d,_0x1c09b5,_0x3581e4,_0x53cd1c){const _0x396faf=_0x3125a2;super(),this['_commentService']=_0x2aa13d,this[_0x396faf(0x1b5)]=_0x1c09b5,this[_0x396faf(0x1d3)]=_0x3581e4,this[_0x396faf(0x1c0)]=_0x53cd1c,this['_init'](),this[_0x396faf(0x1b6)]();}[_0x3125a2(0x1b6)](){const _0x2ceda4=_0x3125a2;this[_0x2ceda4(0x1bf)](this[_0x2ceda4(0x1b5)]['commentUpdate$'][_0x2ceda4(0x1ad)](_0x5a8fb7(0x10))[_0x2ceda4(0x18c)](_0x424028=>{const _0x256207=_0x2ceda4,_0x5cf6ca=new Set();_0x424028['forEach'](_0x2c3930=>{const _0x4fb22f=_0x44fb;switch(_0x2c3930[_0x4fb22f(0x1cc)]){case _0x4fb22f(0x1be):{const _0x464d2d=_0x2c3930[_0x4fb22f(0x1cf)][_0x4fb22f(0x18d)];_0x5cf6ca[_0x4fb22f(0x1be)](_0x464d2d);break;}}}),B(this[_0x256207(0x1c0)],_0x5cf6ca);}));}[_0x3125a2(0x1b2)](){const _0x1bcace=_0x3125a2;this[_0x1bcace(0x1bf)](this[_0x1bcace(0x1dd)][_0x1bcace(0x19b)][_0x1bcace(0x18c)](async _0x431dcc=>{const _0x48128a=_0x1bcace;var _0x44c3ab,_0x26b813,_0x2dc8b6,_0xfdc3bc;const _0x3829b4=(_0x44c3ab=this[_0x48128a(0x1b5)][_0x48128a(0x1df)](_0x431dcc[_0x48128a(0x1d9)])['find'](_0x1b27dc=>_0x1b27dc[_0x48128a(0x193)]===_0x431dcc[_0x48128a(0x193)]))==null?void 0x0:_0x44c3ab[_0x48128a(0x1e8)];if(!_0x3829b4)return;const {unitId:_0x5101e9,subUnitId:_0x441c03}=_0x3829b4;switch(_0x431dcc[_0x48128a(0x1c7)]&&this[_0x48128a(0x1d3)]['addUser'](_0x431dcc[_0x48128a(0x1c7)]),_0x431dcc[_0x48128a(0x1cc)]){case v[_0x48128a(0x18a)]:break;case v[_0x48128a(0x19c)]:{this[_0x48128a(0x1b5)][_0x48128a(0x1c2)](_0x5101e9,_0x441c03,{'unitId':_0x5101e9,'subUnitId':_0x441c03,'ref':'','id':_0x431dcc['replyId'],'dT':D(+_0x431dcc[_0x48128a(0x1ac)]),'threadId':_0x431dcc[_0x48128a(0x193)],'personId':(_0x2dc8b6=(_0x26b813=_0x431dcc[_0x48128a(0x1c7)])==null?void 0x0:_0x26b813[_0x48128a(0x191)])!=null?_0x2dc8b6:_0x431dcc[_0x48128a(0x1e7)],'text':JSON[_0x48128a(0x1d4)](_0x431dcc[_0x48128a(0x1c3)]),'parentId':_0x3829b4['id']});break;}case v[_0x48128a(0x1da)]:{const _0x9fbc9a=this[_0x48128a(0x1b5)][_0x48128a(0x192)](_0x5101e9,_0x441c03,_0x431dcc['replyId']);_0x9fbc9a&&_0x9fbc9a[_0x48128a(0x1b0)]&&this[_0x48128a(0x1b5)][_0x48128a(0x1af)](_0x5101e9,_0x441c03,_0x431dcc[_0x48128a(0x1b4)]);break;}case v['Edit']:{this[_0x48128a(0x1b5)]['updateComment'](_0x5101e9,_0x441c03,{'commentId':_0x431dcc[_0x48128a(0x1b4)],'text':JSON[_0x48128a(0x1d4)](_0x431dcc[_0x48128a(0x1c3)])});break;}case v[_0x48128a(0x1e2)]:{const _0x9c79a4=(_0xfdc3bc=this[_0x48128a(0x1b5)][_0x48128a(0x1df)](_0x431dcc[_0x48128a(0x1d9)])[_0x48128a(0x1d7)](_0x4ee24d=>_0x4ee24d[_0x48128a(0x193)]===_0x431dcc[_0x48128a(0x193)]))==null?void 0x0:_0xfdc3bc[_0x48128a(0x1e8)];_0x9c79a4&&this[_0x48128a(0x1b5)][_0x48128a(0x1d8)](_0x5101e9,_0x441c03,_0x9c79a4['id'],_0x431dcc[_0x48128a(0x1d6)]===I[_0x48128a(0x1eb)]);break;}}}));}};S=V([p(0x0,_0x5223ea(_0x28c565)),p(0x1,_0x5223ea(_0x2de7ff)),p(0x2,_0x5223ea(_0x877d29)),p(0x3,_0x5223ea(_0x579925))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x339343,_0x5ca4ea,_0x515898,_0x5ad8d2)=>{const _0x562ed1=_0x3125a2;for(var _0x514722=_0x5ad8d2>0x1?void 0x0:_0x5ad8d2?k(_0x5ca4ea,_0x515898):_0x5ca4ea,_0x45b5b1=_0x339343[_0x562ed1(0x1a1)]-0x1,_0x5827c5;_0x45b5b1>=0x0;_0x45b5b1--)(_0x5827c5=_0x339343[_0x45b5b1])&&(_0x514722=_0x5827c5(_0x514722)||_0x514722);return _0x514722;},_=(_0x217570,_0x353cd8)=>(_0x34130b,_0x4bc6f3)=>_0x353cd8(_0x34130b,_0x4bc6f3,_0x217570);function X(_0x52403d,_0x146f9e){const _0x3523f6=_0x3125a2,_0x128473=_0x52403d[_0x3523f6(0x197)][0x0];return{..._0x146f9e,'id':_0x128473[_0x3523f6(0x1b4)],'resolved':_0x52403d[_0x3523f6(0x1d6)]===0x1,'dT':D(_0x128473[_0x3523f6(0x1ac)]),'personId':_0x128473[_0x3523f6(0x1e7)],'threadId':_0x128473[_0x3523f6(0x193)]};}function ee(_0x1db493,_0x512efd,_0xfd8a7f){const _0x2c1385=_0x3125a2;var _0x3b0383,_0xeaafa9;if(((_0xeaafa9=(_0x3b0383=_0x1db493==null?void 0x0:_0x1db493['replies'])==null?void 0x0:_0x3b0383[_0x2c1385(0x1a1)])!=null?_0xeaafa9:0x0)>0x0){const _0x28fc8a=(_0x3402db,_0x3712e2)=>({'id':_0x3402db[_0x2c1385(0x1b4)],'threadId':_0x3402db['threadId'],'dT':D(_0x3402db[_0x2c1385(0x1ac)]),'personId':_0x3402db[_0x2c1385(0x1e7)],'resolved':_0x1db493['solved']===I[_0x2c1385(0x1eb)],'unitId':_0x512efd,'subUnitId':_0xfd8a7f,'text':JSON[_0x2c1385(0x1d4)](_0x3402db['content']),'parentId':_0x3712e2}),_0x464864=_0x28fc8a(_0x1db493[_0x2c1385(0x197)][0x0]);return{..._0x464864,'children':_0x1db493[_0x2c1385(0x197)][_0x2c1385(0x194)](0x1)[_0x2c1385(0x1c4)](_0x443b83=>_0x28fc8a(_0x443b83,_0x464864['id']))};}return null;}let f=class{constructor(_0x5e7810,_0x244858,_0x16f12e,_0x4b3b62){const _0x85b0bf=_0x3125a2;this[_0x85b0bf(0x1e3)]=_0x5e7810,this[_0x85b0bf(0x1d3)]=_0x244858,this[_0x85b0bf(0x1a0)]=_0x16f12e,this[_0x85b0bf(0x1c0)]=_0x4b3b62;}async['addComment'](_0x3ee18f){const _0x1a78c9=_0x3125a2;var _0x133bf3,_0x3d7aa0;const {parentId:_0x5f38a5,unitId:_0x5cb725,text:_0x3a8071,threadId:_0x7bc1d3}=_0x3ee18f,_0x5b316b=(_0x3d7aa0=(_0x133bf3=_0x3a8071[_0x1a78c9(0x1a4)])==null?void 0x0:_0x133bf3[_0x1a78c9(0x1cd)](_0x4bd2d1=>_0x4bd2d1['rangeType']===_0x1659d6[_0x1a78c9(0x1bb)])[_0x1a78c9(0x1c4)](_0x1bb3bc=>_0x1bb3bc[_0x1a78c9(0x19d)]))!=null?_0x3d7aa0:[],_0x4b28c0=JSON[_0x1a78c9(0x1a3)](_0x3a8071),_0x33d650=(await this[_0x1a78c9(0x1a0)][_0x1a78c9(0x18e)](_0x5cb725))[_0x1a78c9(0x1d5)]();if(_0x5f38a5){const _0x2afe42={'memberId':_0x33d650,'unitId':_0x5cb725,'content':_0x4b28c0,'mention':_0x5b316b,'threadId':_0x7bc1d3},_0x1d8332=(await this[_0x1a78c9(0x1e3)][_0x1a78c9(0x1dc)](_0x1a78c9(0x190)+_0x5cb725+_0x1a78c9(0x1ae),{'body':_0x2afe42}))[_0x1a78c9(0x19a)][_0x1a78c9(0x1a7)];return{..._0x3ee18f,'id':_0x1d8332[_0x1a78c9(0x1b4)],'dT':_0x466984(+_0x1d8332['createTimestamp'])[_0x1a78c9(0x1d0)](_0x1a78c9(0x188)),'personId':_0x1d8332[_0x1a78c9(0x1e7)]};}else{const _0x41a107={'memberId':_0x33d650,'unitId':_0x5cb725,'content':_0x4b28c0,'mention':_0x5b316b},_0x2b65d3=await this[_0x1a78c9(0x1e3)]['post']('/universer-api/comment/unit/'+_0x5cb725+_0x1a78c9(0x1e1),{'body':_0x41a107});return X(_0x2b65d3[_0x1a78c9(0x19a)][_0x1a78c9(0x1c6)],_0x3ee18f);}}async[_0x3125a2(0x1cb)](_0x37eeec){const _0x25041b=_0x3125a2;var _0x121bec,_0x57373c;const {text:_0x5b7800,unitId:_0x5e4448}=_0x37eeec,_0x1f7640=(_0x57373c=(_0x121bec=_0x5b7800[_0x25041b(0x1a4)])==null?void 0x0:_0x121bec['filter'](_0x381e66=>_0x381e66[_0x25041b(0x1ea)]===_0x1659d6[_0x25041b(0x1bb)])[_0x25041b(0x1c4)](_0x3dedb5=>_0x3dedb5['rangeId']))!=null?_0x57373c:[],_0x311b66=JSON[_0x25041b(0x1a3)](_0x5b7800),_0x59f8fc=_0x37eeec[_0x25041b(0x193)],_0x25b162=_0x37eeec['id'],_0x30c16b={'memberId':(await this['_sessionService'][_0x25041b(0x18e)](_0x5e4448))['getMemberID'](),'unitId':_0x5e4448,'threadId':_0x59f8fc,'mention':_0x1f7640,'content':_0x311b66,'replyId':_0x25b162},_0x22749f=await this[_0x25041b(0x1e3)][_0x25041b(0x1dc)](_0x25041b(0x190)+_0x5e4448+_0x25041b(0x1ab),{'body':_0x30c16b});return!_0x22749f[_0x25041b(0x19a)]['error']||_0x22749f['body'][_0x25041b(0x1aa)]['code']===0x1;}async[_0x3125a2(0x1d8)](_0x2a14f8){const _0x40ccaf=_0x3125a2,{unitId:_0x489c2b}=_0x2a14f8,_0x52e3b4=_0x2a14f8['threadId'],_0x4e21bf={'memberId':this[_0x40ccaf(0x1d3)]['getCurrentUser']()[_0x40ccaf(0x191)],'unitId':_0x489c2b,'threadId':_0x52e3b4,'solved':_0x2a14f8[_0x40ccaf(0x1e6)]?I[_0x40ccaf(0x1eb)]:I[_0x40ccaf(0x18b)]},_0x1db968=await this[_0x40ccaf(0x1e3)][_0x40ccaf(0x1dc)]('/universer-api/comment/unit/'+_0x489c2b+'/solved',{'body':_0x4e21bf});return!_0x1db968[_0x40ccaf(0x19a)][_0x40ccaf(0x1aa)]||_0x1db968['body']['error'][_0x40ccaf(0x19e)]===0x1;}async[_0x3125a2(0x1af)](_0x47ea3b,_0x575d24,_0x5a38fc,_0x37576b){const _0x427b51=_0x3125a2,_0x20b236={'memberId':(await this[_0x427b51(0x1a0)][_0x427b51(0x18e)](_0x47ea3b))[_0x427b51(0x1d5)](),'threadId':_0x5a38fc,'replyId':_0x37576b,'unitId':_0x47ea3b},_0x29988b=await this[_0x427b51(0x1e3)]['post'](_0x427b51(0x190)+_0x47ea3b+_0x427b51(0x19f),{'body':_0x20b236});return!_0x29988b[_0x427b51(0x19a)][_0x427b51(0x1aa)]||_0x29988b[_0x427b51(0x19a)][_0x427b51(0x1aa)]['code']===0x1;}async['listComments'](_0x2bc9fe,_0x39697a,_0x40d39f){const _0x1cd8f2=_0x3125a2,_0x37e3a6={'unitId':_0x2bc9fe,'threadId':_0x40d39f},_0x4035ea=await this[_0x1cd8f2(0x1e3)][_0x1cd8f2(0x1dc)]('/universer-api/comment/unit/'+_0x2bc9fe+'/list',{'body':_0x37e3a6}),_0x5d87a3=_0x40d39f[_0x1cd8f2(0x1c4)](_0x3bfb6f=>ee(_0x4035ea[_0x1cd8f2(0x19a)][_0x1cd8f2(0x189)][_0x3bfb6f],_0x2bc9fe,_0x39697a))[_0x1cd8f2(0x1cd)](Boolean);return Object['values'](_0x4035ea[_0x1cd8f2(0x19a)][_0x1cd8f2(0x1bd)])[_0x1cd8f2(0x185)](_0x2d6c53=>{const _0x4c22e6=_0x1cd8f2;this[_0x4c22e6(0x1d3)][_0x4c22e6(0x1b8)](_0x2d6c53);}),_0x5d87a3;}[_0x3125a2(0x186)](_0x4e731a){const _0x1b5ee4=_0x3125a2;return{'id':_0x4e731a['id'],'threadId':_0x4e731a['threadId'],'ref':_0x4e731a[_0x1b5ee4(0x1c8)]};}};f=Q([_(0x0,_0x5223ea(_0x3180ef)),_(0x1,_0x5223ea(_0x877d29)),_(0x2,_0x5223ea(_0x3cf7e3)),_(0x3,_0x5223ea(_0x579925))],f);var re=Object[_0x3125a2(0x1ce)],te=(_0xd462e3,_0x16abe7,_0xe23e81,_0x459ecf)=>{const _0x26a76c=_0x3125a2;for(var _0x335403=_0x459ecf>0x1?void 0x0:_0x459ecf?re(_0x16abe7,_0xe23e81):_0x16abe7,_0x4be48d=_0xd462e3[_0x26a76c(0x1a1)]-0x1,_0x52836a;_0x4be48d>=0x0;_0x4be48d--)(_0x52836a=_0xd462e3[_0x4be48d])&&(_0x335403=_0x52836a(_0x335403)||_0x335403);return _0x335403;},N=(_0x96acf6,_0x39be77)=>(_0x214eb2,_0x18c445)=>_0x39be77(_0x214eb2,_0x18c445,_0x96acf6);let g=class extends _0x2c471d{constructor(_0x15a458,_0x597fbd){const _0x286543=_0x3125a2;super(),this[_0x286543(0x1ba)]=_0x15a458,this['_threadCommentDataSource']=_0x597fbd,this[_0x286543(0x196)]();}[_0x3125a2(0x196)](){const _0x50f769=_0x3125a2;this['_threadCommentDataSourceService'][_0x50f769(0x1a6)]=this[_0x50f769(0x1b9)],this[_0x50f769(0x1ba)][_0x50f769(0x184)]=!0x1;}};g=te([N(0x0,_0x1af45c),N(0x1,_0x5223ea(f))],g);var se=Object[_0x3125a2(0x1c5)],oe=Object[_0x3125a2(0x1ce)],ne=(_0x266f15,_0x503b35,_0x1e4829)=>_0x503b35 in _0x266f15?se(_0x266f15,_0x503b35,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1e4829}):_0x266f15[_0x503b35]=_0x1e4829,ie=(_0x56f65e,_0x129f98,_0x146749,_0x2413be)=>{const _0x2d529f=_0x3125a2;for(var _0x38eb4a=_0x2413be>0x1?void 0x0:_0x2413be?oe(_0x129f98,_0x146749):_0x129f98,_0x3d30d3=_0x56f65e[_0x2d529f(0x1a1)]-0x1,_0x54434a;_0x3d30d3>=0x0;_0x3d30d3--)(_0x54434a=_0x56f65e[_0x3d30d3])&&(_0x38eb4a=_0x54434a(_0x38eb4a)||_0x38eb4a);return _0x38eb4a;},w=(_0x4fb7e9,_0x58466c)=>(_0x1e8905,_0x2fd2c6)=>_0x58466c(_0x1e8905,_0x2fd2c6,_0x4fb7e9),$=(_0x22094a,_0x250a00,_0x46b1e7)=>ne(_0x22094a,typeof _0x250a00!='symbol'?_0x250a00+'':_0x250a00,_0x46b1e7);let b=class extends _0x42ff71{constructor(_0x58ce75=M,_0x22ad1f,_0x293b86){const _0xed3bcc=_0x3125a2;super(),this[_0xed3bcc(0x1e9)]=_0x58ce75,this[_0xed3bcc(0x1c0)]=_0x22ad1f,this[_0xed3bcc(0x198)]=_0x293b86;const {..._0x3d5040}=_0x497adb({},M,this['_config']);this['_configService'][_0xed3bcc(0x1c1)](z,_0x3d5040);}['onStarting'](){const _0x11568e=_0x3125a2;[[f],[g],[S]][_0x11568e(0x185)](_0x2bf256=>{const _0x465e08=_0x11568e;this['_injector'][_0x465e08(0x1be)](_0x2bf256);});}[_0x3125a2(0x183)](){const _0x4da96d=_0x3125a2;this[_0x4da96d(0x1c0)][_0x4da96d(0x187)](g),this[_0x4da96d(0x1c0)][_0x4da96d(0x187)](S);}};$(b,_0x3125a2(0x1de),W),$(b,'type',_0x4f26b0[_0x3125a2(0x1ca)]),b=ie([_0x3f95ef(_0x479164,_0x12a624,_0x2e3ca3),w(0x1,_0x5223ea(_0x579925)),w(0x2,_0x5a7661)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0xb4ca(_0x5931e0,_0x56b725){const _0x168aa0=_0x168a();return _0xb4ca=function(_0xb4ca5a,_0x5b5926){_0xb4ca5a=_0xb4ca5a-0x10e;let _0xb28201=_0x168aa0[_0xb4ca5a];return _0xb28201;},_0xb4ca(_0x5931e0,_0x56b725);}(function(_0x3c8361,_0x420479){const _0x363ce6=_0xb4ca,_0x2960ca=_0x3c8361();while(!![]){try{const _0x5f29fb=-parseInt(_0x363ce6(0x18e))/0x1*(-parseInt(_0x363ce6(0x150))/0x2)+parseInt(_0x363ce6(0x18c))/0x3+-parseInt(_0x363ce6(0x186))/0x4*(-parseInt(_0x363ce6(0x11a))/0x5)+-parseInt(_0x363ce6(0x112))/0x6*(-parseInt(_0x363ce6(0x17b))/0x7)+parseInt(_0x363ce6(0x18d))/0x8*(-parseInt(_0x363ce6(0x17a))/0x9)+-parseInt(_0x363ce6(0x187))/0xa*(-parseInt(_0x363ce6(0x118))/0xb)+-parseInt(_0x363ce6(0x117))/0xc;if(_0x5f29fb===_0x420479)break;else _0x2960ca['push'](_0x2960ca['shift']());}catch(_0x5a2198){_0x2960ca['push'](_0x2960ca['shift']());}}}(_0x168a,0xc0620),function(_0x36ca40,_0x446d05){const _0x22b554=_0xb4ca;typeof exports=='object'&&typeof module<'u'?_0x446d05(exports,require(_0x22b554(0x16c)),require(_0x22b554(0x12d)),require(_0x22b554(0x12e)),require(_0x22b554(0x153)),require('@univerjs/thread-comment'),require(_0x22b554(0x176)),require(_0x22b554(0x13a))):typeof define==_0x22b554(0x12f)&&define[_0x22b554(0x160)]?define([_0x22b554(0x189),_0x22b554(0x16c),'@univerjs-pro/license',_0x22b554(0x12e),_0x22b554(0x153),_0x22b554(0x175),'rxjs',_0x22b554(0x13a)],_0x446d05):(_0x36ca40=typeof globalThis<'u'?globalThis:_0x36ca40||self,_0x446d05(_0x36ca40['UniverProThreadCommentDatasource']={},_0x36ca40[_0x22b554(0x147)],_0x36ca40[_0x22b554(0x11f)],_0x36ca40['UniverCore'],_0x36ca40[_0x22b554(0x15c)],_0x36ca40[_0x22b554(0x180)],_0x36ca40[_0x22b554(0x176)],_0x36ca40['UniverNetwork']));}(this,function(_0x56f02d,_0x1873ef,_0x43a539,_0x3b2c84,_0x2a5c4f,_0x53df5c,_0x5f7765,_0x1ae3fe){'use strict';const _0x368673=_0xb4ca;const _0x553b42=_0x368673(0x152);var _0xf2a2bd=(_0x1cc6d5=>(_0x1cc6d5[_0x1cc6d5[_0x368673(0x183)]=0x0]=_0x368673(0x183),_0x1cc6d5[_0x1cc6d5[_0x368673(0x173)]=0x1]=_0x368673(0x173),_0x1cc6d5[_0x1cc6d5[_0x368673(0x11b)]=-0x1]=_0x368673(0x11b),_0x1cc6d5))(_0xf2a2bd||{}),_0x433cbe=(_0x186b1f=>(_0x186b1f[_0x186b1f[_0x368673(0x13d)]=0x0]=_0x368673(0x13d),_0x186b1f[_0x186b1f[_0x368673(0x10f)]=0x1]=_0x368673(0x10f),_0x186b1f[_0x186b1f[_0x368673(0x139)]=0x2]=_0x368673(0x139),_0x186b1f[_0x186b1f[_0x368673(0x14f)]=0x3]='Edit',_0x186b1f[_0x186b1f[_0x368673(0x113)]=0x4]=_0x368673(0x113),_0x186b1f[_0x186b1f[_0x368673(0x179)]=0x5]=_0x368673(0x179),_0x186b1f[_0x186b1f['UNRECOGNIZED']=-0x1]=_0x368673(0x11b),_0x186b1f))(_0x433cbe||{});const _0xcbe2b0=_0x23426c=>_0x3b2c84[_0x368673(0x163)](new Date(+_0x23426c))[_0x368673(0x162)](_0x368673(0x18a)),_0x388cc5=async(_0x517255,_0x170c46)=>{const _0x32acad=_0x368673,_0x1f607b=_0x517255['get'](_0x3b2c84['UserManagerService']),_0x502854=_0x517255[_0x32acad(0x13f)](_0x1ae3fe['HTTPService']);_0x170c46[_0x32acad(0x116)](_0x3f2375=>{const _0x1057f3=_0x32acad;_0x1f607b[_0x1057f3(0x178)](_0x3f2375)&&_0x170c46[_0x1057f3(0x161)](_0x3f2375);}),_0x170c46[_0x32acad(0x171)]&&(await _0x502854[_0x32acad(0x13f)](_0x32acad(0x190),{'params':{'userIDs':[..._0x170c46]}}))[_0x32acad(0x125)][_0x32acad(0x136)][_0x32acad(0x116)](_0x40999d=>{const _0x40302b=_0x32acad;_0x40999d&&_0x1f607b[_0x40302b(0x143)](_0x40999d);});};var _0x2b7223=Object[_0x368673(0x184)],_0x567497=(_0x11f149,_0x159dd7,_0x2c6eaa,_0x370c4b)=>{const _0xdfb3ec=_0x368673;for(var _0x435d40=_0x370c4b>0x1?void 0x0:_0x370c4b?_0x2b7223(_0x159dd7,_0x2c6eaa):_0x159dd7,_0x76ede=_0x11f149[_0xdfb3ec(0x169)]-0x1,_0x1d49ed;_0x76ede>=0x0;_0x76ede--)(_0x1d49ed=_0x11f149[_0x76ede])&&(_0x435d40=_0x1d49ed(_0x435d40)||_0x435d40);return _0x435d40;},_0x47a0c9=(_0x56c960,_0x3d01a5)=>(_0x18b6cc,_0x2b7be9)=>_0x3d01a5(_0x18b6cc,_0x2b7be9,_0x56c960);let _0xc0a2db=class extends _0x3b2c84[_0x368673(0x172)]{constructor(_0x4c20b5,_0x2dd7ff,_0x1b08bf,_0x586ed0){const _0x227f74=_0x368673;super(),this[_0x227f74(0x124)]=_0x4c20b5,this[_0x227f74(0x111)]=_0x2dd7ff,this['_userService']=_0x1b08bf,this['_injector']=_0x586ed0,this[_0x227f74(0x13b)](),this[_0x227f74(0x182)]();}[_0x368673(0x182)](){const _0x38aff7=_0x368673;this[_0x38aff7(0x154)](this['_threadCommentModel'][_0x38aff7(0x138)]['pipe'](_0x5f7765[_0x38aff7(0x194)](0x10))[_0x38aff7(0x181)](_0x21611d=>{const _0xb631fa=_0x38aff7,_0xd2f476=new Set();_0x21611d[_0xb631fa(0x116)](_0x94bd27=>{const _0x922520=_0xb631fa;switch(_0x94bd27[_0x922520(0x192)]){case _0x922520(0x17f):{const _0x1c8662=_0x94bd27['payload'][_0x922520(0x146)];_0xd2f476[_0x922520(0x17f)](_0x1c8662);break;}}}),_0x388cc5(this[_0xb631fa(0x15f)],_0xd2f476);}));}['_init'](){const _0x315fbc=_0x368673;this['disposeWithMe'](this['_commentService'][_0x315fbc(0x138)][_0x315fbc(0x181)](async _0x5a51be=>{const _0x3d9d6e=_0x315fbc;var _0xb23201,_0x56faf2,_0x1d5458,_0xab6039;const _0x2f6683=(_0xb23201=this[_0x3d9d6e(0x111)]['getUnit'](_0x5a51be[_0x3d9d6e(0x141)])['find'](_0x13ff33=>_0x13ff33[_0x3d9d6e(0x114)]===_0x5a51be[_0x3d9d6e(0x114)]))==null?void 0x0:_0xb23201[_0x3d9d6e(0x16f)];if(!_0x2f6683)return;const {unitId:_0x28bd6d,subUnitId:_0x2c7933}=_0x2f6683;switch(_0x5a51be['user']&&this[_0x3d9d6e(0x115)][_0x3d9d6e(0x143)](_0x5a51be[_0x3d9d6e(0x193)]),_0x5a51be[_0x3d9d6e(0x192)]){case _0x433cbe['Add']:break;case _0x433cbe[_0x3d9d6e(0x139)]:{this[_0x3d9d6e(0x111)]['addComment'](_0x28bd6d,_0x2c7933,{'unitId':_0x28bd6d,'subUnitId':_0x2c7933,'ref':'','id':_0x5a51be['replyId'],'dT':_0xcbe2b0(+_0x5a51be[_0x3d9d6e(0x15a)]),'threadId':_0x5a51be[_0x3d9d6e(0x114)],'personId':(_0x1d5458=(_0x56faf2=_0x5a51be[_0x3d9d6e(0x193)])==null?void 0x0:_0x56faf2[_0x3d9d6e(0x12b)])!=null?_0x1d5458:_0x5a51be[_0x3d9d6e(0x131)],'text':JSON[_0x3d9d6e(0x122)](_0x5a51be['content']),'parentId':_0x2f6683['id']});break;}case _0x433cbe[_0x3d9d6e(0x113)]:{const _0x300f95=this[_0x3d9d6e(0x111)]['getComment'](_0x28bd6d,_0x2c7933,_0x5a51be[_0x3d9d6e(0x155)]);_0x300f95&&_0x300f95[_0x3d9d6e(0x145)]&&this[_0x3d9d6e(0x111)][_0x3d9d6e(0x151)](_0x28bd6d,_0x2c7933,_0x5a51be[_0x3d9d6e(0x155)]);break;}case _0x433cbe[_0x3d9d6e(0x14f)]:{this[_0x3d9d6e(0x111)]['updateComment'](_0x28bd6d,_0x2c7933,{'commentId':_0x5a51be[_0x3d9d6e(0x155)],'text':JSON['parse'](_0x5a51be[_0x3d9d6e(0x188)])});break;}case _0x433cbe['Solve']:{const _0x29fee6=(_0xab6039=this[_0x3d9d6e(0x111)][_0x3d9d6e(0x142)](_0x5a51be['unitId'])['find'](_0x4688f0=>_0x4688f0[_0x3d9d6e(0x114)]===_0x5a51be['threadId']))==null?void 0x0:_0xab6039[_0x3d9d6e(0x16f)];_0x29fee6&&this[_0x3d9d6e(0x111)][_0x3d9d6e(0x11c)](_0x28bd6d,_0x2c7933,_0x29fee6['id'],_0x5a51be[_0x3d9d6e(0x110)]===_0xf2a2bd[_0x3d9d6e(0x173)]);break;}}}));}};_0xc0a2db=_0x567497([_0x47a0c9(0x0,_0x3b2c84[_0x368673(0x185)](_0x1873ef[_0x368673(0x148)])),_0x47a0c9(0x1,_0x3b2c84[_0x368673(0x185)](_0x53df5c[_0x368673(0x167)])),_0x47a0c9(0x2,_0x3b2c84[_0x368673(0x185)](_0x3b2c84[_0x368673(0x123)])),_0x47a0c9(0x3,_0x3b2c84[_0x368673(0x185)](_0x3b2c84[_0x368673(0x140)]))],_0xc0a2db);const _0x10b7de=_0x368673(0x14b),_0x193a60={};var _0xdc7f21=Object[_0x368673(0x184)],_0x193a00=(_0x195621,_0x2efa50,_0x4b5fa0,_0x53c234)=>{const _0x5b7cba=_0x368673;for(var _0x351a05=_0x53c234>0x1?void 0x0:_0x53c234?_0xdc7f21(_0x2efa50,_0x4b5fa0):_0x2efa50,_0x2d9b3e=_0x195621[_0x5b7cba(0x169)]-0x1,_0x1c3a7d;_0x2d9b3e>=0x0;_0x2d9b3e--)(_0x1c3a7d=_0x195621[_0x2d9b3e])&&(_0x351a05=_0x1c3a7d(_0x351a05)||_0x351a05);return _0x351a05;},_0x3af144=(_0x140cfb,_0x51f7da)=>(_0x2b6d61,_0x5f5709)=>_0x51f7da(_0x2b6d61,_0x5f5709,_0x140cfb);function _0x3dd44b(_0x298629,_0x5cb8d4){const _0x5a1ea0=_0x368673,_0x5d25fb=_0x298629[_0x5a1ea0(0x15d)][0x0];return{..._0x5cb8d4,'id':_0x5d25fb['replyId'],'resolved':_0x298629[_0x5a1ea0(0x110)]===0x1,'dT':_0xcbe2b0(_0x5d25fb[_0x5a1ea0(0x15a)]),'personId':_0x5d25fb[_0x5a1ea0(0x131)],'threadId':_0x5d25fb['threadId']};}function _0x1ea0b9(_0x347916,_0x3722d3,_0x38e6df){const _0x1cbbde=_0x368673;var _0x21ee09,_0x5f34f6;if(((_0x5f34f6=(_0x21ee09=_0x347916==null?void 0x0:_0x347916[_0x1cbbde(0x15d)])==null?void 0x0:_0x21ee09[_0x1cbbde(0x169)])!=null?_0x5f34f6:0x0)>0x0){const _0x52c4d0=(_0x2473e1,_0x4bea88)=>({'id':_0x2473e1[_0x1cbbde(0x155)],'threadId':_0x2473e1['threadId'],'dT':_0xcbe2b0(_0x2473e1['createTimestamp']),'personId':_0x2473e1[_0x1cbbde(0x131)],'resolved':_0x347916['solved']===_0xf2a2bd[_0x1cbbde(0x173)],'unitId':_0x3722d3,'subUnitId':_0x38e6df,'text':JSON[_0x1cbbde(0x122)](_0x2473e1[_0x1cbbde(0x188)]),'parentId':_0x4bea88}),_0x245828=_0x52c4d0(_0x347916[_0x1cbbde(0x15d)][0x0]);return{..._0x245828,'children':_0x347916[_0x1cbbde(0x15d)][_0x1cbbde(0x166)](0x1)[_0x1cbbde(0x191)](_0x3a4ab4=>_0x52c4d0(_0x3a4ab4,_0x245828['id']))};}return null;}let _0x46d64f=class{constructor(_0x57fbe6,_0x4ebd6d,_0x117eae,_0x5c4df1){const _0x313d1f=_0x368673;this['_httpService']=_0x57fbe6,this[_0x313d1f(0x115)]=_0x4ebd6d,this['_sessionService']=_0x117eae,this[_0x313d1f(0x15f)]=_0x5c4df1;}async[_0x368673(0x159)](_0x30d2d9){const _0x3c639d=_0x368673;var _0x24386c,_0x5242f8;const {parentId:_0x35d12a,unitId:_0x1d48b9,text:_0xca704a,threadId:_0x2e3df3}=_0x30d2d9,_0xee59ee=(_0x5242f8=(_0x24386c=_0xca704a[_0x3c639d(0x128)])==null?void 0x0:_0x24386c[_0x3c639d(0x13e)](_0x416bbe=>_0x416bbe['rangeType']===_0x3b2c84['CustomRangeType'][_0x3c639d(0x13c)])[_0x3c639d(0x191)](_0x38042d=>_0x38042d[_0x3c639d(0x126)]))!=null?_0x5242f8:[],_0x471970=JSON[_0x3c639d(0x165)](_0xca704a),_0x3cc2c7=(await this[_0x3c639d(0x129)]['requireSession'](_0x1d48b9))[_0x3c639d(0x132)]();if(_0x35d12a){const _0x13dd98={'memberId':_0x3cc2c7,'unitId':_0x1d48b9,'content':_0x471970,'mention':_0xee59ee,'threadId':_0x2e3df3},_0x307542=(await this[_0x3c639d(0x12c)][_0x3c639d(0x177)](_0x3c639d(0x16a)+_0x1d48b9+_0x3c639d(0x174),{'body':_0x13dd98}))['body'][_0x3c639d(0x14d)];return{..._0x30d2d9,'id':_0x307542[_0x3c639d(0x155)],'dT':_0x3b2c84['dayjs'](+_0x307542[_0x3c639d(0x15a)])[_0x3c639d(0x162)](_0x3c639d(0x18a)),'personId':_0x307542[_0x3c639d(0x131)]};}else{const _0x19583d={'memberId':_0x3cc2c7,'unitId':_0x1d48b9,'content':_0x471970,'mention':_0xee59ee},_0x52b977=await this[_0x3c639d(0x12c)][_0x3c639d(0x177)]('/universer-api/comment/unit/'+_0x1d48b9+_0x3c639d(0x17e),{'body':_0x19583d});return _0x3dd44b(_0x52b977[_0x3c639d(0x125)][_0x3c639d(0x156)],_0x30d2d9);}}async[_0x368673(0x149)](_0x5f1917){const _0x2a61f5=_0x368673;var _0x254e2a,_0x26bf21;const {text:_0x7d7a4f,unitId:_0x3efb73}=_0x5f1917,_0x28d157=(_0x26bf21=(_0x254e2a=_0x7d7a4f['customRanges'])==null?void 0x0:_0x254e2a[_0x2a61f5(0x13e)](_0x21ba12=>_0x21ba12[_0x2a61f5(0x164)]===_0x3b2c84['CustomRangeType'][_0x2a61f5(0x13c)])[_0x2a61f5(0x191)](_0x79e5b9=>_0x79e5b9[_0x2a61f5(0x126)]))!=null?_0x26bf21:[],_0x359b3d=JSON[_0x2a61f5(0x165)](_0x7d7a4f),_0x1b6f08=_0x5f1917[_0x2a61f5(0x114)],_0x1617f2=_0x5f1917['id'],_0x198110={'memberId':(await this[_0x2a61f5(0x129)][_0x2a61f5(0x196)](_0x3efb73))[_0x2a61f5(0x132)](),'unitId':_0x3efb73,'threadId':_0x1b6f08,'mention':_0x28d157,'content':_0x359b3d,'replyId':_0x1617f2},_0x7a6cc3=await this['_httpService'][_0x2a61f5(0x177)](_0x2a61f5(0x16a)+_0x3efb73+_0x2a61f5(0x157),{'body':_0x198110});return!_0x7a6cc3['body'][_0x2a61f5(0x121)]||_0x7a6cc3['body'][_0x2a61f5(0x121)][_0x2a61f5(0x133)]===0x1;}async[_0x368673(0x11c)](_0x4e7b7b){const _0x4cee4a=_0x368673,{unitId:_0x1d3ea5}=_0x4e7b7b,_0x13b150=_0x4e7b7b['threadId'],_0x16418d={'memberId':this['_userService'][_0x4cee4a(0x11e)]()[_0x4cee4a(0x12b)],'unitId':_0x1d3ea5,'threadId':_0x13b150,'solved':_0x4e7b7b[_0x4cee4a(0x137)]?_0xf2a2bd['Solved']:_0xf2a2bd[_0x4cee4a(0x183)]},_0x11be10=await this[_0x4cee4a(0x12c)][_0x4cee4a(0x177)]('/universer-api/comment/unit/'+_0x1d3ea5+_0x4cee4a(0x170),{'body':_0x16418d});return!_0x11be10[_0x4cee4a(0x125)]['error']||_0x11be10[_0x4cee4a(0x125)][_0x4cee4a(0x121)][_0x4cee4a(0x133)]===0x1;}async[_0x368673(0x151)](_0x17dff8,_0x288389,_0xe24ce1,_0x525bb0){const _0x43db66=_0x368673,_0xd4a246={'memberId':(await this[_0x43db66(0x129)]['requireSession'](_0x17dff8))[_0x43db66(0x132)](),'threadId':_0xe24ce1,'replyId':_0x525bb0,'unitId':_0x17dff8},_0x1e6898=await this[_0x43db66(0x12c)][_0x43db66(0x177)](_0x43db66(0x16a)+_0x17dff8+_0x43db66(0x14a),{'body':_0xd4a246});return!_0x1e6898[_0x43db66(0x125)]['error']||_0x1e6898[_0x43db66(0x125)][_0x43db66(0x121)][_0x43db66(0x133)]===0x1;}async[_0x368673(0x16d)](_0x40be38,_0x3cd6d7,_0x4a2ac3){const _0x584136=_0x368673,_0x22e86e={'unitId':_0x40be38,'threadId':_0x4a2ac3},_0xd5dccb=await this[_0x584136(0x12c)][_0x584136(0x177)]('/universer-api/comment/unit/'+_0x40be38+_0x584136(0x16e),{'body':_0x22e86e}),_0x423773=_0x4a2ac3[_0x584136(0x191)](_0x1e9171=>_0x1ea0b9(_0xd5dccb['body'][_0x584136(0x195)][_0x1e9171],_0x40be38,_0x3cd6d7))[_0x584136(0x13e)](Boolean);return Object['values'](_0xd5dccb[_0x584136(0x125)][_0x584136(0x136)])[_0x584136(0x116)](_0x43d556=>{const _0x1c738e=_0x584136;this[_0x1c738e(0x115)][_0x1c738e(0x143)](_0x43d556);}),_0x423773;}['saveCommentToSnapshot'](_0x3cb05d){const _0x44c6f9=_0x368673;return{'id':_0x3cb05d['id'],'threadId':_0x3cb05d[_0x44c6f9(0x114)],'ref':_0x3cb05d['ref']};}};_0x46d64f=_0x193a00([_0x3af144(0x0,_0x3b2c84['Inject'](_0x1ae3fe[_0x368673(0x17d)])),_0x3af144(0x1,_0x3b2c84[_0x368673(0x185)](_0x3b2c84[_0x368673(0x123)])),_0x3af144(0x2,_0x3b2c84[_0x368673(0x185)](_0x1873ef['CollaborationSessionService'])),_0x3af144(0x3,_0x3b2c84[_0x368673(0x185)](_0x3b2c84[_0x368673(0x140)]))],_0x46d64f);var _0x1606f3=Object[_0x368673(0x184)],_0x26d1c2=(_0x34a763,_0x25b76c,_0x2f9f9f,_0x56ee3c)=>{for(var _0x355188=_0x56ee3c>0x1?void 0x0:_0x56ee3c?_0x1606f3(_0x25b76c,_0x2f9f9f):_0x25b76c,_0x4909e6=_0x34a763['length']-0x1,_0x351f94;_0x4909e6>=0x0;_0x4909e6--)(_0x351f94=_0x34a763[_0x4909e6])&&(_0x355188=_0x351f94(_0x355188)||_0x355188);return _0x355188;},_0x7bc66e=(_0xdd1840,_0x4f90f2)=>(_0x1acd9b,_0x18c45c)=>_0x4f90f2(_0x1acd9b,_0x18c45c,_0xdd1840);let _0x3016cd=class extends _0x3b2c84['Disposable']{constructor(_0x4b3fb6,_0x4b6bfd){const _0x41eb26=_0x368673;super(),this['_threadCommentDataSourceService']=_0x4b3fb6,this[_0x41eb26(0x15e)]=_0x4b6bfd,this[_0x41eb26(0x135)]();}[_0x368673(0x135)](){const _0xa72b89=_0x368673;this[_0xa72b89(0x16b)][_0xa72b89(0x10e)]=this['_threadCommentDataSource'],this[_0xa72b89(0x16b)][_0xa72b89(0x144)]=!0x1;}};_0x3016cd=_0x26d1c2([_0x7bc66e(0x0,_0x53df5c[_0x368673(0x18b)]),_0x7bc66e(0x1,_0x3b2c84[_0x368673(0x185)](_0x46d64f))],_0x3016cd);var _0x306ac7=Object['defineProperty'],_0x4f73d6=Object[_0x368673(0x184)],_0x56c5f0=(_0x52aa70,_0x333987,_0x2be60c)=>_0x333987 in _0x52aa70?_0x306ac7(_0x52aa70,_0x333987,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2be60c}):_0x52aa70[_0x333987]=_0x2be60c,_0x98813c=(_0x27809e,_0x2495de,_0x1b4711,_0x38d9f5)=>{const _0xaa72f7=_0x368673;for(var _0x46d254=_0x38d9f5>0x1?void 0x0:_0x38d9f5?_0x4f73d6(_0x2495de,_0x1b4711):_0x2495de,_0x198417=_0x27809e[_0xaa72f7(0x169)]-0x1,_0x44ecef;_0x198417>=0x0;_0x198417--)(_0x44ecef=_0x27809e[_0x198417])&&(_0x46d254=_0x44ecef(_0x46d254)||_0x46d254);return _0x46d254;},_0x56cd4d=(_0x29aaa0,_0x48c6f3)=>(_0xa195af,_0x4df427)=>_0x48c6f3(_0xa195af,_0x4df427,_0x29aaa0),_0x4d1af6=(_0x2bfc80,_0x1ab7fa,_0x58ac70)=>_0x56c5f0(_0x2bfc80,typeof _0x1ab7fa!=_0x368673(0x168)?_0x1ab7fa+'':_0x1ab7fa,_0x58ac70);_0x56f02d[_0x368673(0x127)]=class extends _0x3b2c84[_0x368673(0x158)]{constructor(_0x3d5a09=_0x193a60,_0x4e532a,_0x2a2b0b){const _0x544cec=_0x368673;super(),this[_0x544cec(0x119)]=_0x3d5a09,this[_0x544cec(0x15f)]=_0x4e532a,this['_configService']=_0x2a2b0b;const {..._0xf10b90}=_0x3b2c84[_0x544cec(0x11d)]({},_0x193a60,this[_0x544cec(0x119)]);this[_0x544cec(0x120)][_0x544cec(0x14e)](_0x10b7de,_0xf10b90);}[_0x368673(0x15b)](){[[_0x46d64f],[_0x3016cd],[_0xc0a2db]]['forEach'](_0x15b9cb=>{const _0x54b533=_0xb4ca;this[_0x54b533(0x15f)][_0x54b533(0x17f)](_0x15b9cb);});}[_0x368673(0x14c)](){const _0xec41ce=_0x368673;this[_0xec41ce(0x15f)][_0xec41ce(0x13f)](_0x3016cd),this['_injector']['get'](_0xc0a2db);}},_0x4d1af6(_0x56f02d[_0x368673(0x127)],'pluginName',_0x553b42),_0x4d1af6(_0x56f02d[_0x368673(0x127)],_0x368673(0x192),_0x3b2c84['UniverInstanceType']['UNIVER_UNKNOWN']),_0x56f02d[_0x368673(0x127)]=_0x98813c([_0x3b2c84[_0x368673(0x12a)](_0x2a5c4f['UniverThreadCommentUIPlugin'],_0x1873ef[_0x368673(0x18f)],_0x43a539[_0x368673(0x17c)]),_0x56cd4d(0x1,_0x3b2c84[_0x368673(0x185)](_0x3b2c84[_0x368673(0x140)])),_0x56cd4d(0x2,_0x3b2c84[_0x368673(0x130)])],_0x56f02d[_0x368673(0x127)]),Object['defineProperty'](_0x56f02d,Symbol[_0x368673(0x134)],{'value':'Module'});}));function _0x168a(){const _0x5112b5=['_initUserSync','OpenOrReOpen','getOwnPropertyDescriptor','Inject','251156ulfJDd','130eIBNuO','content','exports','YYYY/MM/DD\x20HH:mm','IThreadCommentDataSourceService','3734334jVgckT','8ljCFSw','3rwylBu','UniverCollaborationClientPlugin','/universer-api/user/list','map','type','user','bufferTime','comments','requireSession','dataSource','Add','solved','_threadCommentModel','3993156jQYtez','Delete','threadId','_userService','forEach','31036848hSNmjr','802395OVFusu','_config','5Eoidkj','UNRECOGNIZED','resolveComment','merge','getCurrentUser','UniverProLicense','_configService','error','parse','UserManagerService','_commentService','body','rangeId','UniverThreadCommentDataSourcePlugin','customRanges','_sessionService','DependentOn','userID','_httpService','@univerjs-pro/license','@univerjs/core','function','IConfigService','userId','getMemberID','code','toStringTag','_initDataSource','users','resolved','commentUpdate$','Reply','@univerjs/network','_init','COMMENT','Unknown','filter','get','Injector','unitId','getUnit','addUser','syncUpdateMutationToColla','parentId','personId','UniverProCollaborationClient','CommentService','updateComment','/delete','thread-comment-data-source.config','onReady','reply','setConfig','Edit','889530wLXrFx','deleteComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','@univerjs/thread-comment-ui','disposeWithMe','replyId','comment','/edit','Plugin','addComment','createTimestamp','onStarting','UniverThreadCommentUi','replies','_threadCommentDataSource','_injector','amd','delete','format','dayjs','rangeType','stringify','slice','ThreadCommentModel','symbol','length','/universer-api/comment/unit/','_threadCommentDataSourceService','@univerjs-pro/collaboration-client','listComments','/list','root','/solved','size','Disposable','Solved','/reply','@univerjs/thread-comment','rxjs','post','getUser','Solve','7931421EvFydO','7bNQAFg','UniverLicensePlugin','HTTPService','/add','add','UniverThreadComment','subscribe'];_0x168a=function(){return _0x5112b5;};return _0x168a();}
|
|
1
|
+
function _0x22b4(_0x23faae,_0x4fbef8){const _0x3f88c2=_0x3f88();return _0x22b4=function(_0x22b4c1,_0x3469b3){_0x22b4c1=_0x22b4c1-0x186;let _0x581788=_0x3f88c2[_0x22b4c1];return _0x581788;},_0x22b4(_0x23faae,_0x4fbef8);}function _0x3f88(){const _0x2f3c6b=['personId','@univerjs/thread-comment-ui','Solved','getOwnPropertyDescriptor','Injector','ThreadCommentModel','thread-comment-data-source.config','@univerjs-pro/license','UniverCore','IThreadCommentDataSourceService','format','_init','object','Disposable','8744016tabNpd','symbol','resolved','UniverProThreadCommentDatasource','_initUserSync','comments','907811WhcnTO','requireSession','unitId','type','@univerjs-pro/collaboration-client','ref','commentUpdate$','addUser','_threadCommentDataSource','_threadCommentDataSourceService','exports','replies','Plugin','dayjs','Edit','14CWajsn','add','createTimestamp','_injector','post','payload','IConfigService','_config','rangeType','getMemberID','/edit','userID','threadId','3539730qTFvuA','_configService','/reply','DependentOn','_httpService','onStarting','@univerjs/network','CommentService','content','/add','UniverProLicense','OpenOrReOpen','userId','root','comment','UniverThreadCommentUIPlugin','parse','syncUpdateMutationToColla','body','Add','@univerjs/core','989465bwhLXh','4214064WuuNyK','getCurrentUser','_userService','Solve','UniverProCollaborationClient','COMMENT','YYYY/MM/DD\x20HH:mm','/delete','_sessionService','map','2bfWrSJ','UniverNetwork','16gwhxzv','UniverInstanceType','replyId','deleteComment','Inject','length','forEach','getComment','4202604OVPEEC','error','users','customRanges','UNIVER_UNKNOWN','Unknown','dataSource','_commentService','slice','toStringTag','disposeWithMe','HTTPService','Module','/universer-api/comment/unit/','filter','UNRECOGNIZED','UniverThreadCommentDataSourcePlugin','delete','defineProperty','_threadCommentModel','CustomRangeType','stringify','getUnit','@univerjs/thread-comment','/list','amd','bufferTime','rxjs','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','rangeId','user','solved','subscribe','Delete','UserManagerService','2256546hYHxgE','Reply','/solved','updateComment','code','addComment','values','get','UniverThreadComment'];_0x3f88=function(){return _0x2f3c6b;};return _0x3f88();}(function(_0x1de59d,_0x5891e4){const _0x475848=_0x22b4,_0x37f964=_0x1de59d();while(!![]){try{const _0x1af85c=-parseInt(_0x475848(0x206))/0x1*(-parseInt(_0x475848(0x1bc))/0x2)+-parseInt(_0x475848(0x1e9))/0x3+-parseInt(_0x475848(0x1be))/0x4*(-parseInt(_0x475848(0x1b1))/0x5)+parseInt(_0x475848(0x1b2))/0x6*(-parseInt(_0x475848(0x18f))/0x7)+parseInt(_0x475848(0x200))/0x8+parseInt(_0x475848(0x1c6))/0x9+-parseInt(_0x475848(0x19c))/0xa;if(_0x1af85c===_0x5891e4)break;else _0x37f964['push'](_0x37f964['shift']());}catch(_0x54c95e){_0x37f964['push'](_0x37f964['shift']());}}}(_0x3f88,0xb6bd2),function(_0xf771dd,_0x5b9a34){const _0x2053c3=_0x22b4;typeof exports==_0x2053c3(0x1fe)&&typeof module<'u'?_0x5b9a34(exports,require(_0x2053c3(0x20a)),require(_0x2053c3(0x1f9)),require(_0x2053c3(0x1b0)),require(_0x2053c3(0x1f3)),require(_0x2053c3(0x1dd)),require(_0x2053c3(0x1e1)),require(_0x2053c3(0x1a2))):typeof define=='function'&&define[_0x2053c3(0x1df)]?define([_0x2053c3(0x18a),_0x2053c3(0x20a),'@univerjs-pro/license',_0x2053c3(0x1b0),_0x2053c3(0x1f3),_0x2053c3(0x1dd),_0x2053c3(0x1e1),'@univerjs/network'],_0x5b9a34):(_0xf771dd=typeof globalThis<'u'?globalThis:_0xf771dd||self,_0x5b9a34(_0xf771dd[_0x2053c3(0x203)]={},_0xf771dd[_0x2053c3(0x1b6)],_0xf771dd[_0x2053c3(0x1a6)],_0xf771dd[_0x2053c3(0x1fa)],_0xf771dd['UniverThreadCommentUi'],_0xf771dd[_0x2053c3(0x1f1)],_0xf771dd[_0x2053c3(0x1e1)],_0xf771dd[_0x2053c3(0x1bd)]));}(this,function(_0x44af1f,_0x32c0b7,_0x43cd45,_0x22c7fc,_0x135374,_0x5ecf49,_0x4e7339,_0x4ec98e){'use strict';const _0x3d2e12=_0x22b4;const _0x47384a=_0x3d2e12(0x1e2);var _0x54f7d2=(_0x5de708=>(_0x5de708[_0x5de708[_0x3d2e12(0x1a7)]=0x0]='OpenOrReOpen',_0x5de708[_0x5de708[_0x3d2e12(0x1f4)]=0x1]=_0x3d2e12(0x1f4),_0x5de708[_0x5de708['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x5de708))(_0x54f7d2||{}),_0x3e2ea8=(_0x72cb28=>(_0x72cb28[_0x72cb28[_0x3d2e12(0x1cb)]=0x0]=_0x3d2e12(0x1cb),_0x72cb28[_0x72cb28[_0x3d2e12(0x1af)]=0x1]='Add',_0x72cb28[_0x72cb28[_0x3d2e12(0x1ea)]=0x2]=_0x3d2e12(0x1ea),_0x72cb28[_0x72cb28['Edit']=0x3]=_0x3d2e12(0x18e),_0x72cb28[_0x72cb28[_0x3d2e12(0x1e7)]=0x4]='Delete',_0x72cb28[_0x72cb28[_0x3d2e12(0x1b5)]=0x5]=_0x3d2e12(0x1b5),_0x72cb28[_0x72cb28[_0x3d2e12(0x1d5)]=-0x1]=_0x3d2e12(0x1d5),_0x72cb28))(_0x3e2ea8||{});const _0xb0f7b6=_0x155352=>_0x22c7fc[_0x3d2e12(0x18d)](new Date(+_0x155352))[_0x3d2e12(0x1fc)](_0x3d2e12(0x1b8)),_0x40db74=async(_0x4cea84,_0x430dce)=>{const _0x5d9e47=_0x3d2e12,_0x81c1a5=_0x4cea84[_0x5d9e47(0x1f0)](_0x22c7fc['UserManagerService']),_0x339945=_0x4cea84[_0x5d9e47(0x1f0)](_0x4ec98e[_0x5d9e47(0x1d1)]);_0x430dce['forEach'](_0x28cdea=>{const _0x262c4c=_0x5d9e47;_0x81c1a5['getUser'](_0x28cdea)&&_0x430dce[_0x262c4c(0x1d7)](_0x28cdea);}),_0x430dce['size']&&(await _0x339945[_0x5d9e47(0x1f0)]('/universer-api/user/list',{'params':{'userIDs':[..._0x430dce]}}))[_0x5d9e47(0x1ae)][_0x5d9e47(0x1c8)]['forEach'](_0x21b55a=>{const _0x2fa8cb=_0x5d9e47;_0x21b55a&&_0x81c1a5[_0x2fa8cb(0x187)](_0x21b55a);});};var _0xd011ec=Object[_0x3d2e12(0x1f5)],_0x1c0e4c=(_0x496c76,_0x26806b,_0x5d4771,_0x37865e)=>{const _0x2d2971=_0x3d2e12;for(var _0x42e407=_0x37865e>0x1?void 0x0:_0x37865e?_0xd011ec(_0x26806b,_0x5d4771):_0x26806b,_0x3c7e33=_0x496c76[_0x2d2971(0x1c3)]-0x1,_0x321fbf;_0x3c7e33>=0x0;_0x3c7e33--)(_0x321fbf=_0x496c76[_0x3c7e33])&&(_0x42e407=_0x321fbf(_0x42e407)||_0x42e407);return _0x42e407;},_0x37c6de=(_0x45da3c,_0x3443b7)=>(_0x2bba68,_0x46575b)=>_0x3443b7(_0x2bba68,_0x46575b,_0x45da3c);let _0x54f720=class extends _0x22c7fc[_0x3d2e12(0x1ff)]{constructor(_0x553255,_0x3e9403,_0x2441ed,_0xaed4f9){const _0x5cbb30=_0x3d2e12;super(),this[_0x5cbb30(0x1cd)]=_0x553255,this[_0x5cbb30(0x1d9)]=_0x3e9403,this['_userService']=_0x2441ed,this[_0x5cbb30(0x192)]=_0xaed4f9,this[_0x5cbb30(0x1fd)](),this[_0x5cbb30(0x204)]();}[_0x3d2e12(0x204)](){const _0x3064c7=_0x3d2e12;this[_0x3064c7(0x1d0)](this[_0x3064c7(0x1d9)][_0x3064c7(0x186)]['pipe'](_0x4e7339[_0x3064c7(0x1e0)](0x10))[_0x3064c7(0x1e6)](_0x5b0746=>{const _0x4bb6f3=_0x3064c7,_0x27d1f1=new Set();_0x5b0746[_0x4bb6f3(0x1c4)](_0x206bf6=>{const _0x171bae=_0x4bb6f3;switch(_0x206bf6['type']){case _0x171bae(0x190):{const _0x45efc2=_0x206bf6[_0x171bae(0x194)][_0x171bae(0x1f2)];_0x27d1f1[_0x171bae(0x190)](_0x45efc2);break;}}}),_0x40db74(this[_0x4bb6f3(0x192)],_0x27d1f1);}));}['_init'](){const _0x29d390=_0x3d2e12;this[_0x29d390(0x1d0)](this[_0x29d390(0x1cd)][_0x29d390(0x186)][_0x29d390(0x1e6)](async _0xdaf558=>{const _0x2f1118=_0x29d390;var _0x34ffac,_0x244b03,_0x2f7c1a,_0x279be7;const _0x40754d=(_0x34ffac=this[_0x2f1118(0x1d9)][_0x2f1118(0x1dc)](_0xdaf558[_0x2f1118(0x208)])['find'](_0x104b2a=>_0x104b2a[_0x2f1118(0x19b)]===_0xdaf558[_0x2f1118(0x19b)]))==null?void 0x0:_0x34ffac[_0x2f1118(0x1a9)];if(!_0x40754d)return;const {unitId:_0x1aae0b,subUnitId:_0xbf7fca}=_0x40754d;switch(_0xdaf558[_0x2f1118(0x1e4)]&&this[_0x2f1118(0x1b4)][_0x2f1118(0x187)](_0xdaf558[_0x2f1118(0x1e4)]),_0xdaf558[_0x2f1118(0x209)]){case _0x3e2ea8['Add']:break;case _0x3e2ea8[_0x2f1118(0x1ea)]:{this['_threadCommentModel'][_0x2f1118(0x1ee)](_0x1aae0b,_0xbf7fca,{'unitId':_0x1aae0b,'subUnitId':_0xbf7fca,'ref':'','id':_0xdaf558['replyId'],'dT':_0xb0f7b6(+_0xdaf558[_0x2f1118(0x191)]),'threadId':_0xdaf558[_0x2f1118(0x19b)],'personId':(_0x2f7c1a=(_0x244b03=_0xdaf558[_0x2f1118(0x1e4)])==null?void 0x0:_0x244b03[_0x2f1118(0x19a)])!=null?_0x2f7c1a:_0xdaf558[_0x2f1118(0x1a8)],'text':JSON[_0x2f1118(0x1ac)](_0xdaf558['content']),'parentId':_0x40754d['id']});break;}case _0x3e2ea8[_0x2f1118(0x1e7)]:{const _0x56b0ce=this[_0x2f1118(0x1d9)][_0x2f1118(0x1c5)](_0x1aae0b,_0xbf7fca,_0xdaf558[_0x2f1118(0x1c0)]);_0x56b0ce&&_0x56b0ce['parentId']&&this[_0x2f1118(0x1d9)][_0x2f1118(0x1c1)](_0x1aae0b,_0xbf7fca,_0xdaf558[_0x2f1118(0x1c0)]);break;}case _0x3e2ea8[_0x2f1118(0x18e)]:{this['_threadCommentModel'][_0x2f1118(0x1ec)](_0x1aae0b,_0xbf7fca,{'commentId':_0xdaf558[_0x2f1118(0x1c0)],'text':JSON[_0x2f1118(0x1ac)](_0xdaf558[_0x2f1118(0x1a4)])});break;}case _0x3e2ea8[_0x2f1118(0x1b5)]:{const _0x3c1317=(_0x279be7=this[_0x2f1118(0x1d9)][_0x2f1118(0x1dc)](_0xdaf558[_0x2f1118(0x208)])['find'](_0x293b6c=>_0x293b6c['threadId']===_0xdaf558[_0x2f1118(0x19b)]))==null?void 0x0:_0x279be7[_0x2f1118(0x1a9)];_0x3c1317&&this['_threadCommentModel']['resolveComment'](_0x1aae0b,_0xbf7fca,_0x3c1317['id'],_0xdaf558[_0x2f1118(0x1e5)]===_0x54f7d2[_0x2f1118(0x1f4)]);break;}}}));}};_0x54f720=_0x1c0e4c([_0x37c6de(0x0,_0x22c7fc['Inject'](_0x32c0b7[_0x3d2e12(0x1a3)])),_0x37c6de(0x1,_0x22c7fc[_0x3d2e12(0x1c2)](_0x5ecf49[_0x3d2e12(0x1f7)])),_0x37c6de(0x2,_0x22c7fc['Inject'](_0x22c7fc[_0x3d2e12(0x1e8)])),_0x37c6de(0x3,_0x22c7fc[_0x3d2e12(0x1c2)](_0x22c7fc[_0x3d2e12(0x1f6)]))],_0x54f720);const _0x1a8629=_0x3d2e12(0x1f8),_0x2febc9={};var _0x21edfe=Object['getOwnPropertyDescriptor'],_0x5535c6=(_0x42a6d1,_0x29966d,_0x2f7bc3,_0x1a33c3)=>{for(var _0xa5fa4=_0x1a33c3>0x1?void 0x0:_0x1a33c3?_0x21edfe(_0x29966d,_0x2f7bc3):_0x29966d,_0x377a8b=_0x42a6d1['length']-0x1,_0x5ac95a;_0x377a8b>=0x0;_0x377a8b--)(_0x5ac95a=_0x42a6d1[_0x377a8b])&&(_0xa5fa4=_0x5ac95a(_0xa5fa4)||_0xa5fa4);return _0xa5fa4;},_0x411192=(_0xde14e3,_0x3885b1)=>(_0x23abf5,_0x159632)=>_0x3885b1(_0x23abf5,_0x159632,_0xde14e3);function _0x3ba965(_0x231145,_0x46e3f6){const _0x12b351=_0x3d2e12,_0x1efa34=_0x231145[_0x12b351(0x18b)][0x0];return{..._0x46e3f6,'id':_0x1efa34[_0x12b351(0x1c0)],'resolved':_0x231145[_0x12b351(0x1e5)]===0x1,'dT':_0xb0f7b6(_0x1efa34[_0x12b351(0x191)]),'personId':_0x1efa34[_0x12b351(0x1a8)],'threadId':_0x1efa34[_0x12b351(0x19b)]};}function _0x2e992d(_0x1fbf2c,_0x92d8ba,_0x352e3d){const _0x8335f6=_0x3d2e12;var _0x183397,_0x5dcdd9;if(((_0x5dcdd9=(_0x183397=_0x1fbf2c==null?void 0x0:_0x1fbf2c[_0x8335f6(0x18b)])==null?void 0x0:_0x183397[_0x8335f6(0x1c3)])!=null?_0x5dcdd9:0x0)>0x0){const _0x2abaa3=(_0x1465d3,_0x220824)=>({'id':_0x1465d3['replyId'],'threadId':_0x1465d3[_0x8335f6(0x19b)],'dT':_0xb0f7b6(_0x1465d3[_0x8335f6(0x191)]),'personId':_0x1465d3[_0x8335f6(0x1a8)],'resolved':_0x1fbf2c[_0x8335f6(0x1e5)]===_0x54f7d2['Solved'],'unitId':_0x92d8ba,'subUnitId':_0x352e3d,'text':JSON[_0x8335f6(0x1ac)](_0x1465d3[_0x8335f6(0x1a4)]),'parentId':_0x220824}),_0x36313a=_0x2abaa3(_0x1fbf2c[_0x8335f6(0x18b)][0x0]);return{..._0x36313a,'children':_0x1fbf2c[_0x8335f6(0x18b)][_0x8335f6(0x1ce)](0x1)[_0x8335f6(0x1bb)](_0x3dcb1c=>_0x2abaa3(_0x3dcb1c,_0x36313a['id']))};}return null;}let _0x54ec02=class{constructor(_0x1c0032,_0x32483c,_0x3af658,_0x13152d){const _0x590657=_0x3d2e12;this[_0x590657(0x1a0)]=_0x1c0032,this[_0x590657(0x1b4)]=_0x32483c,this[_0x590657(0x1ba)]=_0x3af658,this['_injector']=_0x13152d;}async[_0x3d2e12(0x1ee)](_0x59efad){const _0x50f8eb=_0x3d2e12;var _0x4ca6f6,_0x230f6b;const {parentId:_0x5108ab,unitId:_0x1e18a9,text:_0x421418,threadId:_0xa2449f}=_0x59efad,_0x34001d=(_0x230f6b=(_0x4ca6f6=_0x421418[_0x50f8eb(0x1c9)])==null?void 0x0:_0x4ca6f6['filter'](_0x5bb648=>_0x5bb648[_0x50f8eb(0x197)]===_0x22c7fc['CustomRangeType'][_0x50f8eb(0x1b7)])[_0x50f8eb(0x1bb)](_0x5041c6=>_0x5041c6[_0x50f8eb(0x1e3)]))!=null?_0x230f6b:[],_0x4d8540=JSON[_0x50f8eb(0x1db)](_0x421418),_0x5a8297=(await this[_0x50f8eb(0x1ba)]['requireSession'](_0x1e18a9))[_0x50f8eb(0x198)]();if(_0x5108ab){const _0x220631={'memberId':_0x5a8297,'unitId':_0x1e18a9,'content':_0x4d8540,'mention':_0x34001d,'threadId':_0xa2449f},_0x1095f8=(await this[_0x50f8eb(0x1a0)][_0x50f8eb(0x193)](_0x50f8eb(0x1d3)+_0x1e18a9+_0x50f8eb(0x19e),{'body':_0x220631}))[_0x50f8eb(0x1ae)]['reply'];return{..._0x59efad,'id':_0x1095f8[_0x50f8eb(0x1c0)],'dT':_0x22c7fc[_0x50f8eb(0x18d)](+_0x1095f8['createTimestamp'])[_0x50f8eb(0x1fc)](_0x50f8eb(0x1b8)),'personId':_0x1095f8['userId']};}else{const _0x1a1528={'memberId':_0x5a8297,'unitId':_0x1e18a9,'content':_0x4d8540,'mention':_0x34001d},_0x4ac132=await this['_httpService'][_0x50f8eb(0x193)]('/universer-api/comment/unit/'+_0x1e18a9+_0x50f8eb(0x1a5),{'body':_0x1a1528});return _0x3ba965(_0x4ac132[_0x50f8eb(0x1ae)][_0x50f8eb(0x1aa)],_0x59efad);}}async[_0x3d2e12(0x1ec)](_0x587fea){const _0x390f8d=_0x3d2e12;var _0x346486,_0x4cebcd;const {text:_0x1eee9d,unitId:_0x23da7e}=_0x587fea,_0x360248=(_0x4cebcd=(_0x346486=_0x1eee9d[_0x390f8d(0x1c9)])==null?void 0x0:_0x346486[_0x390f8d(0x1d4)](_0x7f61e=>_0x7f61e['rangeType']===_0x22c7fc[_0x390f8d(0x1da)]['COMMENT'])['map'](_0x81b12b=>_0x81b12b[_0x390f8d(0x1e3)]))!=null?_0x4cebcd:[],_0x30d954=JSON[_0x390f8d(0x1db)](_0x1eee9d),_0x53cbe6=_0x587fea[_0x390f8d(0x19b)],_0x539260=_0x587fea['id'],_0x5d62e7={'memberId':(await this[_0x390f8d(0x1ba)][_0x390f8d(0x207)](_0x23da7e))[_0x390f8d(0x198)](),'unitId':_0x23da7e,'threadId':_0x53cbe6,'mention':_0x360248,'content':_0x30d954,'replyId':_0x539260},_0x14ac0c=await this[_0x390f8d(0x1a0)][_0x390f8d(0x193)]('/universer-api/comment/unit/'+_0x23da7e+_0x390f8d(0x199),{'body':_0x5d62e7});return!_0x14ac0c[_0x390f8d(0x1ae)][_0x390f8d(0x1c7)]||_0x14ac0c['body']['error'][_0x390f8d(0x1ed)]===0x1;}async['resolveComment'](_0x57c55e){const _0x345699=_0x3d2e12,{unitId:_0x22894e}=_0x57c55e,_0x115430=_0x57c55e[_0x345699(0x19b)],_0xcf782f={'memberId':this['_userService'][_0x345699(0x1b3)]()['userID'],'unitId':_0x22894e,'threadId':_0x115430,'solved':_0x57c55e[_0x345699(0x202)]?_0x54f7d2['Solved']:_0x54f7d2[_0x345699(0x1a7)]},_0x3c9e44=await this['_httpService'][_0x345699(0x193)]('/universer-api/comment/unit/'+_0x22894e+_0x345699(0x1eb),{'body':_0xcf782f});return!_0x3c9e44[_0x345699(0x1ae)][_0x345699(0x1c7)]||_0x3c9e44[_0x345699(0x1ae)][_0x345699(0x1c7)][_0x345699(0x1ed)]===0x1;}async[_0x3d2e12(0x1c1)](_0x76a791,_0x344be9,_0x286ad3,_0xbbf246){const _0x40d122=_0x3d2e12,_0x171f06={'memberId':(await this[_0x40d122(0x1ba)][_0x40d122(0x207)](_0x76a791))[_0x40d122(0x198)](),'threadId':_0x286ad3,'replyId':_0xbbf246,'unitId':_0x76a791},_0x6d3f82=await this['_httpService'][_0x40d122(0x193)](_0x40d122(0x1d3)+_0x76a791+_0x40d122(0x1b9),{'body':_0x171f06});return!_0x6d3f82['body']['error']||_0x6d3f82[_0x40d122(0x1ae)][_0x40d122(0x1c7)][_0x40d122(0x1ed)]===0x1;}async['listComments'](_0x4dc7e7,_0x5836b0,_0x4bbe05){const _0x3a6768=_0x3d2e12,_0x423243={'unitId':_0x4dc7e7,'threadId':_0x4bbe05},_0x55838f=await this['_httpService'][_0x3a6768(0x193)](_0x3a6768(0x1d3)+_0x4dc7e7+_0x3a6768(0x1de),{'body':_0x423243}),_0xcae242=_0x4bbe05['map'](_0x11de5e=>_0x2e992d(_0x55838f[_0x3a6768(0x1ae)][_0x3a6768(0x205)][_0x11de5e],_0x4dc7e7,_0x5836b0))[_0x3a6768(0x1d4)](Boolean);return Object[_0x3a6768(0x1ef)](_0x55838f['body'][_0x3a6768(0x1c8)])[_0x3a6768(0x1c4)](_0x2adf6a=>{const _0x48e6a5=_0x3a6768;this[_0x48e6a5(0x1b4)][_0x48e6a5(0x187)](_0x2adf6a);}),_0xcae242;}['saveCommentToSnapshot'](_0x3a404b){const _0x18dd35=_0x3d2e12;return{'id':_0x3a404b['id'],'threadId':_0x3a404b[_0x18dd35(0x19b)],'ref':_0x3a404b[_0x18dd35(0x20b)]};}};_0x54ec02=_0x5535c6([_0x411192(0x0,_0x22c7fc[_0x3d2e12(0x1c2)](_0x4ec98e[_0x3d2e12(0x1d1)])),_0x411192(0x1,_0x22c7fc['Inject'](_0x22c7fc[_0x3d2e12(0x1e8)])),_0x411192(0x2,_0x22c7fc[_0x3d2e12(0x1c2)](_0x32c0b7['CollaborationSessionService'])),_0x411192(0x3,_0x22c7fc[_0x3d2e12(0x1c2)](_0x22c7fc[_0x3d2e12(0x1f6)]))],_0x54ec02);var _0x450704=Object[_0x3d2e12(0x1f5)],_0x31b63e=(_0x177251,_0x35fef4,_0x1fa207,_0x4ab15d)=>{for(var _0x571fe6=_0x4ab15d>0x1?void 0x0:_0x4ab15d?_0x450704(_0x35fef4,_0x1fa207):_0x35fef4,_0x2e7f55=_0x177251['length']-0x1,_0x461b5c;_0x2e7f55>=0x0;_0x2e7f55--)(_0x461b5c=_0x177251[_0x2e7f55])&&(_0x571fe6=_0x461b5c(_0x571fe6)||_0x571fe6);return _0x571fe6;},_0x3193ad=(_0x26fcd2,_0x16bddc)=>(_0xf1651d,_0x4971f3)=>_0x16bddc(_0xf1651d,_0x4971f3,_0x26fcd2);let _0x5b5926=class extends _0x22c7fc[_0x3d2e12(0x1ff)]{constructor(_0x25c1ef,_0x55072a){const _0x3119f9=_0x3d2e12;super(),this[_0x3119f9(0x189)]=_0x25c1ef,this[_0x3119f9(0x188)]=_0x55072a,this['_initDataSource']();}['_initDataSource'](){const _0x2ed1aa=_0x3d2e12;this[_0x2ed1aa(0x189)][_0x2ed1aa(0x1cc)]=this['_threadCommentDataSource'],this[_0x2ed1aa(0x189)][_0x2ed1aa(0x1ad)]=!0x1;}};_0x5b5926=_0x31b63e([_0x3193ad(0x0,_0x5ecf49[_0x3d2e12(0x1fb)]),_0x3193ad(0x1,_0x22c7fc[_0x3d2e12(0x1c2)](_0x54ec02))],_0x5b5926);var _0x4c4ade=Object[_0x3d2e12(0x1d8)],_0xa741f5=Object[_0x3d2e12(0x1f5)],_0x38a5ae=(_0x336f01,_0x2a4066,_0x5492f3)=>_0x2a4066 in _0x336f01?_0x4c4ade(_0x336f01,_0x2a4066,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5492f3}):_0x336f01[_0x2a4066]=_0x5492f3,_0x3da4d0=(_0x56bdc0,_0x1bc516,_0xaf74ad,_0x6340fd)=>{const _0x3857f0=_0x3d2e12;for(var _0x571b65=_0x6340fd>0x1?void 0x0:_0x6340fd?_0xa741f5(_0x1bc516,_0xaf74ad):_0x1bc516,_0x5618bf=_0x56bdc0[_0x3857f0(0x1c3)]-0x1,_0x3bff84;_0x5618bf>=0x0;_0x5618bf--)(_0x3bff84=_0x56bdc0[_0x5618bf])&&(_0x571b65=_0x3bff84(_0x571b65)||_0x571b65);return _0x571b65;},_0x5a17ea=(_0x128078,_0x4663c0)=>(_0x2af8b3,_0x3524b9)=>_0x4663c0(_0x2af8b3,_0x3524b9,_0x128078),_0x5adf38=(_0x5c6d7b,_0x3568ca,_0x51a28c)=>_0x38a5ae(_0x5c6d7b,typeof _0x3568ca!=_0x3d2e12(0x201)?_0x3568ca+'':_0x3568ca,_0x51a28c);_0x44af1f['UniverThreadCommentDataSourcePlugin']=class extends _0x22c7fc[_0x3d2e12(0x18c)]{constructor(_0x411331=_0x2febc9,_0x354b39,_0xb3f2fa){const _0x2a1c10=_0x3d2e12;super(),this[_0x2a1c10(0x196)]=_0x411331,this[_0x2a1c10(0x192)]=_0x354b39,this['_configService']=_0xb3f2fa;const {..._0x143405}=_0x22c7fc['merge']({},_0x2febc9,this[_0x2a1c10(0x196)]);this[_0x2a1c10(0x19d)]['setConfig'](_0x1a8629,_0x143405);}[_0x3d2e12(0x1a1)](){const _0x15b0ad=_0x3d2e12;[[_0x54ec02],[_0x5b5926],[_0x54f720]][_0x15b0ad(0x1c4)](_0x5e01f3=>{const _0xaf3056=_0x15b0ad;this[_0xaf3056(0x192)]['add'](_0x5e01f3);});}['onReady'](){const _0x467ecb=_0x3d2e12;this[_0x467ecb(0x192)][_0x467ecb(0x1f0)](_0x5b5926),this['_injector'][_0x467ecb(0x1f0)](_0x54f720);}},_0x5adf38(_0x44af1f[_0x3d2e12(0x1d6)],'pluginName',_0x47384a),_0x5adf38(_0x44af1f['UniverThreadCommentDataSourcePlugin'],_0x3d2e12(0x209),_0x22c7fc[_0x3d2e12(0x1bf)][_0x3d2e12(0x1ca)]),_0x44af1f[_0x3d2e12(0x1d6)]=_0x3da4d0([_0x22c7fc[_0x3d2e12(0x19f)](_0x135374[_0x3d2e12(0x1ab)],_0x32c0b7['UniverCollaborationClientPlugin'],_0x43cd45['UniverLicensePlugin']),_0x5a17ea(0x1,_0x22c7fc[_0x3d2e12(0x1c2)](_0x22c7fc[_0x3d2e12(0x1f6)])),_0x5a17ea(0x2,_0x22c7fc[_0x3d2e12(0x195)])],_0x44af1f['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x44af1f,Symbol[_0x3d2e12(0x1cf)],{'value':_0x3d2e12(0x1d2)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.8.2
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,19 +45,19 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/
|
|
49
|
-
"@univerjs/core": "0.8.2
|
|
50
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.8.2",
|
|
49
|
+
"@univerjs/core": "0.8.2",
|
|
50
|
+
"@univerjs-pro/license": "0.8.2",
|
|
51
51
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
52
|
-
"@univerjs
|
|
53
|
-
"@univerjs/
|
|
54
|
-
"@univerjs/thread-comment
|
|
52
|
+
"@univerjs/thread-comment-ui": "0.8.2",
|
|
53
|
+
"@univerjs/network": "0.8.2",
|
|
54
|
+
"@univerjs/thread-comment": "0.8.2"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.8.3",
|
|
59
59
|
"vite": "^6.3.5",
|
|
60
|
-
"vitest": "^3.2.
|
|
60
|
+
"vitest": "^3.2.3",
|
|
61
61
|
"@univerjs-infra/shared": "0.8.2"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|