@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202505251606 → 0.8.0-beta.0

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 CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x4113a8=_0x38e9;function _0x51f1(){const _0x27aa18=['UniverLicensePlugin','payload','code','IThreadCommentDataSourceService','map','@univerjs-pro/collaboration-client','pipe','error','@univerjs/thread-comment-ui','filter','/reply','root','/universer-api/comment/unit/','format','_threadCommentModel','pluginName','@univerjs-pro/license','OpenOrReOpen','Injector','COMMENT','userID','1271NkOJee','forEach','508dfhVZU','12HCHzBm','comments','getUnit','UniverThreadCommentDataSourcePlugin','rangeId','UNRECOGNIZED','getCurrentUser','bufferTime','replyId','onStarting','onReady','find','UNIVER_UNKNOWN','1526010LjZVLG','UserManagerService','HTTPService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_sessionService','body','reply','users','_threadCommentDataSource','unitId','parentId','_init','threadId','content','_initUserSync','type','DependentOn','UniverCollaborationClientPlugin','Delete','3852827wokJai','parse','add','requireSession','deleteComment','YYYY/MM/DD\x20HH:mm','userId','@univerjs/core','1963620jUXMdG','replies','stringify','setConfig','comment','values','_commentService','UniverInstanceType','CustomRangeType','/edit','thread-comment-data-source.config','/universer-api/user/list','_injector','addComment','_configService','Unknown','ThreadCommentModel','get','IConfigService','slice','_initDataSource','Inject','/add','symbol','Solved','Add','getMemberID','_httpService','2224eEPWse','Module','@univerjs/network','length','user','77126bnyVTV','size','addUser','getOwnPropertyDescriptor','Plugin','Reply','toStringTag','customRanges','commentUpdate$','9eVxBWM','getUser','resolveComment','merge','createTimestamp','post','6441560kvLTFl','Edit','Solve','rangeType','6535wAKbla','_threadCommentDataSourceService','_config','_userService','UniverThreadCommentUIPlugin','disposeWithMe','subscribe','defineProperty','CollaborationSessionService'];_0x51f1=function(){return _0x27aa18;};return _0x51f1();}function _0x38e9(_0x3152bf,_0x43d9fc){const _0x51f1f4=_0x51f1();return _0x38e9=function(_0x38e94f,_0xe359e8){_0x38e94f=_0x38e94f-0x1c6;let _0x554c9c=_0x51f1f4[_0x38e94f];return _0x554c9c;},_0x38e9(_0x3152bf,_0x43d9fc);}(function(_0x52407c,_0x4f9533){const _0x33a2aa=_0x38e9,_0x301fdf=_0x52407c();while(!![]){try{const _0x35f4cd=-parseInt(_0x33a2aa(0x1f0))/0x1*(-parseInt(_0x33a2aa(0x1f2))/0x2)+-parseInt(_0x33a2aa(0x200))/0x3+-parseInt(_0x33a2aa(0x237))/0x4*(parseInt(_0x33a2aa(0x1d2))/0x5)+parseInt(_0x33a2aa(0x1f3))/0x6*(-parseInt(_0x33a2aa(0x23c))/0x7)+parseInt(_0x33a2aa(0x1ce))/0x8*(parseInt(_0x33a2aa(0x1c8))/0x9)+parseInt(_0x33a2aa(0x21b))/0xa+parseInt(_0x33a2aa(0x213))/0xb;if(_0x35f4cd===_0x4f9533)break;else _0x301fdf['push'](_0x301fdf['shift']());}catch(_0x188d20){_0x301fdf['push'](_0x301fdf['shift']());}}}(_0x51f1,0x65de2));Object[_0x4113a8(0x1d9)](exports,Symbol[_0x4113a8(0x242)],{'value':_0x4113a8(0x238)});const b=require(_0x4113a8(0x1e0)),T=require(_0x4113a8(0x1eb)),c=require(_0x4113a8(0x21a)),j=require(_0x4113a8(0x1e3)),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require(_0x4113a8(0x239)),U=_0x4113a8(0x203);var I=(_0x4411c0=>(_0x4411c0[_0x4411c0['OpenOrReOpen']=0x0]=_0x4113a8(0x1ec),_0x4411c0[_0x4411c0['Solved']=0x1]=_0x4113a8(0x233),_0x4411c0[_0x4411c0[_0x4113a8(0x1f8)]=-0x1]='UNRECOGNIZED',_0x4411c0))(I||{}),v=(_0x2d7c7f=>(_0x2d7c7f[_0x2d7c7f['Unknown']=0x0]=_0x4113a8(0x22a),_0x2d7c7f[_0x2d7c7f[_0x4113a8(0x234)]=0x1]=_0x4113a8(0x234),_0x2d7c7f[_0x2d7c7f[_0x4113a8(0x241)]=0x2]=_0x4113a8(0x241),_0x2d7c7f[_0x2d7c7f[_0x4113a8(0x1cf)]=0x3]=_0x4113a8(0x1cf),_0x2d7c7f[_0x2d7c7f[_0x4113a8(0x212)]=0x4]=_0x4113a8(0x212),_0x2d7c7f[_0x2d7c7f[_0x4113a8(0x1d0)]=0x5]='Solve',_0x2d7c7f[_0x2d7c7f[_0x4113a8(0x1f8)]=-0x1]=_0x4113a8(0x1f8),_0x2d7c7f))(v||{});const f=_0x3f3b66=>c['dayjs'](new Date(+_0x3f3b66))['format'](_0x4113a8(0x218)),R=async(_0xe55dd1,_0x260f5f)=>{const _0xe6a3c3=_0x4113a8,_0xf4e131=_0xe55dd1[_0xe6a3c3(0x22c)](c['UserManagerService']),_0x498f6d=_0xe55dd1['get'](P[_0xe6a3c3(0x202)]);_0x260f5f[_0xe6a3c3(0x1f1)](_0x510e79=>{const _0x164cfd=_0xe6a3c3;_0xf4e131[_0x164cfd(0x1c9)](_0x510e79)&&_0x260f5f['delete'](_0x510e79);}),_0x260f5f[_0xe6a3c3(0x23d)]&&(await _0x498f6d[_0xe6a3c3(0x22c)](_0xe6a3c3(0x226),{'params':{'userIDs':[..._0x260f5f]}}))[_0xe6a3c3(0x205)]['users']['forEach'](_0x43baa7=>{const _0x72d471=_0xe6a3c3;_0x43baa7&&_0xf4e131[_0x72d471(0x23e)](_0x43baa7);});};var $=Object[_0x4113a8(0x23f)],E=(_0x32a1d1,_0x3c56fd,_0x14fff0,_0x3deae2)=>{const _0x4c3ee3=_0x4113a8;for(var _0x4bef7b=_0x3deae2>0x1?void 0x0:_0x3deae2?$(_0x3c56fd,_0x14fff0):_0x3c56fd,_0x37b848=_0x32a1d1[_0x4c3ee3(0x23a)]-0x1,_0xd721ab;_0x37b848>=0x0;_0x37b848--)(_0xd721ab=_0x32a1d1[_0x37b848])&&(_0x4bef7b=_0xd721ab(_0x4bef7b)||_0x4bef7b);return _0x4bef7b;},S=(_0x7b0b65,_0x288673)=>(_0x5db9c5,_0x31bc0c)=>_0x288673(_0x5db9c5,_0x31bc0c,_0x7b0b65);let p=class extends c['Disposable']{constructor(_0x51e5d9,_0x3c4769,_0x281c25,_0x2266a8){const _0x1e97dd=_0x4113a8;super(),this[_0x1e97dd(0x221)]=_0x51e5d9,this['_threadCommentModel']=_0x3c4769,this[_0x1e97dd(0x1d5)]=_0x281c25,this[_0x1e97dd(0x227)]=_0x2266a8,this[_0x1e97dd(0x20b)](),this[_0x1e97dd(0x20e)]();}[_0x4113a8(0x20e)](){const _0x2bf860=_0x4113a8;this[_0x2bf860(0x1d7)](this[_0x2bf860(0x1e9)]['commentUpdate$'][_0x2bf860(0x1e1)](w[_0x2bf860(0x1fa)](0x10))[_0x2bf860(0x1d8)](_0x2c1a30=>{const _0x16c62d=_0x2bf860,_0x210e47=new Set();_0x2c1a30['forEach'](_0x343ded=>{const _0x1d1121=_0x38e9;switch(_0x343ded[_0x1d1121(0x20f)]){case'add':{const _0x16a64e=_0x343ded[_0x1d1121(0x1dc)]['personId'];_0x210e47[_0x1d1121(0x215)](_0x16a64e);break;}}}),R(this[_0x16c62d(0x227)],_0x210e47);}));}[_0x4113a8(0x20b)](){const _0x36f372=_0x4113a8;this[_0x36f372(0x1d7)](this[_0x36f372(0x221)][_0x36f372(0x1c7)]['subscribe'](async _0x1f704a=>{const _0x1248aa=_0x36f372;var _0x23faf0,_0x292ad8,_0x3c7b47,_0x4e1a6a;const _0x29305f=(_0x23faf0=this[_0x1248aa(0x1e9)]['getUnit'](_0x1f704a[_0x1248aa(0x209)])[_0x1248aa(0x1fe)](_0xacc3e7=>_0xacc3e7[_0x1248aa(0x20c)]===_0x1f704a['threadId']))==null?void 0x0:_0x23faf0[_0x1248aa(0x1e6)];if(!_0x29305f)return;const {unitId:_0x8e2f9,subUnitId:_0x1dc25d}=_0x29305f;switch(_0x1f704a['user']&&this['_userService']['addUser'](_0x1f704a[_0x1248aa(0x23b)]),_0x1f704a[_0x1248aa(0x20f)]){case v[_0x1248aa(0x234)]:break;case v[_0x1248aa(0x241)]:{this[_0x1248aa(0x1e9)][_0x1248aa(0x228)](_0x8e2f9,_0x1dc25d,{'unitId':_0x8e2f9,'subUnitId':_0x1dc25d,'ref':'','id':_0x1f704a[_0x1248aa(0x1fb)],'dT':f(+_0x1f704a[_0x1248aa(0x1cc)]),'threadId':_0x1f704a[_0x1248aa(0x20c)],'personId':(_0x3c7b47=(_0x292ad8=_0x1f704a[_0x1248aa(0x23b)])==null?void 0x0:_0x292ad8['userID'])!=null?_0x3c7b47:_0x1f704a[_0x1248aa(0x219)],'text':JSON['parse'](_0x1f704a[_0x1248aa(0x20d)]),'parentId':_0x29305f['id']});break;}case v[_0x1248aa(0x212)]:{const _0x361caf=this[_0x1248aa(0x1e9)]['getComment'](_0x8e2f9,_0x1dc25d,_0x1f704a[_0x1248aa(0x1fb)]);_0x361caf&&_0x361caf[_0x1248aa(0x20a)]&&this['_threadCommentModel'][_0x1248aa(0x217)](_0x8e2f9,_0x1dc25d,_0x1f704a[_0x1248aa(0x1fb)]);break;}case v['Edit']:{this[_0x1248aa(0x1e9)]['updateComment'](_0x8e2f9,_0x1dc25d,{'commentId':_0x1f704a['replyId'],'text':JSON['parse'](_0x1f704a[_0x1248aa(0x20d)])});break;}case v[_0x1248aa(0x1d0)]:{const _0x3113cc=(_0x4e1a6a=this[_0x1248aa(0x1e9)][_0x1248aa(0x1f5)](_0x1f704a[_0x1248aa(0x209)])[_0x1248aa(0x1fe)](_0x5388e0=>_0x5388e0['threadId']===_0x1f704a['threadId']))==null?void 0x0:_0x4e1a6a['root'];_0x3113cc&&this['_threadCommentModel'][_0x1248aa(0x1ca)](_0x8e2f9,_0x1dc25d,_0x3113cc['id'],_0x1f704a['solved']===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x4113a8(0x230)](b['CommentService'])),S(0x1,c[_0x4113a8(0x230)](M[_0x4113a8(0x22b)])),S(0x2,c[_0x4113a8(0x230)](c['UserManagerService'])),S(0x3,c[_0x4113a8(0x230)](c['Injector']))],p);const q=_0x4113a8(0x225),D={};var A=Object[_0x4113a8(0x23f)],x=(_0x385f3e,_0xce6763,_0x2fcb52,_0x1a7fa5)=>{for(var _0x5f4582=_0x1a7fa5>0x1?void 0x0:_0x1a7fa5?A(_0xce6763,_0x2fcb52):_0xce6763,_0x29cded=_0x385f3e['length']-0x1,_0x209b13;_0x29cded>=0x0;_0x29cded--)(_0x209b13=_0x385f3e[_0x29cded])&&(_0x5f4582=_0x209b13(_0x5f4582)||_0x5f4582);return _0x5f4582;},_=(_0x1fa1cb,_0x17cfb0)=>(_0x52528f,_0x5563d7)=>_0x17cfb0(_0x52528f,_0x5563d7,_0x1fa1cb);function Y(_0x4a5642,_0x31250f){const _0x5aec06=_0x4113a8,_0x123897=_0x4a5642[_0x5aec06(0x21c)][0x0];return{..._0x31250f,'id':_0x123897[_0x5aec06(0x1fb)],'resolved':_0x4a5642['solved']===0x1,'dT':f(_0x123897['createTimestamp']),'personId':_0x123897[_0x5aec06(0x219)],'threadId':_0x123897[_0x5aec06(0x20c)]};}function G(_0x120e7a,_0x2f47d2,_0x535424){const _0x37a1b2=_0x4113a8;var _0x155931,_0x28d530;if(((_0x28d530=(_0x155931=_0x120e7a==null?void 0x0:_0x120e7a[_0x37a1b2(0x21c)])==null?void 0x0:_0x155931[_0x37a1b2(0x23a)])!=null?_0x28d530:0x0)>0x0){const _0x3321d8=(_0x4e67fe,_0x24141d)=>({'id':_0x4e67fe['replyId'],'threadId':_0x4e67fe['threadId'],'dT':f(_0x4e67fe['createTimestamp']),'personId':_0x4e67fe[_0x37a1b2(0x219)],'resolved':_0x120e7a['solved']===I[_0x37a1b2(0x233)],'unitId':_0x2f47d2,'subUnitId':_0x535424,'text':JSON[_0x37a1b2(0x214)](_0x4e67fe['content']),'parentId':_0x24141d}),_0x59107b=_0x3321d8(_0x120e7a[_0x37a1b2(0x21c)][0x0]);return{..._0x59107b,'children':_0x120e7a[_0x37a1b2(0x21c)][_0x37a1b2(0x22e)](0x1)[_0x37a1b2(0x1df)](_0x6b735d=>_0x3321d8(_0x6b735d,_0x59107b['id']))};}return null;}let g=class{constructor(_0x484bcb,_0x20b6d4,_0x3c884a,_0x1787c3){const _0x5b5e41=_0x4113a8;this[_0x5b5e41(0x236)]=_0x484bcb,this[_0x5b5e41(0x1d5)]=_0x20b6d4,this[_0x5b5e41(0x204)]=_0x3c884a,this[_0x5b5e41(0x227)]=_0x1787c3;}async[_0x4113a8(0x228)](_0x488e8a){const _0x14f53c=_0x4113a8;var _0xe187d9,_0x3eb708;const {parentId:_0x20e1e2,unitId:_0x184b1e,text:_0x41e5f0,threadId:_0x56b48d}=_0x488e8a,_0x316ad7=(_0x3eb708=(_0xe187d9=_0x41e5f0[_0x14f53c(0x1c6)])==null?void 0x0:_0xe187d9[_0x14f53c(0x1e4)](_0x911662=>_0x911662[_0x14f53c(0x1d1)]===c[_0x14f53c(0x223)][_0x14f53c(0x1ee)])[_0x14f53c(0x1df)](_0x1bbf82=>_0x1bbf82[_0x14f53c(0x1f7)]))!=null?_0x3eb708:[],_0x2cbbd8=JSON[_0x14f53c(0x21d)](_0x41e5f0),_0x113aa6=(await this[_0x14f53c(0x204)][_0x14f53c(0x216)](_0x184b1e))[_0x14f53c(0x235)]();if(_0x20e1e2){const _0x49f05f={'memberId':_0x113aa6,'unitId':_0x184b1e,'content':_0x2cbbd8,'mention':_0x316ad7,'threadId':_0x56b48d},_0x5102e6=(await this['_httpService'][_0x14f53c(0x1cd)](_0x14f53c(0x1e7)+_0x184b1e+_0x14f53c(0x1e5),{'body':_0x49f05f}))[_0x14f53c(0x205)][_0x14f53c(0x206)];return{..._0x488e8a,'id':_0x5102e6['replyId'],'dT':c['dayjs'](+_0x5102e6['createTimestamp'])[_0x14f53c(0x1e8)](_0x14f53c(0x218)),'personId':_0x5102e6['userId']};}else{const _0x1ded3b={'memberId':_0x113aa6,'unitId':_0x184b1e,'content':_0x2cbbd8,'mention':_0x316ad7},_0x381404=await this[_0x14f53c(0x236)][_0x14f53c(0x1cd)](_0x14f53c(0x1e7)+_0x184b1e+_0x14f53c(0x231),{'body':_0x1ded3b});return Y(_0x381404[_0x14f53c(0x205)][_0x14f53c(0x21f)],_0x488e8a);}}async['updateComment'](_0x2d63f7){const _0x5c08e3=_0x4113a8;var _0x489070,_0x38cf43;const {text:_0x526526,unitId:_0x332dc3}=_0x2d63f7,_0x2e49a2=(_0x38cf43=(_0x489070=_0x526526['customRanges'])==null?void 0x0:_0x489070['filter'](_0x5ba3c1=>_0x5ba3c1['rangeType']===c[_0x5c08e3(0x223)]['COMMENT'])['map'](_0x3d1f40=>_0x3d1f40[_0x5c08e3(0x1f7)]))!=null?_0x38cf43:[],_0x1965ff=JSON['stringify'](_0x526526),_0x16d809=_0x2d63f7['threadId'],_0x2e6fb2=_0x2d63f7['id'],_0x48d839={'memberId':(await this['_sessionService'][_0x5c08e3(0x216)](_0x332dc3))[_0x5c08e3(0x235)](),'unitId':_0x332dc3,'threadId':_0x16d809,'mention':_0x2e49a2,'content':_0x1965ff,'replyId':_0x2e6fb2},_0x40f2a0=await this[_0x5c08e3(0x236)][_0x5c08e3(0x1cd)](_0x5c08e3(0x1e7)+_0x332dc3+_0x5c08e3(0x224),{'body':_0x48d839});return!_0x40f2a0[_0x5c08e3(0x205)][_0x5c08e3(0x1e2)]||_0x40f2a0['body'][_0x5c08e3(0x1e2)][_0x5c08e3(0x1dd)]===0x1;}async[_0x4113a8(0x1ca)](_0x3bfb78){const _0x48884b=_0x4113a8,{unitId:_0x1b18ad}=_0x3bfb78,_0x87d4ce=_0x3bfb78[_0x48884b(0x20c)],_0x56322a={'memberId':this[_0x48884b(0x1d5)][_0x48884b(0x1f9)]()[_0x48884b(0x1ef)],'unitId':_0x1b18ad,'threadId':_0x87d4ce,'solved':_0x3bfb78['resolved']?I[_0x48884b(0x233)]:I['OpenOrReOpen']},_0x3ee492=await this[_0x48884b(0x236)]['post'](_0x48884b(0x1e7)+_0x1b18ad+'/solved',{'body':_0x56322a});return!_0x3ee492['body'][_0x48884b(0x1e2)]||_0x3ee492[_0x48884b(0x205)][_0x48884b(0x1e2)][_0x48884b(0x1dd)]===0x1;}async['deleteComment'](_0x1e2f7a,_0x52cf2a,_0x453e85,_0x4ca25e){const _0x5b3ad3=_0x4113a8,_0x1f4751={'memberId':(await this[_0x5b3ad3(0x204)]['requireSession'](_0x1e2f7a))[_0x5b3ad3(0x235)](),'threadId':_0x453e85,'replyId':_0x4ca25e,'unitId':_0x1e2f7a},_0x54f686=await this[_0x5b3ad3(0x236)]['post'](_0x5b3ad3(0x1e7)+_0x1e2f7a+'/delete',{'body':_0x1f4751});return!_0x54f686[_0x5b3ad3(0x205)][_0x5b3ad3(0x1e2)]||_0x54f686['body'][_0x5b3ad3(0x1e2)][_0x5b3ad3(0x1dd)]===0x1;}async['listComments'](_0x3149f0,_0x4648a1,_0x2740c9){const _0x3616eb=_0x4113a8,_0xab4b72={'unitId':_0x3149f0,'threadId':_0x2740c9},_0x3e23a9=await this[_0x3616eb(0x236)][_0x3616eb(0x1cd)]('/universer-api/comment/unit/'+_0x3149f0+'/list',{'body':_0xab4b72}),_0x5318e7=_0x2740c9[_0x3616eb(0x1df)](_0x4d90f2=>G(_0x3e23a9[_0x3616eb(0x205)][_0x3616eb(0x1f4)][_0x4d90f2],_0x3149f0,_0x4648a1))[_0x3616eb(0x1e4)](Boolean);return Object[_0x3616eb(0x220)](_0x3e23a9[_0x3616eb(0x205)][_0x3616eb(0x207)])[_0x3616eb(0x1f1)](_0x286d76=>{const _0x447b64=_0x3616eb;this[_0x447b64(0x1d5)][_0x447b64(0x23e)](_0x286d76);}),_0x5318e7;}['saveCommentToSnapshot'](_0x3b0ee9){const _0x434ec9=_0x4113a8;return{'id':_0x3b0ee9['id'],'threadId':_0x3b0ee9[_0x434ec9(0x20c)],'ref':_0x3b0ee9['ref']};}};g=x([_(0x0,c['Inject'](P[_0x4113a8(0x202)])),_(0x1,c['Inject'](c[_0x4113a8(0x201)])),_(0x2,c[_0x4113a8(0x230)](b[_0x4113a8(0x1da)])),_(0x3,c[_0x4113a8(0x230)](c[_0x4113a8(0x1ed)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0xa15eac,_0x1b8d67,_0xb46098,_0x30d6a8)=>{const _0x2a626f=_0x4113a8;for(var _0x3fa584=_0x30d6a8>0x1?void 0x0:_0x30d6a8?H(_0x1b8d67,_0xb46098):_0x1b8d67,_0x5458f8=_0xa15eac[_0x2a626f(0x23a)]-0x1,_0x510a64;_0x5458f8>=0x0;_0x5458f8--)(_0x510a64=_0xa15eac[_0x5458f8])&&(_0x3fa584=_0x510a64(_0x3fa584)||_0x3fa584);return _0x3fa584;},y=(_0x409cc1,_0x366c16)=>(_0x1cdbc0,_0x5a9b5e)=>_0x366c16(_0x1cdbc0,_0x5a9b5e,_0x409cc1);let C=class extends c['Disposable']{constructor(_0x3d0898,_0x2782b3){const _0xd00cf0=_0x4113a8;super(),this[_0xd00cf0(0x1d3)]=_0x3d0898,this['_threadCommentDataSource']=_0x2782b3,this[_0xd00cf0(0x22f)]();}[_0x4113a8(0x22f)](){const _0x1825ad=_0x4113a8;this[_0x1825ad(0x1d3)]['dataSource']=this[_0x1825ad(0x208)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x4113a8(0x1de)]),y(0x1,c[_0x4113a8(0x230)](g))],C);var F=Object[_0x4113a8(0x1d9)],L=Object[_0x4113a8(0x23f)],Z=(_0x2dcb73,_0x186a03,_0x6cbfdd)=>_0x186a03 in _0x2dcb73?F(_0x2dcb73,_0x186a03,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x6cbfdd}):_0x2dcb73[_0x186a03]=_0x6cbfdd,W=(_0x49a1b1,_0x1ff37d,_0x907e77,_0x408acd)=>{const _0x301a04=_0x4113a8;for(var _0x175cac=_0x408acd>0x1?void 0x0:_0x408acd?L(_0x1ff37d,_0x907e77):_0x1ff37d,_0x1fcf5=_0x49a1b1[_0x301a04(0x23a)]-0x1,_0x395712;_0x1fcf5>=0x0;_0x1fcf5--)(_0x395712=_0x49a1b1[_0x1fcf5])&&(_0x175cac=_0x395712(_0x175cac)||_0x175cac);return _0x175cac;},O=(_0x1ce1ca,_0x5f0b8d)=>(_0x1bd4a2,_0x4922fd)=>_0x5f0b8d(_0x1bd4a2,_0x4922fd,_0x1ce1ca),N=(_0xe6d993,_0x15c927,_0x341d1b)=>Z(_0xe6d993,typeof _0x15c927!=_0x4113a8(0x232)?_0x15c927+'':_0x15c927,_0x341d1b);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x4113a8(0x240)]{constructor(_0x71895d=D,_0x5801f8,_0x24f14e){const _0x193b4c=_0x4113a8;super(),this['_config']=_0x71895d,this[_0x193b4c(0x227)]=_0x5801f8,this[_0x193b4c(0x229)]=_0x24f14e;const {..._0x25d43a}=c[_0x193b4c(0x1cb)]({},D,this[_0x193b4c(0x1d4)]);this[_0x193b4c(0x229)][_0x193b4c(0x21e)](q,_0x25d43a);}[_0x4113a8(0x1fc)](){const _0xbca2d1=_0x4113a8;[[g],[C],[p]][_0xbca2d1(0x1f1)](_0x1163db=>{const _0x6b72a4=_0xbca2d1;this[_0x6b72a4(0x227)][_0x6b72a4(0x215)](_0x1163db);});}[_0x4113a8(0x1fd)](){const _0x28a180=_0x4113a8;this['_injector'][_0x28a180(0x22c)](C),this[_0x28a180(0x227)][_0x28a180(0x22c)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x4113a8(0x1ea),U),N(exports[_0x4113a8(0x1f6)],'type',c[_0x4113a8(0x222)][_0x4113a8(0x1ff)]),exports[_0x4113a8(0x1f6)]=W([c[_0x4113a8(0x210)](j[_0x4113a8(0x1d6)],b[_0x4113a8(0x211)],T[_0x4113a8(0x1db)]),O(0x1,c[_0x4113a8(0x230)](c[_0x4113a8(0x1ed)])),O(0x2,c[_0x4113a8(0x22d)])],exports[_0x4113a8(0x1f6)]);
1
+ 'use strict';const _0x24cd7f=_0x48cf;(function(_0x2e5aa8,_0x3a4b0e){const _0x596b5f=_0x48cf,_0x20b676=_0x2e5aa8();while(!![]){try{const _0x25c708=-parseInt(_0x596b5f(0x10b))/0x1+parseInt(_0x596b5f(0xdc))/0x2+parseInt(_0x596b5f(0xc6))/0x3*(parseInt(_0x596b5f(0x10e))/0x4)+parseInt(_0x596b5f(0xbb))/0x5*(-parseInt(_0x596b5f(0x134))/0x6)+parseInt(_0x596b5f(0x117))/0x7*(parseInt(_0x596b5f(0xf5))/0x8)+parseInt(_0x596b5f(0x122))/0x9+-parseInt(_0x596b5f(0xdd))/0xa*(parseInt(_0x596b5f(0x11f))/0xb);if(_0x25c708===_0x3a4b0e)break;else _0x20b676['push'](_0x20b676['shift']());}catch(_0x3ec97b){_0x20b676['push'](_0x20b676['shift']());}}}(_0xf7c7,0x2c742));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x24cd7f(0xcc)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x24cd7f(0xeb)),c=require(_0x24cd7f(0xba)),j=require(_0x24cd7f(0xcf)),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x24cd7f(0x119);var I=(_0x5dfb21=>(_0x5dfb21[_0x5dfb21['OpenOrReOpen']=0x0]=_0x24cd7f(0xf2),_0x5dfb21[_0x5dfb21[_0x24cd7f(0x12d)]=0x1]='Solved',_0x5dfb21[_0x5dfb21['UNRECOGNIZED']=-0x1]=_0x24cd7f(0xdb),_0x5dfb21))(I||{}),v=(_0x379c1d=>(_0x379c1d[_0x379c1d[_0x24cd7f(0xf8)]=0x0]=_0x24cd7f(0xf8),_0x379c1d[_0x379c1d[_0x24cd7f(0xc9)]=0x1]='Add',_0x379c1d[_0x379c1d[_0x24cd7f(0x104)]=0x2]=_0x24cd7f(0x104),_0x379c1d[_0x379c1d[_0x24cd7f(0xff)]=0x3]=_0x24cd7f(0xff),_0x379c1d[_0x379c1d[_0x24cd7f(0x114)]=0x4]=_0x24cd7f(0x114),_0x379c1d[_0x379c1d[_0x24cd7f(0x123)]=0x5]='Solve',_0x379c1d[_0x379c1d[_0x24cd7f(0xdb)]=-0x1]='UNRECOGNIZED',_0x379c1d))(v||{});function _0xf7c7(){const _0x1c5888=['filter','pipe','/reply','content','/universer-api/user/list','Delete','solved','_initDataSource','14917ytkCKI','unitId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','onReady','bufferTime','_init','_configService','body','88aJXnFZ','error','map','1108296kifsTu','Solve','getUser','UniverLicensePlugin','reply','Plugin','/solved','addComment','type','DependentOn','HTTPService','Solved','comments','disposeWithMe','onStarting','personId','deleteComment','CustomRangeType','110652fxqfgI','defineProperty','size','addUser','threadId','@univerjs/core','85HDwawR','_initUserSync','code','users','payload','forEach','slice','_injector','userID','UniverThreadCommentDataSourcePlugin','Disposable','3UXCjIO','_config','UniverThreadCommentUIPlugin','Add','_threadCommentDataSourceService','dataSource','Module','getMemberID','delete','@univerjs/thread-comment-ui','Injector','_httpService','get','replies','CollaborationSessionService','ThreadCommentModel','COMMENT','/universer-api/comment/unit/','replyId','Inject','commentUpdate$','UNRECOGNIZED','690140RYqVFt','141050RVoQQd','UserManagerService','_userService','_commentService','userId','createTimestamp','rangeId','pluginName','symbol','/list','resolveComment','root','_threadCommentModel','updateComment','@univerjs-pro/license','_sessionService','ref','subscribe','getUnit','post','add','OpenOrReOpen','find','format','552yNkHfi','stringify','getOwnPropertyDescriptor','Unknown','syncUpdateMutationToColla','_threadCommentDataSource','YYYY/MM/DD\x20HH:mm','merge','/add','user','Edit','customRanges','parse','IThreadCommentDataSourceService','length','Reply','parentId','UNIVER_UNKNOWN','comment','listComments','IConfigService','saveCommentToSnapshot','326766gcCKCA','requireSession','thread-comment-data-source.config','1279796jLTXkS'];_0xf7c7=function(){return _0x1c5888;};return _0xf7c7();}const f=_0x2ec48a=>c['dayjs'](new Date(+_0x2ec48a))[_0x24cd7f(0xf4)](_0x24cd7f(0xfb)),R=async(_0x479c9b,_0x151f08)=>{const _0x4d57f5=_0x24cd7f,_0x54c409=_0x479c9b[_0x4d57f5(0xd2)](c[_0x4d57f5(0xde)]),_0x4cefec=_0x479c9b[_0x4d57f5(0xd2)](P[_0x4d57f5(0x12c)]);_0x151f08[_0x4d57f5(0xc0)](_0x38fa52=>{const _0x1fc802=_0x4d57f5;_0x54c409[_0x1fc802(0x124)](_0x38fa52)&&_0x151f08[_0x1fc802(0xce)](_0x38fa52);}),_0x151f08[_0x4d57f5(0xb7)]&&(await _0x4cefec['get'](_0x4d57f5(0x113),{'params':{'userIDs':[..._0x151f08]}}))[_0x4d57f5(0x11e)][_0x4d57f5(0xbe)][_0x4d57f5(0xc0)](_0x41b9ae=>{const _0x3c460e=_0x4d57f5;_0x41b9ae&&_0x54c409[_0x3c460e(0xb8)](_0x41b9ae);});};var $=Object[_0x24cd7f(0xf7)],E=(_0x5c3653,_0x1f4f2e,_0xa3397b,_0x233ac2)=>{const _0x51ffee=_0x24cd7f;for(var _0x26c193=_0x233ac2>0x1?void 0x0:_0x233ac2?$(_0x1f4f2e,_0xa3397b):_0x1f4f2e,_0x47add2=_0x5c3653[_0x51ffee(0x103)]-0x1,_0x3a6785;_0x47add2>=0x0;_0x47add2--)(_0x3a6785=_0x5c3653[_0x47add2])&&(_0x26c193=_0x3a6785(_0x26c193)||_0x26c193);return _0x26c193;},S=(_0x40090a,_0x2efe13)=>(_0xb110b0,_0x2ca2e8)=>_0x2efe13(_0xb110b0,_0x2ca2e8,_0x40090a);let p=class extends c[_0x24cd7f(0xc5)]{constructor(_0x3a2fb9,_0xdacefd,_0xbfa23b,_0x5691da){const _0x5a2990=_0x24cd7f;super(),this[_0x5a2990(0xe0)]=_0x3a2fb9,this[_0x5a2990(0xe9)]=_0xdacefd,this[_0x5a2990(0xdf)]=_0xbfa23b,this[_0x5a2990(0xc2)]=_0x5691da,this[_0x5a2990(0x11c)](),this[_0x5a2990(0xbc)]();}[_0x24cd7f(0xbc)](){const _0x3a74b7=_0x24cd7f;this[_0x3a74b7(0x12f)](this['_threadCommentModel'][_0x3a74b7(0xda)][_0x3a74b7(0x110)](w[_0x3a74b7(0x11b)](0x10))[_0x3a74b7(0xee)](_0x5c26a0=>{const _0x112582=_0x3a74b7,_0x302d5e=new Set();_0x5c26a0[_0x112582(0xc0)](_0x4fa186=>{const _0x5c133f=_0x112582;switch(_0x4fa186[_0x5c133f(0x12a)]){case _0x5c133f(0xf1):{const _0x30b30e=_0x4fa186[_0x5c133f(0xbf)][_0x5c133f(0x131)];_0x302d5e[_0x5c133f(0xf1)](_0x30b30e);break;}}}),R(this[_0x112582(0xc2)],_0x302d5e);}));}[_0x24cd7f(0x11c)](){this['disposeWithMe'](this['_commentService']['commentUpdate$']['subscribe'](async _0x41257a=>{const _0x2552b0=_0x48cf;var _0xb88aa7,_0x208c3b,_0x17bd03,_0x383091;const _0x139182=(_0xb88aa7=this['_threadCommentModel'][_0x2552b0(0xef)](_0x41257a[_0x2552b0(0x118)])[_0x2552b0(0xf3)](_0x3ea0e4=>_0x3ea0e4[_0x2552b0(0xb9)]===_0x41257a[_0x2552b0(0xb9)]))==null?void 0x0:_0xb88aa7[_0x2552b0(0xe8)];if(!_0x139182)return;const {unitId:_0x519515,subUnitId:_0x6b23c}=_0x139182;switch(_0x41257a[_0x2552b0(0xfe)]&&this[_0x2552b0(0xdf)][_0x2552b0(0xb8)](_0x41257a['user']),_0x41257a[_0x2552b0(0x12a)]){case v[_0x2552b0(0xc9)]:break;case v['Reply']:{this[_0x2552b0(0xe9)][_0x2552b0(0x129)](_0x519515,_0x6b23c,{'unitId':_0x519515,'subUnitId':_0x6b23c,'ref':'','id':_0x41257a[_0x2552b0(0xd8)],'dT':f(+_0x41257a['createTimestamp']),'threadId':_0x41257a['threadId'],'personId':(_0x17bd03=(_0x208c3b=_0x41257a[_0x2552b0(0xfe)])==null?void 0x0:_0x208c3b[_0x2552b0(0xc3)])!=null?_0x17bd03:_0x41257a[_0x2552b0(0xe1)],'text':JSON[_0x2552b0(0x101)](_0x41257a[_0x2552b0(0x112)]),'parentId':_0x139182['id']});break;}case v[_0x2552b0(0x114)]:{const _0xae078a=this[_0x2552b0(0xe9)]['getComment'](_0x519515,_0x6b23c,_0x41257a[_0x2552b0(0xd8)]);_0xae078a&&_0xae078a[_0x2552b0(0x105)]&&this['_threadCommentModel']['deleteComment'](_0x519515,_0x6b23c,_0x41257a[_0x2552b0(0xd8)]);break;}case v[_0x2552b0(0xff)]:{this[_0x2552b0(0xe9)][_0x2552b0(0xea)](_0x519515,_0x6b23c,{'commentId':_0x41257a[_0x2552b0(0xd8)],'text':JSON[_0x2552b0(0x101)](_0x41257a[_0x2552b0(0x112)])});break;}case v[_0x2552b0(0x123)]:{const _0x204500=(_0x383091=this[_0x2552b0(0xe9)][_0x2552b0(0xef)](_0x41257a[_0x2552b0(0x118)])[_0x2552b0(0xf3)](_0x3af9fe=>_0x3af9fe['threadId']===_0x41257a['threadId']))==null?void 0x0:_0x383091[_0x2552b0(0xe8)];_0x204500&&this['_threadCommentModel'][_0x2552b0(0xe7)](_0x519515,_0x6b23c,_0x204500['id'],_0x41257a[_0x2552b0(0x115)]===I[_0x2552b0(0x12d)]);break;}}}));}};p=E([S(0x0,c[_0x24cd7f(0xd9)](b['CommentService'])),S(0x1,c[_0x24cd7f(0xd9)](M[_0x24cd7f(0xd5)])),S(0x2,c['Inject'](c[_0x24cd7f(0xde)])),S(0x3,c[_0x24cd7f(0xd9)](c[_0x24cd7f(0xd0)]))],p);const q=_0x24cd7f(0x10d),D={};var A=Object[_0x24cd7f(0xf7)],x=(_0x105fd3,_0x491c3b,_0x13a3c8,_0x5cb772)=>{for(var _0x469438=_0x5cb772>0x1?void 0x0:_0x5cb772?A(_0x491c3b,_0x13a3c8):_0x491c3b,_0x51e1a1=_0x105fd3['length']-0x1,_0x165db2;_0x51e1a1>=0x0;_0x51e1a1--)(_0x165db2=_0x105fd3[_0x51e1a1])&&(_0x469438=_0x165db2(_0x469438)||_0x469438);return _0x469438;},_=(_0x3b6bd8,_0x1ad0d0)=>(_0x46a18d,_0x2a0720)=>_0x1ad0d0(_0x46a18d,_0x2a0720,_0x3b6bd8);function Y(_0x6e2f35,_0x26e03d){const _0x5be93f=_0x24cd7f,_0x5ab89d=_0x6e2f35[_0x5be93f(0xd3)][0x0];return{..._0x26e03d,'id':_0x5ab89d[_0x5be93f(0xd8)],'resolved':_0x6e2f35[_0x5be93f(0x115)]===0x1,'dT':f(_0x5ab89d[_0x5be93f(0xe2)]),'personId':_0x5ab89d[_0x5be93f(0xe1)],'threadId':_0x5ab89d['threadId']};}function _0x48cf(_0x30cc5d,_0x25e750){const _0xf7c7f8=_0xf7c7();return _0x48cf=function(_0x48cf82,_0x3231d1){_0x48cf82=_0x48cf82-0xb7;let _0x1687d3=_0xf7c7f8[_0x48cf82];return _0x1687d3;},_0x48cf(_0x30cc5d,_0x25e750);}function G(_0x168684,_0x520577,_0xf09982){const _0x56e814=_0x24cd7f;var _0x29ad35,_0x29c570;if(((_0x29c570=(_0x29ad35=_0x168684==null?void 0x0:_0x168684[_0x56e814(0xd3)])==null?void 0x0:_0x29ad35['length'])!=null?_0x29c570:0x0)>0x0){const _0x521c68=(_0x4d5cff,_0x11e879)=>({'id':_0x4d5cff[_0x56e814(0xd8)],'threadId':_0x4d5cff['threadId'],'dT':f(_0x4d5cff['createTimestamp']),'personId':_0x4d5cff[_0x56e814(0xe1)],'resolved':_0x168684[_0x56e814(0x115)]===I[_0x56e814(0x12d)],'unitId':_0x520577,'subUnitId':_0xf09982,'text':JSON[_0x56e814(0x101)](_0x4d5cff[_0x56e814(0x112)]),'parentId':_0x11e879}),_0x172d7a=_0x521c68(_0x168684[_0x56e814(0xd3)][0x0]);return{..._0x172d7a,'children':_0x168684[_0x56e814(0xd3)][_0x56e814(0xc1)](0x1)[_0x56e814(0x121)](_0x4b8737=>_0x521c68(_0x4b8737,_0x172d7a['id']))};}return null;}let g=class{constructor(_0x24fa46,_0x10415a,_0x4d68bf,_0x5d80eb){const _0xe25e88=_0x24cd7f;this[_0xe25e88(0xd1)]=_0x24fa46,this[_0xe25e88(0xdf)]=_0x10415a,this[_0xe25e88(0xec)]=_0x4d68bf,this['_injector']=_0x5d80eb;}async[_0x24cd7f(0x129)](_0x3cea79){const _0xdb57c7=_0x24cd7f;var _0x4157ac,_0x440567;const {parentId:_0x17a3c5,unitId:_0x2add0d,text:_0x18baa5,threadId:_0x589b73}=_0x3cea79,_0x2fa42=(_0x440567=(_0x4157ac=_0x18baa5[_0xdb57c7(0x100)])==null?void 0x0:_0x4157ac[_0xdb57c7(0x10f)](_0x134781=>_0x134781['rangeType']===c[_0xdb57c7(0x133)][_0xdb57c7(0xd6)])['map'](_0x4db88d=>_0x4db88d['rangeId']))!=null?_0x440567:[],_0x47cab2=JSON[_0xdb57c7(0xf6)](_0x18baa5),_0x25328b=(await this[_0xdb57c7(0xec)]['requireSession'](_0x2add0d))[_0xdb57c7(0xcd)]();if(_0x17a3c5){const _0x3f10dd={'memberId':_0x25328b,'unitId':_0x2add0d,'content':_0x47cab2,'mention':_0x2fa42,'threadId':_0x589b73},_0x1bd0c5=(await this[_0xdb57c7(0xd1)][_0xdb57c7(0xf0)](_0xdb57c7(0xd7)+_0x2add0d+_0xdb57c7(0x111),{'body':_0x3f10dd}))[_0xdb57c7(0x11e)][_0xdb57c7(0x126)];return{..._0x3cea79,'id':_0x1bd0c5['replyId'],'dT':c['dayjs'](+_0x1bd0c5['createTimestamp'])[_0xdb57c7(0xf4)](_0xdb57c7(0xfb)),'personId':_0x1bd0c5[_0xdb57c7(0xe1)]};}else{const _0x57cdb7={'memberId':_0x25328b,'unitId':_0x2add0d,'content':_0x47cab2,'mention':_0x2fa42},_0x44f028=await this['_httpService'][_0xdb57c7(0xf0)](_0xdb57c7(0xd7)+_0x2add0d+_0xdb57c7(0xfd),{'body':_0x57cdb7});return Y(_0x44f028['body'][_0xdb57c7(0x107)],_0x3cea79);}}async['updateComment'](_0x21b14e){const _0x47213c=_0x24cd7f;var _0x5f051b,_0xe97167;const {text:_0x38cefe,unitId:_0x1cdf49}=_0x21b14e,_0x54608c=(_0xe97167=(_0x5f051b=_0x38cefe[_0x47213c(0x100)])==null?void 0x0:_0x5f051b[_0x47213c(0x10f)](_0x2ce8e1=>_0x2ce8e1['rangeType']===c[_0x47213c(0x133)][_0x47213c(0xd6)])[_0x47213c(0x121)](_0x3606bb=>_0x3606bb[_0x47213c(0xe3)]))!=null?_0xe97167:[],_0x44a8bc=JSON[_0x47213c(0xf6)](_0x38cefe),_0x544622=_0x21b14e[_0x47213c(0xb9)],_0x43d7cc=_0x21b14e['id'],_0x267335={'memberId':(await this['_sessionService'][_0x47213c(0x10c)](_0x1cdf49))[_0x47213c(0xcd)](),'unitId':_0x1cdf49,'threadId':_0x544622,'mention':_0x54608c,'content':_0x44a8bc,'replyId':_0x43d7cc},_0x94106f=await this[_0x47213c(0xd1)][_0x47213c(0xf0)](_0x47213c(0xd7)+_0x1cdf49+'/edit',{'body':_0x267335});return!_0x94106f['body']['error']||_0x94106f[_0x47213c(0x11e)][_0x47213c(0x120)]['code']===0x1;}async['resolveComment'](_0x2ae74c){const _0x33574a=_0x24cd7f,{unitId:_0x405af1}=_0x2ae74c,_0x5bf048=_0x2ae74c['threadId'],_0x5a318a={'memberId':this['_userService']['getCurrentUser']()[_0x33574a(0xc3)],'unitId':_0x405af1,'threadId':_0x5bf048,'solved':_0x2ae74c['resolved']?I[_0x33574a(0x12d)]:I[_0x33574a(0xf2)]},_0x890cea=await this[_0x33574a(0xd1)][_0x33574a(0xf0)]('/universer-api/comment/unit/'+_0x405af1+_0x33574a(0x128),{'body':_0x5a318a});return!_0x890cea[_0x33574a(0x11e)][_0x33574a(0x120)]||_0x890cea[_0x33574a(0x11e)][_0x33574a(0x120)][_0x33574a(0xbd)]===0x1;}async[_0x24cd7f(0x132)](_0x1fa43b,_0x3d9d65,_0x4e1cd,_0xae5bba){const _0x9dc541=_0x24cd7f,_0x486317={'memberId':(await this['_sessionService'][_0x9dc541(0x10c)](_0x1fa43b))[_0x9dc541(0xcd)](),'threadId':_0x4e1cd,'replyId':_0xae5bba,'unitId':_0x1fa43b},_0x5a6e5b=await this['_httpService'][_0x9dc541(0xf0)](_0x9dc541(0xd7)+_0x1fa43b+'/delete',{'body':_0x486317});return!_0x5a6e5b[_0x9dc541(0x11e)][_0x9dc541(0x120)]||_0x5a6e5b[_0x9dc541(0x11e)]['error'][_0x9dc541(0xbd)]===0x1;}async[_0x24cd7f(0x108)](_0x17fec5,_0x44a24d,_0x3757f7){const _0x5a3280=_0x24cd7f,_0x526aab={'unitId':_0x17fec5,'threadId':_0x3757f7},_0x1f4a1d=await this['_httpService'][_0x5a3280(0xf0)](_0x5a3280(0xd7)+_0x17fec5+_0x5a3280(0xe6),{'body':_0x526aab}),_0x2f5da4=_0x3757f7['map'](_0x5f25cb=>G(_0x1f4a1d[_0x5a3280(0x11e)][_0x5a3280(0x12e)][_0x5f25cb],_0x17fec5,_0x44a24d))[_0x5a3280(0x10f)](Boolean);return Object['values'](_0x1f4a1d['body'][_0x5a3280(0xbe)])[_0x5a3280(0xc0)](_0xe3937f=>{const _0x58950f=_0x5a3280;this[_0x58950f(0xdf)]['addUser'](_0xe3937f);}),_0x2f5da4;}[_0x24cd7f(0x10a)](_0x4ea6dd){const _0x256dec=_0x24cd7f;return{'id':_0x4ea6dd['id'],'threadId':_0x4ea6dd[_0x256dec(0xb9)],'ref':_0x4ea6dd[_0x256dec(0xed)]};}};g=x([_(0x0,c['Inject'](P[_0x24cd7f(0x12c)])),_(0x1,c[_0x24cd7f(0xd9)](c[_0x24cd7f(0xde)])),_(0x2,c[_0x24cd7f(0xd9)](b[_0x24cd7f(0xd4)])),_(0x3,c['Inject'](c[_0x24cd7f(0xd0)]))],g);var H=Object[_0x24cd7f(0xf7)],J=(_0x247382,_0x531161,_0x3cc8c8,_0x4dda94)=>{const _0x3d95fb=_0x24cd7f;for(var _0xe172d8=_0x4dda94>0x1?void 0x0:_0x4dda94?H(_0x531161,_0x3cc8c8):_0x531161,_0x4c3319=_0x247382[_0x3d95fb(0x103)]-0x1,_0x2dd14e;_0x4c3319>=0x0;_0x4c3319--)(_0x2dd14e=_0x247382[_0x4c3319])&&(_0xe172d8=_0x2dd14e(_0xe172d8)||_0xe172d8);return _0xe172d8;},y=(_0x5260da,_0xf40068)=>(_0x103204,_0x154be4)=>_0xf40068(_0x103204,_0x154be4,_0x5260da);let C=class extends c[_0x24cd7f(0xc5)]{constructor(_0x4354f7,_0x5f5305){const _0x4a71b1=_0x24cd7f;super(),this['_threadCommentDataSourceService']=_0x4354f7,this[_0x4a71b1(0xfa)]=_0x5f5305,this[_0x4a71b1(0x116)]();}['_initDataSource'](){const _0x4102c3=_0x24cd7f;this['_threadCommentDataSourceService'][_0x4102c3(0xcb)]=this[_0x4102c3(0xfa)],this[_0x4102c3(0xca)][_0x4102c3(0xf9)]=!0x1;}};C=J([y(0x0,M[_0x24cd7f(0x102)]),y(0x1,c[_0x24cd7f(0xd9)](g))],C);var F=Object[_0x24cd7f(0x135)],L=Object['getOwnPropertyDescriptor'],Z=(_0x38c5dc,_0xf19c4,_0x5b9478)=>_0xf19c4 in _0x38c5dc?F(_0x38c5dc,_0xf19c4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5b9478}):_0x38c5dc[_0xf19c4]=_0x5b9478,W=(_0x337cbc,_0x1facc5,_0x10d4db,_0x4a9594)=>{const _0x25caed=_0x24cd7f;for(var _0x1299d0=_0x4a9594>0x1?void 0x0:_0x4a9594?L(_0x1facc5,_0x10d4db):_0x1facc5,_0x2bc413=_0x337cbc[_0x25caed(0x103)]-0x1,_0x48b1ad;_0x2bc413>=0x0;_0x2bc413--)(_0x48b1ad=_0x337cbc[_0x2bc413])&&(_0x1299d0=_0x48b1ad(_0x1299d0)||_0x1299d0);return _0x1299d0;},O=(_0x515aa7,_0x4d6b01)=>(_0x5a329b,_0x3a8c78)=>_0x4d6b01(_0x5a329b,_0x3a8c78,_0x515aa7),N=(_0x3e9ce7,_0x4a8d3c,_0x2abfd1)=>Z(_0x3e9ce7,typeof _0x4a8d3c!=_0x24cd7f(0xe5)?_0x4a8d3c+'':_0x4a8d3c,_0x2abfd1);exports[_0x24cd7f(0xc4)]=class extends c[_0x24cd7f(0x127)]{constructor(_0x1fa87b=D,_0x28a78f,_0x250814){const _0x5aaf66=_0x24cd7f;super(),this[_0x5aaf66(0xc7)]=_0x1fa87b,this['_injector']=_0x28a78f,this[_0x5aaf66(0x11d)]=_0x250814;const {..._0x582a69}=c[_0x5aaf66(0xfc)]({},D,this['_config']);this[_0x5aaf66(0x11d)]['setConfig'](q,_0x582a69);}[_0x24cd7f(0x130)](){const _0x4c9884=_0x24cd7f;[[g],[C],[p]][_0x4c9884(0xc0)](_0x4fec74=>{const _0x1cee96=_0x4c9884;this[_0x1cee96(0xc2)][_0x1cee96(0xf1)](_0x4fec74);});}[_0x24cd7f(0x11a)](){const _0x48f178=_0x24cd7f;this[_0x48f178(0xc2)]['get'](C),this[_0x48f178(0xc2)]['get'](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x24cd7f(0xe4),U),N(exports[_0x24cd7f(0xc4)],_0x24cd7f(0x12a),c['UniverInstanceType'][_0x24cd7f(0x106)]),exports[_0x24cd7f(0xc4)]=W([c[_0x24cd7f(0x12b)](j[_0x24cd7f(0xc8)],b['UniverCollaborationClientPlugin'],T[_0x24cd7f(0x125)]),O(0x1,c['Inject'](c[_0x24cd7f(0xd0)])),O(0x2,c[_0x24cd7f(0x109)])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x32593b=_0x51fd;(function(_0x59556a,_0x213cce){const _0x290389=_0x51fd,_0x437077=_0x59556a();while(!![]){try{const _0x307ce9=-parseInt(_0x290389(0x22f))/0x1+parseInt(_0x290389(0x1f2))/0x2+-parseInt(_0x290389(0x1fd))/0x3+parseInt(_0x290389(0x251))/0x4+-parseInt(_0x290389(0x23e))/0x5+parseInt(_0x290389(0x215))/0x6*(parseInt(_0x290389(0x245))/0x7)+parseInt(_0x290389(0x21b))/0x8;if(_0x307ce9===_0x213cce)break;else _0x437077['push'](_0x437077['shift']());}catch(_0x1c2812){_0x437077['push'](_0x437077['shift']());}}}(_0x3725,0x4d5e9));import{CommentService as _0x3b45f0,CollaborationSessionService as _0x197a37,UniverCollaborationClientPlugin as _0x182658}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3592f4}from'@univerjs-pro/license';import{dayjs as _0x255919,UserManagerService as _0x43f749,Inject as _0x9b5830,Injector as _0x57c758,Disposable as _0x136e8f,CustomRangeType as _0x49f0f2,UniverInstanceType as _0x34926c,DependentOn as _0x44d782,IConfigService as _0x46444d,Plugin as _0x4332cb,merge as _0x2aa03e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xea9a1}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2927dc,IThreadCommentDataSourceService as _0x49413f}from'@univerjs/thread-comment';import{bufferTime as _0x14c0b1}from'rxjs';import{HTTPService as _0x5af417}from'@univerjs/network';const W=_0x32593b(0x231);var I=(_0x22bc7d=>(_0x22bc7d[_0x22bc7d[_0x32593b(0x227)]=0x0]=_0x32593b(0x227),_0x22bc7d[_0x22bc7d[_0x32593b(0x212)]=0x1]='Solved',_0x22bc7d[_0x22bc7d['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x22bc7d))(I||{}),v=(_0x2a8bc9=>(_0x2a8bc9[_0x2a8bc9[_0x32593b(0x249)]=0x0]=_0x32593b(0x249),_0x2a8bc9[_0x2a8bc9[_0x32593b(0x22d)]=0x1]='Add',_0x2a8bc9[_0x2a8bc9[_0x32593b(0x23a)]=0x2]=_0x32593b(0x23a),_0x2a8bc9[_0x2a8bc9[_0x32593b(0x228)]=0x3]=_0x32593b(0x228),_0x2a8bc9[_0x2a8bc9[_0x32593b(0x24f)]=0x4]=_0x32593b(0x24f),_0x2a8bc9[_0x2a8bc9[_0x32593b(0x214)]=0x5]='Solve',_0x2a8bc9[_0x2a8bc9[_0x32593b(0x20b)]=-0x1]=_0x32593b(0x20b),_0x2a8bc9))(v||{});const D=_0x17c914=>_0x255919(new Date(+_0x17c914))[_0x32593b(0x209)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x380532,_0x32ceff)=>{const _0x1e2646=_0x32593b,_0x97741c=_0x380532[_0x1e2646(0x254)](_0x43f749),_0x1b563b=_0x380532[_0x1e2646(0x254)](_0x5af417);_0x32ceff[_0x1e2646(0x236)](_0x488096=>{const _0x570972=_0x1e2646;_0x97741c[_0x570972(0x1fc)](_0x488096)&&_0x32ceff[_0x570972(0x234)](_0x488096);}),_0x32ceff[_0x1e2646(0x23d)]&&(await _0x1b563b['get'](_0x1e2646(0x20a),{'params':{'userIDs':[..._0x32ceff]}}))[_0x1e2646(0x20f)]['users'][_0x1e2646(0x236)](_0x27270e=>{const _0x30b19a=_0x1e2646;_0x27270e&&_0x97741c[_0x30b19a(0x253)](_0x27270e);});};var K=Object[_0x32593b(0x216)],V=(_0x1c2360,_0x54a8d6,_0x57aa88,_0x4f1f5c)=>{for(var _0x28251d=_0x4f1f5c>0x1?void 0x0:_0x4f1f5c?K(_0x54a8d6,_0x57aa88):_0x54a8d6,_0x339191=_0x1c2360['length']-0x1,_0x3c6e4c;_0x339191>=0x0;_0x339191--)(_0x3c6e4c=_0x1c2360[_0x339191])&&(_0x28251d=_0x3c6e4c(_0x28251d)||_0x28251d);return _0x28251d;},p=(_0x6a970d,_0x463f6f)=>(_0xb43242,_0x5d22bc)=>_0x463f6f(_0xb43242,_0x5d22bc,_0x6a970d);let S=class extends _0x136e8f{constructor(_0x2e455,_0x34bf1b,_0x531665,_0x2b23fe){const _0x272032=_0x32593b;super(),this[_0x272032(0x205)]=_0x2e455,this[_0x272032(0x224)]=_0x34bf1b,this[_0x272032(0x238)]=_0x531665,this[_0x272032(0x252)]=_0x2b23fe,this[_0x272032(0x1f6)](),this[_0x272032(0x206)]();}[_0x32593b(0x206)](){const _0x29804b=_0x32593b;this[_0x29804b(0x201)](this['_threadCommentModel'][_0x29804b(0x24e)][_0x29804b(0x244)](_0x14c0b1(0x10))[_0x29804b(0x21a)](_0x345ba8=>{const _0x39fc88=_0x29804b,_0x4425b4=new Set();_0x345ba8[_0x39fc88(0x236)](_0x5be4d5=>{const _0x5db378=_0x39fc88;switch(_0x5be4d5[_0x5db378(0x218)]){case _0x5db378(0x220):{const _0x4d2234=_0x5be4d5[_0x5db378(0x24d)][_0x5db378(0x24b)];_0x4425b4[_0x5db378(0x220)](_0x4d2234);break;}}}),B(this[_0x39fc88(0x252)],_0x4425b4);}));}[_0x32593b(0x1f6)](){const _0x416e53=_0x32593b;this[_0x416e53(0x201)](this['_commentService'][_0x416e53(0x24e)]['subscribe'](async _0xbfeb65=>{const _0x1cf9a0=_0x416e53;var _0x58c403,_0x45b09,_0xccaf01,_0x63a4a;const _0x153dbe=(_0x58c403=this[_0x1cf9a0(0x224)][_0x1cf9a0(0x21d)](_0xbfeb65[_0x1cf9a0(0x200)])[_0x1cf9a0(0x222)](_0x34cc77=>_0x34cc77['threadId']===_0xbfeb65[_0x1cf9a0(0x243)]))==null?void 0x0:_0x58c403[_0x1cf9a0(0x213)];if(!_0x153dbe)return;const {unitId:_0x50510d,subUnitId:_0x4552f7}=_0x153dbe;switch(_0xbfeb65[_0x1cf9a0(0x242)]&&this['_userService'][_0x1cf9a0(0x253)](_0xbfeb65['user']),_0xbfeb65[_0x1cf9a0(0x218)]){case v[_0x1cf9a0(0x22d)]:break;case v[_0x1cf9a0(0x23a)]:{this[_0x1cf9a0(0x224)][_0x1cf9a0(0x1fb)](_0x50510d,_0x4552f7,{'unitId':_0x50510d,'subUnitId':_0x4552f7,'ref':'','id':_0xbfeb65[_0x1cf9a0(0x240)],'dT':D(+_0xbfeb65[_0x1cf9a0(0x233)]),'threadId':_0xbfeb65['threadId'],'personId':(_0xccaf01=(_0x45b09=_0xbfeb65[_0x1cf9a0(0x242)])==null?void 0x0:_0x45b09['userID'])!=null?_0xccaf01:_0xbfeb65['userId'],'text':JSON[_0x1cf9a0(0x230)](_0xbfeb65[_0x1cf9a0(0x223)]),'parentId':_0x153dbe['id']});break;}case v['Delete']:{const _0x5599c1=this[_0x1cf9a0(0x224)]['getComment'](_0x50510d,_0x4552f7,_0xbfeb65[_0x1cf9a0(0x240)]);_0x5599c1&&_0x5599c1[_0x1cf9a0(0x20d)]&&this['_threadCommentModel'][_0x1cf9a0(0x1f4)](_0x50510d,_0x4552f7,_0xbfeb65[_0x1cf9a0(0x240)]);break;}case v[_0x1cf9a0(0x228)]:{this[_0x1cf9a0(0x224)]['updateComment'](_0x50510d,_0x4552f7,{'commentId':_0xbfeb65[_0x1cf9a0(0x240)],'text':JSON[_0x1cf9a0(0x230)](_0xbfeb65[_0x1cf9a0(0x223)])});break;}case v[_0x1cf9a0(0x214)]:{const _0x5ca788=(_0x63a4a=this[_0x1cf9a0(0x224)][_0x1cf9a0(0x21d)](_0xbfeb65['unitId'])[_0x1cf9a0(0x222)](_0x21e169=>_0x21e169[_0x1cf9a0(0x243)]===_0xbfeb65[_0x1cf9a0(0x243)]))==null?void 0x0:_0x63a4a[_0x1cf9a0(0x213)];_0x5ca788&&this[_0x1cf9a0(0x224)]['resolveComment'](_0x50510d,_0x4552f7,_0x5ca788['id'],_0xbfeb65[_0x1cf9a0(0x22a)]===I[_0x1cf9a0(0x212)]);break;}}}));}};S=V([p(0x0,_0x9b5830(_0x3b45f0)),p(0x1,_0x9b5830(_0x2927dc)),p(0x2,_0x9b5830(_0x43f749)),p(0x3,_0x9b5830(_0x57c758))],S);const z=_0x32593b(0x239),M={};var k=Object[_0x32593b(0x216)],Q=(_0x441207,_0x35647d,_0x5644f9,_0x2e9c15)=>{for(var _0x1bdebe=_0x2e9c15>0x1?void 0x0:_0x2e9c15?k(_0x35647d,_0x5644f9):_0x35647d,_0xedc7a6=_0x441207['length']-0x1,_0x87c2c4;_0xedc7a6>=0x0;_0xedc7a6--)(_0x87c2c4=_0x441207[_0xedc7a6])&&(_0x1bdebe=_0x87c2c4(_0x1bdebe)||_0x1bdebe);return _0x1bdebe;},_=(_0x38dbe1,_0x5c61db)=>(_0x20721d,_0x1cd919)=>_0x5c61db(_0x20721d,_0x1cd919,_0x38dbe1);function X(_0x20f192,_0x1d3a33){const _0x3abfb5=_0x32593b,_0x1613a2=_0x20f192['replies'][0x0];return{..._0x1d3a33,'id':_0x1613a2[_0x3abfb5(0x240)],'resolved':_0x20f192['solved']===0x1,'dT':D(_0x1613a2['createTimestamp']),'personId':_0x1613a2[_0x3abfb5(0x208)],'threadId':_0x1613a2[_0x3abfb5(0x243)]};}function ee(_0x5cbf13,_0xb12159,_0x3af956){const _0x4c3d03=_0x32593b;var _0x5732c3,_0x2c9ee9;if(((_0x2c9ee9=(_0x5732c3=_0x5cbf13==null?void 0x0:_0x5cbf13[_0x4c3d03(0x241)])==null?void 0x0:_0x5732c3[_0x4c3d03(0x248)])!=null?_0x2c9ee9:0x0)>0x0){const _0x81b62f=(_0x260e4b,_0x1c37f0)=>({'id':_0x260e4b[_0x4c3d03(0x240)],'threadId':_0x260e4b['threadId'],'dT':D(_0x260e4b[_0x4c3d03(0x233)]),'personId':_0x260e4b['userId'],'resolved':_0x5cbf13[_0x4c3d03(0x22a)]===I[_0x4c3d03(0x212)],'unitId':_0xb12159,'subUnitId':_0x3af956,'text':JSON[_0x4c3d03(0x230)](_0x260e4b[_0x4c3d03(0x223)]),'parentId':_0x1c37f0}),_0x2aa118=_0x81b62f(_0x5cbf13[_0x4c3d03(0x241)][0x0]);return{..._0x2aa118,'children':_0x5cbf13[_0x4c3d03(0x241)][_0x4c3d03(0x1f9)](0x1)[_0x4c3d03(0x21c)](_0x21ce8b=>_0x81b62f(_0x21ce8b,_0x2aa118['id']))};}return null;}let f=class{constructor(_0x5649fe,_0x45d19d,_0x24f100,_0x5ca544){const _0x26223d=_0x32593b;this[_0x26223d(0x203)]=_0x5649fe,this[_0x26223d(0x238)]=_0x45d19d,this[_0x26223d(0x22c)]=_0x24f100,this[_0x26223d(0x252)]=_0x5ca544;}async['addComment'](_0xda541f){const _0x2c0383=_0x32593b;var _0x39be13,_0x5effbd;const {parentId:_0xa7b38d,unitId:_0x708db6,text:_0x1eb77a,threadId:_0x54d336}=_0xda541f,_0x3782d7=(_0x5effbd=(_0x39be13=_0x1eb77a[_0x2c0383(0x1fe)])==null?void 0x0:_0x39be13['filter'](_0x4c4f83=>_0x4c4f83[_0x2c0383(0x20c)]===_0x49f0f2[_0x2c0383(0x229)])[_0x2c0383(0x21c)](_0x30424d=>_0x30424d[_0x2c0383(0x1f8)]))!=null?_0x5effbd:[],_0x350802=JSON['stringify'](_0x1eb77a),_0x543b9f=(await this[_0x2c0383(0x22c)]['requireSession'](_0x708db6))[_0x2c0383(0x1f3)]();if(_0xa7b38d){const _0x1bd899={'memberId':_0x543b9f,'unitId':_0x708db6,'content':_0x350802,'mention':_0x3782d7,'threadId':_0x54d336},_0xec6ee8=(await this[_0x2c0383(0x203)][_0x2c0383(0x1f5)](_0x2c0383(0x22b)+_0x708db6+_0x2c0383(0x237),{'body':_0x1bd899}))[_0x2c0383(0x20f)]['reply'];return{..._0xda541f,'id':_0xec6ee8[_0x2c0383(0x240)],'dT':_0x255919(+_0xec6ee8[_0x2c0383(0x233)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0xec6ee8[_0x2c0383(0x208)]};}else{const _0xe5a528={'memberId':_0x543b9f,'unitId':_0x708db6,'content':_0x350802,'mention':_0x3782d7},_0x19485b=await this['_httpService'][_0x2c0383(0x1f5)](_0x2c0383(0x22b)+_0x708db6+_0x2c0383(0x217),{'body':_0xe5a528});return X(_0x19485b[_0x2c0383(0x20f)][_0x2c0383(0x221)],_0xda541f);}}async['updateComment'](_0x522fcd){const _0x132034=_0x32593b;var _0x44a055,_0x4b17cd;const {text:_0x1ce70e,unitId:_0x57df11}=_0x522fcd,_0x48a142=(_0x4b17cd=(_0x44a055=_0x1ce70e[_0x132034(0x1fe)])==null?void 0x0:_0x44a055[_0x132034(0x1f7)](_0x3b1956=>_0x3b1956[_0x132034(0x20c)]===_0x49f0f2[_0x132034(0x229)])[_0x132034(0x21c)](_0x253041=>_0x253041[_0x132034(0x1f8)]))!=null?_0x4b17cd:[],_0x2e926d=JSON['stringify'](_0x1ce70e),_0xa2564e=_0x522fcd[_0x132034(0x243)],_0x49f8f9=_0x522fcd['id'],_0x5654e7={'memberId':(await this[_0x132034(0x22c)][_0x132034(0x232)](_0x57df11))[_0x132034(0x1f3)](),'unitId':_0x57df11,'threadId':_0xa2564e,'mention':_0x48a142,'content':_0x2e926d,'replyId':_0x49f8f9},_0x372dca=await this['_httpService']['post'](_0x132034(0x22b)+_0x57df11+_0x132034(0x24c),{'body':_0x5654e7});return!_0x372dca[_0x132034(0x20f)][_0x132034(0x21e)]||_0x372dca[_0x132034(0x20f)]['error']['code']===0x1;}async['resolveComment'](_0x42f97b){const _0x3d2006=_0x32593b,{unitId:_0x2e3279}=_0x42f97b,_0x351c9c=_0x42f97b[_0x3d2006(0x243)],_0xe382b5={'memberId':this[_0x3d2006(0x238)][_0x3d2006(0x23f)]()[_0x3d2006(0x23c)],'unitId':_0x2e3279,'threadId':_0x351c9c,'solved':_0x42f97b['resolved']?I[_0x3d2006(0x212)]:I[_0x3d2006(0x227)]},_0x15daf5=await this['_httpService']['post'](_0x3d2006(0x22b)+_0x2e3279+_0x3d2006(0x20e),{'body':_0xe382b5});return!_0x15daf5[_0x3d2006(0x20f)][_0x3d2006(0x21e)]||_0x15daf5['body'][_0x3d2006(0x21e)]['code']===0x1;}async['deleteComment'](_0x2f9b23,_0x1fa5a9,_0x10131e,_0x380a9e){const _0x4f8190=_0x32593b,_0x5c3ebe={'memberId':(await this[_0x4f8190(0x22c)][_0x4f8190(0x232)](_0x2f9b23))[_0x4f8190(0x1f3)](),'threadId':_0x10131e,'replyId':_0x380a9e,'unitId':_0x2f9b23},_0x15a431=await this[_0x4f8190(0x203)][_0x4f8190(0x1f5)](_0x4f8190(0x22b)+_0x2f9b23+_0x4f8190(0x1fa),{'body':_0x5c3ebe});return!_0x15a431[_0x4f8190(0x20f)][_0x4f8190(0x21e)]||_0x15a431['body'][_0x4f8190(0x21e)]['code']===0x1;}async[_0x32593b(0x235)](_0x2d56a6,_0x160fd3,_0x139651){const _0x3dfaea=_0x32593b,_0x160338={'unitId':_0x2d56a6,'threadId':_0x139651},_0x1bdfed=await this[_0x3dfaea(0x203)][_0x3dfaea(0x1f5)](_0x3dfaea(0x22b)+_0x2d56a6+_0x3dfaea(0x247),{'body':_0x160338}),_0x36079b=_0x139651[_0x3dfaea(0x21c)](_0x4e6117=>ee(_0x1bdfed['body'][_0x3dfaea(0x23b)][_0x4e6117],_0x2d56a6,_0x160fd3))[_0x3dfaea(0x1f7)](Boolean);return Object['values'](_0x1bdfed[_0x3dfaea(0x20f)][_0x3dfaea(0x219)])[_0x3dfaea(0x236)](_0x5c508c=>{const _0x5142b1=_0x3dfaea;this[_0x5142b1(0x238)]['addUser'](_0x5c508c);}),_0x36079b;}['saveCommentToSnapshot'](_0x379471){const _0xe40a1b=_0x32593b;return{'id':_0x379471['id'],'threadId':_0x379471[_0xe40a1b(0x243)],'ref':_0x379471['ref']};}};f=Q([_(0x0,_0x9b5830(_0x5af417)),_(0x1,_0x9b5830(_0x43f749)),_(0x2,_0x9b5830(_0x197a37)),_(0x3,_0x9b5830(_0x57c758))],f);function _0x51fd(_0x73eb84,_0x4da1fb){const _0x3725c3=_0x3725();return _0x51fd=function(_0x51fd1b,_0x15c1c6){_0x51fd1b=_0x51fd1b-0x1f2;let _0x276321=_0x3725c3[_0x51fd1b];return _0x276321;},_0x51fd(_0x73eb84,_0x4da1fb);}var re=Object['getOwnPropertyDescriptor'],te=(_0x3e59ae,_0x1db0a4,_0x5cfe78,_0x3b14f7)=>{const _0x43997f=_0x32593b;for(var _0x43fdac=_0x3b14f7>0x1?void 0x0:_0x3b14f7?re(_0x1db0a4,_0x5cfe78):_0x1db0a4,_0x19760a=_0x3e59ae[_0x43997f(0x248)]-0x1,_0x266302;_0x19760a>=0x0;_0x19760a--)(_0x266302=_0x3e59ae[_0x19760a])&&(_0x43fdac=_0x266302(_0x43fdac)||_0x43fdac);return _0x43fdac;},N=(_0x4d749b,_0x5a760b)=>(_0xea4c70,_0x2d46ec)=>_0x5a760b(_0xea4c70,_0x2d46ec,_0x4d749b);let g=class extends _0x136e8f{constructor(_0x269df9,_0x3fe1dc){const _0x59bfb6=_0x32593b;super(),this['_threadCommentDataSourceService']=_0x269df9,this[_0x59bfb6(0x1ff)]=_0x3fe1dc,this[_0x59bfb6(0x210)]();}[_0x32593b(0x210)](){const _0x1315d5=_0x32593b;this[_0x1315d5(0x202)][_0x1315d5(0x211)]=this[_0x1315d5(0x1ff)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x49413f),N(0x1,_0x9b5830(f))],g);var se=Object[_0x32593b(0x21f)],oe=Object[_0x32593b(0x216)],ne=(_0x2dbdc4,_0x27d5e7,_0x1bd7b1)=>_0x27d5e7 in _0x2dbdc4?se(_0x2dbdc4,_0x27d5e7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1bd7b1}):_0x2dbdc4[_0x27d5e7]=_0x1bd7b1,ie=(_0x292f9f,_0x2f3d92,_0x19eb8a,_0x204101)=>{const _0x39aa67=_0x32593b;for(var _0x3878f6=_0x204101>0x1?void 0x0:_0x204101?oe(_0x2f3d92,_0x19eb8a):_0x2f3d92,_0x4660e3=_0x292f9f[_0x39aa67(0x248)]-0x1,_0x14b78d;_0x4660e3>=0x0;_0x4660e3--)(_0x14b78d=_0x292f9f[_0x4660e3])&&(_0x3878f6=_0x14b78d(_0x3878f6)||_0x3878f6);return _0x3878f6;},w=(_0x46c5ba,_0x381f8e)=>(_0x508835,_0x25aec6)=>_0x381f8e(_0x508835,_0x25aec6,_0x46c5ba),$=(_0x5c2db0,_0x32d758,_0x481fca)=>ne(_0x5c2db0,typeof _0x32d758!=_0x32593b(0x204)?_0x32d758+'':_0x32d758,_0x481fca);function _0x3725(){const _0xd10164=['Delete','onStarting','2342116CkcUOL','_injector','addUser','get','525676eAFmsL','getMemberID','deleteComment','post','_init','filter','rangeId','slice','/delete','addComment','getUser','1435665PkjsXQ','customRanges','_threadCommentDataSource','unitId','disposeWithMe','_threadCommentDataSourceService','_httpService','symbol','_commentService','_initUserSync','_config','userId','format','/universer-api/user/list','UNRECOGNIZED','rangeType','parentId','/solved','body','_initDataSource','dataSource','Solved','root','Solve','1764YCiPbl','getOwnPropertyDescriptor','/add','type','users','subscribe','3060968CAjsgA','map','getUnit','error','defineProperty','add','comment','find','content','_threadCommentModel','onReady','UNIVER_UNKNOWN','OpenOrReOpen','Edit','COMMENT','solved','/universer-api/comment/unit/','_sessionService','Add','_configService','149484eiySRq','parse','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','requireSession','createTimestamp','delete','listComments','forEach','/reply','_userService','thread-comment-data-source.config','Reply','comments','userID','size','3145710ICPYuK','getCurrentUser','replyId','replies','user','threadId','pipe','8169DWLpUl','pluginName','/list','length','Unknown','setConfig','personId','/edit','payload','commentUpdate$'];_0x3725=function(){return _0xd10164;};return _0x3725();}let b=class extends _0x4332cb{constructor(_0x3dc5cf=M,_0x546445,_0x6b2e7f){const _0xffff0e=_0x32593b;super(),this[_0xffff0e(0x207)]=_0x3dc5cf,this['_injector']=_0x546445,this[_0xffff0e(0x22e)]=_0x6b2e7f;const {..._0x1546e0}=_0x2aa03e({},M,this[_0xffff0e(0x207)]);this[_0xffff0e(0x22e)][_0xffff0e(0x24a)](z,_0x1546e0);}[_0x32593b(0x250)](){const _0x1a7124=_0x32593b;[[f],[g],[S]][_0x1a7124(0x236)](_0x2c8a2e=>{const _0x3533c6=_0x1a7124;this[_0x3533c6(0x252)][_0x3533c6(0x220)](_0x2c8a2e);});}[_0x32593b(0x225)](){const _0xe1971f=_0x32593b;this['_injector']['get'](g),this[_0xe1971f(0x252)][_0xe1971f(0x254)](S);}};$(b,_0x32593b(0x246),W),$(b,_0x32593b(0x218),_0x34926c[_0x32593b(0x226)]),b=ie([_0x44d782(_0xea9a1,_0x182658,_0x3592f4),w(0x1,_0x9b5830(_0x57c758)),w(0x2,_0x46444d)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x2d5350=_0x5b24;function _0x5282(){const _0x322b26=['format','OpenOrReOpen','getCurrentUser','/edit','body','symbol','requireSession','/universer-api/comment/unit/','onReady','size','rangeType','userId','Reply','deleteComment','user','ref','getComment','comments','/solved','31920240NEnvaB','get','Unknown','listComments','content','forEach','_httpService','1763512CQnKvL','stringify','parse','root','_configService','replies','_injector','Add','code','Delete','_threadCommentDataSourceService','Solve','getMemberID','_threadCommentDataSource','/add','Solved','_commentService','UNIVER_UNKNOWN','6986168DhicmD','threadId','solved','5801478JeRctW','onStarting','defineProperty','reply','delete','post','updateComment','userID','find','dataSource','subscribe','_sessionService','getUser','disposeWithMe','users','9ZHbwiz','_config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentModel','Edit','getUnit','customRanges','add','1208Pbenet','/list','replyId','_initUserSync','addUser','unitId','5638824XeUNfj','commentUpdate$','1IrWvpq','2885427rweuQJ','_initDataSource','rangeId','COMMENT','filter','type','resolveComment','_userService','createTimestamp','13085twpSKB','UNRECOGNIZED','length','pluginName','map','pipe','error','getOwnPropertyDescriptor'];_0x5282=function(){return _0x322b26;};return _0x5282();}(function(_0x4f49c9,_0x1d89f0){const _0xa95a08=_0x5b24,_0x3a6338=_0x4f49c9();while(!![]){try{const _0x5300d0=parseInt(_0xa95a08(0xed))/0x1*(parseInt(_0xa95a08(0x119))/0x2)+parseInt(_0xa95a08(0xee))/0x3+parseInt(_0xa95a08(0xe5))/0x4*(parseInt(_0xa95a08(0xf7))/0x5)+parseInt(_0xa95a08(0xce))/0x6+parseInt(_0xa95a08(0xcb))/0x7+parseInt(_0xa95a08(0xeb))/0x8*(-parseInt(_0xa95a08(0xdd))/0x9)+-parseInt(_0xa95a08(0x112))/0xa;if(_0x5300d0===_0x1d89f0)break;else _0x3a6338['push'](_0x3a6338['shift']());}catch(_0xee8e77){_0x3a6338['push'](_0x3a6338['shift']());}}}(_0x5282,0xab607));import{CommentService as _0x5646f3,CollaborationSessionService as _0x242f6a,UniverCollaborationClientPlugin as _0x1f9298}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3137d0}from'@univerjs-pro/license';import{dayjs as _0x4b79be,UserManagerService as _0x48e2a5,Inject as _0x82e101,Injector as _0x2de2a0,Disposable as _0xd7e540,CustomRangeType as _0x27a3d3,UniverInstanceType as _0x5b3885,DependentOn as _0xfde2f5,IConfigService as _0x14ce99,Plugin as _0x419499,merge as _0x4682c7}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x55cac6}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1ba485,IThreadCommentDataSourceService as _0x4fae4e}from'@univerjs/thread-comment';import{bufferTime as _0x1ee30f}from'rxjs';function _0x5b24(_0x1cdd0e,_0x5af263){const _0x5282bc=_0x5282();return _0x5b24=function(_0x5b240b,_0x2b21c8){_0x5b240b=_0x5b240b-0xc8;let _0x1acb8b=_0x5282bc[_0x5b240b];return _0x1acb8b;},_0x5b24(_0x1cdd0e,_0x5af263);}import{HTTPService as _0x16aa01}from'@univerjs/network';const W=_0x2d5350(0xdf);var I=(_0x3024b4=>(_0x3024b4[_0x3024b4[_0x2d5350(0x100)]=0x0]='OpenOrReOpen',_0x3024b4[_0x3024b4['Solved']=0x1]='Solved',_0x3024b4[_0x3024b4[_0x2d5350(0xf8)]=-0x1]='UNRECOGNIZED',_0x3024b4))(I||{}),v=(_0x124b25=>(_0x124b25[_0x124b25[_0x2d5350(0x114)]=0x0]=_0x2d5350(0x114),_0x124b25[_0x124b25[_0x2d5350(0x120)]=0x1]=_0x2d5350(0x120),_0x124b25[_0x124b25[_0x2d5350(0x10b)]=0x2]=_0x2d5350(0x10b),_0x124b25[_0x124b25[_0x2d5350(0xe1)]=0x3]=_0x2d5350(0xe1),_0x124b25[_0x124b25[_0x2d5350(0x122)]=0x4]=_0x2d5350(0x122),_0x124b25[_0x124b25[_0x2d5350(0x124)]=0x5]=_0x2d5350(0x124),_0x124b25[_0x124b25[_0x2d5350(0xf8)]=-0x1]=_0x2d5350(0xf8),_0x124b25))(v||{});const D=_0x35cca1=>_0x4b79be(new Date(+_0x35cca1))[_0x2d5350(0xff)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3e423b,_0x367b81)=>{const _0x8e92fc=_0x2d5350,_0x379b67=_0x3e423b[_0x8e92fc(0x113)](_0x48e2a5),_0xa89619=_0x3e423b['get'](_0x16aa01);_0x367b81['forEach'](_0x16088e=>{const _0x3d4f42=_0x8e92fc;_0x379b67[_0x3d4f42(0xda)](_0x16088e)&&_0x367b81[_0x3d4f42(0xd2)](_0x16088e);}),_0x367b81[_0x8e92fc(0x108)]&&(await _0xa89619[_0x8e92fc(0x113)]('/universer-api/user/list',{'params':{'userIDs':[..._0x367b81]}}))[_0x8e92fc(0x103)][_0x8e92fc(0xdc)][_0x8e92fc(0x117)](_0x402337=>{const _0x2ffb06=_0x8e92fc;_0x402337&&_0x379b67[_0x2ffb06(0xe9)](_0x402337);});};var K=Object[_0x2d5350(0xfe)],V=(_0xcb8fcf,_0x975fa6,_0x305288,_0x4242cf)=>{const _0x5429ec=_0x2d5350;for(var _0x17ad9a=_0x4242cf>0x1?void 0x0:_0x4242cf?K(_0x975fa6,_0x305288):_0x975fa6,_0x48544c=_0xcb8fcf[_0x5429ec(0xf9)]-0x1,_0x1bd1ac;_0x48544c>=0x0;_0x48544c--)(_0x1bd1ac=_0xcb8fcf[_0x48544c])&&(_0x17ad9a=_0x1bd1ac(_0x17ad9a)||_0x17ad9a);return _0x17ad9a;},p=(_0x54ffd1,_0x234003)=>(_0x22f624,_0x47e8ec)=>_0x234003(_0x22f624,_0x47e8ec,_0x54ffd1);let S=class extends _0xd7e540{constructor(_0x1c8253,_0x50c327,_0x11a5e8,_0x4f4a1c){const _0x431fd6=_0x2d5350;super(),this[_0x431fd6(0xc9)]=_0x1c8253,this[_0x431fd6(0xe0)]=_0x50c327,this[_0x431fd6(0xf5)]=_0x11a5e8,this[_0x431fd6(0x11f)]=_0x4f4a1c,this['_init'](),this[_0x431fd6(0xe8)]();}[_0x2d5350(0xe8)](){const _0x430198=_0x2d5350;this[_0x430198(0xdb)](this['_threadCommentModel'][_0x430198(0xec)][_0x430198(0xfc)](_0x1ee30f(0x10))['subscribe'](_0x387b63=>{const _0x35251e=_0x430198,_0xe145be=new Set();_0x387b63[_0x35251e(0x117)](_0x128904=>{const _0x400e9b=_0x35251e;switch(_0x128904[_0x400e9b(0xf3)]){case'add':{const _0x35594e=_0x128904['payload']['personId'];_0xe145be[_0x400e9b(0xe4)](_0x35594e);break;}}}),B(this[_0x35251e(0x11f)],_0xe145be);}));}['_init'](){const _0x10548d=_0x2d5350;this[_0x10548d(0xdb)](this[_0x10548d(0xc9)][_0x10548d(0xec)][_0x10548d(0xd8)](async _0x79bf6a=>{const _0x1b120d=_0x10548d;var _0x2a947d,_0x45f03f,_0x33dc3b,_0x5c655c;const _0x35e463=(_0x2a947d=this[_0x1b120d(0xe0)][_0x1b120d(0xe2)](_0x79bf6a[_0x1b120d(0xea)])[_0x1b120d(0xd6)](_0x5cfb28=>_0x5cfb28[_0x1b120d(0xcc)]===_0x79bf6a[_0x1b120d(0xcc)]))==null?void 0x0:_0x2a947d[_0x1b120d(0x11c)];if(!_0x35e463)return;const {unitId:_0x41d88e,subUnitId:_0x456ee6}=_0x35e463;switch(_0x79bf6a[_0x1b120d(0x10d)]&&this['_userService'][_0x1b120d(0xe9)](_0x79bf6a[_0x1b120d(0x10d)]),_0x79bf6a[_0x1b120d(0xf3)]){case v[_0x1b120d(0x120)]:break;case v['Reply']:{this[_0x1b120d(0xe0)]['addComment'](_0x41d88e,_0x456ee6,{'unitId':_0x41d88e,'subUnitId':_0x456ee6,'ref':'','id':_0x79bf6a['replyId'],'dT':D(+_0x79bf6a[_0x1b120d(0xf6)]),'threadId':_0x79bf6a['threadId'],'personId':(_0x33dc3b=(_0x45f03f=_0x79bf6a[_0x1b120d(0x10d)])==null?void 0x0:_0x45f03f[_0x1b120d(0xd5)])!=null?_0x33dc3b:_0x79bf6a['userId'],'text':JSON[_0x1b120d(0x11b)](_0x79bf6a[_0x1b120d(0x116)]),'parentId':_0x35e463['id']});break;}case v[_0x1b120d(0x122)]:{const _0x151700=this['_threadCommentModel'][_0x1b120d(0x10f)](_0x41d88e,_0x456ee6,_0x79bf6a[_0x1b120d(0xe7)]);_0x151700&&_0x151700['parentId']&&this[_0x1b120d(0xe0)]['deleteComment'](_0x41d88e,_0x456ee6,_0x79bf6a[_0x1b120d(0xe7)]);break;}case v[_0x1b120d(0xe1)]:{this['_threadCommentModel']['updateComment'](_0x41d88e,_0x456ee6,{'commentId':_0x79bf6a['replyId'],'text':JSON[_0x1b120d(0x11b)](_0x79bf6a[_0x1b120d(0x116)])});break;}case v[_0x1b120d(0x124)]:{const _0x3d510d=(_0x5c655c=this[_0x1b120d(0xe0)][_0x1b120d(0xe2)](_0x79bf6a['unitId'])[_0x1b120d(0xd6)](_0x167fe3=>_0x167fe3['threadId']===_0x79bf6a[_0x1b120d(0xcc)]))==null?void 0x0:_0x5c655c[_0x1b120d(0x11c)];_0x3d510d&&this[_0x1b120d(0xe0)][_0x1b120d(0xf4)](_0x41d88e,_0x456ee6,_0x3d510d['id'],_0x79bf6a[_0x1b120d(0xcd)]===I[_0x1b120d(0xc8)]);break;}}}));}};S=V([p(0x0,_0x82e101(_0x5646f3)),p(0x1,_0x82e101(_0x1ba485)),p(0x2,_0x82e101(_0x48e2a5)),p(0x3,_0x82e101(_0x2de2a0))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1df013,_0x388f42,_0x986144,_0x5354af)=>{const _0x4b08f0=_0x2d5350;for(var _0x27d257=_0x5354af>0x1?void 0x0:_0x5354af?k(_0x388f42,_0x986144):_0x388f42,_0x2e01c4=_0x1df013[_0x4b08f0(0xf9)]-0x1,_0x26e628;_0x2e01c4>=0x0;_0x2e01c4--)(_0x26e628=_0x1df013[_0x2e01c4])&&(_0x27d257=_0x26e628(_0x27d257)||_0x27d257);return _0x27d257;},_=(_0x4bdda0,_0x36d52c)=>(_0x520d65,_0x141c4e)=>_0x36d52c(_0x520d65,_0x141c4e,_0x4bdda0);function X(_0x5e74aa,_0x413701){const _0x2f8e15=_0x2d5350,_0x5ac38b=_0x5e74aa[_0x2f8e15(0x11e)][0x0];return{..._0x413701,'id':_0x5ac38b[_0x2f8e15(0xe7)],'resolved':_0x5e74aa[_0x2f8e15(0xcd)]===0x1,'dT':D(_0x5ac38b[_0x2f8e15(0xf6)]),'personId':_0x5ac38b[_0x2f8e15(0x10a)],'threadId':_0x5ac38b[_0x2f8e15(0xcc)]};}function ee(_0x2417a,_0x1931a0,_0x5b039b){const _0xee6606=_0x2d5350;var _0x2dc4af,_0x85328f;if(((_0x85328f=(_0x2dc4af=_0x2417a==null?void 0x0:_0x2417a[_0xee6606(0x11e)])==null?void 0x0:_0x2dc4af[_0xee6606(0xf9)])!=null?_0x85328f:0x0)>0x0){const _0x395103=(_0x360bdc,_0x38d607)=>({'id':_0x360bdc['replyId'],'threadId':_0x360bdc[_0xee6606(0xcc)],'dT':D(_0x360bdc[_0xee6606(0xf6)]),'personId':_0x360bdc[_0xee6606(0x10a)],'resolved':_0x2417a[_0xee6606(0xcd)]===I[_0xee6606(0xc8)],'unitId':_0x1931a0,'subUnitId':_0x5b039b,'text':JSON[_0xee6606(0x11b)](_0x360bdc[_0xee6606(0x116)]),'parentId':_0x38d607}),_0x4dce44=_0x395103(_0x2417a[_0xee6606(0x11e)][0x0]);return{..._0x4dce44,'children':_0x2417a['replies']['slice'](0x1)[_0xee6606(0xfb)](_0x5bbbba=>_0x395103(_0x5bbbba,_0x4dce44['id']))};}return null;}let f=class{constructor(_0x27a508,_0x576c22,_0x28db77,_0x1180f6){const _0x12defe=_0x2d5350;this[_0x12defe(0x118)]=_0x27a508,this['_userService']=_0x576c22,this[_0x12defe(0xd9)]=_0x28db77,this['_injector']=_0x1180f6;}async['addComment'](_0x2610cc){const _0x30c68b=_0x2d5350;var _0x4071d5,_0x4a7861;const {parentId:_0x324571,unitId:_0x17f5e0,text:_0x81fbea,threadId:_0x151e10}=_0x2610cc,_0x2e0da6=(_0x4a7861=(_0x4071d5=_0x81fbea[_0x30c68b(0xe3)])==null?void 0x0:_0x4071d5[_0x30c68b(0xf2)](_0x43d350=>_0x43d350[_0x30c68b(0x109)]===_0x27a3d3[_0x30c68b(0xf1)])[_0x30c68b(0xfb)](_0x6c75c5=>_0x6c75c5[_0x30c68b(0xf0)]))!=null?_0x4a7861:[],_0x1a50a4=JSON[_0x30c68b(0x11a)](_0x81fbea),_0x55db86=(await this[_0x30c68b(0xd9)]['requireSession'](_0x17f5e0))[_0x30c68b(0x125)]();if(_0x324571){const _0x580ad2={'memberId':_0x55db86,'unitId':_0x17f5e0,'content':_0x1a50a4,'mention':_0x2e0da6,'threadId':_0x151e10},_0x2d770c=(await this['_httpService']['post'](_0x30c68b(0x106)+_0x17f5e0+'/reply',{'body':_0x580ad2}))[_0x30c68b(0x103)][_0x30c68b(0xd1)];return{..._0x2610cc,'id':_0x2d770c[_0x30c68b(0xe7)],'dT':_0x4b79be(+_0x2d770c[_0x30c68b(0xf6)])[_0x30c68b(0xff)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2d770c[_0x30c68b(0x10a)]};}else{const _0xceb580={'memberId':_0x55db86,'unitId':_0x17f5e0,'content':_0x1a50a4,'mention':_0x2e0da6},_0x168c13=await this['_httpService'][_0x30c68b(0xd3)](_0x30c68b(0x106)+_0x17f5e0+_0x30c68b(0x127),{'body':_0xceb580});return X(_0x168c13['body']['comment'],_0x2610cc);}}async[_0x2d5350(0xd4)](_0x47e27d){const _0x85ce6a=_0x2d5350;var _0x31e541,_0x49498e;const {text:_0x1951c8,unitId:_0x195b3f}=_0x47e27d,_0x2f6d65=(_0x49498e=(_0x31e541=_0x1951c8['customRanges'])==null?void 0x0:_0x31e541[_0x85ce6a(0xf2)](_0x111feb=>_0x111feb['rangeType']===_0x27a3d3[_0x85ce6a(0xf1)])[_0x85ce6a(0xfb)](_0x35fdd7=>_0x35fdd7['rangeId']))!=null?_0x49498e:[],_0x713cf1=JSON[_0x85ce6a(0x11a)](_0x1951c8),_0x4fc30d=_0x47e27d[_0x85ce6a(0xcc)],_0x1e5033=_0x47e27d['id'],_0x487d62={'memberId':(await this[_0x85ce6a(0xd9)][_0x85ce6a(0x105)](_0x195b3f))[_0x85ce6a(0x125)](),'unitId':_0x195b3f,'threadId':_0x4fc30d,'mention':_0x2f6d65,'content':_0x713cf1,'replyId':_0x1e5033},_0x236b07=await this[_0x85ce6a(0x118)][_0x85ce6a(0xd3)](_0x85ce6a(0x106)+_0x195b3f+_0x85ce6a(0x102),{'body':_0x487d62});return!_0x236b07['body'][_0x85ce6a(0xfd)]||_0x236b07[_0x85ce6a(0x103)]['error'][_0x85ce6a(0x121)]===0x1;}async[_0x2d5350(0xf4)](_0x675f29){const _0x43c343=_0x2d5350,{unitId:_0x27a660}=_0x675f29,_0x448c66=_0x675f29[_0x43c343(0xcc)],_0x14a711={'memberId':this[_0x43c343(0xf5)][_0x43c343(0x101)]()['userID'],'unitId':_0x27a660,'threadId':_0x448c66,'solved':_0x675f29['resolved']?I['Solved']:I['OpenOrReOpen']},_0x282023=await this[_0x43c343(0x118)][_0x43c343(0xd3)]('/universer-api/comment/unit/'+_0x27a660+_0x43c343(0x111),{'body':_0x14a711});return!_0x282023[_0x43c343(0x103)][_0x43c343(0xfd)]||_0x282023[_0x43c343(0x103)][_0x43c343(0xfd)]['code']===0x1;}async[_0x2d5350(0x10c)](_0x3776f5,_0x3ba336,_0x1779c9,_0x5ae9b3){const _0xbafe49=_0x2d5350,_0x3d9aad={'memberId':(await this['_sessionService'][_0xbafe49(0x105)](_0x3776f5))[_0xbafe49(0x125)](),'threadId':_0x1779c9,'replyId':_0x5ae9b3,'unitId':_0x3776f5},_0x2d252c=await this['_httpService']['post'](_0xbafe49(0x106)+_0x3776f5+'/delete',{'body':_0x3d9aad});return!_0x2d252c[_0xbafe49(0x103)][_0xbafe49(0xfd)]||_0x2d252c[_0xbafe49(0x103)][_0xbafe49(0xfd)][_0xbafe49(0x121)]===0x1;}async[_0x2d5350(0x115)](_0x5bc84b,_0x124577,_0x144626){const _0x32ed26=_0x2d5350,_0x5c63f8={'unitId':_0x5bc84b,'threadId':_0x144626},_0x28f4ec=await this[_0x32ed26(0x118)][_0x32ed26(0xd3)]('/universer-api/comment/unit/'+_0x5bc84b+_0x32ed26(0xe6),{'body':_0x5c63f8}),_0x49ddfc=_0x144626[_0x32ed26(0xfb)](_0x1fab8e=>ee(_0x28f4ec['body'][_0x32ed26(0x110)][_0x1fab8e],_0x5bc84b,_0x124577))['filter'](Boolean);return Object['values'](_0x28f4ec[_0x32ed26(0x103)][_0x32ed26(0xdc)])[_0x32ed26(0x117)](_0xd5d441=>{const _0x1af91d=_0x32ed26;this[_0x1af91d(0xf5)][_0x1af91d(0xe9)](_0xd5d441);}),_0x49ddfc;}['saveCommentToSnapshot'](_0x172d15){const _0x52eb70=_0x2d5350;return{'id':_0x172d15['id'],'threadId':_0x172d15['threadId'],'ref':_0x172d15[_0x52eb70(0x10e)]};}};f=Q([_(0x0,_0x82e101(_0x16aa01)),_(0x1,_0x82e101(_0x48e2a5)),_(0x2,_0x82e101(_0x242f6a)),_(0x3,_0x82e101(_0x2de2a0))],f);var re=Object[_0x2d5350(0xfe)],te=(_0x161bb3,_0x4e6a7b,_0x316e49,_0x3b8236)=>{const _0x99020e=_0x2d5350;for(var _0x38d524=_0x3b8236>0x1?void 0x0:_0x3b8236?re(_0x4e6a7b,_0x316e49):_0x4e6a7b,_0x39255b=_0x161bb3[_0x99020e(0xf9)]-0x1,_0x1341c9;_0x39255b>=0x0;_0x39255b--)(_0x1341c9=_0x161bb3[_0x39255b])&&(_0x38d524=_0x1341c9(_0x38d524)||_0x38d524);return _0x38d524;},N=(_0x31621c,_0xad4c0f)=>(_0x2024d5,_0x394031)=>_0xad4c0f(_0x2024d5,_0x394031,_0x31621c);let g=class extends _0xd7e540{constructor(_0x2e1c38,_0x31f48d){const _0x61a7bc=_0x2d5350;super(),this[_0x61a7bc(0x123)]=_0x2e1c38,this[_0x61a7bc(0x126)]=_0x31f48d,this[_0x61a7bc(0xef)]();}['_initDataSource'](){const _0x99b2e2=_0x2d5350;this[_0x99b2e2(0x123)][_0x99b2e2(0xd7)]=this[_0x99b2e2(0x126)],this[_0x99b2e2(0x123)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x4fae4e),N(0x1,_0x82e101(f))],g);var se=Object[_0x2d5350(0xd0)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1d8100,_0xb2340,_0x542ef7)=>_0xb2340 in _0x1d8100?se(_0x1d8100,_0xb2340,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x542ef7}):_0x1d8100[_0xb2340]=_0x542ef7,ie=(_0x42f1d8,_0x4548d8,_0x54b53c,_0x4c2c1f)=>{for(var _0x5dbc5d=_0x4c2c1f>0x1?void 0x0:_0x4c2c1f?oe(_0x4548d8,_0x54b53c):_0x4548d8,_0xdae79f=_0x42f1d8['length']-0x1,_0x2c1c90;_0xdae79f>=0x0;_0xdae79f--)(_0x2c1c90=_0x42f1d8[_0xdae79f])&&(_0x5dbc5d=_0x2c1c90(_0x5dbc5d)||_0x5dbc5d);return _0x5dbc5d;},w=(_0xbd0b62,_0x57b92e)=>(_0x2f69b6,_0x5c7479)=>_0x57b92e(_0x2f69b6,_0x5c7479,_0xbd0b62),$=(_0x52dd39,_0x1a4a83,_0x1fdefe)=>ne(_0x52dd39,typeof _0x1a4a83!=_0x2d5350(0x104)?_0x1a4a83+'':_0x1a4a83,_0x1fdefe);let b=class extends _0x419499{constructor(_0x418a10=M,_0x4b4bbc,_0x16863c){const _0x421808=_0x2d5350;super(),this['_config']=_0x418a10,this[_0x421808(0x11f)]=_0x4b4bbc,this[_0x421808(0x11d)]=_0x16863c;const {..._0x5da4ff}=_0x4682c7({},M,this[_0x421808(0xde)]);this['_configService']['setConfig'](z,_0x5da4ff);}[_0x2d5350(0xcf)](){const _0x173f0d=_0x2d5350;[[f],[g],[S]][_0x173f0d(0x117)](_0x43f6e8=>{const _0x41eb1d=_0x173f0d;this['_injector'][_0x41eb1d(0xe4)](_0x43f6e8);});}[_0x2d5350(0x107)](){const _0x51c706=_0x2d5350;this[_0x51c706(0x11f)][_0x51c706(0x113)](g),this[_0x51c706(0x11f)]['get'](S);}};$(b,_0x2d5350(0xfa),W),$(b,'type',_0x5b3885[_0x2d5350(0xca)]),b=ie([_0xfde2f5(_0x55cac6,_0x1f9298,_0x3137d0),w(0x1,_0x82e101(_0x2de2a0)),w(0x2,_0x14ce99)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x32593b=_0x51fd;(function(_0x59556a,_0x213cce){const _0x290389=_0x51fd,_0x437077=_0x59556a();while(!![]){try{const _0x307ce9=-parseInt(_0x290389(0x22f))/0x1+parseInt(_0x290389(0x1f2))/0x2+-parseInt(_0x290389(0x1fd))/0x3+parseInt(_0x290389(0x251))/0x4+-parseInt(_0x290389(0x23e))/0x5+parseInt(_0x290389(0x215))/0x6*(parseInt(_0x290389(0x245))/0x7)+parseInt(_0x290389(0x21b))/0x8;if(_0x307ce9===_0x213cce)break;else _0x437077['push'](_0x437077['shift']());}catch(_0x1c2812){_0x437077['push'](_0x437077['shift']());}}}(_0x3725,0x4d5e9));import{CommentService as _0x3b45f0,CollaborationSessionService as _0x197a37,UniverCollaborationClientPlugin as _0x182658}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3592f4}from'@univerjs-pro/license';import{dayjs as _0x255919,UserManagerService as _0x43f749,Inject as _0x9b5830,Injector as _0x57c758,Disposable as _0x136e8f,CustomRangeType as _0x49f0f2,UniverInstanceType as _0x34926c,DependentOn as _0x44d782,IConfigService as _0x46444d,Plugin as _0x4332cb,merge as _0x2aa03e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xea9a1}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2927dc,IThreadCommentDataSourceService as _0x49413f}from'@univerjs/thread-comment';import{bufferTime as _0x14c0b1}from'rxjs';import{HTTPService as _0x5af417}from'@univerjs/network';const W=_0x32593b(0x231);var I=(_0x22bc7d=>(_0x22bc7d[_0x22bc7d[_0x32593b(0x227)]=0x0]=_0x32593b(0x227),_0x22bc7d[_0x22bc7d[_0x32593b(0x212)]=0x1]='Solved',_0x22bc7d[_0x22bc7d['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x22bc7d))(I||{}),v=(_0x2a8bc9=>(_0x2a8bc9[_0x2a8bc9[_0x32593b(0x249)]=0x0]=_0x32593b(0x249),_0x2a8bc9[_0x2a8bc9[_0x32593b(0x22d)]=0x1]='Add',_0x2a8bc9[_0x2a8bc9[_0x32593b(0x23a)]=0x2]=_0x32593b(0x23a),_0x2a8bc9[_0x2a8bc9[_0x32593b(0x228)]=0x3]=_0x32593b(0x228),_0x2a8bc9[_0x2a8bc9[_0x32593b(0x24f)]=0x4]=_0x32593b(0x24f),_0x2a8bc9[_0x2a8bc9[_0x32593b(0x214)]=0x5]='Solve',_0x2a8bc9[_0x2a8bc9[_0x32593b(0x20b)]=-0x1]=_0x32593b(0x20b),_0x2a8bc9))(v||{});const D=_0x17c914=>_0x255919(new Date(+_0x17c914))[_0x32593b(0x209)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x380532,_0x32ceff)=>{const _0x1e2646=_0x32593b,_0x97741c=_0x380532[_0x1e2646(0x254)](_0x43f749),_0x1b563b=_0x380532[_0x1e2646(0x254)](_0x5af417);_0x32ceff[_0x1e2646(0x236)](_0x488096=>{const _0x570972=_0x1e2646;_0x97741c[_0x570972(0x1fc)](_0x488096)&&_0x32ceff[_0x570972(0x234)](_0x488096);}),_0x32ceff[_0x1e2646(0x23d)]&&(await _0x1b563b['get'](_0x1e2646(0x20a),{'params':{'userIDs':[..._0x32ceff]}}))[_0x1e2646(0x20f)]['users'][_0x1e2646(0x236)](_0x27270e=>{const _0x30b19a=_0x1e2646;_0x27270e&&_0x97741c[_0x30b19a(0x253)](_0x27270e);});};var K=Object[_0x32593b(0x216)],V=(_0x1c2360,_0x54a8d6,_0x57aa88,_0x4f1f5c)=>{for(var _0x28251d=_0x4f1f5c>0x1?void 0x0:_0x4f1f5c?K(_0x54a8d6,_0x57aa88):_0x54a8d6,_0x339191=_0x1c2360['length']-0x1,_0x3c6e4c;_0x339191>=0x0;_0x339191--)(_0x3c6e4c=_0x1c2360[_0x339191])&&(_0x28251d=_0x3c6e4c(_0x28251d)||_0x28251d);return _0x28251d;},p=(_0x6a970d,_0x463f6f)=>(_0xb43242,_0x5d22bc)=>_0x463f6f(_0xb43242,_0x5d22bc,_0x6a970d);let S=class extends _0x136e8f{constructor(_0x2e455,_0x34bf1b,_0x531665,_0x2b23fe){const _0x272032=_0x32593b;super(),this[_0x272032(0x205)]=_0x2e455,this[_0x272032(0x224)]=_0x34bf1b,this[_0x272032(0x238)]=_0x531665,this[_0x272032(0x252)]=_0x2b23fe,this[_0x272032(0x1f6)](),this[_0x272032(0x206)]();}[_0x32593b(0x206)](){const _0x29804b=_0x32593b;this[_0x29804b(0x201)](this['_threadCommentModel'][_0x29804b(0x24e)][_0x29804b(0x244)](_0x14c0b1(0x10))[_0x29804b(0x21a)](_0x345ba8=>{const _0x39fc88=_0x29804b,_0x4425b4=new Set();_0x345ba8[_0x39fc88(0x236)](_0x5be4d5=>{const _0x5db378=_0x39fc88;switch(_0x5be4d5[_0x5db378(0x218)]){case _0x5db378(0x220):{const _0x4d2234=_0x5be4d5[_0x5db378(0x24d)][_0x5db378(0x24b)];_0x4425b4[_0x5db378(0x220)](_0x4d2234);break;}}}),B(this[_0x39fc88(0x252)],_0x4425b4);}));}[_0x32593b(0x1f6)](){const _0x416e53=_0x32593b;this[_0x416e53(0x201)](this['_commentService'][_0x416e53(0x24e)]['subscribe'](async _0xbfeb65=>{const _0x1cf9a0=_0x416e53;var _0x58c403,_0x45b09,_0xccaf01,_0x63a4a;const _0x153dbe=(_0x58c403=this[_0x1cf9a0(0x224)][_0x1cf9a0(0x21d)](_0xbfeb65[_0x1cf9a0(0x200)])[_0x1cf9a0(0x222)](_0x34cc77=>_0x34cc77['threadId']===_0xbfeb65[_0x1cf9a0(0x243)]))==null?void 0x0:_0x58c403[_0x1cf9a0(0x213)];if(!_0x153dbe)return;const {unitId:_0x50510d,subUnitId:_0x4552f7}=_0x153dbe;switch(_0xbfeb65[_0x1cf9a0(0x242)]&&this['_userService'][_0x1cf9a0(0x253)](_0xbfeb65['user']),_0xbfeb65[_0x1cf9a0(0x218)]){case v[_0x1cf9a0(0x22d)]:break;case v[_0x1cf9a0(0x23a)]:{this[_0x1cf9a0(0x224)][_0x1cf9a0(0x1fb)](_0x50510d,_0x4552f7,{'unitId':_0x50510d,'subUnitId':_0x4552f7,'ref':'','id':_0xbfeb65[_0x1cf9a0(0x240)],'dT':D(+_0xbfeb65[_0x1cf9a0(0x233)]),'threadId':_0xbfeb65['threadId'],'personId':(_0xccaf01=(_0x45b09=_0xbfeb65[_0x1cf9a0(0x242)])==null?void 0x0:_0x45b09['userID'])!=null?_0xccaf01:_0xbfeb65['userId'],'text':JSON[_0x1cf9a0(0x230)](_0xbfeb65[_0x1cf9a0(0x223)]),'parentId':_0x153dbe['id']});break;}case v['Delete']:{const _0x5599c1=this[_0x1cf9a0(0x224)]['getComment'](_0x50510d,_0x4552f7,_0xbfeb65[_0x1cf9a0(0x240)]);_0x5599c1&&_0x5599c1[_0x1cf9a0(0x20d)]&&this['_threadCommentModel'][_0x1cf9a0(0x1f4)](_0x50510d,_0x4552f7,_0xbfeb65[_0x1cf9a0(0x240)]);break;}case v[_0x1cf9a0(0x228)]:{this[_0x1cf9a0(0x224)]['updateComment'](_0x50510d,_0x4552f7,{'commentId':_0xbfeb65[_0x1cf9a0(0x240)],'text':JSON[_0x1cf9a0(0x230)](_0xbfeb65[_0x1cf9a0(0x223)])});break;}case v[_0x1cf9a0(0x214)]:{const _0x5ca788=(_0x63a4a=this[_0x1cf9a0(0x224)][_0x1cf9a0(0x21d)](_0xbfeb65['unitId'])[_0x1cf9a0(0x222)](_0x21e169=>_0x21e169[_0x1cf9a0(0x243)]===_0xbfeb65[_0x1cf9a0(0x243)]))==null?void 0x0:_0x63a4a[_0x1cf9a0(0x213)];_0x5ca788&&this[_0x1cf9a0(0x224)]['resolveComment'](_0x50510d,_0x4552f7,_0x5ca788['id'],_0xbfeb65[_0x1cf9a0(0x22a)]===I[_0x1cf9a0(0x212)]);break;}}}));}};S=V([p(0x0,_0x9b5830(_0x3b45f0)),p(0x1,_0x9b5830(_0x2927dc)),p(0x2,_0x9b5830(_0x43f749)),p(0x3,_0x9b5830(_0x57c758))],S);const z=_0x32593b(0x239),M={};var k=Object[_0x32593b(0x216)],Q=(_0x441207,_0x35647d,_0x5644f9,_0x2e9c15)=>{for(var _0x1bdebe=_0x2e9c15>0x1?void 0x0:_0x2e9c15?k(_0x35647d,_0x5644f9):_0x35647d,_0xedc7a6=_0x441207['length']-0x1,_0x87c2c4;_0xedc7a6>=0x0;_0xedc7a6--)(_0x87c2c4=_0x441207[_0xedc7a6])&&(_0x1bdebe=_0x87c2c4(_0x1bdebe)||_0x1bdebe);return _0x1bdebe;},_=(_0x38dbe1,_0x5c61db)=>(_0x20721d,_0x1cd919)=>_0x5c61db(_0x20721d,_0x1cd919,_0x38dbe1);function X(_0x20f192,_0x1d3a33){const _0x3abfb5=_0x32593b,_0x1613a2=_0x20f192['replies'][0x0];return{..._0x1d3a33,'id':_0x1613a2[_0x3abfb5(0x240)],'resolved':_0x20f192['solved']===0x1,'dT':D(_0x1613a2['createTimestamp']),'personId':_0x1613a2[_0x3abfb5(0x208)],'threadId':_0x1613a2[_0x3abfb5(0x243)]};}function ee(_0x5cbf13,_0xb12159,_0x3af956){const _0x4c3d03=_0x32593b;var _0x5732c3,_0x2c9ee9;if(((_0x2c9ee9=(_0x5732c3=_0x5cbf13==null?void 0x0:_0x5cbf13[_0x4c3d03(0x241)])==null?void 0x0:_0x5732c3[_0x4c3d03(0x248)])!=null?_0x2c9ee9:0x0)>0x0){const _0x81b62f=(_0x260e4b,_0x1c37f0)=>({'id':_0x260e4b[_0x4c3d03(0x240)],'threadId':_0x260e4b['threadId'],'dT':D(_0x260e4b[_0x4c3d03(0x233)]),'personId':_0x260e4b['userId'],'resolved':_0x5cbf13[_0x4c3d03(0x22a)]===I[_0x4c3d03(0x212)],'unitId':_0xb12159,'subUnitId':_0x3af956,'text':JSON[_0x4c3d03(0x230)](_0x260e4b[_0x4c3d03(0x223)]),'parentId':_0x1c37f0}),_0x2aa118=_0x81b62f(_0x5cbf13[_0x4c3d03(0x241)][0x0]);return{..._0x2aa118,'children':_0x5cbf13[_0x4c3d03(0x241)][_0x4c3d03(0x1f9)](0x1)[_0x4c3d03(0x21c)](_0x21ce8b=>_0x81b62f(_0x21ce8b,_0x2aa118['id']))};}return null;}let f=class{constructor(_0x5649fe,_0x45d19d,_0x24f100,_0x5ca544){const _0x26223d=_0x32593b;this[_0x26223d(0x203)]=_0x5649fe,this[_0x26223d(0x238)]=_0x45d19d,this[_0x26223d(0x22c)]=_0x24f100,this[_0x26223d(0x252)]=_0x5ca544;}async['addComment'](_0xda541f){const _0x2c0383=_0x32593b;var _0x39be13,_0x5effbd;const {parentId:_0xa7b38d,unitId:_0x708db6,text:_0x1eb77a,threadId:_0x54d336}=_0xda541f,_0x3782d7=(_0x5effbd=(_0x39be13=_0x1eb77a[_0x2c0383(0x1fe)])==null?void 0x0:_0x39be13['filter'](_0x4c4f83=>_0x4c4f83[_0x2c0383(0x20c)]===_0x49f0f2[_0x2c0383(0x229)])[_0x2c0383(0x21c)](_0x30424d=>_0x30424d[_0x2c0383(0x1f8)]))!=null?_0x5effbd:[],_0x350802=JSON['stringify'](_0x1eb77a),_0x543b9f=(await this[_0x2c0383(0x22c)]['requireSession'](_0x708db6))[_0x2c0383(0x1f3)]();if(_0xa7b38d){const _0x1bd899={'memberId':_0x543b9f,'unitId':_0x708db6,'content':_0x350802,'mention':_0x3782d7,'threadId':_0x54d336},_0xec6ee8=(await this[_0x2c0383(0x203)][_0x2c0383(0x1f5)](_0x2c0383(0x22b)+_0x708db6+_0x2c0383(0x237),{'body':_0x1bd899}))[_0x2c0383(0x20f)]['reply'];return{..._0xda541f,'id':_0xec6ee8[_0x2c0383(0x240)],'dT':_0x255919(+_0xec6ee8[_0x2c0383(0x233)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0xec6ee8[_0x2c0383(0x208)]};}else{const _0xe5a528={'memberId':_0x543b9f,'unitId':_0x708db6,'content':_0x350802,'mention':_0x3782d7},_0x19485b=await this['_httpService'][_0x2c0383(0x1f5)](_0x2c0383(0x22b)+_0x708db6+_0x2c0383(0x217),{'body':_0xe5a528});return X(_0x19485b[_0x2c0383(0x20f)][_0x2c0383(0x221)],_0xda541f);}}async['updateComment'](_0x522fcd){const _0x132034=_0x32593b;var _0x44a055,_0x4b17cd;const {text:_0x1ce70e,unitId:_0x57df11}=_0x522fcd,_0x48a142=(_0x4b17cd=(_0x44a055=_0x1ce70e[_0x132034(0x1fe)])==null?void 0x0:_0x44a055[_0x132034(0x1f7)](_0x3b1956=>_0x3b1956[_0x132034(0x20c)]===_0x49f0f2[_0x132034(0x229)])[_0x132034(0x21c)](_0x253041=>_0x253041[_0x132034(0x1f8)]))!=null?_0x4b17cd:[],_0x2e926d=JSON['stringify'](_0x1ce70e),_0xa2564e=_0x522fcd[_0x132034(0x243)],_0x49f8f9=_0x522fcd['id'],_0x5654e7={'memberId':(await this[_0x132034(0x22c)][_0x132034(0x232)](_0x57df11))[_0x132034(0x1f3)](),'unitId':_0x57df11,'threadId':_0xa2564e,'mention':_0x48a142,'content':_0x2e926d,'replyId':_0x49f8f9},_0x372dca=await this['_httpService']['post'](_0x132034(0x22b)+_0x57df11+_0x132034(0x24c),{'body':_0x5654e7});return!_0x372dca[_0x132034(0x20f)][_0x132034(0x21e)]||_0x372dca[_0x132034(0x20f)]['error']['code']===0x1;}async['resolveComment'](_0x42f97b){const _0x3d2006=_0x32593b,{unitId:_0x2e3279}=_0x42f97b,_0x351c9c=_0x42f97b[_0x3d2006(0x243)],_0xe382b5={'memberId':this[_0x3d2006(0x238)][_0x3d2006(0x23f)]()[_0x3d2006(0x23c)],'unitId':_0x2e3279,'threadId':_0x351c9c,'solved':_0x42f97b['resolved']?I[_0x3d2006(0x212)]:I[_0x3d2006(0x227)]},_0x15daf5=await this['_httpService']['post'](_0x3d2006(0x22b)+_0x2e3279+_0x3d2006(0x20e),{'body':_0xe382b5});return!_0x15daf5[_0x3d2006(0x20f)][_0x3d2006(0x21e)]||_0x15daf5['body'][_0x3d2006(0x21e)]['code']===0x1;}async['deleteComment'](_0x2f9b23,_0x1fa5a9,_0x10131e,_0x380a9e){const _0x4f8190=_0x32593b,_0x5c3ebe={'memberId':(await this[_0x4f8190(0x22c)][_0x4f8190(0x232)](_0x2f9b23))[_0x4f8190(0x1f3)](),'threadId':_0x10131e,'replyId':_0x380a9e,'unitId':_0x2f9b23},_0x15a431=await this[_0x4f8190(0x203)][_0x4f8190(0x1f5)](_0x4f8190(0x22b)+_0x2f9b23+_0x4f8190(0x1fa),{'body':_0x5c3ebe});return!_0x15a431[_0x4f8190(0x20f)][_0x4f8190(0x21e)]||_0x15a431['body'][_0x4f8190(0x21e)]['code']===0x1;}async[_0x32593b(0x235)](_0x2d56a6,_0x160fd3,_0x139651){const _0x3dfaea=_0x32593b,_0x160338={'unitId':_0x2d56a6,'threadId':_0x139651},_0x1bdfed=await this[_0x3dfaea(0x203)][_0x3dfaea(0x1f5)](_0x3dfaea(0x22b)+_0x2d56a6+_0x3dfaea(0x247),{'body':_0x160338}),_0x36079b=_0x139651[_0x3dfaea(0x21c)](_0x4e6117=>ee(_0x1bdfed['body'][_0x3dfaea(0x23b)][_0x4e6117],_0x2d56a6,_0x160fd3))[_0x3dfaea(0x1f7)](Boolean);return Object['values'](_0x1bdfed[_0x3dfaea(0x20f)][_0x3dfaea(0x219)])[_0x3dfaea(0x236)](_0x5c508c=>{const _0x5142b1=_0x3dfaea;this[_0x5142b1(0x238)]['addUser'](_0x5c508c);}),_0x36079b;}['saveCommentToSnapshot'](_0x379471){const _0xe40a1b=_0x32593b;return{'id':_0x379471['id'],'threadId':_0x379471[_0xe40a1b(0x243)],'ref':_0x379471['ref']};}};f=Q([_(0x0,_0x9b5830(_0x5af417)),_(0x1,_0x9b5830(_0x43f749)),_(0x2,_0x9b5830(_0x197a37)),_(0x3,_0x9b5830(_0x57c758))],f);function _0x51fd(_0x73eb84,_0x4da1fb){const _0x3725c3=_0x3725();return _0x51fd=function(_0x51fd1b,_0x15c1c6){_0x51fd1b=_0x51fd1b-0x1f2;let _0x276321=_0x3725c3[_0x51fd1b];return _0x276321;},_0x51fd(_0x73eb84,_0x4da1fb);}var re=Object['getOwnPropertyDescriptor'],te=(_0x3e59ae,_0x1db0a4,_0x5cfe78,_0x3b14f7)=>{const _0x43997f=_0x32593b;for(var _0x43fdac=_0x3b14f7>0x1?void 0x0:_0x3b14f7?re(_0x1db0a4,_0x5cfe78):_0x1db0a4,_0x19760a=_0x3e59ae[_0x43997f(0x248)]-0x1,_0x266302;_0x19760a>=0x0;_0x19760a--)(_0x266302=_0x3e59ae[_0x19760a])&&(_0x43fdac=_0x266302(_0x43fdac)||_0x43fdac);return _0x43fdac;},N=(_0x4d749b,_0x5a760b)=>(_0xea4c70,_0x2d46ec)=>_0x5a760b(_0xea4c70,_0x2d46ec,_0x4d749b);let g=class extends _0x136e8f{constructor(_0x269df9,_0x3fe1dc){const _0x59bfb6=_0x32593b;super(),this['_threadCommentDataSourceService']=_0x269df9,this[_0x59bfb6(0x1ff)]=_0x3fe1dc,this[_0x59bfb6(0x210)]();}[_0x32593b(0x210)](){const _0x1315d5=_0x32593b;this[_0x1315d5(0x202)][_0x1315d5(0x211)]=this[_0x1315d5(0x1ff)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x49413f),N(0x1,_0x9b5830(f))],g);var se=Object[_0x32593b(0x21f)],oe=Object[_0x32593b(0x216)],ne=(_0x2dbdc4,_0x27d5e7,_0x1bd7b1)=>_0x27d5e7 in _0x2dbdc4?se(_0x2dbdc4,_0x27d5e7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1bd7b1}):_0x2dbdc4[_0x27d5e7]=_0x1bd7b1,ie=(_0x292f9f,_0x2f3d92,_0x19eb8a,_0x204101)=>{const _0x39aa67=_0x32593b;for(var _0x3878f6=_0x204101>0x1?void 0x0:_0x204101?oe(_0x2f3d92,_0x19eb8a):_0x2f3d92,_0x4660e3=_0x292f9f[_0x39aa67(0x248)]-0x1,_0x14b78d;_0x4660e3>=0x0;_0x4660e3--)(_0x14b78d=_0x292f9f[_0x4660e3])&&(_0x3878f6=_0x14b78d(_0x3878f6)||_0x3878f6);return _0x3878f6;},w=(_0x46c5ba,_0x381f8e)=>(_0x508835,_0x25aec6)=>_0x381f8e(_0x508835,_0x25aec6,_0x46c5ba),$=(_0x5c2db0,_0x32d758,_0x481fca)=>ne(_0x5c2db0,typeof _0x32d758!=_0x32593b(0x204)?_0x32d758+'':_0x32d758,_0x481fca);function _0x3725(){const _0xd10164=['Delete','onStarting','2342116CkcUOL','_injector','addUser','get','525676eAFmsL','getMemberID','deleteComment','post','_init','filter','rangeId','slice','/delete','addComment','getUser','1435665PkjsXQ','customRanges','_threadCommentDataSource','unitId','disposeWithMe','_threadCommentDataSourceService','_httpService','symbol','_commentService','_initUserSync','_config','userId','format','/universer-api/user/list','UNRECOGNIZED','rangeType','parentId','/solved','body','_initDataSource','dataSource','Solved','root','Solve','1764YCiPbl','getOwnPropertyDescriptor','/add','type','users','subscribe','3060968CAjsgA','map','getUnit','error','defineProperty','add','comment','find','content','_threadCommentModel','onReady','UNIVER_UNKNOWN','OpenOrReOpen','Edit','COMMENT','solved','/universer-api/comment/unit/','_sessionService','Add','_configService','149484eiySRq','parse','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','requireSession','createTimestamp','delete','listComments','forEach','/reply','_userService','thread-comment-data-source.config','Reply','comments','userID','size','3145710ICPYuK','getCurrentUser','replyId','replies','user','threadId','pipe','8169DWLpUl','pluginName','/list','length','Unknown','setConfig','personId','/edit','payload','commentUpdate$'];_0x3725=function(){return _0xd10164;};return _0x3725();}let b=class extends _0x4332cb{constructor(_0x3dc5cf=M,_0x546445,_0x6b2e7f){const _0xffff0e=_0x32593b;super(),this[_0xffff0e(0x207)]=_0x3dc5cf,this['_injector']=_0x546445,this[_0xffff0e(0x22e)]=_0x6b2e7f;const {..._0x1546e0}=_0x2aa03e({},M,this[_0xffff0e(0x207)]);this[_0xffff0e(0x22e)][_0xffff0e(0x24a)](z,_0x1546e0);}[_0x32593b(0x250)](){const _0x1a7124=_0x32593b;[[f],[g],[S]][_0x1a7124(0x236)](_0x2c8a2e=>{const _0x3533c6=_0x1a7124;this[_0x3533c6(0x252)][_0x3533c6(0x220)](_0x2c8a2e);});}[_0x32593b(0x225)](){const _0xe1971f=_0x32593b;this['_injector']['get'](g),this[_0xe1971f(0x252)][_0xe1971f(0x254)](S);}};$(b,_0x32593b(0x246),W),$(b,_0x32593b(0x218),_0x34926c[_0x32593b(0x226)]),b=ie([_0x44d782(_0xea9a1,_0x182658,_0x3592f4),w(0x1,_0x9b5830(_0x57c758)),w(0x2,_0x46444d)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x2d5350=_0x5b24;function _0x5282(){const _0x322b26=['format','OpenOrReOpen','getCurrentUser','/edit','body','symbol','requireSession','/universer-api/comment/unit/','onReady','size','rangeType','userId','Reply','deleteComment','user','ref','getComment','comments','/solved','31920240NEnvaB','get','Unknown','listComments','content','forEach','_httpService','1763512CQnKvL','stringify','parse','root','_configService','replies','_injector','Add','code','Delete','_threadCommentDataSourceService','Solve','getMemberID','_threadCommentDataSource','/add','Solved','_commentService','UNIVER_UNKNOWN','6986168DhicmD','threadId','solved','5801478JeRctW','onStarting','defineProperty','reply','delete','post','updateComment','userID','find','dataSource','subscribe','_sessionService','getUser','disposeWithMe','users','9ZHbwiz','_config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentModel','Edit','getUnit','customRanges','add','1208Pbenet','/list','replyId','_initUserSync','addUser','unitId','5638824XeUNfj','commentUpdate$','1IrWvpq','2885427rweuQJ','_initDataSource','rangeId','COMMENT','filter','type','resolveComment','_userService','createTimestamp','13085twpSKB','UNRECOGNIZED','length','pluginName','map','pipe','error','getOwnPropertyDescriptor'];_0x5282=function(){return _0x322b26;};return _0x5282();}(function(_0x4f49c9,_0x1d89f0){const _0xa95a08=_0x5b24,_0x3a6338=_0x4f49c9();while(!![]){try{const _0x5300d0=parseInt(_0xa95a08(0xed))/0x1*(parseInt(_0xa95a08(0x119))/0x2)+parseInt(_0xa95a08(0xee))/0x3+parseInt(_0xa95a08(0xe5))/0x4*(parseInt(_0xa95a08(0xf7))/0x5)+parseInt(_0xa95a08(0xce))/0x6+parseInt(_0xa95a08(0xcb))/0x7+parseInt(_0xa95a08(0xeb))/0x8*(-parseInt(_0xa95a08(0xdd))/0x9)+-parseInt(_0xa95a08(0x112))/0xa;if(_0x5300d0===_0x1d89f0)break;else _0x3a6338['push'](_0x3a6338['shift']());}catch(_0xee8e77){_0x3a6338['push'](_0x3a6338['shift']());}}}(_0x5282,0xab607));import{CommentService as _0x5646f3,CollaborationSessionService as _0x242f6a,UniverCollaborationClientPlugin as _0x1f9298}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3137d0}from'@univerjs-pro/license';import{dayjs as _0x4b79be,UserManagerService as _0x48e2a5,Inject as _0x82e101,Injector as _0x2de2a0,Disposable as _0xd7e540,CustomRangeType as _0x27a3d3,UniverInstanceType as _0x5b3885,DependentOn as _0xfde2f5,IConfigService as _0x14ce99,Plugin as _0x419499,merge as _0x4682c7}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x55cac6}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1ba485,IThreadCommentDataSourceService as _0x4fae4e}from'@univerjs/thread-comment';import{bufferTime as _0x1ee30f}from'rxjs';function _0x5b24(_0x1cdd0e,_0x5af263){const _0x5282bc=_0x5282();return _0x5b24=function(_0x5b240b,_0x2b21c8){_0x5b240b=_0x5b240b-0xc8;let _0x1acb8b=_0x5282bc[_0x5b240b];return _0x1acb8b;},_0x5b24(_0x1cdd0e,_0x5af263);}import{HTTPService as _0x16aa01}from'@univerjs/network';const W=_0x2d5350(0xdf);var I=(_0x3024b4=>(_0x3024b4[_0x3024b4[_0x2d5350(0x100)]=0x0]='OpenOrReOpen',_0x3024b4[_0x3024b4['Solved']=0x1]='Solved',_0x3024b4[_0x3024b4[_0x2d5350(0xf8)]=-0x1]='UNRECOGNIZED',_0x3024b4))(I||{}),v=(_0x124b25=>(_0x124b25[_0x124b25[_0x2d5350(0x114)]=0x0]=_0x2d5350(0x114),_0x124b25[_0x124b25[_0x2d5350(0x120)]=0x1]=_0x2d5350(0x120),_0x124b25[_0x124b25[_0x2d5350(0x10b)]=0x2]=_0x2d5350(0x10b),_0x124b25[_0x124b25[_0x2d5350(0xe1)]=0x3]=_0x2d5350(0xe1),_0x124b25[_0x124b25[_0x2d5350(0x122)]=0x4]=_0x2d5350(0x122),_0x124b25[_0x124b25[_0x2d5350(0x124)]=0x5]=_0x2d5350(0x124),_0x124b25[_0x124b25[_0x2d5350(0xf8)]=-0x1]=_0x2d5350(0xf8),_0x124b25))(v||{});const D=_0x35cca1=>_0x4b79be(new Date(+_0x35cca1))[_0x2d5350(0xff)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3e423b,_0x367b81)=>{const _0x8e92fc=_0x2d5350,_0x379b67=_0x3e423b[_0x8e92fc(0x113)](_0x48e2a5),_0xa89619=_0x3e423b['get'](_0x16aa01);_0x367b81['forEach'](_0x16088e=>{const _0x3d4f42=_0x8e92fc;_0x379b67[_0x3d4f42(0xda)](_0x16088e)&&_0x367b81[_0x3d4f42(0xd2)](_0x16088e);}),_0x367b81[_0x8e92fc(0x108)]&&(await _0xa89619[_0x8e92fc(0x113)]('/universer-api/user/list',{'params':{'userIDs':[..._0x367b81]}}))[_0x8e92fc(0x103)][_0x8e92fc(0xdc)][_0x8e92fc(0x117)](_0x402337=>{const _0x2ffb06=_0x8e92fc;_0x402337&&_0x379b67[_0x2ffb06(0xe9)](_0x402337);});};var K=Object[_0x2d5350(0xfe)],V=(_0xcb8fcf,_0x975fa6,_0x305288,_0x4242cf)=>{const _0x5429ec=_0x2d5350;for(var _0x17ad9a=_0x4242cf>0x1?void 0x0:_0x4242cf?K(_0x975fa6,_0x305288):_0x975fa6,_0x48544c=_0xcb8fcf[_0x5429ec(0xf9)]-0x1,_0x1bd1ac;_0x48544c>=0x0;_0x48544c--)(_0x1bd1ac=_0xcb8fcf[_0x48544c])&&(_0x17ad9a=_0x1bd1ac(_0x17ad9a)||_0x17ad9a);return _0x17ad9a;},p=(_0x54ffd1,_0x234003)=>(_0x22f624,_0x47e8ec)=>_0x234003(_0x22f624,_0x47e8ec,_0x54ffd1);let S=class extends _0xd7e540{constructor(_0x1c8253,_0x50c327,_0x11a5e8,_0x4f4a1c){const _0x431fd6=_0x2d5350;super(),this[_0x431fd6(0xc9)]=_0x1c8253,this[_0x431fd6(0xe0)]=_0x50c327,this[_0x431fd6(0xf5)]=_0x11a5e8,this[_0x431fd6(0x11f)]=_0x4f4a1c,this['_init'](),this[_0x431fd6(0xe8)]();}[_0x2d5350(0xe8)](){const _0x430198=_0x2d5350;this[_0x430198(0xdb)](this['_threadCommentModel'][_0x430198(0xec)][_0x430198(0xfc)](_0x1ee30f(0x10))['subscribe'](_0x387b63=>{const _0x35251e=_0x430198,_0xe145be=new Set();_0x387b63[_0x35251e(0x117)](_0x128904=>{const _0x400e9b=_0x35251e;switch(_0x128904[_0x400e9b(0xf3)]){case'add':{const _0x35594e=_0x128904['payload']['personId'];_0xe145be[_0x400e9b(0xe4)](_0x35594e);break;}}}),B(this[_0x35251e(0x11f)],_0xe145be);}));}['_init'](){const _0x10548d=_0x2d5350;this[_0x10548d(0xdb)](this[_0x10548d(0xc9)][_0x10548d(0xec)][_0x10548d(0xd8)](async _0x79bf6a=>{const _0x1b120d=_0x10548d;var _0x2a947d,_0x45f03f,_0x33dc3b,_0x5c655c;const _0x35e463=(_0x2a947d=this[_0x1b120d(0xe0)][_0x1b120d(0xe2)](_0x79bf6a[_0x1b120d(0xea)])[_0x1b120d(0xd6)](_0x5cfb28=>_0x5cfb28[_0x1b120d(0xcc)]===_0x79bf6a[_0x1b120d(0xcc)]))==null?void 0x0:_0x2a947d[_0x1b120d(0x11c)];if(!_0x35e463)return;const {unitId:_0x41d88e,subUnitId:_0x456ee6}=_0x35e463;switch(_0x79bf6a[_0x1b120d(0x10d)]&&this['_userService'][_0x1b120d(0xe9)](_0x79bf6a[_0x1b120d(0x10d)]),_0x79bf6a[_0x1b120d(0xf3)]){case v[_0x1b120d(0x120)]:break;case v['Reply']:{this[_0x1b120d(0xe0)]['addComment'](_0x41d88e,_0x456ee6,{'unitId':_0x41d88e,'subUnitId':_0x456ee6,'ref':'','id':_0x79bf6a['replyId'],'dT':D(+_0x79bf6a[_0x1b120d(0xf6)]),'threadId':_0x79bf6a['threadId'],'personId':(_0x33dc3b=(_0x45f03f=_0x79bf6a[_0x1b120d(0x10d)])==null?void 0x0:_0x45f03f[_0x1b120d(0xd5)])!=null?_0x33dc3b:_0x79bf6a['userId'],'text':JSON[_0x1b120d(0x11b)](_0x79bf6a[_0x1b120d(0x116)]),'parentId':_0x35e463['id']});break;}case v[_0x1b120d(0x122)]:{const _0x151700=this['_threadCommentModel'][_0x1b120d(0x10f)](_0x41d88e,_0x456ee6,_0x79bf6a[_0x1b120d(0xe7)]);_0x151700&&_0x151700['parentId']&&this[_0x1b120d(0xe0)]['deleteComment'](_0x41d88e,_0x456ee6,_0x79bf6a[_0x1b120d(0xe7)]);break;}case v[_0x1b120d(0xe1)]:{this['_threadCommentModel']['updateComment'](_0x41d88e,_0x456ee6,{'commentId':_0x79bf6a['replyId'],'text':JSON[_0x1b120d(0x11b)](_0x79bf6a[_0x1b120d(0x116)])});break;}case v[_0x1b120d(0x124)]:{const _0x3d510d=(_0x5c655c=this[_0x1b120d(0xe0)][_0x1b120d(0xe2)](_0x79bf6a['unitId'])[_0x1b120d(0xd6)](_0x167fe3=>_0x167fe3['threadId']===_0x79bf6a[_0x1b120d(0xcc)]))==null?void 0x0:_0x5c655c[_0x1b120d(0x11c)];_0x3d510d&&this[_0x1b120d(0xe0)][_0x1b120d(0xf4)](_0x41d88e,_0x456ee6,_0x3d510d['id'],_0x79bf6a[_0x1b120d(0xcd)]===I[_0x1b120d(0xc8)]);break;}}}));}};S=V([p(0x0,_0x82e101(_0x5646f3)),p(0x1,_0x82e101(_0x1ba485)),p(0x2,_0x82e101(_0x48e2a5)),p(0x3,_0x82e101(_0x2de2a0))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1df013,_0x388f42,_0x986144,_0x5354af)=>{const _0x4b08f0=_0x2d5350;for(var _0x27d257=_0x5354af>0x1?void 0x0:_0x5354af?k(_0x388f42,_0x986144):_0x388f42,_0x2e01c4=_0x1df013[_0x4b08f0(0xf9)]-0x1,_0x26e628;_0x2e01c4>=0x0;_0x2e01c4--)(_0x26e628=_0x1df013[_0x2e01c4])&&(_0x27d257=_0x26e628(_0x27d257)||_0x27d257);return _0x27d257;},_=(_0x4bdda0,_0x36d52c)=>(_0x520d65,_0x141c4e)=>_0x36d52c(_0x520d65,_0x141c4e,_0x4bdda0);function X(_0x5e74aa,_0x413701){const _0x2f8e15=_0x2d5350,_0x5ac38b=_0x5e74aa[_0x2f8e15(0x11e)][0x0];return{..._0x413701,'id':_0x5ac38b[_0x2f8e15(0xe7)],'resolved':_0x5e74aa[_0x2f8e15(0xcd)]===0x1,'dT':D(_0x5ac38b[_0x2f8e15(0xf6)]),'personId':_0x5ac38b[_0x2f8e15(0x10a)],'threadId':_0x5ac38b[_0x2f8e15(0xcc)]};}function ee(_0x2417a,_0x1931a0,_0x5b039b){const _0xee6606=_0x2d5350;var _0x2dc4af,_0x85328f;if(((_0x85328f=(_0x2dc4af=_0x2417a==null?void 0x0:_0x2417a[_0xee6606(0x11e)])==null?void 0x0:_0x2dc4af[_0xee6606(0xf9)])!=null?_0x85328f:0x0)>0x0){const _0x395103=(_0x360bdc,_0x38d607)=>({'id':_0x360bdc['replyId'],'threadId':_0x360bdc[_0xee6606(0xcc)],'dT':D(_0x360bdc[_0xee6606(0xf6)]),'personId':_0x360bdc[_0xee6606(0x10a)],'resolved':_0x2417a[_0xee6606(0xcd)]===I[_0xee6606(0xc8)],'unitId':_0x1931a0,'subUnitId':_0x5b039b,'text':JSON[_0xee6606(0x11b)](_0x360bdc[_0xee6606(0x116)]),'parentId':_0x38d607}),_0x4dce44=_0x395103(_0x2417a[_0xee6606(0x11e)][0x0]);return{..._0x4dce44,'children':_0x2417a['replies']['slice'](0x1)[_0xee6606(0xfb)](_0x5bbbba=>_0x395103(_0x5bbbba,_0x4dce44['id']))};}return null;}let f=class{constructor(_0x27a508,_0x576c22,_0x28db77,_0x1180f6){const _0x12defe=_0x2d5350;this[_0x12defe(0x118)]=_0x27a508,this['_userService']=_0x576c22,this[_0x12defe(0xd9)]=_0x28db77,this['_injector']=_0x1180f6;}async['addComment'](_0x2610cc){const _0x30c68b=_0x2d5350;var _0x4071d5,_0x4a7861;const {parentId:_0x324571,unitId:_0x17f5e0,text:_0x81fbea,threadId:_0x151e10}=_0x2610cc,_0x2e0da6=(_0x4a7861=(_0x4071d5=_0x81fbea[_0x30c68b(0xe3)])==null?void 0x0:_0x4071d5[_0x30c68b(0xf2)](_0x43d350=>_0x43d350[_0x30c68b(0x109)]===_0x27a3d3[_0x30c68b(0xf1)])[_0x30c68b(0xfb)](_0x6c75c5=>_0x6c75c5[_0x30c68b(0xf0)]))!=null?_0x4a7861:[],_0x1a50a4=JSON[_0x30c68b(0x11a)](_0x81fbea),_0x55db86=(await this[_0x30c68b(0xd9)]['requireSession'](_0x17f5e0))[_0x30c68b(0x125)]();if(_0x324571){const _0x580ad2={'memberId':_0x55db86,'unitId':_0x17f5e0,'content':_0x1a50a4,'mention':_0x2e0da6,'threadId':_0x151e10},_0x2d770c=(await this['_httpService']['post'](_0x30c68b(0x106)+_0x17f5e0+'/reply',{'body':_0x580ad2}))[_0x30c68b(0x103)][_0x30c68b(0xd1)];return{..._0x2610cc,'id':_0x2d770c[_0x30c68b(0xe7)],'dT':_0x4b79be(+_0x2d770c[_0x30c68b(0xf6)])[_0x30c68b(0xff)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2d770c[_0x30c68b(0x10a)]};}else{const _0xceb580={'memberId':_0x55db86,'unitId':_0x17f5e0,'content':_0x1a50a4,'mention':_0x2e0da6},_0x168c13=await this['_httpService'][_0x30c68b(0xd3)](_0x30c68b(0x106)+_0x17f5e0+_0x30c68b(0x127),{'body':_0xceb580});return X(_0x168c13['body']['comment'],_0x2610cc);}}async[_0x2d5350(0xd4)](_0x47e27d){const _0x85ce6a=_0x2d5350;var _0x31e541,_0x49498e;const {text:_0x1951c8,unitId:_0x195b3f}=_0x47e27d,_0x2f6d65=(_0x49498e=(_0x31e541=_0x1951c8['customRanges'])==null?void 0x0:_0x31e541[_0x85ce6a(0xf2)](_0x111feb=>_0x111feb['rangeType']===_0x27a3d3[_0x85ce6a(0xf1)])[_0x85ce6a(0xfb)](_0x35fdd7=>_0x35fdd7['rangeId']))!=null?_0x49498e:[],_0x713cf1=JSON[_0x85ce6a(0x11a)](_0x1951c8),_0x4fc30d=_0x47e27d[_0x85ce6a(0xcc)],_0x1e5033=_0x47e27d['id'],_0x487d62={'memberId':(await this[_0x85ce6a(0xd9)][_0x85ce6a(0x105)](_0x195b3f))[_0x85ce6a(0x125)](),'unitId':_0x195b3f,'threadId':_0x4fc30d,'mention':_0x2f6d65,'content':_0x713cf1,'replyId':_0x1e5033},_0x236b07=await this[_0x85ce6a(0x118)][_0x85ce6a(0xd3)](_0x85ce6a(0x106)+_0x195b3f+_0x85ce6a(0x102),{'body':_0x487d62});return!_0x236b07['body'][_0x85ce6a(0xfd)]||_0x236b07[_0x85ce6a(0x103)]['error'][_0x85ce6a(0x121)]===0x1;}async[_0x2d5350(0xf4)](_0x675f29){const _0x43c343=_0x2d5350,{unitId:_0x27a660}=_0x675f29,_0x448c66=_0x675f29[_0x43c343(0xcc)],_0x14a711={'memberId':this[_0x43c343(0xf5)][_0x43c343(0x101)]()['userID'],'unitId':_0x27a660,'threadId':_0x448c66,'solved':_0x675f29['resolved']?I['Solved']:I['OpenOrReOpen']},_0x282023=await this[_0x43c343(0x118)][_0x43c343(0xd3)]('/universer-api/comment/unit/'+_0x27a660+_0x43c343(0x111),{'body':_0x14a711});return!_0x282023[_0x43c343(0x103)][_0x43c343(0xfd)]||_0x282023[_0x43c343(0x103)][_0x43c343(0xfd)]['code']===0x1;}async[_0x2d5350(0x10c)](_0x3776f5,_0x3ba336,_0x1779c9,_0x5ae9b3){const _0xbafe49=_0x2d5350,_0x3d9aad={'memberId':(await this['_sessionService'][_0xbafe49(0x105)](_0x3776f5))[_0xbafe49(0x125)](),'threadId':_0x1779c9,'replyId':_0x5ae9b3,'unitId':_0x3776f5},_0x2d252c=await this['_httpService']['post'](_0xbafe49(0x106)+_0x3776f5+'/delete',{'body':_0x3d9aad});return!_0x2d252c[_0xbafe49(0x103)][_0xbafe49(0xfd)]||_0x2d252c[_0xbafe49(0x103)][_0xbafe49(0xfd)][_0xbafe49(0x121)]===0x1;}async[_0x2d5350(0x115)](_0x5bc84b,_0x124577,_0x144626){const _0x32ed26=_0x2d5350,_0x5c63f8={'unitId':_0x5bc84b,'threadId':_0x144626},_0x28f4ec=await this[_0x32ed26(0x118)][_0x32ed26(0xd3)]('/universer-api/comment/unit/'+_0x5bc84b+_0x32ed26(0xe6),{'body':_0x5c63f8}),_0x49ddfc=_0x144626[_0x32ed26(0xfb)](_0x1fab8e=>ee(_0x28f4ec['body'][_0x32ed26(0x110)][_0x1fab8e],_0x5bc84b,_0x124577))['filter'](Boolean);return Object['values'](_0x28f4ec[_0x32ed26(0x103)][_0x32ed26(0xdc)])[_0x32ed26(0x117)](_0xd5d441=>{const _0x1af91d=_0x32ed26;this[_0x1af91d(0xf5)][_0x1af91d(0xe9)](_0xd5d441);}),_0x49ddfc;}['saveCommentToSnapshot'](_0x172d15){const _0x52eb70=_0x2d5350;return{'id':_0x172d15['id'],'threadId':_0x172d15['threadId'],'ref':_0x172d15[_0x52eb70(0x10e)]};}};f=Q([_(0x0,_0x82e101(_0x16aa01)),_(0x1,_0x82e101(_0x48e2a5)),_(0x2,_0x82e101(_0x242f6a)),_(0x3,_0x82e101(_0x2de2a0))],f);var re=Object[_0x2d5350(0xfe)],te=(_0x161bb3,_0x4e6a7b,_0x316e49,_0x3b8236)=>{const _0x99020e=_0x2d5350;for(var _0x38d524=_0x3b8236>0x1?void 0x0:_0x3b8236?re(_0x4e6a7b,_0x316e49):_0x4e6a7b,_0x39255b=_0x161bb3[_0x99020e(0xf9)]-0x1,_0x1341c9;_0x39255b>=0x0;_0x39255b--)(_0x1341c9=_0x161bb3[_0x39255b])&&(_0x38d524=_0x1341c9(_0x38d524)||_0x38d524);return _0x38d524;},N=(_0x31621c,_0xad4c0f)=>(_0x2024d5,_0x394031)=>_0xad4c0f(_0x2024d5,_0x394031,_0x31621c);let g=class extends _0xd7e540{constructor(_0x2e1c38,_0x31f48d){const _0x61a7bc=_0x2d5350;super(),this[_0x61a7bc(0x123)]=_0x2e1c38,this[_0x61a7bc(0x126)]=_0x31f48d,this[_0x61a7bc(0xef)]();}['_initDataSource'](){const _0x99b2e2=_0x2d5350;this[_0x99b2e2(0x123)][_0x99b2e2(0xd7)]=this[_0x99b2e2(0x126)],this[_0x99b2e2(0x123)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x4fae4e),N(0x1,_0x82e101(f))],g);var se=Object[_0x2d5350(0xd0)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1d8100,_0xb2340,_0x542ef7)=>_0xb2340 in _0x1d8100?se(_0x1d8100,_0xb2340,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x542ef7}):_0x1d8100[_0xb2340]=_0x542ef7,ie=(_0x42f1d8,_0x4548d8,_0x54b53c,_0x4c2c1f)=>{for(var _0x5dbc5d=_0x4c2c1f>0x1?void 0x0:_0x4c2c1f?oe(_0x4548d8,_0x54b53c):_0x4548d8,_0xdae79f=_0x42f1d8['length']-0x1,_0x2c1c90;_0xdae79f>=0x0;_0xdae79f--)(_0x2c1c90=_0x42f1d8[_0xdae79f])&&(_0x5dbc5d=_0x2c1c90(_0x5dbc5d)||_0x5dbc5d);return _0x5dbc5d;},w=(_0xbd0b62,_0x57b92e)=>(_0x2f69b6,_0x5c7479)=>_0x57b92e(_0x2f69b6,_0x5c7479,_0xbd0b62),$=(_0x52dd39,_0x1a4a83,_0x1fdefe)=>ne(_0x52dd39,typeof _0x1a4a83!=_0x2d5350(0x104)?_0x1a4a83+'':_0x1a4a83,_0x1fdefe);let b=class extends _0x419499{constructor(_0x418a10=M,_0x4b4bbc,_0x16863c){const _0x421808=_0x2d5350;super(),this['_config']=_0x418a10,this[_0x421808(0x11f)]=_0x4b4bbc,this[_0x421808(0x11d)]=_0x16863c;const {..._0x5da4ff}=_0x4682c7({},M,this[_0x421808(0xde)]);this['_configService']['setConfig'](z,_0x5da4ff);}[_0x2d5350(0xcf)](){const _0x173f0d=_0x2d5350;[[f],[g],[S]][_0x173f0d(0x117)](_0x43f6e8=>{const _0x41eb1d=_0x173f0d;this['_injector'][_0x41eb1d(0xe4)](_0x43f6e8);});}[_0x2d5350(0x107)](){const _0x51c706=_0x2d5350;this[_0x51c706(0x11f)][_0x51c706(0x113)](g),this[_0x51c706(0x11f)]['get'](S);}};$(b,_0x2d5350(0xfa),W),$(b,'type',_0x5b3885[_0x2d5350(0xca)]),b=ie([_0xfde2f5(_0x55cac6,_0x1f9298,_0x3137d0),w(0x1,_0x82e101(_0x2de2a0)),w(0x2,_0x14ce99)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0xfcf5(){const _0x1bef4e=['comments','resolved','replies','56616OXHIZI','10479771AevuVK','Reply','@univerjs/core','find','_userService','resolveComment','UniverProCollaborationClient','syncUpdateMutationToColla','rangeId','object','5819664IJZZTV','Delete','map','values','thread-comment-data-source.config','_config','UserManagerService','_threadCommentDataSource','_configService','getMemberID','ThreadCommentModel','add','UniverNetwork','_threadCommentModel','forEach','post','YYYY/MM/DD\x20HH:mm','Solved','parse','merge','replyId','filter','/delete','_init','disposeWithMe','Solve','_threadCommentDataSourceService','Module','commentUpdate$','setConfig','/universer-api/comment/unit/','18780QPBfKm','_initUserSync','8131501Plkygq','UniverInstanceType','Edit','function','HTTPService','parentId','Injector','root','UniverLicensePlugin','_sessionService','Unknown','10RKLdfP','listComments','OpenOrReOpen','getUnit','_initDataSource','UniverThreadCommentUi','addUser','addComment','dataSource','getComment','_httpService','CommentService','@univerjs-pro/license','format','user','amd','personId','threadId','stringify','body','solved','getOwnPropertyDescriptor','/list','UNIVER_UNKNOWN','unitId','IThreadCommentDataSourceService','slice','users','_commentService','3251610ArrXoK','UniverCollaborationClientPlugin','getUser','2473614EdhzTH','rxjs','saveCommentToSnapshot','rangeType','CustomRangeType','UniverProLicense','toStringTag','IConfigService','onReady','@univerjs/network','bufferTime','/solved','requireSession','/add','/reply','userID','dayjs','size','code','createTimestamp','26YdarCI','UniverThreadCommentDataSourcePlugin','pipe','defineProperty','Inject','COMMENT','UniverThreadCommentUIPlugin','get','414TNSvTi','UNRECOGNIZED','@univerjs/thread-comment-ui','length','reply','UniverThreadComment','userId','DependentOn','deleteComment','subscribe','_injector','error','UniverCore','@univerjs-pro/collaboration-client','updateComment','type'];_0xfcf5=function(){return _0x1bef4e;};return _0xfcf5();}function _0x249c(_0x4990fa,_0x9fbd97){const _0xfcf510=_0xfcf5();return _0x249c=function(_0x249c10,_0x1b6188){_0x249c10=_0x249c10-0x1e7;let _0x564cc5=_0xfcf510[_0x249c10];return _0x564cc5;},_0x249c(_0x4990fa,_0x9fbd97);}(function(_0x10eedd,_0x4cb075){const _0x3ba7de=_0x249c,_0x294252=_0x10eedd();while(!![]){try{const _0x5615ff=parseInt(_0x3ba7de(0x24c))/0x1*(parseInt(_0x3ba7de(0x231))/0x2)+parseInt(_0x3ba7de(0x239))/0x3*(-parseInt(_0x3ba7de(0x1f0))/0x4)+-parseInt(_0x3ba7de(0x21a))/0x5+-parseInt(_0x3ba7de(0x21d))/0x6+parseInt(_0x3ba7de(0x1f2))/0x7+-parseInt(_0x3ba7de(0x257))/0x8+-parseInt(_0x3ba7de(0x24d))/0x9*(-parseInt(_0x3ba7de(0x1fd))/0xa);if(_0x5615ff===_0x4cb075)break;else _0x294252['push'](_0x294252['shift']());}catch(_0x1cdc3c){_0x294252['push'](_0x294252['shift']());}}}(_0xfcf5,0x985ef),function(_0xdd4d13,_0x4f199d){const _0x5ecbf8=_0x249c;typeof exports==_0x5ecbf8(0x256)&&typeof module<'u'?_0x4f199d(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require(_0x5ecbf8(0x24f)),require(_0x5ecbf8(0x23b)),require('@univerjs/thread-comment'),require('rxjs'),require(_0x5ecbf8(0x226))):typeof define==_0x5ecbf8(0x1f5)&&define[_0x5ecbf8(0x20c)]?define(['exports',_0x5ecbf8(0x246),_0x5ecbf8(0x209),_0x5ecbf8(0x24f),_0x5ecbf8(0x23b),'@univerjs/thread-comment',_0x5ecbf8(0x21e),_0x5ecbf8(0x226)],_0x4f199d):(_0xdd4d13=typeof globalThis<'u'?globalThis:_0xdd4d13||self,_0x4f199d(_0xdd4d13['UniverProThreadCommentDatasource']={},_0xdd4d13[_0x5ecbf8(0x253)],_0xdd4d13[_0x5ecbf8(0x222)],_0xdd4d13[_0x5ecbf8(0x245)],_0xdd4d13[_0x5ecbf8(0x202)],_0xdd4d13[_0x5ecbf8(0x23e)],_0xdd4d13[_0x5ecbf8(0x21e)],_0xdd4d13[_0x5ecbf8(0x263)]));}(this,function(_0x2845e5,_0x509d44,_0x1b1acc,_0x1b5fb0,_0x3ad4ec,_0x4c7067,_0x5c3ac0,_0x5b10eb){'use strict';const _0x4e3d65=_0x249c;const _0x465670='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0xc5d00b=(_0x49f292=>(_0x49f292[_0x49f292[_0x4e3d65(0x1ff)]=0x0]=_0x4e3d65(0x1ff),_0x49f292[_0x49f292[_0x4e3d65(0x268)]=0x1]=_0x4e3d65(0x268),_0x49f292[_0x49f292[_0x4e3d65(0x23a)]=-0x1]='UNRECOGNIZED',_0x49f292))(_0xc5d00b||{}),_0x39b66d=(_0x2a3c77=>(_0x2a3c77[_0x2a3c77[_0x4e3d65(0x1fc)]=0x0]=_0x4e3d65(0x1fc),_0x2a3c77[_0x2a3c77['Add']=0x1]='Add',_0x2a3c77[_0x2a3c77[_0x4e3d65(0x24e)]=0x2]=_0x4e3d65(0x24e),_0x2a3c77[_0x2a3c77[_0x4e3d65(0x1f4)]=0x3]=_0x4e3d65(0x1f4),_0x2a3c77[_0x2a3c77[_0x4e3d65(0x258)]=0x4]=_0x4e3d65(0x258),_0x2a3c77[_0x2a3c77['Solve']=0x5]=_0x4e3d65(0x1ea),_0x2a3c77[_0x2a3c77[_0x4e3d65(0x23a)]=-0x1]=_0x4e3d65(0x23a),_0x2a3c77))(_0x39b66d||{});const _0xfbee1b=_0x2fd03f=>_0x1b5fb0[_0x4e3d65(0x22d)](new Date(+_0x2fd03f))['format']('YYYY/MM/DD\x20HH:mm'),_0x146e38=async(_0x89e8c0,_0x19fe16)=>{const _0x2c0045=_0x4e3d65,_0x1891a7=_0x89e8c0[_0x2c0045(0x238)](_0x1b5fb0['UserManagerService']),_0x4a25f7=_0x89e8c0[_0x2c0045(0x238)](_0x5b10eb['HTTPService']);_0x19fe16[_0x2c0045(0x265)](_0xa54b54=>{const _0x3b00f3=_0x2c0045;_0x1891a7[_0x3b00f3(0x21c)](_0xa54b54)&&_0x19fe16['delete'](_0xa54b54);}),_0x19fe16[_0x2c0045(0x22e)]&&(await _0x4a25f7[_0x2c0045(0x238)]('/universer-api/user/list',{'params':{'userIDs':[..._0x19fe16]}}))[_0x2c0045(0x210)][_0x2c0045(0x218)]['forEach'](_0x3ecefc=>{const _0x599bf4=_0x2c0045;_0x3ecefc&&_0x1891a7[_0x599bf4(0x203)](_0x3ecefc);});};var _0x125952=Object[_0x4e3d65(0x212)],_0x192f83=(_0x3328ec,_0x4d5a63,_0x458a54,_0x3b7c6f)=>{const _0xae4899=_0x4e3d65;for(var _0x17cc7b=_0x3b7c6f>0x1?void 0x0:_0x3b7c6f?_0x125952(_0x4d5a63,_0x458a54):_0x4d5a63,_0x15e0f8=_0x3328ec[_0xae4899(0x23c)]-0x1,_0x36de45;_0x15e0f8>=0x0;_0x15e0f8--)(_0x36de45=_0x3328ec[_0x15e0f8])&&(_0x17cc7b=_0x36de45(_0x17cc7b)||_0x17cc7b);return _0x17cc7b;},_0x3248f1=(_0x517955,_0x1a7d8e)=>(_0x37931d,_0x876ea0)=>_0x1a7d8e(_0x37931d,_0x876ea0,_0x517955);let _0x39a0a6=class extends _0x1b5fb0['Disposable']{constructor(_0x32d915,_0x211a5b,_0x11062c,_0xfae724){const _0x40866a=_0x4e3d65;super(),this[_0x40866a(0x219)]=_0x32d915,this['_threadCommentModel']=_0x211a5b,this[_0x40866a(0x251)]=_0x11062c,this['_injector']=_0xfae724,this['_init'](),this[_0x40866a(0x1f1)]();}[_0x4e3d65(0x1f1)](){const _0x3d5cbd=_0x4e3d65;this[_0x3d5cbd(0x1e9)](this[_0x3d5cbd(0x264)][_0x3d5cbd(0x1ed)][_0x3d5cbd(0x233)](_0x5c3ac0[_0x3d5cbd(0x227)](0x10))[_0x3d5cbd(0x242)](_0x1be6c2=>{const _0x509db1=_0x3d5cbd,_0x35c1d1=new Set();_0x1be6c2['forEach'](_0x428f96=>{const _0xb3eb1f=_0x249c;switch(_0x428f96['type']){case _0xb3eb1f(0x262):{const _0x2b3668=_0x428f96['payload'][_0xb3eb1f(0x20d)];_0x35c1d1[_0xb3eb1f(0x262)](_0x2b3668);break;}}}),_0x146e38(this[_0x509db1(0x243)],_0x35c1d1);}));}[_0x4e3d65(0x1e8)](){const _0x359d37=_0x4e3d65;this[_0x359d37(0x1e9)](this[_0x359d37(0x219)][_0x359d37(0x1ed)]['subscribe'](async _0x1d6846=>{const _0xe94713=_0x359d37;var _0x5b343b,_0x5af259,_0x27c1c1,_0x422bfb;const _0x1042fb=(_0x5b343b=this[_0xe94713(0x264)][_0xe94713(0x200)](_0x1d6846[_0xe94713(0x215)])['find'](_0x182fe8=>_0x182fe8[_0xe94713(0x20e)]===_0x1d6846['threadId']))==null?void 0x0:_0x5b343b[_0xe94713(0x1f9)];if(!_0x1042fb)return;const {unitId:_0x67a126,subUnitId:_0x19c4ba}=_0x1042fb;switch(_0x1d6846[_0xe94713(0x20b)]&&this[_0xe94713(0x251)][_0xe94713(0x203)](_0x1d6846[_0xe94713(0x20b)]),_0x1d6846[_0xe94713(0x248)]){case _0x39b66d['Add']:break;case _0x39b66d['Reply']:{this['_threadCommentModel'][_0xe94713(0x204)](_0x67a126,_0x19c4ba,{'unitId':_0x67a126,'subUnitId':_0x19c4ba,'ref':'','id':_0x1d6846[_0xe94713(0x26b)],'dT':_0xfbee1b(+_0x1d6846[_0xe94713(0x230)]),'threadId':_0x1d6846[_0xe94713(0x20e)],'personId':(_0x27c1c1=(_0x5af259=_0x1d6846[_0xe94713(0x20b)])==null?void 0x0:_0x5af259[_0xe94713(0x22c)])!=null?_0x27c1c1:_0x1d6846[_0xe94713(0x23f)],'text':JSON[_0xe94713(0x269)](_0x1d6846['content']),'parentId':_0x1042fb['id']});break;}case _0x39b66d['Delete']:{const _0x3109fa=this[_0xe94713(0x264)][_0xe94713(0x206)](_0x67a126,_0x19c4ba,_0x1d6846[_0xe94713(0x26b)]);_0x3109fa&&_0x3109fa[_0xe94713(0x1f7)]&&this[_0xe94713(0x264)]['deleteComment'](_0x67a126,_0x19c4ba,_0x1d6846[_0xe94713(0x26b)]);break;}case _0x39b66d[_0xe94713(0x1f4)]:{this['_threadCommentModel']['updateComment'](_0x67a126,_0x19c4ba,{'commentId':_0x1d6846[_0xe94713(0x26b)],'text':JSON[_0xe94713(0x269)](_0x1d6846['content'])});break;}case _0x39b66d[_0xe94713(0x1ea)]:{const _0x3d1c6e=(_0x422bfb=this['_threadCommentModel'][_0xe94713(0x200)](_0x1d6846[_0xe94713(0x215)])[_0xe94713(0x250)](_0xe5fcd7=>_0xe5fcd7[_0xe94713(0x20e)]===_0x1d6846[_0xe94713(0x20e)]))==null?void 0x0:_0x422bfb['root'];_0x3d1c6e&&this['_threadCommentModel'][_0xe94713(0x252)](_0x67a126,_0x19c4ba,_0x3d1c6e['id'],_0x1d6846[_0xe94713(0x211)]===_0xc5d00b[_0xe94713(0x268)]);break;}}}));}};_0x39a0a6=_0x192f83([_0x3248f1(0x0,_0x1b5fb0[_0x4e3d65(0x235)](_0x509d44[_0x4e3d65(0x208)])),_0x3248f1(0x1,_0x1b5fb0[_0x4e3d65(0x235)](_0x4c7067[_0x4e3d65(0x261)])),_0x3248f1(0x2,_0x1b5fb0[_0x4e3d65(0x235)](_0x1b5fb0[_0x4e3d65(0x25d)])),_0x3248f1(0x3,_0x1b5fb0[_0x4e3d65(0x235)](_0x1b5fb0[_0x4e3d65(0x1f8)]))],_0x39a0a6);const _0x5b2358=_0x4e3d65(0x25b),_0x1767a4={};var _0x5e2b8a=Object[_0x4e3d65(0x212)],_0xefe7b0=(_0x6cee85,_0x1773c0,_0x2de8d6,_0x44d8e2)=>{for(var _0x3fbb3d=_0x44d8e2>0x1?void 0x0:_0x44d8e2?_0x5e2b8a(_0x1773c0,_0x2de8d6):_0x1773c0,_0x2daeb3=_0x6cee85['length']-0x1,_0x463c8e;_0x2daeb3>=0x0;_0x2daeb3--)(_0x463c8e=_0x6cee85[_0x2daeb3])&&(_0x3fbb3d=_0x463c8e(_0x3fbb3d)||_0x3fbb3d);return _0x3fbb3d;},_0x22d778=(_0x313867,_0x38f2cf)=>(_0x315a37,_0x1606eb)=>_0x38f2cf(_0x315a37,_0x1606eb,_0x313867);function _0x547d6e(_0x5a7e22,_0x5b1769){const _0x17366c=_0x4e3d65,_0xc3715d=_0x5a7e22['replies'][0x0];return{..._0x5b1769,'id':_0xc3715d['replyId'],'resolved':_0x5a7e22[_0x17366c(0x211)]===0x1,'dT':_0xfbee1b(_0xc3715d[_0x17366c(0x230)]),'personId':_0xc3715d['userId'],'threadId':_0xc3715d[_0x17366c(0x20e)]};}function _0x4ea554(_0x36b28f,_0x3d5499,_0x3be22a){const _0x958824=_0x4e3d65;var _0x177685,_0x12a44a;if(((_0x12a44a=(_0x177685=_0x36b28f==null?void 0x0:_0x36b28f[_0x958824(0x24b)])==null?void 0x0:_0x177685[_0x958824(0x23c)])!=null?_0x12a44a:0x0)>0x0){const _0x351afc=(_0x2e6d55,_0x2da14b)=>({'id':_0x2e6d55[_0x958824(0x26b)],'threadId':_0x2e6d55[_0x958824(0x20e)],'dT':_0xfbee1b(_0x2e6d55[_0x958824(0x230)]),'personId':_0x2e6d55['userId'],'resolved':_0x36b28f['solved']===_0xc5d00b[_0x958824(0x268)],'unitId':_0x3d5499,'subUnitId':_0x3be22a,'text':JSON[_0x958824(0x269)](_0x2e6d55['content']),'parentId':_0x2da14b}),_0x3a1603=_0x351afc(_0x36b28f[_0x958824(0x24b)][0x0]);return{..._0x3a1603,'children':_0x36b28f[_0x958824(0x24b)][_0x958824(0x217)](0x1)['map'](_0x2877a5=>_0x351afc(_0x2877a5,_0x3a1603['id']))};}return null;}let _0xcf1639=class{constructor(_0x5b0265,_0x1d36d2,_0x4f8af9,_0x189876){const _0x4c5141=_0x4e3d65;this[_0x4c5141(0x207)]=_0x5b0265,this[_0x4c5141(0x251)]=_0x1d36d2,this[_0x4c5141(0x1fb)]=_0x4f8af9,this[_0x4c5141(0x243)]=_0x189876;}async[_0x4e3d65(0x204)](_0xf58068){const _0x16765a=_0x4e3d65;var _0x32c232,_0x5c6da3;const {parentId:_0x1792a5,unitId:_0x5b5802,text:_0x2eeab4,threadId:_0x1de2b6}=_0xf58068,_0x503e97=(_0x5c6da3=(_0x32c232=_0x2eeab4['customRanges'])==null?void 0x0:_0x32c232[_0x16765a(0x26c)](_0xff8601=>_0xff8601[_0x16765a(0x220)]===_0x1b5fb0[_0x16765a(0x221)][_0x16765a(0x236)])['map'](_0x1643ff=>_0x1643ff['rangeId']))!=null?_0x5c6da3:[],_0xce3c20=JSON[_0x16765a(0x20f)](_0x2eeab4),_0x5c3461=(await this[_0x16765a(0x1fb)][_0x16765a(0x229)](_0x5b5802))['getMemberID']();if(_0x1792a5){const _0x2c6205={'memberId':_0x5c3461,'unitId':_0x5b5802,'content':_0xce3c20,'mention':_0x503e97,'threadId':_0x1de2b6},_0x41dec0=(await this[_0x16765a(0x207)][_0x16765a(0x266)](_0x16765a(0x1ef)+_0x5b5802+_0x16765a(0x22b),{'body':_0x2c6205}))[_0x16765a(0x210)][_0x16765a(0x23d)];return{..._0xf58068,'id':_0x41dec0[_0x16765a(0x26b)],'dT':_0x1b5fb0['dayjs'](+_0x41dec0['createTimestamp'])[_0x16765a(0x20a)](_0x16765a(0x267)),'personId':_0x41dec0[_0x16765a(0x23f)]};}else{const _0x166e1c={'memberId':_0x5c3461,'unitId':_0x5b5802,'content':_0xce3c20,'mention':_0x503e97},_0x4b510f=await this[_0x16765a(0x207)][_0x16765a(0x266)]('/universer-api/comment/unit/'+_0x5b5802+_0x16765a(0x22a),{'body':_0x166e1c});return _0x547d6e(_0x4b510f[_0x16765a(0x210)]['comment'],_0xf58068);}}async[_0x4e3d65(0x247)](_0x31da81){const _0x47822e=_0x4e3d65;var _0x2aba96,_0x755453;const {text:_0x56dfe7,unitId:_0x230246}=_0x31da81,_0x53170e=(_0x755453=(_0x2aba96=_0x56dfe7['customRanges'])==null?void 0x0:_0x2aba96[_0x47822e(0x26c)](_0x1af25c=>_0x1af25c[_0x47822e(0x220)]===_0x1b5fb0[_0x47822e(0x221)]['COMMENT'])[_0x47822e(0x259)](_0x524020=>_0x524020[_0x47822e(0x255)]))!=null?_0x755453:[],_0x366d25=JSON['stringify'](_0x56dfe7),_0x13daa7=_0x31da81[_0x47822e(0x20e)],_0x4abdff=_0x31da81['id'],_0x364515={'memberId':(await this[_0x47822e(0x1fb)][_0x47822e(0x229)](_0x230246))['getMemberID'](),'unitId':_0x230246,'threadId':_0x13daa7,'mention':_0x53170e,'content':_0x366d25,'replyId':_0x4abdff},_0x376f4d=await this[_0x47822e(0x207)]['post'](_0x47822e(0x1ef)+_0x230246+'/edit',{'body':_0x364515});return!_0x376f4d['body'][_0x47822e(0x244)]||_0x376f4d[_0x47822e(0x210)][_0x47822e(0x244)][_0x47822e(0x22f)]===0x1;}async[_0x4e3d65(0x252)](_0x9b318){const _0x4f6bbf=_0x4e3d65,{unitId:_0x3b1410}=_0x9b318,_0x5c2f84=_0x9b318[_0x4f6bbf(0x20e)],_0x1410b5={'memberId':this[_0x4f6bbf(0x251)]['getCurrentUser']()['userID'],'unitId':_0x3b1410,'threadId':_0x5c2f84,'solved':_0x9b318[_0x4f6bbf(0x24a)]?_0xc5d00b[_0x4f6bbf(0x268)]:_0xc5d00b[_0x4f6bbf(0x1ff)]},_0x17feea=await this[_0x4f6bbf(0x207)]['post']('/universer-api/comment/unit/'+_0x3b1410+_0x4f6bbf(0x228),{'body':_0x1410b5});return!_0x17feea['body'][_0x4f6bbf(0x244)]||_0x17feea[_0x4f6bbf(0x210)]['error'][_0x4f6bbf(0x22f)]===0x1;}async[_0x4e3d65(0x241)](_0x39b090,_0x3da594,_0x4d23ab,_0x29e9da){const _0x1be58d=_0x4e3d65,_0x30dc73={'memberId':(await this[_0x1be58d(0x1fb)]['requireSession'](_0x39b090))[_0x1be58d(0x260)](),'threadId':_0x4d23ab,'replyId':_0x29e9da,'unitId':_0x39b090},_0x454c5c=await this['_httpService'][_0x1be58d(0x266)](_0x1be58d(0x1ef)+_0x39b090+_0x1be58d(0x1e7),{'body':_0x30dc73});return!_0x454c5c['body'][_0x1be58d(0x244)]||_0x454c5c['body'][_0x1be58d(0x244)]['code']===0x1;}async[_0x4e3d65(0x1fe)](_0x352076,_0x4b8623,_0x5d9059){const _0x3f602a=_0x4e3d65,_0x1b3aef={'unitId':_0x352076,'threadId':_0x5d9059},_0x5dd7d9=await this[_0x3f602a(0x207)][_0x3f602a(0x266)]('/universer-api/comment/unit/'+_0x352076+_0x3f602a(0x213),{'body':_0x1b3aef}),_0x53e40f=_0x5d9059[_0x3f602a(0x259)](_0x233d54=>_0x4ea554(_0x5dd7d9[_0x3f602a(0x210)][_0x3f602a(0x249)][_0x233d54],_0x352076,_0x4b8623))['filter'](Boolean);return Object[_0x3f602a(0x25a)](_0x5dd7d9['body']['users'])[_0x3f602a(0x265)](_0x66014e=>{const _0x420f84=_0x3f602a;this[_0x420f84(0x251)]['addUser'](_0x66014e);}),_0x53e40f;}[_0x4e3d65(0x21f)](_0x540631){return{'id':_0x540631['id'],'threadId':_0x540631['threadId'],'ref':_0x540631['ref']};}};_0xcf1639=_0xefe7b0([_0x22d778(0x0,_0x1b5fb0[_0x4e3d65(0x235)](_0x5b10eb[_0x4e3d65(0x1f6)])),_0x22d778(0x1,_0x1b5fb0[_0x4e3d65(0x235)](_0x1b5fb0[_0x4e3d65(0x25d)])),_0x22d778(0x2,_0x1b5fb0['Inject'](_0x509d44['CollaborationSessionService'])),_0x22d778(0x3,_0x1b5fb0[_0x4e3d65(0x235)](_0x1b5fb0[_0x4e3d65(0x1f8)]))],_0xcf1639);var _0x427a14=Object[_0x4e3d65(0x212)],_0x5760e5=(_0x464205,_0x45c31e,_0x4861e7,_0x5ce170)=>{for(var _0x1c1169=_0x5ce170>0x1?void 0x0:_0x5ce170?_0x427a14(_0x45c31e,_0x4861e7):_0x45c31e,_0xdbe8f6=_0x464205['length']-0x1,_0x4ae0b1;_0xdbe8f6>=0x0;_0xdbe8f6--)(_0x4ae0b1=_0x464205[_0xdbe8f6])&&(_0x1c1169=_0x4ae0b1(_0x1c1169)||_0x1c1169);return _0x1c1169;},_0x7ca01e=(_0x5140f5,_0x22259f)=>(_0x36dbbf,_0x282413)=>_0x22259f(_0x36dbbf,_0x282413,_0x5140f5);let _0x5dbf72=class extends _0x1b5fb0['Disposable']{constructor(_0x5d5b43,_0x56c2d3){const _0x366070=_0x4e3d65;super(),this['_threadCommentDataSourceService']=_0x5d5b43,this[_0x366070(0x25e)]=_0x56c2d3,this[_0x366070(0x201)]();}[_0x4e3d65(0x201)](){const _0x1e69c4=_0x4e3d65;this[_0x1e69c4(0x1eb)][_0x1e69c4(0x205)]=this[_0x1e69c4(0x25e)],this[_0x1e69c4(0x1eb)][_0x1e69c4(0x254)]=!0x1;}};_0x5dbf72=_0x5760e5([_0x7ca01e(0x0,_0x4c7067[_0x4e3d65(0x216)]),_0x7ca01e(0x1,_0x1b5fb0['Inject'](_0xcf1639))],_0x5dbf72);var _0x3eaa5b=Object['defineProperty'],_0x2cdd98=Object[_0x4e3d65(0x212)],_0xf95243=(_0x36e973,_0x2c8915,_0x3aa8f2)=>_0x2c8915 in _0x36e973?_0x3eaa5b(_0x36e973,_0x2c8915,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3aa8f2}):_0x36e973[_0x2c8915]=_0x3aa8f2,_0x5eeab4=(_0x28cd7f,_0x30feb9,_0x14a876,_0x555251)=>{const _0x5197b2=_0x4e3d65;for(var _0x517a13=_0x555251>0x1?void 0x0:_0x555251?_0x2cdd98(_0x30feb9,_0x14a876):_0x30feb9,_0xac875e=_0x28cd7f[_0x5197b2(0x23c)]-0x1,_0x4a1546;_0xac875e>=0x0;_0xac875e--)(_0x4a1546=_0x28cd7f[_0xac875e])&&(_0x517a13=_0x4a1546(_0x517a13)||_0x517a13);return _0x517a13;},_0x9631c0=(_0x1d7d98,_0x187cd2)=>(_0x4915e3,_0x38b8fc)=>_0x187cd2(_0x4915e3,_0x38b8fc,_0x1d7d98),_0xe9441=(_0x59231f,_0x15bb1b,_0x1f9124)=>_0xf95243(_0x59231f,typeof _0x15bb1b!='symbol'?_0x15bb1b+'':_0x15bb1b,_0x1f9124);_0x2845e5[_0x4e3d65(0x232)]=class extends _0x1b5fb0['Plugin']{constructor(_0x688da0=_0x1767a4,_0x1be308,_0x513f0a){const _0x1b025c=_0x4e3d65;super(),this[_0x1b025c(0x25c)]=_0x688da0,this[_0x1b025c(0x243)]=_0x1be308,this[_0x1b025c(0x25f)]=_0x513f0a;const {..._0x12d38a}=_0x1b5fb0[_0x1b025c(0x26a)]({},_0x1767a4,this[_0x1b025c(0x25c)]);this['_configService'][_0x1b025c(0x1ee)](_0x5b2358,_0x12d38a);}['onStarting'](){const _0x27165c=_0x4e3d65;[[_0xcf1639],[_0x5dbf72],[_0x39a0a6]][_0x27165c(0x265)](_0x4fd03e=>{const _0x110214=_0x27165c;this[_0x110214(0x243)][_0x110214(0x262)](_0x4fd03e);});}[_0x4e3d65(0x225)](){const _0x22a19a=_0x4e3d65;this[_0x22a19a(0x243)][_0x22a19a(0x238)](_0x5dbf72),this[_0x22a19a(0x243)][_0x22a19a(0x238)](_0x39a0a6);}},_0xe9441(_0x2845e5[_0x4e3d65(0x232)],'pluginName',_0x465670),_0xe9441(_0x2845e5['UniverThreadCommentDataSourcePlugin'],_0x4e3d65(0x248),_0x1b5fb0[_0x4e3d65(0x1f3)][_0x4e3d65(0x214)]),_0x2845e5[_0x4e3d65(0x232)]=_0x5eeab4([_0x1b5fb0[_0x4e3d65(0x240)](_0x3ad4ec[_0x4e3d65(0x237)],_0x509d44[_0x4e3d65(0x21b)],_0x1b1acc[_0x4e3d65(0x1fa)]),_0x9631c0(0x1,_0x1b5fb0[_0x4e3d65(0x235)](_0x1b5fb0['Injector'])),_0x9631c0(0x2,_0x1b5fb0[_0x4e3d65(0x224)])],_0x2845e5[_0x4e3d65(0x232)]),Object[_0x4e3d65(0x234)](_0x2845e5,Symbol[_0x4e3d65(0x223)],{'value':_0x4e3d65(0x1ec)});}));
1
+ function _0x8c6a(_0x1e4ec5,_0x3a5205){const _0x5c169b=_0x5c16();return _0x8c6a=function(_0x8c6ab,_0x108e47){_0x8c6ab=_0x8c6ab-0x175;let _0x134f9c=_0x5c169b[_0x8c6ab];return _0x134f9c;},_0x8c6a(_0x1e4ec5,_0x3a5205);}(function(_0x4873a7,_0x496b74){const _0x2ecdf7=_0x8c6a,_0x370cbb=_0x4873a7();while(!![]){try{const _0x296036=parseInt(_0x2ecdf7(0x1ea))/0x1*(parseInt(_0x2ecdf7(0x194))/0x2)+-parseInt(_0x2ecdf7(0x1cc))/0x3+-parseInt(_0x2ecdf7(0x1f1))/0x4*(parseInt(_0x2ecdf7(0x1a0))/0x5)+-parseInt(_0x2ecdf7(0x1ca))/0x6*(parseInt(_0x2ecdf7(0x17f))/0x7)+parseInt(_0x2ecdf7(0x1d6))/0x8*(-parseInt(_0x2ecdf7(0x189))/0x9)+-parseInt(_0x2ecdf7(0x190))/0xa+-parseInt(_0x2ecdf7(0x1b5))/0xb*(-parseInt(_0x2ecdf7(0x1cf))/0xc);if(_0x296036===_0x496b74)break;else _0x370cbb['push'](_0x370cbb['shift']());}catch(_0x43cfa2){_0x370cbb['push'](_0x370cbb['shift']());}}}(_0x5c16,0x5d3ce),function(_0x559d2f,_0x928144){const _0x19e11c=_0x8c6a;typeof exports==_0x19e11c(0x17a)&&typeof module<'u'?_0x928144(exports,require(_0x19e11c(0x1a8)),require(_0x19e11c(0x1e6)),require('@univerjs/core'),require(_0x19e11c(0x176)),require(_0x19e11c(0x1b7)),require(_0x19e11c(0x195)),require(_0x19e11c(0x1e1))):typeof define==_0x19e11c(0x1a2)&&define[_0x19e11c(0x1e8)]?define(['exports',_0x19e11c(0x1a8),_0x19e11c(0x1e6),'@univerjs/core',_0x19e11c(0x176),_0x19e11c(0x1b7),_0x19e11c(0x195),'@univerjs/network'],_0x928144):(_0x559d2f=typeof globalThis<'u'?globalThis:_0x559d2f||self,_0x928144(_0x559d2f[_0x19e11c(0x1fa)]={},_0x559d2f[_0x19e11c(0x19c)],_0x559d2f[_0x19e11c(0x19e)],_0x559d2f[_0x19e11c(0x183)],_0x559d2f['UniverThreadCommentUi'],_0x559d2f[_0x19e11c(0x1cb)],_0x559d2f[_0x19e11c(0x195)],_0x559d2f[_0x19e11c(0x1dd)]));}(this,function(_0x5a7c67,_0x3871da,_0x46729d,_0x533e70,_0x2a2413,_0x3ce02e,_0x363ffb,_0x457d43){'use strict';const _0xd67764=_0x8c6a;const _0x322963=_0xd67764(0x17b);var _0x3c522a=(_0x4a6efc=>(_0x4a6efc[_0x4a6efc[_0xd67764(0x1af)]=0x0]=_0xd67764(0x1af),_0x4a6efc[_0x4a6efc[_0xd67764(0x1d0)]=0x1]=_0xd67764(0x1d0),_0x4a6efc[_0x4a6efc[_0xd67764(0x1c9)]=-0x1]=_0xd67764(0x1c9),_0x4a6efc))(_0x3c522a||{}),_0x447af1=(_0xacf8ce=>(_0xacf8ce[_0xacf8ce['Unknown']=0x0]='Unknown',_0xacf8ce[_0xacf8ce[_0xd67764(0x19f)]=0x1]=_0xd67764(0x19f),_0xacf8ce[_0xacf8ce[_0xd67764(0x1eb)]=0x2]=_0xd67764(0x1eb),_0xacf8ce[_0xacf8ce[_0xd67764(0x1a5)]=0x3]=_0xd67764(0x1a5),_0xacf8ce[_0xacf8ce[_0xd67764(0x179)]=0x4]=_0xd67764(0x179),_0xacf8ce[_0xacf8ce[_0xd67764(0x186)]=0x5]=_0xd67764(0x186),_0xacf8ce[_0xacf8ce[_0xd67764(0x1c9)]=-0x1]=_0xd67764(0x1c9),_0xacf8ce))(_0x447af1||{});const _0x36926e=_0x4a96ec=>_0x533e70['dayjs'](new Date(+_0x4a96ec))['format'](_0xd67764(0x1b4)),_0xa1bb66=async(_0x5a0b69,_0x5c34f8)=>{const _0x26b86d=_0xd67764,_0x23c5ff=_0x5a0b69[_0x26b86d(0x1e4)](_0x533e70[_0x26b86d(0x1c5)]),_0x5ac5d9=_0x5a0b69[_0x26b86d(0x1e4)](_0x457d43['HTTPService']);_0x5c34f8['forEach'](_0x5508a7=>{const _0x5bd936=_0x26b86d;_0x23c5ff[_0x5bd936(0x1a7)](_0x5508a7)&&_0x5c34f8[_0x5bd936(0x1b0)](_0x5508a7);}),_0x5c34f8['size']&&(await _0x5ac5d9[_0x26b86d(0x1e4)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5c34f8]}}))[_0x26b86d(0x1ae)]['users'][_0x26b86d(0x1a9)](_0x1c6d5b=>{const _0x37ad39=_0x26b86d;_0x1c6d5b&&_0x23c5ff[_0x37ad39(0x177)](_0x1c6d5b);});};var _0x363d00=Object[_0xd67764(0x178)],_0x1965bd=(_0x9a3bd0,_0x6fb14a,_0xa98c8e,_0x47ae64)=>{for(var _0x5173cf=_0x47ae64>0x1?void 0x0:_0x47ae64?_0x363d00(_0x6fb14a,_0xa98c8e):_0x6fb14a,_0x44ef59=_0x9a3bd0['length']-0x1,_0x1ea466;_0x44ef59>=0x0;_0x44ef59--)(_0x1ea466=_0x9a3bd0[_0x44ef59])&&(_0x5173cf=_0x1ea466(_0x5173cf)||_0x5173cf);return _0x5173cf;},_0xc19667=(_0x34cb81,_0x48c081)=>(_0x7025ca,_0xc7fbdb)=>_0x48c081(_0x7025ca,_0xc7fbdb,_0x34cb81);let _0x8f3511=class extends _0x533e70[_0xd67764(0x1b1)]{constructor(_0x41e5aa,_0x34828c,_0x544c69,_0x46ecbf){const _0x5a51b2=_0xd67764;super(),this[_0x5a51b2(0x1ba)]=_0x41e5aa,this[_0x5a51b2(0x1ac)]=_0x34828c,this[_0x5a51b2(0x1e7)]=_0x544c69,this['_injector']=_0x46ecbf,this[_0x5a51b2(0x1f5)](),this[_0x5a51b2(0x1e0)]();}['_initUserSync'](){const _0x2a1466=_0xd67764;this[_0x2a1466(0x1aa)](this[_0x2a1466(0x1ac)][_0x2a1466(0x17e)][_0x2a1466(0x184)](_0x363ffb[_0x2a1466(0x18e)](0x10))[_0x2a1466(0x1cd)](_0x4087ce=>{const _0x60c112=_0x2a1466,_0x41f083=new Set();_0x4087ce[_0x60c112(0x1a9)](_0x4f18b0=>{const _0x266f64=_0x60c112;switch(_0x4f18b0[_0x266f64(0x17c)]){case _0x266f64(0x1ec):{const _0x1eb637=_0x4f18b0[_0x266f64(0x1f8)][_0x266f64(0x1a1)];_0x41f083[_0x266f64(0x1ec)](_0x1eb637);break;}}}),_0xa1bb66(this[_0x60c112(0x19d)],_0x41f083);}));}[_0xd67764(0x1f5)](){const _0x3468b0=_0xd67764;this[_0x3468b0(0x1aa)](this['_commentService'][_0x3468b0(0x17e)][_0x3468b0(0x1cd)](async _0x3bf02c=>{const _0x45649f=_0x3468b0;var _0x130acf,_0x37f5c5,_0x5886ba,_0xfc4603;const _0x5f1ed9=(_0x130acf=this['_threadCommentModel'][_0x45649f(0x191)](_0x3bf02c[_0x45649f(0x193)])[_0x45649f(0x1fc)](_0x2773e0=>_0x2773e0[_0x45649f(0x199)]===_0x3bf02c['threadId']))==null?void 0x0:_0x130acf[_0x45649f(0x1d2)];if(!_0x5f1ed9)return;const {unitId:_0x4642a0,subUnitId:_0x3ae869}=_0x5f1ed9;switch(_0x3bf02c[_0x45649f(0x18b)]&&this['_userService'][_0x45649f(0x177)](_0x3bf02c[_0x45649f(0x18b)]),_0x3bf02c[_0x45649f(0x17c)]){case _0x447af1[_0x45649f(0x19f)]:break;case _0x447af1[_0x45649f(0x1eb)]:{this[_0x45649f(0x1ac)][_0x45649f(0x1c0)](_0x4642a0,_0x3ae869,{'unitId':_0x4642a0,'subUnitId':_0x3ae869,'ref':'','id':_0x3bf02c['replyId'],'dT':_0x36926e(+_0x3bf02c[_0x45649f(0x192)]),'threadId':_0x3bf02c[_0x45649f(0x199)],'personId':(_0x5886ba=(_0x37f5c5=_0x3bf02c[_0x45649f(0x18b)])==null?void 0x0:_0x37f5c5[_0x45649f(0x1ed)])!=null?_0x5886ba:_0x3bf02c[_0x45649f(0x1a6)],'text':JSON['parse'](_0x3bf02c['content']),'parentId':_0x5f1ed9['id']});break;}case _0x447af1[_0x45649f(0x179)]:{const _0x167d79=this[_0x45649f(0x1ac)][_0x45649f(0x180)](_0x4642a0,_0x3ae869,_0x3bf02c[_0x45649f(0x1df)]);_0x167d79&&_0x167d79[_0x45649f(0x1f2)]&&this[_0x45649f(0x1ac)][_0x45649f(0x18f)](_0x4642a0,_0x3ae869,_0x3bf02c[_0x45649f(0x1df)]);break;}case _0x447af1[_0x45649f(0x1a5)]:{this[_0x45649f(0x1ac)][_0x45649f(0x1bb)](_0x4642a0,_0x3ae869,{'commentId':_0x3bf02c['replyId'],'text':JSON[_0x45649f(0x1d3)](_0x3bf02c[_0x45649f(0x1dc)])});break;}case _0x447af1['Solve']:{const _0x24b78b=(_0xfc4603=this['_threadCommentModel']['getUnit'](_0x3bf02c[_0x45649f(0x193)])[_0x45649f(0x1fc)](_0x186c65=>_0x186c65[_0x45649f(0x199)]===_0x3bf02c[_0x45649f(0x199)]))==null?void 0x0:_0xfc4603[_0x45649f(0x1d2)];_0x24b78b&&this[_0x45649f(0x1ac)][_0x45649f(0x1db)](_0x4642a0,_0x3ae869,_0x24b78b['id'],_0x3bf02c[_0x45649f(0x198)]===_0x3c522a[_0x45649f(0x1d0)]);break;}}}));}};_0x8f3511=_0x1965bd([_0xc19667(0x0,_0x533e70['Inject'](_0x3871da[_0xd67764(0x1d7)])),_0xc19667(0x1,_0x533e70[_0xd67764(0x1ee)](_0x3ce02e['ThreadCommentModel'])),_0xc19667(0x2,_0x533e70[_0xd67764(0x1ee)](_0x533e70[_0xd67764(0x1c5)])),_0xc19667(0x3,_0x533e70[_0xd67764(0x1ee)](_0x533e70['Injector']))],_0x8f3511);const _0x36b3b0='thread-comment-data-source.config',_0x4d9c69={};var _0x2bd032=Object[_0xd67764(0x178)],_0x3efbd8=(_0x1eb7f0,_0x3427ce,_0x588bb3,_0x16ed3f)=>{for(var _0x5315b6=_0x16ed3f>0x1?void 0x0:_0x16ed3f?_0x2bd032(_0x3427ce,_0x588bb3):_0x3427ce,_0x40605a=_0x1eb7f0['length']-0x1,_0x189777;_0x40605a>=0x0;_0x40605a--)(_0x189777=_0x1eb7f0[_0x40605a])&&(_0x5315b6=_0x189777(_0x5315b6)||_0x5315b6);return _0x5315b6;},_0x4ff84b=(_0x2e0d24,_0x230135)=>(_0x4bf249,_0x419074)=>_0x230135(_0x4bf249,_0x419074,_0x2e0d24);function _0x145529(_0x32cb57,_0x26cda5){const _0xbb4276=_0xd67764,_0x50fa2e=_0x32cb57[_0xbb4276(0x1c2)][0x0];return{..._0x26cda5,'id':_0x50fa2e[_0xbb4276(0x1df)],'resolved':_0x32cb57[_0xbb4276(0x198)]===0x1,'dT':_0x36926e(_0x50fa2e[_0xbb4276(0x192)]),'personId':_0x50fa2e['userId'],'threadId':_0x50fa2e[_0xbb4276(0x199)]};}function _0x35ea8c(_0x4dde6e,_0x29a0ff,_0x447ae){const _0x16e1a2=_0xd67764;var _0x4e7aac,_0x47d0fd;if(((_0x47d0fd=(_0x4e7aac=_0x4dde6e==null?void 0x0:_0x4dde6e['replies'])==null?void 0x0:_0x4e7aac['length'])!=null?_0x47d0fd:0x0)>0x0){const _0x544a18=(_0x3ca6ba,_0x543b9e)=>({'id':_0x3ca6ba[_0x16e1a2(0x1df)],'threadId':_0x3ca6ba[_0x16e1a2(0x199)],'dT':_0x36926e(_0x3ca6ba[_0x16e1a2(0x192)]),'personId':_0x3ca6ba[_0x16e1a2(0x1a6)],'resolved':_0x4dde6e[_0x16e1a2(0x198)]===_0x3c522a[_0x16e1a2(0x1d0)],'unitId':_0x29a0ff,'subUnitId':_0x447ae,'text':JSON[_0x16e1a2(0x1d3)](_0x3ca6ba[_0x16e1a2(0x1dc)]),'parentId':_0x543b9e}),_0x11b197=_0x544a18(_0x4dde6e[_0x16e1a2(0x1c2)][0x0]);return{..._0x11b197,'children':_0x4dde6e['replies'][_0x16e1a2(0x1bd)](0x1)[_0x16e1a2(0x17d)](_0x5945e2=>_0x544a18(_0x5945e2,_0x11b197['id']))};}return null;}let _0x407eca=class{constructor(_0x4d87ec,_0x9e6a15,_0x52ecaf,_0x55ba50){const _0x12c01d=_0xd67764;this[_0x12c01d(0x1d1)]=_0x4d87ec,this[_0x12c01d(0x1e7)]=_0x9e6a15,this[_0x12c01d(0x175)]=_0x52ecaf,this[_0x12c01d(0x19d)]=_0x55ba50;}async['addComment'](_0x4e9d0e){const _0x3a8471=_0xd67764;var _0x462d73,_0x1ad62d;const {parentId:_0x216302,unitId:_0x53aca3,text:_0x25479f,threadId:_0x5df593}=_0x4e9d0e,_0x1de09=(_0x1ad62d=(_0x462d73=_0x25479f[_0x3a8471(0x1ab)])==null?void 0x0:_0x462d73[_0x3a8471(0x1b9)](_0x4ab3d0=>_0x4ab3d0[_0x3a8471(0x1e3)]===_0x533e70[_0x3a8471(0x19b)][_0x3a8471(0x1de)])[_0x3a8471(0x17d)](_0x3bd196=>_0x3bd196[_0x3a8471(0x1a4)]))!=null?_0x1ad62d:[],_0x21e251=JSON['stringify'](_0x25479f),_0xb4dd94=(await this[_0x3a8471(0x175)]['requireSession'](_0x53aca3))['getMemberID']();if(_0x216302){const _0x3f81af={'memberId':_0xb4dd94,'unitId':_0x53aca3,'content':_0x21e251,'mention':_0x1de09,'threadId':_0x5df593},_0x590108=(await this['_httpService'][_0x3a8471(0x1c1)](_0x3a8471(0x1a3)+_0x53aca3+_0x3a8471(0x18c),{'body':_0x3f81af}))[_0x3a8471(0x1ae)][_0x3a8471(0x1e9)];return{..._0x4e9d0e,'id':_0x590108['replyId'],'dT':_0x533e70[_0x3a8471(0x181)](+_0x590108[_0x3a8471(0x192)])['format'](_0x3a8471(0x1b4)),'personId':_0x590108[_0x3a8471(0x1a6)]};}else{const _0x241094={'memberId':_0xb4dd94,'unitId':_0x53aca3,'content':_0x21e251,'mention':_0x1de09},_0xc27d9b=await this[_0x3a8471(0x1d1)][_0x3a8471(0x1c1)](_0x3a8471(0x1a3)+_0x53aca3+_0x3a8471(0x1f4),{'body':_0x241094});return _0x145529(_0xc27d9b[_0x3a8471(0x1ae)]['comment'],_0x4e9d0e);}}async[_0xd67764(0x1bb)](_0x16baec){const _0x4a0be9=_0xd67764;var _0x545ba7,_0x1aff1d;const {text:_0x2e55eb,unitId:_0x4d4372}=_0x16baec,_0x3be248=(_0x1aff1d=(_0x545ba7=_0x2e55eb[_0x4a0be9(0x1ab)])==null?void 0x0:_0x545ba7[_0x4a0be9(0x1b9)](_0x49b258=>_0x49b258[_0x4a0be9(0x1e3)]===_0x533e70[_0x4a0be9(0x19b)][_0x4a0be9(0x1de)])[_0x4a0be9(0x17d)](_0x1dc274=>_0x1dc274[_0x4a0be9(0x1a4)]))!=null?_0x1aff1d:[],_0x1118d8=JSON[_0x4a0be9(0x1b3)](_0x2e55eb),_0xf70581=_0x16baec[_0x4a0be9(0x199)],_0x5a0348=_0x16baec['id'],_0x1e721d={'memberId':(await this[_0x4a0be9(0x175)]['requireSession'](_0x4d4372))[_0x4a0be9(0x1d9)](),'unitId':_0x4d4372,'threadId':_0xf70581,'mention':_0x3be248,'content':_0x1118d8,'replyId':_0x5a0348},_0x3b2790=await this[_0x4a0be9(0x1d1)][_0x4a0be9(0x1c1)](_0x4a0be9(0x1a3)+_0x4d4372+_0x4a0be9(0x1ad),{'body':_0x1e721d});return!_0x3b2790[_0x4a0be9(0x1ae)][_0x4a0be9(0x1c6)]||_0x3b2790['body'][_0x4a0be9(0x1c6)][_0x4a0be9(0x1e5)]===0x1;}async[_0xd67764(0x1db)](_0x697dd){const _0xb78577=_0xd67764,{unitId:_0x16e60c}=_0x697dd,_0x1f4d1d=_0x697dd[_0xb78577(0x199)],_0xdf6f5a={'memberId':this[_0xb78577(0x1e7)]['getCurrentUser']()[_0xb78577(0x1ed)],'unitId':_0x16e60c,'threadId':_0x1f4d1d,'solved':_0x697dd['resolved']?_0x3c522a['Solved']:_0x3c522a[_0xb78577(0x1af)]},_0x2428b5=await this[_0xb78577(0x1d1)][_0xb78577(0x1c1)](_0xb78577(0x1a3)+_0x16e60c+_0xb78577(0x187),{'body':_0xdf6f5a});return!_0x2428b5[_0xb78577(0x1ae)][_0xb78577(0x1c6)]||_0x2428b5[_0xb78577(0x1ae)]['error'][_0xb78577(0x1e5)]===0x1;}async[_0xd67764(0x18f)](_0x359ccc,_0x174396,_0x1b6f81,_0x2eedfc){const _0x50ce3f=_0xd67764,_0x9beb9d={'memberId':(await this['_sessionService'][_0x50ce3f(0x18d)](_0x359ccc))[_0x50ce3f(0x1d9)](),'threadId':_0x1b6f81,'replyId':_0x2eedfc,'unitId':_0x359ccc},_0x4d764f=await this[_0x50ce3f(0x1d1)]['post']('/universer-api/comment/unit/'+_0x359ccc+'/delete',{'body':_0x9beb9d});return!_0x4d764f[_0x50ce3f(0x1ae)][_0x50ce3f(0x1c6)]||_0x4d764f[_0x50ce3f(0x1ae)][_0x50ce3f(0x1c6)]['code']===0x1;}async[_0xd67764(0x1f7)](_0x31682f,_0x2d133f,_0x44768c){const _0x127e88=_0xd67764,_0x51817c={'unitId':_0x31682f,'threadId':_0x44768c},_0x3638d8=await this[_0x127e88(0x1d1)][_0x127e88(0x1c1)](_0x127e88(0x1a3)+_0x31682f+_0x127e88(0x1f0),{'body':_0x51817c}),_0x12e74d=_0x44768c[_0x127e88(0x17d)](_0x5bcf3b=>_0x35ea8c(_0x3638d8['body'][_0x127e88(0x1d4)][_0x5bcf3b],_0x31682f,_0x2d133f))[_0x127e88(0x1b9)](Boolean);return Object[_0x127e88(0x1f3)](_0x3638d8['body'][_0x127e88(0x1be)])[_0x127e88(0x1a9)](_0xb17755=>{const _0x1ed35d=_0x127e88;this[_0x1ed35d(0x1e7)]['addUser'](_0xb17755);}),_0x12e74d;}['saveCommentToSnapshot'](_0x4ccf30){const _0xc9a88=_0xd67764;return{'id':_0x4ccf30['id'],'threadId':_0x4ccf30[_0xc9a88(0x199)],'ref':_0x4ccf30[_0xc9a88(0x1ef)]};}};_0x407eca=_0x3efbd8([_0x4ff84b(0x0,_0x533e70[_0xd67764(0x1ee)](_0x457d43[_0xd67764(0x1b2)])),_0x4ff84b(0x1,_0x533e70['Inject'](_0x533e70[_0xd67764(0x1c5)])),_0x4ff84b(0x2,_0x533e70['Inject'](_0x3871da[_0xd67764(0x196)])),_0x4ff84b(0x3,_0x533e70['Inject'](_0x533e70[_0xd67764(0x185)]))],_0x407eca);var _0x28a2b6=Object[_0xd67764(0x178)],_0x2e3a05=(_0x68ee86,_0x465ff7,_0x3da224,_0x176324)=>{for(var _0x4ede24=_0x176324>0x1?void 0x0:_0x176324?_0x28a2b6(_0x465ff7,_0x3da224):_0x465ff7,_0xc629cd=_0x68ee86['length']-0x1,_0x3299e0;_0xc629cd>=0x0;_0xc629cd--)(_0x3299e0=_0x68ee86[_0xc629cd])&&(_0x4ede24=_0x3299e0(_0x4ede24)||_0x4ede24);return _0x4ede24;},_0x72a1ea=(_0x37468d,_0x147258)=>(_0x160e10,_0x29fb51)=>_0x147258(_0x160e10,_0x29fb51,_0x37468d);let _0x307b6a=class extends _0x533e70[_0xd67764(0x1b1)]{constructor(_0x2dd793,_0x4caca1){const _0x3f4cdf=_0xd67764;super(),this[_0x3f4cdf(0x1fb)]=_0x2dd793,this[_0x3f4cdf(0x1bf)]=_0x4caca1,this[_0x3f4cdf(0x1e2)]();}[_0xd67764(0x1e2)](){const _0x1d5e5a=_0xd67764;this[_0x1d5e5a(0x1fb)]['dataSource']=this[_0x1d5e5a(0x1bf)],this[_0x1d5e5a(0x1fb)][_0x1d5e5a(0x1b8)]=!0x1;}};_0x307b6a=_0x2e3a05([_0x72a1ea(0x0,_0x3ce02e[_0xd67764(0x1d8)]),_0x72a1ea(0x1,_0x533e70[_0xd67764(0x1ee)](_0x407eca))],_0x307b6a);var _0x1c3c13=Object[_0xd67764(0x1c8)],_0x17cd52=Object[_0xd67764(0x178)],_0x25ca65=(_0x4211fa,_0x48f40b,_0x4232f1)=>_0x48f40b in _0x4211fa?_0x1c3c13(_0x4211fa,_0x48f40b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4232f1}):_0x4211fa[_0x48f40b]=_0x4232f1,_0x4d5234=(_0x411fa9,_0x7ec6c,_0x20b3c8,_0x3d1bcc)=>{const _0x717cf4=_0xd67764;for(var _0x59f714=_0x3d1bcc>0x1?void 0x0:_0x3d1bcc?_0x17cd52(_0x7ec6c,_0x20b3c8):_0x7ec6c,_0x24988d=_0x411fa9[_0x717cf4(0x182)]-0x1,_0x3ba6cf;_0x24988d>=0x0;_0x24988d--)(_0x3ba6cf=_0x411fa9[_0x24988d])&&(_0x59f714=_0x3ba6cf(_0x59f714)||_0x59f714);return _0x59f714;},_0x1be6f4=(_0xdd7980,_0xe881bf)=>(_0x3e7f42,_0x49d6e5)=>_0xe881bf(_0x3e7f42,_0x49d6e5,_0xdd7980),_0x1bfb74=(_0x260e6e,_0x3145e7,_0x2876cf)=>_0x25ca65(_0x260e6e,typeof _0x3145e7!=_0xd67764(0x1ce)?_0x3145e7+'':_0x3145e7,_0x2876cf);_0x5a7c67[_0xd67764(0x1bc)]=class extends _0x533e70['Plugin']{constructor(_0x2f3352=_0x4d9c69,_0x41d564,_0x17f59c){const _0x4197c0=_0xd67764;super(),this[_0x4197c0(0x1c4)]=_0x2f3352,this[_0x4197c0(0x19d)]=_0x41d564,this[_0x4197c0(0x1f6)]=_0x17f59c;const {..._0x50cadc}=_0x533e70[_0x4197c0(0x18a)]({},_0x4d9c69,this[_0x4197c0(0x1c4)]);this[_0x4197c0(0x1f6)]['setConfig'](_0x36b3b0,_0x50cadc);}[_0xd67764(0x1da)](){const _0x5be3f2=_0xd67764;[[_0x407eca],[_0x307b6a],[_0x8f3511]][_0x5be3f2(0x1a9)](_0x40e62f=>{const _0x26c88d=_0x5be3f2;this[_0x26c88d(0x19d)][_0x26c88d(0x1ec)](_0x40e62f);});}['onReady'](){const _0x43d58f=_0xd67764;this[_0x43d58f(0x19d)][_0x43d58f(0x1e4)](_0x307b6a),this[_0x43d58f(0x19d)]['get'](_0x8f3511);}},_0x1bfb74(_0x5a7c67[_0xd67764(0x1bc)],'pluginName',_0x322963),_0x1bfb74(_0x5a7c67['UniverThreadCommentDataSourcePlugin'],_0xd67764(0x17c),_0x533e70[_0xd67764(0x1c7)][_0xd67764(0x197)]),_0x5a7c67['UniverThreadCommentDataSourcePlugin']=_0x4d5234([_0x533e70['DependentOn'](_0x2a2413[_0xd67764(0x1f9)],_0x3871da[_0xd67764(0x1b6)],_0x46729d[_0xd67764(0x1d5)]),_0x1be6f4(0x1,_0x533e70['Inject'](_0x533e70[_0xd67764(0x185)])),_0x1be6f4(0x2,_0x533e70[_0xd67764(0x19a)])],_0x5a7c67[_0xd67764(0x1bc)]),Object['defineProperty'](_0x5a7c67,Symbol[_0xd67764(0x188)],{'value':_0xd67764(0x1c3)});}));function _0x5c16(){const _0x49c782=['comments','UniverLicensePlugin','1496pPnidA','CommentService','IThreadCommentDataSourceService','getMemberID','onStarting','resolveComment','content','UniverNetwork','COMMENT','replyId','_initUserSync','@univerjs/network','_initDataSource','rangeType','get','code','@univerjs-pro/license','_userService','amd','reply','1ESvHtD','Reply','add','userID','Inject','ref','/list','160vEOGZC','parentId','values','/add','_init','_configService','listComments','payload','UniverThreadCommentUIPlugin','UniverProThreadCommentDatasource','_threadCommentDataSourceService','find','_sessionService','@univerjs/thread-comment-ui','addUser','getOwnPropertyDescriptor','Delete','object','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','type','map','commentUpdate$','970354jDfNcp','getComment','dayjs','length','UniverCore','pipe','Injector','Solve','/solved','toStringTag','36117fkrrOb','merge','user','/reply','requireSession','bufferTime','deleteComment','428060CHSyVL','getUnit','createTimestamp','unitId','689382VHfeIN','rxjs','CollaborationSessionService','UNIVER_UNKNOWN','solved','threadId','IConfigService','CustomRangeType','UniverProCollaborationClient','_injector','UniverProLicense','Add','70250vebvLD','personId','function','/universer-api/comment/unit/','rangeId','Edit','userId','getUser','@univerjs-pro/collaboration-client','forEach','disposeWithMe','customRanges','_threadCommentModel','/edit','body','OpenOrReOpen','delete','Disposable','HTTPService','stringify','YYYY/MM/DD\x20HH:mm','21430387nnDsHH','UniverCollaborationClientPlugin','@univerjs/thread-comment','syncUpdateMutationToColla','filter','_commentService','updateComment','UniverThreadCommentDataSourcePlugin','slice','users','_threadCommentDataSource','addComment','post','replies','Module','_config','UserManagerService','error','UniverInstanceType','defineProperty','UNRECOGNIZED','6CbWOWp','UniverThreadComment','1251441gsBtFq','subscribe','symbol','12LvXfLe','Solved','_httpService','root','parse'];_0x5c16=function(){return _0x49c782;};return _0x5c16();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.7.0-nightly.202505251606",
3
+ "version": "0.8.0-beta.0",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.7.0-nightly.202505251606",
49
- "@univerjs-pro/license": "0.7.0-nightly.202505251606",
50
- "@univerjs/core": "0.7.0-nightly.202505251606",
51
- "@univerjs/network": "0.7.0-nightly.202505251606",
48
+ "@univerjs-pro/collaboration-client": "0.8.0-beta.0",
49
+ "@univerjs-pro/license": "0.8.0-beta.0",
50
+ "@univerjs/network": "0.8.0-beta.0",
52
51
  "@univerjs/protocol": "0.1.47-alpha.0",
53
- "@univerjs/thread-comment": "0.7.0-nightly.202505251606",
54
- "@univerjs/thread-comment-ui": "0.7.0-nightly.202505251606"
52
+ "@univerjs/core": "0.8.0-beta.0",
53
+ "@univerjs/thread-comment": "0.8.0-beta.0",
54
+ "@univerjs/thread-comment-ui": "0.8.0-beta.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.8.3",
59
59
  "vite": "^6.3.5",
60
60
  "vitest": "^3.1.4",
61
- "@univerjs-infra/shared": "0.7.0"
61
+ "@univerjs-infra/shared": "0.8.0-beta.0"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",