@univerjs-pro/thread-comment-datasource 0.9.3-nightly.202507250819 → 0.9.4

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';function _0x6213(){const _0x239b3d=['resolved','getMemberID','slice','339621BwzGdV','commentUpdate$','1406850WmbGTT','_sessionService','getOwnPropertyDescriptor','/reply','map','getUnit','1797816oAPyba','format','/universer-api/user/list','OpenOrReOpen','/list','defineProperty','rangeId','_initUserSync','onReady','payload','Inject','getCurrentUser','subscribe','type','userID','pluginName','pipe','addComment','bufferTime','replies','303108pezlaa','UniverThreadCommentDataSourcePlugin','/add','7554eGSZKh','user','length','Add','unitId','createTimestamp','_commentService','comments','content','/solved','UniverThreadCommentUIPlugin','_init','body','UniverLicensePlugin','stringify','add','989019TrtANV','_userService','_threadCommentDataSource','error','getUser','solved','/delete','thread-comment-data-source.config','CustomRangeType','IThreadCommentDataSourceService','Module','CollaborationSessionService','Solved','addUser','onStarting','HTTPService','_httpService','requireSession','customRanges','reply','resolveComment','_threadCommentModel','2241yMuAfz','find','Injector','_configService','listComments','replyId','ref','UniverInstanceType','UserManagerService','disposeWithMe','code','UNIVER_UNKNOWN','_config','YYYY/MM/DD\x20HH:mm','DependentOn','COMMENT','get','410lIJfdx','rangeType','/universer-api/comment/unit/','filter','Reply','users','post','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Solve','threadId','parse','Delete','dayjs','UniverCollaborationClientPlugin','size','Edit','deleteComment','Plugin','_threadCommentDataSourceService','UNRECOGNIZED','IConfigService','/edit','toStringTag','comment','userId','forEach','root','_initDataSource','symbol','_injector','dataSource','1127dImVsE'];_0x6213=function(){return _0x239b3d;};return _0x6213();}const _0x350e0a=_0x3deb;(function(_0x4b30a9,_0x3d23d5){const _0x23b2d6=_0x3deb,_0x212bf5=_0x4b30a9();while(!![]){try{const _0x229cad=-parseInt(_0x23b2d6(0x222))/0x1+parseInt(_0x23b2d6(0x1ff))/0x2*(-parseInt(_0x23b2d6(0x1ee))/0x3)+parseInt(_0x23b2d6(0x1c5))/0x4+parseInt(_0x23b2d6(0x224))/0x5+-parseInt(_0x23b2d6(0x1c8))/0x6*(-parseInt(_0x23b2d6(0x21e))/0x7)+parseInt(_0x23b2d6(0x1b1))/0x8+-parseInt(_0x23b2d6(0x1d8))/0x9;if(_0x229cad===_0x3d23d5)break;else _0x212bf5['push'](_0x212bf5['shift']());}catch(_0x1be531){_0x212bf5['push'](_0x212bf5['shift']());}}}(_0x6213,0x2c6a6));Object[_0x350e0a(0x1b6)](exports,Symbol[_0x350e0a(0x215)],{'value':_0x350e0a(0x1e2)});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=_0x350e0a(0x206);var I=(_0xa8d8d8=>(_0xa8d8d8[_0xa8d8d8[_0x350e0a(0x1b4)]=0x0]='OpenOrReOpen',_0xa8d8d8[_0xa8d8d8[_0x350e0a(0x1e4)]=0x1]=_0x350e0a(0x1e4),_0xa8d8d8[_0xa8d8d8[_0x350e0a(0x212)]=-0x1]=_0x350e0a(0x212),_0xa8d8d8))(I||{}),v=(_0x5e5dc6=>(_0x5e5dc6[_0x5e5dc6['Unknown']=0x0]='Unknown',_0x5e5dc6[_0x5e5dc6['Add']=0x1]=_0x350e0a(0x1cb),_0x5e5dc6[_0x5e5dc6[_0x350e0a(0x203)]=0x2]=_0x350e0a(0x203),_0x5e5dc6[_0x5e5dc6[_0x350e0a(0x20e)]=0x3]=_0x350e0a(0x20e),_0x5e5dc6[_0x5e5dc6[_0x350e0a(0x20a)]=0x4]='Delete',_0x5e5dc6[_0x5e5dc6['Solve']=0x5]=_0x350e0a(0x207),_0x5e5dc6[_0x5e5dc6[_0x350e0a(0x212)]=-0x1]=_0x350e0a(0x212),_0x5e5dc6))(v||{});const f=_0x32b45e=>c[_0x350e0a(0x20b)](new Date(+_0x32b45e))[_0x350e0a(0x1b2)](_0x350e0a(0x1fb)),R=async(_0x9a20fc,_0x3613b9)=>{const _0x26c842=_0x350e0a,_0x437748=_0x9a20fc[_0x26c842(0x1fe)](c[_0x26c842(0x1f6)]),_0x161646=_0x9a20fc[_0x26c842(0x1fe)](P[_0x26c842(0x1e7)]);_0x3613b9['forEach'](_0x405735=>{const _0x579405=_0x26c842;_0x437748[_0x579405(0x1dc)](_0x405735)&&_0x3613b9['delete'](_0x405735);}),_0x3613b9[_0x26c842(0x20d)]&&(await _0x161646[_0x26c842(0x1fe)](_0x26c842(0x1b3),{'params':{'userIDs':[..._0x3613b9]}}))[_0x26c842(0x1d4)]['users'][_0x26c842(0x218)](_0x2793ab=>{const _0x567c3a=_0x26c842;_0x2793ab&&_0x437748[_0x567c3a(0x1e5)](_0x2793ab);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x681a24,_0x23d092,_0x363cdb,_0x4fc3d2)=>{for(var _0x1ab2e6=_0x4fc3d2>0x1?void 0x0:_0x4fc3d2?$(_0x23d092,_0x363cdb):_0x23d092,_0x20020e=_0x681a24['length']-0x1,_0xc98a0f;_0x20020e>=0x0;_0x20020e--)(_0xc98a0f=_0x681a24[_0x20020e])&&(_0x1ab2e6=_0xc98a0f(_0x1ab2e6)||_0x1ab2e6);return _0x1ab2e6;},S=(_0x15cf1a,_0x3378bd)=>(_0xfe9d1d,_0x235d0b)=>_0x3378bd(_0xfe9d1d,_0x235d0b,_0x15cf1a);let p=class extends c['Disposable']{constructor(_0x50bb3c,_0x244169,_0xfce9ee,_0x3e8a18){const _0x5887da=_0x350e0a;super(),this['_commentService']=_0x50bb3c,this[_0x5887da(0x1ed)]=_0x244169,this[_0x5887da(0x1d9)]=_0xfce9ee,this['_injector']=_0x3e8a18,this['_init'](),this[_0x5887da(0x1b8)]();}[_0x350e0a(0x1b8)](){const _0x369e84=_0x350e0a;this[_0x369e84(0x1f7)](this[_0x369e84(0x1ed)][_0x369e84(0x223)][_0x369e84(0x1c1)](w[_0x369e84(0x1c3)](0x10))[_0x369e84(0x1bd)](_0x59af6a=>{const _0x3004cf=_0x369e84,_0x40f844=new Set();_0x59af6a['forEach'](_0x27bc4d=>{const _0xab37b2=_0x3deb;switch(_0x27bc4d[_0xab37b2(0x1be)]){case _0xab37b2(0x1d7):{const _0x29c351=_0x27bc4d[_0xab37b2(0x1ba)]['personId'];_0x40f844['add'](_0x29c351);break;}}}),R(this[_0x3004cf(0x21c)],_0x40f844);}));}[_0x350e0a(0x1d3)](){const _0x4737fc=_0x350e0a;this[_0x4737fc(0x1f7)](this[_0x4737fc(0x1ce)][_0x4737fc(0x223)][_0x4737fc(0x1bd)](async _0xb149cf=>{const _0x3cdc34=_0x4737fc;var _0x542f7c,_0x552d7c,_0x2ece01,_0x257214;const _0x271b15=(_0x542f7c=this['_threadCommentModel'][_0x3cdc34(0x1b0)](_0xb149cf[_0x3cdc34(0x1cc)])[_0x3cdc34(0x1ef)](_0x220dbd=>_0x220dbd[_0x3cdc34(0x208)]===_0xb149cf[_0x3cdc34(0x208)]))==null?void 0x0:_0x542f7c['root'];if(!_0x271b15)return;const {unitId:_0x37e57a,subUnitId:_0x269dcc}=_0x271b15;switch(_0xb149cf[_0x3cdc34(0x1c9)]&&this[_0x3cdc34(0x1d9)][_0x3cdc34(0x1e5)](_0xb149cf[_0x3cdc34(0x1c9)]),_0xb149cf[_0x3cdc34(0x1be)]){case v[_0x3cdc34(0x1cb)]:break;case v[_0x3cdc34(0x203)]:{this[_0x3cdc34(0x1ed)][_0x3cdc34(0x1c2)](_0x37e57a,_0x269dcc,{'unitId':_0x37e57a,'subUnitId':_0x269dcc,'ref':'','id':_0xb149cf[_0x3cdc34(0x1f3)],'dT':f(+_0xb149cf[_0x3cdc34(0x1cd)]),'threadId':_0xb149cf[_0x3cdc34(0x208)],'personId':(_0x2ece01=(_0x552d7c=_0xb149cf[_0x3cdc34(0x1c9)])==null?void 0x0:_0x552d7c[_0x3cdc34(0x1bf)])!=null?_0x2ece01:_0xb149cf[_0x3cdc34(0x217)],'text':JSON[_0x3cdc34(0x209)](_0xb149cf['content']),'parentId':_0x271b15['id']});break;}case v['Delete']:{const _0x16f2fd=this[_0x3cdc34(0x1ed)]['getComment'](_0x37e57a,_0x269dcc,_0xb149cf[_0x3cdc34(0x1f3)]);_0x16f2fd&&_0x16f2fd['parentId']&&this[_0x3cdc34(0x1ed)][_0x3cdc34(0x20f)](_0x37e57a,_0x269dcc,_0xb149cf[_0x3cdc34(0x1f3)]);break;}case v['Edit']:{this[_0x3cdc34(0x1ed)]['updateComment'](_0x37e57a,_0x269dcc,{'commentId':_0xb149cf[_0x3cdc34(0x1f3)],'text':JSON['parse'](_0xb149cf[_0x3cdc34(0x1d0)])});break;}case v[_0x3cdc34(0x207)]:{const _0x304c71=(_0x257214=this[_0x3cdc34(0x1ed)][_0x3cdc34(0x1b0)](_0xb149cf[_0x3cdc34(0x1cc)])[_0x3cdc34(0x1ef)](_0x3210b3=>_0x3210b3[_0x3cdc34(0x208)]===_0xb149cf[_0x3cdc34(0x208)]))==null?void 0x0:_0x257214[_0x3cdc34(0x219)];_0x304c71&&this[_0x3cdc34(0x1ed)][_0x3cdc34(0x1ec)](_0x37e57a,_0x269dcc,_0x304c71['id'],_0xb149cf[_0x3cdc34(0x1dd)]===I[_0x3cdc34(0x1e4)]);break;}}}));}};p=E([S(0x0,c[_0x350e0a(0x1bb)](b['CommentService'])),S(0x1,c[_0x350e0a(0x1bb)](M['ThreadCommentModel'])),S(0x2,c[_0x350e0a(0x1bb)](c[_0x350e0a(0x1f6)])),S(0x3,c[_0x350e0a(0x1bb)](c[_0x350e0a(0x1f0)]))],p);const q=_0x350e0a(0x1df),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x3dd700,_0x10d10e,_0x33da3b,_0x2bec58)=>{const _0xa30039=_0x350e0a;for(var _0x2d8707=_0x2bec58>0x1?void 0x0:_0x2bec58?A(_0x10d10e,_0x33da3b):_0x10d10e,_0x73fc5b=_0x3dd700[_0xa30039(0x1ca)]-0x1,_0x1caba2;_0x73fc5b>=0x0;_0x73fc5b--)(_0x1caba2=_0x3dd700[_0x73fc5b])&&(_0x2d8707=_0x1caba2(_0x2d8707)||_0x2d8707);return _0x2d8707;},_=(_0x304452,_0x465f87)=>(_0xb2e25,_0x30f876)=>_0x465f87(_0xb2e25,_0x30f876,_0x304452);function Y(_0x477f7b,_0x56b6e8){const _0x765c5c=_0x350e0a,_0x1e2f11=_0x477f7b[_0x765c5c(0x1c4)][0x0];return{..._0x56b6e8,'id':_0x1e2f11['replyId'],'resolved':_0x477f7b[_0x765c5c(0x1dd)]===0x1,'dT':f(_0x1e2f11[_0x765c5c(0x1cd)]),'personId':_0x1e2f11[_0x765c5c(0x217)],'threadId':_0x1e2f11[_0x765c5c(0x208)]};}function G(_0x4c2874,_0x150fb7,_0x1768b6){const _0x328228=_0x350e0a;var _0x18d347,_0x1898be;if(((_0x1898be=(_0x18d347=_0x4c2874==null?void 0x0:_0x4c2874['replies'])==null?void 0x0:_0x18d347[_0x328228(0x1ca)])!=null?_0x1898be:0x0)>0x0){const _0x20f120=(_0x21c704,_0x1b7b00)=>({'id':_0x21c704[_0x328228(0x1f3)],'threadId':_0x21c704[_0x328228(0x208)],'dT':f(_0x21c704[_0x328228(0x1cd)]),'personId':_0x21c704['userId'],'resolved':_0x4c2874[_0x328228(0x1dd)]===I[_0x328228(0x1e4)],'unitId':_0x150fb7,'subUnitId':_0x1768b6,'text':JSON[_0x328228(0x209)](_0x21c704[_0x328228(0x1d0)]),'parentId':_0x1b7b00}),_0x17fc1d=_0x20f120(_0x4c2874[_0x328228(0x1c4)][0x0]);return{..._0x17fc1d,'children':_0x4c2874[_0x328228(0x1c4)][_0x328228(0x221)](0x1)[_0x328228(0x1af)](_0x5633b3=>_0x20f120(_0x5633b3,_0x17fc1d['id']))};}return null;}let g=class{constructor(_0x5cf275,_0x316786,_0x5a8d44,_0xe622c4){const _0x32d98f=_0x350e0a;this[_0x32d98f(0x1e8)]=_0x5cf275,this[_0x32d98f(0x1d9)]=_0x316786,this[_0x32d98f(0x225)]=_0x5a8d44,this[_0x32d98f(0x21c)]=_0xe622c4;}async[_0x350e0a(0x1c2)](_0x8084cf){const _0x3a7e32=_0x350e0a;var _0x3bb030,_0x5ce36f;const {parentId:_0x1f43d7,unitId:_0x3face3,text:_0x3db784,threadId:_0x548423}=_0x8084cf,_0x2d009f=(_0x5ce36f=(_0x3bb030=_0x3db784[_0x3a7e32(0x1ea)])==null?void 0x0:_0x3bb030[_0x3a7e32(0x202)](_0xd929a1=>_0xd929a1['rangeType']===c[_0x3a7e32(0x1e0)][_0x3a7e32(0x1fd)])[_0x3a7e32(0x1af)](_0x54203c=>_0x54203c['rangeId']))!=null?_0x5ce36f:[],_0x9cd30c=JSON[_0x3a7e32(0x1d6)](_0x3db784),_0x7cf503=(await this[_0x3a7e32(0x225)][_0x3a7e32(0x1e9)](_0x3face3))[_0x3a7e32(0x220)]();if(_0x1f43d7){const _0x8c12a0={'memberId':_0x7cf503,'unitId':_0x3face3,'content':_0x9cd30c,'mention':_0x2d009f,'threadId':_0x548423},_0x1d71b9=(await this[_0x3a7e32(0x1e8)][_0x3a7e32(0x205)](_0x3a7e32(0x201)+_0x3face3+_0x3a7e32(0x1ae),{'body':_0x8c12a0}))[_0x3a7e32(0x1d4)][_0x3a7e32(0x1eb)];return{..._0x8084cf,'id':_0x1d71b9[_0x3a7e32(0x1f3)],'dT':c['dayjs'](+_0x1d71b9[_0x3a7e32(0x1cd)])[_0x3a7e32(0x1b2)](_0x3a7e32(0x1fb)),'personId':_0x1d71b9[_0x3a7e32(0x217)]};}else{const _0x5c6d58={'memberId':_0x7cf503,'unitId':_0x3face3,'content':_0x9cd30c,'mention':_0x2d009f},_0x49e4d4=await this[_0x3a7e32(0x1e8)][_0x3a7e32(0x205)]('/universer-api/comment/unit/'+_0x3face3+_0x3a7e32(0x1c7),{'body':_0x5c6d58});return Y(_0x49e4d4[_0x3a7e32(0x1d4)][_0x3a7e32(0x216)],_0x8084cf);}}async['updateComment'](_0x36e78d){const _0x16e338=_0x350e0a;var _0x3f540a,_0x36120d;const {text:_0x52c3d2,unitId:_0x46ecbd}=_0x36e78d,_0x7ea661=(_0x36120d=(_0x3f540a=_0x52c3d2[_0x16e338(0x1ea)])==null?void 0x0:_0x3f540a[_0x16e338(0x202)](_0x416680=>_0x416680[_0x16e338(0x200)]===c[_0x16e338(0x1e0)][_0x16e338(0x1fd)])[_0x16e338(0x1af)](_0x3a5473=>_0x3a5473[_0x16e338(0x1b7)]))!=null?_0x36120d:[],_0x178d30=JSON[_0x16e338(0x1d6)](_0x52c3d2),_0xb3d528=_0x36e78d[_0x16e338(0x208)],_0x14c1a4=_0x36e78d['id'],_0x5162a6={'memberId':(await this[_0x16e338(0x225)]['requireSession'](_0x46ecbd))['getMemberID'](),'unitId':_0x46ecbd,'threadId':_0xb3d528,'mention':_0x7ea661,'content':_0x178d30,'replyId':_0x14c1a4},_0x2c0737=await this[_0x16e338(0x1e8)]['post'](_0x16e338(0x201)+_0x46ecbd+_0x16e338(0x214),{'body':_0x5162a6});return!_0x2c0737[_0x16e338(0x1d4)]['error']||_0x2c0737[_0x16e338(0x1d4)][_0x16e338(0x1db)][_0x16e338(0x1f8)]===0x1;}async[_0x350e0a(0x1ec)](_0xddecd6){const _0xa85d16=_0x350e0a,{unitId:_0x5da228}=_0xddecd6,_0x11ccf8=_0xddecd6[_0xa85d16(0x208)],_0x80bc7f={'memberId':this[_0xa85d16(0x1d9)][_0xa85d16(0x1bc)]()[_0xa85d16(0x1bf)],'unitId':_0x5da228,'threadId':_0x11ccf8,'solved':_0xddecd6[_0xa85d16(0x21f)]?I['Solved']:I[_0xa85d16(0x1b4)]},_0x2d2501=await this[_0xa85d16(0x1e8)][_0xa85d16(0x205)](_0xa85d16(0x201)+_0x5da228+_0xa85d16(0x1d1),{'body':_0x80bc7f});return!_0x2d2501['body'][_0xa85d16(0x1db)]||_0x2d2501['body'][_0xa85d16(0x1db)]['code']===0x1;}async['deleteComment'](_0x3b07ae,_0xbb72b9,_0x4a5942,_0x69de27){const _0x4f7985=_0x350e0a,_0x5b2266={'memberId':(await this[_0x4f7985(0x225)][_0x4f7985(0x1e9)](_0x3b07ae))['getMemberID'](),'threadId':_0x4a5942,'replyId':_0x69de27,'unitId':_0x3b07ae},_0xe19a53=await this['_httpService']['post'](_0x4f7985(0x201)+_0x3b07ae+_0x4f7985(0x1de),{'body':_0x5b2266});return!_0xe19a53[_0x4f7985(0x1d4)][_0x4f7985(0x1db)]||_0xe19a53[_0x4f7985(0x1d4)]['error']['code']===0x1;}async[_0x350e0a(0x1f2)](_0x4345a6,_0x14a293,_0x2c7ceb){const _0x392680=_0x350e0a,_0x3fe90d={'unitId':_0x4345a6,'threadId':_0x2c7ceb},_0x270c0c=await this['_httpService'][_0x392680(0x205)](_0x392680(0x201)+_0x4345a6+_0x392680(0x1b5),{'body':_0x3fe90d}),_0xd55bc5=_0x2c7ceb[_0x392680(0x1af)](_0x3c6aaf=>G(_0x270c0c[_0x392680(0x1d4)][_0x392680(0x1cf)][_0x3c6aaf],_0x4345a6,_0x14a293))[_0x392680(0x202)](Boolean);return Object['values'](_0x270c0c['body'][_0x392680(0x204)])[_0x392680(0x218)](_0x5de9df=>{const _0x24a4e9=_0x392680;this[_0x24a4e9(0x1d9)]['addUser'](_0x5de9df);}),_0xd55bc5;}['saveCommentToSnapshot'](_0x483c68){const _0xc7afee=_0x350e0a;return{'id':_0x483c68['id'],'threadId':_0x483c68[_0xc7afee(0x208)],'ref':_0x483c68[_0xc7afee(0x1f4)]};}};g=x([_(0x0,c[_0x350e0a(0x1bb)](P[_0x350e0a(0x1e7)])),_(0x1,c[_0x350e0a(0x1bb)](c[_0x350e0a(0x1f6)])),_(0x2,c['Inject'](b[_0x350e0a(0x1e3)])),_(0x3,c[_0x350e0a(0x1bb)](c['Injector']))],g);var H=Object[_0x350e0a(0x1ad)],J=(_0x3422f2,_0x188eef,_0x4958c4,_0x4b62a2)=>{const _0x84b886=_0x350e0a;for(var _0x32b621=_0x4b62a2>0x1?void 0x0:_0x4b62a2?H(_0x188eef,_0x4958c4):_0x188eef,_0x1c1c26=_0x3422f2[_0x84b886(0x1ca)]-0x1,_0xa3768c;_0x1c1c26>=0x0;_0x1c1c26--)(_0xa3768c=_0x3422f2[_0x1c1c26])&&(_0x32b621=_0xa3768c(_0x32b621)||_0x32b621);return _0x32b621;},y=(_0x5b4ca4,_0x11a451)=>(_0x15551d,_0x360f6c)=>_0x11a451(_0x15551d,_0x360f6c,_0x5b4ca4);let C=class extends c['Disposable']{constructor(_0x4891a1,_0x4798d0){const _0x30f266=_0x350e0a;super(),this[_0x30f266(0x211)]=_0x4891a1,this[_0x30f266(0x1da)]=_0x4798d0,this[_0x30f266(0x21a)]();}[_0x350e0a(0x21a)](){const _0x3f46d0=_0x350e0a;this[_0x3f46d0(0x211)][_0x3f46d0(0x21d)]=this[_0x3f46d0(0x1da)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x350e0a(0x1e1)]),y(0x1,c['Inject'](g))],C);function _0x3deb(_0x380944,_0x3d39c5){const _0x621387=_0x6213();return _0x3deb=function(_0x3debbd,_0x4fe00f){_0x3debbd=_0x3debbd-0x1ad;let _0x57266b=_0x621387[_0x3debbd];return _0x57266b;},_0x3deb(_0x380944,_0x3d39c5);}var F=Object[_0x350e0a(0x1b6)],L=Object[_0x350e0a(0x1ad)],Z=(_0x5078f7,_0x210dfb,_0xc6f117)=>_0x210dfb in _0x5078f7?F(_0x5078f7,_0x210dfb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xc6f117}):_0x5078f7[_0x210dfb]=_0xc6f117,W=(_0x38217b,_0x7e1625,_0x570f83,_0x3cd66c)=>{const _0x247942=_0x350e0a;for(var _0x26249f=_0x3cd66c>0x1?void 0x0:_0x3cd66c?L(_0x7e1625,_0x570f83):_0x7e1625,_0x5e20a1=_0x38217b[_0x247942(0x1ca)]-0x1,_0x14032f;_0x5e20a1>=0x0;_0x5e20a1--)(_0x14032f=_0x38217b[_0x5e20a1])&&(_0x26249f=_0x14032f(_0x26249f)||_0x26249f);return _0x26249f;},O=(_0xea6060,_0xfc08f2)=>(_0x578d89,_0x1a0cce)=>_0xfc08f2(_0x578d89,_0x1a0cce,_0xea6060),N=(_0x318db4,_0x3e8fcd,_0x1204d1)=>Z(_0x318db4,typeof _0x3e8fcd!=_0x350e0a(0x21b)?_0x3e8fcd+'':_0x3e8fcd,_0x1204d1);exports[_0x350e0a(0x1c6)]=class extends c[_0x350e0a(0x210)]{constructor(_0x2ec87d=D,_0x16a19d,_0x193816){const _0x2de292=_0x350e0a;super(),this[_0x2de292(0x1fa)]=_0x2ec87d,this[_0x2de292(0x21c)]=_0x16a19d,this[_0x2de292(0x1f1)]=_0x193816;const {..._0x28e782}=c['merge']({},D,this[_0x2de292(0x1fa)]);this[_0x2de292(0x1f1)]['setConfig'](q,_0x28e782);}[_0x350e0a(0x1e6)](){const _0x461aac=_0x350e0a;[[g],[C],[p]][_0x461aac(0x218)](_0x1cf5b8=>{const _0x491e1a=_0x461aac;this['_injector'][_0x491e1a(0x1d7)](_0x1cf5b8);});}[_0x350e0a(0x1b9)](){const _0x566094=_0x350e0a;this['_injector'][_0x566094(0x1fe)](C),this[_0x566094(0x21c)][_0x566094(0x1fe)](p);}},N(exports[_0x350e0a(0x1c6)],_0x350e0a(0x1c0),U),N(exports[_0x350e0a(0x1c6)],'type',c[_0x350e0a(0x1f5)][_0x350e0a(0x1f9)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x350e0a(0x1fc)](j[_0x350e0a(0x1d2)],b[_0x350e0a(0x20c)],T[_0x350e0a(0x1d5)]),O(0x1,c['Inject'](c[_0x350e0a(0x1f0)])),O(0x2,c[_0x350e0a(0x213)])],exports[_0x350e0a(0x1c6)]);
1
+ 'use strict';function _0x161a(){const _0x396c16=['Module','getUnit','/universer-api/user/list','76QeXvsQ','getMemberID','/solved','_commentService','UniverThreadCommentUIPlugin','_userService','/delete','createTimestamp','syncUpdateMutationToColla','addComment','userId','updateComment','Solved','thread-comment-data-source.config','saveCommentToSnapshot','symbol','IConfigService','86218GrvNys','_config','parse','587322JFLxHr','replies','unitId','getUser','solved','subscribe','UniverInstanceType','Plugin','format','pluginName','payload','UniverCollaborationClientPlugin','defineProperty','toStringTag','post','filter','UniverLicensePlugin','parentId','UserManagerService','threadId','resolved','get','Disposable','bufferTime','/list','UniverThreadCommentDataSourcePlugin','DependentOn','COMMENT','map','values','HTTPService','CustomRangeType','IThreadCommentDataSourceService','_initDataSource','_threadCommentDataSource','546423jIQSHV','code','onReady','deleteComment','requireSession','_initUserSync','45feJDYl','add','forEach','353978NvHrrU','getComment','rangeType','userID','Injector','_threadCommentDataSourceService','UNIVER_UNKNOWN','rangeId','replyId','OpenOrReOpen','/universer-api/comment/unit/','1fOkwle','length','_injector','Add','error','_init','173440JnsrCI','330XzqxHD','content','/add','resolveComment','/reply','Reply','size','_threadCommentModel','body','merge','Edit','find','root','dayjs','Delete','addUser','getOwnPropertyDescriptor','Unknown','UNRECOGNIZED','_httpService','customRanges','user','Solve','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','setConfig','56395IMAMil','commentUpdate$','disposeWithMe','listComments','217665yxKsAE','comment','comments','type','Inject','getCurrentUser','_sessionService','stringify'];_0x161a=function(){return _0x396c16;};return _0x161a();}const _0x45f004=_0x11a1;(function(_0x426e38,_0x5342ed){const _0x4a0224=_0x11a1,_0x4d3b0b=_0x426e38();while(!![]){try{const _0x42a89b=parseInt(_0x4a0224(0xbc))/0x1*(parseInt(_0x4a0224(0xb1))/0x2)+parseInt(_0x4a0224(0xa8))/0x3+-parseInt(_0x4a0224(0xeb))/0x4*(-parseInt(_0x4a0224(0xdc))/0x5)+-parseInt(_0x4a0224(0x85))/0x6+parseInt(_0x4a0224(0xe0))/0x7+-parseInt(_0x4a0224(0xc2))/0x8*(parseInt(_0x4a0224(0xae))/0x9)+-parseInt(_0x4a0224(0xc3))/0xa*(parseInt(_0x4a0224(0x82))/0xb);if(_0x42a89b===_0x5342ed)break;else _0x4d3b0b['push'](_0x4d3b0b['shift']());}catch(_0x245303){_0x4d3b0b['push'](_0x4d3b0b['shift']());}}}(_0x161a,0x22141));function _0x11a1(_0x344031,_0x1ae23e){const _0x161a2f=_0x161a();return _0x11a1=function(_0x11a159,_0x242ace){_0x11a159=_0x11a159-0x7b;let _0x8d27b7=_0x161a2f[_0x11a159];return _0x8d27b7;},_0x11a1(_0x344031,_0x1ae23e);}Object[_0x45f004(0x91)](exports,Symbol[_0x45f004(0x92)],{'value':_0x45f004(0xe8)});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=_0x45f004(0xda);var I=(_0x408f74=>(_0x408f74[_0x408f74[_0x45f004(0xba)]=0x0]=_0x45f004(0xba),_0x408f74[_0x408f74[_0x45f004(0x7d)]=0x1]=_0x45f004(0x7d),_0x408f74[_0x408f74[_0x45f004(0xd5)]=-0x1]=_0x45f004(0xd5),_0x408f74))(I||{}),v=(_0x44637e=>(_0x44637e[_0x44637e[_0x45f004(0xd4)]=0x0]=_0x45f004(0xd4),_0x44637e[_0x44637e[_0x45f004(0xbf)]=0x1]=_0x45f004(0xbf),_0x44637e[_0x44637e[_0x45f004(0xc8)]=0x2]=_0x45f004(0xc8),_0x44637e[_0x44637e[_0x45f004(0xcd)]=0x3]=_0x45f004(0xcd),_0x44637e[_0x44637e[_0x45f004(0xd1)]=0x4]='Delete',_0x44637e[_0x44637e['Solve']=0x5]=_0x45f004(0xd9),_0x44637e[_0x44637e[_0x45f004(0xd5)]=-0x1]='UNRECOGNIZED',_0x44637e))(v||{});const f=_0x52dc62=>c[_0x45f004(0xd0)](new Date(+_0x52dc62))[_0x45f004(0x8d)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x3b5a92,_0x30e8ed)=>{const _0x5530e3=_0x45f004,_0x5d4117=_0x3b5a92[_0x5530e3(0x9a)](c[_0x5530e3(0x97)]),_0x1e6e9f=_0x3b5a92[_0x5530e3(0x9a)](P[_0x5530e3(0xa3)]);_0x30e8ed['forEach'](_0x1ca309=>{const _0x27de68=_0x5530e3;_0x5d4117[_0x27de68(0x88)](_0x1ca309)&&_0x30e8ed['delete'](_0x1ca309);}),_0x30e8ed[_0x5530e3(0xc9)]&&(await _0x1e6e9f[_0x5530e3(0x9a)](_0x5530e3(0xea),{'params':{'userIDs':[..._0x30e8ed]}}))[_0x5530e3(0xcb)]['users'][_0x5530e3(0xb0)](_0x34e684=>{_0x34e684&&_0x5d4117['addUser'](_0x34e684);});};var $=Object[_0x45f004(0xd3)],E=(_0x466644,_0x577342,_0x49d696,_0x11ac6f)=>{const _0x52bdcb=_0x45f004;for(var _0x1c652c=_0x11ac6f>0x1?void 0x0:_0x11ac6f?$(_0x577342,_0x49d696):_0x577342,_0xd8bbef=_0x466644[_0x52bdcb(0xbd)]-0x1,_0x134a63;_0xd8bbef>=0x0;_0xd8bbef--)(_0x134a63=_0x466644[_0xd8bbef])&&(_0x1c652c=_0x134a63(_0x1c652c)||_0x1c652c);return _0x1c652c;},S=(_0x2c3a04,_0x57ddfb)=>(_0x14e24a,_0x544d67)=>_0x57ddfb(_0x14e24a,_0x544d67,_0x2c3a04);let p=class extends c[_0x45f004(0x9b)]{constructor(_0x1b6107,_0x143260,_0x43021c,_0x56d6f9){const _0x34feb2=_0x45f004;super(),this[_0x34feb2(0xee)]=_0x1b6107,this[_0x34feb2(0xca)]=_0x143260,this[_0x34feb2(0xf0)]=_0x43021c,this[_0x34feb2(0xbe)]=_0x56d6f9,this[_0x34feb2(0xc1)](),this[_0x34feb2(0xad)]();}[_0x45f004(0xad)](){const _0x4fbb3b=_0x45f004;this[_0x4fbb3b(0xde)](this[_0x4fbb3b(0xca)]['commentUpdate$']['pipe'](w[_0x4fbb3b(0x9c)](0x10))['subscribe'](_0x5cd6d9=>{const _0x2a90ab=_0x4fbb3b,_0x3f6805=new Set();_0x5cd6d9[_0x2a90ab(0xb0)](_0x386b45=>{const _0x1b1107=_0x2a90ab;switch(_0x386b45['type']){case _0x1b1107(0xaf):{const _0x38c2ef=_0x386b45[_0x1b1107(0x8f)]['personId'];_0x3f6805[_0x1b1107(0xaf)](_0x38c2ef);break;}}}),R(this[_0x2a90ab(0xbe)],_0x3f6805);}));}['_init'](){const _0x4874d6=_0x45f004;this[_0x4874d6(0xde)](this[_0x4874d6(0xee)][_0x4874d6(0xdd)][_0x4874d6(0x8a)](async _0x28488=>{const _0x3c5907=_0x4874d6;var _0x2348f9,_0x12466a,_0x10fee9,_0x164b19;const _0x3a8554=(_0x2348f9=this[_0x3c5907(0xca)][_0x3c5907(0xe9)](_0x28488['unitId'])[_0x3c5907(0xce)](_0x45a80d=>_0x45a80d['threadId']===_0x28488[_0x3c5907(0x98)]))==null?void 0x0:_0x2348f9[_0x3c5907(0xcf)];if(!_0x3a8554)return;const {unitId:_0x4386cb,subUnitId:_0x3fe8ad}=_0x3a8554;switch(_0x28488['user']&&this[_0x3c5907(0xf0)][_0x3c5907(0xd2)](_0x28488['user']),_0x28488[_0x3c5907(0xe3)]){case v['Add']:break;case v[_0x3c5907(0xc8)]:{this[_0x3c5907(0xca)][_0x3c5907(0xf4)](_0x4386cb,_0x3fe8ad,{'unitId':_0x4386cb,'subUnitId':_0x3fe8ad,'ref':'','id':_0x28488[_0x3c5907(0xb9)],'dT':f(+_0x28488[_0x3c5907(0xf2)]),'threadId':_0x28488[_0x3c5907(0x98)],'personId':(_0x10fee9=(_0x12466a=_0x28488[_0x3c5907(0xd8)])==null?void 0x0:_0x12466a['userID'])!=null?_0x10fee9:_0x28488[_0x3c5907(0x7b)],'text':JSON[_0x3c5907(0x84)](_0x28488[_0x3c5907(0xc4)]),'parentId':_0x3a8554['id']});break;}case v['Delete']:{const _0x16fb91=this[_0x3c5907(0xca)][_0x3c5907(0xb2)](_0x4386cb,_0x3fe8ad,_0x28488[_0x3c5907(0xb9)]);_0x16fb91&&_0x16fb91[_0x3c5907(0x96)]&&this['_threadCommentModel'][_0x3c5907(0xab)](_0x4386cb,_0x3fe8ad,_0x28488[_0x3c5907(0xb9)]);break;}case v[_0x3c5907(0xcd)]:{this[_0x3c5907(0xca)][_0x3c5907(0x7c)](_0x4386cb,_0x3fe8ad,{'commentId':_0x28488[_0x3c5907(0xb9)],'text':JSON['parse'](_0x28488[_0x3c5907(0xc4)])});break;}case v[_0x3c5907(0xd9)]:{const _0x291e34=(_0x164b19=this['_threadCommentModel'][_0x3c5907(0xe9)](_0x28488[_0x3c5907(0x87)])['find'](_0x2840c7=>_0x2840c7['threadId']===_0x28488['threadId']))==null?void 0x0:_0x164b19['root'];_0x291e34&&this[_0x3c5907(0xca)][_0x3c5907(0xc6)](_0x4386cb,_0x3fe8ad,_0x291e34['id'],_0x28488[_0x3c5907(0x89)]===I[_0x3c5907(0x7d)]);break;}}}));}};p=E([S(0x0,c[_0x45f004(0xe4)](b['CommentService'])),S(0x1,c['Inject'](M['ThreadCommentModel'])),S(0x2,c[_0x45f004(0xe4)](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x45f004(0xb5)]))],p);const q=_0x45f004(0x7e),D={};var A=Object[_0x45f004(0xd3)],x=(_0x2c2da9,_0x4c4d10,_0x5d78d3,_0x49f4e1)=>{const _0x32e890=_0x45f004;for(var _0x338b86=_0x49f4e1>0x1?void 0x0:_0x49f4e1?A(_0x4c4d10,_0x5d78d3):_0x4c4d10,_0x14909f=_0x2c2da9[_0x32e890(0xbd)]-0x1,_0x21e484;_0x14909f>=0x0;_0x14909f--)(_0x21e484=_0x2c2da9[_0x14909f])&&(_0x338b86=_0x21e484(_0x338b86)||_0x338b86);return _0x338b86;},_=(_0xc3b227,_0xddc7a2)=>(_0x455fdb,_0x10d649)=>_0xddc7a2(_0x455fdb,_0x10d649,_0xc3b227);function Y(_0x5b5fc2,_0x18cf83){const _0x10ddc6=_0x45f004,_0x2e1446=_0x5b5fc2[_0x10ddc6(0x86)][0x0];return{..._0x18cf83,'id':_0x2e1446[_0x10ddc6(0xb9)],'resolved':_0x5b5fc2[_0x10ddc6(0x89)]===0x1,'dT':f(_0x2e1446[_0x10ddc6(0xf2)]),'personId':_0x2e1446[_0x10ddc6(0x7b)],'threadId':_0x2e1446[_0x10ddc6(0x98)]};}function G(_0x25b3de,_0x10bfa2,_0x592d0f){const _0x5b5b12=_0x45f004;var _0xb4e3b1,_0x588c61;if(((_0x588c61=(_0xb4e3b1=_0x25b3de==null?void 0x0:_0x25b3de[_0x5b5b12(0x86)])==null?void 0x0:_0xb4e3b1['length'])!=null?_0x588c61:0x0)>0x0){const _0x42c4ed=(_0x33632b,_0x425921)=>({'id':_0x33632b[_0x5b5b12(0xb9)],'threadId':_0x33632b[_0x5b5b12(0x98)],'dT':f(_0x33632b[_0x5b5b12(0xf2)]),'personId':_0x33632b[_0x5b5b12(0x7b)],'resolved':_0x25b3de['solved']===I['Solved'],'unitId':_0x10bfa2,'subUnitId':_0x592d0f,'text':JSON['parse'](_0x33632b['content']),'parentId':_0x425921}),_0x2ebe19=_0x42c4ed(_0x25b3de[_0x5b5b12(0x86)][0x0]);return{..._0x2ebe19,'children':_0x25b3de['replies']['slice'](0x1)[_0x5b5b12(0xa1)](_0x20b1f6=>_0x42c4ed(_0x20b1f6,_0x2ebe19['id']))};}return null;}let g=class{constructor(_0x319ebb,_0x41dec7,_0x10b267,_0x1fa59b){const _0x1c14a0=_0x45f004;this[_0x1c14a0(0xd6)]=_0x319ebb,this['_userService']=_0x41dec7,this[_0x1c14a0(0xe6)]=_0x10b267,this[_0x1c14a0(0xbe)]=_0x1fa59b;}async[_0x45f004(0xf4)](_0x420e19){const _0x33fe8e=_0x45f004;var _0x147650,_0x39bc88;const {parentId:_0x123431,unitId:_0x404fcb,text:_0x54fda5,threadId:_0x3efc96}=_0x420e19,_0x144c40=(_0x39bc88=(_0x147650=_0x54fda5[_0x33fe8e(0xd7)])==null?void 0x0:_0x147650[_0x33fe8e(0x94)](_0x73ffbc=>_0x73ffbc['rangeType']===c['CustomRangeType'][_0x33fe8e(0xa0)])[_0x33fe8e(0xa1)](_0x3af34f=>_0x3af34f['rangeId']))!=null?_0x39bc88:[],_0x14b138=JSON[_0x33fe8e(0xe7)](_0x54fda5),_0xcff443=(await this[_0x33fe8e(0xe6)]['requireSession'](_0x404fcb))[_0x33fe8e(0xec)]();if(_0x123431){const _0x2c7397={'memberId':_0xcff443,'unitId':_0x404fcb,'content':_0x14b138,'mention':_0x144c40,'threadId':_0x3efc96},_0x2d5409=(await this[_0x33fe8e(0xd6)][_0x33fe8e(0x93)](_0x33fe8e(0xbb)+_0x404fcb+_0x33fe8e(0xc7),{'body':_0x2c7397}))[_0x33fe8e(0xcb)]['reply'];return{..._0x420e19,'id':_0x2d5409['replyId'],'dT':c[_0x33fe8e(0xd0)](+_0x2d5409[_0x33fe8e(0xf2)])[_0x33fe8e(0x8d)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2d5409[_0x33fe8e(0x7b)]};}else{const _0x4c0541={'memberId':_0xcff443,'unitId':_0x404fcb,'content':_0x14b138,'mention':_0x144c40},_0x1e9726=await this[_0x33fe8e(0xd6)]['post'](_0x33fe8e(0xbb)+_0x404fcb+_0x33fe8e(0xc5),{'body':_0x4c0541});return Y(_0x1e9726[_0x33fe8e(0xcb)][_0x33fe8e(0xe1)],_0x420e19);}}async[_0x45f004(0x7c)](_0x4ec422){const _0x28498d=_0x45f004;var _0x47252a,_0xe56b3a;const {text:_0x2e2e1e,unitId:_0x21a944}=_0x4ec422,_0x3e433f=(_0xe56b3a=(_0x47252a=_0x2e2e1e['customRanges'])==null?void 0x0:_0x47252a[_0x28498d(0x94)](_0x2feefc=>_0x2feefc[_0x28498d(0xb3)]===c[_0x28498d(0xa4)]['COMMENT'])[_0x28498d(0xa1)](_0x17899f=>_0x17899f[_0x28498d(0xb8)]))!=null?_0xe56b3a:[],_0x187191=JSON['stringify'](_0x2e2e1e),_0x4e9969=_0x4ec422['threadId'],_0xdc7a90=_0x4ec422['id'],_0x9b3369={'memberId':(await this['_sessionService'][_0x28498d(0xac)](_0x21a944))[_0x28498d(0xec)](),'unitId':_0x21a944,'threadId':_0x4e9969,'mention':_0x3e433f,'content':_0x187191,'replyId':_0xdc7a90},_0x5aa58a=await this['_httpService']['post'](_0x28498d(0xbb)+_0x21a944+'/edit',{'body':_0x9b3369});return!_0x5aa58a[_0x28498d(0xcb)][_0x28498d(0xc0)]||_0x5aa58a[_0x28498d(0xcb)][_0x28498d(0xc0)][_0x28498d(0xa9)]===0x1;}async[_0x45f004(0xc6)](_0x29a8ec){const _0x4d3342=_0x45f004,{unitId:_0x36b580}=_0x29a8ec,_0x33932e=_0x29a8ec['threadId'],_0x5bc336={'memberId':this['_userService'][_0x4d3342(0xe5)]()[_0x4d3342(0xb4)],'unitId':_0x36b580,'threadId':_0x33932e,'solved':_0x29a8ec[_0x4d3342(0x99)]?I['Solved']:I[_0x4d3342(0xba)]},_0x27aa3f=await this['_httpService'][_0x4d3342(0x93)](_0x4d3342(0xbb)+_0x36b580+_0x4d3342(0xed),{'body':_0x5bc336});return!_0x27aa3f[_0x4d3342(0xcb)]['error']||_0x27aa3f[_0x4d3342(0xcb)]['error'][_0x4d3342(0xa9)]===0x1;}async[_0x45f004(0xab)](_0x21fae9,_0x2e880c,_0x4d5103,_0x4da26b){const _0xfbcf7f=_0x45f004,_0x3333ea={'memberId':(await this[_0xfbcf7f(0xe6)]['requireSession'](_0x21fae9))[_0xfbcf7f(0xec)](),'threadId':_0x4d5103,'replyId':_0x4da26b,'unitId':_0x21fae9},_0x124be7=await this[_0xfbcf7f(0xd6)][_0xfbcf7f(0x93)](_0xfbcf7f(0xbb)+_0x21fae9+_0xfbcf7f(0xf1),{'body':_0x3333ea});return!_0x124be7['body'][_0xfbcf7f(0xc0)]||_0x124be7[_0xfbcf7f(0xcb)]['error'][_0xfbcf7f(0xa9)]===0x1;}async[_0x45f004(0xdf)](_0x44b512,_0x7d40d9,_0x45a5d0){const _0xbfbd37=_0x45f004,_0x5e9819={'unitId':_0x44b512,'threadId':_0x45a5d0},_0x205e30=await this[_0xbfbd37(0xd6)][_0xbfbd37(0x93)](_0xbfbd37(0xbb)+_0x44b512+_0xbfbd37(0x9d),{'body':_0x5e9819}),_0x45374b=_0x45a5d0['map'](_0x47cd05=>G(_0x205e30[_0xbfbd37(0xcb)][_0xbfbd37(0xe2)][_0x47cd05],_0x44b512,_0x7d40d9))[_0xbfbd37(0x94)](Boolean);return Object[_0xbfbd37(0xa2)](_0x205e30[_0xbfbd37(0xcb)]['users'])[_0xbfbd37(0xb0)](_0x27d128=>{const _0x472d98=_0xbfbd37;this[_0x472d98(0xf0)][_0x472d98(0xd2)](_0x27d128);}),_0x45374b;}[_0x45f004(0x7f)](_0x5ae77){const _0x2aa8dd=_0x45f004;return{'id':_0x5ae77['id'],'threadId':_0x5ae77[_0x2aa8dd(0x98)],'ref':_0x5ae77['ref']};}};g=x([_(0x0,c[_0x45f004(0xe4)](P[_0x45f004(0xa3)])),_(0x1,c[_0x45f004(0xe4)](c[_0x45f004(0x97)])),_(0x2,c[_0x45f004(0xe4)](b['CollaborationSessionService'])),_(0x3,c[_0x45f004(0xe4)](c[_0x45f004(0xb5)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x216b7d,_0x5ed629,_0x8aa81d,_0x20d2b1)=>{const _0x6d5dd1=_0x45f004;for(var _0x167002=_0x20d2b1>0x1?void 0x0:_0x20d2b1?H(_0x5ed629,_0x8aa81d):_0x5ed629,_0x1a64a8=_0x216b7d[_0x6d5dd1(0xbd)]-0x1,_0x5a7c70;_0x1a64a8>=0x0;_0x1a64a8--)(_0x5a7c70=_0x216b7d[_0x1a64a8])&&(_0x167002=_0x5a7c70(_0x167002)||_0x167002);return _0x167002;},y=(_0x9846a8,_0x27ab5f)=>(_0x56c8dd,_0x5bd9c6)=>_0x27ab5f(_0x56c8dd,_0x5bd9c6,_0x9846a8);let C=class extends c[_0x45f004(0x9b)]{constructor(_0x14102a,_0x117b0c){const _0x5e9d47=_0x45f004;super(),this[_0x5e9d47(0xb6)]=_0x14102a,this[_0x5e9d47(0xa7)]=_0x117b0c,this[_0x5e9d47(0xa6)]();}[_0x45f004(0xa6)](){const _0x416390=_0x45f004;this[_0x416390(0xb6)]['dataSource']=this['_threadCommentDataSource'],this[_0x416390(0xb6)][_0x416390(0xf3)]=!0x1;}};C=J([y(0x0,M[_0x45f004(0xa5)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x45f004(0x91)],L=Object[_0x45f004(0xd3)],Z=(_0x11508b,_0x281916,_0x198f3b)=>_0x281916 in _0x11508b?F(_0x11508b,_0x281916,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x198f3b}):_0x11508b[_0x281916]=_0x198f3b,W=(_0x30b714,_0x3bd9a3,_0x584ff2,_0x4acd62)=>{const _0x423d81=_0x45f004;for(var _0x5abfde=_0x4acd62>0x1?void 0x0:_0x4acd62?L(_0x3bd9a3,_0x584ff2):_0x3bd9a3,_0x205bfb=_0x30b714[_0x423d81(0xbd)]-0x1,_0x4a5c8c;_0x205bfb>=0x0;_0x205bfb--)(_0x4a5c8c=_0x30b714[_0x205bfb])&&(_0x5abfde=_0x4a5c8c(_0x5abfde)||_0x5abfde);return _0x5abfde;},O=(_0x71d156,_0x2cdc90)=>(_0xa0b083,_0x45d4c1)=>_0x2cdc90(_0xa0b083,_0x45d4c1,_0x71d156),N=(_0x37eff9,_0x518455,_0x25f0ed)=>Z(_0x37eff9,typeof _0x518455!=_0x45f004(0x80)?_0x518455+'':_0x518455,_0x25f0ed);exports[_0x45f004(0x9e)]=class extends c[_0x45f004(0x8c)]{constructor(_0x1fcd64=D,_0x36f918,_0x515292){const _0x1a87b0=_0x45f004;super(),this[_0x1a87b0(0x83)]=_0x1fcd64,this['_injector']=_0x36f918,this['_configService']=_0x515292;const {..._0x5b32d3}=c[_0x1a87b0(0xcc)]({},D,this['_config']);this['_configService'][_0x1a87b0(0xdb)](q,_0x5b32d3);}['onStarting'](){const _0x230676=_0x45f004;[[g],[C],[p]][_0x230676(0xb0)](_0x5a86a6=>{const _0x99c7d=_0x230676;this[_0x99c7d(0xbe)]['add'](_0x5a86a6);});}[_0x45f004(0xaa)](){const _0x1bcf0e=_0x45f004;this['_injector'][_0x1bcf0e(0x9a)](C),this[_0x1bcf0e(0xbe)][_0x1bcf0e(0x9a)](p);}},N(exports[_0x45f004(0x9e)],_0x45f004(0x8e),U),N(exports[_0x45f004(0x9e)],_0x45f004(0xe3),c[_0x45f004(0x8b)][_0x45f004(0xb7)]),exports[_0x45f004(0x9e)]=W([c[_0x45f004(0x9f)](j[_0x45f004(0xef)],b[_0x45f004(0x90)],T[_0x45f004(0x95)]),O(0x1,c['Inject'](c[_0x45f004(0xb5)])),O(0x2,c[_0x45f004(0x81)])],exports[_0x45f004(0x9e)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x58fd22=_0x16ea;(function(_0x1b16e0,_0xb8f6c6){const _0xd61e42=_0x16ea,_0x38b61d=_0x1b16e0();while(!![]){try{const _0x453853=parseInt(_0xd61e42(0x15d))/0x1+-parseInt(_0xd61e42(0x1b1))/0x2*(parseInt(_0xd61e42(0x18b))/0x3)+parseInt(_0xd61e42(0x19e))/0x4*(parseInt(_0xd61e42(0x1b4))/0x5)+-parseInt(_0xd61e42(0x192))/0x6+-parseInt(_0xd61e42(0x179))/0x7*(-parseInt(_0xd61e42(0x195))/0x8)+parseInt(_0xd61e42(0x181))/0x9+parseInt(_0xd61e42(0x155))/0xa*(-parseInt(_0xd61e42(0x1a3))/0xb);if(_0x453853===_0xb8f6c6)break;else _0x38b61d['push'](_0x38b61d['shift']());}catch(_0x49645a){_0x38b61d['push'](_0x38b61d['shift']());}}}(_0xad37,0x6639a));import{CommentService as _0x5fbae9,CollaborationSessionService as _0x326a1a,UniverCollaborationClientPlugin as _0x37bf58}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x273301}from'@univerjs-pro/license';import{dayjs as _0x173349,UserManagerService as _0x2fbd9e,Inject as _0x4562eb,Injector as _0x585bfd,Disposable as _0x2a378a,CustomRangeType as _0x2eb19a,UniverInstanceType as _0x25802b,DependentOn as _0x501549,IConfigService as _0x2316e1,Plugin as _0x19daed,merge as _0x5457dd}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2240b0}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3f581d,IThreadCommentDataSourceService as _0x2dd5cd}from'@univerjs/thread-comment';import{bufferTime as _0x58c650}from'rxjs';import{HTTPService as _0x13a52b}from'@univerjs/network';const W=_0x58fd22(0x1ae);var I=(_0xe3eb80=>(_0xe3eb80[_0xe3eb80['OpenOrReOpen']=0x0]=_0x58fd22(0x19c),_0xe3eb80[_0xe3eb80[_0x58fd22(0x190)]=0x1]='Solved',_0xe3eb80[_0xe3eb80[_0x58fd22(0x183)]=-0x1]=_0x58fd22(0x183),_0xe3eb80))(I||{}),v=(_0x5930d8=>(_0x5930d8[_0x5930d8['Unknown']=0x0]='Unknown',_0x5930d8[_0x5930d8[_0x58fd22(0x19d)]=0x1]=_0x58fd22(0x19d),_0x5930d8[_0x5930d8['Reply']=0x2]='Reply',_0x5930d8[_0x5930d8[_0x58fd22(0x184)]=0x3]=_0x58fd22(0x184),_0x5930d8[_0x5930d8[_0x58fd22(0x16f)]=0x4]=_0x58fd22(0x16f),_0x5930d8[_0x5930d8[_0x58fd22(0x164)]=0x5]=_0x58fd22(0x164),_0x5930d8[_0x5930d8['UNRECOGNIZED']=-0x1]=_0x58fd22(0x183),_0x5930d8))(v||{});const D=_0x27e30b=>_0x173349(new Date(+_0x27e30b))[_0x58fd22(0x17e)](_0x58fd22(0x168)),B=async(_0x3ddb92,_0x191148)=>{const _0x821bb6=_0x58fd22,_0x326825=_0x3ddb92[_0x821bb6(0x1aa)](_0x2fbd9e),_0xb2a280=_0x3ddb92[_0x821bb6(0x1aa)](_0x13a52b);_0x191148[_0x821bb6(0x1b9)](_0x275beb=>{const _0x161776=_0x821bb6;_0x326825[_0x161776(0x18e)](_0x275beb)&&_0x191148['delete'](_0x275beb);}),_0x191148[_0x821bb6(0x176)]&&(await _0xb2a280[_0x821bb6(0x1aa)]('/universer-api/user/list',{'params':{'userIDs':[..._0x191148]}}))[_0x821bb6(0x16c)][_0x821bb6(0x19a)]['forEach'](_0x2b9ba0=>{_0x2b9ba0&&_0x326825['addUser'](_0x2b9ba0);});};var K=Object[_0x58fd22(0x1b6)],V=(_0x395dd9,_0x22196b,_0x23b540,_0x147bc5)=>{const _0x1211f9=_0x58fd22;for(var _0x13a604=_0x147bc5>0x1?void 0x0:_0x147bc5?K(_0x22196b,_0x23b540):_0x22196b,_0x385a50=_0x395dd9[_0x1211f9(0x17f)]-0x1,_0x294ad9;_0x385a50>=0x0;_0x385a50--)(_0x294ad9=_0x395dd9[_0x385a50])&&(_0x13a604=_0x294ad9(_0x13a604)||_0x13a604);return _0x13a604;},p=(_0x6e4e42,_0x567722)=>(_0x30f72f,_0x2a5ccb)=>_0x567722(_0x30f72f,_0x2a5ccb,_0x6e4e42);function _0xad37(){const _0x3cf088=['getUnit','1465155NIttkb','userId','UNRECOGNIZED','Edit','_commentService','map','_sessionService','find','pluginName','syncUpdateMutationToColla','1302nkDuMJ','parse','rangeType','getUser','addUser','Solved','/reply','2264154MKdtSe','/delete','saveCommentToSnapshot','89936eeprXG','subscribe','resolved','ref','error','users','updateComment','OpenOrReOpen','Add','8WhpeoO','thread-comment-data-source.config','deleteComment','onReady','requireSession','7953QWiczd','addComment','getMemberID','stringify','replies','content','UNIVER_UNKNOWN','get','pipe','onStarting','_config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','personId','replyId','966jCUVNH','_injector','filter','876790sVtOKK','Reply','getOwnPropertyDescriptor','_threadCommentDataSourceService','root','forEach','commentUpdate$','5190EuNQwj','/universer-api/comment/unit/','solved','userID','defineProperty','getComment','slice','setConfig','552645psvpyk','payload','/add','threadId','_httpService','parentId','createTimestamp','Solve','_userService','post','_initDataSource','YYYY/MM/DD\x20HH:mm','_init','add','customRanges','body','rangeId','resolveComment','Delete','COMMENT','/list','values','disposeWithMe','_threadCommentDataSource','type','size','code','comment','196lahryy','user','_threadCommentModel','/edit','listComments','format','length'];_0xad37=function(){return _0x3cf088;};return _0xad37();}let S=class extends _0x2a378a{constructor(_0x15698d,_0x15ba86,_0x456fd6,_0x4b26e2){const _0x26811e=_0x58fd22;super(),this[_0x26811e(0x185)]=_0x15698d,this[_0x26811e(0x17b)]=_0x15ba86,this[_0x26811e(0x165)]=_0x456fd6,this[_0x26811e(0x1b2)]=_0x4b26e2,this[_0x26811e(0x169)](),this['_initUserSync']();}['_initUserSync'](){const _0x1f7f45=_0x58fd22;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$'][_0x1f7f45(0x1ab)](_0x58c650(0x10))[_0x1f7f45(0x196)](_0x1b5190=>{const _0x9dbeee=_0x1f7f45,_0x330851=new Set();_0x1b5190[_0x9dbeee(0x1b9)](_0x1a86cf=>{const _0x569a5e=_0x9dbeee;switch(_0x1a86cf[_0x569a5e(0x175)]){case _0x569a5e(0x16a):{const _0x515c50=_0x1a86cf[_0x569a5e(0x15e)][_0x569a5e(0x1af)];_0x330851[_0x569a5e(0x16a)](_0x515c50);break;}}}),B(this['_injector'],_0x330851);}));}[_0x58fd22(0x169)](){const _0x2c052b=_0x58fd22;this[_0x2c052b(0x173)](this[_0x2c052b(0x185)][_0x2c052b(0x1ba)][_0x2c052b(0x196)](async _0x3bb92b=>{const _0x19bb49=_0x2c052b;var _0x12f6f6,_0x29b2c7,_0x3b3d2b,_0x3d4cca;const _0x3b3149=(_0x12f6f6=this[_0x19bb49(0x17b)]['getUnit'](_0x3bb92b['unitId'])[_0x19bb49(0x188)](_0x57d144=>_0x57d144[_0x19bb49(0x160)]===_0x3bb92b[_0x19bb49(0x160)]))==null?void 0x0:_0x12f6f6[_0x19bb49(0x1b8)];if(!_0x3b3149)return;const {unitId:_0x5b4b9a,subUnitId:_0xc4bc6a}=_0x3b3149;switch(_0x3bb92b['user']&&this['_userService'][_0x19bb49(0x18f)](_0x3bb92b['user']),_0x3bb92b[_0x19bb49(0x175)]){case v[_0x19bb49(0x19d)]:break;case v[_0x19bb49(0x1b5)]:{this[_0x19bb49(0x17b)][_0x19bb49(0x1a4)](_0x5b4b9a,_0xc4bc6a,{'unitId':_0x5b4b9a,'subUnitId':_0xc4bc6a,'ref':'','id':_0x3bb92b['replyId'],'dT':D(+_0x3bb92b[_0x19bb49(0x163)]),'threadId':_0x3bb92b[_0x19bb49(0x160)],'personId':(_0x3b3d2b=(_0x29b2c7=_0x3bb92b[_0x19bb49(0x17a)])==null?void 0x0:_0x29b2c7[_0x19bb49(0x158)])!=null?_0x3b3d2b:_0x3bb92b[_0x19bb49(0x182)],'text':JSON['parse'](_0x3bb92b[_0x19bb49(0x1a8)]),'parentId':_0x3b3149['id']});break;}case v['Delete']:{const _0x26b5d=this[_0x19bb49(0x17b)][_0x19bb49(0x15a)](_0x5b4b9a,_0xc4bc6a,_0x3bb92b[_0x19bb49(0x1b0)]);_0x26b5d&&_0x26b5d[_0x19bb49(0x162)]&&this['_threadCommentModel'][_0x19bb49(0x1a0)](_0x5b4b9a,_0xc4bc6a,_0x3bb92b['replyId']);break;}case v[_0x19bb49(0x184)]:{this[_0x19bb49(0x17b)][_0x19bb49(0x19b)](_0x5b4b9a,_0xc4bc6a,{'commentId':_0x3bb92b[_0x19bb49(0x1b0)],'text':JSON['parse'](_0x3bb92b[_0x19bb49(0x1a8)])});break;}case v['Solve']:{const _0x508438=(_0x3d4cca=this[_0x19bb49(0x17b)][_0x19bb49(0x180)](_0x3bb92b['unitId'])[_0x19bb49(0x188)](_0x663629=>_0x663629[_0x19bb49(0x160)]===_0x3bb92b[_0x19bb49(0x160)]))==null?void 0x0:_0x3d4cca['root'];_0x508438&&this[_0x19bb49(0x17b)][_0x19bb49(0x16e)](_0x5b4b9a,_0xc4bc6a,_0x508438['id'],_0x3bb92b[_0x19bb49(0x157)]===I[_0x19bb49(0x190)]);break;}}}));}};S=V([p(0x0,_0x4562eb(_0x5fbae9)),p(0x1,_0x4562eb(_0x3f581d)),p(0x2,_0x4562eb(_0x2fbd9e)),p(0x3,_0x4562eb(_0x585bfd))],S);const z=_0x58fd22(0x19f),M={};var k=Object[_0x58fd22(0x1b6)],Q=(_0x394dd7,_0x15f782,_0xcb43c9,_0x44157b)=>{const _0x597b23=_0x58fd22;for(var _0xf577bf=_0x44157b>0x1?void 0x0:_0x44157b?k(_0x15f782,_0xcb43c9):_0x15f782,_0x48d22c=_0x394dd7[_0x597b23(0x17f)]-0x1,_0x4c57fd;_0x48d22c>=0x0;_0x48d22c--)(_0x4c57fd=_0x394dd7[_0x48d22c])&&(_0xf577bf=_0x4c57fd(_0xf577bf)||_0xf577bf);return _0xf577bf;},_=(_0x40bd62,_0x56d04f)=>(_0x37b067,_0x28c342)=>_0x56d04f(_0x37b067,_0x28c342,_0x40bd62);function X(_0x2a90ab,_0x435890){const _0x52f859=_0x58fd22,_0x3402b7=_0x2a90ab['replies'][0x0];return{..._0x435890,'id':_0x3402b7[_0x52f859(0x1b0)],'resolved':_0x2a90ab[_0x52f859(0x157)]===0x1,'dT':D(_0x3402b7[_0x52f859(0x163)]),'personId':_0x3402b7[_0x52f859(0x182)],'threadId':_0x3402b7[_0x52f859(0x160)]};}function _0x16ea(_0x1dc657,_0x4995e3){const _0xad373f=_0xad37();return _0x16ea=function(_0x16ea38,_0x59514a){_0x16ea38=_0x16ea38-0x155;let _0x9f5d87=_0xad373f[_0x16ea38];return _0x9f5d87;},_0x16ea(_0x1dc657,_0x4995e3);}function ee(_0x1b8a43,_0x4962bb,_0x246040){const _0x458f0c=_0x58fd22;var _0x15b54e,_0x41b9c8;if(((_0x41b9c8=(_0x15b54e=_0x1b8a43==null?void 0x0:_0x1b8a43[_0x458f0c(0x1a7)])==null?void 0x0:_0x15b54e[_0x458f0c(0x17f)])!=null?_0x41b9c8:0x0)>0x0){const _0x3828d5=(_0x329919,_0x2ac365)=>({'id':_0x329919['replyId'],'threadId':_0x329919[_0x458f0c(0x160)],'dT':D(_0x329919[_0x458f0c(0x163)]),'personId':_0x329919['userId'],'resolved':_0x1b8a43[_0x458f0c(0x157)]===I[_0x458f0c(0x190)],'unitId':_0x4962bb,'subUnitId':_0x246040,'text':JSON[_0x458f0c(0x18c)](_0x329919[_0x458f0c(0x1a8)]),'parentId':_0x2ac365}),_0x5d9f87=_0x3828d5(_0x1b8a43[_0x458f0c(0x1a7)][0x0]);return{..._0x5d9f87,'children':_0x1b8a43[_0x458f0c(0x1a7)][_0x458f0c(0x15b)](0x1)[_0x458f0c(0x186)](_0x42d326=>_0x3828d5(_0x42d326,_0x5d9f87['id']))};}return null;}let f=class{constructor(_0x461529,_0x1cc612,_0x415457,_0x5dfa83){const _0x13a573=_0x58fd22;this['_httpService']=_0x461529,this[_0x13a573(0x165)]=_0x1cc612,this[_0x13a573(0x187)]=_0x415457,this['_injector']=_0x5dfa83;}async[_0x58fd22(0x1a4)](_0x41b4c6){const _0x496db8=_0x58fd22;var _0x394191,_0x8577f3;const {parentId:_0x235add,unitId:_0x2b2774,text:_0xfb5b0d,threadId:_0x24dd57}=_0x41b4c6,_0x5d69bc=(_0x8577f3=(_0x394191=_0xfb5b0d[_0x496db8(0x16b)])==null?void 0x0:_0x394191[_0x496db8(0x1b3)](_0x4eb990=>_0x4eb990[_0x496db8(0x18d)]===_0x2eb19a['COMMENT'])[_0x496db8(0x186)](_0x350f07=>_0x350f07[_0x496db8(0x16d)]))!=null?_0x8577f3:[],_0x10665a=JSON[_0x496db8(0x1a6)](_0xfb5b0d),_0x192f7f=(await this[_0x496db8(0x187)][_0x496db8(0x1a2)](_0x2b2774))['getMemberID']();if(_0x235add){const _0x31d8b5={'memberId':_0x192f7f,'unitId':_0x2b2774,'content':_0x10665a,'mention':_0x5d69bc,'threadId':_0x24dd57},_0x3111eb=(await this['_httpService'][_0x496db8(0x166)](_0x496db8(0x156)+_0x2b2774+_0x496db8(0x191),{'body':_0x31d8b5}))[_0x496db8(0x16c)]['reply'];return{..._0x41b4c6,'id':_0x3111eb[_0x496db8(0x1b0)],'dT':_0x173349(+_0x3111eb[_0x496db8(0x163)])[_0x496db8(0x17e)](_0x496db8(0x168)),'personId':_0x3111eb[_0x496db8(0x182)]};}else{const _0x36945d={'memberId':_0x192f7f,'unitId':_0x2b2774,'content':_0x10665a,'mention':_0x5d69bc},_0x20f370=await this['_httpService'][_0x496db8(0x166)](_0x496db8(0x156)+_0x2b2774+_0x496db8(0x15f),{'body':_0x36945d});return X(_0x20f370['body'][_0x496db8(0x178)],_0x41b4c6);}}async[_0x58fd22(0x19b)](_0x4230f0){const _0x29c86e=_0x58fd22;var _0x3f9a5a,_0xfb19a8;const {text:_0x16cbb3,unitId:_0x3a1001}=_0x4230f0,_0x1cbe7e=(_0xfb19a8=(_0x3f9a5a=_0x16cbb3[_0x29c86e(0x16b)])==null?void 0x0:_0x3f9a5a[_0x29c86e(0x1b3)](_0x11cd3b=>_0x11cd3b[_0x29c86e(0x18d)]===_0x2eb19a[_0x29c86e(0x170)])['map'](_0xbae054=>_0xbae054[_0x29c86e(0x16d)]))!=null?_0xfb19a8:[],_0x38e607=JSON[_0x29c86e(0x1a6)](_0x16cbb3),_0x9fdeaf=_0x4230f0[_0x29c86e(0x160)],_0x9a4aa7=_0x4230f0['id'],_0x3a087b={'memberId':(await this[_0x29c86e(0x187)]['requireSession'](_0x3a1001))[_0x29c86e(0x1a5)](),'unitId':_0x3a1001,'threadId':_0x9fdeaf,'mention':_0x1cbe7e,'content':_0x38e607,'replyId':_0x9a4aa7},_0x406b30=await this['_httpService'][_0x29c86e(0x166)]('/universer-api/comment/unit/'+_0x3a1001+_0x29c86e(0x17c),{'body':_0x3a087b});return!_0x406b30[_0x29c86e(0x16c)]['error']||_0x406b30[_0x29c86e(0x16c)][_0x29c86e(0x199)][_0x29c86e(0x177)]===0x1;}async[_0x58fd22(0x16e)](_0x1420b1){const _0x4efe60=_0x58fd22,{unitId:_0x3c7a60}=_0x1420b1,_0x16c72f=_0x1420b1[_0x4efe60(0x160)],_0x4206ed={'memberId':this['_userService']['getCurrentUser']()[_0x4efe60(0x158)],'unitId':_0x3c7a60,'threadId':_0x16c72f,'solved':_0x1420b1[_0x4efe60(0x197)]?I['Solved']:I[_0x4efe60(0x19c)]},_0x3702df=await this[_0x4efe60(0x161)][_0x4efe60(0x166)](_0x4efe60(0x156)+_0x3c7a60+'/solved',{'body':_0x4206ed});return!_0x3702df['body'][_0x4efe60(0x199)]||_0x3702df['body'][_0x4efe60(0x199)][_0x4efe60(0x177)]===0x1;}async['deleteComment'](_0x5a00ca,_0x3d6913,_0x2c5c78,_0x1b2209){const _0x4f5521=_0x58fd22,_0x2b0042={'memberId':(await this[_0x4f5521(0x187)][_0x4f5521(0x1a2)](_0x5a00ca))[_0x4f5521(0x1a5)](),'threadId':_0x2c5c78,'replyId':_0x1b2209,'unitId':_0x5a00ca},_0x56b6ab=await this[_0x4f5521(0x161)][_0x4f5521(0x166)](_0x4f5521(0x156)+_0x5a00ca+_0x4f5521(0x193),{'body':_0x2b0042});return!_0x56b6ab[_0x4f5521(0x16c)][_0x4f5521(0x199)]||_0x56b6ab[_0x4f5521(0x16c)]['error'][_0x4f5521(0x177)]===0x1;}async[_0x58fd22(0x17d)](_0x463ab3,_0x5a9bfd,_0x2c3185){const _0x2f9829=_0x58fd22,_0x5305d6={'unitId':_0x463ab3,'threadId':_0x2c3185},_0x2ea6fc=await this[_0x2f9829(0x161)][_0x2f9829(0x166)]('/universer-api/comment/unit/'+_0x463ab3+_0x2f9829(0x171),{'body':_0x5305d6}),_0x218675=_0x2c3185[_0x2f9829(0x186)](_0x25085c=>ee(_0x2ea6fc[_0x2f9829(0x16c)]['comments'][_0x25085c],_0x463ab3,_0x5a9bfd))[_0x2f9829(0x1b3)](Boolean);return Object[_0x2f9829(0x172)](_0x2ea6fc['body']['users'])[_0x2f9829(0x1b9)](_0x202a2e=>{const _0x41626c=_0x2f9829;this[_0x41626c(0x165)][_0x41626c(0x18f)](_0x202a2e);}),_0x218675;}[_0x58fd22(0x194)](_0x3c1d50){const _0x49e362=_0x58fd22;return{'id':_0x3c1d50['id'],'threadId':_0x3c1d50['threadId'],'ref':_0x3c1d50[_0x49e362(0x198)]};}};f=Q([_(0x0,_0x4562eb(_0x13a52b)),_(0x1,_0x4562eb(_0x2fbd9e)),_(0x2,_0x4562eb(_0x326a1a)),_(0x3,_0x4562eb(_0x585bfd))],f);var re=Object[_0x58fd22(0x1b6)],te=(_0x3e8d81,_0xdfad50,_0x32bccc,_0x507499)=>{const _0x207b61=_0x58fd22;for(var _0x3da565=_0x507499>0x1?void 0x0:_0x507499?re(_0xdfad50,_0x32bccc):_0xdfad50,_0x5b7280=_0x3e8d81[_0x207b61(0x17f)]-0x1,_0x6ef0ac;_0x5b7280>=0x0;_0x5b7280--)(_0x6ef0ac=_0x3e8d81[_0x5b7280])&&(_0x3da565=_0x6ef0ac(_0x3da565)||_0x3da565);return _0x3da565;},N=(_0xa46f4,_0x219765)=>(_0x10a144,_0x2d5b4d)=>_0x219765(_0x10a144,_0x2d5b4d,_0xa46f4);let g=class extends _0x2a378a{constructor(_0x599a52,_0x106610){const _0x410e0c=_0x58fd22;super(),this[_0x410e0c(0x1b7)]=_0x599a52,this[_0x410e0c(0x174)]=_0x106610,this['_initDataSource']();}[_0x58fd22(0x167)](){const _0x48f6ce=_0x58fd22;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x48f6ce(0x1b7)][_0x48f6ce(0x18a)]=!0x1;}};g=te([N(0x0,_0x2dd5cd),N(0x1,_0x4562eb(f))],g);var se=Object[_0x58fd22(0x159)],oe=Object[_0x58fd22(0x1b6)],ne=(_0x280a66,_0x59f894,_0x165366)=>_0x59f894 in _0x280a66?se(_0x280a66,_0x59f894,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x165366}):_0x280a66[_0x59f894]=_0x165366,ie=(_0x5df299,_0x231500,_0x32e302,_0x1cafd8)=>{const _0x1a777d=_0x58fd22;for(var _0x105164=_0x1cafd8>0x1?void 0x0:_0x1cafd8?oe(_0x231500,_0x32e302):_0x231500,_0x4a26ed=_0x5df299[_0x1a777d(0x17f)]-0x1,_0x2f3dbe;_0x4a26ed>=0x0;_0x4a26ed--)(_0x2f3dbe=_0x5df299[_0x4a26ed])&&(_0x105164=_0x2f3dbe(_0x105164)||_0x105164);return _0x105164;},w=(_0x299ef1,_0x6d2661)=>(_0x56f68c,_0x27bc63)=>_0x6d2661(_0x56f68c,_0x27bc63,_0x299ef1),$=(_0x1d591a,_0x5bc19b,_0x2f71d2)=>ne(_0x1d591a,typeof _0x5bc19b!='symbol'?_0x5bc19b+'':_0x5bc19b,_0x2f71d2);let b=class extends _0x19daed{constructor(_0xe6a8b8=M,_0x18f36c,_0x3e7e45){const _0x2d75db=_0x58fd22;super(),this[_0x2d75db(0x1ad)]=_0xe6a8b8,this[_0x2d75db(0x1b2)]=_0x18f36c,this['_configService']=_0x3e7e45;const {..._0x5a6823}=_0x5457dd({},M,this['_config']);this['_configService'][_0x2d75db(0x15c)](z,_0x5a6823);}[_0x58fd22(0x1ac)](){const _0x80950b=_0x58fd22;[[f],[g],[S]][_0x80950b(0x1b9)](_0x4416ce=>{const _0x36f6a5=_0x80950b;this['_injector'][_0x36f6a5(0x16a)](_0x4416ce);});}[_0x58fd22(0x1a1)](){const _0x57db93=_0x58fd22;this[_0x57db93(0x1b2)][_0x57db93(0x1aa)](g),this[_0x57db93(0x1b2)][_0x57db93(0x1aa)](S);}};$(b,_0x58fd22(0x189),W),$(b,_0x58fd22(0x175),_0x25802b[_0x58fd22(0x1a9)]),b=ie([_0x501549(_0x2240b0,_0x37bf58,_0x273301),w(0x1,_0x4562eb(_0x585bfd)),w(0x2,_0x2316e1)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ function _0x3d57(_0xe4c055,_0x47fc09){const _0x3533da=_0x3533();return _0x3d57=function(_0x3d5730,_0x3a8d47){_0x3d5730=_0x3d5730-0x7e;let _0x583c03=_0x3533da[_0x3d5730];return _0x583c03;},_0x3d57(_0xe4c055,_0x47fc09);}const _0x39886c=_0x3d57;(function(_0x378dfa,_0x155e36){const _0x4ff5cd=_0x3d57,_0x51cecd=_0x378dfa();while(!![]){try{const _0x88934c=-parseInt(_0x4ff5cd(0xb3))/0x1+parseInt(_0x4ff5cd(0xad))/0x2*(parseInt(_0x4ff5cd(0xd0))/0x3)+-parseInt(_0x4ff5cd(0xc6))/0x4+-parseInt(_0x4ff5cd(0x94))/0x5*(-parseInt(_0x4ff5cd(0xa9))/0x6)+-parseInt(_0x4ff5cd(0x7f))/0x7*(-parseInt(_0x4ff5cd(0xa2))/0x8)+-parseInt(_0x4ff5cd(0x7e))/0x9+parseInt(_0x4ff5cd(0xbf))/0xa;if(_0x88934c===_0x155e36)break;else _0x51cecd['push'](_0x51cecd['shift']());}catch(_0x394202){_0x51cecd['push'](_0x51cecd['shift']());}}}(_0x3533,0x91f21));import{CommentService as _0x5ec5d5,CollaborationSessionService as _0x2f98bf,UniverCollaborationClientPlugin as _0x1627d3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2b2705}from'@univerjs-pro/license';import{dayjs as _0x56943a,UserManagerService as _0x3307ae,Inject as _0x361c7c,Injector as _0x585345,Disposable as _0x41eace,CustomRangeType as _0x86fd2c,UniverInstanceType as _0x235ad1,DependentOn as _0x56b67b,IConfigService as _0x45f6f1,Plugin as _0x5da7bd,merge as _0x22fe1a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x230aaa}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x563c28,IThreadCommentDataSourceService as _0x852eb8}from'@univerjs/thread-comment';import{bufferTime as _0x4c3460}from'rxjs';import{HTTPService as _0x5c7a01}from'@univerjs/network';const W=_0x39886c(0xc8);var I=(_0x3162a0=>(_0x3162a0[_0x3162a0[_0x39886c(0x90)]=0x0]=_0x39886c(0x90),_0x3162a0[_0x3162a0[_0x39886c(0x80)]=0x1]=_0x39886c(0x80),_0x3162a0[_0x3162a0[_0x39886c(0xd7)]=-0x1]='UNRECOGNIZED',_0x3162a0))(I||{}),v=(_0x3b9353=>(_0x3b9353[_0x3b9353[_0x39886c(0x81)]=0x0]=_0x39886c(0x81),_0x3b9353[_0x3b9353[_0x39886c(0xc1)]=0x1]=_0x39886c(0xc1),_0x3b9353[_0x3b9353[_0x39886c(0x9a)]=0x2]=_0x39886c(0x9a),_0x3b9353[_0x3b9353[_0x39886c(0x84)]=0x3]=_0x39886c(0x84),_0x3b9353[_0x3b9353[_0x39886c(0x9d)]=0x4]=_0x39886c(0x9d),_0x3b9353[_0x3b9353[_0x39886c(0x89)]=0x5]='Solve',_0x3b9353[_0x3b9353[_0x39886c(0xd7)]=-0x1]='UNRECOGNIZED',_0x3b9353))(v||{});const D=_0x2baa93=>_0x56943a(new Date(+_0x2baa93))[_0x39886c(0x91)](_0x39886c(0xd8)),B=async(_0x59e396,_0x3b1f24)=>{const _0x1f0570=_0x39886c,_0x4ef7bd=_0x59e396['get'](_0x3307ae),_0x1a0c2e=_0x59e396[_0x1f0570(0xd5)](_0x5c7a01);_0x3b1f24[_0x1f0570(0xa3)](_0x24c803=>{const _0xb3dde8=_0x1f0570;_0x4ef7bd[_0xb3dde8(0xcb)](_0x24c803)&&_0x3b1f24[_0xb3dde8(0xb8)](_0x24c803);}),_0x3b1f24[_0x1f0570(0x9b)]&&(await _0x1a0c2e[_0x1f0570(0xd5)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3b1f24]}}))[_0x1f0570(0xb2)][_0x1f0570(0xd2)][_0x1f0570(0xa3)](_0x2c0dbf=>{const _0x16c451=_0x1f0570;_0x2c0dbf&&_0x4ef7bd[_0x16c451(0xd4)](_0x2c0dbf);});};var K=Object[_0x39886c(0xc0)],V=(_0x29a740,_0x44576b,_0x1ce186,_0x2e8a47)=>{const _0x401f71=_0x39886c;for(var _0x17eb9a=_0x2e8a47>0x1?void 0x0:_0x2e8a47?K(_0x44576b,_0x1ce186):_0x44576b,_0x9e4b3a=_0x29a740[_0x401f71(0xa1)]-0x1,_0x3dd2dd;_0x9e4b3a>=0x0;_0x9e4b3a--)(_0x3dd2dd=_0x29a740[_0x9e4b3a])&&(_0x17eb9a=_0x3dd2dd(_0x17eb9a)||_0x17eb9a);return _0x17eb9a;},p=(_0x5f2760,_0x5a91f6)=>(_0x206706,_0x4d0370)=>_0x5a91f6(_0x206706,_0x4d0370,_0x5f2760);let S=class extends _0x41eace{constructor(_0x4d6662,_0x4ae1ff,_0x58133e,_0x2f3ec0){const _0x44b827=_0x39886c;super(),this['_commentService']=_0x4d6662,this[_0x44b827(0x97)]=_0x4ae1ff,this[_0x44b827(0x95)]=_0x58133e,this[_0x44b827(0xbc)]=_0x2f3ec0,this[_0x44b827(0xc4)](),this[_0x44b827(0x88)]();}[_0x39886c(0x88)](){const _0x45bd2f=_0x39886c;this[_0x45bd2f(0xd3)](this[_0x45bd2f(0x97)][_0x45bd2f(0xc5)]['pipe'](_0x4c3460(0x10))['subscribe'](_0x4d0dfa=>{const _0x9bfcac=_0x45bd2f,_0x5c2b06=new Set();_0x4d0dfa['forEach'](_0x474358=>{const _0x144d87=_0x3d57;switch(_0x474358['type']){case _0x144d87(0x92):{const _0x1cb79b=_0x474358['payload'][_0x144d87(0x8f)];_0x5c2b06[_0x144d87(0x92)](_0x1cb79b);break;}}}),B(this[_0x9bfcac(0xbc)],_0x5c2b06);}));}[_0x39886c(0xc4)](){const _0x1ed618=_0x39886c;this[_0x1ed618(0xd3)](this[_0x1ed618(0xa5)][_0x1ed618(0xc5)]['subscribe'](async _0x4155f2=>{const _0x26cd9a=_0x1ed618;var _0x247e86,_0x25f7d6,_0x41d695,_0x5e9f39;const _0x359b5b=(_0x247e86=this[_0x26cd9a(0x97)][_0x26cd9a(0xbd)](_0x4155f2[_0x26cd9a(0xaf)])[_0x26cd9a(0x83)](_0x5ce09e=>_0x5ce09e[_0x26cd9a(0xca)]===_0x4155f2[_0x26cd9a(0xca)]))==null?void 0x0:_0x247e86[_0x26cd9a(0xb4)];if(!_0x359b5b)return;const {unitId:_0x1e85e,subUnitId:_0x11ae3a}=_0x359b5b;switch(_0x4155f2[_0x26cd9a(0x99)]&&this[_0x26cd9a(0x95)][_0x26cd9a(0xd4)](_0x4155f2[_0x26cd9a(0x99)]),_0x4155f2[_0x26cd9a(0xb1)]){case v[_0x26cd9a(0xc1)]:break;case v[_0x26cd9a(0x9a)]:{this[_0x26cd9a(0x97)][_0x26cd9a(0x98)](_0x1e85e,_0x11ae3a,{'unitId':_0x1e85e,'subUnitId':_0x11ae3a,'ref':'','id':_0x4155f2[_0x26cd9a(0xb0)],'dT':D(+_0x4155f2[_0x26cd9a(0x82)]),'threadId':_0x4155f2[_0x26cd9a(0xca)],'personId':(_0x41d695=(_0x25f7d6=_0x4155f2[_0x26cd9a(0x99)])==null?void 0x0:_0x25f7d6['userID'])!=null?_0x41d695:_0x4155f2[_0x26cd9a(0x86)],'text':JSON[_0x26cd9a(0xc9)](_0x4155f2['content']),'parentId':_0x359b5b['id']});break;}case v[_0x26cd9a(0x9d)]:{const _0xa2e8e=this[_0x26cd9a(0x97)]['getComment'](_0x1e85e,_0x11ae3a,_0x4155f2[_0x26cd9a(0xb0)]);_0xa2e8e&&_0xa2e8e['parentId']&&this[_0x26cd9a(0x97)][_0x26cd9a(0xae)](_0x1e85e,_0x11ae3a,_0x4155f2[_0x26cd9a(0xb0)]);break;}case v[_0x26cd9a(0x84)]:{this[_0x26cd9a(0x97)][_0x26cd9a(0xa8)](_0x1e85e,_0x11ae3a,{'commentId':_0x4155f2['replyId'],'text':JSON[_0x26cd9a(0xc9)](_0x4155f2[_0x26cd9a(0xc7)])});break;}case v[_0x26cd9a(0x89)]:{const _0x123507=(_0x5e9f39=this[_0x26cd9a(0x97)]['getUnit'](_0x4155f2['unitId'])[_0x26cd9a(0x83)](_0x371ee0=>_0x371ee0['threadId']===_0x4155f2[_0x26cd9a(0xca)]))==null?void 0x0:_0x5e9f39['root'];_0x123507&&this[_0x26cd9a(0x97)][_0x26cd9a(0xc3)](_0x1e85e,_0x11ae3a,_0x123507['id'],_0x4155f2[_0x26cd9a(0x9e)]===I[_0x26cd9a(0x80)]);break;}}}));}};S=V([p(0x0,_0x361c7c(_0x5ec5d5)),p(0x1,_0x361c7c(_0x563c28)),p(0x2,_0x361c7c(_0x3307ae)),p(0x3,_0x361c7c(_0x585345))],S);const z=_0x39886c(0xbe),M={};function _0x3533(){const _0x4d9ab5=['/reply','customRanges','191355sMMxkj','error','users','disposeWithMe','addUser','get','filter','UNRECOGNIZED','YYYY/MM/DD\x20HH:mm','_sessionService','requireSession','_threadCommentDataSource','stringify','syncUpdateMutationToColla','COMMENT','reply','code','/solved','rangeId','5278419GIllrd','14WhDRUU','Solved','Unknown','createTimestamp','find','Edit','_config','userId','symbol','_initUserSync','Solve','setConfig','rangeType','_httpService','/universer-api/comment/unit/','replies','personId','OpenOrReOpen','format','add','pluginName','3456795gkspCh','_userService','onReady','_threadCommentModel','addComment','user','Reply','size','getMemberID','Delete','solved','UNIVER_UNKNOWN','_initDataSource','length','1309896tdsCln','forEach','getCurrentUser','_commentService','post','resolved','updateComment','6MHFJxs','map','ref','_configService','2DZiYsX','deleteComment','unitId','replyId','type','body','639252bIgXBv','root','/list','dataSource','values','delete','defineProperty','userID','/add','_injector','getUnit','thread-comment-data-source.config','9822720SWhxud','getOwnPropertyDescriptor','Add','_threadCommentDataSourceService','resolveComment','_init','commentUpdate$','965416gWcaPo','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','parse','threadId','getUser','listComments','slice'];_0x3533=function(){return _0x4d9ab5;};return _0x3533();}var k=Object[_0x39886c(0xc0)],Q=(_0x27caee,_0x2c1173,_0x3df7f4,_0x4ba2d4)=>{for(var _0x43e158=_0x4ba2d4>0x1?void 0x0:_0x4ba2d4?k(_0x2c1173,_0x3df7f4):_0x2c1173,_0x5c3eca=_0x27caee['length']-0x1,_0x157efd;_0x5c3eca>=0x0;_0x5c3eca--)(_0x157efd=_0x27caee[_0x5c3eca])&&(_0x43e158=_0x157efd(_0x43e158)||_0x43e158);return _0x43e158;},_=(_0x5e8b9d,_0x302278)=>(_0xa05181,_0x433fed)=>_0x302278(_0xa05181,_0x433fed,_0x5e8b9d);function X(_0x52db82,_0x1bb424){const _0x16260c=_0x39886c,_0x35e06d=_0x52db82[_0x16260c(0x8e)][0x0];return{..._0x1bb424,'id':_0x35e06d[_0x16260c(0xb0)],'resolved':_0x52db82[_0x16260c(0x9e)]===0x1,'dT':D(_0x35e06d['createTimestamp']),'personId':_0x35e06d[_0x16260c(0x86)],'threadId':_0x35e06d['threadId']};}function ee(_0x1756eb,_0x5bacad,_0x466eef){const _0x1d33dc=_0x39886c;var _0x251756,_0x223ffc;if(((_0x223ffc=(_0x251756=_0x1756eb==null?void 0x0:_0x1756eb['replies'])==null?void 0x0:_0x251756[_0x1d33dc(0xa1)])!=null?_0x223ffc:0x0)>0x0){const _0x59ea43=(_0x1cb48c,_0x49f513)=>({'id':_0x1cb48c[_0x1d33dc(0xb0)],'threadId':_0x1cb48c['threadId'],'dT':D(_0x1cb48c[_0x1d33dc(0x82)]),'personId':_0x1cb48c['userId'],'resolved':_0x1756eb[_0x1d33dc(0x9e)]===I[_0x1d33dc(0x80)],'unitId':_0x5bacad,'subUnitId':_0x466eef,'text':JSON[_0x1d33dc(0xc9)](_0x1cb48c[_0x1d33dc(0xc7)]),'parentId':_0x49f513}),_0x58982e=_0x59ea43(_0x1756eb[_0x1d33dc(0x8e)][0x0]);return{..._0x58982e,'children':_0x1756eb['replies'][_0x1d33dc(0xcd)](0x1)[_0x1d33dc(0xaa)](_0x3eeb2c=>_0x59ea43(_0x3eeb2c,_0x58982e['id']))};}return null;}let f=class{constructor(_0x440ec8,_0x163202,_0x3aeecf,_0x4a520e){const _0x58773b=_0x39886c;this[_0x58773b(0x8c)]=_0x440ec8,this[_0x58773b(0x95)]=_0x163202,this[_0x58773b(0xd9)]=_0x3aeecf,this[_0x58773b(0xbc)]=_0x4a520e;}async[_0x39886c(0x98)](_0x5ef400){const _0x23d365=_0x39886c;var _0x559da1,_0x51fbae;const {parentId:_0x47c123,unitId:_0x49820b,text:_0x1e8667,threadId:_0x4add82}=_0x5ef400,_0x29f8ab=(_0x51fbae=(_0x559da1=_0x1e8667[_0x23d365(0xcf)])==null?void 0x0:_0x559da1['filter'](_0x72771a=>_0x72771a[_0x23d365(0x8b)]===_0x86fd2c[_0x23d365(0xde)])[_0x23d365(0xaa)](_0x560e9d=>_0x560e9d[_0x23d365(0xe2)]))!=null?_0x51fbae:[],_0x136ca0=JSON[_0x23d365(0xdc)](_0x1e8667),_0x1f3f91=(await this[_0x23d365(0xd9)]['requireSession'](_0x49820b))['getMemberID']();if(_0x47c123){const _0x2e711a={'memberId':_0x1f3f91,'unitId':_0x49820b,'content':_0x136ca0,'mention':_0x29f8ab,'threadId':_0x4add82},_0x38aca9=(await this['_httpService']['post'](_0x23d365(0x8d)+_0x49820b+_0x23d365(0xce),{'body':_0x2e711a}))['body'][_0x23d365(0xdf)];return{..._0x5ef400,'id':_0x38aca9[_0x23d365(0xb0)],'dT':_0x56943a(+_0x38aca9[_0x23d365(0x82)])[_0x23d365(0x91)](_0x23d365(0xd8)),'personId':_0x38aca9[_0x23d365(0x86)]};}else{const _0x4a2ea5={'memberId':_0x1f3f91,'unitId':_0x49820b,'content':_0x136ca0,'mention':_0x29f8ab},_0x466e56=await this[_0x23d365(0x8c)][_0x23d365(0xa6)]('/universer-api/comment/unit/'+_0x49820b+_0x23d365(0xbb),{'body':_0x4a2ea5});return X(_0x466e56[_0x23d365(0xb2)]['comment'],_0x5ef400);}}async[_0x39886c(0xa8)](_0x2615cc){const _0x177d9c=_0x39886c;var _0x49dc6f,_0x11e42c;const {text:_0x17e4ea,unitId:_0x31fe31}=_0x2615cc,_0x77a1f3=(_0x11e42c=(_0x49dc6f=_0x17e4ea[_0x177d9c(0xcf)])==null?void 0x0:_0x49dc6f[_0x177d9c(0xd6)](_0x32534a=>_0x32534a[_0x177d9c(0x8b)]===_0x86fd2c[_0x177d9c(0xde)])[_0x177d9c(0xaa)](_0x39cdf8=>_0x39cdf8[_0x177d9c(0xe2)]))!=null?_0x11e42c:[],_0x2d6b90=JSON[_0x177d9c(0xdc)](_0x17e4ea),_0x1d291d=_0x2615cc['threadId'],_0x390d6b=_0x2615cc['id'],_0x2eb635={'memberId':(await this[_0x177d9c(0xd9)][_0x177d9c(0xda)](_0x31fe31))[_0x177d9c(0x9c)](),'unitId':_0x31fe31,'threadId':_0x1d291d,'mention':_0x77a1f3,'content':_0x2d6b90,'replyId':_0x390d6b},_0x45516c=await this[_0x177d9c(0x8c)][_0x177d9c(0xa6)]('/universer-api/comment/unit/'+_0x31fe31+'/edit',{'body':_0x2eb635});return!_0x45516c[_0x177d9c(0xb2)][_0x177d9c(0xd1)]||_0x45516c[_0x177d9c(0xb2)]['error'][_0x177d9c(0xe0)]===0x1;}async[_0x39886c(0xc3)](_0x55755a){const _0x2fb7c5=_0x39886c,{unitId:_0x5316df}=_0x55755a,_0x183734=_0x55755a[_0x2fb7c5(0xca)],_0x27a597={'memberId':this[_0x2fb7c5(0x95)][_0x2fb7c5(0xa4)]()[_0x2fb7c5(0xba)],'unitId':_0x5316df,'threadId':_0x183734,'solved':_0x55755a[_0x2fb7c5(0xa7)]?I['Solved']:I[_0x2fb7c5(0x90)]},_0x104d8e=await this[_0x2fb7c5(0x8c)][_0x2fb7c5(0xa6)](_0x2fb7c5(0x8d)+_0x5316df+_0x2fb7c5(0xe1),{'body':_0x27a597});return!_0x104d8e[_0x2fb7c5(0xb2)][_0x2fb7c5(0xd1)]||_0x104d8e[_0x2fb7c5(0xb2)]['error']['code']===0x1;}async['deleteComment'](_0x2a7bed,_0x42235b,_0x79369b,_0x14d604){const _0x2f8f54=_0x39886c,_0xf2418={'memberId':(await this['_sessionService']['requireSession'](_0x2a7bed))['getMemberID'](),'threadId':_0x79369b,'replyId':_0x14d604,'unitId':_0x2a7bed},_0x57e576=await this[_0x2f8f54(0x8c)][_0x2f8f54(0xa6)]('/universer-api/comment/unit/'+_0x2a7bed+'/delete',{'body':_0xf2418});return!_0x57e576[_0x2f8f54(0xb2)]['error']||_0x57e576[_0x2f8f54(0xb2)][_0x2f8f54(0xd1)][_0x2f8f54(0xe0)]===0x1;}async[_0x39886c(0xcc)](_0x4e66b1,_0x42b289,_0x58a73f){const _0x16acf5=_0x39886c,_0x27869d={'unitId':_0x4e66b1,'threadId':_0x58a73f},_0x1e4cf0=await this[_0x16acf5(0x8c)]['post'](_0x16acf5(0x8d)+_0x4e66b1+_0x16acf5(0xb5),{'body':_0x27869d}),_0x4c367f=_0x58a73f[_0x16acf5(0xaa)](_0x2aae77=>ee(_0x1e4cf0['body']['comments'][_0x2aae77],_0x4e66b1,_0x42b289))[_0x16acf5(0xd6)](Boolean);return Object[_0x16acf5(0xb7)](_0x1e4cf0[_0x16acf5(0xb2)]['users'])[_0x16acf5(0xa3)](_0x1cba00=>{const _0x26bdf0=_0x16acf5;this['_userService'][_0x26bdf0(0xd4)](_0x1cba00);}),_0x4c367f;}['saveCommentToSnapshot'](_0x2d343f){const _0x3ead00=_0x39886c;return{'id':_0x2d343f['id'],'threadId':_0x2d343f[_0x3ead00(0xca)],'ref':_0x2d343f[_0x3ead00(0xab)]};}};f=Q([_(0x0,_0x361c7c(_0x5c7a01)),_(0x1,_0x361c7c(_0x3307ae)),_(0x2,_0x361c7c(_0x2f98bf)),_(0x3,_0x361c7c(_0x585345))],f);var re=Object[_0x39886c(0xc0)],te=(_0x1a593c,_0x302d7c,_0x36c683,_0x610613)=>{const _0x2309f5=_0x39886c;for(var _0xb77bd5=_0x610613>0x1?void 0x0:_0x610613?re(_0x302d7c,_0x36c683):_0x302d7c,_0x23ea12=_0x1a593c[_0x2309f5(0xa1)]-0x1,_0x2cf29e;_0x23ea12>=0x0;_0x23ea12--)(_0x2cf29e=_0x1a593c[_0x23ea12])&&(_0xb77bd5=_0x2cf29e(_0xb77bd5)||_0xb77bd5);return _0xb77bd5;},N=(_0x5598ca,_0x8bd59e)=>(_0x1612a5,_0x334700)=>_0x8bd59e(_0x1612a5,_0x334700,_0x5598ca);let g=class extends _0x41eace{constructor(_0x347896,_0x3ebda7){const _0x360e8a=_0x39886c;super(),this[_0x360e8a(0xc2)]=_0x347896,this['_threadCommentDataSource']=_0x3ebda7,this[_0x360e8a(0xa0)]();}[_0x39886c(0xa0)](){const _0x1e9fd8=_0x39886c;this[_0x1e9fd8(0xc2)][_0x1e9fd8(0xb6)]=this[_0x1e9fd8(0xdb)],this[_0x1e9fd8(0xc2)][_0x1e9fd8(0xdd)]=!0x1;}};g=te([N(0x0,_0x852eb8),N(0x1,_0x361c7c(f))],g);var se=Object[_0x39886c(0xb9)],oe=Object[_0x39886c(0xc0)],ne=(_0x516097,_0xdb44bb,_0x29f9e3)=>_0xdb44bb in _0x516097?se(_0x516097,_0xdb44bb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x29f9e3}):_0x516097[_0xdb44bb]=_0x29f9e3,ie=(_0x49640a,_0x5d20d1,_0x19abec,_0x36c7a2)=>{const _0x3e833a=_0x39886c;for(var _0x24987f=_0x36c7a2>0x1?void 0x0:_0x36c7a2?oe(_0x5d20d1,_0x19abec):_0x5d20d1,_0x453cf1=_0x49640a[_0x3e833a(0xa1)]-0x1,_0xc578a3;_0x453cf1>=0x0;_0x453cf1--)(_0xc578a3=_0x49640a[_0x453cf1])&&(_0x24987f=_0xc578a3(_0x24987f)||_0x24987f);return _0x24987f;},w=(_0x329b6a,_0x1dcdcf)=>(_0x19706b,_0x42322c)=>_0x1dcdcf(_0x19706b,_0x42322c,_0x329b6a),$=(_0x2a1c2b,_0xa592,_0x327d14)=>ne(_0x2a1c2b,typeof _0xa592!=_0x39886c(0x87)?_0xa592+'':_0xa592,_0x327d14);let b=class extends _0x5da7bd{constructor(_0x4b5d60=M,_0x5df046,_0x18ceb7){const _0x2f1178=_0x39886c;super(),this[_0x2f1178(0x85)]=_0x4b5d60,this[_0x2f1178(0xbc)]=_0x5df046,this['_configService']=_0x18ceb7;const {..._0x5d8b90}=_0x22fe1a({},M,this[_0x2f1178(0x85)]);this[_0x2f1178(0xac)][_0x2f1178(0x8a)](z,_0x5d8b90);}['onStarting'](){const _0x4f9a77=_0x39886c;[[f],[g],[S]][_0x4f9a77(0xa3)](_0x4bba79=>{this['_injector']['add'](_0x4bba79);});}[_0x39886c(0x96)](){const _0x21854f=_0x39886c;this[_0x21854f(0xbc)]['get'](g),this[_0x21854f(0xbc)][_0x21854f(0xd5)](S);}};$(b,_0x39886c(0x93),W),$(b,_0x39886c(0xb1),_0x235ad1[_0x39886c(0x9f)]),b=ie([_0x56b67b(_0x230aaa,_0x1627d3,_0x2b2705),w(0x1,_0x361c7c(_0x585345)),w(0x2,_0x45f6f1)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x58fd22=_0x16ea;(function(_0x1b16e0,_0xb8f6c6){const _0xd61e42=_0x16ea,_0x38b61d=_0x1b16e0();while(!![]){try{const _0x453853=parseInt(_0xd61e42(0x15d))/0x1+-parseInt(_0xd61e42(0x1b1))/0x2*(parseInt(_0xd61e42(0x18b))/0x3)+parseInt(_0xd61e42(0x19e))/0x4*(parseInt(_0xd61e42(0x1b4))/0x5)+-parseInt(_0xd61e42(0x192))/0x6+-parseInt(_0xd61e42(0x179))/0x7*(-parseInt(_0xd61e42(0x195))/0x8)+parseInt(_0xd61e42(0x181))/0x9+parseInt(_0xd61e42(0x155))/0xa*(-parseInt(_0xd61e42(0x1a3))/0xb);if(_0x453853===_0xb8f6c6)break;else _0x38b61d['push'](_0x38b61d['shift']());}catch(_0x49645a){_0x38b61d['push'](_0x38b61d['shift']());}}}(_0xad37,0x6639a));import{CommentService as _0x5fbae9,CollaborationSessionService as _0x326a1a,UniverCollaborationClientPlugin as _0x37bf58}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x273301}from'@univerjs-pro/license';import{dayjs as _0x173349,UserManagerService as _0x2fbd9e,Inject as _0x4562eb,Injector as _0x585bfd,Disposable as _0x2a378a,CustomRangeType as _0x2eb19a,UniverInstanceType as _0x25802b,DependentOn as _0x501549,IConfigService as _0x2316e1,Plugin as _0x19daed,merge as _0x5457dd}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2240b0}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3f581d,IThreadCommentDataSourceService as _0x2dd5cd}from'@univerjs/thread-comment';import{bufferTime as _0x58c650}from'rxjs';import{HTTPService as _0x13a52b}from'@univerjs/network';const W=_0x58fd22(0x1ae);var I=(_0xe3eb80=>(_0xe3eb80[_0xe3eb80['OpenOrReOpen']=0x0]=_0x58fd22(0x19c),_0xe3eb80[_0xe3eb80[_0x58fd22(0x190)]=0x1]='Solved',_0xe3eb80[_0xe3eb80[_0x58fd22(0x183)]=-0x1]=_0x58fd22(0x183),_0xe3eb80))(I||{}),v=(_0x5930d8=>(_0x5930d8[_0x5930d8['Unknown']=0x0]='Unknown',_0x5930d8[_0x5930d8[_0x58fd22(0x19d)]=0x1]=_0x58fd22(0x19d),_0x5930d8[_0x5930d8['Reply']=0x2]='Reply',_0x5930d8[_0x5930d8[_0x58fd22(0x184)]=0x3]=_0x58fd22(0x184),_0x5930d8[_0x5930d8[_0x58fd22(0x16f)]=0x4]=_0x58fd22(0x16f),_0x5930d8[_0x5930d8[_0x58fd22(0x164)]=0x5]=_0x58fd22(0x164),_0x5930d8[_0x5930d8['UNRECOGNIZED']=-0x1]=_0x58fd22(0x183),_0x5930d8))(v||{});const D=_0x27e30b=>_0x173349(new Date(+_0x27e30b))[_0x58fd22(0x17e)](_0x58fd22(0x168)),B=async(_0x3ddb92,_0x191148)=>{const _0x821bb6=_0x58fd22,_0x326825=_0x3ddb92[_0x821bb6(0x1aa)](_0x2fbd9e),_0xb2a280=_0x3ddb92[_0x821bb6(0x1aa)](_0x13a52b);_0x191148[_0x821bb6(0x1b9)](_0x275beb=>{const _0x161776=_0x821bb6;_0x326825[_0x161776(0x18e)](_0x275beb)&&_0x191148['delete'](_0x275beb);}),_0x191148[_0x821bb6(0x176)]&&(await _0xb2a280[_0x821bb6(0x1aa)]('/universer-api/user/list',{'params':{'userIDs':[..._0x191148]}}))[_0x821bb6(0x16c)][_0x821bb6(0x19a)]['forEach'](_0x2b9ba0=>{_0x2b9ba0&&_0x326825['addUser'](_0x2b9ba0);});};var K=Object[_0x58fd22(0x1b6)],V=(_0x395dd9,_0x22196b,_0x23b540,_0x147bc5)=>{const _0x1211f9=_0x58fd22;for(var _0x13a604=_0x147bc5>0x1?void 0x0:_0x147bc5?K(_0x22196b,_0x23b540):_0x22196b,_0x385a50=_0x395dd9[_0x1211f9(0x17f)]-0x1,_0x294ad9;_0x385a50>=0x0;_0x385a50--)(_0x294ad9=_0x395dd9[_0x385a50])&&(_0x13a604=_0x294ad9(_0x13a604)||_0x13a604);return _0x13a604;},p=(_0x6e4e42,_0x567722)=>(_0x30f72f,_0x2a5ccb)=>_0x567722(_0x30f72f,_0x2a5ccb,_0x6e4e42);function _0xad37(){const _0x3cf088=['getUnit','1465155NIttkb','userId','UNRECOGNIZED','Edit','_commentService','map','_sessionService','find','pluginName','syncUpdateMutationToColla','1302nkDuMJ','parse','rangeType','getUser','addUser','Solved','/reply','2264154MKdtSe','/delete','saveCommentToSnapshot','89936eeprXG','subscribe','resolved','ref','error','users','updateComment','OpenOrReOpen','Add','8WhpeoO','thread-comment-data-source.config','deleteComment','onReady','requireSession','7953QWiczd','addComment','getMemberID','stringify','replies','content','UNIVER_UNKNOWN','get','pipe','onStarting','_config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','personId','replyId','966jCUVNH','_injector','filter','876790sVtOKK','Reply','getOwnPropertyDescriptor','_threadCommentDataSourceService','root','forEach','commentUpdate$','5190EuNQwj','/universer-api/comment/unit/','solved','userID','defineProperty','getComment','slice','setConfig','552645psvpyk','payload','/add','threadId','_httpService','parentId','createTimestamp','Solve','_userService','post','_initDataSource','YYYY/MM/DD\x20HH:mm','_init','add','customRanges','body','rangeId','resolveComment','Delete','COMMENT','/list','values','disposeWithMe','_threadCommentDataSource','type','size','code','comment','196lahryy','user','_threadCommentModel','/edit','listComments','format','length'];_0xad37=function(){return _0x3cf088;};return _0xad37();}let S=class extends _0x2a378a{constructor(_0x15698d,_0x15ba86,_0x456fd6,_0x4b26e2){const _0x26811e=_0x58fd22;super(),this[_0x26811e(0x185)]=_0x15698d,this[_0x26811e(0x17b)]=_0x15ba86,this[_0x26811e(0x165)]=_0x456fd6,this[_0x26811e(0x1b2)]=_0x4b26e2,this[_0x26811e(0x169)](),this['_initUserSync']();}['_initUserSync'](){const _0x1f7f45=_0x58fd22;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$'][_0x1f7f45(0x1ab)](_0x58c650(0x10))[_0x1f7f45(0x196)](_0x1b5190=>{const _0x9dbeee=_0x1f7f45,_0x330851=new Set();_0x1b5190[_0x9dbeee(0x1b9)](_0x1a86cf=>{const _0x569a5e=_0x9dbeee;switch(_0x1a86cf[_0x569a5e(0x175)]){case _0x569a5e(0x16a):{const _0x515c50=_0x1a86cf[_0x569a5e(0x15e)][_0x569a5e(0x1af)];_0x330851[_0x569a5e(0x16a)](_0x515c50);break;}}}),B(this['_injector'],_0x330851);}));}[_0x58fd22(0x169)](){const _0x2c052b=_0x58fd22;this[_0x2c052b(0x173)](this[_0x2c052b(0x185)][_0x2c052b(0x1ba)][_0x2c052b(0x196)](async _0x3bb92b=>{const _0x19bb49=_0x2c052b;var _0x12f6f6,_0x29b2c7,_0x3b3d2b,_0x3d4cca;const _0x3b3149=(_0x12f6f6=this[_0x19bb49(0x17b)]['getUnit'](_0x3bb92b['unitId'])[_0x19bb49(0x188)](_0x57d144=>_0x57d144[_0x19bb49(0x160)]===_0x3bb92b[_0x19bb49(0x160)]))==null?void 0x0:_0x12f6f6[_0x19bb49(0x1b8)];if(!_0x3b3149)return;const {unitId:_0x5b4b9a,subUnitId:_0xc4bc6a}=_0x3b3149;switch(_0x3bb92b['user']&&this['_userService'][_0x19bb49(0x18f)](_0x3bb92b['user']),_0x3bb92b[_0x19bb49(0x175)]){case v[_0x19bb49(0x19d)]:break;case v[_0x19bb49(0x1b5)]:{this[_0x19bb49(0x17b)][_0x19bb49(0x1a4)](_0x5b4b9a,_0xc4bc6a,{'unitId':_0x5b4b9a,'subUnitId':_0xc4bc6a,'ref':'','id':_0x3bb92b['replyId'],'dT':D(+_0x3bb92b[_0x19bb49(0x163)]),'threadId':_0x3bb92b[_0x19bb49(0x160)],'personId':(_0x3b3d2b=(_0x29b2c7=_0x3bb92b[_0x19bb49(0x17a)])==null?void 0x0:_0x29b2c7[_0x19bb49(0x158)])!=null?_0x3b3d2b:_0x3bb92b[_0x19bb49(0x182)],'text':JSON['parse'](_0x3bb92b[_0x19bb49(0x1a8)]),'parentId':_0x3b3149['id']});break;}case v['Delete']:{const _0x26b5d=this[_0x19bb49(0x17b)][_0x19bb49(0x15a)](_0x5b4b9a,_0xc4bc6a,_0x3bb92b[_0x19bb49(0x1b0)]);_0x26b5d&&_0x26b5d[_0x19bb49(0x162)]&&this['_threadCommentModel'][_0x19bb49(0x1a0)](_0x5b4b9a,_0xc4bc6a,_0x3bb92b['replyId']);break;}case v[_0x19bb49(0x184)]:{this[_0x19bb49(0x17b)][_0x19bb49(0x19b)](_0x5b4b9a,_0xc4bc6a,{'commentId':_0x3bb92b[_0x19bb49(0x1b0)],'text':JSON['parse'](_0x3bb92b[_0x19bb49(0x1a8)])});break;}case v['Solve']:{const _0x508438=(_0x3d4cca=this[_0x19bb49(0x17b)][_0x19bb49(0x180)](_0x3bb92b['unitId'])[_0x19bb49(0x188)](_0x663629=>_0x663629[_0x19bb49(0x160)]===_0x3bb92b[_0x19bb49(0x160)]))==null?void 0x0:_0x3d4cca['root'];_0x508438&&this[_0x19bb49(0x17b)][_0x19bb49(0x16e)](_0x5b4b9a,_0xc4bc6a,_0x508438['id'],_0x3bb92b[_0x19bb49(0x157)]===I[_0x19bb49(0x190)]);break;}}}));}};S=V([p(0x0,_0x4562eb(_0x5fbae9)),p(0x1,_0x4562eb(_0x3f581d)),p(0x2,_0x4562eb(_0x2fbd9e)),p(0x3,_0x4562eb(_0x585bfd))],S);const z=_0x58fd22(0x19f),M={};var k=Object[_0x58fd22(0x1b6)],Q=(_0x394dd7,_0x15f782,_0xcb43c9,_0x44157b)=>{const _0x597b23=_0x58fd22;for(var _0xf577bf=_0x44157b>0x1?void 0x0:_0x44157b?k(_0x15f782,_0xcb43c9):_0x15f782,_0x48d22c=_0x394dd7[_0x597b23(0x17f)]-0x1,_0x4c57fd;_0x48d22c>=0x0;_0x48d22c--)(_0x4c57fd=_0x394dd7[_0x48d22c])&&(_0xf577bf=_0x4c57fd(_0xf577bf)||_0xf577bf);return _0xf577bf;},_=(_0x40bd62,_0x56d04f)=>(_0x37b067,_0x28c342)=>_0x56d04f(_0x37b067,_0x28c342,_0x40bd62);function X(_0x2a90ab,_0x435890){const _0x52f859=_0x58fd22,_0x3402b7=_0x2a90ab['replies'][0x0];return{..._0x435890,'id':_0x3402b7[_0x52f859(0x1b0)],'resolved':_0x2a90ab[_0x52f859(0x157)]===0x1,'dT':D(_0x3402b7[_0x52f859(0x163)]),'personId':_0x3402b7[_0x52f859(0x182)],'threadId':_0x3402b7[_0x52f859(0x160)]};}function _0x16ea(_0x1dc657,_0x4995e3){const _0xad373f=_0xad37();return _0x16ea=function(_0x16ea38,_0x59514a){_0x16ea38=_0x16ea38-0x155;let _0x9f5d87=_0xad373f[_0x16ea38];return _0x9f5d87;},_0x16ea(_0x1dc657,_0x4995e3);}function ee(_0x1b8a43,_0x4962bb,_0x246040){const _0x458f0c=_0x58fd22;var _0x15b54e,_0x41b9c8;if(((_0x41b9c8=(_0x15b54e=_0x1b8a43==null?void 0x0:_0x1b8a43[_0x458f0c(0x1a7)])==null?void 0x0:_0x15b54e[_0x458f0c(0x17f)])!=null?_0x41b9c8:0x0)>0x0){const _0x3828d5=(_0x329919,_0x2ac365)=>({'id':_0x329919['replyId'],'threadId':_0x329919[_0x458f0c(0x160)],'dT':D(_0x329919[_0x458f0c(0x163)]),'personId':_0x329919['userId'],'resolved':_0x1b8a43[_0x458f0c(0x157)]===I[_0x458f0c(0x190)],'unitId':_0x4962bb,'subUnitId':_0x246040,'text':JSON[_0x458f0c(0x18c)](_0x329919[_0x458f0c(0x1a8)]),'parentId':_0x2ac365}),_0x5d9f87=_0x3828d5(_0x1b8a43[_0x458f0c(0x1a7)][0x0]);return{..._0x5d9f87,'children':_0x1b8a43[_0x458f0c(0x1a7)][_0x458f0c(0x15b)](0x1)[_0x458f0c(0x186)](_0x42d326=>_0x3828d5(_0x42d326,_0x5d9f87['id']))};}return null;}let f=class{constructor(_0x461529,_0x1cc612,_0x415457,_0x5dfa83){const _0x13a573=_0x58fd22;this['_httpService']=_0x461529,this[_0x13a573(0x165)]=_0x1cc612,this[_0x13a573(0x187)]=_0x415457,this['_injector']=_0x5dfa83;}async[_0x58fd22(0x1a4)](_0x41b4c6){const _0x496db8=_0x58fd22;var _0x394191,_0x8577f3;const {parentId:_0x235add,unitId:_0x2b2774,text:_0xfb5b0d,threadId:_0x24dd57}=_0x41b4c6,_0x5d69bc=(_0x8577f3=(_0x394191=_0xfb5b0d[_0x496db8(0x16b)])==null?void 0x0:_0x394191[_0x496db8(0x1b3)](_0x4eb990=>_0x4eb990[_0x496db8(0x18d)]===_0x2eb19a['COMMENT'])[_0x496db8(0x186)](_0x350f07=>_0x350f07[_0x496db8(0x16d)]))!=null?_0x8577f3:[],_0x10665a=JSON[_0x496db8(0x1a6)](_0xfb5b0d),_0x192f7f=(await this[_0x496db8(0x187)][_0x496db8(0x1a2)](_0x2b2774))['getMemberID']();if(_0x235add){const _0x31d8b5={'memberId':_0x192f7f,'unitId':_0x2b2774,'content':_0x10665a,'mention':_0x5d69bc,'threadId':_0x24dd57},_0x3111eb=(await this['_httpService'][_0x496db8(0x166)](_0x496db8(0x156)+_0x2b2774+_0x496db8(0x191),{'body':_0x31d8b5}))[_0x496db8(0x16c)]['reply'];return{..._0x41b4c6,'id':_0x3111eb[_0x496db8(0x1b0)],'dT':_0x173349(+_0x3111eb[_0x496db8(0x163)])[_0x496db8(0x17e)](_0x496db8(0x168)),'personId':_0x3111eb[_0x496db8(0x182)]};}else{const _0x36945d={'memberId':_0x192f7f,'unitId':_0x2b2774,'content':_0x10665a,'mention':_0x5d69bc},_0x20f370=await this['_httpService'][_0x496db8(0x166)](_0x496db8(0x156)+_0x2b2774+_0x496db8(0x15f),{'body':_0x36945d});return X(_0x20f370['body'][_0x496db8(0x178)],_0x41b4c6);}}async[_0x58fd22(0x19b)](_0x4230f0){const _0x29c86e=_0x58fd22;var _0x3f9a5a,_0xfb19a8;const {text:_0x16cbb3,unitId:_0x3a1001}=_0x4230f0,_0x1cbe7e=(_0xfb19a8=(_0x3f9a5a=_0x16cbb3[_0x29c86e(0x16b)])==null?void 0x0:_0x3f9a5a[_0x29c86e(0x1b3)](_0x11cd3b=>_0x11cd3b[_0x29c86e(0x18d)]===_0x2eb19a[_0x29c86e(0x170)])['map'](_0xbae054=>_0xbae054[_0x29c86e(0x16d)]))!=null?_0xfb19a8:[],_0x38e607=JSON[_0x29c86e(0x1a6)](_0x16cbb3),_0x9fdeaf=_0x4230f0[_0x29c86e(0x160)],_0x9a4aa7=_0x4230f0['id'],_0x3a087b={'memberId':(await this[_0x29c86e(0x187)]['requireSession'](_0x3a1001))[_0x29c86e(0x1a5)](),'unitId':_0x3a1001,'threadId':_0x9fdeaf,'mention':_0x1cbe7e,'content':_0x38e607,'replyId':_0x9a4aa7},_0x406b30=await this['_httpService'][_0x29c86e(0x166)]('/universer-api/comment/unit/'+_0x3a1001+_0x29c86e(0x17c),{'body':_0x3a087b});return!_0x406b30[_0x29c86e(0x16c)]['error']||_0x406b30[_0x29c86e(0x16c)][_0x29c86e(0x199)][_0x29c86e(0x177)]===0x1;}async[_0x58fd22(0x16e)](_0x1420b1){const _0x4efe60=_0x58fd22,{unitId:_0x3c7a60}=_0x1420b1,_0x16c72f=_0x1420b1[_0x4efe60(0x160)],_0x4206ed={'memberId':this['_userService']['getCurrentUser']()[_0x4efe60(0x158)],'unitId':_0x3c7a60,'threadId':_0x16c72f,'solved':_0x1420b1[_0x4efe60(0x197)]?I['Solved']:I[_0x4efe60(0x19c)]},_0x3702df=await this[_0x4efe60(0x161)][_0x4efe60(0x166)](_0x4efe60(0x156)+_0x3c7a60+'/solved',{'body':_0x4206ed});return!_0x3702df['body'][_0x4efe60(0x199)]||_0x3702df['body'][_0x4efe60(0x199)][_0x4efe60(0x177)]===0x1;}async['deleteComment'](_0x5a00ca,_0x3d6913,_0x2c5c78,_0x1b2209){const _0x4f5521=_0x58fd22,_0x2b0042={'memberId':(await this[_0x4f5521(0x187)][_0x4f5521(0x1a2)](_0x5a00ca))[_0x4f5521(0x1a5)](),'threadId':_0x2c5c78,'replyId':_0x1b2209,'unitId':_0x5a00ca},_0x56b6ab=await this[_0x4f5521(0x161)][_0x4f5521(0x166)](_0x4f5521(0x156)+_0x5a00ca+_0x4f5521(0x193),{'body':_0x2b0042});return!_0x56b6ab[_0x4f5521(0x16c)][_0x4f5521(0x199)]||_0x56b6ab[_0x4f5521(0x16c)]['error'][_0x4f5521(0x177)]===0x1;}async[_0x58fd22(0x17d)](_0x463ab3,_0x5a9bfd,_0x2c3185){const _0x2f9829=_0x58fd22,_0x5305d6={'unitId':_0x463ab3,'threadId':_0x2c3185},_0x2ea6fc=await this[_0x2f9829(0x161)][_0x2f9829(0x166)]('/universer-api/comment/unit/'+_0x463ab3+_0x2f9829(0x171),{'body':_0x5305d6}),_0x218675=_0x2c3185[_0x2f9829(0x186)](_0x25085c=>ee(_0x2ea6fc[_0x2f9829(0x16c)]['comments'][_0x25085c],_0x463ab3,_0x5a9bfd))[_0x2f9829(0x1b3)](Boolean);return Object[_0x2f9829(0x172)](_0x2ea6fc['body']['users'])[_0x2f9829(0x1b9)](_0x202a2e=>{const _0x41626c=_0x2f9829;this[_0x41626c(0x165)][_0x41626c(0x18f)](_0x202a2e);}),_0x218675;}[_0x58fd22(0x194)](_0x3c1d50){const _0x49e362=_0x58fd22;return{'id':_0x3c1d50['id'],'threadId':_0x3c1d50['threadId'],'ref':_0x3c1d50[_0x49e362(0x198)]};}};f=Q([_(0x0,_0x4562eb(_0x13a52b)),_(0x1,_0x4562eb(_0x2fbd9e)),_(0x2,_0x4562eb(_0x326a1a)),_(0x3,_0x4562eb(_0x585bfd))],f);var re=Object[_0x58fd22(0x1b6)],te=(_0x3e8d81,_0xdfad50,_0x32bccc,_0x507499)=>{const _0x207b61=_0x58fd22;for(var _0x3da565=_0x507499>0x1?void 0x0:_0x507499?re(_0xdfad50,_0x32bccc):_0xdfad50,_0x5b7280=_0x3e8d81[_0x207b61(0x17f)]-0x1,_0x6ef0ac;_0x5b7280>=0x0;_0x5b7280--)(_0x6ef0ac=_0x3e8d81[_0x5b7280])&&(_0x3da565=_0x6ef0ac(_0x3da565)||_0x3da565);return _0x3da565;},N=(_0xa46f4,_0x219765)=>(_0x10a144,_0x2d5b4d)=>_0x219765(_0x10a144,_0x2d5b4d,_0xa46f4);let g=class extends _0x2a378a{constructor(_0x599a52,_0x106610){const _0x410e0c=_0x58fd22;super(),this[_0x410e0c(0x1b7)]=_0x599a52,this[_0x410e0c(0x174)]=_0x106610,this['_initDataSource']();}[_0x58fd22(0x167)](){const _0x48f6ce=_0x58fd22;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x48f6ce(0x1b7)][_0x48f6ce(0x18a)]=!0x1;}};g=te([N(0x0,_0x2dd5cd),N(0x1,_0x4562eb(f))],g);var se=Object[_0x58fd22(0x159)],oe=Object[_0x58fd22(0x1b6)],ne=(_0x280a66,_0x59f894,_0x165366)=>_0x59f894 in _0x280a66?se(_0x280a66,_0x59f894,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x165366}):_0x280a66[_0x59f894]=_0x165366,ie=(_0x5df299,_0x231500,_0x32e302,_0x1cafd8)=>{const _0x1a777d=_0x58fd22;for(var _0x105164=_0x1cafd8>0x1?void 0x0:_0x1cafd8?oe(_0x231500,_0x32e302):_0x231500,_0x4a26ed=_0x5df299[_0x1a777d(0x17f)]-0x1,_0x2f3dbe;_0x4a26ed>=0x0;_0x4a26ed--)(_0x2f3dbe=_0x5df299[_0x4a26ed])&&(_0x105164=_0x2f3dbe(_0x105164)||_0x105164);return _0x105164;},w=(_0x299ef1,_0x6d2661)=>(_0x56f68c,_0x27bc63)=>_0x6d2661(_0x56f68c,_0x27bc63,_0x299ef1),$=(_0x1d591a,_0x5bc19b,_0x2f71d2)=>ne(_0x1d591a,typeof _0x5bc19b!='symbol'?_0x5bc19b+'':_0x5bc19b,_0x2f71d2);let b=class extends _0x19daed{constructor(_0xe6a8b8=M,_0x18f36c,_0x3e7e45){const _0x2d75db=_0x58fd22;super(),this[_0x2d75db(0x1ad)]=_0xe6a8b8,this[_0x2d75db(0x1b2)]=_0x18f36c,this['_configService']=_0x3e7e45;const {..._0x5a6823}=_0x5457dd({},M,this['_config']);this['_configService'][_0x2d75db(0x15c)](z,_0x5a6823);}[_0x58fd22(0x1ac)](){const _0x80950b=_0x58fd22;[[f],[g],[S]][_0x80950b(0x1b9)](_0x4416ce=>{const _0x36f6a5=_0x80950b;this['_injector'][_0x36f6a5(0x16a)](_0x4416ce);});}[_0x58fd22(0x1a1)](){const _0x57db93=_0x58fd22;this[_0x57db93(0x1b2)][_0x57db93(0x1aa)](g),this[_0x57db93(0x1b2)][_0x57db93(0x1aa)](S);}};$(b,_0x58fd22(0x189),W),$(b,_0x58fd22(0x175),_0x25802b[_0x58fd22(0x1a9)]),b=ie([_0x501549(_0x2240b0,_0x37bf58,_0x273301),w(0x1,_0x4562eb(_0x585bfd)),w(0x2,_0x2316e1)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ function _0x3d57(_0xe4c055,_0x47fc09){const _0x3533da=_0x3533();return _0x3d57=function(_0x3d5730,_0x3a8d47){_0x3d5730=_0x3d5730-0x7e;let _0x583c03=_0x3533da[_0x3d5730];return _0x583c03;},_0x3d57(_0xe4c055,_0x47fc09);}const _0x39886c=_0x3d57;(function(_0x378dfa,_0x155e36){const _0x4ff5cd=_0x3d57,_0x51cecd=_0x378dfa();while(!![]){try{const _0x88934c=-parseInt(_0x4ff5cd(0xb3))/0x1+parseInt(_0x4ff5cd(0xad))/0x2*(parseInt(_0x4ff5cd(0xd0))/0x3)+-parseInt(_0x4ff5cd(0xc6))/0x4+-parseInt(_0x4ff5cd(0x94))/0x5*(-parseInt(_0x4ff5cd(0xa9))/0x6)+-parseInt(_0x4ff5cd(0x7f))/0x7*(-parseInt(_0x4ff5cd(0xa2))/0x8)+-parseInt(_0x4ff5cd(0x7e))/0x9+parseInt(_0x4ff5cd(0xbf))/0xa;if(_0x88934c===_0x155e36)break;else _0x51cecd['push'](_0x51cecd['shift']());}catch(_0x394202){_0x51cecd['push'](_0x51cecd['shift']());}}}(_0x3533,0x91f21));import{CommentService as _0x5ec5d5,CollaborationSessionService as _0x2f98bf,UniverCollaborationClientPlugin as _0x1627d3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2b2705}from'@univerjs-pro/license';import{dayjs as _0x56943a,UserManagerService as _0x3307ae,Inject as _0x361c7c,Injector as _0x585345,Disposable as _0x41eace,CustomRangeType as _0x86fd2c,UniverInstanceType as _0x235ad1,DependentOn as _0x56b67b,IConfigService as _0x45f6f1,Plugin as _0x5da7bd,merge as _0x22fe1a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x230aaa}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x563c28,IThreadCommentDataSourceService as _0x852eb8}from'@univerjs/thread-comment';import{bufferTime as _0x4c3460}from'rxjs';import{HTTPService as _0x5c7a01}from'@univerjs/network';const W=_0x39886c(0xc8);var I=(_0x3162a0=>(_0x3162a0[_0x3162a0[_0x39886c(0x90)]=0x0]=_0x39886c(0x90),_0x3162a0[_0x3162a0[_0x39886c(0x80)]=0x1]=_0x39886c(0x80),_0x3162a0[_0x3162a0[_0x39886c(0xd7)]=-0x1]='UNRECOGNIZED',_0x3162a0))(I||{}),v=(_0x3b9353=>(_0x3b9353[_0x3b9353[_0x39886c(0x81)]=0x0]=_0x39886c(0x81),_0x3b9353[_0x3b9353[_0x39886c(0xc1)]=0x1]=_0x39886c(0xc1),_0x3b9353[_0x3b9353[_0x39886c(0x9a)]=0x2]=_0x39886c(0x9a),_0x3b9353[_0x3b9353[_0x39886c(0x84)]=0x3]=_0x39886c(0x84),_0x3b9353[_0x3b9353[_0x39886c(0x9d)]=0x4]=_0x39886c(0x9d),_0x3b9353[_0x3b9353[_0x39886c(0x89)]=0x5]='Solve',_0x3b9353[_0x3b9353[_0x39886c(0xd7)]=-0x1]='UNRECOGNIZED',_0x3b9353))(v||{});const D=_0x2baa93=>_0x56943a(new Date(+_0x2baa93))[_0x39886c(0x91)](_0x39886c(0xd8)),B=async(_0x59e396,_0x3b1f24)=>{const _0x1f0570=_0x39886c,_0x4ef7bd=_0x59e396['get'](_0x3307ae),_0x1a0c2e=_0x59e396[_0x1f0570(0xd5)](_0x5c7a01);_0x3b1f24[_0x1f0570(0xa3)](_0x24c803=>{const _0xb3dde8=_0x1f0570;_0x4ef7bd[_0xb3dde8(0xcb)](_0x24c803)&&_0x3b1f24[_0xb3dde8(0xb8)](_0x24c803);}),_0x3b1f24[_0x1f0570(0x9b)]&&(await _0x1a0c2e[_0x1f0570(0xd5)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3b1f24]}}))[_0x1f0570(0xb2)][_0x1f0570(0xd2)][_0x1f0570(0xa3)](_0x2c0dbf=>{const _0x16c451=_0x1f0570;_0x2c0dbf&&_0x4ef7bd[_0x16c451(0xd4)](_0x2c0dbf);});};var K=Object[_0x39886c(0xc0)],V=(_0x29a740,_0x44576b,_0x1ce186,_0x2e8a47)=>{const _0x401f71=_0x39886c;for(var _0x17eb9a=_0x2e8a47>0x1?void 0x0:_0x2e8a47?K(_0x44576b,_0x1ce186):_0x44576b,_0x9e4b3a=_0x29a740[_0x401f71(0xa1)]-0x1,_0x3dd2dd;_0x9e4b3a>=0x0;_0x9e4b3a--)(_0x3dd2dd=_0x29a740[_0x9e4b3a])&&(_0x17eb9a=_0x3dd2dd(_0x17eb9a)||_0x17eb9a);return _0x17eb9a;},p=(_0x5f2760,_0x5a91f6)=>(_0x206706,_0x4d0370)=>_0x5a91f6(_0x206706,_0x4d0370,_0x5f2760);let S=class extends _0x41eace{constructor(_0x4d6662,_0x4ae1ff,_0x58133e,_0x2f3ec0){const _0x44b827=_0x39886c;super(),this['_commentService']=_0x4d6662,this[_0x44b827(0x97)]=_0x4ae1ff,this[_0x44b827(0x95)]=_0x58133e,this[_0x44b827(0xbc)]=_0x2f3ec0,this[_0x44b827(0xc4)](),this[_0x44b827(0x88)]();}[_0x39886c(0x88)](){const _0x45bd2f=_0x39886c;this[_0x45bd2f(0xd3)](this[_0x45bd2f(0x97)][_0x45bd2f(0xc5)]['pipe'](_0x4c3460(0x10))['subscribe'](_0x4d0dfa=>{const _0x9bfcac=_0x45bd2f,_0x5c2b06=new Set();_0x4d0dfa['forEach'](_0x474358=>{const _0x144d87=_0x3d57;switch(_0x474358['type']){case _0x144d87(0x92):{const _0x1cb79b=_0x474358['payload'][_0x144d87(0x8f)];_0x5c2b06[_0x144d87(0x92)](_0x1cb79b);break;}}}),B(this[_0x9bfcac(0xbc)],_0x5c2b06);}));}[_0x39886c(0xc4)](){const _0x1ed618=_0x39886c;this[_0x1ed618(0xd3)](this[_0x1ed618(0xa5)][_0x1ed618(0xc5)]['subscribe'](async _0x4155f2=>{const _0x26cd9a=_0x1ed618;var _0x247e86,_0x25f7d6,_0x41d695,_0x5e9f39;const _0x359b5b=(_0x247e86=this[_0x26cd9a(0x97)][_0x26cd9a(0xbd)](_0x4155f2[_0x26cd9a(0xaf)])[_0x26cd9a(0x83)](_0x5ce09e=>_0x5ce09e[_0x26cd9a(0xca)]===_0x4155f2[_0x26cd9a(0xca)]))==null?void 0x0:_0x247e86[_0x26cd9a(0xb4)];if(!_0x359b5b)return;const {unitId:_0x1e85e,subUnitId:_0x11ae3a}=_0x359b5b;switch(_0x4155f2[_0x26cd9a(0x99)]&&this[_0x26cd9a(0x95)][_0x26cd9a(0xd4)](_0x4155f2[_0x26cd9a(0x99)]),_0x4155f2[_0x26cd9a(0xb1)]){case v[_0x26cd9a(0xc1)]:break;case v[_0x26cd9a(0x9a)]:{this[_0x26cd9a(0x97)][_0x26cd9a(0x98)](_0x1e85e,_0x11ae3a,{'unitId':_0x1e85e,'subUnitId':_0x11ae3a,'ref':'','id':_0x4155f2[_0x26cd9a(0xb0)],'dT':D(+_0x4155f2[_0x26cd9a(0x82)]),'threadId':_0x4155f2[_0x26cd9a(0xca)],'personId':(_0x41d695=(_0x25f7d6=_0x4155f2[_0x26cd9a(0x99)])==null?void 0x0:_0x25f7d6['userID'])!=null?_0x41d695:_0x4155f2[_0x26cd9a(0x86)],'text':JSON[_0x26cd9a(0xc9)](_0x4155f2['content']),'parentId':_0x359b5b['id']});break;}case v[_0x26cd9a(0x9d)]:{const _0xa2e8e=this[_0x26cd9a(0x97)]['getComment'](_0x1e85e,_0x11ae3a,_0x4155f2[_0x26cd9a(0xb0)]);_0xa2e8e&&_0xa2e8e['parentId']&&this[_0x26cd9a(0x97)][_0x26cd9a(0xae)](_0x1e85e,_0x11ae3a,_0x4155f2[_0x26cd9a(0xb0)]);break;}case v[_0x26cd9a(0x84)]:{this[_0x26cd9a(0x97)][_0x26cd9a(0xa8)](_0x1e85e,_0x11ae3a,{'commentId':_0x4155f2['replyId'],'text':JSON[_0x26cd9a(0xc9)](_0x4155f2[_0x26cd9a(0xc7)])});break;}case v[_0x26cd9a(0x89)]:{const _0x123507=(_0x5e9f39=this[_0x26cd9a(0x97)]['getUnit'](_0x4155f2['unitId'])[_0x26cd9a(0x83)](_0x371ee0=>_0x371ee0['threadId']===_0x4155f2[_0x26cd9a(0xca)]))==null?void 0x0:_0x5e9f39['root'];_0x123507&&this[_0x26cd9a(0x97)][_0x26cd9a(0xc3)](_0x1e85e,_0x11ae3a,_0x123507['id'],_0x4155f2[_0x26cd9a(0x9e)]===I[_0x26cd9a(0x80)]);break;}}}));}};S=V([p(0x0,_0x361c7c(_0x5ec5d5)),p(0x1,_0x361c7c(_0x563c28)),p(0x2,_0x361c7c(_0x3307ae)),p(0x3,_0x361c7c(_0x585345))],S);const z=_0x39886c(0xbe),M={};function _0x3533(){const _0x4d9ab5=['/reply','customRanges','191355sMMxkj','error','users','disposeWithMe','addUser','get','filter','UNRECOGNIZED','YYYY/MM/DD\x20HH:mm','_sessionService','requireSession','_threadCommentDataSource','stringify','syncUpdateMutationToColla','COMMENT','reply','code','/solved','rangeId','5278419GIllrd','14WhDRUU','Solved','Unknown','createTimestamp','find','Edit','_config','userId','symbol','_initUserSync','Solve','setConfig','rangeType','_httpService','/universer-api/comment/unit/','replies','personId','OpenOrReOpen','format','add','pluginName','3456795gkspCh','_userService','onReady','_threadCommentModel','addComment','user','Reply','size','getMemberID','Delete','solved','UNIVER_UNKNOWN','_initDataSource','length','1309896tdsCln','forEach','getCurrentUser','_commentService','post','resolved','updateComment','6MHFJxs','map','ref','_configService','2DZiYsX','deleteComment','unitId','replyId','type','body','639252bIgXBv','root','/list','dataSource','values','delete','defineProperty','userID','/add','_injector','getUnit','thread-comment-data-source.config','9822720SWhxud','getOwnPropertyDescriptor','Add','_threadCommentDataSourceService','resolveComment','_init','commentUpdate$','965416gWcaPo','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','parse','threadId','getUser','listComments','slice'];_0x3533=function(){return _0x4d9ab5;};return _0x3533();}var k=Object[_0x39886c(0xc0)],Q=(_0x27caee,_0x2c1173,_0x3df7f4,_0x4ba2d4)=>{for(var _0x43e158=_0x4ba2d4>0x1?void 0x0:_0x4ba2d4?k(_0x2c1173,_0x3df7f4):_0x2c1173,_0x5c3eca=_0x27caee['length']-0x1,_0x157efd;_0x5c3eca>=0x0;_0x5c3eca--)(_0x157efd=_0x27caee[_0x5c3eca])&&(_0x43e158=_0x157efd(_0x43e158)||_0x43e158);return _0x43e158;},_=(_0x5e8b9d,_0x302278)=>(_0xa05181,_0x433fed)=>_0x302278(_0xa05181,_0x433fed,_0x5e8b9d);function X(_0x52db82,_0x1bb424){const _0x16260c=_0x39886c,_0x35e06d=_0x52db82[_0x16260c(0x8e)][0x0];return{..._0x1bb424,'id':_0x35e06d[_0x16260c(0xb0)],'resolved':_0x52db82[_0x16260c(0x9e)]===0x1,'dT':D(_0x35e06d['createTimestamp']),'personId':_0x35e06d[_0x16260c(0x86)],'threadId':_0x35e06d['threadId']};}function ee(_0x1756eb,_0x5bacad,_0x466eef){const _0x1d33dc=_0x39886c;var _0x251756,_0x223ffc;if(((_0x223ffc=(_0x251756=_0x1756eb==null?void 0x0:_0x1756eb['replies'])==null?void 0x0:_0x251756[_0x1d33dc(0xa1)])!=null?_0x223ffc:0x0)>0x0){const _0x59ea43=(_0x1cb48c,_0x49f513)=>({'id':_0x1cb48c[_0x1d33dc(0xb0)],'threadId':_0x1cb48c['threadId'],'dT':D(_0x1cb48c[_0x1d33dc(0x82)]),'personId':_0x1cb48c['userId'],'resolved':_0x1756eb[_0x1d33dc(0x9e)]===I[_0x1d33dc(0x80)],'unitId':_0x5bacad,'subUnitId':_0x466eef,'text':JSON[_0x1d33dc(0xc9)](_0x1cb48c[_0x1d33dc(0xc7)]),'parentId':_0x49f513}),_0x58982e=_0x59ea43(_0x1756eb[_0x1d33dc(0x8e)][0x0]);return{..._0x58982e,'children':_0x1756eb['replies'][_0x1d33dc(0xcd)](0x1)[_0x1d33dc(0xaa)](_0x3eeb2c=>_0x59ea43(_0x3eeb2c,_0x58982e['id']))};}return null;}let f=class{constructor(_0x440ec8,_0x163202,_0x3aeecf,_0x4a520e){const _0x58773b=_0x39886c;this[_0x58773b(0x8c)]=_0x440ec8,this[_0x58773b(0x95)]=_0x163202,this[_0x58773b(0xd9)]=_0x3aeecf,this[_0x58773b(0xbc)]=_0x4a520e;}async[_0x39886c(0x98)](_0x5ef400){const _0x23d365=_0x39886c;var _0x559da1,_0x51fbae;const {parentId:_0x47c123,unitId:_0x49820b,text:_0x1e8667,threadId:_0x4add82}=_0x5ef400,_0x29f8ab=(_0x51fbae=(_0x559da1=_0x1e8667[_0x23d365(0xcf)])==null?void 0x0:_0x559da1['filter'](_0x72771a=>_0x72771a[_0x23d365(0x8b)]===_0x86fd2c[_0x23d365(0xde)])[_0x23d365(0xaa)](_0x560e9d=>_0x560e9d[_0x23d365(0xe2)]))!=null?_0x51fbae:[],_0x136ca0=JSON[_0x23d365(0xdc)](_0x1e8667),_0x1f3f91=(await this[_0x23d365(0xd9)]['requireSession'](_0x49820b))['getMemberID']();if(_0x47c123){const _0x2e711a={'memberId':_0x1f3f91,'unitId':_0x49820b,'content':_0x136ca0,'mention':_0x29f8ab,'threadId':_0x4add82},_0x38aca9=(await this['_httpService']['post'](_0x23d365(0x8d)+_0x49820b+_0x23d365(0xce),{'body':_0x2e711a}))['body'][_0x23d365(0xdf)];return{..._0x5ef400,'id':_0x38aca9[_0x23d365(0xb0)],'dT':_0x56943a(+_0x38aca9[_0x23d365(0x82)])[_0x23d365(0x91)](_0x23d365(0xd8)),'personId':_0x38aca9[_0x23d365(0x86)]};}else{const _0x4a2ea5={'memberId':_0x1f3f91,'unitId':_0x49820b,'content':_0x136ca0,'mention':_0x29f8ab},_0x466e56=await this[_0x23d365(0x8c)][_0x23d365(0xa6)]('/universer-api/comment/unit/'+_0x49820b+_0x23d365(0xbb),{'body':_0x4a2ea5});return X(_0x466e56[_0x23d365(0xb2)]['comment'],_0x5ef400);}}async[_0x39886c(0xa8)](_0x2615cc){const _0x177d9c=_0x39886c;var _0x49dc6f,_0x11e42c;const {text:_0x17e4ea,unitId:_0x31fe31}=_0x2615cc,_0x77a1f3=(_0x11e42c=(_0x49dc6f=_0x17e4ea[_0x177d9c(0xcf)])==null?void 0x0:_0x49dc6f[_0x177d9c(0xd6)](_0x32534a=>_0x32534a[_0x177d9c(0x8b)]===_0x86fd2c[_0x177d9c(0xde)])[_0x177d9c(0xaa)](_0x39cdf8=>_0x39cdf8[_0x177d9c(0xe2)]))!=null?_0x11e42c:[],_0x2d6b90=JSON[_0x177d9c(0xdc)](_0x17e4ea),_0x1d291d=_0x2615cc['threadId'],_0x390d6b=_0x2615cc['id'],_0x2eb635={'memberId':(await this[_0x177d9c(0xd9)][_0x177d9c(0xda)](_0x31fe31))[_0x177d9c(0x9c)](),'unitId':_0x31fe31,'threadId':_0x1d291d,'mention':_0x77a1f3,'content':_0x2d6b90,'replyId':_0x390d6b},_0x45516c=await this[_0x177d9c(0x8c)][_0x177d9c(0xa6)]('/universer-api/comment/unit/'+_0x31fe31+'/edit',{'body':_0x2eb635});return!_0x45516c[_0x177d9c(0xb2)][_0x177d9c(0xd1)]||_0x45516c[_0x177d9c(0xb2)]['error'][_0x177d9c(0xe0)]===0x1;}async[_0x39886c(0xc3)](_0x55755a){const _0x2fb7c5=_0x39886c,{unitId:_0x5316df}=_0x55755a,_0x183734=_0x55755a[_0x2fb7c5(0xca)],_0x27a597={'memberId':this[_0x2fb7c5(0x95)][_0x2fb7c5(0xa4)]()[_0x2fb7c5(0xba)],'unitId':_0x5316df,'threadId':_0x183734,'solved':_0x55755a[_0x2fb7c5(0xa7)]?I['Solved']:I[_0x2fb7c5(0x90)]},_0x104d8e=await this[_0x2fb7c5(0x8c)][_0x2fb7c5(0xa6)](_0x2fb7c5(0x8d)+_0x5316df+_0x2fb7c5(0xe1),{'body':_0x27a597});return!_0x104d8e[_0x2fb7c5(0xb2)][_0x2fb7c5(0xd1)]||_0x104d8e[_0x2fb7c5(0xb2)]['error']['code']===0x1;}async['deleteComment'](_0x2a7bed,_0x42235b,_0x79369b,_0x14d604){const _0x2f8f54=_0x39886c,_0xf2418={'memberId':(await this['_sessionService']['requireSession'](_0x2a7bed))['getMemberID'](),'threadId':_0x79369b,'replyId':_0x14d604,'unitId':_0x2a7bed},_0x57e576=await this[_0x2f8f54(0x8c)][_0x2f8f54(0xa6)]('/universer-api/comment/unit/'+_0x2a7bed+'/delete',{'body':_0xf2418});return!_0x57e576[_0x2f8f54(0xb2)]['error']||_0x57e576[_0x2f8f54(0xb2)][_0x2f8f54(0xd1)][_0x2f8f54(0xe0)]===0x1;}async[_0x39886c(0xcc)](_0x4e66b1,_0x42b289,_0x58a73f){const _0x16acf5=_0x39886c,_0x27869d={'unitId':_0x4e66b1,'threadId':_0x58a73f},_0x1e4cf0=await this[_0x16acf5(0x8c)]['post'](_0x16acf5(0x8d)+_0x4e66b1+_0x16acf5(0xb5),{'body':_0x27869d}),_0x4c367f=_0x58a73f[_0x16acf5(0xaa)](_0x2aae77=>ee(_0x1e4cf0['body']['comments'][_0x2aae77],_0x4e66b1,_0x42b289))[_0x16acf5(0xd6)](Boolean);return Object[_0x16acf5(0xb7)](_0x1e4cf0[_0x16acf5(0xb2)]['users'])[_0x16acf5(0xa3)](_0x1cba00=>{const _0x26bdf0=_0x16acf5;this['_userService'][_0x26bdf0(0xd4)](_0x1cba00);}),_0x4c367f;}['saveCommentToSnapshot'](_0x2d343f){const _0x3ead00=_0x39886c;return{'id':_0x2d343f['id'],'threadId':_0x2d343f[_0x3ead00(0xca)],'ref':_0x2d343f[_0x3ead00(0xab)]};}};f=Q([_(0x0,_0x361c7c(_0x5c7a01)),_(0x1,_0x361c7c(_0x3307ae)),_(0x2,_0x361c7c(_0x2f98bf)),_(0x3,_0x361c7c(_0x585345))],f);var re=Object[_0x39886c(0xc0)],te=(_0x1a593c,_0x302d7c,_0x36c683,_0x610613)=>{const _0x2309f5=_0x39886c;for(var _0xb77bd5=_0x610613>0x1?void 0x0:_0x610613?re(_0x302d7c,_0x36c683):_0x302d7c,_0x23ea12=_0x1a593c[_0x2309f5(0xa1)]-0x1,_0x2cf29e;_0x23ea12>=0x0;_0x23ea12--)(_0x2cf29e=_0x1a593c[_0x23ea12])&&(_0xb77bd5=_0x2cf29e(_0xb77bd5)||_0xb77bd5);return _0xb77bd5;},N=(_0x5598ca,_0x8bd59e)=>(_0x1612a5,_0x334700)=>_0x8bd59e(_0x1612a5,_0x334700,_0x5598ca);let g=class extends _0x41eace{constructor(_0x347896,_0x3ebda7){const _0x360e8a=_0x39886c;super(),this[_0x360e8a(0xc2)]=_0x347896,this['_threadCommentDataSource']=_0x3ebda7,this[_0x360e8a(0xa0)]();}[_0x39886c(0xa0)](){const _0x1e9fd8=_0x39886c;this[_0x1e9fd8(0xc2)][_0x1e9fd8(0xb6)]=this[_0x1e9fd8(0xdb)],this[_0x1e9fd8(0xc2)][_0x1e9fd8(0xdd)]=!0x1;}};g=te([N(0x0,_0x852eb8),N(0x1,_0x361c7c(f))],g);var se=Object[_0x39886c(0xb9)],oe=Object[_0x39886c(0xc0)],ne=(_0x516097,_0xdb44bb,_0x29f9e3)=>_0xdb44bb in _0x516097?se(_0x516097,_0xdb44bb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x29f9e3}):_0x516097[_0xdb44bb]=_0x29f9e3,ie=(_0x49640a,_0x5d20d1,_0x19abec,_0x36c7a2)=>{const _0x3e833a=_0x39886c;for(var _0x24987f=_0x36c7a2>0x1?void 0x0:_0x36c7a2?oe(_0x5d20d1,_0x19abec):_0x5d20d1,_0x453cf1=_0x49640a[_0x3e833a(0xa1)]-0x1,_0xc578a3;_0x453cf1>=0x0;_0x453cf1--)(_0xc578a3=_0x49640a[_0x453cf1])&&(_0x24987f=_0xc578a3(_0x24987f)||_0x24987f);return _0x24987f;},w=(_0x329b6a,_0x1dcdcf)=>(_0x19706b,_0x42322c)=>_0x1dcdcf(_0x19706b,_0x42322c,_0x329b6a),$=(_0x2a1c2b,_0xa592,_0x327d14)=>ne(_0x2a1c2b,typeof _0xa592!=_0x39886c(0x87)?_0xa592+'':_0xa592,_0x327d14);let b=class extends _0x5da7bd{constructor(_0x4b5d60=M,_0x5df046,_0x18ceb7){const _0x2f1178=_0x39886c;super(),this[_0x2f1178(0x85)]=_0x4b5d60,this[_0x2f1178(0xbc)]=_0x5df046,this['_configService']=_0x18ceb7;const {..._0x5d8b90}=_0x22fe1a({},M,this[_0x2f1178(0x85)]);this[_0x2f1178(0xac)][_0x2f1178(0x8a)](z,_0x5d8b90);}['onStarting'](){const _0x4f9a77=_0x39886c;[[f],[g],[S]][_0x4f9a77(0xa3)](_0x4bba79=>{this['_injector']['add'](_0x4bba79);});}[_0x39886c(0x96)](){const _0x21854f=_0x39886c;this[_0x21854f(0xbc)]['get'](g),this[_0x21854f(0xbc)][_0x21854f(0xd5)](S);}};$(b,_0x39886c(0x93),W),$(b,_0x39886c(0xb1),_0x235ad1[_0x39886c(0x9f)]),b=ie([_0x56b67b(_0x230aaa,_0x1627d3,_0x2b2705),w(0x1,_0x361c7c(_0x585345)),w(0x2,_0x45f6f1)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x29e1fc,_0x45c552){const _0x4105bd=_0x28b1,_0x12b092=_0x29e1fc();while(!![]){try{const _0x5a2298=parseInt(_0x4105bd(0xff))/0x1+parseInt(_0x4105bd(0xd8))/0x2*(parseInt(_0x4105bd(0xcd))/0x3)+-parseInt(_0x4105bd(0x113))/0x4+-parseInt(_0x4105bd(0x120))/0x5+-parseInt(_0x4105bd(0x11e))/0x6*(parseInt(_0x4105bd(0x115))/0x7)+-parseInt(_0x4105bd(0x133))/0x8*(parseInt(_0x4105bd(0xcc))/0x9)+-parseInt(_0x4105bd(0xfd))/0xa*(-parseInt(_0x4105bd(0xfb))/0xb);if(_0x5a2298===_0x45c552)break;else _0x12b092['push'](_0x12b092['shift']());}catch(_0x996dca){_0x12b092['push'](_0x12b092['shift']());}}}(_0x1f1a,0xa5276),function(_0x250a0b,_0x1b83f3){const _0x2bd7a1=_0x28b1;typeof exports==_0x2bd7a1(0xf2)&&typeof module<'u'?_0x1b83f3(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==_0x2bd7a1(0xd2)&&define[_0x2bd7a1(0x134)]?define([_0x2bd7a1(0x125),_0x2bd7a1(0xdf),_0x2bd7a1(0xee),_0x2bd7a1(0x13c),'@univerjs/thread-comment-ui',_0x2bd7a1(0xeb),_0x2bd7a1(0xd6),_0x2bd7a1(0xd9)],_0x1b83f3):(_0x250a0b=typeof globalThis<'u'?globalThis:_0x250a0b||self,_0x1b83f3(_0x250a0b[_0x2bd7a1(0x12e)]={},_0x250a0b[_0x2bd7a1(0xc2)],_0x250a0b[_0x2bd7a1(0xe6)],_0x250a0b[_0x2bd7a1(0xbd)],_0x250a0b[_0x2bd7a1(0xfe)],_0x250a0b[_0x2bd7a1(0x128)],_0x250a0b[_0x2bd7a1(0xd6)],_0x250a0b[_0x2bd7a1(0xe4)]));}(this,function(_0x2a52e4,_0x1522df,_0x225c7e,_0x420862,_0x179658,_0x337128,_0x4b5f23,_0xbc6973){'use strict';const _0x5310d2=_0x28b1;const _0x1bcd07='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x17afe3=(_0x1a4f29=>(_0x1a4f29[_0x1a4f29[_0x5310d2(0xf3)]=0x0]=_0x5310d2(0xf3),_0x1a4f29[_0x1a4f29[_0x5310d2(0x13d)]=0x1]=_0x5310d2(0x13d),_0x1a4f29[_0x1a4f29['UNRECOGNIZED']=-0x1]=_0x5310d2(0x129),_0x1a4f29))(_0x17afe3||{}),_0x317030=(_0x899f80=>(_0x899f80[_0x899f80['Unknown']=0x0]=_0x5310d2(0x10e),_0x899f80[_0x899f80[_0x5310d2(0xe2)]=0x1]=_0x5310d2(0xe2),_0x899f80[_0x899f80['Reply']=0x2]=_0x5310d2(0xca),_0x899f80[_0x899f80[_0x5310d2(0xf5)]=0x3]='Edit',_0x899f80[_0x899f80[_0x5310d2(0x121)]=0x4]=_0x5310d2(0x121),_0x899f80[_0x899f80[_0x5310d2(0x100)]=0x5]=_0x5310d2(0x100),_0x899f80[_0x899f80[_0x5310d2(0x129)]=-0x1]=_0x5310d2(0x129),_0x899f80))(_0x317030||{});const _0x4a67e9=_0x34a369=>_0x420862[_0x5310d2(0xea)](new Date(+_0x34a369))[_0x5310d2(0xc9)](_0x5310d2(0x10b)),_0x22a23e=async(_0x2cd59a,_0x100be8)=>{const _0x5a8982=_0x5310d2,_0x26cbae=_0x2cd59a['get'](_0x420862[_0x5a8982(0xf1)]),_0x466cc4=_0x2cd59a[_0x5a8982(0x143)](_0xbc6973['HTTPService']);_0x100be8[_0x5a8982(0x114)](_0x4474aa=>{const _0x4bbd3f=_0x5a8982;_0x26cbae[_0x4bbd3f(0x137)](_0x4474aa)&&_0x100be8[_0x4bbd3f(0x124)](_0x4474aa);}),_0x100be8[_0x5a8982(0x11a)]&&(await _0x466cc4[_0x5a8982(0x143)](_0x5a8982(0x12a),{'params':{'userIDs':[..._0x100be8]}}))[_0x5a8982(0xdd)][_0x5a8982(0x11b)]['forEach'](_0x334034=>{_0x334034&&_0x26cbae['addUser'](_0x334034);});};var _0x27a6bb=Object['getOwnPropertyDescriptor'],_0x51d98b=(_0x2a185a,_0x5ebee9,_0x16ccd5,_0x2124b7)=>{const _0x312674=_0x5310d2;for(var _0x1bdb87=_0x2124b7>0x1?void 0x0:_0x2124b7?_0x27a6bb(_0x5ebee9,_0x16ccd5):_0x5ebee9,_0x28bd5a=_0x2a185a[_0x312674(0x10c)]-0x1,_0x29cb20;_0x28bd5a>=0x0;_0x28bd5a--)(_0x29cb20=_0x2a185a[_0x28bd5a])&&(_0x1bdb87=_0x29cb20(_0x1bdb87)||_0x1bdb87);return _0x1bdb87;},_0x326893=(_0x4e1350,_0x16c273)=>(_0x9c1966,_0x4c4f76)=>_0x16c273(_0x9c1966,_0x4c4f76,_0x4e1350);let _0x516b24=class extends _0x420862[_0x5310d2(0xc4)]{constructor(_0x491696,_0x86bbaa,_0x2a7814,_0x263c20){const _0x919d8b=_0x5310d2;super(),this[_0x919d8b(0xd5)]=_0x491696,this[_0x919d8b(0xec)]=_0x86bbaa,this['_userService']=_0x2a7814,this[_0x919d8b(0x136)]=_0x263c20,this[_0x919d8b(0xfc)](),this['_initUserSync']();}['_initUserSync'](){const _0x2490b4=_0x5310d2;this['disposeWithMe'](this[_0x2490b4(0xec)][_0x2490b4(0x13a)]['pipe'](_0x4b5f23[_0x2490b4(0xe7)](0x10))[_0x2490b4(0x126)](_0x1e95f4=>{const _0x320ac5=_0x2490b4,_0x3cccde=new Set();_0x1e95f4[_0x320ac5(0x114)](_0x156b84=>{const _0x373e01=_0x320ac5;switch(_0x156b84[_0x373e01(0x138)]){case _0x373e01(0xc1):{const _0x25a847=_0x156b84[_0x373e01(0x10a)][_0x373e01(0x13f)];_0x3cccde[_0x373e01(0xc1)](_0x25a847);break;}}}),_0x22a23e(this[_0x320ac5(0x136)],_0x3cccde);}));}[_0x5310d2(0xfc)](){const _0x5a024a=_0x5310d2;this['disposeWithMe'](this[_0x5a024a(0xd5)][_0x5a024a(0x13a)]['subscribe'](async _0x118272=>{const _0x52c431=_0x5a024a;var _0x8121c,_0x3399fb,_0x158c6b,_0x454772;const _0x3a7c3e=(_0x8121c=this[_0x52c431(0xec)][_0x52c431(0x130)](_0x118272[_0x52c431(0xe9)])[_0x52c431(0x127)](_0x106d3c=>_0x106d3c[_0x52c431(0x103)]===_0x118272[_0x52c431(0x103)]))==null?void 0x0:_0x8121c['root'];if(!_0x3a7c3e)return;const {unitId:_0x46b953,subUnitId:_0x408bde}=_0x3a7c3e;switch(_0x118272[_0x52c431(0x106)]&&this['_userService'][_0x52c431(0x11f)](_0x118272[_0x52c431(0x106)]),_0x118272['type']){case _0x317030[_0x52c431(0xe2)]:break;case _0x317030[_0x52c431(0xca)]:{this[_0x52c431(0xec)][_0x52c431(0xed)](_0x46b953,_0x408bde,{'unitId':_0x46b953,'subUnitId':_0x408bde,'ref':'','id':_0x118272['replyId'],'dT':_0x4a67e9(+_0x118272[_0x52c431(0x101)]),'threadId':_0x118272[_0x52c431(0x103)],'personId':(_0x158c6b=(_0x3399fb=_0x118272[_0x52c431(0x106)])==null?void 0x0:_0x3399fb[_0x52c431(0xbe)])!=null?_0x158c6b:_0x118272[_0x52c431(0x102)],'text':JSON['parse'](_0x118272[_0x52c431(0xf7)]),'parentId':_0x3a7c3e['id']});break;}case _0x317030[_0x52c431(0x121)]:{const _0x47a64c=this[_0x52c431(0xec)]['getComment'](_0x46b953,_0x408bde,_0x118272[_0x52c431(0x104)]);_0x47a64c&&_0x47a64c[_0x52c431(0x141)]&&this['_threadCommentModel'][_0x52c431(0xc5)](_0x46b953,_0x408bde,_0x118272['replyId']);break;}case _0x317030[_0x52c431(0xf5)]:{this[_0x52c431(0xec)][_0x52c431(0x11d)](_0x46b953,_0x408bde,{'commentId':_0x118272[_0x52c431(0x104)],'text':JSON[_0x52c431(0x12b)](_0x118272[_0x52c431(0xf7)])});break;}case _0x317030[_0x52c431(0x100)]:{const _0x55e200=(_0x454772=this['_threadCommentModel'][_0x52c431(0x130)](_0x118272[_0x52c431(0xe9)])[_0x52c431(0x127)](_0x4a2c87=>_0x4a2c87[_0x52c431(0x103)]===_0x118272[_0x52c431(0x103)]))==null?void 0x0:_0x454772[_0x52c431(0xf8)];_0x55e200&&this['_threadCommentModel'][_0x52c431(0x122)](_0x46b953,_0x408bde,_0x55e200['id'],_0x118272[_0x52c431(0x10d)]===_0x17afe3[_0x52c431(0x13d)]);break;}}}));}};_0x516b24=_0x51d98b([_0x326893(0x0,_0x420862[_0x5310d2(0x144)](_0x1522df[_0x5310d2(0x110)])),_0x326893(0x1,_0x420862['Inject'](_0x337128[_0x5310d2(0xf4)])),_0x326893(0x2,_0x420862[_0x5310d2(0x144)](_0x420862[_0x5310d2(0xf1)])),_0x326893(0x3,_0x420862[_0x5310d2(0x144)](_0x420862[_0x5310d2(0x131)]))],_0x516b24);const _0x1de666=_0x5310d2(0xdc),_0x3be7fa={};var _0x36a0da=Object[_0x5310d2(0x116)],_0x4a0e71=(_0x4764ba,_0x25e2fe,_0xb1018c,_0x76364a)=>{const _0xb4ce10=_0x5310d2;for(var _0x41217c=_0x76364a>0x1?void 0x0:_0x76364a?_0x36a0da(_0x25e2fe,_0xb1018c):_0x25e2fe,_0x8897ea=_0x4764ba[_0xb4ce10(0x10c)]-0x1,_0x1f13d9;_0x8897ea>=0x0;_0x8897ea--)(_0x1f13d9=_0x4764ba[_0x8897ea])&&(_0x41217c=_0x1f13d9(_0x41217c)||_0x41217c);return _0x41217c;},_0x4af0a1=(_0x244873,_0x533c77)=>(_0x493194,_0x3df72a)=>_0x533c77(_0x493194,_0x3df72a,_0x244873);function _0x3e7798(_0x16b0cf,_0x14126d){const _0x41aea2=_0x5310d2,_0x5c0729=_0x16b0cf[_0x41aea2(0x140)][0x0];return{..._0x14126d,'id':_0x5c0729[_0x41aea2(0x104)],'resolved':_0x16b0cf[_0x41aea2(0x10d)]===0x1,'dT':_0x4a67e9(_0x5c0729[_0x41aea2(0x101)]),'personId':_0x5c0729['userId'],'threadId':_0x5c0729[_0x41aea2(0x103)]};}function _0x11d5e1(_0x5d7298,_0x1ca270,_0x121fd2){const _0x362350=_0x5310d2;var _0x59489a,_0x2fc933;if(((_0x2fc933=(_0x59489a=_0x5d7298==null?void 0x0:_0x5d7298[_0x362350(0x140)])==null?void 0x0:_0x59489a['length'])!=null?_0x2fc933:0x0)>0x0){const _0x165dfa=(_0xf4c0ce,_0xdb94f8)=>({'id':_0xf4c0ce['replyId'],'threadId':_0xf4c0ce[_0x362350(0x103)],'dT':_0x4a67e9(_0xf4c0ce[_0x362350(0x101)]),'personId':_0xf4c0ce[_0x362350(0x102)],'resolved':_0x5d7298[_0x362350(0x10d)]===_0x17afe3[_0x362350(0x13d)],'unitId':_0x1ca270,'subUnitId':_0x121fd2,'text':JSON[_0x362350(0x12b)](_0xf4c0ce['content']),'parentId':_0xdb94f8}),_0x55f483=_0x165dfa(_0x5d7298[_0x362350(0x140)][0x0]);return{..._0x55f483,'children':_0x5d7298['replies'][_0x362350(0xbc)](0x1)['map'](_0x337350=>_0x165dfa(_0x337350,_0x55f483['id']))};}return null;}let _0x45da3a=class{constructor(_0x201c45,_0x4f0ae9,_0x6a61d5,_0x1a4d7b){const _0x591889=_0x5310d2;this[_0x591889(0xe3)]=_0x201c45,this[_0x591889(0xf9)]=_0x4f0ae9,this[_0x591889(0xfa)]=_0x6a61d5,this[_0x591889(0x136)]=_0x1a4d7b;}async['addComment'](_0x31e614){const _0x86443b=_0x5310d2;var _0x787a83,_0x387fe4;const {parentId:_0x4efba5,unitId:_0x41d9f0,text:_0x55132d,threadId:_0x151086}=_0x31e614,_0x1cf330=(_0x387fe4=(_0x787a83=_0x55132d[_0x86443b(0xd0)])==null?void 0x0:_0x787a83[_0x86443b(0xbb)](_0x5339f1=>_0x5339f1[_0x86443b(0x118)]===_0x420862[_0x86443b(0xbf)][_0x86443b(0xce)])[_0x86443b(0xcf)](_0x43dd0c=>_0x43dd0c[_0x86443b(0x111)]))!=null?_0x387fe4:[],_0x4f7c50=JSON[_0x86443b(0xe5)](_0x55132d),_0x2dec5e=(await this[_0x86443b(0xfa)][_0x86443b(0x142)](_0x41d9f0))[_0x86443b(0xd3)]();if(_0x4efba5){const _0x68892e={'memberId':_0x2dec5e,'unitId':_0x41d9f0,'content':_0x4f7c50,'mention':_0x1cf330,'threadId':_0x151086},_0x2decd3=(await this[_0x86443b(0xe3)][_0x86443b(0x139)](_0x86443b(0x109)+_0x41d9f0+_0x86443b(0x11c),{'body':_0x68892e}))[_0x86443b(0xdd)]['reply'];return{..._0x31e614,'id':_0x2decd3[_0x86443b(0x104)],'dT':_0x420862[_0x86443b(0xea)](+_0x2decd3[_0x86443b(0x101)])['format'](_0x86443b(0x10b)),'personId':_0x2decd3[_0x86443b(0x102)]};}else{const _0x5838fc={'memberId':_0x2dec5e,'unitId':_0x41d9f0,'content':_0x4f7c50,'mention':_0x1cf330},_0x231540=await this['_httpService'][_0x86443b(0x139)]('/universer-api/comment/unit/'+_0x41d9f0+_0x86443b(0x107),{'body':_0x5838fc});return _0x3e7798(_0x231540['body'][_0x86443b(0xc3)],_0x31e614);}}async[_0x5310d2(0x11d)](_0xfc1e5c){const _0x52ed5e=_0x5310d2;var _0x4e5a17,_0x1fe12e;const {text:_0x405523,unitId:_0x4ed17a}=_0xfc1e5c,_0x530572=(_0x1fe12e=(_0x4e5a17=_0x405523[_0x52ed5e(0xd0)])==null?void 0x0:_0x4e5a17['filter'](_0x371e26=>_0x371e26[_0x52ed5e(0x118)]===_0x420862[_0x52ed5e(0xbf)][_0x52ed5e(0xce)])[_0x52ed5e(0xcf)](_0x4eed1b=>_0x4eed1b[_0x52ed5e(0x111)]))!=null?_0x1fe12e:[],_0xc870a8=JSON['stringify'](_0x405523),_0x116774=_0xfc1e5c[_0x52ed5e(0x103)],_0x596ed7=_0xfc1e5c['id'],_0x372de8={'memberId':(await this['_sessionService'][_0x52ed5e(0x142)](_0x4ed17a))[_0x52ed5e(0xd3)](),'unitId':_0x4ed17a,'threadId':_0x116774,'mention':_0x530572,'content':_0xc870a8,'replyId':_0x596ed7},_0x393e9c=await this[_0x52ed5e(0xe3)][_0x52ed5e(0x139)](_0x52ed5e(0x109)+_0x4ed17a+_0x52ed5e(0x108),{'body':_0x372de8});return!_0x393e9c[_0x52ed5e(0xdd)][_0x52ed5e(0xf6)]||_0x393e9c[_0x52ed5e(0xdd)][_0x52ed5e(0xf6)][_0x52ed5e(0xe0)]===0x1;}async[_0x5310d2(0x122)](_0x5692e3){const _0x232853=_0x5310d2,{unitId:_0x1c1b66}=_0x5692e3,_0xbe9f18=_0x5692e3['threadId'],_0x522f11={'memberId':this[_0x232853(0xf9)][_0x232853(0xda)]()[_0x232853(0xbe)],'unitId':_0x1c1b66,'threadId':_0xbe9f18,'solved':_0x5692e3[_0x232853(0x145)]?_0x17afe3[_0x232853(0x13d)]:_0x17afe3[_0x232853(0xf3)]},_0x13f582=await this[_0x232853(0xe3)][_0x232853(0x139)](_0x232853(0x109)+_0x1c1b66+_0x232853(0x13e),{'body':_0x522f11});return!_0x13f582[_0x232853(0xdd)][_0x232853(0xf6)]||_0x13f582['body'][_0x232853(0xf6)][_0x232853(0xe0)]===0x1;}async[_0x5310d2(0xc5)](_0x56bace,_0x4f58d0,_0x1bd3e1,_0x14fa72){const _0x512b61=_0x5310d2,_0x1696a6={'memberId':(await this['_sessionService'][_0x512b61(0x142)](_0x56bace))[_0x512b61(0xd3)](),'threadId':_0x1bd3e1,'replyId':_0x14fa72,'unitId':_0x56bace},_0x40509d=await this[_0x512b61(0xe3)]['post'](_0x512b61(0x109)+_0x56bace+_0x512b61(0xd7),{'body':_0x1696a6});return!_0x40509d['body'][_0x512b61(0xf6)]||_0x40509d[_0x512b61(0xdd)]['error'][_0x512b61(0xe0)]===0x1;}async[_0x5310d2(0xe8)](_0x10e401,_0x5ec516,_0x7764e6){const _0x1b21dc=_0x5310d2,_0x29f989={'unitId':_0x10e401,'threadId':_0x7764e6},_0x30b384=await this[_0x1b21dc(0xe3)][_0x1b21dc(0x139)](_0x1b21dc(0x109)+_0x10e401+_0x1b21dc(0x105),{'body':_0x29f989}),_0xb3fa02=_0x7764e6[_0x1b21dc(0xcf)](_0x24ce3d=>_0x11d5e1(_0x30b384[_0x1b21dc(0xdd)][_0x1b21dc(0xd1)][_0x24ce3d],_0x10e401,_0x5ec516))['filter'](Boolean);return Object['values'](_0x30b384[_0x1b21dc(0xdd)][_0x1b21dc(0x11b)])[_0x1b21dc(0x114)](_0x786440=>{const _0x58e976=_0x1b21dc;this[_0x58e976(0xf9)][_0x58e976(0x11f)](_0x786440);}),_0xb3fa02;}['saveCommentToSnapshot'](_0x55e199){const _0x175a26=_0x5310d2;return{'id':_0x55e199['id'],'threadId':_0x55e199[_0x175a26(0x103)],'ref':_0x55e199[_0x175a26(0xc8)]};}};_0x45da3a=_0x4a0e71([_0x4af0a1(0x0,_0x420862[_0x5310d2(0x144)](_0xbc6973['HTTPService'])),_0x4af0a1(0x1,_0x420862[_0x5310d2(0x144)](_0x420862['UserManagerService'])),_0x4af0a1(0x2,_0x420862[_0x5310d2(0x144)](_0x1522df['CollaborationSessionService'])),_0x4af0a1(0x3,_0x420862[_0x5310d2(0x144)](_0x420862[_0x5310d2(0x131)]))],_0x45da3a);var _0x539f15=Object[_0x5310d2(0x116)],_0x4e2cc8=(_0x4a6f47,_0x48f692,_0x192dc0,_0x1f83b2)=>{const _0x2b2b8b=_0x5310d2;for(var _0x42eb7c=_0x1f83b2>0x1?void 0x0:_0x1f83b2?_0x539f15(_0x48f692,_0x192dc0):_0x48f692,_0x186c19=_0x4a6f47[_0x2b2b8b(0x10c)]-0x1,_0x1f10dd;_0x186c19>=0x0;_0x186c19--)(_0x1f10dd=_0x4a6f47[_0x186c19])&&(_0x42eb7c=_0x1f10dd(_0x42eb7c)||_0x42eb7c);return _0x42eb7c;},_0x4ee8ea=(_0x31b129,_0x5251a5)=>(_0x377a4c,_0x436a38)=>_0x5251a5(_0x377a4c,_0x436a38,_0x31b129);let _0x178f52=class extends _0x420862[_0x5310d2(0xc4)]{constructor(_0x365a1e,_0x3a5335){const _0x47e6ff=_0x5310d2;super(),this[_0x47e6ff(0xc7)]=_0x365a1e,this['_threadCommentDataSource']=_0x3a5335,this['_initDataSource']();}[_0x5310d2(0x132)](){const _0x2ccb11=_0x5310d2;this[_0x2ccb11(0xc7)][_0x2ccb11(0xc0)]=this[_0x2ccb11(0x12f)],this[_0x2ccb11(0xc7)][_0x2ccb11(0xc6)]=!0x1;}};_0x178f52=_0x4e2cc8([_0x4ee8ea(0x0,_0x337128[_0x5310d2(0xde)]),_0x4ee8ea(0x1,_0x420862[_0x5310d2(0x144)](_0x45da3a))],_0x178f52);var _0x114938=Object[_0x5310d2(0x112)],_0x4e5376=Object[_0x5310d2(0x116)],_0x144dc7=(_0x517628,_0x1c05c8,_0x5c8295)=>_0x1c05c8 in _0x517628?_0x114938(_0x517628,_0x1c05c8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5c8295}):_0x517628[_0x1c05c8]=_0x5c8295,_0x23b69a=(_0x1e9cbb,_0x3fc3f4,_0x232b68,_0x1abf4f)=>{const _0x37c575=_0x5310d2;for(var _0x37937b=_0x1abf4f>0x1?void 0x0:_0x1abf4f?_0x4e5376(_0x3fc3f4,_0x232b68):_0x3fc3f4,_0xf37a26=_0x1e9cbb[_0x37c575(0x10c)]-0x1,_0x1a6935;_0xf37a26>=0x0;_0xf37a26--)(_0x1a6935=_0x1e9cbb[_0xf37a26])&&(_0x37937b=_0x1a6935(_0x37937b)||_0x37937b);return _0x37937b;},_0x33f302=(_0x58e78e,_0x161646)=>(_0x30832e,_0xab70de)=>_0x161646(_0x30832e,_0xab70de,_0x58e78e),_0x1f0fa0=(_0x2ba609,_0xf1e61d,_0x2426f4)=>_0x144dc7(_0x2ba609,typeof _0xf1e61d!=_0x5310d2(0x12d)?_0xf1e61d+'':_0xf1e61d,_0x2426f4);_0x2a52e4[_0x5310d2(0x119)]=class extends _0x420862[_0x5310d2(0xcb)]{constructor(_0x329bd6=_0x3be7fa,_0x4a6b9a,_0x5c4e16){const _0x62f0ea=_0x5310d2;super(),this[_0x62f0ea(0xef)]=_0x329bd6,this[_0x62f0ea(0x136)]=_0x4a6b9a,this[_0x62f0ea(0x123)]=_0x5c4e16;const {..._0x20f9a5}=_0x420862[_0x62f0ea(0xf0)]({},_0x3be7fa,this[_0x62f0ea(0xef)]);this['_configService']['setConfig'](_0x1de666,_0x20f9a5);}[_0x5310d2(0x117)](){const _0x321d6e=_0x5310d2;[[_0x45da3a],[_0x178f52],[_0x516b24]][_0x321d6e(0x114)](_0x129291=>{const _0x237c4f=_0x321d6e;this[_0x237c4f(0x136)]['add'](_0x129291);});}[_0x5310d2(0xba)](){const _0x2e2132=_0x5310d2;this['_injector']['get'](_0x178f52),this['_injector'][_0x2e2132(0x143)](_0x516b24);}},_0x1f0fa0(_0x2a52e4['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x1bcd07),_0x1f0fa0(_0x2a52e4[_0x5310d2(0x119)],_0x5310d2(0x138),_0x420862[_0x5310d2(0xd4)][_0x5310d2(0x13b)]),_0x2a52e4[_0x5310d2(0x119)]=_0x23b69a([_0x420862[_0x5310d2(0x12c)](_0x179658[_0x5310d2(0x10f)],_0x1522df[_0x5310d2(0x135)],_0x225c7e[_0x5310d2(0xe1)]),_0x33f302(0x1,_0x420862['Inject'](_0x420862['Injector'])),_0x33f302(0x2,_0x420862['IConfigService'])],_0x2a52e4[_0x5310d2(0x119)]),Object[_0x5310d2(0x112)](_0x2a52e4,Symbol['toStringTag'],{'value':_0x5310d2(0xdb)});}));function _0x28b1(_0x4066a3,_0x13c5dc){const _0x1f1ae7=_0x1f1a();return _0x28b1=function(_0x28b190,_0x3e47e5){_0x28b190=_0x28b190-0xba;let _0x582217=_0x1f1ae7[_0x28b190];return _0x582217;},_0x28b1(_0x4066a3,_0x13c5dc);}function _0x1f1a(){const _0x3537b7=['deleteComment','syncUpdateMutationToColla','_threadCommentDataSourceService','ref','format','Reply','Plugin','716598aFcUEc','57SriLNR','COMMENT','map','customRanges','comments','function','getMemberID','UniverInstanceType','_commentService','rxjs','/delete','41872vROaDt','@univerjs/network','getCurrentUser','Module','thread-comment-data-source.config','body','IThreadCommentDataSourceService','@univerjs-pro/collaboration-client','code','UniverLicensePlugin','Add','_httpService','UniverNetwork','stringify','UniverProLicense','bufferTime','listComments','unitId','dayjs','@univerjs/thread-comment','_threadCommentModel','addComment','@univerjs-pro/license','_config','merge','UserManagerService','object','OpenOrReOpen','ThreadCommentModel','Edit','error','content','root','_userService','_sessionService','20473079luRMfj','_init','10qpHSCU','UniverThreadCommentUi','201908icuUTs','Solve','createTimestamp','userId','threadId','replyId','/list','user','/add','/edit','/universer-api/comment/unit/','payload','YYYY/MM/DD\x20HH:mm','length','solved','Unknown','UniverThreadCommentUIPlugin','CommentService','rangeId','defineProperty','1726980MdvKwi','forEach','161VCSwmo','getOwnPropertyDescriptor','onStarting','rangeType','UniverThreadCommentDataSourcePlugin','size','users','/reply','updateComment','61482OmtqFV','addUser','3992485WCaKaK','Delete','resolveComment','_configService','delete','exports','subscribe','find','UniverThreadComment','UNRECOGNIZED','/universer-api/user/list','parse','DependentOn','symbol','UniverProThreadCommentDatasource','_threadCommentDataSource','getUnit','Injector','_initDataSource','32dnfAuB','amd','UniverCollaborationClientPlugin','_injector','getUser','type','post','commentUpdate$','UNIVER_UNKNOWN','@univerjs/core','Solved','/solved','personId','replies','parentId','requireSession','get','Inject','resolved','onReady','filter','slice','UniverCore','userID','CustomRangeType','dataSource','add','UniverProCollaborationClient','comment','Disposable'];_0x1f1a=function(){return _0x3537b7;};return _0x1f1a();}
1
+ function _0x161f(_0x46cc66,_0x2893f4){const _0x3e1c43=_0x3e1c();return _0x161f=function(_0x161ff1,_0x135c09){_0x161ff1=_0x161ff1-0x70;let _0x3044c5=_0x3e1c43[_0x161ff1];return _0x3044c5;},_0x161f(_0x46cc66,_0x2893f4);}function _0x3e1c(){const _0x5c2c97=['UniverThreadCommentDataSourcePlugin','type','length','subscribe','filter','getOwnPropertyDescriptor','Plugin','_config','UniverThreadCommentUIPlugin','rangeId','createTimestamp','values','unitId','/delete','post','stringify','find','_initUserSync','CollaborationSessionService','function','forEach','getMemberID','UniverCollaborationClientPlugin','format','user','_httpService','body','HTTPService','getUser','DependentOn','_initDataSource','comment','Reply','addComment','bufferTime','rangeType','getComment','pluginName','_threadCommentDataSourceService','threadId','/solved','UniverNetwork','UserManagerService','Unknown','rxjs','_threadCommentDataSource','Module','Solve','commentUpdate$','replies','customRanges','getCurrentUser','_userService','UniverCore','setConfig','@univerjs/thread-comment-ui','replyId','Injector','code','addUser','disposeWithMe','_threadCommentModel','129210glUyXt','_injector','dayjs','_sessionService','onReady','UniverProThreadCommentDatasource','UniverLicensePlugin','IThreadCommentDataSourceService','exports','1828314pyUBmw','_init','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','syncUpdateMutationToColla','updateComment','deleteComment','1611kgZDLj','@univerjs-pro/license','map','userID','ref','Add','listComments','UniverProCollaborationClient','resolveComment','requireSession','parentId','root','/universer-api/comment/unit/','amd','Inject','42FbalBH','userId','YYYY/MM/DD\x20HH:mm','toStringTag','3150706TLdBog','payload','users','143032KoYKzF','solved','10618632SRnYqA','size','UniverInstanceType','Disposable','defineProperty','_configService','slice','getUnit','1964410RNPTjQ','@univerjs/network','OpenOrReOpen','personId','Delete','_commentService','@univerjs/thread-comment','object','@univerjs/core','parse','error','resolved','UNRECOGNIZED','Solved','content','add','reply','/universer-api/user/list','COMMENT','Edit','comments','CustomRangeType','1485569Aktfnq','pipe','@univerjs-pro/collaboration-client','UniverProLicense','129BkTHvs','get','onStarting'];_0x3e1c=function(){return _0x5c2c97;};return _0x3e1c();}(function(_0x5e73a6,_0x46c5fe){const _0x11736a=_0x161f,_0x309197=_0x5e73a6();while(!![]){try{const _0x4b1b55=-parseInt(_0x11736a(0x70))/0x1+parseInt(_0x11736a(0xd7))/0x2+-parseInt(_0x11736a(0x74))/0x3*(parseInt(_0x11736a(0xda))/0x4)+-parseInt(_0x11736a(0xe4))/0x5+-parseInt(_0x11736a(0xbe))/0x6*(-parseInt(_0x11736a(0xd3))/0x7)+-parseInt(_0x11736a(0xdc))/0x8+-parseInt(_0x11736a(0xc4))/0x9*(-parseInt(_0x11736a(0xb5))/0xa);if(_0x4b1b55===_0x46c5fe)break;else _0x309197['push'](_0x309197['shift']());}catch(_0x24c12d){_0x309197['push'](_0x309197['shift']());}}}(_0x3e1c,0xed960),function(_0x33beb2,_0x2b2eb5){const _0x4052b6=_0x161f;typeof exports==_0x4052b6(0xeb)&&typeof module<'u'?_0x2b2eb5(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==_0x4052b6(0x8a)&&define[_0x4052b6(0xd1)]?define([_0x4052b6(0xbd),_0x4052b6(0x72),_0x4052b6(0xc5),_0x4052b6(0xec),_0x4052b6(0xae),_0x4052b6(0xea),'rxjs',_0x4052b6(0xe5)],_0x2b2eb5):(_0x33beb2=typeof globalThis<'u'?globalThis:_0x33beb2||self,_0x2b2eb5(_0x33beb2[_0x4052b6(0xba)]={},_0x33beb2[_0x4052b6(0xcb)],_0x33beb2[_0x4052b6(0x73)],_0x33beb2[_0x4052b6(0xac)],_0x33beb2['UniverThreadCommentUi'],_0x33beb2['UniverThreadComment'],_0x33beb2[_0x4052b6(0xa3)],_0x33beb2[_0x4052b6(0xa0)]));}(this,function(_0x5062d6,_0x10cc09,_0x6d9789,_0x155477,_0x13a88a,_0xaa109b,_0x1afae6,_0x29013c){'use strict';const _0x54280a=_0x161f;const _0xfc6d01=_0x54280a(0xc0);var _0x4702e4=(_0xe2c95f=>(_0xe2c95f[_0xe2c95f['OpenOrReOpen']=0x0]=_0x54280a(0xe6),_0xe2c95f[_0xe2c95f[_0x54280a(0xf1)]=0x1]=_0x54280a(0xf1),_0xe2c95f[_0xe2c95f[_0x54280a(0xf0)]=-0x1]=_0x54280a(0xf0),_0xe2c95f))(_0x4702e4||{}),_0xfe74f0=(_0x95d014=>(_0x95d014[_0x95d014[_0x54280a(0xa2)]=0x0]='Unknown',_0x95d014[_0x95d014[_0x54280a(0xc9)]=0x1]='Add',_0x95d014[_0x95d014['Reply']=0x2]='Reply',_0x95d014[_0x95d014[_0x54280a(0xf7)]=0x3]='Edit',_0x95d014[_0x95d014['Delete']=0x4]=_0x54280a(0xe8),_0x95d014[_0x95d014[_0x54280a(0xa6)]=0x5]='Solve',_0x95d014[_0x95d014[_0x54280a(0xf0)]=-0x1]=_0x54280a(0xf0),_0x95d014))(_0xfe74f0||{});const _0x4eb31d=_0x31c2d6=>_0x155477[_0x54280a(0xb7)](new Date(+_0x31c2d6))[_0x54280a(0x8e)](_0x54280a(0xd5)),_0x81cda4=async(_0x22d8a8,_0x181f8f)=>{const _0x5209bd=_0x54280a,_0x17f479=_0x22d8a8[_0x5209bd(0x75)](_0x155477[_0x5209bd(0xa1)]),_0x149832=_0x22d8a8[_0x5209bd(0x75)](_0x29013c[_0x5209bd(0x92)]);_0x181f8f[_0x5209bd(0x8b)](_0x5e61c3=>{const _0x193275=_0x5209bd;_0x17f479[_0x193275(0x93)](_0x5e61c3)&&_0x181f8f['delete'](_0x5e61c3);}),_0x181f8f[_0x5209bd(0xdd)]&&(await _0x149832['get'](_0x5209bd(0xf5),{'params':{'userIDs':[..._0x181f8f]}}))['body'][_0x5209bd(0xd9)][_0x5209bd(0x8b)](_0x26e43b=>{_0x26e43b&&_0x17f479['addUser'](_0x26e43b);});};var _0x53e184=Object[_0x54280a(0x7c)],_0x18f646=(_0x411241,_0x2dabd1,_0x9e114d,_0x2c197b)=>{for(var _0x235ea9=_0x2c197b>0x1?void 0x0:_0x2c197b?_0x53e184(_0x2dabd1,_0x9e114d):_0x2dabd1,_0x12dc86=_0x411241['length']-0x1,_0x22ce09;_0x12dc86>=0x0;_0x12dc86--)(_0x22ce09=_0x411241[_0x12dc86])&&(_0x235ea9=_0x22ce09(_0x235ea9)||_0x235ea9);return _0x235ea9;},_0x54dd7a=(_0x2e552f,_0x154f37)=>(_0x543864,_0x4c1556)=>_0x154f37(_0x543864,_0x4c1556,_0x2e552f);let _0x52bd67=class extends _0x155477[_0x54280a(0xdf)]{constructor(_0x555059,_0x6ddecd,_0x35bc2f,_0x5f4660){const _0x37c0d2=_0x54280a;super(),this['_commentService']=_0x555059,this[_0x37c0d2(0xb4)]=_0x6ddecd,this[_0x37c0d2(0xab)]=_0x35bc2f,this['_injector']=_0x5f4660,this[_0x37c0d2(0xbf)](),this['_initUserSync']();}[_0x54280a(0x88)](){const _0x55b616=_0x54280a;this[_0x55b616(0xb3)](this[_0x55b616(0xb4)][_0x55b616(0xa7)][_0x55b616(0x71)](_0x1afae6[_0x55b616(0x99)](0x10))[_0x55b616(0x7a)](_0x3d1357=>{const _0xd3902d=_0x55b616,_0x5256bd=new Set();_0x3d1357[_0xd3902d(0x8b)](_0x35fd3b=>{const _0x4dd887=_0xd3902d;switch(_0x35fd3b[_0x4dd887(0x78)]){case _0x4dd887(0xf3):{const _0x5c194d=_0x35fd3b[_0x4dd887(0xd8)][_0x4dd887(0xe7)];_0x5256bd[_0x4dd887(0xf3)](_0x5c194d);break;}}}),_0x81cda4(this[_0xd3902d(0xb6)],_0x5256bd);}));}[_0x54280a(0xbf)](){const _0x481194=_0x54280a;this[_0x481194(0xb3)](this[_0x481194(0xe9)][_0x481194(0xa7)][_0x481194(0x7a)](async _0x521ef3=>{const _0x2702b1=_0x481194;var _0x5bbf92,_0x48a5ad,_0x4b8e98,_0x2d50ad;const _0x4dd3cb=(_0x5bbf92=this[_0x2702b1(0xb4)]['getUnit'](_0x521ef3[_0x2702b1(0x83)])['find'](_0x1cf9d6=>_0x1cf9d6['threadId']===_0x521ef3[_0x2702b1(0x9e)]))==null?void 0x0:_0x5bbf92[_0x2702b1(0xcf)];if(!_0x4dd3cb)return;const {unitId:_0x951d91,subUnitId:_0x7dfaa5}=_0x4dd3cb;switch(_0x521ef3['user']&&this[_0x2702b1(0xab)]['addUser'](_0x521ef3[_0x2702b1(0x8f)]),_0x521ef3[_0x2702b1(0x78)]){case _0xfe74f0[_0x2702b1(0xc9)]:break;case _0xfe74f0[_0x2702b1(0x97)]:{this[_0x2702b1(0xb4)][_0x2702b1(0x98)](_0x951d91,_0x7dfaa5,{'unitId':_0x951d91,'subUnitId':_0x7dfaa5,'ref':'','id':_0x521ef3[_0x2702b1(0xaf)],'dT':_0x4eb31d(+_0x521ef3[_0x2702b1(0x81)]),'threadId':_0x521ef3[_0x2702b1(0x9e)],'personId':(_0x4b8e98=(_0x48a5ad=_0x521ef3[_0x2702b1(0x8f)])==null?void 0x0:_0x48a5ad[_0x2702b1(0xc7)])!=null?_0x4b8e98:_0x521ef3[_0x2702b1(0xd4)],'text':JSON[_0x2702b1(0xed)](_0x521ef3[_0x2702b1(0xf2)]),'parentId':_0x4dd3cb['id']});break;}case _0xfe74f0[_0x2702b1(0xe8)]:{const _0x3d6b76=this[_0x2702b1(0xb4)][_0x2702b1(0x9b)](_0x951d91,_0x7dfaa5,_0x521ef3[_0x2702b1(0xaf)]);_0x3d6b76&&_0x3d6b76[_0x2702b1(0xce)]&&this[_0x2702b1(0xb4)][_0x2702b1(0xc3)](_0x951d91,_0x7dfaa5,_0x521ef3[_0x2702b1(0xaf)]);break;}case _0xfe74f0[_0x2702b1(0xf7)]:{this[_0x2702b1(0xb4)][_0x2702b1(0xc2)](_0x951d91,_0x7dfaa5,{'commentId':_0x521ef3[_0x2702b1(0xaf)],'text':JSON[_0x2702b1(0xed)](_0x521ef3[_0x2702b1(0xf2)])});break;}case _0xfe74f0[_0x2702b1(0xa6)]:{const _0x517477=(_0x2d50ad=this[_0x2702b1(0xb4)][_0x2702b1(0xe3)](_0x521ef3[_0x2702b1(0x83)])[_0x2702b1(0x87)](_0x9b4ced=>_0x9b4ced[_0x2702b1(0x9e)]===_0x521ef3[_0x2702b1(0x9e)]))==null?void 0x0:_0x2d50ad[_0x2702b1(0xcf)];_0x517477&&this['_threadCommentModel'][_0x2702b1(0xcc)](_0x951d91,_0x7dfaa5,_0x517477['id'],_0x521ef3['solved']===_0x4702e4['Solved']);break;}}}));}};_0x52bd67=_0x18f646([_0x54dd7a(0x0,_0x155477[_0x54280a(0xd2)](_0x10cc09['CommentService'])),_0x54dd7a(0x1,_0x155477[_0x54280a(0xd2)](_0xaa109b['ThreadCommentModel'])),_0x54dd7a(0x2,_0x155477[_0x54280a(0xd2)](_0x155477['UserManagerService'])),_0x54dd7a(0x3,_0x155477[_0x54280a(0xd2)](_0x155477[_0x54280a(0xb0)]))],_0x52bd67);const _0x1b0463='thread-comment-data-source.config',_0x20e99e={};var _0x1b7d61=Object[_0x54280a(0x7c)],_0x2c02cd=(_0x350ec4,_0x4f975d,_0x488d8e,_0x4440fe)=>{for(var _0x5c8c17=_0x4440fe>0x1?void 0x0:_0x4440fe?_0x1b7d61(_0x4f975d,_0x488d8e):_0x4f975d,_0x17af34=_0x350ec4['length']-0x1,_0x2f6e4e;_0x17af34>=0x0;_0x17af34--)(_0x2f6e4e=_0x350ec4[_0x17af34])&&(_0x5c8c17=_0x2f6e4e(_0x5c8c17)||_0x5c8c17);return _0x5c8c17;},_0x35e91b=(_0x36cf38,_0x3bffeb)=>(_0x512e57,_0x51a03c)=>_0x3bffeb(_0x512e57,_0x51a03c,_0x36cf38);function _0x18874f(_0x2d8733,_0x4d8501){const _0x4aa46a=_0x54280a,_0x25c341=_0x2d8733[_0x4aa46a(0xa8)][0x0];return{..._0x4d8501,'id':_0x25c341[_0x4aa46a(0xaf)],'resolved':_0x2d8733[_0x4aa46a(0xdb)]===0x1,'dT':_0x4eb31d(_0x25c341[_0x4aa46a(0x81)]),'personId':_0x25c341['userId'],'threadId':_0x25c341['threadId']};}function _0x50e719(_0x391164,_0x12889a,_0x5f5698){const _0x2a9657=_0x54280a;var _0x3e72b0,_0x5e5294;if(((_0x5e5294=(_0x3e72b0=_0x391164==null?void 0x0:_0x391164['replies'])==null?void 0x0:_0x3e72b0[_0x2a9657(0x79)])!=null?_0x5e5294:0x0)>0x0){const _0x29e469=(_0x315870,_0x5d6e3c)=>({'id':_0x315870[_0x2a9657(0xaf)],'threadId':_0x315870['threadId'],'dT':_0x4eb31d(_0x315870[_0x2a9657(0x81)]),'personId':_0x315870['userId'],'resolved':_0x391164['solved']===_0x4702e4['Solved'],'unitId':_0x12889a,'subUnitId':_0x5f5698,'text':JSON['parse'](_0x315870['content']),'parentId':_0x5d6e3c}),_0x50b2b5=_0x29e469(_0x391164[_0x2a9657(0xa8)][0x0]);return{..._0x50b2b5,'children':_0x391164[_0x2a9657(0xa8)][_0x2a9657(0xe2)](0x1)[_0x2a9657(0xc6)](_0x39000c=>_0x29e469(_0x39000c,_0x50b2b5['id']))};}return null;}let _0x435ad0=class{constructor(_0x2936d5,_0x4bc1f7,_0x43c247,_0x2f20ef){const _0x5be9f6=_0x54280a;this[_0x5be9f6(0x90)]=_0x2936d5,this[_0x5be9f6(0xab)]=_0x4bc1f7,this[_0x5be9f6(0xb8)]=_0x43c247,this[_0x5be9f6(0xb6)]=_0x2f20ef;}async['addComment'](_0x8321d1){const _0x2c69ed=_0x54280a;var _0x47c9d1,_0x5dc5c8;const {parentId:_0x4fdd4f,unitId:_0x173097,text:_0x540e5c,threadId:_0x3c02aa}=_0x8321d1,_0x20cfb4=(_0x5dc5c8=(_0x47c9d1=_0x540e5c[_0x2c69ed(0xa9)])==null?void 0x0:_0x47c9d1[_0x2c69ed(0x7b)](_0x6ecb6=>_0x6ecb6[_0x2c69ed(0x9a)]===_0x155477[_0x2c69ed(0xf9)][_0x2c69ed(0xf6)])[_0x2c69ed(0xc6)](_0x1185e3=>_0x1185e3[_0x2c69ed(0x80)]))!=null?_0x5dc5c8:[],_0x5f0f82=JSON[_0x2c69ed(0x86)](_0x540e5c),_0x344b03=(await this[_0x2c69ed(0xb8)][_0x2c69ed(0xcd)](_0x173097))[_0x2c69ed(0x8c)]();if(_0x4fdd4f){const _0x133803={'memberId':_0x344b03,'unitId':_0x173097,'content':_0x5f0f82,'mention':_0x20cfb4,'threadId':_0x3c02aa},_0x3e4ada=(await this[_0x2c69ed(0x90)][_0x2c69ed(0x85)](_0x2c69ed(0xd0)+_0x173097+'/reply',{'body':_0x133803}))[_0x2c69ed(0x91)][_0x2c69ed(0xf4)];return{..._0x8321d1,'id':_0x3e4ada['replyId'],'dT':_0x155477['dayjs'](+_0x3e4ada['createTimestamp'])[_0x2c69ed(0x8e)](_0x2c69ed(0xd5)),'personId':_0x3e4ada['userId']};}else{const _0x4f50f1={'memberId':_0x344b03,'unitId':_0x173097,'content':_0x5f0f82,'mention':_0x20cfb4},_0x2bb52f=await this[_0x2c69ed(0x90)][_0x2c69ed(0x85)]('/universer-api/comment/unit/'+_0x173097+'/add',{'body':_0x4f50f1});return _0x18874f(_0x2bb52f['body'][_0x2c69ed(0x96)],_0x8321d1);}}async[_0x54280a(0xc2)](_0x52df13){const _0x6eb2d7=_0x54280a;var _0x45fa9a,_0x563c8f;const {text:_0x438d83,unitId:_0x1693c9}=_0x52df13,_0x7ffdc5=(_0x563c8f=(_0x45fa9a=_0x438d83[_0x6eb2d7(0xa9)])==null?void 0x0:_0x45fa9a[_0x6eb2d7(0x7b)](_0x2585ee=>_0x2585ee['rangeType']===_0x155477[_0x6eb2d7(0xf9)][_0x6eb2d7(0xf6)])[_0x6eb2d7(0xc6)](_0x5ee9c1=>_0x5ee9c1['rangeId']))!=null?_0x563c8f:[],_0x301161=JSON[_0x6eb2d7(0x86)](_0x438d83),_0xb0512=_0x52df13[_0x6eb2d7(0x9e)],_0xbaed01=_0x52df13['id'],_0x3ebcdb={'memberId':(await this['_sessionService'][_0x6eb2d7(0xcd)](_0x1693c9))[_0x6eb2d7(0x8c)](),'unitId':_0x1693c9,'threadId':_0xb0512,'mention':_0x7ffdc5,'content':_0x301161,'replyId':_0xbaed01},_0x5e4477=await this[_0x6eb2d7(0x90)]['post'](_0x6eb2d7(0xd0)+_0x1693c9+'/edit',{'body':_0x3ebcdb});return!_0x5e4477[_0x6eb2d7(0x91)][_0x6eb2d7(0xee)]||_0x5e4477[_0x6eb2d7(0x91)][_0x6eb2d7(0xee)][_0x6eb2d7(0xb1)]===0x1;}async[_0x54280a(0xcc)](_0x260be2){const _0x25c6fd=_0x54280a,{unitId:_0x195731}=_0x260be2,_0x11d939=_0x260be2[_0x25c6fd(0x9e)],_0x7143ee={'memberId':this[_0x25c6fd(0xab)][_0x25c6fd(0xaa)]()[_0x25c6fd(0xc7)],'unitId':_0x195731,'threadId':_0x11d939,'solved':_0x260be2[_0x25c6fd(0xef)]?_0x4702e4[_0x25c6fd(0xf1)]:_0x4702e4[_0x25c6fd(0xe6)]},_0x47f985=await this[_0x25c6fd(0x90)][_0x25c6fd(0x85)](_0x25c6fd(0xd0)+_0x195731+_0x25c6fd(0x9f),{'body':_0x7143ee});return!_0x47f985[_0x25c6fd(0x91)][_0x25c6fd(0xee)]||_0x47f985[_0x25c6fd(0x91)][_0x25c6fd(0xee)][_0x25c6fd(0xb1)]===0x1;}async[_0x54280a(0xc3)](_0x16d2bd,_0x1daad8,_0x3afb71,_0x2ddda7){const _0x31fb01=_0x54280a,_0x3dfd87={'memberId':(await this[_0x31fb01(0xb8)][_0x31fb01(0xcd)](_0x16d2bd))[_0x31fb01(0x8c)](),'threadId':_0x3afb71,'replyId':_0x2ddda7,'unitId':_0x16d2bd},_0x1def29=await this[_0x31fb01(0x90)][_0x31fb01(0x85)]('/universer-api/comment/unit/'+_0x16d2bd+_0x31fb01(0x84),{'body':_0x3dfd87});return!_0x1def29[_0x31fb01(0x91)]['error']||_0x1def29[_0x31fb01(0x91)]['error'][_0x31fb01(0xb1)]===0x1;}async[_0x54280a(0xca)](_0x505f87,_0x30dfdf,_0x4a057c){const _0x7f85e6=_0x54280a,_0x244092={'unitId':_0x505f87,'threadId':_0x4a057c},_0xb732=await this[_0x7f85e6(0x90)][_0x7f85e6(0x85)](_0x7f85e6(0xd0)+_0x505f87+'/list',{'body':_0x244092}),_0x3d2d8b=_0x4a057c['map'](_0xd898c5=>_0x50e719(_0xb732[_0x7f85e6(0x91)][_0x7f85e6(0xf8)][_0xd898c5],_0x505f87,_0x30dfdf))[_0x7f85e6(0x7b)](Boolean);return Object[_0x7f85e6(0x82)](_0xb732[_0x7f85e6(0x91)][_0x7f85e6(0xd9)])[_0x7f85e6(0x8b)](_0x1e714c=>{const _0x519363=_0x7f85e6;this['_userService'][_0x519363(0xb2)](_0x1e714c);}),_0x3d2d8b;}['saveCommentToSnapshot'](_0x332034){const _0x20fbe0=_0x54280a;return{'id':_0x332034['id'],'threadId':_0x332034[_0x20fbe0(0x9e)],'ref':_0x332034[_0x20fbe0(0xc8)]};}};_0x435ad0=_0x2c02cd([_0x35e91b(0x0,_0x155477['Inject'](_0x29013c[_0x54280a(0x92)])),_0x35e91b(0x1,_0x155477['Inject'](_0x155477['UserManagerService'])),_0x35e91b(0x2,_0x155477[_0x54280a(0xd2)](_0x10cc09[_0x54280a(0x89)])),_0x35e91b(0x3,_0x155477[_0x54280a(0xd2)](_0x155477[_0x54280a(0xb0)]))],_0x435ad0);var _0x33969e=Object[_0x54280a(0x7c)],_0xc29a1a=(_0x3fa3a6,_0xd663ae,_0x5eee14,_0x2dea23)=>{const _0x590b99=_0x54280a;for(var _0x5c50a4=_0x2dea23>0x1?void 0x0:_0x2dea23?_0x33969e(_0xd663ae,_0x5eee14):_0xd663ae,_0x8a5c5f=_0x3fa3a6[_0x590b99(0x79)]-0x1,_0x24c2c5;_0x8a5c5f>=0x0;_0x8a5c5f--)(_0x24c2c5=_0x3fa3a6[_0x8a5c5f])&&(_0x5c50a4=_0x24c2c5(_0x5c50a4)||_0x5c50a4);return _0x5c50a4;},_0x3d82fe=(_0x4f5138,_0x37909c)=>(_0x2a06b8,_0x3c1f57)=>_0x37909c(_0x2a06b8,_0x3c1f57,_0x4f5138);let _0x439afd=class extends _0x155477[_0x54280a(0xdf)]{constructor(_0x48a3a7,_0x5eb756){const _0x3dea8f=_0x54280a;super(),this[_0x3dea8f(0x9d)]=_0x48a3a7,this[_0x3dea8f(0xa4)]=_0x5eb756,this[_0x3dea8f(0x95)]();}[_0x54280a(0x95)](){const _0x938d00=_0x54280a;this[_0x938d00(0x9d)]['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x938d00(0xc1)]=!0x1;}};_0x439afd=_0xc29a1a([_0x3d82fe(0x0,_0xaa109b[_0x54280a(0xbc)]),_0x3d82fe(0x1,_0x155477[_0x54280a(0xd2)](_0x435ad0))],_0x439afd);var _0x68a8b7=Object[_0x54280a(0xe0)],_0x418fc3=Object['getOwnPropertyDescriptor'],_0x49e276=(_0x2d6119,_0xea048c,_0xe8c98d)=>_0xea048c in _0x2d6119?_0x68a8b7(_0x2d6119,_0xea048c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xe8c98d}):_0x2d6119[_0xea048c]=_0xe8c98d,_0x4fc447=(_0x51498d,_0x20cb20,_0x296805,_0x45a730)=>{const _0x266480=_0x54280a;for(var _0x46ebb8=_0x45a730>0x1?void 0x0:_0x45a730?_0x418fc3(_0x20cb20,_0x296805):_0x20cb20,_0x6d53b6=_0x51498d[_0x266480(0x79)]-0x1,_0x174a89;_0x6d53b6>=0x0;_0x6d53b6--)(_0x174a89=_0x51498d[_0x6d53b6])&&(_0x46ebb8=_0x174a89(_0x46ebb8)||_0x46ebb8);return _0x46ebb8;},_0x221996=(_0x5064,_0x4ca1e4)=>(_0x5b2568,_0x36addd)=>_0x4ca1e4(_0x5b2568,_0x36addd,_0x5064),_0xd315ca=(_0x3a3317,_0x34b027,_0x3aeebc)=>_0x49e276(_0x3a3317,typeof _0x34b027!='symbol'?_0x34b027+'':_0x34b027,_0x3aeebc);_0x5062d6['UniverThreadCommentDataSourcePlugin']=class extends _0x155477[_0x54280a(0x7d)]{constructor(_0x4c93b3=_0x20e99e,_0x31ba94,_0x334be8){const _0x4dbec8=_0x54280a;super(),this[_0x4dbec8(0x7e)]=_0x4c93b3,this[_0x4dbec8(0xb6)]=_0x31ba94,this[_0x4dbec8(0xe1)]=_0x334be8;const {..._0x1d0e7d}=_0x155477['merge']({},_0x20e99e,this[_0x4dbec8(0x7e)]);this[_0x4dbec8(0xe1)][_0x4dbec8(0xad)](_0x1b0463,_0x1d0e7d);}[_0x54280a(0x76)](){const _0x1f16dd=_0x54280a;[[_0x435ad0],[_0x439afd],[_0x52bd67]][_0x1f16dd(0x8b)](_0xbcf224=>{const _0x425656=_0x1f16dd;this[_0x425656(0xb6)]['add'](_0xbcf224);});}[_0x54280a(0xb9)](){const _0x38be9d=_0x54280a;this['_injector'][_0x38be9d(0x75)](_0x439afd),this[_0x38be9d(0xb6)][_0x38be9d(0x75)](_0x52bd67);}},_0xd315ca(_0x5062d6[_0x54280a(0x77)],_0x54280a(0x9c),_0xfc6d01),_0xd315ca(_0x5062d6[_0x54280a(0x77)],_0x54280a(0x78),_0x155477[_0x54280a(0xde)]['UNIVER_UNKNOWN']),_0x5062d6[_0x54280a(0x77)]=_0x4fc447([_0x155477[_0x54280a(0x94)](_0x13a88a[_0x54280a(0x7f)],_0x10cc09[_0x54280a(0x8d)],_0x6d9789[_0x54280a(0xbb)]),_0x221996(0x1,_0x155477[_0x54280a(0xd2)](_0x155477[_0x54280a(0xb0)])),_0x221996(0x2,_0x155477['IConfigService'])],_0x5062d6[_0x54280a(0x77)]),Object[_0x54280a(0xe0)](_0x5062d6,Symbol[_0x54280a(0xd6)],{'value':_0x54280a(0xa5)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.9.3-nightly.202507250819",
3
+ "version": "0.9.4",
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.9.3-nightly.202507250819",
49
- "@univerjs-pro/license": "0.9.3-nightly.202507250819",
50
- "@univerjs/core": "0.9.3-nightly.202507250819",
48
+ "@univerjs-pro/collaboration-client": "0.9.4",
49
+ "@univerjs-pro/license": "0.9.4",
50
+ "@univerjs/network": "0.9.4",
51
51
  "@univerjs/protocol": "0.1.47-alpha.0",
52
- "@univerjs/thread-comment": "0.9.3-nightly.202507250819",
53
- "@univerjs/network": "0.9.3-nightly.202507250819",
54
- "@univerjs/thread-comment-ui": "0.9.3-nightly.202507250819"
52
+ "@univerjs/thread-comment-ui": "0.9.4",
53
+ "@univerjs/thread-comment": "0.9.4",
54
+ "@univerjs/core": "0.9.4"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.8.3",
59
59
  "vite": "^7.0.5",
60
60
  "vitest": "^3.2.4",
61
- "@univerjs-infra/shared": "0.9.3"
61
+ "@univerjs-infra/shared": "0.9.4"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",