@univerjs-pro/thread-comment-datasource 0.8.3 → 0.9.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 _0x57f153=_0xcc83;(function(_0x37eeea,_0x46e676){const _0x29b1e3=_0xcc83,_0x4cbb8b=_0x37eeea();while(!![]){try{const _0x153581=parseInt(_0x29b1e3(0xda))/0x1*(parseInt(_0x29b1e3(0xed))/0x2)+parseInt(_0x29b1e3(0x75))/0x3+-parseInt(_0x29b1e3(0xbf))/0x4+-parseInt(_0x29b1e3(0xe8))/0x5+parseInt(_0x29b1e3(0xce))/0x6+parseInt(_0x29b1e3(0xe4))/0x7*(parseInt(_0x29b1e3(0xb7))/0x8)+-parseInt(_0x29b1e3(0xdb))/0x9;if(_0x153581===_0x46e676)break;else _0x4cbb8b['push'](_0x4cbb8b['shift']());}catch(_0x3b426e){_0x4cbb8b['push'](_0x4cbb8b['shift']());}}}(_0x5648,0xc3d6f));function _0x5648(){const _0x1fa216=['8NUjldy','format','slice','post','Delete','onReady','forEach','Solved','6016712dZyxnZ','_initUserSync','OpenOrReOpen','_threadCommentDataSource','_sessionService','@univerjs/core','payload','root','/delete','UniverThreadCommentDataSourcePlugin','getUnit','@univerjs/network','reply','_configService','getUser','7097568rELiel','getComment','Module','addComment','UniverThreadCommentUIPlugin','UniverInstanceType','replyId','createTimestamp','getOwnPropertyDescriptor','type','@univerjs/thread-comment','deleteComment','79179RsfCkY','11206665KESbcz','add','solved','_config','body','_threadCommentModel','code','IConfigService','userId','3118521xNJtog','Edit','resolved','find','2540200oUAXAr','Injector','onStarting','@univerjs-pro/license','users','30Koduji','Add','subscribe','length','3730338QPaBmS','Plugin','symbol','/edit','saveCommentToSnapshot','UniverCollaborationClientPlugin','commentUpdate$','rxjs','CustomRangeType','@univerjs/thread-comment-ui','/universer-api/comment/unit/','parse','/reply','pipe','ref','Inject','_threadCommentDataSourceService','_httpService','merge','_init','Disposable','updateComment','user','addUser','personId','_initDataSource','resolveComment','threadId','userID','disposeWithMe','error','UNRECOGNIZED','stringify','_userService','content','replies','Solve','bufferTime','get','comments','filter','ThreadCommentModel','toStringTag','CollaborationSessionService','comment','rangeId','HTTPService','unitId','/add','DependentOn','@univerjs-pro/collaboration-client','_injector','getMemberID','Reply','IThreadCommentDataSourceService','delete','requireSession','UserManagerService','map','UniverLicensePlugin','dayjs','customRanges','syncUpdateMutationToColla','_commentService','CommentService','Unknown'];_0x5648=function(){return _0x1fa216;};return _0x5648();}Object['defineProperty'](exports,Symbol[_0x57f153(0x9f)],{'value':_0x57f153(0xd0)});const b=require(_0x57f153(0xa7)),T=require(_0x57f153(0xeb)),c=require(_0x57f153(0xc4)),j=require(_0x57f153(0x7e)),M=require(_0x57f153(0xd8)),w=require(_0x57f153(0x7c)),P=require(_0x57f153(0xca)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xe46c6a=>(_0xe46c6a[_0xe46c6a[_0x57f153(0xc1)]=0x0]=_0x57f153(0xc1),_0xe46c6a[_0xe46c6a[_0x57f153(0xbe)]=0x1]=_0x57f153(0xbe),_0xe46c6a[_0xe46c6a[_0x57f153(0x94)]=-0x1]=_0x57f153(0x94),_0xe46c6a))(I||{}),v=(_0x4160b1=>(_0x4160b1[_0x4160b1[_0x57f153(0xb6)]=0x0]='Unknown',_0x4160b1[_0x4160b1[_0x57f153(0xee)]=0x1]='Add',_0x4160b1[_0x4160b1['Reply']=0x2]=_0x57f153(0xaa),_0x4160b1[_0x4160b1[_0x57f153(0xe5)]=0x3]=_0x57f153(0xe5),_0x4160b1[_0x4160b1[_0x57f153(0xbb)]=0x4]=_0x57f153(0xbb),_0x4160b1[_0x4160b1['Solve']=0x5]=_0x57f153(0x99),_0x4160b1[_0x4160b1[_0x57f153(0x94)]=-0x1]='UNRECOGNIZED',_0x4160b1))(v||{});const f=_0x51814e=>c[_0x57f153(0xb1)](new Date(+_0x51814e))[_0x57f153(0xb8)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x1c5f22,_0x1e9fd0)=>{const _0x5abf11=_0x57f153,_0x1eadb4=_0x1c5f22[_0x5abf11(0x9b)](c[_0x5abf11(0xae)]),_0x305cf9=_0x1c5f22[_0x5abf11(0x9b)](P[_0x5abf11(0xa3)]);_0x1e9fd0[_0x5abf11(0xbd)](_0x23987e=>{const _0x2dcffb=_0x5abf11;_0x1eadb4[_0x2dcffb(0xcd)](_0x23987e)&&_0x1e9fd0[_0x2dcffb(0xac)](_0x23987e);}),_0x1e9fd0['size']&&(await _0x305cf9[_0x5abf11(0x9b)]('/universer-api/user/list',{'params':{'userIDs':[..._0x1e9fd0]}}))['body'][_0x5abf11(0xec)][_0x5abf11(0xbd)](_0x9e9546=>{_0x9e9546&&_0x1eadb4['addUser'](_0x9e9546);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x4c8319,_0x21020f,_0x2b0d27,_0x53339a)=>{for(var _0x3539ee=_0x53339a>0x1?void 0x0:_0x53339a?$(_0x21020f,_0x2b0d27):_0x21020f,_0x36eba4=_0x4c8319['length']-0x1,_0x5618b3;_0x36eba4>=0x0;_0x36eba4--)(_0x5618b3=_0x4c8319[_0x36eba4])&&(_0x3539ee=_0x5618b3(_0x3539ee)||_0x3539ee);return _0x3539ee;},S=(_0x2746e1,_0x4a70ed)=>(_0x4460f3,_0x4cf49b)=>_0x4a70ed(_0x4460f3,_0x4cf49b,_0x2746e1);let p=class extends c[_0x57f153(0x89)]{constructor(_0x4a3f89,_0x431854,_0x5362c4,_0x48cf7e){const _0x126084=_0x57f153;super(),this[_0x126084(0xb4)]=_0x4a3f89,this[_0x126084(0xe0)]=_0x431854,this[_0x126084(0x96)]=_0x5362c4,this[_0x126084(0xa8)]=_0x48cf7e,this[_0x126084(0x88)](),this[_0x126084(0xc0)]();}['_initUserSync'](){const _0x4a9460=_0x57f153;this[_0x4a9460(0x92)](this[_0x4a9460(0xe0)]['commentUpdate$'][_0x4a9460(0x82)](w[_0x4a9460(0x9a)](0x10))[_0x4a9460(0x73)](_0x411910=>{const _0x1ec7ff=_0x4a9460,_0x5553a4=new Set();_0x411910[_0x1ec7ff(0xbd)](_0x3096b4=>{const _0x449fb3=_0x1ec7ff;switch(_0x3096b4['type']){case _0x449fb3(0xdc):{const _0x450fd8=_0x3096b4[_0x449fb3(0xc5)][_0x449fb3(0x8d)];_0x5553a4[_0x449fb3(0xdc)](_0x450fd8);break;}}}),R(this[_0x1ec7ff(0xa8)],_0x5553a4);}));}['_init'](){const _0x5ceda2=_0x57f153;this[_0x5ceda2(0x92)](this[_0x5ceda2(0xb4)][_0x5ceda2(0x7b)][_0x5ceda2(0x73)](async _0x2d8f70=>{const _0x40d780=_0x5ceda2;var _0x57de52,_0x5c5193,_0x3eab24,_0x28159e;const _0x2f21c7=(_0x57de52=this[_0x40d780(0xe0)][_0x40d780(0xc9)](_0x2d8f70[_0x40d780(0xa4)])[_0x40d780(0xe7)](_0x458c8d=>_0x458c8d[_0x40d780(0x90)]===_0x2d8f70['threadId']))==null?void 0x0:_0x57de52['root'];if(!_0x2f21c7)return;const {unitId:_0x25e5f7,subUnitId:_0x478891}=_0x2f21c7;switch(_0x2d8f70['user']&&this[_0x40d780(0x96)]['addUser'](_0x2d8f70[_0x40d780(0x8b)]),_0x2d8f70[_0x40d780(0xd7)]){case v['Add']:break;case v[_0x40d780(0xaa)]:{this[_0x40d780(0xe0)][_0x40d780(0xd1)](_0x25e5f7,_0x478891,{'unitId':_0x25e5f7,'subUnitId':_0x478891,'ref':'','id':_0x2d8f70[_0x40d780(0xd4)],'dT':f(+_0x2d8f70['createTimestamp']),'threadId':_0x2d8f70[_0x40d780(0x90)],'personId':(_0x3eab24=(_0x5c5193=_0x2d8f70[_0x40d780(0x8b)])==null?void 0x0:_0x5c5193[_0x40d780(0x91)])!=null?_0x3eab24:_0x2d8f70[_0x40d780(0xe3)],'text':JSON[_0x40d780(0x80)](_0x2d8f70[_0x40d780(0x97)]),'parentId':_0x2f21c7['id']});break;}case v['Delete']:{const _0x27280b=this[_0x40d780(0xe0)][_0x40d780(0xcf)](_0x25e5f7,_0x478891,_0x2d8f70[_0x40d780(0xd4)]);_0x27280b&&_0x27280b['parentId']&&this[_0x40d780(0xe0)]['deleteComment'](_0x25e5f7,_0x478891,_0x2d8f70[_0x40d780(0xd4)]);break;}case v['Edit']:{this[_0x40d780(0xe0)][_0x40d780(0x8a)](_0x25e5f7,_0x478891,{'commentId':_0x2d8f70['replyId'],'text':JSON[_0x40d780(0x80)](_0x2d8f70[_0x40d780(0x97)])});break;}case v[_0x40d780(0x99)]:{const _0x3083cf=(_0x28159e=this['_threadCommentModel'][_0x40d780(0xc9)](_0x2d8f70[_0x40d780(0xa4)])[_0x40d780(0xe7)](_0x488433=>_0x488433['threadId']===_0x2d8f70[_0x40d780(0x90)]))==null?void 0x0:_0x28159e[_0x40d780(0xc6)];_0x3083cf&&this[_0x40d780(0xe0)][_0x40d780(0x8f)](_0x25e5f7,_0x478891,_0x3083cf['id'],_0x2d8f70[_0x40d780(0xdd)]===I[_0x40d780(0xbe)]);break;}}}));}};p=E([S(0x0,c[_0x57f153(0x84)](b[_0x57f153(0xb5)])),S(0x1,c[_0x57f153(0x84)](M[_0x57f153(0x9e)])),S(0x2,c[_0x57f153(0x84)](c['UserManagerService'])),S(0x3,c[_0x57f153(0x84)](c[_0x57f153(0xe9)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x57f153(0xd6)],x=(_0x503c31,_0x3a9cee,_0x106d15,_0x35895a)=>{const _0x1858f1=_0x57f153;for(var _0x13f3a3=_0x35895a>0x1?void 0x0:_0x35895a?A(_0x3a9cee,_0x106d15):_0x3a9cee,_0x1a3249=_0x503c31[_0x1858f1(0x74)]-0x1,_0x23c3ba;_0x1a3249>=0x0;_0x1a3249--)(_0x23c3ba=_0x503c31[_0x1a3249])&&(_0x13f3a3=_0x23c3ba(_0x13f3a3)||_0x13f3a3);return _0x13f3a3;},_=(_0x2dd997,_0x56c24f)=>(_0xb0ffa2,_0x1413d4)=>_0x56c24f(_0xb0ffa2,_0x1413d4,_0x2dd997);function Y(_0x242c3f,_0x4e0c11){const _0x261c77=_0x57f153,_0x5435a9=_0x242c3f['replies'][0x0];return{..._0x4e0c11,'id':_0x5435a9['replyId'],'resolved':_0x242c3f[_0x261c77(0xdd)]===0x1,'dT':f(_0x5435a9['createTimestamp']),'personId':_0x5435a9['userId'],'threadId':_0x5435a9[_0x261c77(0x90)]};}function G(_0x3e10c3,_0x5b31e8,_0x58f707){const _0x338175=_0x57f153;var _0x16e1e6,_0x5bea08;if(((_0x5bea08=(_0x16e1e6=_0x3e10c3==null?void 0x0:_0x3e10c3[_0x338175(0x98)])==null?void 0x0:_0x16e1e6['length'])!=null?_0x5bea08:0x0)>0x0){const _0x1d8c75=(_0x55d4da,_0x472946)=>({'id':_0x55d4da[_0x338175(0xd4)],'threadId':_0x55d4da['threadId'],'dT':f(_0x55d4da[_0x338175(0xd5)]),'personId':_0x55d4da[_0x338175(0xe3)],'resolved':_0x3e10c3[_0x338175(0xdd)]===I[_0x338175(0xbe)],'unitId':_0x5b31e8,'subUnitId':_0x58f707,'text':JSON['parse'](_0x55d4da['content']),'parentId':_0x472946}),_0x1b69c2=_0x1d8c75(_0x3e10c3[_0x338175(0x98)][0x0]);return{..._0x1b69c2,'children':_0x3e10c3[_0x338175(0x98)][_0x338175(0xb9)](0x1)[_0x338175(0xaf)](_0x13615b=>_0x1d8c75(_0x13615b,_0x1b69c2['id']))};}return null;}let g=class{constructor(_0x4e02ce,_0x2c527d,_0x2fc219,_0x582ca2){const _0x36c6e6=_0x57f153;this[_0x36c6e6(0x86)]=_0x4e02ce,this[_0x36c6e6(0x96)]=_0x2c527d,this[_0x36c6e6(0xc3)]=_0x2fc219,this[_0x36c6e6(0xa8)]=_0x582ca2;}async[_0x57f153(0xd1)](_0x318e12){const _0x2a3de2=_0x57f153;var _0x2d95ac,_0x3c4b1b;const {parentId:_0x36a6aa,unitId:_0x2df06f,text:_0x2b9a04,threadId:_0x19fd09}=_0x318e12,_0x104f59=(_0x3c4b1b=(_0x2d95ac=_0x2b9a04[_0x2a3de2(0xb2)])==null?void 0x0:_0x2d95ac[_0x2a3de2(0x9d)](_0x3a0665=>_0x3a0665['rangeType']===c[_0x2a3de2(0x7d)]['COMMENT'])[_0x2a3de2(0xaf)](_0x26d22e=>_0x26d22e['rangeId']))!=null?_0x3c4b1b:[],_0x3a92eb=JSON['stringify'](_0x2b9a04),_0x4db227=(await this[_0x2a3de2(0xc3)][_0x2a3de2(0xad)](_0x2df06f))['getMemberID']();if(_0x36a6aa){const _0x57e580={'memberId':_0x4db227,'unitId':_0x2df06f,'content':_0x3a92eb,'mention':_0x104f59,'threadId':_0x19fd09},_0x3d56df=(await this['_httpService'][_0x2a3de2(0xba)](_0x2a3de2(0x7f)+_0x2df06f+_0x2a3de2(0x81),{'body':_0x57e580}))[_0x2a3de2(0xdf)][_0x2a3de2(0xcb)];return{..._0x318e12,'id':_0x3d56df['replyId'],'dT':c[_0x2a3de2(0xb1)](+_0x3d56df[_0x2a3de2(0xd5)])[_0x2a3de2(0xb8)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3d56df['userId']};}else{const _0x570e00={'memberId':_0x4db227,'unitId':_0x2df06f,'content':_0x3a92eb,'mention':_0x104f59},_0x4b6f9c=await this['_httpService'][_0x2a3de2(0xba)](_0x2a3de2(0x7f)+_0x2df06f+_0x2a3de2(0xa5),{'body':_0x570e00});return Y(_0x4b6f9c[_0x2a3de2(0xdf)][_0x2a3de2(0xa1)],_0x318e12);}}async['updateComment'](_0x918751){const _0x2cd9a4=_0x57f153;var _0x1b097d,_0x216aa3;const {text:_0x357be8,unitId:_0x17c38c}=_0x918751,_0x2dc4ea=(_0x216aa3=(_0x1b097d=_0x357be8[_0x2cd9a4(0xb2)])==null?void 0x0:_0x1b097d['filter'](_0x2d7e80=>_0x2d7e80['rangeType']===c[_0x2cd9a4(0x7d)]['COMMENT'])[_0x2cd9a4(0xaf)](_0x22ffc9=>_0x22ffc9[_0x2cd9a4(0xa2)]))!=null?_0x216aa3:[],_0x4e4fc3=JSON[_0x2cd9a4(0x95)](_0x357be8),_0x44fd25=_0x918751['threadId'],_0x15b3e3=_0x918751['id'],_0x12d61b={'memberId':(await this[_0x2cd9a4(0xc3)][_0x2cd9a4(0xad)](_0x17c38c))[_0x2cd9a4(0xa9)](),'unitId':_0x17c38c,'threadId':_0x44fd25,'mention':_0x2dc4ea,'content':_0x4e4fc3,'replyId':_0x15b3e3},_0x9d1bad=await this[_0x2cd9a4(0x86)]['post']('/universer-api/comment/unit/'+_0x17c38c+_0x2cd9a4(0x78),{'body':_0x12d61b});return!_0x9d1bad[_0x2cd9a4(0xdf)][_0x2cd9a4(0x93)]||_0x9d1bad[_0x2cd9a4(0xdf)]['error']['code']===0x1;}async[_0x57f153(0x8f)](_0x1ffa6d){const _0x105c55=_0x57f153,{unitId:_0x211140}=_0x1ffa6d,_0x2ae18c=_0x1ffa6d[_0x105c55(0x90)],_0x53909f={'memberId':this[_0x105c55(0x96)]['getCurrentUser']()[_0x105c55(0x91)],'unitId':_0x211140,'threadId':_0x2ae18c,'solved':_0x1ffa6d[_0x105c55(0xe6)]?I['Solved']:I[_0x105c55(0xc1)]},_0x4f0e17=await this[_0x105c55(0x86)][_0x105c55(0xba)](_0x105c55(0x7f)+_0x211140+'/solved',{'body':_0x53909f});return!_0x4f0e17[_0x105c55(0xdf)]['error']||_0x4f0e17[_0x105c55(0xdf)]['error'][_0x105c55(0xe1)]===0x1;}async[_0x57f153(0xd9)](_0x1e6cda,_0x488c09,_0x16d0d8,_0x4b7734){const _0x28a830=_0x57f153,_0x26c2fc={'memberId':(await this[_0x28a830(0xc3)][_0x28a830(0xad)](_0x1e6cda))[_0x28a830(0xa9)](),'threadId':_0x16d0d8,'replyId':_0x4b7734,'unitId':_0x1e6cda},_0x53e0c3=await this[_0x28a830(0x86)][_0x28a830(0xba)](_0x28a830(0x7f)+_0x1e6cda+_0x28a830(0xc7),{'body':_0x26c2fc});return!_0x53e0c3['body'][_0x28a830(0x93)]||_0x53e0c3[_0x28a830(0xdf)][_0x28a830(0x93)]['code']===0x1;}async['listComments'](_0x304d97,_0x47094a,_0x26b2f5){const _0x56da94=_0x57f153,_0x292394={'unitId':_0x304d97,'threadId':_0x26b2f5},_0x395121=await this[_0x56da94(0x86)][_0x56da94(0xba)](_0x56da94(0x7f)+_0x304d97+'/list',{'body':_0x292394}),_0x37a082=_0x26b2f5[_0x56da94(0xaf)](_0x10f674=>G(_0x395121[_0x56da94(0xdf)][_0x56da94(0x9c)][_0x10f674],_0x304d97,_0x47094a))[_0x56da94(0x9d)](Boolean);return Object['values'](_0x395121[_0x56da94(0xdf)][_0x56da94(0xec)])['forEach'](_0x484dd4=>{const _0x313161=_0x56da94;this['_userService'][_0x313161(0x8c)](_0x484dd4);}),_0x37a082;}[_0x57f153(0x79)](_0x1024e9){const _0x3a9fb8=_0x57f153;return{'id':_0x1024e9['id'],'threadId':_0x1024e9[_0x3a9fb8(0x90)],'ref':_0x1024e9[_0x3a9fb8(0x83)]};}};g=x([_(0x0,c[_0x57f153(0x84)](P[_0x57f153(0xa3)])),_(0x1,c['Inject'](c[_0x57f153(0xae)])),_(0x2,c['Inject'](b[_0x57f153(0xa0)])),_(0x3,c[_0x57f153(0x84)](c[_0x57f153(0xe9)]))],g);var H=Object[_0x57f153(0xd6)],J=(_0x472e52,_0x21165c,_0x41ccd6,_0x200b42)=>{const _0x374087=_0x57f153;for(var _0xae44fe=_0x200b42>0x1?void 0x0:_0x200b42?H(_0x21165c,_0x41ccd6):_0x21165c,_0x308937=_0x472e52[_0x374087(0x74)]-0x1,_0x386364;_0x308937>=0x0;_0x308937--)(_0x386364=_0x472e52[_0x308937])&&(_0xae44fe=_0x386364(_0xae44fe)||_0xae44fe);return _0xae44fe;},y=(_0x3dc01d,_0x3c3b32)=>(_0x20a0a1,_0x33cab1)=>_0x3c3b32(_0x20a0a1,_0x33cab1,_0x3dc01d);let C=class extends c['Disposable']{constructor(_0x9bd1b3,_0x50d5ea){const _0x5a22db=_0x57f153;super(),this['_threadCommentDataSourceService']=_0x9bd1b3,this[_0x5a22db(0xc2)]=_0x50d5ea,this['_initDataSource']();}[_0x57f153(0x8e)](){const _0x2ad3ab=_0x57f153;this[_0x2ad3ab(0x85)]['dataSource']=this[_0x2ad3ab(0xc2)],this['_threadCommentDataSourceService'][_0x2ad3ab(0xb3)]=!0x1;}};C=J([y(0x0,M[_0x57f153(0xab)]),y(0x1,c[_0x57f153(0x84)](g))],C);function _0xcc83(_0x5b400c,_0x33b677){const _0x5648a5=_0x5648();return _0xcc83=function(_0xcc838b,_0x7a968d){_0xcc838b=_0xcc838b-0x73;let _0x14359a=_0x5648a5[_0xcc838b];return _0x14359a;},_0xcc83(_0x5b400c,_0x33b677);}var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0xbf1604,_0x366523,_0x1b3279)=>_0x366523 in _0xbf1604?F(_0xbf1604,_0x366523,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1b3279}):_0xbf1604[_0x366523]=_0x1b3279,W=(_0x6db242,_0x70b166,_0x50103a,_0x5c03a3)=>{const _0x56a52b=_0x57f153;for(var _0x564a6f=_0x5c03a3>0x1?void 0x0:_0x5c03a3?L(_0x70b166,_0x50103a):_0x70b166,_0x3c5f80=_0x6db242[_0x56a52b(0x74)]-0x1,_0x290c3c;_0x3c5f80>=0x0;_0x3c5f80--)(_0x290c3c=_0x6db242[_0x3c5f80])&&(_0x564a6f=_0x290c3c(_0x564a6f)||_0x564a6f);return _0x564a6f;},O=(_0x3e4fa6,_0x421266)=>(_0x189863,_0x3b8ab5)=>_0x421266(_0x189863,_0x3b8ab5,_0x3e4fa6),N=(_0x53d15c,_0x57402d,_0x223778)=>Z(_0x53d15c,typeof _0x57402d!=_0x57f153(0x77)?_0x57402d+'':_0x57402d,_0x223778);exports[_0x57f153(0xc8)]=class extends c[_0x57f153(0x76)]{constructor(_0x13f657=D,_0x5d66b9,_0x1831e0){const _0x10fcd5=_0x57f153;super(),this['_config']=_0x13f657,this['_injector']=_0x5d66b9,this[_0x10fcd5(0xcc)]=_0x1831e0;const {..._0x2749d7}=c[_0x10fcd5(0x87)]({},D,this[_0x10fcd5(0xde)]);this['_configService']['setConfig'](q,_0x2749d7);}[_0x57f153(0xea)](){const _0xbfb8e0=_0x57f153;[[g],[C],[p]][_0xbfb8e0(0xbd)](_0x10595e=>{const _0x22a383=_0xbfb8e0;this[_0x22a383(0xa8)][_0x22a383(0xdc)](_0x10595e);});}[_0x57f153(0xbc)](){const _0x1d9151=_0x57f153;this[_0x1d9151(0xa8)][_0x1d9151(0x9b)](C),this['_injector'][_0x1d9151(0x9b)](p);}},N(exports[_0x57f153(0xc8)],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x57f153(0xd7),c[_0x57f153(0xd3)]['UNIVER_UNKNOWN']),exports[_0x57f153(0xc8)]=W([c[_0x57f153(0xa6)](j[_0x57f153(0xd2)],b[_0x57f153(0x7a)],T[_0x57f153(0xb0)]),O(0x1,c[_0x57f153(0x84)](c[_0x57f153(0xe9)])),O(0x2,c[_0x57f153(0xe2)])],exports[_0x57f153(0xc8)]);
1
+ 'use strict';const _0x501199=_0x137a;(function(_0x36a6f1,_0x36a669){const _0x26ee4c=_0x137a,_0x2f785a=_0x36a6f1();while(!![]){try{const _0x43e2ca=parseInt(_0x26ee4c(0x15e))/0x1+-parseInt(_0x26ee4c(0x164))/0x2*(parseInt(_0x26ee4c(0x182))/0x3)+parseInt(_0x26ee4c(0x15d))/0x4*(parseInt(_0x26ee4c(0x1a9))/0x5)+-parseInt(_0x26ee4c(0x1b5))/0x6*(parseInt(_0x26ee4c(0x192))/0x7)+parseInt(_0x26ee4c(0x1a6))/0x8+parseInt(_0x26ee4c(0x19b))/0x9*(parseInt(_0x26ee4c(0x16e))/0xa)+-parseInt(_0x26ee4c(0x14a))/0xb;if(_0x43e2ca===_0x36a669)break;else _0x2f785a['push'](_0x2f785a['shift']());}catch(_0x3883db){_0x2f785a['push'](_0x2f785a['shift']());}}}(_0x9275,0xcfccb));Object[_0x501199(0x16d)](exports,Symbol[_0x501199(0x1b8)],{'value':_0x501199(0x160)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5f118d=>(_0x5f118d[_0x5f118d['OpenOrReOpen']=0x0]=_0x501199(0x1bd),_0x5f118d[_0x5f118d['Solved']=0x1]=_0x501199(0x16a),_0x5f118d[_0x5f118d[_0x501199(0x1c4)]=-0x1]=_0x501199(0x1c4),_0x5f118d))(I||{}),v=(_0x1e6787=>(_0x1e6787[_0x1e6787['Unknown']=0x0]=_0x501199(0x191),_0x1e6787[_0x1e6787[_0x501199(0x1c3)]=0x1]='Add',_0x1e6787[_0x1e6787[_0x501199(0x171)]=0x2]=_0x501199(0x171),_0x1e6787[_0x1e6787[_0x501199(0x155)]=0x3]=_0x501199(0x155),_0x1e6787[_0x1e6787[_0x501199(0x172)]=0x4]=_0x501199(0x172),_0x1e6787[_0x1e6787['Solve']=0x5]=_0x501199(0x195),_0x1e6787[_0x1e6787['UNRECOGNIZED']=-0x1]=_0x501199(0x1c4),_0x1e6787))(v||{});const f=_0x5e0f60=>c[_0x501199(0x1a2)](new Date(+_0x5e0f60))[_0x501199(0x173)](_0x501199(0x185)),R=async(_0x2ca8a5,_0x14498f)=>{const _0x5dccac=_0x501199,_0x2d19f1=_0x2ca8a5['get'](c[_0x5dccac(0x1a7)]),_0x3a6a5a=_0x2ca8a5[_0x5dccac(0x157)](P['HTTPService']);_0x14498f['forEach'](_0x448649=>{const _0x9b4079=_0x5dccac;_0x2d19f1[_0x9b4079(0x1a5)](_0x448649)&&_0x14498f[_0x9b4079(0x15c)](_0x448649);}),_0x14498f[_0x5dccac(0x154)]&&(await _0x3a6a5a['get'](_0x5dccac(0x194),{'params':{'userIDs':[..._0x14498f]}}))['body'][_0x5dccac(0x153)]['forEach'](_0x42961a=>{_0x42961a&&_0x2d19f1['addUser'](_0x42961a);});};var $=Object[_0x501199(0x1c2)],E=(_0x3253d8,_0x17b51d,_0x8930a,_0x2be72e)=>{const _0x1440b3=_0x501199;for(var _0x4b282e=_0x2be72e>0x1?void 0x0:_0x2be72e?$(_0x17b51d,_0x8930a):_0x17b51d,_0x24bfe8=_0x3253d8[_0x1440b3(0x18d)]-0x1,_0xccdf08;_0x24bfe8>=0x0;_0x24bfe8--)(_0xccdf08=_0x3253d8[_0x24bfe8])&&(_0x4b282e=_0xccdf08(_0x4b282e)||_0x4b282e);return _0x4b282e;},S=(_0x2e4e66,_0x15793f)=>(_0x567cde,_0x5711b3)=>_0x15793f(_0x567cde,_0x5711b3,_0x2e4e66);let p=class extends c[_0x501199(0x198)]{constructor(_0x1ab0e2,_0x3259f9,_0x910ddf,_0xf66ea9){const _0x19923c=_0x501199;super(),this[_0x19923c(0x17c)]=_0x1ab0e2,this[_0x19923c(0x15b)]=_0x3259f9,this['_userService']=_0x910ddf,this[_0x19923c(0x16c)]=_0xf66ea9,this['_init'](),this[_0x19923c(0x180)]();}[_0x501199(0x180)](){const _0x2676a6=_0x501199;this[_0x2676a6(0x165)](this['_threadCommentModel'][_0x2676a6(0x15a)][_0x2676a6(0x190)](w[_0x2676a6(0x19a)](0x10))[_0x2676a6(0x1a3)](_0x2e1212=>{const _0x388dd1=new Set();_0x2e1212['forEach'](_0x5049da=>{const _0x38957b=_0x137a;switch(_0x5049da[_0x38957b(0x18b)]){case'add':{const _0xebf883=_0x5049da[_0x38957b(0x150)][_0x38957b(0x196)];_0x388dd1[_0x38957b(0x17b)](_0xebf883);break;}}}),R(this['_injector'],_0x388dd1);}));}[_0x501199(0x14b)](){const _0x2fec56=_0x501199;this[_0x2fec56(0x165)](this[_0x2fec56(0x17c)][_0x2fec56(0x15a)][_0x2fec56(0x1a3)](async _0x4210ca=>{const _0x358808=_0x2fec56;var _0x2fc802,_0x2ff477,_0x13d96c,_0x2e615b;const _0x51f280=(_0x2fc802=this[_0x358808(0x15b)]['getUnit'](_0x4210ca[_0x358808(0x170)])[_0x358808(0x159)](_0x9dfb8e=>_0x9dfb8e[_0x358808(0x1a0)]===_0x4210ca['threadId']))==null?void 0x0:_0x2fc802[_0x358808(0x1b2)];if(!_0x51f280)return;const {unitId:_0x1c14be,subUnitId:_0x39474b}=_0x51f280;switch(_0x4210ca[_0x358808(0x17e)]&&this['_userService']['addUser'](_0x4210ca['user']),_0x4210ca['type']){case v[_0x358808(0x1c3)]:break;case v[_0x358808(0x171)]:{this[_0x358808(0x15b)][_0x358808(0x161)](_0x1c14be,_0x39474b,{'unitId':_0x1c14be,'subUnitId':_0x39474b,'ref':'','id':_0x4210ca[_0x358808(0x1af)],'dT':f(+_0x4210ca[_0x358808(0x167)]),'threadId':_0x4210ca[_0x358808(0x1a0)],'personId':(_0x13d96c=(_0x2ff477=_0x4210ca['user'])==null?void 0x0:_0x2ff477[_0x358808(0x15f)])!=null?_0x13d96c:_0x4210ca[_0x358808(0x17f)],'text':JSON['parse'](_0x4210ca[_0x358808(0x163)]),'parentId':_0x51f280['id']});break;}case v[_0x358808(0x172)]:{const _0x2e579f=this[_0x358808(0x15b)][_0x358808(0x149)](_0x1c14be,_0x39474b,_0x4210ca[_0x358808(0x1af)]);_0x2e579f&&_0x2e579f[_0x358808(0x199)]&&this[_0x358808(0x15b)][_0x358808(0x189)](_0x1c14be,_0x39474b,_0x4210ca[_0x358808(0x1af)]);break;}case v['Edit']:{this[_0x358808(0x15b)][_0x358808(0x14d)](_0x1c14be,_0x39474b,{'commentId':_0x4210ca[_0x358808(0x1af)],'text':JSON['parse'](_0x4210ca[_0x358808(0x163)])});break;}case v['Solve']:{const _0x384091=(_0x2e615b=this[_0x358808(0x15b)][_0x358808(0x1b6)](_0x4210ca['unitId'])['find'](_0x288625=>_0x288625[_0x358808(0x1a0)]===_0x4210ca[_0x358808(0x1a0)]))==null?void 0x0:_0x2e615b[_0x358808(0x1b2)];_0x384091&&this[_0x358808(0x15b)][_0x358808(0x1a4)](_0x1c14be,_0x39474b,_0x384091['id'],_0x4210ca[_0x358808(0x156)]===I[_0x358808(0x16a)]);break;}}}));}};p=E([S(0x0,c[_0x501199(0x151)](b[_0x501199(0x16f)])),S(0x1,c[_0x501199(0x151)](M[_0x501199(0x179)])),S(0x2,c[_0x501199(0x151)](c['UserManagerService'])),S(0x3,c[_0x501199(0x151)](c[_0x501199(0x19f)]))],p);function _0x9275(){const _0x11d0a3=['DependentOn','getOwnPropertyDescriptor','Add','UNRECOGNIZED','body','getComment','14037892inptnW','_init','CollaborationSessionService','updateComment','getMemberID','_httpService','payload','Inject','reply','users','size','Edit','solved','get','thread-comment-data-source.config','find','commentUpdate$','_threadCommentModel','delete','199340ygHvoa','846221DluLMJ','userID','Module','addComment','saveCommentToSnapshot','content','7526fhuPXw','disposeWithMe','parse','createTimestamp','symbol','pluginName','Solved','_threadCommentDataSourceService','_injector','defineProperty','20fbIWZz','CommentService','unitId','Reply','Delete','format','setConfig','_sessionService','/list','IThreadCommentDataSourceService','comments','ThreadCommentModel','_threadCommentDataSource','add','_commentService','/add','user','userId','_initUserSync','error','1074TeIRLe','_configService','ref','YYYY/MM/DD\x20HH:mm','addUser','UniverCollaborationClientPlugin','replies','deleteComment','code','type','requireSession','length','dataSource','filter','pipe','Unknown','1414693padwPH','_initDataSource','/universer-api/user/list','Solve','personId','/solved','Disposable','parentId','bufferTime','1323819ImIYKv','forEach','post','rangeId','Injector','threadId','UNIVER_UNKNOWN','dayjs','subscribe','resolveComment','getUser','12736504fwQuEG','UserManagerService','IConfigService','115MCtloF','UniverLicensePlugin','COMMENT','UniverInstanceType','comment','/reply','replyId','map','merge','root','_userService','rangeType','12kEuNpZ','getUnit','/universer-api/comment/unit/','toStringTag','HTTPService','syncUpdateMutationToColla','onReady','customRanges','OpenOrReOpen','stringify','UniverThreadCommentDataSourcePlugin','_config'];_0x9275=function(){return _0x11d0a3;};return _0x9275();}const q=_0x501199(0x158),D={};var A=Object[_0x501199(0x1c2)],x=(_0x34b6fb,_0x2fbead,_0xf5b13d,_0x3fd10a)=>{const _0x2e5f2d=_0x501199;for(var _0x42635c=_0x3fd10a>0x1?void 0x0:_0x3fd10a?A(_0x2fbead,_0xf5b13d):_0x2fbead,_0x4c30c2=_0x34b6fb[_0x2e5f2d(0x18d)]-0x1,_0x353be6;_0x4c30c2>=0x0;_0x4c30c2--)(_0x353be6=_0x34b6fb[_0x4c30c2])&&(_0x42635c=_0x353be6(_0x42635c)||_0x42635c);return _0x42635c;},_=(_0x45f2ee,_0x536db8)=>(_0x38a9b5,_0x4cc90b)=>_0x536db8(_0x38a9b5,_0x4cc90b,_0x45f2ee);function _0x137a(_0xca4e88,_0x1bc16f){const _0x927513=_0x9275();return _0x137a=function(_0x137a7f,_0x49b096){_0x137a7f=_0x137a7f-0x148;let _0x11a738=_0x927513[_0x137a7f];return _0x11a738;},_0x137a(_0xca4e88,_0x1bc16f);}function Y(_0x14c0dd,_0x157e8e){const _0x4405ac=_0x501199,_0x1e7bb7=_0x14c0dd[_0x4405ac(0x188)][0x0];return{..._0x157e8e,'id':_0x1e7bb7[_0x4405ac(0x1af)],'resolved':_0x14c0dd['solved']===0x1,'dT':f(_0x1e7bb7['createTimestamp']),'personId':_0x1e7bb7[_0x4405ac(0x17f)],'threadId':_0x1e7bb7[_0x4405ac(0x1a0)]};}function G(_0x4fab12,_0x4820a3,_0x54789a){const _0x1c4e13=_0x501199;var _0x411fbf,_0x2f09fb;if(((_0x2f09fb=(_0x411fbf=_0x4fab12==null?void 0x0:_0x4fab12[_0x1c4e13(0x188)])==null?void 0x0:_0x411fbf[_0x1c4e13(0x18d)])!=null?_0x2f09fb:0x0)>0x0){const _0x5cc92b=(_0x4a28d5,_0x4d4f97)=>({'id':_0x4a28d5[_0x1c4e13(0x1af)],'threadId':_0x4a28d5[_0x1c4e13(0x1a0)],'dT':f(_0x4a28d5[_0x1c4e13(0x167)]),'personId':_0x4a28d5['userId'],'resolved':_0x4fab12[_0x1c4e13(0x156)]===I[_0x1c4e13(0x16a)],'unitId':_0x4820a3,'subUnitId':_0x54789a,'text':JSON[_0x1c4e13(0x166)](_0x4a28d5[_0x1c4e13(0x163)]),'parentId':_0x4d4f97}),_0x2898db=_0x5cc92b(_0x4fab12[_0x1c4e13(0x188)][0x0]);return{..._0x2898db,'children':_0x4fab12[_0x1c4e13(0x188)]['slice'](0x1)[_0x1c4e13(0x1b0)](_0x406573=>_0x5cc92b(_0x406573,_0x2898db['id']))};}return null;}let g=class{constructor(_0x4bd862,_0x21f673,_0x1f46ee,_0x4a23fc){const _0x300a91=_0x501199;this[_0x300a91(0x14f)]=_0x4bd862,this[_0x300a91(0x1b3)]=_0x21f673,this['_sessionService']=_0x1f46ee,this[_0x300a91(0x16c)]=_0x4a23fc;}async[_0x501199(0x161)](_0x2144c8){const _0x52b4a4=_0x501199;var _0x3b3b95,_0x4d703d;const {parentId:_0x3f5f29,unitId:_0x554baa,text:_0x1ed5d8,threadId:_0x268b3e}=_0x2144c8,_0x3c9c07=(_0x4d703d=(_0x3b3b95=_0x1ed5d8[_0x52b4a4(0x1bc)])==null?void 0x0:_0x3b3b95[_0x52b4a4(0x18f)](_0x19dc2b=>_0x19dc2b[_0x52b4a4(0x1b4)]===c['CustomRangeType'][_0x52b4a4(0x1ab)])[_0x52b4a4(0x1b0)](_0xd37570=>_0xd37570[_0x52b4a4(0x19e)]))!=null?_0x4d703d:[],_0x25db3e=JSON[_0x52b4a4(0x1be)](_0x1ed5d8),_0x23f792=(await this['_sessionService'][_0x52b4a4(0x18c)](_0x554baa))[_0x52b4a4(0x14e)]();if(_0x3f5f29){const _0x408f79={'memberId':_0x23f792,'unitId':_0x554baa,'content':_0x25db3e,'mention':_0x3c9c07,'threadId':_0x268b3e},_0x5e7072=(await this['_httpService'][_0x52b4a4(0x19d)]('/universer-api/comment/unit/'+_0x554baa+_0x52b4a4(0x1ae),{'body':_0x408f79}))[_0x52b4a4(0x148)][_0x52b4a4(0x152)];return{..._0x2144c8,'id':_0x5e7072['replyId'],'dT':c[_0x52b4a4(0x1a2)](+_0x5e7072[_0x52b4a4(0x167)])[_0x52b4a4(0x173)](_0x52b4a4(0x185)),'personId':_0x5e7072[_0x52b4a4(0x17f)]};}else{const _0x5d2c0e={'memberId':_0x23f792,'unitId':_0x554baa,'content':_0x25db3e,'mention':_0x3c9c07},_0xec7ae1=await this[_0x52b4a4(0x14f)][_0x52b4a4(0x19d)](_0x52b4a4(0x1b7)+_0x554baa+_0x52b4a4(0x17d),{'body':_0x5d2c0e});return Y(_0xec7ae1[_0x52b4a4(0x148)][_0x52b4a4(0x1ad)],_0x2144c8);}}async[_0x501199(0x14d)](_0x41b0b5){const _0x4dc009=_0x501199;var _0x732bf2,_0x2afcf6;const {text:_0xd5f98d,unitId:_0x501700}=_0x41b0b5,_0x2c94b8=(_0x2afcf6=(_0x732bf2=_0xd5f98d[_0x4dc009(0x1bc)])==null?void 0x0:_0x732bf2['filter'](_0x42e8c6=>_0x42e8c6[_0x4dc009(0x1b4)]===c['CustomRangeType'][_0x4dc009(0x1ab)])[_0x4dc009(0x1b0)](_0x440567=>_0x440567['rangeId']))!=null?_0x2afcf6:[],_0x1eda68=JSON['stringify'](_0xd5f98d),_0x591b4b=_0x41b0b5['threadId'],_0x150459=_0x41b0b5['id'],_0x399c07={'memberId':(await this[_0x4dc009(0x175)][_0x4dc009(0x18c)](_0x501700))['getMemberID'](),'unitId':_0x501700,'threadId':_0x591b4b,'mention':_0x2c94b8,'content':_0x1eda68,'replyId':_0x150459},_0x169f58=await this[_0x4dc009(0x14f)][_0x4dc009(0x19d)](_0x4dc009(0x1b7)+_0x501700+'/edit',{'body':_0x399c07});return!_0x169f58[_0x4dc009(0x148)][_0x4dc009(0x181)]||_0x169f58[_0x4dc009(0x148)][_0x4dc009(0x181)][_0x4dc009(0x18a)]===0x1;}async[_0x501199(0x1a4)](_0x528674){const _0x4ea599=_0x501199,{unitId:_0x14aef4}=_0x528674,_0x2bfdf8=_0x528674[_0x4ea599(0x1a0)],_0x4c9b25={'memberId':this[_0x4ea599(0x1b3)]['getCurrentUser']()[_0x4ea599(0x15f)],'unitId':_0x14aef4,'threadId':_0x2bfdf8,'solved':_0x528674['resolved']?I[_0x4ea599(0x16a)]:I[_0x4ea599(0x1bd)]},_0x5f4383=await this[_0x4ea599(0x14f)]['post'](_0x4ea599(0x1b7)+_0x14aef4+_0x4ea599(0x197),{'body':_0x4c9b25});return!_0x5f4383[_0x4ea599(0x148)][_0x4ea599(0x181)]||_0x5f4383[_0x4ea599(0x148)][_0x4ea599(0x181)][_0x4ea599(0x18a)]===0x1;}async[_0x501199(0x189)](_0x36ef42,_0x3a9e03,_0x224c0e,_0x1095f0){const _0x28e354=_0x501199,_0x394a08={'memberId':(await this['_sessionService'][_0x28e354(0x18c)](_0x36ef42))['getMemberID'](),'threadId':_0x224c0e,'replyId':_0x1095f0,'unitId':_0x36ef42},_0x9b00ab=await this[_0x28e354(0x14f)]['post']('/universer-api/comment/unit/'+_0x36ef42+'/delete',{'body':_0x394a08});return!_0x9b00ab['body']['error']||_0x9b00ab[_0x28e354(0x148)][_0x28e354(0x181)]['code']===0x1;}async['listComments'](_0x3b3d87,_0x5cb4ac,_0x1328ee){const _0x3822a0=_0x501199,_0x57ec1d={'unitId':_0x3b3d87,'threadId':_0x1328ee},_0x20238e=await this[_0x3822a0(0x14f)]['post'](_0x3822a0(0x1b7)+_0x3b3d87+_0x3822a0(0x176),{'body':_0x57ec1d}),_0xe4f853=_0x1328ee[_0x3822a0(0x1b0)](_0x1fffb0=>G(_0x20238e[_0x3822a0(0x148)][_0x3822a0(0x178)][_0x1fffb0],_0x3b3d87,_0x5cb4ac))[_0x3822a0(0x18f)](Boolean);return Object['values'](_0x20238e[_0x3822a0(0x148)][_0x3822a0(0x153)])[_0x3822a0(0x19c)](_0x2a82a8=>{const _0x520f61=_0x3822a0;this['_userService'][_0x520f61(0x186)](_0x2a82a8);}),_0xe4f853;}[_0x501199(0x162)](_0x1e4785){const _0x133ab1=_0x501199;return{'id':_0x1e4785['id'],'threadId':_0x1e4785['threadId'],'ref':_0x1e4785[_0x133ab1(0x184)]};}};g=x([_(0x0,c['Inject'](P[_0x501199(0x1b9)])),_(0x1,c[_0x501199(0x151)](c[_0x501199(0x1a7)])),_(0x2,c[_0x501199(0x151)](b[_0x501199(0x14c)])),_(0x3,c[_0x501199(0x151)](c['Injector']))],g);var H=Object[_0x501199(0x1c2)],J=(_0x2aeccc,_0x4c6e11,_0x4c3a05,_0x532e4b)=>{const _0x244ebd=_0x501199;for(var _0x256657=_0x532e4b>0x1?void 0x0:_0x532e4b?H(_0x4c6e11,_0x4c3a05):_0x4c6e11,_0x129c48=_0x2aeccc[_0x244ebd(0x18d)]-0x1,_0xa16a73;_0x129c48>=0x0;_0x129c48--)(_0xa16a73=_0x2aeccc[_0x129c48])&&(_0x256657=_0xa16a73(_0x256657)||_0x256657);return _0x256657;},y=(_0x53a951,_0x2f5215)=>(_0x4e94ed,_0x5e5d48)=>_0x2f5215(_0x4e94ed,_0x5e5d48,_0x53a951);let C=class extends c[_0x501199(0x198)]{constructor(_0x25b811,_0x47ea47){const _0x4c8e95=_0x501199;super(),this['_threadCommentDataSourceService']=_0x25b811,this[_0x4c8e95(0x17a)]=_0x47ea47,this['_initDataSource']();}[_0x501199(0x193)](){const _0x2da8c0=_0x501199;this[_0x2da8c0(0x16b)][_0x2da8c0(0x18e)]=this['_threadCommentDataSource'],this[_0x2da8c0(0x16b)][_0x2da8c0(0x1ba)]=!0x1;}};C=J([y(0x0,M[_0x501199(0x177)]),y(0x1,c[_0x501199(0x151)](g))],C);var F=Object['defineProperty'],L=Object[_0x501199(0x1c2)],Z=(_0x37152f,_0x5ccb18,_0x29716e)=>_0x5ccb18 in _0x37152f?F(_0x37152f,_0x5ccb18,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x29716e}):_0x37152f[_0x5ccb18]=_0x29716e,W=(_0x34ff8c,_0x1726fa,_0x48d3c1,_0x43c231)=>{const _0x55d4e4=_0x501199;for(var _0x505207=_0x43c231>0x1?void 0x0:_0x43c231?L(_0x1726fa,_0x48d3c1):_0x1726fa,_0x553b57=_0x34ff8c[_0x55d4e4(0x18d)]-0x1,_0x17d2a2;_0x553b57>=0x0;_0x553b57--)(_0x17d2a2=_0x34ff8c[_0x553b57])&&(_0x505207=_0x17d2a2(_0x505207)||_0x505207);return _0x505207;},O=(_0x15de8e,_0x40a296)=>(_0x523a83,_0x552d71)=>_0x40a296(_0x523a83,_0x552d71,_0x15de8e),N=(_0x4e8062,_0x471134,_0x536a94)=>Z(_0x4e8062,typeof _0x471134!=_0x501199(0x168)?_0x471134+'':_0x471134,_0x536a94);exports[_0x501199(0x1bf)]=class extends c['Plugin']{constructor(_0x54c9b8=D,_0x2fbc88,_0x1fdb86){const _0x4ff6e7=_0x501199;super(),this['_config']=_0x54c9b8,this[_0x4ff6e7(0x16c)]=_0x2fbc88,this['_configService']=_0x1fdb86;const {..._0x3d16c8}=c[_0x4ff6e7(0x1b1)]({},D,this[_0x4ff6e7(0x1c0)]);this[_0x4ff6e7(0x183)][_0x4ff6e7(0x174)](q,_0x3d16c8);}['onStarting'](){const _0x306672=_0x501199;[[g],[C],[p]][_0x306672(0x19c)](_0x165345=>{const _0x4a097a=_0x306672;this['_injector'][_0x4a097a(0x17b)](_0x165345);});}[_0x501199(0x1bb)](){const _0x20b12e=_0x501199;this[_0x20b12e(0x16c)][_0x20b12e(0x157)](C),this[_0x20b12e(0x16c)][_0x20b12e(0x157)](p);}},N(exports[_0x501199(0x1bf)],_0x501199(0x169),U),N(exports[_0x501199(0x1bf)],_0x501199(0x18b),c[_0x501199(0x1ac)][_0x501199(0x1a1)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x501199(0x1c1)](j['UniverThreadCommentUIPlugin'],b[_0x501199(0x187)],T[_0x501199(0x1aa)]),O(0x1,c[_0x501199(0x151)](c[_0x501199(0x19f)])),O(0x2,c[_0x501199(0x1a8)])],exports[_0x501199(0x1bf)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x46d2fa=_0x5ceb;(function(_0x3e207f,_0x1088b3){const _0x20bc28=_0x5ceb,_0x2ad90b=_0x3e207f();while(!![]){try{const _0x4f7ec6=parseInt(_0x20bc28(0x1b3))/0x1+-parseInt(_0x20bc28(0x1cf))/0x2*(parseInt(_0x20bc28(0x1a7))/0x3)+parseInt(_0x20bc28(0x1dc))/0x4+-parseInt(_0x20bc28(0x1ee))/0x5*(-parseInt(_0x20bc28(0x1dd))/0x6)+parseInt(_0x20bc28(0x1c2))/0x7+parseInt(_0x20bc28(0x1a5))/0x8+-parseInt(_0x20bc28(0x1bc))/0x9;if(_0x4f7ec6===_0x1088b3)break;else _0x2ad90b['push'](_0x2ad90b['shift']());}catch(_0xa203da){_0x2ad90b['push'](_0x2ad90b['shift']());}}}(_0x1e5d,0x7736f));function _0x1e5d(){const _0x433806=['_configService','_userService','get','syncUpdateMutationToColla','size','3514772okpvvZ','82590fhhIAW','unitId','updateComment','filter','_threadCommentDataSourceService','getMemberID','_config','/universer-api/comment/unit/','COMMENT','format','body','post','_threadCommentDataSource','find','reply','_injector','getOwnPropertyDescriptor','25szWgfg','_httpService','_init','length','_commentService','payload','slice','/edit','addUser','saveCommentToSnapshot','forEach','_initDataSource','Unknown','UNRECOGNIZED','YYYY/MM/DD\x20HH:mm','UNIVER_UNKNOWN','/universer-api/user/list','/reply','user','getUser','ref','addComment','threadId','resolveComment','2722592APMdOa','Solved','204921YrQnsk','_threadCommentModel','Delete','pluginName','/add','commentUpdate$','map','values','replies','symbol','listComments','/solved','874760iSDZds','subscribe','Edit','root','parse','content','code','customRanges','type','14619438axidjf','add','Solve','createTimestamp','userId','error','2041326qYVcry','userID','users','Add','rangeId','delete','rangeType','Reply','OpenOrReOpen','pipe','_initUserSync','solved','_sessionService','10pYfYFM','personId','replyId','dataSource','comment','setConfig','requireSession','getUnit'];_0x1e5d=function(){return _0x433806;};return _0x1e5d();}import{CommentService as _0x5421d4,CollaborationSessionService as _0x5af098,UniverCollaborationClientPlugin as _0x5405d4}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2412db}from'@univerjs-pro/license';import{dayjs as _0x149772,UserManagerService as _0x224c99,Inject as _0x50a740,Injector as _0x200e6d,Disposable as _0x27b1be,CustomRangeType as _0x14d9e1,UniverInstanceType as _0x11f02,DependentOn as _0x3b928,IConfigService as _0x5c76a5,Plugin as _0x521887,merge as _0x3abfd9}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x556e2d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2a8cea,IThreadCommentDataSourceService as _0x2b2d44}from'@univerjs/thread-comment';import{bufferTime as _0x16ab60}from'rxjs';import{HTTPService as _0x2e7ffa}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x490fa6=>(_0x490fa6[_0x490fa6[_0x46d2fa(0x1ca)]=0x0]=_0x46d2fa(0x1ca),_0x490fa6[_0x490fa6[_0x46d2fa(0x1a6)]=0x1]='Solved',_0x490fa6[_0x490fa6[_0x46d2fa(0x1fb)]=-0x1]='UNRECOGNIZED',_0x490fa6))(I||{}),v=(_0x9381d8=>(_0x9381d8[_0x9381d8[_0x46d2fa(0x1fa)]=0x0]=_0x46d2fa(0x1fa),_0x9381d8[_0x9381d8['Add']=0x1]=_0x46d2fa(0x1c5),_0x9381d8[_0x9381d8[_0x46d2fa(0x1c9)]=0x2]=_0x46d2fa(0x1c9),_0x9381d8[_0x9381d8[_0x46d2fa(0x1b5)]=0x3]='Edit',_0x9381d8[_0x9381d8[_0x46d2fa(0x1a9)]=0x4]=_0x46d2fa(0x1a9),_0x9381d8[_0x9381d8[_0x46d2fa(0x1be)]=0x5]=_0x46d2fa(0x1be),_0x9381d8[_0x9381d8['UNRECOGNIZED']=-0x1]=_0x46d2fa(0x1fb),_0x9381d8))(v||{});const D=_0x397342=>_0x149772(new Date(+_0x397342))[_0x46d2fa(0x1e6)](_0x46d2fa(0x1fc)),B=async(_0x146543,_0x344315)=>{const _0x22d546=_0x46d2fa,_0x4386e0=_0x146543[_0x22d546(0x1d9)](_0x224c99),_0x594bac=_0x146543[_0x22d546(0x1d9)](_0x2e7ffa);_0x344315[_0x22d546(0x1f8)](_0x56decc=>{const _0x2ddc44=_0x22d546;_0x4386e0[_0x2ddc44(0x1a0)](_0x56decc)&&_0x344315[_0x2ddc44(0x1c7)](_0x56decc);}),_0x344315[_0x22d546(0x1db)]&&(await _0x594bac[_0x22d546(0x1d9)](_0x22d546(0x1fe),{'params':{'userIDs':[..._0x344315]}}))[_0x22d546(0x1e7)]['users'][_0x22d546(0x1f8)](_0x532046=>{const _0x384f86=_0x22d546;_0x532046&&_0x4386e0[_0x384f86(0x1f6)](_0x532046);});};var K=Object[_0x46d2fa(0x1ed)],V=(_0x36fa27,_0x333002,_0x30718e,_0x5d7879)=>{const _0x496164=_0x46d2fa;for(var _0x1d566f=_0x5d7879>0x1?void 0x0:_0x5d7879?K(_0x333002,_0x30718e):_0x333002,_0x4fb6db=_0x36fa27[_0x496164(0x1f1)]-0x1,_0x4b1722;_0x4fb6db>=0x0;_0x4fb6db--)(_0x4b1722=_0x36fa27[_0x4fb6db])&&(_0x1d566f=_0x4b1722(_0x1d566f)||_0x1d566f);return _0x1d566f;},p=(_0x10e41d,_0x1c4127)=>(_0x4698d4,_0x5a95e5)=>_0x1c4127(_0x4698d4,_0x5a95e5,_0x10e41d);let S=class extends _0x27b1be{constructor(_0x2f0b7c,_0x429c17,_0x5af4de,_0x21977d){const _0x5f2de8=_0x46d2fa;super(),this[_0x5f2de8(0x1f2)]=_0x2f0b7c,this[_0x5f2de8(0x1a8)]=_0x429c17,this['_userService']=_0x5af4de,this[_0x5f2de8(0x1ec)]=_0x21977d,this[_0x5f2de8(0x1f0)](),this[_0x5f2de8(0x1cc)]();}['_initUserSync'](){const _0x5ed2ff=_0x46d2fa;this['disposeWithMe'](this['_threadCommentModel'][_0x5ed2ff(0x1ac)][_0x5ed2ff(0x1cb)](_0x16ab60(0x10))['subscribe'](_0x3aa191=>{const _0x5894bf=_0x5ed2ff,_0x36efd3=new Set();_0x3aa191[_0x5894bf(0x1f8)](_0x5527bb=>{const _0x38f8e9=_0x5894bf;switch(_0x5527bb[_0x38f8e9(0x1bb)]){case _0x38f8e9(0x1bd):{const _0x446eeb=_0x5527bb[_0x38f8e9(0x1f3)][_0x38f8e9(0x1d0)];_0x36efd3[_0x38f8e9(0x1bd)](_0x446eeb);break;}}}),B(this[_0x5894bf(0x1ec)],_0x36efd3);}));}[_0x46d2fa(0x1f0)](){const _0x4cbd7c=_0x46d2fa;this['disposeWithMe'](this[_0x4cbd7c(0x1f2)]['commentUpdate$'][_0x4cbd7c(0x1b4)](async _0x3a56fa=>{const _0x13d551=_0x4cbd7c;var _0x1ae10c,_0x27265e,_0x97c46c,_0xed3687;const _0x1e4f61=(_0x1ae10c=this['_threadCommentModel'][_0x13d551(0x1d6)](_0x3a56fa[_0x13d551(0x1de)])[_0x13d551(0x1ea)](_0x27cbf0=>_0x27cbf0['threadId']===_0x3a56fa[_0x13d551(0x1a3)]))==null?void 0x0:_0x1ae10c['root'];if(!_0x1e4f61)return;const {unitId:_0x4a5bea,subUnitId:_0x10fa98}=_0x1e4f61;switch(_0x3a56fa[_0x13d551(0x19f)]&&this[_0x13d551(0x1d8)]['addUser'](_0x3a56fa[_0x13d551(0x19f)]),_0x3a56fa[_0x13d551(0x1bb)]){case v['Add']:break;case v[_0x13d551(0x1c9)]:{this[_0x13d551(0x1a8)][_0x13d551(0x1a2)](_0x4a5bea,_0x10fa98,{'unitId':_0x4a5bea,'subUnitId':_0x10fa98,'ref':'','id':_0x3a56fa[_0x13d551(0x1d1)],'dT':D(+_0x3a56fa[_0x13d551(0x1bf)]),'threadId':_0x3a56fa[_0x13d551(0x1a3)],'personId':(_0x97c46c=(_0x27265e=_0x3a56fa[_0x13d551(0x19f)])==null?void 0x0:_0x27265e[_0x13d551(0x1c3)])!=null?_0x97c46c:_0x3a56fa[_0x13d551(0x1c0)],'text':JSON[_0x13d551(0x1b7)](_0x3a56fa[_0x13d551(0x1b8)]),'parentId':_0x1e4f61['id']});break;}case v[_0x13d551(0x1a9)]:{const _0x1ed07b=this[_0x13d551(0x1a8)]['getComment'](_0x4a5bea,_0x10fa98,_0x3a56fa[_0x13d551(0x1d1)]);_0x1ed07b&&_0x1ed07b['parentId']&&this[_0x13d551(0x1a8)]['deleteComment'](_0x4a5bea,_0x10fa98,_0x3a56fa[_0x13d551(0x1d1)]);break;}case v[_0x13d551(0x1b5)]:{this['_threadCommentModel'][_0x13d551(0x1df)](_0x4a5bea,_0x10fa98,{'commentId':_0x3a56fa[_0x13d551(0x1d1)],'text':JSON[_0x13d551(0x1b7)](_0x3a56fa[_0x13d551(0x1b8)])});break;}case v[_0x13d551(0x1be)]:{const _0x8fca65=(_0xed3687=this[_0x13d551(0x1a8)][_0x13d551(0x1d6)](_0x3a56fa['unitId'])['find'](_0x220b98=>_0x220b98['threadId']===_0x3a56fa['threadId']))==null?void 0x0:_0xed3687[_0x13d551(0x1b6)];_0x8fca65&&this['_threadCommentModel']['resolveComment'](_0x4a5bea,_0x10fa98,_0x8fca65['id'],_0x3a56fa[_0x13d551(0x1cd)]===I[_0x13d551(0x1a6)]);break;}}}));}};S=V([p(0x0,_0x50a740(_0x5421d4)),p(0x1,_0x50a740(_0x2a8cea)),p(0x2,_0x50a740(_0x224c99)),p(0x3,_0x50a740(_0x200e6d))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x46d2fa(0x1ed)],Q=(_0x4f89bd,_0x141376,_0x38a18b,_0x2eb133)=>{const _0x1ddc4a=_0x46d2fa;for(var _0x391ddb=_0x2eb133>0x1?void 0x0:_0x2eb133?k(_0x141376,_0x38a18b):_0x141376,_0x34e3f1=_0x4f89bd[_0x1ddc4a(0x1f1)]-0x1,_0x2a9f46;_0x34e3f1>=0x0;_0x34e3f1--)(_0x2a9f46=_0x4f89bd[_0x34e3f1])&&(_0x391ddb=_0x2a9f46(_0x391ddb)||_0x391ddb);return _0x391ddb;},_=(_0x1c2bd7,_0xfa69d2)=>(_0x4813b2,_0x13fba6)=>_0xfa69d2(_0x4813b2,_0x13fba6,_0x1c2bd7);function X(_0x17c8b5,_0x47c02d){const _0x5f1080=_0x46d2fa,_0x54b448=_0x17c8b5['replies'][0x0];return{..._0x47c02d,'id':_0x54b448['replyId'],'resolved':_0x17c8b5[_0x5f1080(0x1cd)]===0x1,'dT':D(_0x54b448['createTimestamp']),'personId':_0x54b448[_0x5f1080(0x1c0)],'threadId':_0x54b448[_0x5f1080(0x1a3)]};}function ee(_0x4c0bee,_0x252add,_0x58ee6f){const _0x1b8ed7=_0x46d2fa;var _0x4ab315,_0x1293cc;if(((_0x1293cc=(_0x4ab315=_0x4c0bee==null?void 0x0:_0x4c0bee[_0x1b8ed7(0x1af)])==null?void 0x0:_0x4ab315['length'])!=null?_0x1293cc:0x0)>0x0){const _0x4f71ac=(_0x3025af,_0x145a17)=>({'id':_0x3025af[_0x1b8ed7(0x1d1)],'threadId':_0x3025af[_0x1b8ed7(0x1a3)],'dT':D(_0x3025af[_0x1b8ed7(0x1bf)]),'personId':_0x3025af[_0x1b8ed7(0x1c0)],'resolved':_0x4c0bee[_0x1b8ed7(0x1cd)]===I['Solved'],'unitId':_0x252add,'subUnitId':_0x58ee6f,'text':JSON['parse'](_0x3025af[_0x1b8ed7(0x1b8)]),'parentId':_0x145a17}),_0x18b6ca=_0x4f71ac(_0x4c0bee[_0x1b8ed7(0x1af)][0x0]);return{..._0x18b6ca,'children':_0x4c0bee['replies'][_0x1b8ed7(0x1f4)](0x1)[_0x1b8ed7(0x1ad)](_0x481285=>_0x4f71ac(_0x481285,_0x18b6ca['id']))};}return null;}function _0x5ceb(_0x152dbf,_0x3be14c){const _0x1e5d4f=_0x1e5d();return _0x5ceb=function(_0x5cebb3,_0x3a6146){_0x5cebb3=_0x5cebb3-0x19e;let _0x4f2ea9=_0x1e5d4f[_0x5cebb3];return _0x4f2ea9;},_0x5ceb(_0x152dbf,_0x3be14c);}let f=class{constructor(_0x441fa2,_0x1c9584,_0x21332a,_0x39f9b1){const _0x24e37d=_0x46d2fa;this[_0x24e37d(0x1ef)]=_0x441fa2,this['_userService']=_0x1c9584,this[_0x24e37d(0x1ce)]=_0x21332a,this[_0x24e37d(0x1ec)]=_0x39f9b1;}async[_0x46d2fa(0x1a2)](_0x45f2d3){const _0x56ce23=_0x46d2fa;var _0xb42bc7,_0x49cf89;const {parentId:_0x572ad3,unitId:_0x30f1bc,text:_0x3f4341,threadId:_0x81102d}=_0x45f2d3,_0x750f37=(_0x49cf89=(_0xb42bc7=_0x3f4341[_0x56ce23(0x1ba)])==null?void 0x0:_0xb42bc7[_0x56ce23(0x1e0)](_0x1087eb=>_0x1087eb['rangeType']===_0x14d9e1[_0x56ce23(0x1e5)])[_0x56ce23(0x1ad)](_0x262499=>_0x262499[_0x56ce23(0x1c6)]))!=null?_0x49cf89:[],_0x36c45e=JSON['stringify'](_0x3f4341),_0x1ec53a=(await this[_0x56ce23(0x1ce)]['requireSession'](_0x30f1bc))[_0x56ce23(0x1e2)]();if(_0x572ad3){const _0x3eed3c={'memberId':_0x1ec53a,'unitId':_0x30f1bc,'content':_0x36c45e,'mention':_0x750f37,'threadId':_0x81102d},_0xe9eb9a=(await this[_0x56ce23(0x1ef)]['post'](_0x56ce23(0x1e4)+_0x30f1bc+_0x56ce23(0x19e),{'body':_0x3eed3c}))[_0x56ce23(0x1e7)][_0x56ce23(0x1eb)];return{..._0x45f2d3,'id':_0xe9eb9a[_0x56ce23(0x1d1)],'dT':_0x149772(+_0xe9eb9a[_0x56ce23(0x1bf)])[_0x56ce23(0x1e6)](_0x56ce23(0x1fc)),'personId':_0xe9eb9a[_0x56ce23(0x1c0)]};}else{const _0x59e0f4={'memberId':_0x1ec53a,'unitId':_0x30f1bc,'content':_0x36c45e,'mention':_0x750f37},_0x6494e9=await this['_httpService']['post'](_0x56ce23(0x1e4)+_0x30f1bc+_0x56ce23(0x1ab),{'body':_0x59e0f4});return X(_0x6494e9['body'][_0x56ce23(0x1d3)],_0x45f2d3);}}async[_0x46d2fa(0x1df)](_0x4402b5){const _0x18be6e=_0x46d2fa;var _0x121819,_0x2bf8f3;const {text:_0x1c0f36,unitId:_0x1b47ae}=_0x4402b5,_0x283aec=(_0x2bf8f3=(_0x121819=_0x1c0f36[_0x18be6e(0x1ba)])==null?void 0x0:_0x121819['filter'](_0x1a08dc=>_0x1a08dc[_0x18be6e(0x1c8)]===_0x14d9e1[_0x18be6e(0x1e5)])[_0x18be6e(0x1ad)](_0x50475e=>_0x50475e[_0x18be6e(0x1c6)]))!=null?_0x2bf8f3:[],_0x162ec6=JSON['stringify'](_0x1c0f36),_0x21f6bb=_0x4402b5[_0x18be6e(0x1a3)],_0x6848d7=_0x4402b5['id'],_0x47b15d={'memberId':(await this['_sessionService'][_0x18be6e(0x1d5)](_0x1b47ae))['getMemberID'](),'unitId':_0x1b47ae,'threadId':_0x21f6bb,'mention':_0x283aec,'content':_0x162ec6,'replyId':_0x6848d7},_0x16e733=await this[_0x18be6e(0x1ef)][_0x18be6e(0x1e8)]('/universer-api/comment/unit/'+_0x1b47ae+_0x18be6e(0x1f5),{'body':_0x47b15d});return!_0x16e733[_0x18be6e(0x1e7)]['error']||_0x16e733[_0x18be6e(0x1e7)]['error']['code']===0x1;}async[_0x46d2fa(0x1a4)](_0xac97a6){const _0xeca959=_0x46d2fa,{unitId:_0x359757}=_0xac97a6,_0x2e32be=_0xac97a6[_0xeca959(0x1a3)],_0x33c7be={'memberId':this['_userService']['getCurrentUser']()[_0xeca959(0x1c3)],'unitId':_0x359757,'threadId':_0x2e32be,'solved':_0xac97a6['resolved']?I[_0xeca959(0x1a6)]:I['OpenOrReOpen']},_0x144f01=await this[_0xeca959(0x1ef)][_0xeca959(0x1e8)]('/universer-api/comment/unit/'+_0x359757+_0xeca959(0x1b2),{'body':_0x33c7be});return!_0x144f01[_0xeca959(0x1e7)][_0xeca959(0x1c1)]||_0x144f01['body'][_0xeca959(0x1c1)]['code']===0x1;}async['deleteComment'](_0x3576cc,_0x5bf75f,_0x44000a,_0x33ee22){const _0x31f9f2=_0x46d2fa,_0x26ba08={'memberId':(await this['_sessionService'][_0x31f9f2(0x1d5)](_0x3576cc))[_0x31f9f2(0x1e2)](),'threadId':_0x44000a,'replyId':_0x33ee22,'unitId':_0x3576cc},_0x5203da=await this[_0x31f9f2(0x1ef)][_0x31f9f2(0x1e8)](_0x31f9f2(0x1e4)+_0x3576cc+'/delete',{'body':_0x26ba08});return!_0x5203da['body'][_0x31f9f2(0x1c1)]||_0x5203da[_0x31f9f2(0x1e7)][_0x31f9f2(0x1c1)][_0x31f9f2(0x1b9)]===0x1;}async[_0x46d2fa(0x1b1)](_0x44ae94,_0x2f5ecf,_0x3db479){const _0x4ae777=_0x46d2fa,_0x37eb8e={'unitId':_0x44ae94,'threadId':_0x3db479},_0x8bd8b3=await this[_0x4ae777(0x1ef)][_0x4ae777(0x1e8)](_0x4ae777(0x1e4)+_0x44ae94+'/list',{'body':_0x37eb8e}),_0x320987=_0x3db479['map'](_0x20743d=>ee(_0x8bd8b3['body']['comments'][_0x20743d],_0x44ae94,_0x2f5ecf))[_0x4ae777(0x1e0)](Boolean);return Object[_0x4ae777(0x1ae)](_0x8bd8b3[_0x4ae777(0x1e7)][_0x4ae777(0x1c4)])[_0x4ae777(0x1f8)](_0x1673e7=>{const _0x5dfb80=_0x4ae777;this[_0x5dfb80(0x1d8)]['addUser'](_0x1673e7);}),_0x320987;}[_0x46d2fa(0x1f7)](_0x1eb0cf){const _0x1f6079=_0x46d2fa;return{'id':_0x1eb0cf['id'],'threadId':_0x1eb0cf[_0x1f6079(0x1a3)],'ref':_0x1eb0cf[_0x1f6079(0x1a1)]};}};f=Q([_(0x0,_0x50a740(_0x2e7ffa)),_(0x1,_0x50a740(_0x224c99)),_(0x2,_0x50a740(_0x5af098)),_(0x3,_0x50a740(_0x200e6d))],f);var re=Object[_0x46d2fa(0x1ed)],te=(_0xd1f1d3,_0x5c5474,_0x4a8445,_0x41e9bd)=>{for(var _0x5e241c=_0x41e9bd>0x1?void 0x0:_0x41e9bd?re(_0x5c5474,_0x4a8445):_0x5c5474,_0x32ba60=_0xd1f1d3['length']-0x1,_0x1eeea8;_0x32ba60>=0x0;_0x32ba60--)(_0x1eeea8=_0xd1f1d3[_0x32ba60])&&(_0x5e241c=_0x1eeea8(_0x5e241c)||_0x5e241c);return _0x5e241c;},N=(_0x3f11dc,_0x5790b5)=>(_0x52e7bc,_0x360147)=>_0x5790b5(_0x52e7bc,_0x360147,_0x3f11dc);let g=class extends _0x27b1be{constructor(_0x1108ed,_0x215fc0){const _0x42e3d6=_0x46d2fa;super(),this['_threadCommentDataSourceService']=_0x1108ed,this[_0x42e3d6(0x1e9)]=_0x215fc0,this[_0x42e3d6(0x1f9)]();}[_0x46d2fa(0x1f9)](){const _0x9ab650=_0x46d2fa;this[_0x9ab650(0x1e1)][_0x9ab650(0x1d2)]=this[_0x9ab650(0x1e9)],this['_threadCommentDataSourceService'][_0x9ab650(0x1da)]=!0x1;}};g=te([N(0x0,_0x2b2d44),N(0x1,_0x50a740(f))],g);var se=Object['defineProperty'],oe=Object[_0x46d2fa(0x1ed)],ne=(_0x36c071,_0x3203f6,_0xf7b927)=>_0x3203f6 in _0x36c071?se(_0x36c071,_0x3203f6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf7b927}):_0x36c071[_0x3203f6]=_0xf7b927,ie=(_0x4a34fc,_0x4d8907,_0x559e60,_0x487031)=>{const _0x4b8652=_0x46d2fa;for(var _0x2c619d=_0x487031>0x1?void 0x0:_0x487031?oe(_0x4d8907,_0x559e60):_0x4d8907,_0x34e012=_0x4a34fc[_0x4b8652(0x1f1)]-0x1,_0x5a485b;_0x34e012>=0x0;_0x34e012--)(_0x5a485b=_0x4a34fc[_0x34e012])&&(_0x2c619d=_0x5a485b(_0x2c619d)||_0x2c619d);return _0x2c619d;},w=(_0xb45c13,_0x46ebc6)=>(_0x299847,_0x56551f)=>_0x46ebc6(_0x299847,_0x56551f,_0xb45c13),$=(_0x91929d,_0x211b51,_0x551f48)=>ne(_0x91929d,typeof _0x211b51!=_0x46d2fa(0x1b0)?_0x211b51+'':_0x211b51,_0x551f48);let b=class extends _0x521887{constructor(_0x40f057=M,_0x6e2c3a,_0x34b61f){const _0x2b5167=_0x46d2fa;super(),this[_0x2b5167(0x1e3)]=_0x40f057,this[_0x2b5167(0x1ec)]=_0x6e2c3a,this[_0x2b5167(0x1d7)]=_0x34b61f;const {..._0x525ed0}=_0x3abfd9({},M,this[_0x2b5167(0x1e3)]);this['_configService'][_0x2b5167(0x1d4)](z,_0x525ed0);}['onStarting'](){const _0x582b60=_0x46d2fa;[[f],[g],[S]][_0x582b60(0x1f8)](_0x45cfe7=>{const _0x233275=_0x582b60;this[_0x233275(0x1ec)]['add'](_0x45cfe7);});}['onReady'](){const _0x3c76e2=_0x46d2fa;this[_0x3c76e2(0x1ec)][_0x3c76e2(0x1d9)](g),this[_0x3c76e2(0x1ec)][_0x3c76e2(0x1d9)](S);}};$(b,_0x46d2fa(0x1aa),W),$(b,_0x46d2fa(0x1bb),_0x11f02[_0x46d2fa(0x1fd)]),b=ie([_0x3b928(_0x556e2d,_0x5405d4,_0x2412db),w(0x1,_0x50a740(_0x200e6d)),w(0x2,_0x5c76a5)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x12dc97=_0x1bc5;(function(_0x21e0c9,_0xb78217){const _0x4b0789=_0x1bc5,_0x3e8e66=_0x21e0c9();while(!![]){try{const _0x35f53c=parseInt(_0x4b0789(0x134))/0x1*(parseInt(_0x4b0789(0x142))/0x2)+parseInt(_0x4b0789(0x14b))/0x3*(parseInt(_0x4b0789(0x112))/0x4)+parseInt(_0x4b0789(0x10e))/0x5*(parseInt(_0x4b0789(0xfa))/0x6)+parseInt(_0x4b0789(0x108))/0x7*(parseInt(_0x4b0789(0x141))/0x8)+parseInt(_0x4b0789(0x140))/0x9+parseInt(_0x4b0789(0x11e))/0xa+-parseInt(_0x4b0789(0x103))/0xb;if(_0x35f53c===_0xb78217)break;else _0x3e8e66['push'](_0x3e8e66['shift']());}catch(_0x4b5e2a){_0x3e8e66['push'](_0x3e8e66['shift']());}}}(_0x430d,0x2cae5));import{CommentService as _0x26d6de,CollaborationSessionService as _0x289268,UniverCollaborationClientPlugin as _0x40d0cd}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1a9e0e}from'@univerjs-pro/license';import{dayjs as _0x3f2441,UserManagerService as _0x2bf58a,Inject as _0x4b87e2,Injector as _0x1f0779,Disposable as _0x19e379,CustomRangeType as _0x1f5b42,UniverInstanceType as _0x1dc825,DependentOn as _0x1af6a9,IConfigService as _0x359526,Plugin as _0x44e7f1,merge as _0x486a2a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x31f422}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x53e1fd,IThreadCommentDataSourceService as _0x245cbd}from'@univerjs/thread-comment';import{bufferTime as _0x24cc49}from'rxjs';import{HTTPService as _0x51d949}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3a750a=>(_0x3a750a[_0x3a750a[_0x12dc97(0x145)]=0x0]=_0x12dc97(0x145),_0x3a750a[_0x3a750a[_0x12dc97(0xf8)]=0x1]='Solved',_0x3a750a[_0x3a750a[_0x12dc97(0x13f)]=-0x1]='UNRECOGNIZED',_0x3a750a))(I||{}),v=(_0x414d9b=>(_0x414d9b[_0x414d9b[_0x12dc97(0x113)]=0x0]='Unknown',_0x414d9b[_0x414d9b[_0x12dc97(0x124)]=0x1]='Add',_0x414d9b[_0x414d9b['Reply']=0x2]=_0x12dc97(0x128),_0x414d9b[_0x414d9b[_0x12dc97(0x117)]=0x3]=_0x12dc97(0x117),_0x414d9b[_0x414d9b[_0x12dc97(0xe8)]=0x4]=_0x12dc97(0xe8),_0x414d9b[_0x414d9b[_0x12dc97(0x127)]=0x5]=_0x12dc97(0x127),_0x414d9b[_0x414d9b[_0x12dc97(0x13f)]=-0x1]=_0x12dc97(0x13f),_0x414d9b))(v||{});const D=_0x27e895=>_0x3f2441(new Date(+_0x27e895))[_0x12dc97(0x10b)](_0x12dc97(0xf9)),B=async(_0x58b841,_0x2da5f9)=>{const _0x2d2095=_0x12dc97,_0x5e3cb9=_0x58b841[_0x2d2095(0xf6)](_0x2bf58a),_0x54736e=_0x58b841['get'](_0x51d949);_0x2da5f9[_0x2d2095(0x13b)](_0x5b6471=>{const _0x14705b=_0x2d2095;_0x5e3cb9[_0x14705b(0x11c)](_0x5b6471)&&_0x2da5f9[_0x14705b(0x12c)](_0x5b6471);}),_0x2da5f9['size']&&(await _0x54736e[_0x2d2095(0xf6)](_0x2d2095(0x148),{'params':{'userIDs':[..._0x2da5f9]}}))[_0x2d2095(0xf1)][_0x2d2095(0xfe)][_0x2d2095(0x13b)](_0x125b92=>{const _0x4edf14=_0x2d2095;_0x125b92&&_0x5e3cb9[_0x4edf14(0x102)](_0x125b92);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x3ce21e,_0x1fd4b6,_0x1d763e,_0x10c07f)=>{const _0x1b0931=_0x12dc97;for(var _0x5131a3=_0x10c07f>0x1?void 0x0:_0x10c07f?K(_0x1fd4b6,_0x1d763e):_0x1fd4b6,_0x5eac7a=_0x3ce21e[_0x1b0931(0x110)]-0x1,_0x2680c7;_0x5eac7a>=0x0;_0x5eac7a--)(_0x2680c7=_0x3ce21e[_0x5eac7a])&&(_0x5131a3=_0x2680c7(_0x5131a3)||_0x5131a3);return _0x5131a3;},p=(_0x32bc87,_0x45f52f)=>(_0x17021e,_0x420734)=>_0x45f52f(_0x17021e,_0x420734,_0x32bc87);let S=class extends _0x19e379{constructor(_0x171470,_0x3112bf,_0x57358c,_0x3f34b3){const _0x51f7b9=_0x12dc97;super(),this['_commentService']=_0x171470,this[_0x51f7b9(0x147)]=_0x3112bf,this[_0x51f7b9(0x10c)]=_0x57358c,this[_0x51f7b9(0x138)]=_0x3f34b3,this['_init'](),this['_initUserSync']();}[_0x12dc97(0x133)](){const _0x1958da=_0x12dc97;this[_0x1958da(0xef)](this[_0x1958da(0x147)][_0x1958da(0xf5)][_0x1958da(0x131)](_0x24cc49(0x10))[_0x1958da(0x132)](_0x47f92b=>{const _0x18c78e=_0x1958da,_0x16770c=new Set();_0x47f92b['forEach'](_0x5f08fe=>{const _0x2abbb8=_0x1bc5;switch(_0x5f08fe[_0x2abbb8(0x135)]){case'add':{const _0x1dd540=_0x5f08fe[_0x2abbb8(0x146)]['personId'];_0x16770c[_0x2abbb8(0x10a)](_0x1dd540);break;}}}),B(this[_0x18c78e(0x138)],_0x16770c);}));}[_0x12dc97(0x101)](){const _0x29e66d=_0x12dc97;this[_0x29e66d(0xef)](this[_0x29e66d(0x130)]['commentUpdate$'][_0x29e66d(0x132)](async _0x2e6ad=>{const _0x413546=_0x29e66d;var _0x14cf0e,_0xe39692,_0x280a06,_0xeb7d0c;const _0x4bd80b=(_0x14cf0e=this['_threadCommentModel'][_0x413546(0xe7)](_0x2e6ad['unitId'])[_0x413546(0xf2)](_0x3865dd=>_0x3865dd['threadId']===_0x2e6ad[_0x413546(0xec)]))==null?void 0x0:_0x14cf0e[_0x413546(0x104)];if(!_0x4bd80b)return;const {unitId:_0x44d583,subUnitId:_0xf7c61c}=_0x4bd80b;switch(_0x2e6ad[_0x413546(0x120)]&&this['_userService'][_0x413546(0x102)](_0x2e6ad[_0x413546(0x120)]),_0x2e6ad[_0x413546(0x135)]){case v['Add']:break;case v['Reply']:{this[_0x413546(0x147)][_0x413546(0x13e)](_0x44d583,_0xf7c61c,{'unitId':_0x44d583,'subUnitId':_0xf7c61c,'ref':'','id':_0x2e6ad[_0x413546(0x10f)],'dT':D(+_0x2e6ad[_0x413546(0xfc)]),'threadId':_0x2e6ad[_0x413546(0xec)],'personId':(_0x280a06=(_0xe39692=_0x2e6ad[_0x413546(0x120)])==null?void 0x0:_0xe39692[_0x413546(0x126)])!=null?_0x280a06:_0x2e6ad[_0x413546(0x144)],'text':JSON['parse'](_0x2e6ad[_0x413546(0x139)]),'parentId':_0x4bd80b['id']});break;}case v['Delete']:{const _0x35e5fa=this[_0x413546(0x147)][_0x413546(0x11b)](_0x44d583,_0xf7c61c,_0x2e6ad['replyId']);_0x35e5fa&&_0x35e5fa['parentId']&&this[_0x413546(0x147)][_0x413546(0x12b)](_0x44d583,_0xf7c61c,_0x2e6ad[_0x413546(0x10f)]);break;}case v['Edit']:{this[_0x413546(0x147)][_0x413546(0x106)](_0x44d583,_0xf7c61c,{'commentId':_0x2e6ad[_0x413546(0x10f)],'text':JSON[_0x413546(0x13a)](_0x2e6ad[_0x413546(0x139)])});break;}case v['Solve']:{const _0xcbcec2=(_0xeb7d0c=this[_0x413546(0x147)]['getUnit'](_0x2e6ad[_0x413546(0x14a)])['find'](_0x1a73f8=>_0x1a73f8[_0x413546(0xec)]===_0x2e6ad[_0x413546(0xec)]))==null?void 0x0:_0xeb7d0c['root'];_0xcbcec2&&this[_0x413546(0x147)]['resolveComment'](_0x44d583,_0xf7c61c,_0xcbcec2['id'],_0x2e6ad[_0x413546(0x11a)]===I[_0x413546(0xf8)]);break;}}}));}};S=V([p(0x0,_0x4b87e2(_0x26d6de)),p(0x1,_0x4b87e2(_0x53e1fd)),p(0x2,_0x4b87e2(_0x2bf58a)),p(0x3,_0x4b87e2(_0x1f0779))],S);function _0x430d(){const _0x58e240=['61168qlWvQy','16AOrhaP','comment','userId','OpenOrReOpen','payload','_threadCommentModel','/universer-api/user/list','ref','unitId','69LMERwN','error','getUnit','Delete','reply','getMemberID','filter','threadId','/delete','stringify','disposeWithMe','getCurrentUser','body','find','post','_sessionService','commentUpdate$','get','_config','Solved','YYYY/MM/DD\x20HH:mm','7674iwblHh','resolveComment','createTimestamp','_configService','users','syncUpdateMutationToColla','dataSource','_init','addUser','6693522EODwxn','root','rangeId','updateComment','/solved','133LEtNuv','saveCommentToSnapshot','add','format','_userService','/edit','45bthNhX','replyId','length','/list','55676XYObVu','Unknown','comments','customRanges','getOwnPropertyDescriptor','Edit','rangeType','thread-comment-data-source.config','solved','getComment','getUser','replies','790950bcDQWk','map','user','UNIVER_UNKNOWN','/add','values','Add','COMMENT','userID','Solve','Reply','/universer-api/comment/unit/','_httpService','deleteComment','delete','code','/reply','_initDataSource','_commentService','pipe','subscribe','_initUserSync','23095CtMSSb','type','_threadCommentDataSourceService','requireSession','_injector','content','parse','forEach','setConfig','slice','addComment','UNRECOGNIZED','456642LHDjnG'];_0x430d=function(){return _0x58e240;};return _0x430d();}const z=_0x12dc97(0x119),M={};var k=Object[_0x12dc97(0x116)],Q=(_0x3cdc53,_0x2419d0,_0x1d369d,_0x32c511)=>{const _0x51f03f=_0x12dc97;for(var _0x3ec7cd=_0x32c511>0x1?void 0x0:_0x32c511?k(_0x2419d0,_0x1d369d):_0x2419d0,_0x2353c2=_0x3cdc53[_0x51f03f(0x110)]-0x1,_0x594330;_0x2353c2>=0x0;_0x2353c2--)(_0x594330=_0x3cdc53[_0x2353c2])&&(_0x3ec7cd=_0x594330(_0x3ec7cd)||_0x3ec7cd);return _0x3ec7cd;},_=(_0x1bb1f8,_0xb55261)=>(_0xf36bba,_0x1dec31)=>_0xb55261(_0xf36bba,_0x1dec31,_0x1bb1f8);function X(_0x5f457d,_0x50c699){const _0x533343=_0x12dc97,_0x229e7a=_0x5f457d[_0x533343(0x11d)][0x0];return{..._0x50c699,'id':_0x229e7a[_0x533343(0x10f)],'resolved':_0x5f457d[_0x533343(0x11a)]===0x1,'dT':D(_0x229e7a[_0x533343(0xfc)]),'personId':_0x229e7a['userId'],'threadId':_0x229e7a['threadId']};}function ee(_0xa8a2dd,_0x564d9e,_0x205136){const _0x4d5db2=_0x12dc97;var _0x5679b8,_0x5c42ef;if(((_0x5c42ef=(_0x5679b8=_0xa8a2dd==null?void 0x0:_0xa8a2dd[_0x4d5db2(0x11d)])==null?void 0x0:_0x5679b8['length'])!=null?_0x5c42ef:0x0)>0x0){const _0x4a20b8=(_0x5189f4,_0x498f8d)=>({'id':_0x5189f4[_0x4d5db2(0x10f)],'threadId':_0x5189f4[_0x4d5db2(0xec)],'dT':D(_0x5189f4[_0x4d5db2(0xfc)]),'personId':_0x5189f4[_0x4d5db2(0x144)],'resolved':_0xa8a2dd[_0x4d5db2(0x11a)]===I['Solved'],'unitId':_0x564d9e,'subUnitId':_0x205136,'text':JSON[_0x4d5db2(0x13a)](_0x5189f4[_0x4d5db2(0x139)]),'parentId':_0x498f8d}),_0xd03946=_0x4a20b8(_0xa8a2dd[_0x4d5db2(0x11d)][0x0]);return{..._0xd03946,'children':_0xa8a2dd[_0x4d5db2(0x11d)][_0x4d5db2(0x13d)](0x1)['map'](_0x22299a=>_0x4a20b8(_0x22299a,_0xd03946['id']))};}return null;}let f=class{constructor(_0x15583c,_0x46f078,_0x38a432,_0x532b82){const _0x398fc5=_0x12dc97;this[_0x398fc5(0x12a)]=_0x15583c,this[_0x398fc5(0x10c)]=_0x46f078,this['_sessionService']=_0x38a432,this[_0x398fc5(0x138)]=_0x532b82;}async[_0x12dc97(0x13e)](_0x2458a6){const _0x51e6e4=_0x12dc97;var _0x118a78,_0x50b952;const {parentId:_0x455a2f,unitId:_0x1a0de7,text:_0x3ca6c2,threadId:_0x50378d}=_0x2458a6,_0x559a62=(_0x50b952=(_0x118a78=_0x3ca6c2[_0x51e6e4(0x115)])==null?void 0x0:_0x118a78[_0x51e6e4(0xeb)](_0x5e9efe=>_0x5e9efe[_0x51e6e4(0x118)]===_0x1f5b42[_0x51e6e4(0x125)])[_0x51e6e4(0x11f)](_0x3eae8b=>_0x3eae8b[_0x51e6e4(0x105)]))!=null?_0x50b952:[],_0x74f276=JSON[_0x51e6e4(0xee)](_0x3ca6c2),_0x35b5d2=(await this[_0x51e6e4(0xf4)]['requireSession'](_0x1a0de7))[_0x51e6e4(0xea)]();if(_0x455a2f){const _0x3be33c={'memberId':_0x35b5d2,'unitId':_0x1a0de7,'content':_0x74f276,'mention':_0x559a62,'threadId':_0x50378d},_0x3b098f=(await this[_0x51e6e4(0x12a)][_0x51e6e4(0xf3)](_0x51e6e4(0x129)+_0x1a0de7+_0x51e6e4(0x12e),{'body':_0x3be33c}))[_0x51e6e4(0xf1)][_0x51e6e4(0xe9)];return{..._0x2458a6,'id':_0x3b098f[_0x51e6e4(0x10f)],'dT':_0x3f2441(+_0x3b098f[_0x51e6e4(0xfc)])[_0x51e6e4(0x10b)](_0x51e6e4(0xf9)),'personId':_0x3b098f['userId']};}else{const _0x3d30ae={'memberId':_0x35b5d2,'unitId':_0x1a0de7,'content':_0x74f276,'mention':_0x559a62},_0x1a33f9=await this[_0x51e6e4(0x12a)][_0x51e6e4(0xf3)](_0x51e6e4(0x129)+_0x1a0de7+_0x51e6e4(0x122),{'body':_0x3d30ae});return X(_0x1a33f9[_0x51e6e4(0xf1)][_0x51e6e4(0x143)],_0x2458a6);}}async[_0x12dc97(0x106)](_0x176260){const _0x40c137=_0x12dc97;var _0x2f11e7,_0x2960b5;const {text:_0x1ab132,unitId:_0xb70ca2}=_0x176260,_0x5876ab=(_0x2960b5=(_0x2f11e7=_0x1ab132['customRanges'])==null?void 0x0:_0x2f11e7[_0x40c137(0xeb)](_0x134a91=>_0x134a91[_0x40c137(0x118)]===_0x1f5b42[_0x40c137(0x125)])[_0x40c137(0x11f)](_0x4eb7d7=>_0x4eb7d7[_0x40c137(0x105)]))!=null?_0x2960b5:[],_0x19624b=JSON['stringify'](_0x1ab132),_0x6f9901=_0x176260['threadId'],_0x507486=_0x176260['id'],_0x40b8fb={'memberId':(await this['_sessionService'][_0x40c137(0x137)](_0xb70ca2))[_0x40c137(0xea)](),'unitId':_0xb70ca2,'threadId':_0x6f9901,'mention':_0x5876ab,'content':_0x19624b,'replyId':_0x507486},_0x5a2b8a=await this['_httpService'][_0x40c137(0xf3)]('/universer-api/comment/unit/'+_0xb70ca2+_0x40c137(0x10d),{'body':_0x40b8fb});return!_0x5a2b8a[_0x40c137(0xf1)]['error']||_0x5a2b8a['body'][_0x40c137(0xe6)][_0x40c137(0x12d)]===0x1;}async[_0x12dc97(0xfb)](_0x697e7a){const _0xc4aae2=_0x12dc97,{unitId:_0xb55d5e}=_0x697e7a,_0x2a97aa=_0x697e7a['threadId'],_0x97f607={'memberId':this[_0xc4aae2(0x10c)][_0xc4aae2(0xf0)]()[_0xc4aae2(0x126)],'unitId':_0xb55d5e,'threadId':_0x2a97aa,'solved':_0x697e7a['resolved']?I[_0xc4aae2(0xf8)]:I[_0xc4aae2(0x145)]},_0x138a35=await this['_httpService'][_0xc4aae2(0xf3)](_0xc4aae2(0x129)+_0xb55d5e+_0xc4aae2(0x107),{'body':_0x97f607});return!_0x138a35[_0xc4aae2(0xf1)][_0xc4aae2(0xe6)]||_0x138a35[_0xc4aae2(0xf1)][_0xc4aae2(0xe6)]['code']===0x1;}async[_0x12dc97(0x12b)](_0x47a60d,_0x234e46,_0x5aa25d,_0x553c97){const _0x284af2=_0x12dc97,_0x3b823c={'memberId':(await this[_0x284af2(0xf4)]['requireSession'](_0x47a60d))[_0x284af2(0xea)](),'threadId':_0x5aa25d,'replyId':_0x553c97,'unitId':_0x47a60d},_0xab68b0=await this[_0x284af2(0x12a)]['post'](_0x284af2(0x129)+_0x47a60d+_0x284af2(0xed),{'body':_0x3b823c});return!_0xab68b0[_0x284af2(0xf1)]['error']||_0xab68b0['body'][_0x284af2(0xe6)]['code']===0x1;}async['listComments'](_0x57fdf4,_0x893104,_0x652262){const _0x415ff7=_0x12dc97,_0x28ff76={'unitId':_0x57fdf4,'threadId':_0x652262},_0x33f5f4=await this[_0x415ff7(0x12a)][_0x415ff7(0xf3)](_0x415ff7(0x129)+_0x57fdf4+_0x415ff7(0x111),{'body':_0x28ff76}),_0x3fcc79=_0x652262[_0x415ff7(0x11f)](_0x59c5d2=>ee(_0x33f5f4[_0x415ff7(0xf1)][_0x415ff7(0x114)][_0x59c5d2],_0x57fdf4,_0x893104))[_0x415ff7(0xeb)](Boolean);return Object[_0x415ff7(0x123)](_0x33f5f4[_0x415ff7(0xf1)][_0x415ff7(0xfe)])['forEach'](_0x29d9b2=>{const _0x2226e0=_0x415ff7;this[_0x2226e0(0x10c)][_0x2226e0(0x102)](_0x29d9b2);}),_0x3fcc79;}[_0x12dc97(0x109)](_0x21b9e8){const _0x62f0fb=_0x12dc97;return{'id':_0x21b9e8['id'],'threadId':_0x21b9e8[_0x62f0fb(0xec)],'ref':_0x21b9e8[_0x62f0fb(0x149)]};}};f=Q([_(0x0,_0x4b87e2(_0x51d949)),_(0x1,_0x4b87e2(_0x2bf58a)),_(0x2,_0x4b87e2(_0x289268)),_(0x3,_0x4b87e2(_0x1f0779))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x15dc41,_0x33c558,_0x228c8c,_0x2d6a88)=>{const _0x5f3fd8=_0x12dc97;for(var _0x5adbfb=_0x2d6a88>0x1?void 0x0:_0x2d6a88?re(_0x33c558,_0x228c8c):_0x33c558,_0x3801fb=_0x15dc41[_0x5f3fd8(0x110)]-0x1,_0x295695;_0x3801fb>=0x0;_0x3801fb--)(_0x295695=_0x15dc41[_0x3801fb])&&(_0x5adbfb=_0x295695(_0x5adbfb)||_0x5adbfb);return _0x5adbfb;},N=(_0x16e8b6,_0x6926c8)=>(_0x5bdb47,_0x345bf7)=>_0x6926c8(_0x5bdb47,_0x345bf7,_0x16e8b6);let g=class extends _0x19e379{constructor(_0x13de5b,_0x4401d6){const _0x1317f9=_0x12dc97;super(),this[_0x1317f9(0x136)]=_0x13de5b,this['_threadCommentDataSource']=_0x4401d6,this[_0x1317f9(0x12f)]();}[_0x12dc97(0x12f)](){const _0x54d7ff=_0x12dc97;this[_0x54d7ff(0x136)][_0x54d7ff(0x100)]=this['_threadCommentDataSource'],this[_0x54d7ff(0x136)][_0x54d7ff(0xff)]=!0x1;}};g=te([N(0x0,_0x245cbd),N(0x1,_0x4b87e2(f))],g);function _0x1bc5(_0x3599da,_0x24e96e){const _0x430d10=_0x430d();return _0x1bc5=function(_0x1bc588,_0x44c62f){_0x1bc588=_0x1bc588-0xe6;let _0x57bd06=_0x430d10[_0x1bc588];return _0x57bd06;},_0x1bc5(_0x3599da,_0x24e96e);}var se=Object['defineProperty'],oe=Object[_0x12dc97(0x116)],ne=(_0x10a38a,_0x32bb98,_0x266df0)=>_0x32bb98 in _0x10a38a?se(_0x10a38a,_0x32bb98,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x266df0}):_0x10a38a[_0x32bb98]=_0x266df0,ie=(_0x283476,_0xa9d5c6,_0x1c36c3,_0x52cbc6)=>{for(var _0x574ddf=_0x52cbc6>0x1?void 0x0:_0x52cbc6?oe(_0xa9d5c6,_0x1c36c3):_0xa9d5c6,_0xe3e07=_0x283476['length']-0x1,_0x4635a1;_0xe3e07>=0x0;_0xe3e07--)(_0x4635a1=_0x283476[_0xe3e07])&&(_0x574ddf=_0x4635a1(_0x574ddf)||_0x574ddf);return _0x574ddf;},w=(_0x105342,_0x34cc49)=>(_0x124080,_0x7cf7f4)=>_0x34cc49(_0x124080,_0x7cf7f4,_0x105342),$=(_0x389833,_0x32a24d,_0x1370bc)=>ne(_0x389833,typeof _0x32a24d!='symbol'?_0x32a24d+'':_0x32a24d,_0x1370bc);let b=class extends _0x44e7f1{constructor(_0x343d69=M,_0x340bf3,_0x2a5d9b){const _0x58a938=_0x12dc97;super(),this['_config']=_0x343d69,this[_0x58a938(0x138)]=_0x340bf3,this[_0x58a938(0xfd)]=_0x2a5d9b;const {..._0x3edb9b}=_0x486a2a({},M,this[_0x58a938(0xf7)]);this[_0x58a938(0xfd)][_0x58a938(0x13c)](z,_0x3edb9b);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x5ce318=>{const _0x533932=_0x1bc5;this[_0x533932(0x138)][_0x533932(0x10a)](_0x5ce318);});}['onReady'](){const _0x459b9f=_0x12dc97;this[_0x459b9f(0x138)][_0x459b9f(0xf6)](g),this[_0x459b9f(0x138)][_0x459b9f(0xf6)](S);}};$(b,'pluginName',W),$(b,_0x12dc97(0x135),_0x1dc825[_0x12dc97(0x121)]),b=ie([_0x1af6a9(_0x31f422,_0x40d0cd,_0x1a9e0e),w(0x1,_0x4b87e2(_0x1f0779)),w(0x2,_0x359526)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x46d2fa=_0x5ceb;(function(_0x3e207f,_0x1088b3){const _0x20bc28=_0x5ceb,_0x2ad90b=_0x3e207f();while(!![]){try{const _0x4f7ec6=parseInt(_0x20bc28(0x1b3))/0x1+-parseInt(_0x20bc28(0x1cf))/0x2*(parseInt(_0x20bc28(0x1a7))/0x3)+parseInt(_0x20bc28(0x1dc))/0x4+-parseInt(_0x20bc28(0x1ee))/0x5*(-parseInt(_0x20bc28(0x1dd))/0x6)+parseInt(_0x20bc28(0x1c2))/0x7+parseInt(_0x20bc28(0x1a5))/0x8+-parseInt(_0x20bc28(0x1bc))/0x9;if(_0x4f7ec6===_0x1088b3)break;else _0x2ad90b['push'](_0x2ad90b['shift']());}catch(_0xa203da){_0x2ad90b['push'](_0x2ad90b['shift']());}}}(_0x1e5d,0x7736f));function _0x1e5d(){const _0x433806=['_configService','_userService','get','syncUpdateMutationToColla','size','3514772okpvvZ','82590fhhIAW','unitId','updateComment','filter','_threadCommentDataSourceService','getMemberID','_config','/universer-api/comment/unit/','COMMENT','format','body','post','_threadCommentDataSource','find','reply','_injector','getOwnPropertyDescriptor','25szWgfg','_httpService','_init','length','_commentService','payload','slice','/edit','addUser','saveCommentToSnapshot','forEach','_initDataSource','Unknown','UNRECOGNIZED','YYYY/MM/DD\x20HH:mm','UNIVER_UNKNOWN','/universer-api/user/list','/reply','user','getUser','ref','addComment','threadId','resolveComment','2722592APMdOa','Solved','204921YrQnsk','_threadCommentModel','Delete','pluginName','/add','commentUpdate$','map','values','replies','symbol','listComments','/solved','874760iSDZds','subscribe','Edit','root','parse','content','code','customRanges','type','14619438axidjf','add','Solve','createTimestamp','userId','error','2041326qYVcry','userID','users','Add','rangeId','delete','rangeType','Reply','OpenOrReOpen','pipe','_initUserSync','solved','_sessionService','10pYfYFM','personId','replyId','dataSource','comment','setConfig','requireSession','getUnit'];_0x1e5d=function(){return _0x433806;};return _0x1e5d();}import{CommentService as _0x5421d4,CollaborationSessionService as _0x5af098,UniverCollaborationClientPlugin as _0x5405d4}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2412db}from'@univerjs-pro/license';import{dayjs as _0x149772,UserManagerService as _0x224c99,Inject as _0x50a740,Injector as _0x200e6d,Disposable as _0x27b1be,CustomRangeType as _0x14d9e1,UniverInstanceType as _0x11f02,DependentOn as _0x3b928,IConfigService as _0x5c76a5,Plugin as _0x521887,merge as _0x3abfd9}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x556e2d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2a8cea,IThreadCommentDataSourceService as _0x2b2d44}from'@univerjs/thread-comment';import{bufferTime as _0x16ab60}from'rxjs';import{HTTPService as _0x2e7ffa}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x490fa6=>(_0x490fa6[_0x490fa6[_0x46d2fa(0x1ca)]=0x0]=_0x46d2fa(0x1ca),_0x490fa6[_0x490fa6[_0x46d2fa(0x1a6)]=0x1]='Solved',_0x490fa6[_0x490fa6[_0x46d2fa(0x1fb)]=-0x1]='UNRECOGNIZED',_0x490fa6))(I||{}),v=(_0x9381d8=>(_0x9381d8[_0x9381d8[_0x46d2fa(0x1fa)]=0x0]=_0x46d2fa(0x1fa),_0x9381d8[_0x9381d8['Add']=0x1]=_0x46d2fa(0x1c5),_0x9381d8[_0x9381d8[_0x46d2fa(0x1c9)]=0x2]=_0x46d2fa(0x1c9),_0x9381d8[_0x9381d8[_0x46d2fa(0x1b5)]=0x3]='Edit',_0x9381d8[_0x9381d8[_0x46d2fa(0x1a9)]=0x4]=_0x46d2fa(0x1a9),_0x9381d8[_0x9381d8[_0x46d2fa(0x1be)]=0x5]=_0x46d2fa(0x1be),_0x9381d8[_0x9381d8['UNRECOGNIZED']=-0x1]=_0x46d2fa(0x1fb),_0x9381d8))(v||{});const D=_0x397342=>_0x149772(new Date(+_0x397342))[_0x46d2fa(0x1e6)](_0x46d2fa(0x1fc)),B=async(_0x146543,_0x344315)=>{const _0x22d546=_0x46d2fa,_0x4386e0=_0x146543[_0x22d546(0x1d9)](_0x224c99),_0x594bac=_0x146543[_0x22d546(0x1d9)](_0x2e7ffa);_0x344315[_0x22d546(0x1f8)](_0x56decc=>{const _0x2ddc44=_0x22d546;_0x4386e0[_0x2ddc44(0x1a0)](_0x56decc)&&_0x344315[_0x2ddc44(0x1c7)](_0x56decc);}),_0x344315[_0x22d546(0x1db)]&&(await _0x594bac[_0x22d546(0x1d9)](_0x22d546(0x1fe),{'params':{'userIDs':[..._0x344315]}}))[_0x22d546(0x1e7)]['users'][_0x22d546(0x1f8)](_0x532046=>{const _0x384f86=_0x22d546;_0x532046&&_0x4386e0[_0x384f86(0x1f6)](_0x532046);});};var K=Object[_0x46d2fa(0x1ed)],V=(_0x36fa27,_0x333002,_0x30718e,_0x5d7879)=>{const _0x496164=_0x46d2fa;for(var _0x1d566f=_0x5d7879>0x1?void 0x0:_0x5d7879?K(_0x333002,_0x30718e):_0x333002,_0x4fb6db=_0x36fa27[_0x496164(0x1f1)]-0x1,_0x4b1722;_0x4fb6db>=0x0;_0x4fb6db--)(_0x4b1722=_0x36fa27[_0x4fb6db])&&(_0x1d566f=_0x4b1722(_0x1d566f)||_0x1d566f);return _0x1d566f;},p=(_0x10e41d,_0x1c4127)=>(_0x4698d4,_0x5a95e5)=>_0x1c4127(_0x4698d4,_0x5a95e5,_0x10e41d);let S=class extends _0x27b1be{constructor(_0x2f0b7c,_0x429c17,_0x5af4de,_0x21977d){const _0x5f2de8=_0x46d2fa;super(),this[_0x5f2de8(0x1f2)]=_0x2f0b7c,this[_0x5f2de8(0x1a8)]=_0x429c17,this['_userService']=_0x5af4de,this[_0x5f2de8(0x1ec)]=_0x21977d,this[_0x5f2de8(0x1f0)](),this[_0x5f2de8(0x1cc)]();}['_initUserSync'](){const _0x5ed2ff=_0x46d2fa;this['disposeWithMe'](this['_threadCommentModel'][_0x5ed2ff(0x1ac)][_0x5ed2ff(0x1cb)](_0x16ab60(0x10))['subscribe'](_0x3aa191=>{const _0x5894bf=_0x5ed2ff,_0x36efd3=new Set();_0x3aa191[_0x5894bf(0x1f8)](_0x5527bb=>{const _0x38f8e9=_0x5894bf;switch(_0x5527bb[_0x38f8e9(0x1bb)]){case _0x38f8e9(0x1bd):{const _0x446eeb=_0x5527bb[_0x38f8e9(0x1f3)][_0x38f8e9(0x1d0)];_0x36efd3[_0x38f8e9(0x1bd)](_0x446eeb);break;}}}),B(this[_0x5894bf(0x1ec)],_0x36efd3);}));}[_0x46d2fa(0x1f0)](){const _0x4cbd7c=_0x46d2fa;this['disposeWithMe'](this[_0x4cbd7c(0x1f2)]['commentUpdate$'][_0x4cbd7c(0x1b4)](async _0x3a56fa=>{const _0x13d551=_0x4cbd7c;var _0x1ae10c,_0x27265e,_0x97c46c,_0xed3687;const _0x1e4f61=(_0x1ae10c=this['_threadCommentModel'][_0x13d551(0x1d6)](_0x3a56fa[_0x13d551(0x1de)])[_0x13d551(0x1ea)](_0x27cbf0=>_0x27cbf0['threadId']===_0x3a56fa[_0x13d551(0x1a3)]))==null?void 0x0:_0x1ae10c['root'];if(!_0x1e4f61)return;const {unitId:_0x4a5bea,subUnitId:_0x10fa98}=_0x1e4f61;switch(_0x3a56fa[_0x13d551(0x19f)]&&this[_0x13d551(0x1d8)]['addUser'](_0x3a56fa[_0x13d551(0x19f)]),_0x3a56fa[_0x13d551(0x1bb)]){case v['Add']:break;case v[_0x13d551(0x1c9)]:{this[_0x13d551(0x1a8)][_0x13d551(0x1a2)](_0x4a5bea,_0x10fa98,{'unitId':_0x4a5bea,'subUnitId':_0x10fa98,'ref':'','id':_0x3a56fa[_0x13d551(0x1d1)],'dT':D(+_0x3a56fa[_0x13d551(0x1bf)]),'threadId':_0x3a56fa[_0x13d551(0x1a3)],'personId':(_0x97c46c=(_0x27265e=_0x3a56fa[_0x13d551(0x19f)])==null?void 0x0:_0x27265e[_0x13d551(0x1c3)])!=null?_0x97c46c:_0x3a56fa[_0x13d551(0x1c0)],'text':JSON[_0x13d551(0x1b7)](_0x3a56fa[_0x13d551(0x1b8)]),'parentId':_0x1e4f61['id']});break;}case v[_0x13d551(0x1a9)]:{const _0x1ed07b=this[_0x13d551(0x1a8)]['getComment'](_0x4a5bea,_0x10fa98,_0x3a56fa[_0x13d551(0x1d1)]);_0x1ed07b&&_0x1ed07b['parentId']&&this[_0x13d551(0x1a8)]['deleteComment'](_0x4a5bea,_0x10fa98,_0x3a56fa[_0x13d551(0x1d1)]);break;}case v[_0x13d551(0x1b5)]:{this['_threadCommentModel'][_0x13d551(0x1df)](_0x4a5bea,_0x10fa98,{'commentId':_0x3a56fa[_0x13d551(0x1d1)],'text':JSON[_0x13d551(0x1b7)](_0x3a56fa[_0x13d551(0x1b8)])});break;}case v[_0x13d551(0x1be)]:{const _0x8fca65=(_0xed3687=this[_0x13d551(0x1a8)][_0x13d551(0x1d6)](_0x3a56fa['unitId'])['find'](_0x220b98=>_0x220b98['threadId']===_0x3a56fa['threadId']))==null?void 0x0:_0xed3687[_0x13d551(0x1b6)];_0x8fca65&&this['_threadCommentModel']['resolveComment'](_0x4a5bea,_0x10fa98,_0x8fca65['id'],_0x3a56fa[_0x13d551(0x1cd)]===I[_0x13d551(0x1a6)]);break;}}}));}};S=V([p(0x0,_0x50a740(_0x5421d4)),p(0x1,_0x50a740(_0x2a8cea)),p(0x2,_0x50a740(_0x224c99)),p(0x3,_0x50a740(_0x200e6d))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x46d2fa(0x1ed)],Q=(_0x4f89bd,_0x141376,_0x38a18b,_0x2eb133)=>{const _0x1ddc4a=_0x46d2fa;for(var _0x391ddb=_0x2eb133>0x1?void 0x0:_0x2eb133?k(_0x141376,_0x38a18b):_0x141376,_0x34e3f1=_0x4f89bd[_0x1ddc4a(0x1f1)]-0x1,_0x2a9f46;_0x34e3f1>=0x0;_0x34e3f1--)(_0x2a9f46=_0x4f89bd[_0x34e3f1])&&(_0x391ddb=_0x2a9f46(_0x391ddb)||_0x391ddb);return _0x391ddb;},_=(_0x1c2bd7,_0xfa69d2)=>(_0x4813b2,_0x13fba6)=>_0xfa69d2(_0x4813b2,_0x13fba6,_0x1c2bd7);function X(_0x17c8b5,_0x47c02d){const _0x5f1080=_0x46d2fa,_0x54b448=_0x17c8b5['replies'][0x0];return{..._0x47c02d,'id':_0x54b448['replyId'],'resolved':_0x17c8b5[_0x5f1080(0x1cd)]===0x1,'dT':D(_0x54b448['createTimestamp']),'personId':_0x54b448[_0x5f1080(0x1c0)],'threadId':_0x54b448[_0x5f1080(0x1a3)]};}function ee(_0x4c0bee,_0x252add,_0x58ee6f){const _0x1b8ed7=_0x46d2fa;var _0x4ab315,_0x1293cc;if(((_0x1293cc=(_0x4ab315=_0x4c0bee==null?void 0x0:_0x4c0bee[_0x1b8ed7(0x1af)])==null?void 0x0:_0x4ab315['length'])!=null?_0x1293cc:0x0)>0x0){const _0x4f71ac=(_0x3025af,_0x145a17)=>({'id':_0x3025af[_0x1b8ed7(0x1d1)],'threadId':_0x3025af[_0x1b8ed7(0x1a3)],'dT':D(_0x3025af[_0x1b8ed7(0x1bf)]),'personId':_0x3025af[_0x1b8ed7(0x1c0)],'resolved':_0x4c0bee[_0x1b8ed7(0x1cd)]===I['Solved'],'unitId':_0x252add,'subUnitId':_0x58ee6f,'text':JSON['parse'](_0x3025af[_0x1b8ed7(0x1b8)]),'parentId':_0x145a17}),_0x18b6ca=_0x4f71ac(_0x4c0bee[_0x1b8ed7(0x1af)][0x0]);return{..._0x18b6ca,'children':_0x4c0bee['replies'][_0x1b8ed7(0x1f4)](0x1)[_0x1b8ed7(0x1ad)](_0x481285=>_0x4f71ac(_0x481285,_0x18b6ca['id']))};}return null;}function _0x5ceb(_0x152dbf,_0x3be14c){const _0x1e5d4f=_0x1e5d();return _0x5ceb=function(_0x5cebb3,_0x3a6146){_0x5cebb3=_0x5cebb3-0x19e;let _0x4f2ea9=_0x1e5d4f[_0x5cebb3];return _0x4f2ea9;},_0x5ceb(_0x152dbf,_0x3be14c);}let f=class{constructor(_0x441fa2,_0x1c9584,_0x21332a,_0x39f9b1){const _0x24e37d=_0x46d2fa;this[_0x24e37d(0x1ef)]=_0x441fa2,this['_userService']=_0x1c9584,this[_0x24e37d(0x1ce)]=_0x21332a,this[_0x24e37d(0x1ec)]=_0x39f9b1;}async[_0x46d2fa(0x1a2)](_0x45f2d3){const _0x56ce23=_0x46d2fa;var _0xb42bc7,_0x49cf89;const {parentId:_0x572ad3,unitId:_0x30f1bc,text:_0x3f4341,threadId:_0x81102d}=_0x45f2d3,_0x750f37=(_0x49cf89=(_0xb42bc7=_0x3f4341[_0x56ce23(0x1ba)])==null?void 0x0:_0xb42bc7[_0x56ce23(0x1e0)](_0x1087eb=>_0x1087eb['rangeType']===_0x14d9e1[_0x56ce23(0x1e5)])[_0x56ce23(0x1ad)](_0x262499=>_0x262499[_0x56ce23(0x1c6)]))!=null?_0x49cf89:[],_0x36c45e=JSON['stringify'](_0x3f4341),_0x1ec53a=(await this[_0x56ce23(0x1ce)]['requireSession'](_0x30f1bc))[_0x56ce23(0x1e2)]();if(_0x572ad3){const _0x3eed3c={'memberId':_0x1ec53a,'unitId':_0x30f1bc,'content':_0x36c45e,'mention':_0x750f37,'threadId':_0x81102d},_0xe9eb9a=(await this[_0x56ce23(0x1ef)]['post'](_0x56ce23(0x1e4)+_0x30f1bc+_0x56ce23(0x19e),{'body':_0x3eed3c}))[_0x56ce23(0x1e7)][_0x56ce23(0x1eb)];return{..._0x45f2d3,'id':_0xe9eb9a[_0x56ce23(0x1d1)],'dT':_0x149772(+_0xe9eb9a[_0x56ce23(0x1bf)])[_0x56ce23(0x1e6)](_0x56ce23(0x1fc)),'personId':_0xe9eb9a[_0x56ce23(0x1c0)]};}else{const _0x59e0f4={'memberId':_0x1ec53a,'unitId':_0x30f1bc,'content':_0x36c45e,'mention':_0x750f37},_0x6494e9=await this['_httpService']['post'](_0x56ce23(0x1e4)+_0x30f1bc+_0x56ce23(0x1ab),{'body':_0x59e0f4});return X(_0x6494e9['body'][_0x56ce23(0x1d3)],_0x45f2d3);}}async[_0x46d2fa(0x1df)](_0x4402b5){const _0x18be6e=_0x46d2fa;var _0x121819,_0x2bf8f3;const {text:_0x1c0f36,unitId:_0x1b47ae}=_0x4402b5,_0x283aec=(_0x2bf8f3=(_0x121819=_0x1c0f36[_0x18be6e(0x1ba)])==null?void 0x0:_0x121819['filter'](_0x1a08dc=>_0x1a08dc[_0x18be6e(0x1c8)]===_0x14d9e1[_0x18be6e(0x1e5)])[_0x18be6e(0x1ad)](_0x50475e=>_0x50475e[_0x18be6e(0x1c6)]))!=null?_0x2bf8f3:[],_0x162ec6=JSON['stringify'](_0x1c0f36),_0x21f6bb=_0x4402b5[_0x18be6e(0x1a3)],_0x6848d7=_0x4402b5['id'],_0x47b15d={'memberId':(await this['_sessionService'][_0x18be6e(0x1d5)](_0x1b47ae))['getMemberID'](),'unitId':_0x1b47ae,'threadId':_0x21f6bb,'mention':_0x283aec,'content':_0x162ec6,'replyId':_0x6848d7},_0x16e733=await this[_0x18be6e(0x1ef)][_0x18be6e(0x1e8)]('/universer-api/comment/unit/'+_0x1b47ae+_0x18be6e(0x1f5),{'body':_0x47b15d});return!_0x16e733[_0x18be6e(0x1e7)]['error']||_0x16e733[_0x18be6e(0x1e7)]['error']['code']===0x1;}async[_0x46d2fa(0x1a4)](_0xac97a6){const _0xeca959=_0x46d2fa,{unitId:_0x359757}=_0xac97a6,_0x2e32be=_0xac97a6[_0xeca959(0x1a3)],_0x33c7be={'memberId':this['_userService']['getCurrentUser']()[_0xeca959(0x1c3)],'unitId':_0x359757,'threadId':_0x2e32be,'solved':_0xac97a6['resolved']?I[_0xeca959(0x1a6)]:I['OpenOrReOpen']},_0x144f01=await this[_0xeca959(0x1ef)][_0xeca959(0x1e8)]('/universer-api/comment/unit/'+_0x359757+_0xeca959(0x1b2),{'body':_0x33c7be});return!_0x144f01[_0xeca959(0x1e7)][_0xeca959(0x1c1)]||_0x144f01['body'][_0xeca959(0x1c1)]['code']===0x1;}async['deleteComment'](_0x3576cc,_0x5bf75f,_0x44000a,_0x33ee22){const _0x31f9f2=_0x46d2fa,_0x26ba08={'memberId':(await this['_sessionService'][_0x31f9f2(0x1d5)](_0x3576cc))[_0x31f9f2(0x1e2)](),'threadId':_0x44000a,'replyId':_0x33ee22,'unitId':_0x3576cc},_0x5203da=await this[_0x31f9f2(0x1ef)][_0x31f9f2(0x1e8)](_0x31f9f2(0x1e4)+_0x3576cc+'/delete',{'body':_0x26ba08});return!_0x5203da['body'][_0x31f9f2(0x1c1)]||_0x5203da[_0x31f9f2(0x1e7)][_0x31f9f2(0x1c1)][_0x31f9f2(0x1b9)]===0x1;}async[_0x46d2fa(0x1b1)](_0x44ae94,_0x2f5ecf,_0x3db479){const _0x4ae777=_0x46d2fa,_0x37eb8e={'unitId':_0x44ae94,'threadId':_0x3db479},_0x8bd8b3=await this[_0x4ae777(0x1ef)][_0x4ae777(0x1e8)](_0x4ae777(0x1e4)+_0x44ae94+'/list',{'body':_0x37eb8e}),_0x320987=_0x3db479['map'](_0x20743d=>ee(_0x8bd8b3['body']['comments'][_0x20743d],_0x44ae94,_0x2f5ecf))[_0x4ae777(0x1e0)](Boolean);return Object[_0x4ae777(0x1ae)](_0x8bd8b3[_0x4ae777(0x1e7)][_0x4ae777(0x1c4)])[_0x4ae777(0x1f8)](_0x1673e7=>{const _0x5dfb80=_0x4ae777;this[_0x5dfb80(0x1d8)]['addUser'](_0x1673e7);}),_0x320987;}[_0x46d2fa(0x1f7)](_0x1eb0cf){const _0x1f6079=_0x46d2fa;return{'id':_0x1eb0cf['id'],'threadId':_0x1eb0cf[_0x1f6079(0x1a3)],'ref':_0x1eb0cf[_0x1f6079(0x1a1)]};}};f=Q([_(0x0,_0x50a740(_0x2e7ffa)),_(0x1,_0x50a740(_0x224c99)),_(0x2,_0x50a740(_0x5af098)),_(0x3,_0x50a740(_0x200e6d))],f);var re=Object[_0x46d2fa(0x1ed)],te=(_0xd1f1d3,_0x5c5474,_0x4a8445,_0x41e9bd)=>{for(var _0x5e241c=_0x41e9bd>0x1?void 0x0:_0x41e9bd?re(_0x5c5474,_0x4a8445):_0x5c5474,_0x32ba60=_0xd1f1d3['length']-0x1,_0x1eeea8;_0x32ba60>=0x0;_0x32ba60--)(_0x1eeea8=_0xd1f1d3[_0x32ba60])&&(_0x5e241c=_0x1eeea8(_0x5e241c)||_0x5e241c);return _0x5e241c;},N=(_0x3f11dc,_0x5790b5)=>(_0x52e7bc,_0x360147)=>_0x5790b5(_0x52e7bc,_0x360147,_0x3f11dc);let g=class extends _0x27b1be{constructor(_0x1108ed,_0x215fc0){const _0x42e3d6=_0x46d2fa;super(),this['_threadCommentDataSourceService']=_0x1108ed,this[_0x42e3d6(0x1e9)]=_0x215fc0,this[_0x42e3d6(0x1f9)]();}[_0x46d2fa(0x1f9)](){const _0x9ab650=_0x46d2fa;this[_0x9ab650(0x1e1)][_0x9ab650(0x1d2)]=this[_0x9ab650(0x1e9)],this['_threadCommentDataSourceService'][_0x9ab650(0x1da)]=!0x1;}};g=te([N(0x0,_0x2b2d44),N(0x1,_0x50a740(f))],g);var se=Object['defineProperty'],oe=Object[_0x46d2fa(0x1ed)],ne=(_0x36c071,_0x3203f6,_0xf7b927)=>_0x3203f6 in _0x36c071?se(_0x36c071,_0x3203f6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf7b927}):_0x36c071[_0x3203f6]=_0xf7b927,ie=(_0x4a34fc,_0x4d8907,_0x559e60,_0x487031)=>{const _0x4b8652=_0x46d2fa;for(var _0x2c619d=_0x487031>0x1?void 0x0:_0x487031?oe(_0x4d8907,_0x559e60):_0x4d8907,_0x34e012=_0x4a34fc[_0x4b8652(0x1f1)]-0x1,_0x5a485b;_0x34e012>=0x0;_0x34e012--)(_0x5a485b=_0x4a34fc[_0x34e012])&&(_0x2c619d=_0x5a485b(_0x2c619d)||_0x2c619d);return _0x2c619d;},w=(_0xb45c13,_0x46ebc6)=>(_0x299847,_0x56551f)=>_0x46ebc6(_0x299847,_0x56551f,_0xb45c13),$=(_0x91929d,_0x211b51,_0x551f48)=>ne(_0x91929d,typeof _0x211b51!=_0x46d2fa(0x1b0)?_0x211b51+'':_0x211b51,_0x551f48);let b=class extends _0x521887{constructor(_0x40f057=M,_0x6e2c3a,_0x34b61f){const _0x2b5167=_0x46d2fa;super(),this[_0x2b5167(0x1e3)]=_0x40f057,this[_0x2b5167(0x1ec)]=_0x6e2c3a,this[_0x2b5167(0x1d7)]=_0x34b61f;const {..._0x525ed0}=_0x3abfd9({},M,this[_0x2b5167(0x1e3)]);this['_configService'][_0x2b5167(0x1d4)](z,_0x525ed0);}['onStarting'](){const _0x582b60=_0x46d2fa;[[f],[g],[S]][_0x582b60(0x1f8)](_0x45cfe7=>{const _0x233275=_0x582b60;this[_0x233275(0x1ec)]['add'](_0x45cfe7);});}['onReady'](){const _0x3c76e2=_0x46d2fa;this[_0x3c76e2(0x1ec)][_0x3c76e2(0x1d9)](g),this[_0x3c76e2(0x1ec)][_0x3c76e2(0x1d9)](S);}};$(b,_0x46d2fa(0x1aa),W),$(b,_0x46d2fa(0x1bb),_0x11f02[_0x46d2fa(0x1fd)]),b=ie([_0x3b928(_0x556e2d,_0x5405d4,_0x2412db),w(0x1,_0x50a740(_0x200e6d)),w(0x2,_0x5c76a5)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x12dc97=_0x1bc5;(function(_0x21e0c9,_0xb78217){const _0x4b0789=_0x1bc5,_0x3e8e66=_0x21e0c9();while(!![]){try{const _0x35f53c=parseInt(_0x4b0789(0x134))/0x1*(parseInt(_0x4b0789(0x142))/0x2)+parseInt(_0x4b0789(0x14b))/0x3*(parseInt(_0x4b0789(0x112))/0x4)+parseInt(_0x4b0789(0x10e))/0x5*(parseInt(_0x4b0789(0xfa))/0x6)+parseInt(_0x4b0789(0x108))/0x7*(parseInt(_0x4b0789(0x141))/0x8)+parseInt(_0x4b0789(0x140))/0x9+parseInt(_0x4b0789(0x11e))/0xa+-parseInt(_0x4b0789(0x103))/0xb;if(_0x35f53c===_0xb78217)break;else _0x3e8e66['push'](_0x3e8e66['shift']());}catch(_0x4b5e2a){_0x3e8e66['push'](_0x3e8e66['shift']());}}}(_0x430d,0x2cae5));import{CommentService as _0x26d6de,CollaborationSessionService as _0x289268,UniverCollaborationClientPlugin as _0x40d0cd}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1a9e0e}from'@univerjs-pro/license';import{dayjs as _0x3f2441,UserManagerService as _0x2bf58a,Inject as _0x4b87e2,Injector as _0x1f0779,Disposable as _0x19e379,CustomRangeType as _0x1f5b42,UniverInstanceType as _0x1dc825,DependentOn as _0x1af6a9,IConfigService as _0x359526,Plugin as _0x44e7f1,merge as _0x486a2a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x31f422}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x53e1fd,IThreadCommentDataSourceService as _0x245cbd}from'@univerjs/thread-comment';import{bufferTime as _0x24cc49}from'rxjs';import{HTTPService as _0x51d949}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3a750a=>(_0x3a750a[_0x3a750a[_0x12dc97(0x145)]=0x0]=_0x12dc97(0x145),_0x3a750a[_0x3a750a[_0x12dc97(0xf8)]=0x1]='Solved',_0x3a750a[_0x3a750a[_0x12dc97(0x13f)]=-0x1]='UNRECOGNIZED',_0x3a750a))(I||{}),v=(_0x414d9b=>(_0x414d9b[_0x414d9b[_0x12dc97(0x113)]=0x0]='Unknown',_0x414d9b[_0x414d9b[_0x12dc97(0x124)]=0x1]='Add',_0x414d9b[_0x414d9b['Reply']=0x2]=_0x12dc97(0x128),_0x414d9b[_0x414d9b[_0x12dc97(0x117)]=0x3]=_0x12dc97(0x117),_0x414d9b[_0x414d9b[_0x12dc97(0xe8)]=0x4]=_0x12dc97(0xe8),_0x414d9b[_0x414d9b[_0x12dc97(0x127)]=0x5]=_0x12dc97(0x127),_0x414d9b[_0x414d9b[_0x12dc97(0x13f)]=-0x1]=_0x12dc97(0x13f),_0x414d9b))(v||{});const D=_0x27e895=>_0x3f2441(new Date(+_0x27e895))[_0x12dc97(0x10b)](_0x12dc97(0xf9)),B=async(_0x58b841,_0x2da5f9)=>{const _0x2d2095=_0x12dc97,_0x5e3cb9=_0x58b841[_0x2d2095(0xf6)](_0x2bf58a),_0x54736e=_0x58b841['get'](_0x51d949);_0x2da5f9[_0x2d2095(0x13b)](_0x5b6471=>{const _0x14705b=_0x2d2095;_0x5e3cb9[_0x14705b(0x11c)](_0x5b6471)&&_0x2da5f9[_0x14705b(0x12c)](_0x5b6471);}),_0x2da5f9['size']&&(await _0x54736e[_0x2d2095(0xf6)](_0x2d2095(0x148),{'params':{'userIDs':[..._0x2da5f9]}}))[_0x2d2095(0xf1)][_0x2d2095(0xfe)][_0x2d2095(0x13b)](_0x125b92=>{const _0x4edf14=_0x2d2095;_0x125b92&&_0x5e3cb9[_0x4edf14(0x102)](_0x125b92);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x3ce21e,_0x1fd4b6,_0x1d763e,_0x10c07f)=>{const _0x1b0931=_0x12dc97;for(var _0x5131a3=_0x10c07f>0x1?void 0x0:_0x10c07f?K(_0x1fd4b6,_0x1d763e):_0x1fd4b6,_0x5eac7a=_0x3ce21e[_0x1b0931(0x110)]-0x1,_0x2680c7;_0x5eac7a>=0x0;_0x5eac7a--)(_0x2680c7=_0x3ce21e[_0x5eac7a])&&(_0x5131a3=_0x2680c7(_0x5131a3)||_0x5131a3);return _0x5131a3;},p=(_0x32bc87,_0x45f52f)=>(_0x17021e,_0x420734)=>_0x45f52f(_0x17021e,_0x420734,_0x32bc87);let S=class extends _0x19e379{constructor(_0x171470,_0x3112bf,_0x57358c,_0x3f34b3){const _0x51f7b9=_0x12dc97;super(),this['_commentService']=_0x171470,this[_0x51f7b9(0x147)]=_0x3112bf,this[_0x51f7b9(0x10c)]=_0x57358c,this[_0x51f7b9(0x138)]=_0x3f34b3,this['_init'](),this['_initUserSync']();}[_0x12dc97(0x133)](){const _0x1958da=_0x12dc97;this[_0x1958da(0xef)](this[_0x1958da(0x147)][_0x1958da(0xf5)][_0x1958da(0x131)](_0x24cc49(0x10))[_0x1958da(0x132)](_0x47f92b=>{const _0x18c78e=_0x1958da,_0x16770c=new Set();_0x47f92b['forEach'](_0x5f08fe=>{const _0x2abbb8=_0x1bc5;switch(_0x5f08fe[_0x2abbb8(0x135)]){case'add':{const _0x1dd540=_0x5f08fe[_0x2abbb8(0x146)]['personId'];_0x16770c[_0x2abbb8(0x10a)](_0x1dd540);break;}}}),B(this[_0x18c78e(0x138)],_0x16770c);}));}[_0x12dc97(0x101)](){const _0x29e66d=_0x12dc97;this[_0x29e66d(0xef)](this[_0x29e66d(0x130)]['commentUpdate$'][_0x29e66d(0x132)](async _0x2e6ad=>{const _0x413546=_0x29e66d;var _0x14cf0e,_0xe39692,_0x280a06,_0xeb7d0c;const _0x4bd80b=(_0x14cf0e=this['_threadCommentModel'][_0x413546(0xe7)](_0x2e6ad['unitId'])[_0x413546(0xf2)](_0x3865dd=>_0x3865dd['threadId']===_0x2e6ad[_0x413546(0xec)]))==null?void 0x0:_0x14cf0e[_0x413546(0x104)];if(!_0x4bd80b)return;const {unitId:_0x44d583,subUnitId:_0xf7c61c}=_0x4bd80b;switch(_0x2e6ad[_0x413546(0x120)]&&this['_userService'][_0x413546(0x102)](_0x2e6ad[_0x413546(0x120)]),_0x2e6ad[_0x413546(0x135)]){case v['Add']:break;case v['Reply']:{this[_0x413546(0x147)][_0x413546(0x13e)](_0x44d583,_0xf7c61c,{'unitId':_0x44d583,'subUnitId':_0xf7c61c,'ref':'','id':_0x2e6ad[_0x413546(0x10f)],'dT':D(+_0x2e6ad[_0x413546(0xfc)]),'threadId':_0x2e6ad[_0x413546(0xec)],'personId':(_0x280a06=(_0xe39692=_0x2e6ad[_0x413546(0x120)])==null?void 0x0:_0xe39692[_0x413546(0x126)])!=null?_0x280a06:_0x2e6ad[_0x413546(0x144)],'text':JSON['parse'](_0x2e6ad[_0x413546(0x139)]),'parentId':_0x4bd80b['id']});break;}case v['Delete']:{const _0x35e5fa=this[_0x413546(0x147)][_0x413546(0x11b)](_0x44d583,_0xf7c61c,_0x2e6ad['replyId']);_0x35e5fa&&_0x35e5fa['parentId']&&this[_0x413546(0x147)][_0x413546(0x12b)](_0x44d583,_0xf7c61c,_0x2e6ad[_0x413546(0x10f)]);break;}case v['Edit']:{this[_0x413546(0x147)][_0x413546(0x106)](_0x44d583,_0xf7c61c,{'commentId':_0x2e6ad[_0x413546(0x10f)],'text':JSON[_0x413546(0x13a)](_0x2e6ad[_0x413546(0x139)])});break;}case v['Solve']:{const _0xcbcec2=(_0xeb7d0c=this[_0x413546(0x147)]['getUnit'](_0x2e6ad[_0x413546(0x14a)])['find'](_0x1a73f8=>_0x1a73f8[_0x413546(0xec)]===_0x2e6ad[_0x413546(0xec)]))==null?void 0x0:_0xeb7d0c['root'];_0xcbcec2&&this[_0x413546(0x147)]['resolveComment'](_0x44d583,_0xf7c61c,_0xcbcec2['id'],_0x2e6ad[_0x413546(0x11a)]===I[_0x413546(0xf8)]);break;}}}));}};S=V([p(0x0,_0x4b87e2(_0x26d6de)),p(0x1,_0x4b87e2(_0x53e1fd)),p(0x2,_0x4b87e2(_0x2bf58a)),p(0x3,_0x4b87e2(_0x1f0779))],S);function _0x430d(){const _0x58e240=['61168qlWvQy','16AOrhaP','comment','userId','OpenOrReOpen','payload','_threadCommentModel','/universer-api/user/list','ref','unitId','69LMERwN','error','getUnit','Delete','reply','getMemberID','filter','threadId','/delete','stringify','disposeWithMe','getCurrentUser','body','find','post','_sessionService','commentUpdate$','get','_config','Solved','YYYY/MM/DD\x20HH:mm','7674iwblHh','resolveComment','createTimestamp','_configService','users','syncUpdateMutationToColla','dataSource','_init','addUser','6693522EODwxn','root','rangeId','updateComment','/solved','133LEtNuv','saveCommentToSnapshot','add','format','_userService','/edit','45bthNhX','replyId','length','/list','55676XYObVu','Unknown','comments','customRanges','getOwnPropertyDescriptor','Edit','rangeType','thread-comment-data-source.config','solved','getComment','getUser','replies','790950bcDQWk','map','user','UNIVER_UNKNOWN','/add','values','Add','COMMENT','userID','Solve','Reply','/universer-api/comment/unit/','_httpService','deleteComment','delete','code','/reply','_initDataSource','_commentService','pipe','subscribe','_initUserSync','23095CtMSSb','type','_threadCommentDataSourceService','requireSession','_injector','content','parse','forEach','setConfig','slice','addComment','UNRECOGNIZED','456642LHDjnG'];_0x430d=function(){return _0x58e240;};return _0x430d();}const z=_0x12dc97(0x119),M={};var k=Object[_0x12dc97(0x116)],Q=(_0x3cdc53,_0x2419d0,_0x1d369d,_0x32c511)=>{const _0x51f03f=_0x12dc97;for(var _0x3ec7cd=_0x32c511>0x1?void 0x0:_0x32c511?k(_0x2419d0,_0x1d369d):_0x2419d0,_0x2353c2=_0x3cdc53[_0x51f03f(0x110)]-0x1,_0x594330;_0x2353c2>=0x0;_0x2353c2--)(_0x594330=_0x3cdc53[_0x2353c2])&&(_0x3ec7cd=_0x594330(_0x3ec7cd)||_0x3ec7cd);return _0x3ec7cd;},_=(_0x1bb1f8,_0xb55261)=>(_0xf36bba,_0x1dec31)=>_0xb55261(_0xf36bba,_0x1dec31,_0x1bb1f8);function X(_0x5f457d,_0x50c699){const _0x533343=_0x12dc97,_0x229e7a=_0x5f457d[_0x533343(0x11d)][0x0];return{..._0x50c699,'id':_0x229e7a[_0x533343(0x10f)],'resolved':_0x5f457d[_0x533343(0x11a)]===0x1,'dT':D(_0x229e7a[_0x533343(0xfc)]),'personId':_0x229e7a['userId'],'threadId':_0x229e7a['threadId']};}function ee(_0xa8a2dd,_0x564d9e,_0x205136){const _0x4d5db2=_0x12dc97;var _0x5679b8,_0x5c42ef;if(((_0x5c42ef=(_0x5679b8=_0xa8a2dd==null?void 0x0:_0xa8a2dd[_0x4d5db2(0x11d)])==null?void 0x0:_0x5679b8['length'])!=null?_0x5c42ef:0x0)>0x0){const _0x4a20b8=(_0x5189f4,_0x498f8d)=>({'id':_0x5189f4[_0x4d5db2(0x10f)],'threadId':_0x5189f4[_0x4d5db2(0xec)],'dT':D(_0x5189f4[_0x4d5db2(0xfc)]),'personId':_0x5189f4[_0x4d5db2(0x144)],'resolved':_0xa8a2dd[_0x4d5db2(0x11a)]===I['Solved'],'unitId':_0x564d9e,'subUnitId':_0x205136,'text':JSON[_0x4d5db2(0x13a)](_0x5189f4[_0x4d5db2(0x139)]),'parentId':_0x498f8d}),_0xd03946=_0x4a20b8(_0xa8a2dd[_0x4d5db2(0x11d)][0x0]);return{..._0xd03946,'children':_0xa8a2dd[_0x4d5db2(0x11d)][_0x4d5db2(0x13d)](0x1)['map'](_0x22299a=>_0x4a20b8(_0x22299a,_0xd03946['id']))};}return null;}let f=class{constructor(_0x15583c,_0x46f078,_0x38a432,_0x532b82){const _0x398fc5=_0x12dc97;this[_0x398fc5(0x12a)]=_0x15583c,this[_0x398fc5(0x10c)]=_0x46f078,this['_sessionService']=_0x38a432,this[_0x398fc5(0x138)]=_0x532b82;}async[_0x12dc97(0x13e)](_0x2458a6){const _0x51e6e4=_0x12dc97;var _0x118a78,_0x50b952;const {parentId:_0x455a2f,unitId:_0x1a0de7,text:_0x3ca6c2,threadId:_0x50378d}=_0x2458a6,_0x559a62=(_0x50b952=(_0x118a78=_0x3ca6c2[_0x51e6e4(0x115)])==null?void 0x0:_0x118a78[_0x51e6e4(0xeb)](_0x5e9efe=>_0x5e9efe[_0x51e6e4(0x118)]===_0x1f5b42[_0x51e6e4(0x125)])[_0x51e6e4(0x11f)](_0x3eae8b=>_0x3eae8b[_0x51e6e4(0x105)]))!=null?_0x50b952:[],_0x74f276=JSON[_0x51e6e4(0xee)](_0x3ca6c2),_0x35b5d2=(await this[_0x51e6e4(0xf4)]['requireSession'](_0x1a0de7))[_0x51e6e4(0xea)]();if(_0x455a2f){const _0x3be33c={'memberId':_0x35b5d2,'unitId':_0x1a0de7,'content':_0x74f276,'mention':_0x559a62,'threadId':_0x50378d},_0x3b098f=(await this[_0x51e6e4(0x12a)][_0x51e6e4(0xf3)](_0x51e6e4(0x129)+_0x1a0de7+_0x51e6e4(0x12e),{'body':_0x3be33c}))[_0x51e6e4(0xf1)][_0x51e6e4(0xe9)];return{..._0x2458a6,'id':_0x3b098f[_0x51e6e4(0x10f)],'dT':_0x3f2441(+_0x3b098f[_0x51e6e4(0xfc)])[_0x51e6e4(0x10b)](_0x51e6e4(0xf9)),'personId':_0x3b098f['userId']};}else{const _0x3d30ae={'memberId':_0x35b5d2,'unitId':_0x1a0de7,'content':_0x74f276,'mention':_0x559a62},_0x1a33f9=await this[_0x51e6e4(0x12a)][_0x51e6e4(0xf3)](_0x51e6e4(0x129)+_0x1a0de7+_0x51e6e4(0x122),{'body':_0x3d30ae});return X(_0x1a33f9[_0x51e6e4(0xf1)][_0x51e6e4(0x143)],_0x2458a6);}}async[_0x12dc97(0x106)](_0x176260){const _0x40c137=_0x12dc97;var _0x2f11e7,_0x2960b5;const {text:_0x1ab132,unitId:_0xb70ca2}=_0x176260,_0x5876ab=(_0x2960b5=(_0x2f11e7=_0x1ab132['customRanges'])==null?void 0x0:_0x2f11e7[_0x40c137(0xeb)](_0x134a91=>_0x134a91[_0x40c137(0x118)]===_0x1f5b42[_0x40c137(0x125)])[_0x40c137(0x11f)](_0x4eb7d7=>_0x4eb7d7[_0x40c137(0x105)]))!=null?_0x2960b5:[],_0x19624b=JSON['stringify'](_0x1ab132),_0x6f9901=_0x176260['threadId'],_0x507486=_0x176260['id'],_0x40b8fb={'memberId':(await this['_sessionService'][_0x40c137(0x137)](_0xb70ca2))[_0x40c137(0xea)](),'unitId':_0xb70ca2,'threadId':_0x6f9901,'mention':_0x5876ab,'content':_0x19624b,'replyId':_0x507486},_0x5a2b8a=await this['_httpService'][_0x40c137(0xf3)]('/universer-api/comment/unit/'+_0xb70ca2+_0x40c137(0x10d),{'body':_0x40b8fb});return!_0x5a2b8a[_0x40c137(0xf1)]['error']||_0x5a2b8a['body'][_0x40c137(0xe6)][_0x40c137(0x12d)]===0x1;}async[_0x12dc97(0xfb)](_0x697e7a){const _0xc4aae2=_0x12dc97,{unitId:_0xb55d5e}=_0x697e7a,_0x2a97aa=_0x697e7a['threadId'],_0x97f607={'memberId':this[_0xc4aae2(0x10c)][_0xc4aae2(0xf0)]()[_0xc4aae2(0x126)],'unitId':_0xb55d5e,'threadId':_0x2a97aa,'solved':_0x697e7a['resolved']?I[_0xc4aae2(0xf8)]:I[_0xc4aae2(0x145)]},_0x138a35=await this['_httpService'][_0xc4aae2(0xf3)](_0xc4aae2(0x129)+_0xb55d5e+_0xc4aae2(0x107),{'body':_0x97f607});return!_0x138a35[_0xc4aae2(0xf1)][_0xc4aae2(0xe6)]||_0x138a35[_0xc4aae2(0xf1)][_0xc4aae2(0xe6)]['code']===0x1;}async[_0x12dc97(0x12b)](_0x47a60d,_0x234e46,_0x5aa25d,_0x553c97){const _0x284af2=_0x12dc97,_0x3b823c={'memberId':(await this[_0x284af2(0xf4)]['requireSession'](_0x47a60d))[_0x284af2(0xea)](),'threadId':_0x5aa25d,'replyId':_0x553c97,'unitId':_0x47a60d},_0xab68b0=await this[_0x284af2(0x12a)]['post'](_0x284af2(0x129)+_0x47a60d+_0x284af2(0xed),{'body':_0x3b823c});return!_0xab68b0[_0x284af2(0xf1)]['error']||_0xab68b0['body'][_0x284af2(0xe6)]['code']===0x1;}async['listComments'](_0x57fdf4,_0x893104,_0x652262){const _0x415ff7=_0x12dc97,_0x28ff76={'unitId':_0x57fdf4,'threadId':_0x652262},_0x33f5f4=await this[_0x415ff7(0x12a)][_0x415ff7(0xf3)](_0x415ff7(0x129)+_0x57fdf4+_0x415ff7(0x111),{'body':_0x28ff76}),_0x3fcc79=_0x652262[_0x415ff7(0x11f)](_0x59c5d2=>ee(_0x33f5f4[_0x415ff7(0xf1)][_0x415ff7(0x114)][_0x59c5d2],_0x57fdf4,_0x893104))[_0x415ff7(0xeb)](Boolean);return Object[_0x415ff7(0x123)](_0x33f5f4[_0x415ff7(0xf1)][_0x415ff7(0xfe)])['forEach'](_0x29d9b2=>{const _0x2226e0=_0x415ff7;this[_0x2226e0(0x10c)][_0x2226e0(0x102)](_0x29d9b2);}),_0x3fcc79;}[_0x12dc97(0x109)](_0x21b9e8){const _0x62f0fb=_0x12dc97;return{'id':_0x21b9e8['id'],'threadId':_0x21b9e8[_0x62f0fb(0xec)],'ref':_0x21b9e8[_0x62f0fb(0x149)]};}};f=Q([_(0x0,_0x4b87e2(_0x51d949)),_(0x1,_0x4b87e2(_0x2bf58a)),_(0x2,_0x4b87e2(_0x289268)),_(0x3,_0x4b87e2(_0x1f0779))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x15dc41,_0x33c558,_0x228c8c,_0x2d6a88)=>{const _0x5f3fd8=_0x12dc97;for(var _0x5adbfb=_0x2d6a88>0x1?void 0x0:_0x2d6a88?re(_0x33c558,_0x228c8c):_0x33c558,_0x3801fb=_0x15dc41[_0x5f3fd8(0x110)]-0x1,_0x295695;_0x3801fb>=0x0;_0x3801fb--)(_0x295695=_0x15dc41[_0x3801fb])&&(_0x5adbfb=_0x295695(_0x5adbfb)||_0x5adbfb);return _0x5adbfb;},N=(_0x16e8b6,_0x6926c8)=>(_0x5bdb47,_0x345bf7)=>_0x6926c8(_0x5bdb47,_0x345bf7,_0x16e8b6);let g=class extends _0x19e379{constructor(_0x13de5b,_0x4401d6){const _0x1317f9=_0x12dc97;super(),this[_0x1317f9(0x136)]=_0x13de5b,this['_threadCommentDataSource']=_0x4401d6,this[_0x1317f9(0x12f)]();}[_0x12dc97(0x12f)](){const _0x54d7ff=_0x12dc97;this[_0x54d7ff(0x136)][_0x54d7ff(0x100)]=this['_threadCommentDataSource'],this[_0x54d7ff(0x136)][_0x54d7ff(0xff)]=!0x1;}};g=te([N(0x0,_0x245cbd),N(0x1,_0x4b87e2(f))],g);function _0x1bc5(_0x3599da,_0x24e96e){const _0x430d10=_0x430d();return _0x1bc5=function(_0x1bc588,_0x44c62f){_0x1bc588=_0x1bc588-0xe6;let _0x57bd06=_0x430d10[_0x1bc588];return _0x57bd06;},_0x1bc5(_0x3599da,_0x24e96e);}var se=Object['defineProperty'],oe=Object[_0x12dc97(0x116)],ne=(_0x10a38a,_0x32bb98,_0x266df0)=>_0x32bb98 in _0x10a38a?se(_0x10a38a,_0x32bb98,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x266df0}):_0x10a38a[_0x32bb98]=_0x266df0,ie=(_0x283476,_0xa9d5c6,_0x1c36c3,_0x52cbc6)=>{for(var _0x574ddf=_0x52cbc6>0x1?void 0x0:_0x52cbc6?oe(_0xa9d5c6,_0x1c36c3):_0xa9d5c6,_0xe3e07=_0x283476['length']-0x1,_0x4635a1;_0xe3e07>=0x0;_0xe3e07--)(_0x4635a1=_0x283476[_0xe3e07])&&(_0x574ddf=_0x4635a1(_0x574ddf)||_0x574ddf);return _0x574ddf;},w=(_0x105342,_0x34cc49)=>(_0x124080,_0x7cf7f4)=>_0x34cc49(_0x124080,_0x7cf7f4,_0x105342),$=(_0x389833,_0x32a24d,_0x1370bc)=>ne(_0x389833,typeof _0x32a24d!='symbol'?_0x32a24d+'':_0x32a24d,_0x1370bc);let b=class extends _0x44e7f1{constructor(_0x343d69=M,_0x340bf3,_0x2a5d9b){const _0x58a938=_0x12dc97;super(),this['_config']=_0x343d69,this[_0x58a938(0x138)]=_0x340bf3,this[_0x58a938(0xfd)]=_0x2a5d9b;const {..._0x3edb9b}=_0x486a2a({},M,this[_0x58a938(0xf7)]);this[_0x58a938(0xfd)][_0x58a938(0x13c)](z,_0x3edb9b);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x5ce318=>{const _0x533932=_0x1bc5;this[_0x533932(0x138)][_0x533932(0x10a)](_0x5ce318);});}['onReady'](){const _0x459b9f=_0x12dc97;this[_0x459b9f(0x138)][_0x459b9f(0xf6)](g),this[_0x459b9f(0x138)][_0x459b9f(0xf6)](S);}};$(b,'pluginName',W),$(b,_0x12dc97(0x135),_0x1dc825[_0x12dc97(0x121)]),b=ie([_0x1af6a9(_0x31f422,_0x40d0cd,_0x1a9e0e),w(0x1,_0x4b87e2(_0x1f0779)),w(0x2,_0x359526)],b);export{b as UniverThreadCommentDataSourcePlugin};
@@ -1,6 +1,6 @@
1
+ import { CommentService } from '@univerjs-pro/collaboration-client';
1
2
  import { Disposable, Injector, UserManagerService } from '@univerjs/core';
2
3
  import { ThreadCommentModel } from '@univerjs/thread-comment';
3
- import { CommentService } from '@univerjs-pro/collaboration-client';
4
4
  export declare class ThreadCommentCollaUpdateController extends Disposable {
5
5
  private readonly _commentService;
6
6
  private readonly _threadCommentModel;
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x1cb80c,_0x5c2e31){const _0x51ba81=_0x429b,_0x5c7e22=_0x1cb80c();while(!![]){try{const _0x177398=-parseInt(_0x51ba81(0xda))/0x1+parseInt(_0x51ba81(0xe4))/0x2*(-parseInt(_0x51ba81(0xc8))/0x3)+-parseInt(_0x51ba81(0xc5))/0x4*(parseInt(_0x51ba81(0x12c))/0x5)+-parseInt(_0x51ba81(0x107))/0x6+-parseInt(_0x51ba81(0x105))/0x7*(parseInt(_0x51ba81(0x113))/0x8)+parseInt(_0x51ba81(0x12a))/0x9+-parseInt(_0x51ba81(0xbf))/0xa*(-parseInt(_0x51ba81(0x112))/0xb);if(_0x177398===_0x5c2e31)break;else _0x5c7e22['push'](_0x5c7e22['shift']());}catch(_0x46ed41){_0x5c7e22['push'](_0x5c7e22['shift']());}}}(_0x1ce3,0x5bb6a),function(_0x314432,_0xaf26a9){const _0x1f0f23=_0x429b;typeof exports==_0x1f0f23(0xe0)&&typeof module<'u'?_0xaf26a9(exports,require('@univerjs-pro/collaboration-client'),require(_0x1f0f23(0xea)),require(_0x1f0f23(0xb5)),require('@univerjs/thread-comment-ui'),require(_0x1f0f23(0x101)),require(_0x1f0f23(0xbd)),require('@univerjs/network')):typeof define==_0x1f0f23(0xfd)&&define[_0x1f0f23(0xc6)]?define([_0x1f0f23(0xd1),_0x1f0f23(0xe6),_0x1f0f23(0xea),_0x1f0f23(0xb5),_0x1f0f23(0xb1),_0x1f0f23(0x101),_0x1f0f23(0xbd),'@univerjs/network'],_0xaf26a9):(_0x314432=typeof globalThis<'u'?globalThis:_0x314432||self,_0xaf26a9(_0x314432['UniverProThreadCommentDatasource']={},_0x314432[_0x1f0f23(0xc3)],_0x314432[_0x1f0f23(0xcb)],_0x314432[_0x1f0f23(0x119)],_0x314432['UniverThreadCommentUi'],_0x314432[_0x1f0f23(0xba)],_0x314432[_0x1f0f23(0xbd)],_0x314432[_0x1f0f23(0xf8)]));}(this,function(_0x58f319,_0xceb99c,_0x22e5e1,_0x199161,_0x59639f,_0x313bc5,_0x211293,_0x48082b){'use strict';const _0x4c01f8=_0x429b;const _0x54e18f=_0x4c01f8(0xb6);var _0x2a3227=(_0x585cdb=>(_0x585cdb[_0x585cdb[_0x4c01f8(0xe2)]=0x0]='OpenOrReOpen',_0x585cdb[_0x585cdb[_0x4c01f8(0xdd)]=0x1]=_0x4c01f8(0xdd),_0x585cdb[_0x585cdb['UNRECOGNIZED']=-0x1]=_0x4c01f8(0x12b),_0x585cdb))(_0x2a3227||{}),_0x333e78=(_0x34a3be=>(_0x34a3be[_0x34a3be[_0x4c01f8(0x11d)]=0x0]='Unknown',_0x34a3be[_0x34a3be[_0x4c01f8(0x12e)]=0x1]='Add',_0x34a3be[_0x34a3be[_0x4c01f8(0xf4)]=0x2]=_0x4c01f8(0xf4),_0x34a3be[_0x34a3be[_0x4c01f8(0xe8)]=0x3]=_0x4c01f8(0xe8),_0x34a3be[_0x34a3be[_0x4c01f8(0x108)]=0x4]='Delete',_0x34a3be[_0x34a3be[_0x4c01f8(0xeb)]=0x5]='Solve',_0x34a3be[_0x34a3be[_0x4c01f8(0x12b)]=-0x1]=_0x4c01f8(0x12b),_0x34a3be))(_0x333e78||{});const _0x2aa7db=_0x3f2573=>_0x199161[_0x4c01f8(0x121)](new Date(+_0x3f2573))[_0x4c01f8(0xd5)](_0x4c01f8(0xcf)),_0x38f609=async(_0x23aad4,_0xeb8a31)=>{const _0x12dcbb=_0x4c01f8,_0x4d0591=_0x23aad4['get'](_0x199161[_0x12dcbb(0xed)]),_0x418337=_0x23aad4[_0x12dcbb(0xb7)](_0x48082b[_0x12dcbb(0xf7)]);_0xeb8a31[_0x12dcbb(0xc0)](_0x413245=>{_0x4d0591['getUser'](_0x413245)&&_0xeb8a31['delete'](_0x413245);}),_0xeb8a31[_0x12dcbb(0xe5)]&&(await _0x418337['get'](_0x12dcbb(0xf5),{'params':{'userIDs':[..._0xeb8a31]}}))[_0x12dcbb(0xb0)][_0x12dcbb(0x11f)]['forEach'](_0x5f0623=>{const _0x4527bb=_0x12dcbb;_0x5f0623&&_0x4d0591[_0x4527bb(0xd0)](_0x5f0623);});};var _0x4f4744=Object[_0x4c01f8(0x11c)],_0x1116a4=(_0x3cfc81,_0x3d87ab,_0x5d2b15,_0x2452b7)=>{const _0x56c00d=_0x4c01f8;for(var _0x44d795=_0x2452b7>0x1?void 0x0:_0x2452b7?_0x4f4744(_0x3d87ab,_0x5d2b15):_0x3d87ab,_0x2e4c65=_0x3cfc81[_0x56c00d(0xfa)]-0x1,_0x19a87c;_0x2e4c65>=0x0;_0x2e4c65--)(_0x19a87c=_0x3cfc81[_0x2e4c65])&&(_0x44d795=_0x19a87c(_0x44d795)||_0x44d795);return _0x44d795;},_0x51f0b4=(_0x3bc8eb,_0x2fd6fa)=>(_0x2a458c,_0x41e4f3)=>_0x2fd6fa(_0x2a458c,_0x41e4f3,_0x3bc8eb);let _0x2f3ca1=class extends _0x199161[_0x4c01f8(0x11a)]{constructor(_0x58ecf5,_0x2ceac9,_0x534d78,_0x2016ff){const _0x24c7be=_0x4c01f8;super(),this[_0x24c7be(0xf9)]=_0x58ecf5,this[_0x24c7be(0x12d)]=_0x2ceac9,this[_0x24c7be(0xd4)]=_0x534d78,this[_0x24c7be(0x115)]=_0x2016ff,this[_0x24c7be(0x104)](),this['_initUserSync']();}[_0x4c01f8(0x133)](){const _0x45aa7e=_0x4c01f8;this[_0x45aa7e(0xca)](this[_0x45aa7e(0x12d)][_0x45aa7e(0x11b)]['pipe'](_0x211293[_0x45aa7e(0x10b)](0x10))[_0x45aa7e(0xde)](_0xa85d99=>{const _0x3dfc6e=_0x45aa7e,_0x2ee701=new Set();_0xa85d99['forEach'](_0x133fce=>{const _0xe3fe86=_0x429b;switch(_0x133fce[_0xe3fe86(0xd2)]){case _0xe3fe86(0xc7):{const _0x57235e=_0x133fce[_0xe3fe86(0xdc)][_0xe3fe86(0x111)];_0x2ee701[_0xe3fe86(0xc7)](_0x57235e);break;}}}),_0x38f609(this[_0x3dfc6e(0x115)],_0x2ee701);}));}['_init'](){const _0x1d8f5e=_0x4c01f8;this['disposeWithMe'](this[_0x1d8f5e(0xf9)][_0x1d8f5e(0x11b)][_0x1d8f5e(0xde)](async _0x4053c1=>{const _0x258181=_0x1d8f5e;var _0x4ef9b2,_0x5cf580,_0x5c5790,_0x4f62fe;const _0x516273=(_0x4ef9b2=this['_threadCommentModel'][_0x258181(0xff)](_0x4053c1[_0x258181(0xd6)])['find'](_0x72d03=>_0x72d03['threadId']===_0x4053c1['threadId']))==null?void 0x0:_0x4ef9b2[_0x258181(0xef)];if(!_0x516273)return;const {unitId:_0x55a99a,subUnitId:_0x3ed5a0}=_0x516273;switch(_0x4053c1['user']&&this[_0x258181(0xd4)]['addUser'](_0x4053c1['user']),_0x4053c1[_0x258181(0xd2)]){case _0x333e78['Add']:break;case _0x333e78[_0x258181(0xf4)]:{this[_0x258181(0x12d)]['addComment'](_0x55a99a,_0x3ed5a0,{'unitId':_0x55a99a,'subUnitId':_0x3ed5a0,'ref':'','id':_0x4053c1['replyId'],'dT':_0x2aa7db(+_0x4053c1[_0x258181(0xb8)]),'threadId':_0x4053c1[_0x258181(0x135)],'personId':(_0x5c5790=(_0x5cf580=_0x4053c1['user'])==null?void 0x0:_0x5cf580[_0x258181(0x109)])!=null?_0x5c5790:_0x4053c1[_0x258181(0x100)],'text':JSON[_0x258181(0xbc)](_0x4053c1[_0x258181(0xe1)]),'parentId':_0x516273['id']});break;}case _0x333e78[_0x258181(0x108)]:{const _0xb706a5=this[_0x258181(0x12d)][_0x258181(0x120)](_0x55a99a,_0x3ed5a0,_0x4053c1[_0x258181(0x136)]);_0xb706a5&&_0xb706a5[_0x258181(0xe9)]&&this[_0x258181(0x12d)][_0x258181(0x10d)](_0x55a99a,_0x3ed5a0,_0x4053c1[_0x258181(0x136)]);break;}case _0x333e78[_0x258181(0xe8)]:{this['_threadCommentModel']['updateComment'](_0x55a99a,_0x3ed5a0,{'commentId':_0x4053c1[_0x258181(0x136)],'text':JSON[_0x258181(0xbc)](_0x4053c1[_0x258181(0xe1)])});break;}case _0x333e78[_0x258181(0xeb)]:{const _0x15b143=(_0x4f62fe=this[_0x258181(0x12d)][_0x258181(0xff)](_0x4053c1[_0x258181(0xd6)])['find'](_0x5c5a2d=>_0x5c5a2d[_0x258181(0x135)]===_0x4053c1[_0x258181(0x135)]))==null?void 0x0:_0x4f62fe[_0x258181(0xef)];_0x15b143&&this[_0x258181(0x12d)][_0x258181(0xfb)](_0x55a99a,_0x3ed5a0,_0x15b143['id'],_0x4053c1[_0x258181(0x134)]===_0x2a3227[_0x258181(0xdd)]);break;}}}));}};_0x2f3ca1=_0x1116a4([_0x51f0b4(0x0,_0x199161[_0x4c01f8(0xc1)](_0xceb99c[_0x4c01f8(0xc9)])),_0x51f0b4(0x1,_0x199161[_0x4c01f8(0xc1)](_0x313bc5[_0x4c01f8(0x117)])),_0x51f0b4(0x2,_0x199161[_0x4c01f8(0xc1)](_0x199161[_0x4c01f8(0xed)])),_0x51f0b4(0x3,_0x199161['Inject'](_0x199161[_0x4c01f8(0x10a)]))],_0x2f3ca1);const _0x2eadfa=_0x4c01f8(0xf0),_0x369557={};var _0x46daeb=Object[_0x4c01f8(0x11c)],_0x47fbec=(_0x2fa22a,_0x1c1994,_0xdadf66,_0x21a397)=>{const _0x58665f=_0x4c01f8;for(var _0x6cab33=_0x21a397>0x1?void 0x0:_0x21a397?_0x46daeb(_0x1c1994,_0xdadf66):_0x1c1994,_0x43b24a=_0x2fa22a[_0x58665f(0xfa)]-0x1,_0x1a6475;_0x43b24a>=0x0;_0x43b24a--)(_0x1a6475=_0x2fa22a[_0x43b24a])&&(_0x6cab33=_0x1a6475(_0x6cab33)||_0x6cab33);return _0x6cab33;},_0x37d4ee=(_0x72fe35,_0x4144e7)=>(_0x8c00b7,_0xf01003)=>_0x4144e7(_0x8c00b7,_0xf01003,_0x72fe35);function _0x2839bd(_0x38ef2a,_0x2119d0){const _0x3afd10=_0x4c01f8,_0xfc37f3=_0x38ef2a[_0x3afd10(0xb9)][0x0];return{..._0x2119d0,'id':_0xfc37f3[_0x3afd10(0x136)],'resolved':_0x38ef2a[_0x3afd10(0x134)]===0x1,'dT':_0x2aa7db(_0xfc37f3[_0x3afd10(0xb8)]),'personId':_0xfc37f3[_0x3afd10(0x100)],'threadId':_0xfc37f3['threadId']};}function _0xbd643e(_0xa42924,_0x28d2d5,_0x3a7d42){const _0x3715ce=_0x4c01f8;var _0x1df0ce,_0x353ebf;if(((_0x353ebf=(_0x1df0ce=_0xa42924==null?void 0x0:_0xa42924[_0x3715ce(0xb9)])==null?void 0x0:_0x1df0ce['length'])!=null?_0x353ebf:0x0)>0x0){const _0x453921=(_0x549b6f,_0x404852)=>({'id':_0x549b6f[_0x3715ce(0x136)],'threadId':_0x549b6f[_0x3715ce(0x135)],'dT':_0x2aa7db(_0x549b6f[_0x3715ce(0xb8)]),'personId':_0x549b6f['userId'],'resolved':_0xa42924[_0x3715ce(0x134)]===_0x2a3227[_0x3715ce(0xdd)],'unitId':_0x28d2d5,'subUnitId':_0x3a7d42,'text':JSON[_0x3715ce(0xbc)](_0x549b6f[_0x3715ce(0xe1)]),'parentId':_0x404852}),_0x44cab1=_0x453921(_0xa42924['replies'][0x0]);return{..._0x44cab1,'children':_0xa42924[_0x3715ce(0xb9)]['slice'](0x1)['map'](_0x4d6b95=>_0x453921(_0x4d6b95,_0x44cab1['id']))};}return null;}let _0x18650a=class{constructor(_0x276355,_0x19f94b,_0x332b06,_0x351849){const _0x5c204b=_0x4c01f8;this[_0x5c204b(0x106)]=_0x276355,this[_0x5c204b(0xd4)]=_0x19f94b,this[_0x5c204b(0x102)]=_0x332b06,this[_0x5c204b(0x115)]=_0x351849;}async[_0x4c01f8(0xf1)](_0x1df1a3){const _0x38ee40=_0x4c01f8;var _0x3189db,_0x43d8dc;const {parentId:_0x34f732,unitId:_0xe4805f,text:_0x3711af,threadId:_0x14b467}=_0x1df1a3,_0x27a591=(_0x43d8dc=(_0x3189db=_0x3711af['customRanges'])==null?void 0x0:_0x3189db[_0x38ee40(0x123)](_0x469d52=>_0x469d52[_0x38ee40(0x10f)]===_0x199161[_0x38ee40(0xbe)][_0x38ee40(0x110)])['map'](_0x19550a=>_0x19550a[_0x38ee40(0xb2)]))!=null?_0x43d8dc:[],_0x1ccd43=JSON[_0x38ee40(0xd7)](_0x3711af),_0x4124da=(await this[_0x38ee40(0x102)][_0x38ee40(0xcd)](_0xe4805f))[_0x38ee40(0xf2)]();if(_0x34f732){const _0x519ba5={'memberId':_0x4124da,'unitId':_0xe4805f,'content':_0x1ccd43,'mention':_0x27a591,'threadId':_0x14b467},_0x480eff=(await this[_0x38ee40(0x106)][_0x38ee40(0x118)](_0x38ee40(0x131)+_0xe4805f+'/reply',{'body':_0x519ba5}))[_0x38ee40(0xb0)]['reply'];return{..._0x1df1a3,'id':_0x480eff[_0x38ee40(0x136)],'dT':_0x199161['dayjs'](+_0x480eff[_0x38ee40(0xb8)])['format'](_0x38ee40(0xcf)),'personId':_0x480eff['userId']};}else{const _0x3560d3={'memberId':_0x4124da,'unitId':_0xe4805f,'content':_0x1ccd43,'mention':_0x27a591},_0x56f1b6=await this[_0x38ee40(0x106)][_0x38ee40(0x118)]('/universer-api/comment/unit/'+_0xe4805f+'/add',{'body':_0x3560d3});return _0x2839bd(_0x56f1b6[_0x38ee40(0xb0)][_0x38ee40(0xd9)],_0x1df1a3);}}async[_0x4c01f8(0x116)](_0x41bc83){const _0x2f4563=_0x4c01f8;var _0x191102,_0x44ed37;const {text:_0x36b138,unitId:_0x3172aa}=_0x41bc83,_0x271ea4=(_0x44ed37=(_0x191102=_0x36b138[_0x2f4563(0xec)])==null?void 0x0:_0x191102[_0x2f4563(0x123)](_0x586267=>_0x586267[_0x2f4563(0x10f)]===_0x199161[_0x2f4563(0xbe)]['COMMENT'])[_0x2f4563(0xce)](_0x2935f3=>_0x2935f3[_0x2f4563(0xb2)]))!=null?_0x44ed37:[],_0x3e625e=JSON[_0x2f4563(0xd7)](_0x36b138),_0x3c78c6=_0x41bc83[_0x2f4563(0x135)],_0x12a629=_0x41bc83['id'],_0xef3f82={'memberId':(await this[_0x2f4563(0x102)][_0x2f4563(0xcd)](_0x3172aa))['getMemberID'](),'unitId':_0x3172aa,'threadId':_0x3c78c6,'mention':_0x271ea4,'content':_0x3e625e,'replyId':_0x12a629},_0x128d2c=await this[_0x2f4563(0x106)][_0x2f4563(0x118)](_0x2f4563(0x131)+_0x3172aa+'/edit',{'body':_0xef3f82});return!_0x128d2c[_0x2f4563(0xb0)][_0x2f4563(0xdb)]||_0x128d2c['body'][_0x2f4563(0xdb)][_0x2f4563(0x12f)]===0x1;}async['resolveComment'](_0x3c65e7){const _0x4e1bc0=_0x4c01f8,{unitId:_0x51226a}=_0x3c65e7,_0x133065=_0x3c65e7['threadId'],_0x3c84a6={'memberId':this['_userService'][_0x4e1bc0(0x114)]()[_0x4e1bc0(0x109)],'unitId':_0x51226a,'threadId':_0x133065,'solved':_0x3c65e7[_0x4e1bc0(0x11e)]?_0x2a3227[_0x4e1bc0(0xdd)]:_0x2a3227['OpenOrReOpen']},_0x42c4a6=await this[_0x4e1bc0(0x106)]['post'](_0x4e1bc0(0x131)+_0x51226a+'/solved',{'body':_0x3c84a6});return!_0x42c4a6[_0x4e1bc0(0xb0)][_0x4e1bc0(0xdb)]||_0x42c4a6[_0x4e1bc0(0xb0)][_0x4e1bc0(0xdb)][_0x4e1bc0(0x12f)]===0x1;}async[_0x4c01f8(0x10d)](_0x32e183,_0x2dcad2,_0x1670e4,_0x1402bd){const _0x4469dc=_0x4c01f8,_0x5697c3={'memberId':(await this[_0x4469dc(0x102)][_0x4469dc(0xcd)](_0x32e183))['getMemberID'](),'threadId':_0x1670e4,'replyId':_0x1402bd,'unitId':_0x32e183},_0x13eb8a=await this['_httpService'][_0x4469dc(0x118)](_0x4469dc(0x131)+_0x32e183+_0x4469dc(0xb4),{'body':_0x5697c3});return!_0x13eb8a['body'][_0x4469dc(0xdb)]||_0x13eb8a[_0x4469dc(0xb0)][_0x4469dc(0xdb)][_0x4469dc(0x12f)]===0x1;}async[_0x4c01f8(0xaf)](_0x25996b,_0x3507d2,_0xeb0fe1){const _0x539141=_0x4c01f8,_0x282120={'unitId':_0x25996b,'threadId':_0xeb0fe1},_0x4cc698=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x25996b+_0x539141(0xc2),{'body':_0x282120}),_0x48bb59=_0xeb0fe1['map'](_0xf1d1fb=>_0xbd643e(_0x4cc698[_0x539141(0xb0)][_0x539141(0xfc)][_0xf1d1fb],_0x25996b,_0x3507d2))[_0x539141(0x123)](Boolean);return Object[_0x539141(0x103)](_0x4cc698[_0x539141(0xb0)][_0x539141(0x11f)])[_0x539141(0xc0)](_0x4f01b8=>{const _0x43b152=_0x539141;this[_0x43b152(0xd4)][_0x43b152(0xd0)](_0x4f01b8);}),_0x48bb59;}['saveCommentToSnapshot'](_0x55a7fd){const _0x4aa0a8=_0x4c01f8;return{'id':_0x55a7fd['id'],'threadId':_0x55a7fd[_0x4aa0a8(0x135)],'ref':_0x55a7fd[_0x4aa0a8(0x125)]};}};_0x18650a=_0x47fbec([_0x37d4ee(0x0,_0x199161[_0x4c01f8(0xc1)](_0x48082b[_0x4c01f8(0xf7)])),_0x37d4ee(0x1,_0x199161[_0x4c01f8(0xc1)](_0x199161[_0x4c01f8(0xed)])),_0x37d4ee(0x2,_0x199161[_0x4c01f8(0xc1)](_0xceb99c['CollaborationSessionService'])),_0x37d4ee(0x3,_0x199161[_0x4c01f8(0xc1)](_0x199161[_0x4c01f8(0x10a)]))],_0x18650a);var _0x274bdb=Object['getOwnPropertyDescriptor'],_0x568fe7=(_0x4468e0,_0x26de9d,_0x2fa9e6,_0x31042b)=>{const _0x5472b1=_0x4c01f8;for(var _0x2b81f9=_0x31042b>0x1?void 0x0:_0x31042b?_0x274bdb(_0x26de9d,_0x2fa9e6):_0x26de9d,_0x453a2f=_0x4468e0[_0x5472b1(0xfa)]-0x1,_0x49e1f2;_0x453a2f>=0x0;_0x453a2f--)(_0x49e1f2=_0x4468e0[_0x453a2f])&&(_0x2b81f9=_0x49e1f2(_0x2b81f9)||_0x2b81f9);return _0x2b81f9;},_0x2e0a2d=(_0x16577d,_0x46c489)=>(_0x2b669d,_0x1f1b69)=>_0x46c489(_0x2b669d,_0x1f1b69,_0x16577d);let _0x428ba6=class extends _0x199161[_0x4c01f8(0x11a)]{constructor(_0x1b998d,_0x40aae7){const _0x5c27d1=_0x4c01f8;super(),this[_0x5c27d1(0x124)]=_0x1b998d,this[_0x5c27d1(0x128)]=_0x40aae7,this[_0x5c27d1(0xe3)]();}[_0x4c01f8(0xe3)](){const _0x19e12b=_0x4c01f8;this[_0x19e12b(0x124)][_0x19e12b(0xbb)]=this[_0x19e12b(0x128)],this[_0x19e12b(0x124)][_0x19e12b(0xf6)]=!0x1;}};_0x428ba6=_0x568fe7([_0x2e0a2d(0x0,_0x313bc5[_0x4c01f8(0xfe)]),_0x2e0a2d(0x1,_0x199161[_0x4c01f8(0xc1)](_0x18650a))],_0x428ba6);var _0x153f72=Object[_0x4c01f8(0x122)],_0x203c0c=Object[_0x4c01f8(0x11c)],_0x5c04e5=(_0x2f2e6c,_0x329364,_0xe8ebab)=>_0x329364 in _0x2f2e6c?_0x153f72(_0x2f2e6c,_0x329364,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xe8ebab}):_0x2f2e6c[_0x329364]=_0xe8ebab,_0x29c621=(_0x4e5caa,_0x23af89,_0x339f06,_0x372b43)=>{const _0x50884d=_0x4c01f8;for(var _0x4e7337=_0x372b43>0x1?void 0x0:_0x372b43?_0x203c0c(_0x23af89,_0x339f06):_0x23af89,_0x5c239f=_0x4e5caa[_0x50884d(0xfa)]-0x1,_0xee7bd8;_0x5c239f>=0x0;_0x5c239f--)(_0xee7bd8=_0x4e5caa[_0x5c239f])&&(_0x4e7337=_0xee7bd8(_0x4e7337)||_0x4e7337);return _0x4e7337;},_0x3cc47b=(_0x1adf61,_0x448dad)=>(_0x5723eb,_0x1374fb)=>_0x448dad(_0x5723eb,_0x1374fb,_0x1adf61),_0x106854=(_0x434a01,_0xd294e9,_0x56eb8c)=>_0x5c04e5(_0x434a01,typeof _0xd294e9!='symbol'?_0xd294e9+'':_0xd294e9,_0x56eb8c);_0x58f319[_0x4c01f8(0x126)]=class extends _0x199161[_0x4c01f8(0xd8)]{constructor(_0x3a29b9=_0x369557,_0xde5783,_0x578882){const _0x18b955=_0x4c01f8;super(),this[_0x18b955(0x10e)]=_0x3a29b9,this['_injector']=_0xde5783,this[_0x18b955(0x10c)]=_0x578882;const {..._0x4f2e66}=_0x199161[_0x18b955(0xf3)]({},_0x369557,this['_config']);this[_0x18b955(0x10c)][_0x18b955(0xc4)](_0x2eadfa,_0x4f2e66);}['onStarting'](){const _0xad5c5e=_0x4c01f8;[[_0x18650a],[_0x428ba6],[_0x2f3ca1]][_0xad5c5e(0xc0)](_0x43b23a=>{const _0x523937=_0xad5c5e;this[_0x523937(0x115)][_0x523937(0xc7)](_0x43b23a);});}[_0x4c01f8(0x129)](){const _0x1504bd=_0x4c01f8;this[_0x1504bd(0x115)]['get'](_0x428ba6),this['_injector']['get'](_0x2f3ca1);}},_0x106854(_0x58f319['UniverThreadCommentDataSourcePlugin'],_0x4c01f8(0x127),_0x54e18f),_0x106854(_0x58f319[_0x4c01f8(0x126)],_0x4c01f8(0xd2),_0x199161[_0x4c01f8(0xee)][_0x4c01f8(0xcc)]),_0x58f319[_0x4c01f8(0x126)]=_0x29c621([_0x199161['DependentOn'](_0x59639f[_0x4c01f8(0xdf)],_0xceb99c[_0x4c01f8(0xd3)],_0x22e5e1[_0x4c01f8(0x132)]),_0x3cc47b(0x1,_0x199161[_0x4c01f8(0xc1)](_0x199161[_0x4c01f8(0x10a)])),_0x3cc47b(0x2,_0x199161[_0x4c01f8(0x130)])],_0x58f319[_0x4c01f8(0x126)]),Object[_0x4c01f8(0x122)](_0x58f319,Symbol[_0x4c01f8(0xe7)],{'value':_0x4c01f8(0xb3)});}));function _0x429b(_0x453daf,_0x5ac6ea){const _0x1ce316=_0x1ce3();return _0x429b=function(_0x429b22,_0x4ff317){_0x429b22=_0x429b22-0xaf;let _0x309c15=_0x1ce316[_0x429b22];return _0x309c15;},_0x429b(_0x453daf,_0x5ac6ea);}function _0x1ce3(){const _0x4a1ff3=['forEach','Inject','/list','UniverProCollaborationClient','setConfig','4LBiFoY','amd','add','3BuZCSg','CommentService','disposeWithMe','UniverProLicense','UNIVER_UNKNOWN','requireSession','map','YYYY/MM/DD\x20HH:mm','addUser','exports','type','UniverCollaborationClientPlugin','_userService','format','unitId','stringify','Plugin','comment','748088laLsHr','error','payload','Solved','subscribe','UniverThreadCommentUIPlugin','object','content','OpenOrReOpen','_initDataSource','1149176mnKQms','size','@univerjs-pro/collaboration-client','toStringTag','Edit','parentId','@univerjs-pro/license','Solve','customRanges','UserManagerService','UniverInstanceType','root','thread-comment-data-source.config','addComment','getMemberID','merge','Reply','/universer-api/user/list','syncUpdateMutationToColla','HTTPService','UniverNetwork','_commentService','length','resolveComment','comments','function','IThreadCommentDataSourceService','getUnit','userId','@univerjs/thread-comment','_sessionService','values','_init','2793ucSToE','_httpService','2505648iJbdEE','Delete','userID','Injector','bufferTime','_configService','deleteComment','_config','rangeType','COMMENT','personId','33670087AVTEqt','12344hStVZy','getCurrentUser','_injector','updateComment','ThreadCommentModel','post','UniverCore','Disposable','commentUpdate$','getOwnPropertyDescriptor','Unknown','resolved','users','getComment','dayjs','defineProperty','filter','_threadCommentDataSourceService','ref','UniverThreadCommentDataSourcePlugin','pluginName','_threadCommentDataSource','onReady','3205161hgfiTk','UNRECOGNIZED','3427235wzBJyB','_threadCommentModel','Add','code','IConfigService','/universer-api/comment/unit/','UniverLicensePlugin','_initUserSync','solved','threadId','replyId','listComments','body','@univerjs/thread-comment-ui','rangeId','Module','/delete','@univerjs/core','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','get','createTimestamp','replies','UniverThreadComment','dataSource','parse','rxjs','CustomRangeType','10RVYHiM'];_0x1ce3=function(){return _0x4a1ff3;};return _0x1ce3();}
1
+ (function(_0x717b1a,_0x1c1488){const _0x1a0ba4=_0x490f,_0x1606a2=_0x717b1a();while(!![]){try{const _0x169a84=-parseInt(_0x1a0ba4(0x15d))/0x1*(parseInt(_0x1a0ba4(0xfc))/0x2)+parseInt(_0x1a0ba4(0xf6))/0x3+-parseInt(_0x1a0ba4(0xf4))/0x4*(-parseInt(_0x1a0ba4(0x11a))/0x5)+parseInt(_0x1a0ba4(0x13f))/0x6+parseInt(_0x1a0ba4(0x11c))/0x7*(parseInt(_0x1a0ba4(0x131))/0x8)+parseInt(_0x1a0ba4(0x134))/0x9+parseInt(_0x1a0ba4(0x13a))/0xa*(-parseInt(_0x1a0ba4(0x14f))/0xb);if(_0x169a84===_0x1c1488)break;else _0x1606a2['push'](_0x1606a2['shift']());}catch(_0xb63bf1){_0x1606a2['push'](_0x1606a2['shift']());}}}(_0x5e01,0xa121f),function(_0x5671a6,_0x3923f7){const _0x3f7696=_0x490f;typeof exports==_0x3f7696(0x12a)&&typeof module<'u'?_0x3923f7(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x3f7696(0x133)&&define[_0x3f7696(0x123)]?define(['exports',_0x3f7696(0xf3),_0x3f7696(0x14d),_0x3f7696(0xfa),_0x3f7696(0x159),_0x3f7696(0x100),_0x3f7696(0x138),_0x3f7696(0x15e)],_0x3923f7):(_0x5671a6=typeof globalThis<'u'?globalThis:_0x5671a6||self,_0x3923f7(_0x5671a6[_0x3f7696(0xdf)]={},_0x5671a6['UniverProCollaborationClient'],_0x5671a6[_0x3f7696(0x106)],_0x5671a6[_0x3f7696(0x12b)],_0x5671a6['UniverThreadCommentUi'],_0x5671a6['UniverThreadComment'],_0x5671a6[_0x3f7696(0x138)],_0x5671a6[_0x3f7696(0x122)]));}(this,function(_0x573a9b,_0x417d9d,_0x145f0d,_0x39a36f,_0x3c6dc3,_0x33a67d,_0x1a6568,_0x148cf0){'use strict';const _0x215611=_0x490f;const _0x492416=_0x215611(0xf1);var _0xdbfad2=(_0x1fea17=>(_0x1fea17[_0x1fea17[_0x215611(0xfe)]=0x0]=_0x215611(0xfe),_0x1fea17[_0x1fea17[_0x215611(0x10f)]=0x1]='Solved',_0x1fea17[_0x1fea17[_0x215611(0xeb)]=-0x1]=_0x215611(0xeb),_0x1fea17))(_0xdbfad2||{}),_0x376ebd=(_0x4dc7b7=>(_0x4dc7b7[_0x4dc7b7[_0x215611(0x15b)]=0x0]=_0x215611(0x15b),_0x4dc7b7[_0x4dc7b7['Add']=0x1]=_0x215611(0x112),_0x4dc7b7[_0x4dc7b7['Reply']=0x2]=_0x215611(0xe4),_0x4dc7b7[_0x4dc7b7['Edit']=0x3]=_0x215611(0x141),_0x4dc7b7[_0x4dc7b7[_0x215611(0x11b)]=0x4]=_0x215611(0x11b),_0x4dc7b7[_0x4dc7b7[_0x215611(0xda)]=0x5]=_0x215611(0xda),_0x4dc7b7[_0x4dc7b7[_0x215611(0xeb)]=-0x1]=_0x215611(0xeb),_0x4dc7b7))(_0x376ebd||{});const _0xa48d69=_0x20d84b=>_0x39a36f[_0x215611(0xe9)](new Date(+_0x20d84b))[_0x215611(0x109)](_0x215611(0x114)),_0x184d32=async(_0x449f44,_0x3418ee)=>{const _0x15e643=_0x215611,_0x3c1491=_0x449f44[_0x15e643(0x137)](_0x39a36f['UserManagerService']),_0xfaf49=_0x449f44[_0x15e643(0x137)](_0x148cf0[_0x15e643(0x13e)]);_0x3418ee[_0x15e643(0xe3)](_0x44dcb9=>{_0x3c1491['getUser'](_0x44dcb9)&&_0x3418ee['delete'](_0x44dcb9);}),_0x3418ee[_0x15e643(0x161)]&&(await _0xfaf49[_0x15e643(0x137)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3418ee]}}))['body'][_0x15e643(0x11d)][_0x15e643(0xe3)](_0x52deb0=>{const _0x2f87c9=_0x15e643;_0x52deb0&&_0x3c1491[_0x2f87c9(0x10b)](_0x52deb0);});};var _0x534ee2=Object[_0x215611(0x14a)],_0x364be=(_0x31abdc,_0x586991,_0x42c625,_0x342ef9)=>{for(var _0x368350=_0x342ef9>0x1?void 0x0:_0x342ef9?_0x534ee2(_0x586991,_0x42c625):_0x586991,_0x35a3a4=_0x31abdc['length']-0x1,_0x21b69e;_0x35a3a4>=0x0;_0x35a3a4--)(_0x21b69e=_0x31abdc[_0x35a3a4])&&(_0x368350=_0x21b69e(_0x368350)||_0x368350);return _0x368350;},_0x3fe9f2=(_0x2e943d,_0x2c10c4)=>(_0x5bbb45,_0x2ddb60)=>_0x2c10c4(_0x5bbb45,_0x2ddb60,_0x2e943d);let _0x1ef255=class extends _0x39a36f['Disposable']{constructor(_0x2610ec,_0x45f51a,_0x4178a,_0x1623c2){const _0x371818=_0x215611;super(),this[_0x371818(0x156)]=_0x2610ec,this[_0x371818(0x10e)]=_0x45f51a,this[_0x371818(0x13d)]=_0x4178a,this[_0x371818(0x117)]=_0x1623c2,this[_0x371818(0x110)](),this[_0x371818(0x14c)]();}[_0x215611(0x14c)](){const _0x3b3ff0=_0x215611;this['disposeWithMe'](this['_threadCommentModel'][_0x3b3ff0(0xec)][_0x3b3ff0(0xfb)](_0x1a6568[_0x3b3ff0(0xde)](0x10))[_0x3b3ff0(0x103)](_0x5c2718=>{const _0x223b7d=_0x3b3ff0,_0x5a5e82=new Set();_0x5c2718['forEach'](_0x6721fb=>{const _0x5575ed=_0x490f;switch(_0x6721fb[_0x5575ed(0x15f)]){case _0x5575ed(0x13c):{const _0xb7a91c=_0x6721fb[_0x5575ed(0xef)][_0x5575ed(0x10d)];_0x5a5e82[_0x5575ed(0x13c)](_0xb7a91c);break;}}}),_0x184d32(this[_0x223b7d(0x117)],_0x5a5e82);}));}[_0x215611(0x110)](){const _0x5f214c=_0x215611;this[_0x5f214c(0x120)](this[_0x5f214c(0x156)][_0x5f214c(0xec)]['subscribe'](async _0x39f8f7=>{const _0x28b062=_0x5f214c;var _0x1c3bb8,_0x36adcb,_0x16382a,_0x529aee;const _0x3094b9=(_0x1c3bb8=this['_threadCommentModel'][_0x28b062(0x118)](_0x39f8f7['unitId'])[_0x28b062(0x162)](_0x50da1c=>_0x50da1c['threadId']===_0x39f8f7[_0x28b062(0xf8)]))==null?void 0x0:_0x1c3bb8[_0x28b062(0x10c)];if(!_0x3094b9)return;const {unitId:_0x5e55ef,subUnitId:_0x597a0a}=_0x3094b9;switch(_0x39f8f7[_0x28b062(0xdc)]&&this[_0x28b062(0x13d)]['addUser'](_0x39f8f7[_0x28b062(0xdc)]),_0x39f8f7[_0x28b062(0x15f)]){case _0x376ebd[_0x28b062(0x112)]:break;case _0x376ebd[_0x28b062(0xe4)]:{this[_0x28b062(0x10e)]['addComment'](_0x5e55ef,_0x597a0a,{'unitId':_0x5e55ef,'subUnitId':_0x597a0a,'ref':'','id':_0x39f8f7[_0x28b062(0x158)],'dT':_0xa48d69(+_0x39f8f7[_0x28b062(0x101)]),'threadId':_0x39f8f7[_0x28b062(0xf8)],'personId':(_0x16382a=(_0x36adcb=_0x39f8f7[_0x28b062(0xdc)])==null?void 0x0:_0x36adcb[_0x28b062(0x150)])!=null?_0x16382a:_0x39f8f7[_0x28b062(0xf2)],'text':JSON['parse'](_0x39f8f7[_0x28b062(0x116)]),'parentId':_0x3094b9['id']});break;}case _0x376ebd[_0x28b062(0x11b)]:{const _0x2533d9=this[_0x28b062(0x10e)][_0x28b062(0xff)](_0x5e55ef,_0x597a0a,_0x39f8f7[_0x28b062(0x158)]);_0x2533d9&&_0x2533d9['parentId']&&this[_0x28b062(0x10e)][_0x28b062(0x147)](_0x5e55ef,_0x597a0a,_0x39f8f7[_0x28b062(0x158)]);break;}case _0x376ebd[_0x28b062(0x141)]:{this[_0x28b062(0x10e)][_0x28b062(0x143)](_0x5e55ef,_0x597a0a,{'commentId':_0x39f8f7['replyId'],'text':JSON[_0x28b062(0x157)](_0x39f8f7[_0x28b062(0x116)])});break;}case _0x376ebd['Solve']:{const _0x4aeaba=(_0x529aee=this[_0x28b062(0x10e)][_0x28b062(0x118)](_0x39f8f7[_0x28b062(0x135)])['find'](_0x76a39=>_0x76a39[_0x28b062(0xf8)]===_0x39f8f7[_0x28b062(0xf8)]))==null?void 0x0:_0x529aee[_0x28b062(0x10c)];_0x4aeaba&&this[_0x28b062(0x10e)]['resolveComment'](_0x5e55ef,_0x597a0a,_0x4aeaba['id'],_0x39f8f7[_0x28b062(0x139)]===_0xdbfad2[_0x28b062(0x10f)]);break;}}}));}};_0x1ef255=_0x364be([_0x3fe9f2(0x0,_0x39a36f['Inject'](_0x417d9d['CommentService'])),_0x3fe9f2(0x1,_0x39a36f[_0x215611(0x145)](_0x33a67d[_0x215611(0x12f)])),_0x3fe9f2(0x2,_0x39a36f[_0x215611(0x145)](_0x39a36f[_0x215611(0xed)])),_0x3fe9f2(0x3,_0x39a36f['Inject'](_0x39a36f[_0x215611(0x154)]))],_0x1ef255);const _0xf38551=_0x215611(0x15c),_0x18a67f={};var _0x50420a=Object[_0x215611(0x14a)],_0x51a085=(_0x277395,_0x11e0cf,_0x43ef4f,_0x4d5257)=>{const _0x547361=_0x215611;for(var _0x363874=_0x4d5257>0x1?void 0x0:_0x4d5257?_0x50420a(_0x11e0cf,_0x43ef4f):_0x11e0cf,_0x3d6766=_0x277395[_0x547361(0x155)]-0x1,_0x2240ee;_0x3d6766>=0x0;_0x3d6766--)(_0x2240ee=_0x277395[_0x3d6766])&&(_0x363874=_0x2240ee(_0x363874)||_0x363874);return _0x363874;},_0x39a575=(_0x582ff0,_0x2ca886)=>(_0x2417a9,_0x552bd8)=>_0x2ca886(_0x2417a9,_0x552bd8,_0x582ff0);function _0x2ba3fb(_0x22c340,_0x4c3694){const _0x24eb7a=_0x215611,_0xcf7e4d=_0x22c340[_0x24eb7a(0x111)][0x0];return{..._0x4c3694,'id':_0xcf7e4d['replyId'],'resolved':_0x22c340[_0x24eb7a(0x139)]===0x1,'dT':_0xa48d69(_0xcf7e4d[_0x24eb7a(0x101)]),'personId':_0xcf7e4d[_0x24eb7a(0xf2)],'threadId':_0xcf7e4d[_0x24eb7a(0xf8)]};}function _0x370efe(_0x3aa029,_0x304dfa,_0x1dee96){const _0x17ab5f=_0x215611;var _0x20ae0c,_0x2c83f5;if(((_0x2c83f5=(_0x20ae0c=_0x3aa029==null?void 0x0:_0x3aa029[_0x17ab5f(0x111)])==null?void 0x0:_0x20ae0c[_0x17ab5f(0x155)])!=null?_0x2c83f5:0x0)>0x0){const _0x55f114=(_0x458a8f,_0x3b9fa6)=>({'id':_0x458a8f[_0x17ab5f(0x158)],'threadId':_0x458a8f[_0x17ab5f(0xf8)],'dT':_0xa48d69(_0x458a8f[_0x17ab5f(0x101)]),'personId':_0x458a8f[_0x17ab5f(0xf2)],'resolved':_0x3aa029[_0x17ab5f(0x139)]===_0xdbfad2[_0x17ab5f(0x10f)],'unitId':_0x304dfa,'subUnitId':_0x1dee96,'text':JSON['parse'](_0x458a8f[_0x17ab5f(0x116)]),'parentId':_0x3b9fa6}),_0x43a749=_0x55f114(_0x3aa029[_0x17ab5f(0x111)][0x0]);return{..._0x43a749,'children':_0x3aa029[_0x17ab5f(0x111)][_0x17ab5f(0x130)](0x1)[_0x17ab5f(0xe0)](_0x10ee9f=>_0x55f114(_0x10ee9f,_0x43a749['id']))};}return null;}let _0x2752c3=class{constructor(_0x477726,_0x4ec4cc,_0x88c88a,_0x3acbcc){const _0x36116f=_0x215611;this[_0x36116f(0x148)]=_0x477726,this[_0x36116f(0x13d)]=_0x4ec4cc,this[_0x36116f(0x126)]=_0x88c88a,this[_0x36116f(0x117)]=_0x3acbcc;}async[_0x215611(0x108)](_0x250461){const _0x11c2da=_0x215611;var _0x521a96,_0xca4f7a;const {parentId:_0x17ebae,unitId:_0x23d20a,text:_0x2ff8a1,threadId:_0x464d07}=_0x250461,_0x3613f0=(_0xca4f7a=(_0x521a96=_0x2ff8a1[_0x11c2da(0xfd)])==null?void 0x0:_0x521a96['filter'](_0x5ec0aa=>_0x5ec0aa[_0x11c2da(0x105)]===_0x39a36f[_0x11c2da(0x144)]['COMMENT'])[_0x11c2da(0xe0)](_0x598791=>_0x598791['rangeId']))!=null?_0xca4f7a:[],_0xbbad2f=JSON[_0x11c2da(0xee)](_0x2ff8a1),_0xc7d8f=(await this[_0x11c2da(0x126)][_0x11c2da(0x153)](_0x23d20a))['getMemberID']();if(_0x17ebae){const _0x3fa330={'memberId':_0xc7d8f,'unitId':_0x23d20a,'content':_0xbbad2f,'mention':_0x3613f0,'threadId':_0x464d07},_0x23dd80=(await this[_0x11c2da(0x148)][_0x11c2da(0x14e)](_0x11c2da(0xe5)+_0x23d20a+_0x11c2da(0x142),{'body':_0x3fa330}))['body'][_0x11c2da(0x152)];return{..._0x250461,'id':_0x23dd80['replyId'],'dT':_0x39a36f[_0x11c2da(0xe9)](+_0x23dd80[_0x11c2da(0x101)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x23dd80[_0x11c2da(0xf2)]};}else{const _0x1fb848={'memberId':_0xc7d8f,'unitId':_0x23d20a,'content':_0xbbad2f,'mention':_0x3613f0},_0x5b0a8c=await this[_0x11c2da(0x148)][_0x11c2da(0x14e)](_0x11c2da(0xe5)+_0x23d20a+_0x11c2da(0xe8),{'body':_0x1fb848});return _0x2ba3fb(_0x5b0a8c[_0x11c2da(0x104)]['comment'],_0x250461);}}async[_0x215611(0x143)](_0xe11599){const _0x4e0deb=_0x215611;var _0x5edc57,_0xcc273e;const {text:_0x25394f,unitId:_0x179a59}=_0xe11599,_0x343c32=(_0xcc273e=(_0x5edc57=_0x25394f['customRanges'])==null?void 0x0:_0x5edc57[_0x4e0deb(0x163)](_0x4055be=>_0x4055be['rangeType']===_0x39a36f[_0x4e0deb(0x144)][_0x4e0deb(0x165)])[_0x4e0deb(0xe0)](_0x3f71c4=>_0x3f71c4[_0x4e0deb(0x12e)]))!=null?_0xcc273e:[],_0x4a3b5e=JSON['stringify'](_0x25394f),_0x4a132b=_0xe11599['threadId'],_0x2e1334=_0xe11599['id'],_0x9651ac={'memberId':(await this[_0x4e0deb(0x126)]['requireSession'](_0x179a59))[_0x4e0deb(0xf9)](),'unitId':_0x179a59,'threadId':_0x4a132b,'mention':_0x343c32,'content':_0x4a3b5e,'replyId':_0x2e1334},_0xe3a22c=await this[_0x4e0deb(0x148)][_0x4e0deb(0x14e)](_0x4e0deb(0xe5)+_0x179a59+_0x4e0deb(0x160),{'body':_0x9651ac});return!_0xe3a22c[_0x4e0deb(0x104)]['error']||_0xe3a22c[_0x4e0deb(0x104)][_0x4e0deb(0xe6)][_0x4e0deb(0x140)]===0x1;}async[_0x215611(0xea)](_0x4313a1){const _0xf05419=_0x215611,{unitId:_0x5ac02b}=_0x4313a1,_0x2be3ee=_0x4313a1[_0xf05419(0xf8)],_0x113dd9={'memberId':this[_0xf05419(0x13d)][_0xf05419(0x15a)]()[_0xf05419(0x150)],'unitId':_0x5ac02b,'threadId':_0x2be3ee,'solved':_0x4313a1[_0xf05419(0x127)]?_0xdbfad2[_0xf05419(0x10f)]:_0xdbfad2['OpenOrReOpen']},_0x1deba5=await this[_0xf05419(0x148)][_0xf05419(0x14e)]('/universer-api/comment/unit/'+_0x5ac02b+_0xf05419(0x12c),{'body':_0x113dd9});return!_0x1deba5[_0xf05419(0x104)][_0xf05419(0xe6)]||_0x1deba5['body'][_0xf05419(0xe6)][_0xf05419(0x140)]===0x1;}async[_0x215611(0x147)](_0x22271f,_0x468ed0,_0xf2c8d2,_0x13acaa){const _0x4e6a72=_0x215611,_0x30b704={'memberId':(await this[_0x4e6a72(0x126)][_0x4e6a72(0x153)](_0x22271f))[_0x4e6a72(0xf9)](),'threadId':_0xf2c8d2,'replyId':_0x13acaa,'unitId':_0x22271f},_0x13ccb8=await this[_0x4e6a72(0x148)][_0x4e6a72(0x14e)](_0x4e6a72(0xe5)+_0x22271f+_0x4e6a72(0x136),{'body':_0x30b704});return!_0x13ccb8['body']['error']||_0x13ccb8[_0x4e6a72(0x104)][_0x4e6a72(0xe6)][_0x4e6a72(0x140)]===0x1;}async[_0x215611(0xf5)](_0x51434b,_0xc8b1ad,_0x3dd323){const _0x5bdee8=_0x215611,_0x345b60={'unitId':_0x51434b,'threadId':_0x3dd323},_0x46e86b=await this[_0x5bdee8(0x148)][_0x5bdee8(0x14e)]('/universer-api/comment/unit/'+_0x51434b+_0x5bdee8(0x119),{'body':_0x345b60}),_0x23b14a=_0x3dd323[_0x5bdee8(0xe0)](_0x56b46b=>_0x370efe(_0x46e86b[_0x5bdee8(0x104)][_0x5bdee8(0xe1)][_0x56b46b],_0x51434b,_0xc8b1ad))[_0x5bdee8(0x163)](Boolean);return Object['values'](_0x46e86b['body']['users'])[_0x5bdee8(0xe3)](_0x2e2cbd=>{const _0x3ee02d=_0x5bdee8;this[_0x3ee02d(0x13d)][_0x3ee02d(0x10b)](_0x2e2cbd);}),_0x23b14a;}[_0x215611(0x124)](_0x53582e){const _0x237553=_0x215611;return{'id':_0x53582e['id'],'threadId':_0x53582e[_0x237553(0xf8)],'ref':_0x53582e[_0x237553(0x164)]};}};_0x2752c3=_0x51a085([_0x39a575(0x0,_0x39a36f[_0x215611(0x145)](_0x148cf0[_0x215611(0x13e)])),_0x39a575(0x1,_0x39a36f[_0x215611(0x145)](_0x39a36f[_0x215611(0xed)])),_0x39a575(0x2,_0x39a36f[_0x215611(0x145)](_0x417d9d[_0x215611(0x14b)])),_0x39a575(0x3,_0x39a36f['Inject'](_0x39a36f[_0x215611(0x154)]))],_0x2752c3);var _0x2491e0=Object['getOwnPropertyDescriptor'],_0x104895=(_0xf65519,_0xa54b29,_0x452ef9,_0x28e6ed)=>{const _0x4adbe0=_0x215611;for(var _0x5b0722=_0x28e6ed>0x1?void 0x0:_0x28e6ed?_0x2491e0(_0xa54b29,_0x452ef9):_0xa54b29,_0x337a58=_0xf65519[_0x4adbe0(0x155)]-0x1,_0x41b152;_0x337a58>=0x0;_0x337a58--)(_0x41b152=_0xf65519[_0x337a58])&&(_0x5b0722=_0x41b152(_0x5b0722)||_0x5b0722);return _0x5b0722;},_0x5daf24=(_0x13075d,_0x3dfcdd)=>(_0x555914,_0x4507f0)=>_0x3dfcdd(_0x555914,_0x4507f0,_0x13075d);let _0x4dec4e=class extends _0x39a36f[_0x215611(0xdd)]{constructor(_0x5c41ba,_0x5f4b77){const _0x4efe7e=_0x215611;super(),this[_0x4efe7e(0x132)]=_0x5c41ba,this[_0x4efe7e(0x113)]=_0x5f4b77,this['_initDataSource']();}[_0x215611(0x11f)](){const _0x5e4e11=_0x215611;this[_0x5e4e11(0x132)]['dataSource']=this[_0x5e4e11(0x113)],this['_threadCommentDataSourceService'][_0x5e4e11(0x102)]=!0x1;}};_0x4dec4e=_0x104895([_0x5daf24(0x0,_0x33a67d[_0x215611(0xe7)]),_0x5daf24(0x1,_0x39a36f[_0x215611(0x145)](_0x2752c3))],_0x4dec4e);var _0xb2c355=Object['defineProperty'],_0x22c91d=Object['getOwnPropertyDescriptor'],_0x35e0ec=(_0x10fa39,_0x4533e8,_0x34c9bf)=>_0x4533e8 in _0x10fa39?_0xb2c355(_0x10fa39,_0x4533e8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x34c9bf}):_0x10fa39[_0x4533e8]=_0x34c9bf,_0x34e7b5=(_0x33a997,_0x50fa14,_0x2f69b6,_0x41b665)=>{const _0x2e9ff2=_0x215611;for(var _0x3af611=_0x41b665>0x1?void 0x0:_0x41b665?_0x22c91d(_0x50fa14,_0x2f69b6):_0x50fa14,_0x29be8b=_0x33a997[_0x2e9ff2(0x155)]-0x1,_0x2a23ba;_0x29be8b>=0x0;_0x29be8b--)(_0x2a23ba=_0x33a997[_0x29be8b])&&(_0x3af611=_0x2a23ba(_0x3af611)||_0x3af611);return _0x3af611;},_0xe7f23c=(_0x5cef46,_0x5a13ce)=>(_0x484253,_0x109e46)=>_0x5a13ce(_0x484253,_0x109e46,_0x5cef46),_0x5df7a0=(_0x1d9a54,_0x4c4937,_0x56be0b)=>_0x35e0ec(_0x1d9a54,typeof _0x4c4937!=_0x215611(0x125)?_0x4c4937+'':_0x4c4937,_0x56be0b);_0x573a9b[_0x215611(0x146)]=class extends _0x39a36f[_0x215611(0x128)]{constructor(_0x90cffa=_0x18a67f,_0x475db3,_0x35ca61){const _0x2ca951=_0x215611;super(),this[_0x2ca951(0x115)]=_0x90cffa,this[_0x2ca951(0x117)]=_0x475db3,this[_0x2ca951(0x121)]=_0x35ca61;const {..._0x33f0b3}=_0x39a36f[_0x2ca951(0x11e)]({},_0x18a67f,this[_0x2ca951(0x115)]);this[_0x2ca951(0x121)][_0x2ca951(0xf0)](_0xf38551,_0x33f0b3);}[_0x215611(0xe2)](){[[_0x2752c3],[_0x4dec4e],[_0x1ef255]]['forEach'](_0x1dbc4d=>{const _0x5a8bcf=_0x490f;this[_0x5a8bcf(0x117)][_0x5a8bcf(0x13c)](_0x1dbc4d);});}['onReady'](){const _0x7be63f=_0x215611;this[_0x7be63f(0x117)]['get'](_0x4dec4e),this[_0x7be63f(0x117)][_0x7be63f(0x137)](_0x1ef255);}},_0x5df7a0(_0x573a9b[_0x215611(0x146)],_0x215611(0x129),_0x492416),_0x5df7a0(_0x573a9b[_0x215611(0x146)],_0x215611(0x15f),_0x39a36f['UniverInstanceType'][_0x215611(0x151)]),_0x573a9b[_0x215611(0x146)]=_0x34e7b5([_0x39a36f[_0x215611(0x107)](_0x3c6dc3[_0x215611(0x12d)],_0x417d9d['UniverCollaborationClientPlugin'],_0x145f0d[_0x215611(0x13b)]),_0xe7f23c(0x1,_0x39a36f['Inject'](_0x39a36f[_0x215611(0x154)])),_0xe7f23c(0x2,_0x39a36f[_0x215611(0x10a)])],_0x573a9b[_0x215611(0x146)]),Object[_0x215611(0xdb)](_0x573a9b,Symbol[_0x215611(0xf7)],{'value':_0x215611(0x149)});}));function _0x490f(_0x39c211,_0x3753b4){const _0x5e0152=_0x5e01();return _0x490f=function(_0x490f7e,_0x1c0159){_0x490f7e=_0x490f7e-0xda;let _0x59d18=_0x5e0152[_0x490f7e];return _0x59d18;},_0x490f(_0x39c211,_0x3753b4);}function _0x5e01(){const _0x4b77da=['find','filter','ref','COMMENT','Solve','defineProperty','user','Disposable','bufferTime','UniverProThreadCommentDatasource','map','comments','onStarting','forEach','Reply','/universer-api/comment/unit/','error','IThreadCommentDataSourceService','/add','dayjs','resolveComment','UNRECOGNIZED','commentUpdate$','UserManagerService','stringify','payload','setConfig','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','userId','@univerjs-pro/collaboration-client','4027740RfbFli','listComments','3403284wIYfWn','toStringTag','threadId','getMemberID','@univerjs/core','pipe','56054NGFqtR','customRanges','OpenOrReOpen','getComment','@univerjs/thread-comment','createTimestamp','syncUpdateMutationToColla','subscribe','body','rangeType','UniverProLicense','DependentOn','addComment','format','IConfigService','addUser','root','personId','_threadCommentModel','Solved','_init','replies','Add','_threadCommentDataSource','YYYY/MM/DD\x20HH:mm','_config','content','_injector','getUnit','/list','5RPEKzL','Delete','28shatrX','users','merge','_initDataSource','disposeWithMe','_configService','UniverNetwork','amd','saveCommentToSnapshot','symbol','_sessionService','resolved','Plugin','pluginName','object','UniverCore','/solved','UniverThreadCommentUIPlugin','rangeId','ThreadCommentModel','slice','2196248ZirvQe','_threadCommentDataSourceService','function','3224259tRXLdo','unitId','/delete','get','rxjs','solved','1190SaWvcv','UniverLicensePlugin','add','_userService','HTTPService','5686458fgEzMw','code','Edit','/reply','updateComment','CustomRangeType','Inject','UniverThreadCommentDataSourcePlugin','deleteComment','_httpService','Module','getOwnPropertyDescriptor','CollaborationSessionService','_initUserSync','@univerjs-pro/license','post','284031ECdJTf','userID','UNIVER_UNKNOWN','reply','requireSession','Injector','length','_commentService','parse','replyId','@univerjs/thread-comment-ui','getCurrentUser','Unknown','thread-comment-data-source.config','29tqIgZl','@univerjs/network','type','/edit','size'];_0x5e01=function(){return _0x4b77da;};return _0x5e01();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.8.3",
3
+ "version": "0.9.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.8.3",
49
- "@univerjs/core": "0.8.3",
50
- "@univerjs-pro/license": "0.8.3",
51
- "@univerjs/network": "0.8.3",
52
- "@univerjs/thread-comment": "0.8.3",
53
- "@univerjs/protocol": "0.1.47-alpha.0",
54
- "@univerjs/thread-comment-ui": "0.8.3"
48
+ "@univerjs-pro/collaboration-client": "0.9.0",
49
+ "@univerjs-pro/license": "0.9.0",
50
+ "@univerjs/network": "0.9.0",
51
+ "@univerjs/core": "0.9.0",
52
+ "@univerjs/thread-comment": "0.9.0",
53
+ "@univerjs/thread-comment-ui": "0.9.0",
54
+ "@univerjs/protocol": "0.1.47-alpha.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.2.4",
61
- "@univerjs-infra/shared": "0.8.3"
61
+ "@univerjs-infra/shared": "0.9.0"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",