@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202505211607 → 0.7.0-nightly.202505231607

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x185786=_0x1c77;(function(_0x27c8b4,_0x392682){const _0x55c993=_0x1c77,_0x5f3700=_0x27c8b4();while(!![]){try{const _0x2223c6=parseInt(_0x55c993(0x114))/0x1+parseInt(_0x55c993(0xd1))/0x2+-parseInt(_0x55c993(0x113))/0x3+parseInt(_0x55c993(0x101))/0x4*(parseInt(_0x55c993(0x10e))/0x5)+parseInt(_0x55c993(0xd9))/0x6+parseInt(_0x55c993(0xeb))/0x7*(parseInt(_0x55c993(0xd0))/0x8)+-parseInt(_0x55c993(0xac))/0x9;if(_0x2223c6===_0x392682)break;else _0x5f3700['push'](_0x5f3700['shift']());}catch(_0x9aac6f){_0x5f3700['push'](_0x5f3700['shift']());}}}(_0x3afe,0x82ecd));Object['defineProperty'](exports,Symbol[_0x185786(0xe3)],{'value':_0x185786(0x123)});const b=require(_0x185786(0xb0)),T=require(_0x185786(0xe0)),c=require(_0x185786(0xd2)),j=require(_0x185786(0xc4)),M=require(_0x185786(0xfc)),w=require(_0x185786(0x116)),P=require(_0x185786(0x105)),U=_0x185786(0xcb);var I=(_0x37e24f=>(_0x37e24f[_0x37e24f['OpenOrReOpen']=0x0]=_0x185786(0x12c),_0x37e24f[_0x37e24f[_0x185786(0x10c)]=0x1]=_0x185786(0x10c),_0x37e24f[_0x37e24f['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x37e24f))(I||{}),v=(_0x2f387c=>(_0x2f387c[_0x2f387c[_0x185786(0xec)]=0x0]=_0x185786(0xec),_0x2f387c[_0x2f387c[_0x185786(0xbb)]=0x1]=_0x185786(0xbb),_0x2f387c[_0x2f387c[_0x185786(0x11d)]=0x2]=_0x185786(0x11d),_0x2f387c[_0x2f387c[_0x185786(0x110)]=0x3]='Edit',_0x2f387c[_0x2f387c[_0x185786(0xf2)]=0x4]=_0x185786(0xf2),_0x2f387c[_0x2f387c[_0x185786(0x12d)]=0x5]=_0x185786(0x12d),_0x2f387c[_0x2f387c['UNRECOGNIZED']=-0x1]=_0x185786(0xbe),_0x2f387c))(v||{});const f=_0x3a99ea=>c['dayjs'](new Date(+_0x3a99ea))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x584867,_0x3d4029)=>{const _0x35927c=_0x185786,_0x5e4a48=_0x584867[_0x35927c(0xb5)](c['UserManagerService']),_0x4d14b0=_0x584867['get'](P[_0x35927c(0xdc)]);_0x3d4029[_0x35927c(0xc6)](_0x1c7400=>{_0x5e4a48['getUser'](_0x1c7400)&&_0x3d4029['delete'](_0x1c7400);}),_0x3d4029[_0x35927c(0xcf)]&&(await _0x4d14b0[_0x35927c(0xb5)](_0x35927c(0xfa),{'params':{'userIDs':[..._0x3d4029]}}))[_0x35927c(0xb9)][_0x35927c(0x121)][_0x35927c(0xc6)](_0xbc121c=>{_0xbc121c&&_0x5e4a48['addUser'](_0xbc121c);});};var $=Object[_0x185786(0x12a)],E=(_0x9c796c,_0x150f39,_0x4935bf,_0x53204e)=>{const _0x4d5cb2=_0x185786;for(var _0xcd5b09=_0x53204e>0x1?void 0x0:_0x53204e?$(_0x150f39,_0x4935bf):_0x150f39,_0x51b3f5=_0x9c796c[_0x4d5cb2(0xff)]-0x1,_0x144258;_0x51b3f5>=0x0;_0x51b3f5--)(_0x144258=_0x9c796c[_0x51b3f5])&&(_0xcd5b09=_0x144258(_0xcd5b09)||_0xcd5b09);return _0xcd5b09;},S=(_0x4b2d86,_0x3485d1)=>(_0x2cc7fa,_0x500f44)=>_0x3485d1(_0x2cc7fa,_0x500f44,_0x4b2d86);function _0x1c77(_0xfb790d,_0x2babe0){const _0x3afe44=_0x3afe();return _0x1c77=function(_0x1c77bc,_0x52ea33){_0x1c77bc=_0x1c77bc-0xac;let _0x4e1e9b=_0x3afe44[_0x1c77bc];return _0x4e1e9b;},_0x1c77(_0xfb790d,_0x2babe0);}let p=class extends c[_0x185786(0xd8)]{constructor(_0x2eb56e,_0x378665,_0x16636a,_0x3e114e){const _0x3e3a0e=_0x185786;super(),this[_0x3e3a0e(0xf3)]=_0x2eb56e,this['_threadCommentModel']=_0x378665,this[_0x3e3a0e(0xe7)]=_0x16636a,this[_0x3e3a0e(0x103)]=_0x3e114e,this[_0x3e3a0e(0xea)](),this['_initUserSync']();}[_0x185786(0xfd)](){const _0x5e1c12=_0x185786;this[_0x5e1c12(0xda)](this[_0x5e1c12(0xd3)]['commentUpdate$'][_0x5e1c12(0xf5)](w['bufferTime'](0x10))['subscribe'](_0xa04470=>{const _0x594855=_0x5e1c12,_0x4bcb44=new Set();_0xa04470[_0x594855(0xc6)](_0x4d966e=>{const _0x3c1338=_0x594855;switch(_0x4d966e['type']){case'add':{const _0x17a271=_0x4d966e[_0x3c1338(0x10f)][_0x3c1338(0xef)];_0x4bcb44[_0x3c1338(0xf6)](_0x17a271);break;}}}),R(this['_injector'],_0x4bcb44);}));}[_0x185786(0xea)](){const _0x68a622=_0x185786;this['disposeWithMe'](this[_0x68a622(0xf3)][_0x68a622(0x118)]['subscribe'](async _0x312f24=>{const _0x121103=_0x68a622;var _0xc1617d,_0x1b7407,_0x19d429,_0x4e3f19;const _0x22760d=(_0xc1617d=this[_0x121103(0xd3)][_0x121103(0x10b)](_0x312f24[_0x121103(0x129)])['find'](_0x2376f8=>_0x2376f8[_0x121103(0x107)]===_0x312f24[_0x121103(0x107)]))==null?void 0x0:_0xc1617d['root'];if(!_0x22760d)return;const {unitId:_0x33aaa6,subUnitId:_0x4185a0}=_0x22760d;switch(_0x312f24['user']&&this['_userService'][_0x121103(0xce)](_0x312f24[_0x121103(0x11e)]),_0x312f24[_0x121103(0xb7)]){case v[_0x121103(0xbb)]:break;case v[_0x121103(0x11d)]:{this['_threadCommentModel']['addComment'](_0x33aaa6,_0x4185a0,{'unitId':_0x33aaa6,'subUnitId':_0x4185a0,'ref':'','id':_0x312f24[_0x121103(0xad)],'dT':f(+_0x312f24[_0x121103(0x115)]),'threadId':_0x312f24[_0x121103(0x107)],'personId':(_0x19d429=(_0x1b7407=_0x312f24['user'])==null?void 0x0:_0x1b7407['userID'])!=null?_0x19d429:_0x312f24[_0x121103(0xd6)],'text':JSON[_0x121103(0x127)](_0x312f24[_0x121103(0xed)]),'parentId':_0x22760d['id']});break;}case v['Delete']:{const _0x384cd7=this[_0x121103(0xd3)][_0x121103(0xc0)](_0x33aaa6,_0x4185a0,_0x312f24[_0x121103(0xad)]);_0x384cd7&&_0x384cd7[_0x121103(0xe1)]&&this[_0x121103(0xd3)][_0x121103(0x100)](_0x33aaa6,_0x4185a0,_0x312f24[_0x121103(0xad)]);break;}case v['Edit']:{this[_0x121103(0xd3)][_0x121103(0xc1)](_0x33aaa6,_0x4185a0,{'commentId':_0x312f24[_0x121103(0xad)],'text':JSON[_0x121103(0x127)](_0x312f24[_0x121103(0xed)])});break;}case v['Solve']:{const _0x2706f7=(_0x4e3f19=this[_0x121103(0xd3)]['getUnit'](_0x312f24[_0x121103(0x129)])[_0x121103(0xe6)](_0x447ff5=>_0x447ff5['threadId']===_0x312f24[_0x121103(0x107)]))==null?void 0x0:_0x4e3f19['root'];_0x2706f7&&this['_threadCommentModel'][_0x121103(0xfe)](_0x33aaa6,_0x4185a0,_0x2706f7['id'],_0x312f24[_0x121103(0x11a)]===I[_0x121103(0x10c)]);break;}}}));}};p=E([S(0x0,c[_0x185786(0xdd)](b[_0x185786(0xb1)])),S(0x1,c[_0x185786(0xdd)](M[_0x185786(0xc5)])),S(0x2,c[_0x185786(0xdd)](c[_0x185786(0x112)])),S(0x3,c[_0x185786(0xdd)](c[_0x185786(0x126)]))],p);const q=_0x185786(0xca),D={};var A=Object[_0x185786(0x12a)],x=(_0x5c4228,_0x5f109a,_0x35ec06,_0xc8e052)=>{const _0xf5d67=_0x185786;for(var _0x126837=_0xc8e052>0x1?void 0x0:_0xc8e052?A(_0x5f109a,_0x35ec06):_0x5f109a,_0x594ded=_0x5c4228[_0xf5d67(0xff)]-0x1,_0x69e28;_0x594ded>=0x0;_0x594ded--)(_0x69e28=_0x5c4228[_0x594ded])&&(_0x126837=_0x69e28(_0x126837)||_0x126837);return _0x126837;},_=(_0x3029aa,_0x52ca05)=>(_0x5c8d48,_0x118768)=>_0x52ca05(_0x5c8d48,_0x118768,_0x3029aa);function _0x3afe(){const _0x17030d=['/reply','@univerjs-pro/collaboration-client','CommentService','stringify','/list','slice','get','onStarting','type','dayjs','body','/delete','Add','_httpService','post','UNRECOGNIZED','/edit','getComment','updateComment','syncUpdateMutationToColla','getCurrentUser','@univerjs/thread-comment-ui','ThreadCommentModel','forEach','IConfigService','/add','comment','thread-comment-data-source.config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','pluginName','_configService','addUser','size','8xMGSoS','285488vqhNQd','@univerjs/core','_threadCommentModel','rangeType','userID','userId','map','Disposable','5097318wTVYTU','disposeWithMe','UniverCollaborationClientPlugin','HTTPService','Inject','_threadCommentDataSource','replies','@univerjs-pro/license','parentId','saveCommentToSnapshot','toStringTag','symbol','defineProperty','find','_userService','COMMENT','UniverThreadCommentDataSourcePlugin','_init','6316506uqIqwG','Unknown','content','CustomRangeType','personId','_threadCommentDataSourceService','values','Delete','_commentService','comments','pipe','add','IThreadCommentDataSourceService','ref','Plugin','/universer-api/user/list','/solved','@univerjs/thread-comment','_initUserSync','resolveComment','length','deleteComment','3521508obMvSr','format','_injector','requireSession','@univerjs/network','UniverThreadCommentUIPlugin','threadId','_config','error','filter','getUnit','Solved','getMemberID','5KKkRjd','payload','Edit','/universer-api/comment/unit/','UserManagerService','719355OliJbJ','884757ebfrWd','createTimestamp','rxjs','rangeId','commentUpdate$','CollaborationSessionService','solved','_initDataSource','merge','Reply','user','UniverInstanceType','code','users','dataSource','Module','UNIVER_UNKNOWN','reply','Injector','parse','resolved','unitId','getOwnPropertyDescriptor','customRanges','OpenOrReOpen','Solve','onReady','25953615qvdIYH','replyId','_sessionService'];_0x3afe=function(){return _0x17030d;};return _0x3afe();}function Y(_0x1ffe22,_0xbb6780){const _0xe6e119=_0x185786,_0x46f0f5=_0x1ffe22[_0xe6e119(0xdf)][0x0];return{..._0xbb6780,'id':_0x46f0f5[_0xe6e119(0xad)],'resolved':_0x1ffe22[_0xe6e119(0x11a)]===0x1,'dT':f(_0x46f0f5[_0xe6e119(0x115)]),'personId':_0x46f0f5[_0xe6e119(0xd6)],'threadId':_0x46f0f5['threadId']};}function G(_0x1f9836,_0x591e3c,_0x43d34c){const _0x441b80=_0x185786;var _0x4d6abd,_0x6722f7;if(((_0x6722f7=(_0x4d6abd=_0x1f9836==null?void 0x0:_0x1f9836[_0x441b80(0xdf)])==null?void 0x0:_0x4d6abd[_0x441b80(0xff)])!=null?_0x6722f7:0x0)>0x0){const _0x45659b=(_0x566a0c,_0x1b9a65)=>({'id':_0x566a0c[_0x441b80(0xad)],'threadId':_0x566a0c['threadId'],'dT':f(_0x566a0c['createTimestamp']),'personId':_0x566a0c['userId'],'resolved':_0x1f9836[_0x441b80(0x11a)]===I[_0x441b80(0x10c)],'unitId':_0x591e3c,'subUnitId':_0x43d34c,'text':JSON['parse'](_0x566a0c[_0x441b80(0xed)]),'parentId':_0x1b9a65}),_0x72d5cf=_0x45659b(_0x1f9836[_0x441b80(0xdf)][0x0]);return{..._0x72d5cf,'children':_0x1f9836[_0x441b80(0xdf)][_0x441b80(0xb4)](0x1)[_0x441b80(0xd7)](_0x22ea2c=>_0x45659b(_0x22ea2c,_0x72d5cf['id']))};}return null;}let g=class{constructor(_0x4db15f,_0x31f34b,_0x3440b9,_0x3dc173){const _0x197854=_0x185786;this[_0x197854(0xbc)]=_0x4db15f,this[_0x197854(0xe7)]=_0x31f34b,this[_0x197854(0xae)]=_0x3440b9,this['_injector']=_0x3dc173;}async['addComment'](_0x52229f){const _0x546c0c=_0x185786;var _0x10fd12,_0x81e976;const {parentId:_0x5eae72,unitId:_0x4b1123,text:_0xa54ff3,threadId:_0x2d80ab}=_0x52229f,_0x396dde=(_0x81e976=(_0x10fd12=_0xa54ff3['customRanges'])==null?void 0x0:_0x10fd12[_0x546c0c(0x10a)](_0x267e62=>_0x267e62[_0x546c0c(0xd4)]===c[_0x546c0c(0xee)][_0x546c0c(0xe8)])[_0x546c0c(0xd7)](_0x593f3a=>_0x593f3a[_0x546c0c(0x117)]))!=null?_0x81e976:[],_0x39933b=JSON['stringify'](_0xa54ff3),_0x260c3a=(await this[_0x546c0c(0xae)][_0x546c0c(0x104)](_0x4b1123))['getMemberID']();if(_0x5eae72){const _0x472ebb={'memberId':_0x260c3a,'unitId':_0x4b1123,'content':_0x39933b,'mention':_0x396dde,'threadId':_0x2d80ab},_0x2b5e42=(await this[_0x546c0c(0xbc)]['post']('/universer-api/comment/unit/'+_0x4b1123+_0x546c0c(0xaf),{'body':_0x472ebb}))[_0x546c0c(0xb9)][_0x546c0c(0x125)];return{..._0x52229f,'id':_0x2b5e42[_0x546c0c(0xad)],'dT':c[_0x546c0c(0xb8)](+_0x2b5e42['createTimestamp'])[_0x546c0c(0x102)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2b5e42[_0x546c0c(0xd6)]};}else{const _0x1d7305={'memberId':_0x260c3a,'unitId':_0x4b1123,'content':_0x39933b,'mention':_0x396dde},_0x3c5fc8=await this[_0x546c0c(0xbc)][_0x546c0c(0xbd)](_0x546c0c(0x111)+_0x4b1123+_0x546c0c(0xc8),{'body':_0x1d7305});return Y(_0x3c5fc8[_0x546c0c(0xb9)][_0x546c0c(0xc9)],_0x52229f);}}async[_0x185786(0xc1)](_0x16bd59){const _0xa75b52=_0x185786;var _0x512d3a,_0x27bf80;const {text:_0x36a576,unitId:_0x478e55}=_0x16bd59,_0x5023df=(_0x27bf80=(_0x512d3a=_0x36a576[_0xa75b52(0x12b)])==null?void 0x0:_0x512d3a[_0xa75b52(0x10a)](_0x4503ab=>_0x4503ab['rangeType']===c[_0xa75b52(0xee)][_0xa75b52(0xe8)])[_0xa75b52(0xd7)](_0x22b577=>_0x22b577[_0xa75b52(0x117)]))!=null?_0x27bf80:[],_0x4dcd4f=JSON[_0xa75b52(0xb2)](_0x36a576),_0x52faa3=_0x16bd59['threadId'],_0x59ab91=_0x16bd59['id'],_0x43d6ae={'memberId':(await this[_0xa75b52(0xae)][_0xa75b52(0x104)](_0x478e55))[_0xa75b52(0x10d)](),'unitId':_0x478e55,'threadId':_0x52faa3,'mention':_0x5023df,'content':_0x4dcd4f,'replyId':_0x59ab91},_0x28b2db=await this['_httpService']['post'](_0xa75b52(0x111)+_0x478e55+_0xa75b52(0xbf),{'body':_0x43d6ae});return!_0x28b2db[_0xa75b52(0xb9)][_0xa75b52(0x109)]||_0x28b2db[_0xa75b52(0xb9)][_0xa75b52(0x109)]['code']===0x1;}async['resolveComment'](_0x2c7cf1){const _0xacd1bc=_0x185786,{unitId:_0x7e08dd}=_0x2c7cf1,_0x357319=_0x2c7cf1[_0xacd1bc(0x107)],_0x20bd56={'memberId':this[_0xacd1bc(0xe7)][_0xacd1bc(0xc3)]()[_0xacd1bc(0xd5)],'unitId':_0x7e08dd,'threadId':_0x357319,'solved':_0x2c7cf1[_0xacd1bc(0x128)]?I[_0xacd1bc(0x10c)]:I['OpenOrReOpen']},_0xca8b95=await this[_0xacd1bc(0xbc)][_0xacd1bc(0xbd)](_0xacd1bc(0x111)+_0x7e08dd+_0xacd1bc(0xfb),{'body':_0x20bd56});return!_0xca8b95[_0xacd1bc(0xb9)][_0xacd1bc(0x109)]||_0xca8b95[_0xacd1bc(0xb9)][_0xacd1bc(0x109)][_0xacd1bc(0x120)]===0x1;}async[_0x185786(0x100)](_0x317eab,_0x110563,_0xa31a82,_0x51400a){const _0x53bc83=_0x185786,_0xec5825={'memberId':(await this[_0x53bc83(0xae)][_0x53bc83(0x104)](_0x317eab))['getMemberID'](),'threadId':_0xa31a82,'replyId':_0x51400a,'unitId':_0x317eab},_0x9f7624=await this[_0x53bc83(0xbc)]['post'](_0x53bc83(0x111)+_0x317eab+_0x53bc83(0xba),{'body':_0xec5825});return!_0x9f7624[_0x53bc83(0xb9)]['error']||_0x9f7624[_0x53bc83(0xb9)][_0x53bc83(0x109)][_0x53bc83(0x120)]===0x1;}async['listComments'](_0x243c17,_0xc0d3b0,_0x4efd11){const _0x4527e2=_0x185786,_0x1b8bf5={'unitId':_0x243c17,'threadId':_0x4efd11},_0x361fa7=await this[_0x4527e2(0xbc)][_0x4527e2(0xbd)]('/universer-api/comment/unit/'+_0x243c17+_0x4527e2(0xb3),{'body':_0x1b8bf5}),_0x4e0b60=_0x4efd11['map'](_0x575056=>G(_0x361fa7[_0x4527e2(0xb9)][_0x4527e2(0xf4)][_0x575056],_0x243c17,_0xc0d3b0))[_0x4527e2(0x10a)](Boolean);return Object[_0x4527e2(0xf1)](_0x361fa7[_0x4527e2(0xb9)]['users'])['forEach'](_0x1668e8=>{const _0xf03c31=_0x4527e2;this[_0xf03c31(0xe7)][_0xf03c31(0xce)](_0x1668e8);}),_0x4e0b60;}[_0x185786(0xe2)](_0x3b0d02){const _0x1f4b6b=_0x185786;return{'id':_0x3b0d02['id'],'threadId':_0x3b0d02['threadId'],'ref':_0x3b0d02[_0x1f4b6b(0xf8)]};}};g=x([_(0x0,c['Inject'](P[_0x185786(0xdc)])),_(0x1,c[_0x185786(0xdd)](c[_0x185786(0x112)])),_(0x2,c[_0x185786(0xdd)](b[_0x185786(0x119)])),_(0x3,c[_0x185786(0xdd)](c['Injector']))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x100c43,_0x1c172e,_0x4d597e,_0x4b0188)=>{const _0xe3101b=_0x185786;for(var _0x544d26=_0x4b0188>0x1?void 0x0:_0x4b0188?H(_0x1c172e,_0x4d597e):_0x1c172e,_0x181491=_0x100c43[_0xe3101b(0xff)]-0x1,_0x1d43fe;_0x181491>=0x0;_0x181491--)(_0x1d43fe=_0x100c43[_0x181491])&&(_0x544d26=_0x1d43fe(_0x544d26)||_0x544d26);return _0x544d26;},y=(_0x165c04,_0x484c92)=>(_0x23a7bb,_0x4ac9b8)=>_0x484c92(_0x23a7bb,_0x4ac9b8,_0x165c04);let C=class extends c['Disposable']{constructor(_0xb4762b,_0x25c0be){const _0x258a88=_0x185786;super(),this[_0x258a88(0xf0)]=_0xb4762b,this['_threadCommentDataSource']=_0x25c0be,this[_0x258a88(0x11b)]();}[_0x185786(0x11b)](){const _0x9d2e1a=_0x185786;this[_0x9d2e1a(0xf0)][_0x9d2e1a(0x122)]=this[_0x9d2e1a(0xde)],this[_0x9d2e1a(0xf0)][_0x9d2e1a(0xc2)]=!0x1;}};C=J([y(0x0,M[_0x185786(0xf7)]),y(0x1,c[_0x185786(0xdd)](g))],C);var F=Object[_0x185786(0xe5)],L=Object[_0x185786(0x12a)],Z=(_0x248bba,_0x4cfbc7,_0x402f5c)=>_0x4cfbc7 in _0x248bba?F(_0x248bba,_0x4cfbc7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x402f5c}):_0x248bba[_0x4cfbc7]=_0x402f5c,W=(_0x41bd41,_0x7b9e90,_0x3ef81d,_0x5c0dd5)=>{for(var _0x430abb=_0x5c0dd5>0x1?void 0x0:_0x5c0dd5?L(_0x7b9e90,_0x3ef81d):_0x7b9e90,_0x550e5d=_0x41bd41['length']-0x1,_0x18b57b;_0x550e5d>=0x0;_0x550e5d--)(_0x18b57b=_0x41bd41[_0x550e5d])&&(_0x430abb=_0x18b57b(_0x430abb)||_0x430abb);return _0x430abb;},O=(_0x13ea8e,_0x3f42df)=>(_0x4bcd0a,_0xd4e31c)=>_0x3f42df(_0x4bcd0a,_0xd4e31c,_0x13ea8e),N=(_0xa00126,_0xc0353c,_0x2f0a5c)=>Z(_0xa00126,typeof _0xc0353c!=_0x185786(0xe4)?_0xc0353c+'':_0xc0353c,_0x2f0a5c);exports[_0x185786(0xe9)]=class extends c[_0x185786(0xf9)]{constructor(_0x33cdf4=D,_0x4462f2,_0x2f3ceb){const _0x4a6351=_0x185786;super(),this[_0x4a6351(0x108)]=_0x33cdf4,this[_0x4a6351(0x103)]=_0x4462f2,this[_0x4a6351(0xcd)]=_0x2f3ceb;const {..._0x4e1e5c}=c[_0x4a6351(0x11c)]({},D,this['_config']);this[_0x4a6351(0xcd)]['setConfig'](q,_0x4e1e5c);}[_0x185786(0xb6)](){const _0x27523c=_0x185786;[[g],[C],[p]][_0x27523c(0xc6)](_0x47885b=>{const _0x2f712a=_0x27523c;this[_0x2f712a(0x103)][_0x2f712a(0xf6)](_0x47885b);});}[_0x185786(0x12e)](){const _0x3fbf0a=_0x185786;this['_injector'][_0x3fbf0a(0xb5)](C),this[_0x3fbf0a(0x103)][_0x3fbf0a(0xb5)](p);}},N(exports[_0x185786(0xe9)],_0x185786(0xcc),U),N(exports[_0x185786(0xe9)],_0x185786(0xb7),c[_0x185786(0x11f)][_0x185786(0x124)]),exports[_0x185786(0xe9)]=W([c['DependentOn'](j[_0x185786(0x106)],b[_0x185786(0xdb)],T['UniverLicensePlugin']),O(0x1,c[_0x185786(0xdd)](c[_0x185786(0x126)])),O(0x2,c[_0x185786(0xc7)])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0xffd7c1=_0x3ffc;(function(_0x1c6cdf,_0x576ab2){const _0xc62552=_0x3ffc,_0x18d830=_0x1c6cdf();while(!![]){try{const _0x1038b0=-parseInt(_0xc62552(0x1f6))/0x1*(-parseInt(_0xc62552(0x1ff))/0x2)+-parseInt(_0xc62552(0x1ca))/0x3*(parseInt(_0xc62552(0x1f2))/0x4)+-parseInt(_0xc62552(0x1da))/0x5*(parseInt(_0xc62552(0x1fa))/0x6)+-parseInt(_0xc62552(0x216))/0x7*(parseInt(_0xc62552(0x1d2))/0x8)+parseInt(_0xc62552(0x208))/0x9+parseInt(_0xc62552(0x205))/0xa+parseInt(_0xc62552(0x1b3))/0xb;if(_0x1038b0===_0x576ab2)break;else _0x18d830['push'](_0x18d830['shift']());}catch(_0x43f9df){_0x18d830['push'](_0x18d830['shift']());}}}(_0x5bde,0xde5bc));Object['defineProperty'](exports,Symbol[_0xffd7c1(0x1e9)],{'value':_0xffd7c1(0x1f7)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0xffd7c1(0x1ec)),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require(_0xffd7c1(0x21b)),w=require(_0xffd7c1(0x21e)),P=require(_0xffd7c1(0x21f)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0x5bde(){const _0x55c529=['get','error','symbol','HTTPService','224pXmcJw','length','Reply','defineProperty','59462toAoQq','Module','resolveComment','pipe','12TGOgsb','rangeType','updateComment','OpenOrReOpen','ThreadCommentModel','8pTBzQS','Add','deleteComment','stringify','UNRECOGNIZED','replyId','15115090YXJWzZ','_sessionService','threadId','9255834ApJIWp','reply','UniverInstanceType','addUser','content','parentId','Plugin','post','Delete','payload','_threadCommentModel','Inject','_userService','solved','91hZNwKP','subscribe','rangeId','getCurrentUser','Solve','@univerjs/thread-comment','setConfig','_initDataSource','rxjs','@univerjs/network','getComment','map','forEach','replies','/list','_config','Solved','requireSession','personId','UniverLicensePlugin','_threadCommentDataSource','listComments','6959282OwBAMz','onReady','delete','_init','find','dayjs','Injector','Disposable','filter','UniverThreadCommentUIPlugin','_httpService','/universer-api/comment/unit/','commentUpdate$','customRanges','UserManagerService','users','root','type','_initUserSync','getMemberID','CollaborationSessionService','/add','YYYY/MM/DD\x20HH:mm','60366hYIGNI','_commentService','size','_configService','_threadCommentDataSourceService','ref','/universer-api/user/list','values','17432PXzWnI','merge','body','createTimestamp','unitId','pluginName','onStarting','thread-comment-data-source.config','3361265QKeAOQ','user','userID','format','CustomRangeType','Edit','getOwnPropertyDescriptor','slice','_injector','Unknown','getUnit','add','getUser','UniverThreadCommentDataSourcePlugin','parse','toStringTag','/edit','code','@univerjs-pro/license','userId'];_0x5bde=function(){return _0x55c529;};return _0x5bde();}var I=(_0x340b44=>(_0x340b44[_0x340b44[_0xffd7c1(0x1fd)]=0x0]='OpenOrReOpen',_0x340b44[_0x340b44[_0xffd7c1(0x226)]=0x1]='Solved',_0x340b44[_0x340b44[_0xffd7c1(0x203)]=-0x1]='UNRECOGNIZED',_0x340b44))(I||{}),v=(_0x520030=>(_0x520030[_0x520030[_0xffd7c1(0x1e3)]=0x0]=_0xffd7c1(0x1e3),_0x520030[_0x520030[_0xffd7c1(0x200)]=0x1]=_0xffd7c1(0x200),_0x520030[_0x520030['Reply']=0x2]=_0xffd7c1(0x1f4),_0x520030[_0x520030[_0xffd7c1(0x1df)]=0x3]=_0xffd7c1(0x1df),_0x520030[_0x520030[_0xffd7c1(0x210)]=0x4]='Delete',_0x520030[_0x520030[_0xffd7c1(0x21a)]=0x5]=_0xffd7c1(0x21a),_0x520030[_0x520030[_0xffd7c1(0x203)]=-0x1]=_0xffd7c1(0x203),_0x520030))(v||{});const f=_0x455437=>c[_0xffd7c1(0x1b8)](new Date(+_0x455437))['format'](_0xffd7c1(0x1c9)),R=async(_0x3cb26b,_0x45b5c1)=>{const _0x4277f7=_0xffd7c1,_0x3bc52b=_0x3cb26b['get'](c[_0x4277f7(0x1c1)]),_0x25d6fb=_0x3cb26b[_0x4277f7(0x1ee)](P[_0x4277f7(0x1f1)]);_0x45b5c1[_0x4277f7(0x222)](_0x49a959=>{const _0x27beb0=_0x4277f7;_0x3bc52b[_0x27beb0(0x1e6)](_0x49a959)&&_0x45b5c1[_0x27beb0(0x1b5)](_0x49a959);}),_0x45b5c1[_0x4277f7(0x1cc)]&&(await _0x25d6fb[_0x4277f7(0x1ee)](_0x4277f7(0x1d0),{'params':{'userIDs':[..._0x45b5c1]}}))['body']['users'][_0x4277f7(0x222)](_0x55b207=>{_0x55b207&&_0x3bc52b['addUser'](_0x55b207);});};var $=Object[_0xffd7c1(0x1e0)],E=(_0xa4b534,_0x18007d,_0x502393,_0x52d361)=>{const _0x5e52b1=_0xffd7c1;for(var _0xa0454=_0x52d361>0x1?void 0x0:_0x52d361?$(_0x18007d,_0x502393):_0x18007d,_0x3e61f5=_0xa4b534[_0x5e52b1(0x1f3)]-0x1,_0x1da931;_0x3e61f5>=0x0;_0x3e61f5--)(_0x1da931=_0xa4b534[_0x3e61f5])&&(_0xa0454=_0x1da931(_0xa0454)||_0xa0454);return _0xa0454;},S=(_0x395aea,_0x3916fc)=>(_0x5e7c79,_0x1bd90b)=>_0x3916fc(_0x5e7c79,_0x1bd90b,_0x395aea);let p=class extends c[_0xffd7c1(0x1ba)]{constructor(_0x32cceb,_0x62f9ce,_0x48de18,_0x38b025){const _0x49cb3f=_0xffd7c1;super(),this['_commentService']=_0x32cceb,this['_threadCommentModel']=_0x62f9ce,this[_0x49cb3f(0x214)]=_0x48de18,this[_0x49cb3f(0x1e2)]=_0x38b025,this[_0x49cb3f(0x1b6)](),this[_0x49cb3f(0x1c5)]();}[_0xffd7c1(0x1c5)](){const _0x2fb269=_0xffd7c1;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$'][_0x2fb269(0x1f9)](w['bufferTime'](0x10))['subscribe'](_0x2de257=>{const _0x3b8f3b=_0x2fb269,_0x403a89=new Set();_0x2de257[_0x3b8f3b(0x222)](_0x218148=>{const _0x4f1ae7=_0x3b8f3b;switch(_0x218148[_0x4f1ae7(0x1c4)]){case _0x4f1ae7(0x1e5):{const _0x207d6b=_0x218148[_0x4f1ae7(0x211)][_0x4f1ae7(0x228)];_0x403a89[_0x4f1ae7(0x1e5)](_0x207d6b);break;}}}),R(this[_0x3b8f3b(0x1e2)],_0x403a89);}));}[_0xffd7c1(0x1b6)](){const _0x3816e1=_0xffd7c1;this['disposeWithMe'](this[_0x3816e1(0x1cb)][_0x3816e1(0x1bf)][_0x3816e1(0x217)](async _0x310e5e=>{const _0x101589=_0x3816e1;var _0xaabfe,_0x44c48c,_0x3f155a,_0x58395e;const _0x12749d=(_0xaabfe=this[_0x101589(0x212)][_0x101589(0x1e4)](_0x310e5e[_0x101589(0x1d6)])[_0x101589(0x1b7)](_0x505abe=>_0x505abe[_0x101589(0x207)]===_0x310e5e[_0x101589(0x207)]))==null?void 0x0:_0xaabfe[_0x101589(0x1c3)];if(!_0x12749d)return;const {unitId:_0x2bfa44,subUnitId:_0x3d6411}=_0x12749d;switch(_0x310e5e[_0x101589(0x1db)]&&this['_userService'][_0x101589(0x20b)](_0x310e5e['user']),_0x310e5e[_0x101589(0x1c4)]){case v[_0x101589(0x200)]:break;case v['Reply']:{this[_0x101589(0x212)]['addComment'](_0x2bfa44,_0x3d6411,{'unitId':_0x2bfa44,'subUnitId':_0x3d6411,'ref':'','id':_0x310e5e[_0x101589(0x204)],'dT':f(+_0x310e5e[_0x101589(0x1d5)]),'threadId':_0x310e5e[_0x101589(0x207)],'personId':(_0x3f155a=(_0x44c48c=_0x310e5e[_0x101589(0x1db)])==null?void 0x0:_0x44c48c['userID'])!=null?_0x3f155a:_0x310e5e[_0x101589(0x1ed)],'text':JSON[_0x101589(0x1e8)](_0x310e5e['content']),'parentId':_0x12749d['id']});break;}case v[_0x101589(0x210)]:{const _0x40fd11=this['_threadCommentModel'][_0x101589(0x220)](_0x2bfa44,_0x3d6411,_0x310e5e[_0x101589(0x204)]);_0x40fd11&&_0x40fd11[_0x101589(0x20d)]&&this[_0x101589(0x212)][_0x101589(0x201)](_0x2bfa44,_0x3d6411,_0x310e5e['replyId']);break;}case v[_0x101589(0x1df)]:{this[_0x101589(0x212)][_0x101589(0x1fc)](_0x2bfa44,_0x3d6411,{'commentId':_0x310e5e['replyId'],'text':JSON[_0x101589(0x1e8)](_0x310e5e[_0x101589(0x20c)])});break;}case v[_0x101589(0x21a)]:{const _0x16a7f7=(_0x58395e=this[_0x101589(0x212)][_0x101589(0x1e4)](_0x310e5e[_0x101589(0x1d6)])[_0x101589(0x1b7)](_0x350cf1=>_0x350cf1[_0x101589(0x207)]===_0x310e5e['threadId']))==null?void 0x0:_0x58395e['root'];_0x16a7f7&&this[_0x101589(0x212)][_0x101589(0x1f8)](_0x2bfa44,_0x3d6411,_0x16a7f7['id'],_0x310e5e[_0x101589(0x215)]===I[_0x101589(0x226)]);break;}}}));}};p=E([S(0x0,c[_0xffd7c1(0x213)](b['CommentService'])),S(0x1,c[_0xffd7c1(0x213)](M[_0xffd7c1(0x1fe)])),S(0x2,c[_0xffd7c1(0x213)](c[_0xffd7c1(0x1c1)])),S(0x3,c[_0xffd7c1(0x213)](c[_0xffd7c1(0x1b9)]))],p);const q=_0xffd7c1(0x1d9),D={};var A=Object[_0xffd7c1(0x1e0)],x=(_0x10207d,_0x55f01d,_0x47891d,_0x27f53a)=>{const _0x9bedec=_0xffd7c1;for(var _0x50d167=_0x27f53a>0x1?void 0x0:_0x27f53a?A(_0x55f01d,_0x47891d):_0x55f01d,_0xfe8748=_0x10207d[_0x9bedec(0x1f3)]-0x1,_0x525166;_0xfe8748>=0x0;_0xfe8748--)(_0x525166=_0x10207d[_0xfe8748])&&(_0x50d167=_0x525166(_0x50d167)||_0x50d167);return _0x50d167;},_=(_0x5e8392,_0x1a1076)=>(_0x6634f5,_0x39bfc3)=>_0x1a1076(_0x6634f5,_0x39bfc3,_0x5e8392);function Y(_0xaf2165,_0x25f74e){const _0x4c095e=_0xffd7c1,_0x2282d5=_0xaf2165['replies'][0x0];return{..._0x25f74e,'id':_0x2282d5[_0x4c095e(0x204)],'resolved':_0xaf2165[_0x4c095e(0x215)]===0x1,'dT':f(_0x2282d5[_0x4c095e(0x1d5)]),'personId':_0x2282d5[_0x4c095e(0x1ed)],'threadId':_0x2282d5[_0x4c095e(0x207)]};}function _0x3ffc(_0x32388b,_0x58add7){const _0x5bdecb=_0x5bde();return _0x3ffc=function(_0x3ffce6,_0x4cc13f){_0x3ffce6=_0x3ffce6-0x1b0;let _0x1526fa=_0x5bdecb[_0x3ffce6];return _0x1526fa;},_0x3ffc(_0x32388b,_0x58add7);}function G(_0x2d242a,_0x28cd98,_0x387255){const _0x30516f=_0xffd7c1;var _0x59121b,_0x50147b;if(((_0x50147b=(_0x59121b=_0x2d242a==null?void 0x0:_0x2d242a[_0x30516f(0x223)])==null?void 0x0:_0x59121b[_0x30516f(0x1f3)])!=null?_0x50147b:0x0)>0x0){const _0x3bba77=(_0x5104fa,_0x2d709f)=>({'id':_0x5104fa['replyId'],'threadId':_0x5104fa[_0x30516f(0x207)],'dT':f(_0x5104fa['createTimestamp']),'personId':_0x5104fa[_0x30516f(0x1ed)],'resolved':_0x2d242a[_0x30516f(0x215)]===I['Solved'],'unitId':_0x28cd98,'subUnitId':_0x387255,'text':JSON[_0x30516f(0x1e8)](_0x5104fa[_0x30516f(0x20c)]),'parentId':_0x2d709f}),_0x187b88=_0x3bba77(_0x2d242a[_0x30516f(0x223)][0x0]);return{..._0x187b88,'children':_0x2d242a[_0x30516f(0x223)][_0x30516f(0x1e1)](0x1)['map'](_0x2c3dc2=>_0x3bba77(_0x2c3dc2,_0x187b88['id']))};}return null;}let g=class{constructor(_0x5da154,_0x3174ca,_0x303225,_0x5eb344){const _0x580d9f=_0xffd7c1;this[_0x580d9f(0x1bd)]=_0x5da154,this[_0x580d9f(0x214)]=_0x3174ca,this[_0x580d9f(0x206)]=_0x303225,this[_0x580d9f(0x1e2)]=_0x5eb344;}async['addComment'](_0x42c55b){const _0x252814=_0xffd7c1;var _0x229d76,_0x11afd0;const {parentId:_0x427c17,unitId:_0xffa395,text:_0x2a2557,threadId:_0x26b256}=_0x42c55b,_0x1b38f6=(_0x11afd0=(_0x229d76=_0x2a2557['customRanges'])==null?void 0x0:_0x229d76[_0x252814(0x1bb)](_0x4009b1=>_0x4009b1[_0x252814(0x1fb)]===c[_0x252814(0x1de)]['COMMENT'])[_0x252814(0x221)](_0x21942e=>_0x21942e[_0x252814(0x218)]))!=null?_0x11afd0:[],_0x146451=JSON[_0x252814(0x202)](_0x2a2557),_0x2816d1=(await this[_0x252814(0x206)][_0x252814(0x227)](_0xffa395))[_0x252814(0x1c6)]();if(_0x427c17){const _0x565ca0={'memberId':_0x2816d1,'unitId':_0xffa395,'content':_0x146451,'mention':_0x1b38f6,'threadId':_0x26b256},_0x37edab=(await this[_0x252814(0x1bd)]['post']('/universer-api/comment/unit/'+_0xffa395+'/reply',{'body':_0x565ca0}))['body'][_0x252814(0x209)];return{..._0x42c55b,'id':_0x37edab[_0x252814(0x204)],'dT':c[_0x252814(0x1b8)](+_0x37edab[_0x252814(0x1d5)])[_0x252814(0x1dd)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x37edab['userId']};}else{const _0xc6ed97={'memberId':_0x2816d1,'unitId':_0xffa395,'content':_0x146451,'mention':_0x1b38f6},_0x3cd16f=await this[_0x252814(0x1bd)][_0x252814(0x20f)](_0x252814(0x1be)+_0xffa395+_0x252814(0x1c8),{'body':_0xc6ed97});return Y(_0x3cd16f['body']['comment'],_0x42c55b);}}async[_0xffd7c1(0x1fc)](_0x226585){const _0x40902a=_0xffd7c1;var _0x58d8c2,_0x4059bd;const {text:_0x17a0d8,unitId:_0x2120db}=_0x226585,_0x35f862=(_0x4059bd=(_0x58d8c2=_0x17a0d8[_0x40902a(0x1c0)])==null?void 0x0:_0x58d8c2[_0x40902a(0x1bb)](_0x468a5f=>_0x468a5f[_0x40902a(0x1fb)]===c[_0x40902a(0x1de)]['COMMENT'])[_0x40902a(0x221)](_0xa25acc=>_0xa25acc[_0x40902a(0x218)]))!=null?_0x4059bd:[],_0xe37cfb=JSON[_0x40902a(0x202)](_0x17a0d8),_0x5687ce=_0x226585['threadId'],_0x217dac=_0x226585['id'],_0x1c5cc0={'memberId':(await this[_0x40902a(0x206)][_0x40902a(0x227)](_0x2120db))[_0x40902a(0x1c6)](),'unitId':_0x2120db,'threadId':_0x5687ce,'mention':_0x35f862,'content':_0xe37cfb,'replyId':_0x217dac},_0x2616f2=await this['_httpService'][_0x40902a(0x20f)](_0x40902a(0x1be)+_0x2120db+_0x40902a(0x1ea),{'body':_0x1c5cc0});return!_0x2616f2['body']['error']||_0x2616f2[_0x40902a(0x1d4)][_0x40902a(0x1ef)][_0x40902a(0x1eb)]===0x1;}async[_0xffd7c1(0x1f8)](_0x4a742d){const _0x17bd31=_0xffd7c1,{unitId:_0x1f432f}=_0x4a742d,_0xc1c4c6=_0x4a742d['threadId'],_0xaa01d7={'memberId':this[_0x17bd31(0x214)][_0x17bd31(0x219)]()[_0x17bd31(0x1dc)],'unitId':_0x1f432f,'threadId':_0xc1c4c6,'solved':_0x4a742d['resolved']?I[_0x17bd31(0x226)]:I[_0x17bd31(0x1fd)]},_0x5c81ff=await this[_0x17bd31(0x1bd)][_0x17bd31(0x20f)](_0x17bd31(0x1be)+_0x1f432f+'/solved',{'body':_0xaa01d7});return!_0x5c81ff[_0x17bd31(0x1d4)]['error']||_0x5c81ff[_0x17bd31(0x1d4)]['error'][_0x17bd31(0x1eb)]===0x1;}async['deleteComment'](_0x5c88ea,_0x2353ca,_0x370224,_0x12afd8){const _0x26c894=_0xffd7c1,_0x3930db={'memberId':(await this[_0x26c894(0x206)][_0x26c894(0x227)](_0x5c88ea))[_0x26c894(0x1c6)](),'threadId':_0x370224,'replyId':_0x12afd8,'unitId':_0x5c88ea},_0x114cc2=await this['_httpService'][_0x26c894(0x20f)](_0x26c894(0x1be)+_0x5c88ea+'/delete',{'body':_0x3930db});return!_0x114cc2[_0x26c894(0x1d4)][_0x26c894(0x1ef)]||_0x114cc2['body'][_0x26c894(0x1ef)][_0x26c894(0x1eb)]===0x1;}async[_0xffd7c1(0x1b2)](_0x1ae5c4,_0x56601e,_0x1964a4){const _0x368da6=_0xffd7c1,_0x3e71ca={'unitId':_0x1ae5c4,'threadId':_0x1964a4},_0x1434e7=await this[_0x368da6(0x1bd)]['post'](_0x368da6(0x1be)+_0x1ae5c4+_0x368da6(0x224),{'body':_0x3e71ca}),_0xfa9c87=_0x1964a4[_0x368da6(0x221)](_0x2760e0=>G(_0x1434e7[_0x368da6(0x1d4)]['comments'][_0x2760e0],_0x1ae5c4,_0x56601e))[_0x368da6(0x1bb)](Boolean);return Object[_0x368da6(0x1d1)](_0x1434e7['body'][_0x368da6(0x1c2)])[_0x368da6(0x222)](_0x30b311=>{const _0x5228cc=_0x368da6;this[_0x5228cc(0x214)]['addUser'](_0x30b311);}),_0xfa9c87;}['saveCommentToSnapshot'](_0x3dd797){const _0x365dcd=_0xffd7c1;return{'id':_0x3dd797['id'],'threadId':_0x3dd797[_0x365dcd(0x207)],'ref':_0x3dd797[_0x365dcd(0x1cf)]};}};g=x([_(0x0,c[_0xffd7c1(0x213)](P['HTTPService'])),_(0x1,c[_0xffd7c1(0x213)](c[_0xffd7c1(0x1c1)])),_(0x2,c[_0xffd7c1(0x213)](b[_0xffd7c1(0x1c7)])),_(0x3,c['Inject'](c[_0xffd7c1(0x1b9)]))],g);var H=Object[_0xffd7c1(0x1e0)],J=(_0x18cccc,_0x58305a,_0x5c145c,_0x327beb)=>{for(var _0x4d6962=_0x327beb>0x1?void 0x0:_0x327beb?H(_0x58305a,_0x5c145c):_0x58305a,_0x3c0f0c=_0x18cccc['length']-0x1,_0x202ac3;_0x3c0f0c>=0x0;_0x3c0f0c--)(_0x202ac3=_0x18cccc[_0x3c0f0c])&&(_0x4d6962=_0x202ac3(_0x4d6962)||_0x4d6962);return _0x4d6962;},y=(_0x149e54,_0x5bf7e4)=>(_0xe3f055,_0x3588ae)=>_0x5bf7e4(_0xe3f055,_0x3588ae,_0x149e54);let C=class extends c[_0xffd7c1(0x1ba)]{constructor(_0x36e352,_0x3d0537){const _0x2c22c1=_0xffd7c1;super(),this[_0x2c22c1(0x1ce)]=_0x36e352,this[_0x2c22c1(0x1b1)]=_0x3d0537,this[_0x2c22c1(0x21d)]();}['_initDataSource'](){const _0x58a1e5=_0xffd7c1;this[_0x58a1e5(0x1ce)]['dataSource']=this[_0x58a1e5(0x1b1)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0xffd7c1(0x213)](g))],C);var F=Object[_0xffd7c1(0x1f5)],L=Object[_0xffd7c1(0x1e0)],Z=(_0x3fb045,_0x3ac6cb,_0x13dae2)=>_0x3ac6cb in _0x3fb045?F(_0x3fb045,_0x3ac6cb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x13dae2}):_0x3fb045[_0x3ac6cb]=_0x13dae2,W=(_0x2476a1,_0x1eb0a9,_0x3f33a3,_0x38ed79)=>{const _0x46ff68=_0xffd7c1;for(var _0x3776ba=_0x38ed79>0x1?void 0x0:_0x38ed79?L(_0x1eb0a9,_0x3f33a3):_0x1eb0a9,_0x4ccb5b=_0x2476a1[_0x46ff68(0x1f3)]-0x1,_0x1bd8ff;_0x4ccb5b>=0x0;_0x4ccb5b--)(_0x1bd8ff=_0x2476a1[_0x4ccb5b])&&(_0x3776ba=_0x1bd8ff(_0x3776ba)||_0x3776ba);return _0x3776ba;},O=(_0x399380,_0x2b6425)=>(_0x2b71a6,_0x10da1e)=>_0x2b6425(_0x2b71a6,_0x10da1e,_0x399380),N=(_0x4e7d01,_0x39c708,_0x458544)=>Z(_0x4e7d01,typeof _0x39c708!=_0xffd7c1(0x1f0)?_0x39c708+'':_0x39c708,_0x458544);exports[_0xffd7c1(0x1e7)]=class extends c[_0xffd7c1(0x20e)]{constructor(_0x59e461=D,_0x5d6176,_0x3654c2){const _0x52910a=_0xffd7c1;super(),this[_0x52910a(0x225)]=_0x59e461,this[_0x52910a(0x1e2)]=_0x5d6176,this[_0x52910a(0x1cd)]=_0x3654c2;const {..._0x286fe4}=c[_0x52910a(0x1d3)]({},D,this[_0x52910a(0x225)]);this[_0x52910a(0x1cd)][_0x52910a(0x21c)](q,_0x286fe4);}[_0xffd7c1(0x1d8)](){const _0x231320=_0xffd7c1;[[g],[C],[p]][_0x231320(0x222)](_0x5bc432=>{const _0xe43858=_0x231320;this[_0xe43858(0x1e2)][_0xe43858(0x1e5)](_0x5bc432);});}[_0xffd7c1(0x1b4)](){const _0x1ae994=_0xffd7c1;this[_0x1ae994(0x1e2)][_0x1ae994(0x1ee)](C),this['_injector']['get'](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0xffd7c1(0x1d7),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0xffd7c1(0x1c4),c[_0xffd7c1(0x20a)]['UNIVER_UNKNOWN']),exports[_0xffd7c1(0x1e7)]=W([c['DependentOn'](j[_0xffd7c1(0x1bc)],b['UniverCollaborationClientPlugin'],T[_0xffd7c1(0x1b0)]),O(0x1,c[_0xffd7c1(0x213)](c[_0xffd7c1(0x1b9)])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x42d6c8=_0x349d;(function(_0x3183ad,_0x136b00){const _0x110aed=_0x349d,_0x59da92=_0x3183ad();while(!![]){try{const _0x328e0b=-parseInt(_0x110aed(0x9a))/0x1*(parseInt(_0x110aed(0xe6))/0x2)+-parseInt(_0x110aed(0xc9))/0x3+parseInt(_0x110aed(0xbc))/0x4*(-parseInt(_0x110aed(0xdc))/0x5)+-parseInt(_0x110aed(0x98))/0x6*(parseInt(_0x110aed(0xd9))/0x7)+-parseInt(_0x110aed(0xd2))/0x8+parseInt(_0x110aed(0xbe))/0x9+-parseInt(_0x110aed(0xeb))/0xa*(-parseInt(_0x110aed(0xa8))/0xb);if(_0x328e0b===_0x136b00)break;else _0x59da92['push'](_0x59da92['shift']());}catch(_0x1b4338){_0x59da92['push'](_0x59da92['shift']());}}}(_0x4366,0xea804));import{CommentService as _0x533446,CollaborationSessionService as _0x251384,UniverCollaborationClientPlugin as _0x46ec77}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4f39a6}from'@univerjs-pro/license';import{dayjs as _0xfb9cd8,UserManagerService as _0x7fb736,Inject as _0x472303,Injector as _0x467098,Disposable as _0x526737,CustomRangeType as _0x2675b6,UniverInstanceType as _0x226e69,DependentOn as _0x3e7234,IConfigService as _0x566806,Plugin as _0x5837c0,merge as _0x1d5c2a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x47d75a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3f067b,IThreadCommentDataSourceService as _0x3b16b7}from'@univerjs/thread-comment';import{bufferTime as _0xe62590}from'rxjs';import{HTTPService as _0x4e8dcc}from'@univerjs/network';const W=_0x42d6c8(0xa4);var I=(_0x239ba0=>(_0x239ba0[_0x239ba0[_0x42d6c8(0xc0)]=0x0]=_0x42d6c8(0xc0),_0x239ba0[_0x239ba0['Solved']=0x1]=_0x42d6c8(0xc6),_0x239ba0[_0x239ba0['UNRECOGNIZED']=-0x1]=_0x42d6c8(0xac),_0x239ba0))(I||{}),v=(_0x4915e5=>(_0x4915e5[_0x4915e5[_0x42d6c8(0xd8)]=0x0]='Unknown',_0x4915e5[_0x4915e5['Add']=0x1]=_0x42d6c8(0x8b),_0x4915e5[_0x4915e5[_0x42d6c8(0x90)]=0x2]=_0x42d6c8(0x90),_0x4915e5[_0x4915e5[_0x42d6c8(0xc7)]=0x3]='Edit',_0x4915e5[_0x4915e5['Delete']=0x4]=_0x42d6c8(0xbb),_0x4915e5[_0x4915e5['Solve']=0x5]=_0x42d6c8(0xd6),_0x4915e5[_0x4915e5[_0x42d6c8(0xac)]=-0x1]=_0x42d6c8(0xac),_0x4915e5))(v||{});const D=_0x41e408=>_0xfb9cd8(new Date(+_0x41e408))[_0x42d6c8(0x8f)](_0x42d6c8(0xc5)),B=async(_0x263d31,_0x2171fd)=>{const _0x5b35df=_0x42d6c8,_0x576e04=_0x263d31['get'](_0x7fb736),_0x346964=_0x263d31[_0x5b35df(0xb8)](_0x4e8dcc);_0x2171fd[_0x5b35df(0xee)](_0x2f3815=>{const _0x31c53a=_0x5b35df;_0x576e04[_0x31c53a(0xe3)](_0x2f3815)&&_0x2171fd[_0x31c53a(0xab)](_0x2f3815);}),_0x2171fd['size']&&(await _0x346964[_0x5b35df(0xb8)](_0x5b35df(0xba),{'params':{'userIDs':[..._0x2171fd]}}))[_0x5b35df(0xd4)][_0x5b35df(0xe5)]['forEach'](_0x2789e4=>{_0x2789e4&&_0x576e04['addUser'](_0x2789e4);});};var K=Object[_0x42d6c8(0xe8)],V=(_0xf1da94,_0x19022d,_0x56b4c0,_0x128ade)=>{for(var _0x469081=_0x128ade>0x1?void 0x0:_0x128ade?K(_0x19022d,_0x56b4c0):_0x19022d,_0x214c63=_0xf1da94['length']-0x1,_0x547c4b;_0x214c63>=0x0;_0x214c63--)(_0x547c4b=_0xf1da94[_0x214c63])&&(_0x469081=_0x547c4b(_0x469081)||_0x469081);return _0x469081;},p=(_0x1e1f8b,_0x38f5c7)=>(_0x32e4d6,_0x125888)=>_0x38f5c7(_0x32e4d6,_0x125888,_0x1e1f8b);function _0x349d(_0x5da02b,_0x358b03){const _0x4366a2=_0x4366();return _0x349d=function(_0x349dcc,_0x290545){_0x349dcc=_0x349dcc-0x88;let _0x1c618e=_0x4366a2[_0x349dcc];return _0x1c618e;},_0x349d(_0x5da02b,_0x358b03);}let S=class extends _0x526737{constructor(_0xf2189a,_0x5e08d8,_0x5e723a,_0x34b380){const _0x1414fa=_0x42d6c8;super(),this[_0x1414fa(0xc1)]=_0xf2189a,this[_0x1414fa(0xe0)]=_0x5e08d8,this[_0x1414fa(0xde)]=_0x5e723a,this[_0x1414fa(0x89)]=_0x34b380,this[_0x1414fa(0xe4)](),this['_initUserSync']();}['_initUserSync'](){const _0x4ddede=_0x42d6c8;this['disposeWithMe'](this[_0x4ddede(0xe0)][_0x4ddede(0xd7)][_0x4ddede(0xaa)](_0xe62590(0x10))[_0x4ddede(0xec)](_0x55ed07=>{const _0x3ea18e=_0x4ddede,_0x16ad70=new Set();_0x55ed07[_0x3ea18e(0xee)](_0x51f4de=>{const _0x2eeca3=_0x3ea18e;switch(_0x51f4de[_0x2eeca3(0x91)]){case'add':{const _0x2ec707=_0x51f4de['payload'][_0x2eeca3(0x94)];_0x16ad70['add'](_0x2ec707);break;}}}),B(this[_0x3ea18e(0x89)],_0x16ad70);}));}[_0x42d6c8(0xe4)](){const _0x1337a8=_0x42d6c8;this[_0x1337a8(0xb3)](this[_0x1337a8(0xc1)]['commentUpdate$']['subscribe'](async _0x5ae4e5=>{const _0x40ad59=_0x1337a8;var _0x2648fb,_0x335a3e,_0x67ad07,_0x115db0;const _0x11e167=(_0x2648fb=this['_threadCommentModel']['getUnit'](_0x5ae4e5[_0x40ad59(0xc8)])[_0x40ad59(0xb4)](_0x1b3e96=>_0x1b3e96[_0x40ad59(0x99)]===_0x5ae4e5[_0x40ad59(0x99)]))==null?void 0x0:_0x2648fb[_0x40ad59(0x9f)];if(!_0x11e167)return;const {unitId:_0x1c68d1,subUnitId:_0x4894c3}=_0x11e167;switch(_0x5ae4e5[_0x40ad59(0xed)]&&this[_0x40ad59(0xde)]['addUser'](_0x5ae4e5[_0x40ad59(0xed)]),_0x5ae4e5[_0x40ad59(0x91)]){case v[_0x40ad59(0x8b)]:break;case v['Reply']:{this[_0x40ad59(0xe0)]['addComment'](_0x1c68d1,_0x4894c3,{'unitId':_0x1c68d1,'subUnitId':_0x4894c3,'ref':'','id':_0x5ae4e5[_0x40ad59(0xa6)],'dT':D(+_0x5ae4e5[_0x40ad59(0x8c)]),'threadId':_0x5ae4e5[_0x40ad59(0x99)],'personId':(_0x67ad07=(_0x335a3e=_0x5ae4e5[_0x40ad59(0xed)])==null?void 0x0:_0x335a3e['userID'])!=null?_0x67ad07:_0x5ae4e5[_0x40ad59(0xc4)],'text':JSON[_0x40ad59(0xa3)](_0x5ae4e5[_0x40ad59(0x95)]),'parentId':_0x11e167['id']});break;}case v['Delete']:{const _0x2c50e7=this[_0x40ad59(0xe0)][_0x40ad59(0xbd)](_0x1c68d1,_0x4894c3,_0x5ae4e5[_0x40ad59(0xa6)]);_0x2c50e7&&_0x2c50e7[_0x40ad59(0xca)]&&this[_0x40ad59(0xe0)][_0x40ad59(0xc2)](_0x1c68d1,_0x4894c3,_0x5ae4e5[_0x40ad59(0xa6)]);break;}case v[_0x40ad59(0xc7)]:{this[_0x40ad59(0xe0)][_0x40ad59(0xd5)](_0x1c68d1,_0x4894c3,{'commentId':_0x5ae4e5['replyId'],'text':JSON['parse'](_0x5ae4e5[_0x40ad59(0x95)])});break;}case v[_0x40ad59(0xd6)]:{const _0x4e32aa=(_0x115db0=this['_threadCommentModel'][_0x40ad59(0xae)](_0x5ae4e5[_0x40ad59(0xc8)])['find'](_0x525d31=>_0x525d31[_0x40ad59(0x99)]===_0x5ae4e5['threadId']))==null?void 0x0:_0x115db0[_0x40ad59(0x9f)];_0x4e32aa&&this[_0x40ad59(0xe0)][_0x40ad59(0xd0)](_0x1c68d1,_0x4894c3,_0x4e32aa['id'],_0x5ae4e5[_0x40ad59(0xaf)]===I[_0x40ad59(0xc6)]);break;}}}));}};S=V([p(0x0,_0x472303(_0x533446)),p(0x1,_0x472303(_0x3f067b)),p(0x2,_0x472303(_0x7fb736)),p(0x3,_0x472303(_0x467098))],S);const z=_0x42d6c8(0xe2),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x3d3472,_0x1a28d1,_0x4c068d,_0x3f4e3c)=>{for(var _0xab116b=_0x3f4e3c>0x1?void 0x0:_0x3f4e3c?k(_0x1a28d1,_0x4c068d):_0x1a28d1,_0x4573f6=_0x3d3472['length']-0x1,_0x59d157;_0x4573f6>=0x0;_0x4573f6--)(_0x59d157=_0x3d3472[_0x4573f6])&&(_0xab116b=_0x59d157(_0xab116b)||_0xab116b);return _0xab116b;},_=(_0x38d7ed,_0x14ea5d)=>(_0x58010f,_0x3efd9d)=>_0x14ea5d(_0x58010f,_0x3efd9d,_0x38d7ed);function X(_0x48c492,_0x4476ac){const _0x2269ca=_0x42d6c8,_0x485343=_0x48c492[_0x2269ca(0xb7)][0x0];return{..._0x4476ac,'id':_0x485343[_0x2269ca(0xa6)],'resolved':_0x48c492[_0x2269ca(0xaf)]===0x1,'dT':D(_0x485343['createTimestamp']),'personId':_0x485343[_0x2269ca(0xc4)],'threadId':_0x485343[_0x2269ca(0x99)]};}function ee(_0x486ad4,_0x4fbd3c,_0x4980df){const _0x2d2d59=_0x42d6c8;var _0x4978a8,_0x1d97cf;if(((_0x1d97cf=(_0x4978a8=_0x486ad4==null?void 0x0:_0x486ad4[_0x2d2d59(0xb7)])==null?void 0x0:_0x4978a8[_0x2d2d59(0xb0)])!=null?_0x1d97cf:0x0)>0x0){const _0xc4beaf=(_0x49dd0e,_0x860956)=>({'id':_0x49dd0e[_0x2d2d59(0xa6)],'threadId':_0x49dd0e[_0x2d2d59(0x99)],'dT':D(_0x49dd0e[_0x2d2d59(0x8c)]),'personId':_0x49dd0e[_0x2d2d59(0xc4)],'resolved':_0x486ad4[_0x2d2d59(0xaf)]===I[_0x2d2d59(0xc6)],'unitId':_0x4fbd3c,'subUnitId':_0x4980df,'text':JSON[_0x2d2d59(0xa3)](_0x49dd0e[_0x2d2d59(0x95)]),'parentId':_0x860956}),_0x374c5d=_0xc4beaf(_0x486ad4[_0x2d2d59(0xb7)][0x0]);return{..._0x374c5d,'children':_0x486ad4[_0x2d2d59(0xb7)][_0x2d2d59(0x96)](0x1)[_0x2d2d59(0xdd)](_0x5e5e5e=>_0xc4beaf(_0x5e5e5e,_0x374c5d['id']))};}return null;}let f=class{constructor(_0x3337,_0x4aec0e,_0x481023,_0x2c33b){const _0x11cb65=_0x42d6c8;this[_0x11cb65(0xb2)]=_0x3337,this[_0x11cb65(0xde)]=_0x4aec0e,this['_sessionService']=_0x481023,this['_injector']=_0x2c33b;}async[_0x42d6c8(0xa1)](_0x444fc8){const _0x43bdf0=_0x42d6c8;var _0x3aa470,_0x52cdbd;const {parentId:_0x32a98c,unitId:_0xd95eab,text:_0x3ccacb,threadId:_0x2d4701}=_0x444fc8,_0x5ce452=(_0x52cdbd=(_0x3aa470=_0x3ccacb['customRanges'])==null?void 0x0:_0x3aa470[_0x43bdf0(0xe1)](_0x118f0c=>_0x118f0c[_0x43bdf0(0x88)]===_0x2675b6[_0x43bdf0(0xb6)])[_0x43bdf0(0xdd)](_0x150134=>_0x150134[_0x43bdf0(0xb1)]))!=null?_0x52cdbd:[],_0x2f9f12=JSON['stringify'](_0x3ccacb),_0x41497a=(await this[_0x43bdf0(0xa0)][_0x43bdf0(0xe7)](_0xd95eab))[_0x43bdf0(0xbf)]();if(_0x32a98c){const _0x2fec15={'memberId':_0x41497a,'unitId':_0xd95eab,'content':_0x2f9f12,'mention':_0x5ce452,'threadId':_0x2d4701},_0x225829=(await this[_0x43bdf0(0xb2)]['post'](_0x43bdf0(0xea)+_0xd95eab+_0x43bdf0(0x92),{'body':_0x2fec15}))[_0x43bdf0(0xd4)]['reply'];return{..._0x444fc8,'id':_0x225829[_0x43bdf0(0xa6)],'dT':_0xfb9cd8(+_0x225829['createTimestamp'])[_0x43bdf0(0x8f)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x225829[_0x43bdf0(0xc4)]};}else{const _0x1f40ec={'memberId':_0x41497a,'unitId':_0xd95eab,'content':_0x2f9f12,'mention':_0x5ce452},_0x5046af=await this[_0x43bdf0(0xb2)][_0x43bdf0(0xce)](_0x43bdf0(0xea)+_0xd95eab+_0x43bdf0(0xcb),{'body':_0x1f40ec});return X(_0x5046af[_0x43bdf0(0xd4)][_0x43bdf0(0xd3)],_0x444fc8);}}async[_0x42d6c8(0xd5)](_0x1ba6d9){const _0xbdac0c=_0x42d6c8;var _0xd379c3,_0x334512;const {text:_0x16deed,unitId:_0x57a241}=_0x1ba6d9,_0x26c9cc=(_0x334512=(_0xd379c3=_0x16deed[_0xbdac0c(0x8a)])==null?void 0x0:_0xd379c3[_0xbdac0c(0xe1)](_0x2b92ac=>_0x2b92ac[_0xbdac0c(0x88)]===_0x2675b6[_0xbdac0c(0xb6)])[_0xbdac0c(0xdd)](_0x1cfd1c=>_0x1cfd1c['rangeId']))!=null?_0x334512:[],_0x84e5ec=JSON['stringify'](_0x16deed),_0x6ce363=_0x1ba6d9[_0xbdac0c(0x99)],_0x57c443=_0x1ba6d9['id'],_0x2f52ae={'memberId':(await this[_0xbdac0c(0xa0)]['requireSession'](_0x57a241))['getMemberID'](),'unitId':_0x57a241,'threadId':_0x6ce363,'mention':_0x26c9cc,'content':_0x84e5ec,'replyId':_0x57c443},_0x4c7335=await this[_0xbdac0c(0xb2)][_0xbdac0c(0xce)](_0xbdac0c(0xea)+_0x57a241+_0xbdac0c(0x8e),{'body':_0x2f52ae});return!_0x4c7335['body'][_0xbdac0c(0xcf)]||_0x4c7335[_0xbdac0c(0xd4)][_0xbdac0c(0xcf)]['code']===0x1;}async[_0x42d6c8(0xd0)](_0x503796){const _0x45d7a1=_0x42d6c8,{unitId:_0x4a0ea9}=_0x503796,_0x59c36f=_0x503796['threadId'],_0x1226bd={'memberId':this[_0x45d7a1(0xde)]['getCurrentUser']()[_0x45d7a1(0xcc)],'unitId':_0x4a0ea9,'threadId':_0x59c36f,'solved':_0x503796['resolved']?I[_0x45d7a1(0xc6)]:I[_0x45d7a1(0xc0)]},_0x122c57=await this[_0x45d7a1(0xb2)][_0x45d7a1(0xce)](_0x45d7a1(0xea)+_0x4a0ea9+_0x45d7a1(0xa5),{'body':_0x1226bd});return!_0x122c57[_0x45d7a1(0xd4)][_0x45d7a1(0xcf)]||_0x122c57['body']['error'][_0x45d7a1(0xdf)]===0x1;}async[_0x42d6c8(0xc2)](_0x4f84b,_0x7943a4,_0x519afe,_0xad7b98){const _0x47fddd=_0x42d6c8,_0x524c3d={'memberId':(await this[_0x47fddd(0xa0)][_0x47fddd(0xe7)](_0x4f84b))[_0x47fddd(0xbf)](),'threadId':_0x519afe,'replyId':_0xad7b98,'unitId':_0x4f84b},_0x27506d=await this['_httpService'][_0x47fddd(0xce)](_0x47fddd(0xea)+_0x4f84b+'/delete',{'body':_0x524c3d});return!_0x27506d[_0x47fddd(0xd4)][_0x47fddd(0xcf)]||_0x27506d['body'][_0x47fddd(0xcf)][_0x47fddd(0xdf)]===0x1;}async['listComments'](_0x17f9eb,_0x1dcda1,_0x56ba25){const _0x2f806e=_0x42d6c8,_0x59dd51={'unitId':_0x17f9eb,'threadId':_0x56ba25},_0x1065be=await this[_0x2f806e(0xb2)][_0x2f806e(0xce)](_0x2f806e(0xea)+_0x17f9eb+_0x2f806e(0xef),{'body':_0x59dd51}),_0x4a082f=_0x56ba25[_0x2f806e(0xdd)](_0x1a51db=>ee(_0x1065be[_0x2f806e(0xd4)][_0x2f806e(0xa7)][_0x1a51db],_0x17f9eb,_0x1dcda1))['filter'](Boolean);return Object[_0x2f806e(0x9b)](_0x1065be['body'][_0x2f806e(0xe5)])[_0x2f806e(0xee)](_0x4da87d=>{const _0x119d42=_0x2f806e;this[_0x119d42(0xde)][_0x119d42(0x97)](_0x4da87d);}),_0x4a082f;}[_0x42d6c8(0xb9)](_0x200390){const _0x3284ff=_0x42d6c8;return{'id':_0x200390['id'],'threadId':_0x200390['threadId'],'ref':_0x200390[_0x3284ff(0xcd)]};}};f=Q([_(0x0,_0x472303(_0x4e8dcc)),_(0x1,_0x472303(_0x7fb736)),_(0x2,_0x472303(_0x251384)),_(0x3,_0x472303(_0x467098))],f);var re=Object[_0x42d6c8(0xe8)],te=(_0x111186,_0x1b9f6f,_0xac75f1,_0x178135)=>{const _0x48d77d=_0x42d6c8;for(var _0x4286ed=_0x178135>0x1?void 0x0:_0x178135?re(_0x1b9f6f,_0xac75f1):_0x1b9f6f,_0x204af2=_0x111186[_0x48d77d(0xb0)]-0x1,_0x59ece1;_0x204af2>=0x0;_0x204af2--)(_0x59ece1=_0x111186[_0x204af2])&&(_0x4286ed=_0x59ece1(_0x4286ed)||_0x4286ed);return _0x4286ed;},N=(_0x5d9210,_0x4eaad4)=>(_0x51a7ce,_0x3d2b17)=>_0x4eaad4(_0x51a7ce,_0x3d2b17,_0x5d9210);let g=class extends _0x526737{constructor(_0x319975,_0x2ac535){const _0x513020=_0x42d6c8;super(),this[_0x513020(0x9e)]=_0x319975,this['_threadCommentDataSource']=_0x2ac535,this['_initDataSource']();}[_0x42d6c8(0xc3)](){const _0x3d2882=_0x42d6c8;this[_0x3d2882(0x9e)][_0x3d2882(0x93)]=this[_0x3d2882(0x9d)],this[_0x3d2882(0x9e)][_0x3d2882(0x9c)]=!0x1;}};g=te([N(0x0,_0x3b16b7),N(0x1,_0x472303(f))],g);var se=Object[_0x42d6c8(0xa9)],oe=Object[_0x42d6c8(0xe8)],ne=(_0x39326c,_0xb65e20,_0x2c5ee5)=>_0xb65e20 in _0x39326c?se(_0x39326c,_0xb65e20,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2c5ee5}):_0x39326c[_0xb65e20]=_0x2c5ee5,ie=(_0x493334,_0x92e46,_0x3e7e74,_0x3779cc)=>{for(var _0x58097b=_0x3779cc>0x1?void 0x0:_0x3779cc?oe(_0x92e46,_0x3e7e74):_0x92e46,_0x3aafc8=_0x493334['length']-0x1,_0x4d0bf8;_0x3aafc8>=0x0;_0x3aafc8--)(_0x4d0bf8=_0x493334[_0x3aafc8])&&(_0x58097b=_0x4d0bf8(_0x58097b)||_0x58097b);return _0x58097b;},w=(_0x11bac2,_0x195d4d)=>(_0x89604c,_0x3e03a4)=>_0x195d4d(_0x89604c,_0x3e03a4,_0x11bac2),$=(_0x59a620,_0x1643aa,_0x524809)=>ne(_0x59a620,typeof _0x1643aa!=_0x42d6c8(0xa2)?_0x1643aa+'':_0x1643aa,_0x524809);let b=class extends _0x5837c0{constructor(_0x18da39=M,_0x44a702,_0x1f3594){const _0x41a741=_0x42d6c8;super(),this[_0x41a741(0xda)]=_0x18da39,this[_0x41a741(0x89)]=_0x44a702,this[_0x41a741(0xd1)]=_0x1f3594;const {..._0xe4006}=_0x1d5c2a({},M,this['_config']);this[_0x41a741(0xd1)][_0x41a741(0xdb)](z,_0xe4006);}[_0x42d6c8(0xe9)](){[[f],[g],[S]]['forEach'](_0x5cd5a8=>{const _0x189612=_0x349d;this[_0x189612(0x89)][_0x189612(0xad)](_0x5cd5a8);});}[_0x42d6c8(0xb5)](){const _0xe7f9bf=_0x42d6c8;this[_0xe7f9bf(0x89)][_0xe7f9bf(0xb8)](g),this[_0xe7f9bf(0x89)][_0xe7f9bf(0xb8)](S);}};$(b,_0x42d6c8(0x8d),W),$(b,_0x42d6c8(0x91),_0x226e69['UNIVER_UNKNOWN']),b=ie([_0x3e7234(_0x47d75a,_0x46ec77,_0x4f39a6),w(0x1,_0x472303(_0x467098)),w(0x2,_0x566806)],b);export{b as UniverThreadCommentDataSourcePlugin};function _0x4366(){const _0x55655b=['_sessionService','addComment','symbol','parse','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/solved','replyId','comments','50739788tJgUgC','defineProperty','pipe','delete','UNRECOGNIZED','add','getUnit','solved','length','rangeId','_httpService','disposeWithMe','find','onReady','COMMENT','replies','get','saveCommentToSnapshot','/universer-api/user/list','Delete','68WtfpJQ','getComment','10141848KSqjaa','getMemberID','OpenOrReOpen','_commentService','deleteComment','_initDataSource','userId','YYYY/MM/DD\x20HH:mm','Solved','Edit','unitId','4504848YetFXz','parentId','/add','userID','ref','post','error','resolveComment','_configService','9037016ezhWRi','comment','body','updateComment','Solve','commentUpdate$','Unknown','28ZXRtBF','_config','setConfig','324395cfznjS','map','_userService','code','_threadCommentModel','filter','thread-comment-data-source.config','getUser','_init','users','613642ZUVrVr','requireSession','getOwnPropertyDescriptor','onStarting','/universer-api/comment/unit/','10Kraduv','subscribe','user','forEach','/list','rangeType','_injector','customRanges','Add','createTimestamp','pluginName','/edit','format','Reply','type','/reply','dataSource','personId','content','slice','addUser','646854FbaCyG','threadId','2TgaCSm','values','syncUpdateMutationToColla','_threadCommentDataSource','_threadCommentDataSourceService','root'];_0x4366=function(){return _0x55655b;};return _0x4366();}
1
+ const _0x5ce6d6=_0x1597;(function(_0x2e273f,_0x45ce0b){const _0x4abcd9=_0x1597,_0x194beb=_0x2e273f();while(!![]){try{const _0x22d439=parseInt(_0x4abcd9(0x1f8))/0x1+parseInt(_0x4abcd9(0x1d4))/0x2*(-parseInt(_0x4abcd9(0x1e7))/0x3)+parseInt(_0x4abcd9(0x201))/0x4*(parseInt(_0x4abcd9(0x209))/0x5)+parseInt(_0x4abcd9(0x1d9))/0x6*(-parseInt(_0x4abcd9(0x1cf))/0x7)+-parseInt(_0x4abcd9(0x1e2))/0x8*(-parseInt(_0x4abcd9(0x22e))/0x9)+parseInt(_0x4abcd9(0x212))/0xa+parseInt(_0x4abcd9(0x1e4))/0xb*(-parseInt(_0x4abcd9(0x1d1))/0xc);if(_0x22d439===_0x45ce0b)break;else _0x194beb['push'](_0x194beb['shift']());}catch(_0xd76287){_0x194beb['push'](_0x194beb['shift']());}}}(_0x188f,0xebd49));import{CommentService as _0xba2742,CollaborationSessionService as _0xfa68d,UniverCollaborationClientPlugin as _0x554242}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x12a870}from'@univerjs-pro/license';import{dayjs as _0x1e305e,UserManagerService as _0xd8758c,Inject as _0x59ab9f,Injector as _0x10ffc5,Disposable as _0x1f4696,CustomRangeType as _0x4a1339,UniverInstanceType as _0x563e5b,DependentOn as _0x24198d,IConfigService as _0x143756,Plugin as _0x44f14f,merge as _0x842076}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x310ccb}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x40f162,IThreadCommentDataSourceService as _0x173173}from'@univerjs/thread-comment';import{bufferTime as _0x121ead}from'rxjs';import{HTTPService as _0x1c0427}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5a0705=>(_0x5a0705[_0x5a0705['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x5a0705[_0x5a0705['Solved']=0x1]=_0x5ce6d6(0x1f4),_0x5a0705[_0x5a0705[_0x5ce6d6(0x20c)]=-0x1]='UNRECOGNIZED',_0x5a0705))(I||{}),v=(_0x57ac5c=>(_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x1df)]=0x0]=_0x5ce6d6(0x1df),_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x20f)]=0x1]='Add',_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x21e)]=0x2]='Reply',_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x1f5)]=0x3]='Edit',_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x1d6)]=0x4]=_0x5ce6d6(0x1d6),_0x57ac5c[_0x57ac5c['Solve']=0x5]=_0x5ce6d6(0x214),_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x20c)]=-0x1]=_0x5ce6d6(0x20c),_0x57ac5c))(v||{});const D=_0x17ebd0=>_0x1e305e(new Date(+_0x17ebd0))[_0x5ce6d6(0x1cb)](_0x5ce6d6(0x1fc)),B=async(_0x33b4e9,_0x299153)=>{const _0x3fa37b=_0x5ce6d6,_0x5e2f94=_0x33b4e9[_0x3fa37b(0x223)](_0xd8758c),_0x4df365=_0x33b4e9[_0x3fa37b(0x223)](_0x1c0427);_0x299153[_0x3fa37b(0x1ce)](_0x572127=>{const _0x551729=_0x3fa37b;_0x5e2f94[_0x551729(0x21d)](_0x572127)&&_0x299153[_0x551729(0x1f7)](_0x572127);}),_0x299153[_0x3fa37b(0x1cc)]&&(await _0x4df365[_0x3fa37b(0x223)](_0x3fa37b(0x1e5),{'params':{'userIDs':[..._0x299153]}}))['body'][_0x3fa37b(0x204)][_0x3fa37b(0x1ce)](_0x3e55c7=>{const _0x83124d=_0x3fa37b;_0x3e55c7&&_0x5e2f94[_0x83124d(0x1ed)](_0x3e55c7);});};function _0x1597(_0x172810,_0x5a72d4){const _0x188fc8=_0x188f();return _0x1597=function(_0x15970e,_0x163375){_0x15970e=_0x15970e-0x1c9;let _0x585507=_0x188fc8[_0x15970e];return _0x585507;},_0x1597(_0x172810,_0x5a72d4);}function _0x188f(){const _0x4a5a23=['Delete','personId','onStarting','30mPToDC','unitId','resolved','requireSession','stringify','getMemberID','Unknown','pipe','root','8ibGjNr','userID','1672ociPiT','/universer-api/user/list','rangeType','201SUmZnQ','values','_commentService','reply','deleteComment','_threadCommentDataSourceService','addUser','symbol','/delete','_threadCommentModel','getCurrentUser','_configService','code','Solved','Edit','getUnit','delete','101731RdPckX','thread-comment-data-source.config','_httpService','post','YYYY/MM/DD\x20HH:mm','content','map','_initUserSync','parse','56JGoHxW','rangeId','_threadCommentDataSource','users','add','_init','/edit','replyId','661865RAfyzB','payload','_injector','UNRECOGNIZED','userId','onReady','Add','COMMENT','resolveComment','12805250aXJCaY','_initDataSource','Solve','/add','find','_userService','subscribe','solved','type','createTimestamp','customRanges','getUser','Reply','updateComment','ref','user','commentUpdate$','get','comments','disposeWithMe','body','/list','/universer-api/comment/unit/','OpenOrReOpen','threadId','addComment','replies','error','232209socOrE','slice','length','listComments','/solved','format','size','_sessionService','forEach','1276723mDqbyE','parentId','41556vmdDap','getOwnPropertyDescriptor','filter','25582ixdgQe','comment'];_0x188f=function(){return _0x4a5a23;};return _0x188f();}var K=Object[_0x5ce6d6(0x1d2)],V=(_0xab3062,_0x5ab8a6,_0x3ba0ef,_0x486938)=>{const _0x2d552a=_0x5ce6d6;for(var _0x366c17=_0x486938>0x1?void 0x0:_0x486938?K(_0x5ab8a6,_0x3ba0ef):_0x5ab8a6,_0x2a83ae=_0xab3062[_0x2d552a(0x230)]-0x1,_0x5c99b1;_0x2a83ae>=0x0;_0x2a83ae--)(_0x5c99b1=_0xab3062[_0x2a83ae])&&(_0x366c17=_0x5c99b1(_0x366c17)||_0x366c17);return _0x366c17;},p=(_0xf602d,_0x41dd73)=>(_0x108466,_0x30866f)=>_0x41dd73(_0x108466,_0x30866f,_0xf602d);let S=class extends _0x1f4696{constructor(_0x4eaa14,_0x1c29b0,_0x8dd5fa,_0x8e33be){const _0x1ff891=_0x5ce6d6;super(),this[_0x1ff891(0x1e9)]=_0x4eaa14,this[_0x1ff891(0x1f0)]=_0x1c29b0,this[_0x1ff891(0x217)]=_0x8dd5fa,this[_0x1ff891(0x20b)]=_0x8e33be,this[_0x1ff891(0x206)](),this[_0x1ff891(0x1ff)]();}['_initUserSync'](){const _0xe619d7=_0x5ce6d6;this[_0xe619d7(0x225)](this[_0xe619d7(0x1f0)][_0xe619d7(0x222)][_0xe619d7(0x1e0)](_0x121ead(0x10))[_0xe619d7(0x218)](_0x39986d=>{const _0x3879a7=new Set();_0x39986d['forEach'](_0x40c67c=>{const _0x201624=_0x1597;switch(_0x40c67c[_0x201624(0x21a)]){case _0x201624(0x205):{const _0x1b823e=_0x40c67c[_0x201624(0x20a)][_0x201624(0x1d7)];_0x3879a7['add'](_0x1b823e);break;}}}),B(this['_injector'],_0x3879a7);}));}[_0x5ce6d6(0x206)](){const _0x250aac=_0x5ce6d6;this[_0x250aac(0x225)](this['_commentService'][_0x250aac(0x222)][_0x250aac(0x218)](async _0x51e0d2=>{const _0x146159=_0x250aac;var _0x48265d,_0x3d3959,_0x4e8934,_0x3f9895;const _0x52297d=(_0x48265d=this[_0x146159(0x1f0)][_0x146159(0x1f6)](_0x51e0d2[_0x146159(0x1da)])[_0x146159(0x216)](_0x35a6d4=>_0x35a6d4[_0x146159(0x22a)]===_0x51e0d2[_0x146159(0x22a)]))==null?void 0x0:_0x48265d[_0x146159(0x1e1)];if(!_0x52297d)return;const {unitId:_0x5a96e6,subUnitId:_0x191a44}=_0x52297d;switch(_0x51e0d2['user']&&this['_userService'][_0x146159(0x1ed)](_0x51e0d2['user']),_0x51e0d2[_0x146159(0x21a)]){case v[_0x146159(0x20f)]:break;case v['Reply']:{this[_0x146159(0x1f0)][_0x146159(0x22b)](_0x5a96e6,_0x191a44,{'unitId':_0x5a96e6,'subUnitId':_0x191a44,'ref':'','id':_0x51e0d2[_0x146159(0x208)],'dT':D(+_0x51e0d2[_0x146159(0x21b)]),'threadId':_0x51e0d2[_0x146159(0x22a)],'personId':(_0x4e8934=(_0x3d3959=_0x51e0d2[_0x146159(0x221)])==null?void 0x0:_0x3d3959[_0x146159(0x1e3)])!=null?_0x4e8934:_0x51e0d2[_0x146159(0x20d)],'text':JSON[_0x146159(0x200)](_0x51e0d2[_0x146159(0x1fd)]),'parentId':_0x52297d['id']});break;}case v[_0x146159(0x1d6)]:{const _0x5bb6fe=this[_0x146159(0x1f0)]['getComment'](_0x5a96e6,_0x191a44,_0x51e0d2['replyId']);_0x5bb6fe&&_0x5bb6fe[_0x146159(0x1d0)]&&this[_0x146159(0x1f0)][_0x146159(0x1eb)](_0x5a96e6,_0x191a44,_0x51e0d2[_0x146159(0x208)]);break;}case v[_0x146159(0x1f5)]:{this['_threadCommentModel'][_0x146159(0x21f)](_0x5a96e6,_0x191a44,{'commentId':_0x51e0d2[_0x146159(0x208)],'text':JSON[_0x146159(0x200)](_0x51e0d2['content'])});break;}case v[_0x146159(0x214)]:{const _0xa2fd2a=(_0x3f9895=this[_0x146159(0x1f0)]['getUnit'](_0x51e0d2[_0x146159(0x1da)])[_0x146159(0x216)](_0x5cee72=>_0x5cee72[_0x146159(0x22a)]===_0x51e0d2[_0x146159(0x22a)]))==null?void 0x0:_0x3f9895[_0x146159(0x1e1)];_0xa2fd2a&&this['_threadCommentModel'][_0x146159(0x211)](_0x5a96e6,_0x191a44,_0xa2fd2a['id'],_0x51e0d2[_0x146159(0x219)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x59ab9f(_0xba2742)),p(0x1,_0x59ab9f(_0x40f162)),p(0x2,_0x59ab9f(_0xd8758c)),p(0x3,_0x59ab9f(_0x10ffc5))],S);const z=_0x5ce6d6(0x1f9),M={};var k=Object[_0x5ce6d6(0x1d2)],Q=(_0x3f239e,_0x435dab,_0x6f681b,_0x1c5651)=>{for(var _0x1d8197=_0x1c5651>0x1?void 0x0:_0x1c5651?k(_0x435dab,_0x6f681b):_0x435dab,_0x2a028b=_0x3f239e['length']-0x1,_0x382de1;_0x2a028b>=0x0;_0x2a028b--)(_0x382de1=_0x3f239e[_0x2a028b])&&(_0x1d8197=_0x382de1(_0x1d8197)||_0x1d8197);return _0x1d8197;},_=(_0x303e88,_0x32b15e)=>(_0x4939a1,_0x5edf7e)=>_0x32b15e(_0x4939a1,_0x5edf7e,_0x303e88);function X(_0x1d2313,_0xccca9f){const _0x197498=_0x5ce6d6,_0x161e8e=_0x1d2313[_0x197498(0x22c)][0x0];return{..._0xccca9f,'id':_0x161e8e[_0x197498(0x208)],'resolved':_0x1d2313[_0x197498(0x219)]===0x1,'dT':D(_0x161e8e[_0x197498(0x21b)]),'personId':_0x161e8e[_0x197498(0x20d)],'threadId':_0x161e8e[_0x197498(0x22a)]};}function ee(_0x4ff60d,_0x46620e,_0x18e14c){const _0x415989=_0x5ce6d6;var _0x155a32,_0x414cbd;if(((_0x414cbd=(_0x155a32=_0x4ff60d==null?void 0x0:_0x4ff60d[_0x415989(0x22c)])==null?void 0x0:_0x155a32[_0x415989(0x230)])!=null?_0x414cbd:0x0)>0x0){const _0x5e098d=(_0x30813b,_0x5f084d)=>({'id':_0x30813b[_0x415989(0x208)],'threadId':_0x30813b[_0x415989(0x22a)],'dT':D(_0x30813b[_0x415989(0x21b)]),'personId':_0x30813b[_0x415989(0x20d)],'resolved':_0x4ff60d[_0x415989(0x219)]===I[_0x415989(0x1f4)],'unitId':_0x46620e,'subUnitId':_0x18e14c,'text':JSON[_0x415989(0x200)](_0x30813b[_0x415989(0x1fd)]),'parentId':_0x5f084d}),_0x280fc0=_0x5e098d(_0x4ff60d[_0x415989(0x22c)][0x0]);return{..._0x280fc0,'children':_0x4ff60d[_0x415989(0x22c)][_0x415989(0x22f)](0x1)[_0x415989(0x1fe)](_0x351487=>_0x5e098d(_0x351487,_0x280fc0['id']))};}return null;}let f=class{constructor(_0x3c1497,_0x4b0308,_0x22e2d3,_0x47136c){const _0x2482a4=_0x5ce6d6;this['_httpService']=_0x3c1497,this[_0x2482a4(0x217)]=_0x4b0308,this['_sessionService']=_0x22e2d3,this[_0x2482a4(0x20b)]=_0x47136c;}async[_0x5ce6d6(0x22b)](_0x458b20){const _0x555017=_0x5ce6d6;var _0x1352ba,_0x42d966;const {parentId:_0x59b18c,unitId:_0x4cd18a,text:_0x49b408,threadId:_0x236e79}=_0x458b20,_0xf3bfe0=(_0x42d966=(_0x1352ba=_0x49b408[_0x555017(0x21c)])==null?void 0x0:_0x1352ba[_0x555017(0x1d3)](_0x151e2b=>_0x151e2b['rangeType']===_0x4a1339[_0x555017(0x210)])[_0x555017(0x1fe)](_0x567ac3=>_0x567ac3['rangeId']))!=null?_0x42d966:[],_0x37cd69=JSON[_0x555017(0x1dd)](_0x49b408),_0xe61618=(await this['_sessionService'][_0x555017(0x1dc)](_0x4cd18a))['getMemberID']();if(_0x59b18c){const _0x48b68f={'memberId':_0xe61618,'unitId':_0x4cd18a,'content':_0x37cd69,'mention':_0xf3bfe0,'threadId':_0x236e79},_0x332c07=(await this[_0x555017(0x1fa)][_0x555017(0x1fb)](_0x555017(0x228)+_0x4cd18a+'/reply',{'body':_0x48b68f}))[_0x555017(0x226)][_0x555017(0x1ea)];return{..._0x458b20,'id':_0x332c07[_0x555017(0x208)],'dT':_0x1e305e(+_0x332c07[_0x555017(0x21b)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x332c07[_0x555017(0x20d)]};}else{const _0x95a326={'memberId':_0xe61618,'unitId':_0x4cd18a,'content':_0x37cd69,'mention':_0xf3bfe0},_0x70eb65=await this['_httpService']['post'](_0x555017(0x228)+_0x4cd18a+_0x555017(0x215),{'body':_0x95a326});return X(_0x70eb65[_0x555017(0x226)][_0x555017(0x1d5)],_0x458b20);}}async[_0x5ce6d6(0x21f)](_0x4bd245){const _0x51ffda=_0x5ce6d6;var _0x5ae242,_0x22018a;const {text:_0x61b9bf,unitId:_0x2c71de}=_0x4bd245,_0x5ec4a5=(_0x22018a=(_0x5ae242=_0x61b9bf[_0x51ffda(0x21c)])==null?void 0x0:_0x5ae242[_0x51ffda(0x1d3)](_0x25e8bb=>_0x25e8bb[_0x51ffda(0x1e6)]===_0x4a1339[_0x51ffda(0x210)])[_0x51ffda(0x1fe)](_0xc415cf=>_0xc415cf[_0x51ffda(0x202)]))!=null?_0x22018a:[],_0x1f9643=JSON['stringify'](_0x61b9bf),_0x2ea379=_0x4bd245['threadId'],_0x4a46ba=_0x4bd245['id'],_0x5d3db7={'memberId':(await this[_0x51ffda(0x1cd)][_0x51ffda(0x1dc)](_0x2c71de))['getMemberID'](),'unitId':_0x2c71de,'threadId':_0x2ea379,'mention':_0x5ec4a5,'content':_0x1f9643,'replyId':_0x4a46ba},_0x3926d6=await this[_0x51ffda(0x1fa)][_0x51ffda(0x1fb)](_0x51ffda(0x228)+_0x2c71de+_0x51ffda(0x207),{'body':_0x5d3db7});return!_0x3926d6['body'][_0x51ffda(0x22d)]||_0x3926d6[_0x51ffda(0x226)][_0x51ffda(0x22d)][_0x51ffda(0x1f3)]===0x1;}async['resolveComment'](_0x1a7b5c){const _0x931ba7=_0x5ce6d6,{unitId:_0x46f6d1}=_0x1a7b5c,_0x38ec30=_0x1a7b5c['threadId'],_0x52f6d7={'memberId':this[_0x931ba7(0x217)][_0x931ba7(0x1f1)]()[_0x931ba7(0x1e3)],'unitId':_0x46f6d1,'threadId':_0x38ec30,'solved':_0x1a7b5c[_0x931ba7(0x1db)]?I[_0x931ba7(0x1f4)]:I[_0x931ba7(0x229)]},_0x57c4ed=await this[_0x931ba7(0x1fa)][_0x931ba7(0x1fb)](_0x931ba7(0x228)+_0x46f6d1+_0x931ba7(0x1ca),{'body':_0x52f6d7});return!_0x57c4ed[_0x931ba7(0x226)][_0x931ba7(0x22d)]||_0x57c4ed[_0x931ba7(0x226)][_0x931ba7(0x22d)][_0x931ba7(0x1f3)]===0x1;}async[_0x5ce6d6(0x1eb)](_0x448ed6,_0x5696ce,_0x2cdda3,_0x59d13a){const _0x5689de=_0x5ce6d6,_0x3d6456={'memberId':(await this[_0x5689de(0x1cd)]['requireSession'](_0x448ed6))[_0x5689de(0x1de)](),'threadId':_0x2cdda3,'replyId':_0x59d13a,'unitId':_0x448ed6},_0x40a87a=await this[_0x5689de(0x1fa)][_0x5689de(0x1fb)](_0x5689de(0x228)+_0x448ed6+_0x5689de(0x1ef),{'body':_0x3d6456});return!_0x40a87a[_0x5689de(0x226)]['error']||_0x40a87a[_0x5689de(0x226)][_0x5689de(0x22d)][_0x5689de(0x1f3)]===0x1;}async[_0x5ce6d6(0x1c9)](_0x1d0da3,_0x59b865,_0x2e187f){const _0x30c1f0=_0x5ce6d6,_0x3f21b5={'unitId':_0x1d0da3,'threadId':_0x2e187f},_0x3b27d9=await this[_0x30c1f0(0x1fa)]['post'](_0x30c1f0(0x228)+_0x1d0da3+_0x30c1f0(0x227),{'body':_0x3f21b5}),_0x4dc3bf=_0x2e187f[_0x30c1f0(0x1fe)](_0xfa5e04=>ee(_0x3b27d9['body'][_0x30c1f0(0x224)][_0xfa5e04],_0x1d0da3,_0x59b865))[_0x30c1f0(0x1d3)](Boolean);return Object[_0x30c1f0(0x1e8)](_0x3b27d9[_0x30c1f0(0x226)][_0x30c1f0(0x204)])[_0x30c1f0(0x1ce)](_0x3667f4=>{const _0x3b7980=_0x30c1f0;this[_0x3b7980(0x217)][_0x3b7980(0x1ed)](_0x3667f4);}),_0x4dc3bf;}['saveCommentToSnapshot'](_0x465833){const _0x2abb6e=_0x5ce6d6;return{'id':_0x465833['id'],'threadId':_0x465833['threadId'],'ref':_0x465833[_0x2abb6e(0x220)]};}};f=Q([_(0x0,_0x59ab9f(_0x1c0427)),_(0x1,_0x59ab9f(_0xd8758c)),_(0x2,_0x59ab9f(_0xfa68d)),_(0x3,_0x59ab9f(_0x10ffc5))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x35d5e4,_0x5bb460,_0x1a8912,_0x31fd9f)=>{const _0x24fbd8=_0x5ce6d6;for(var _0x474c3e=_0x31fd9f>0x1?void 0x0:_0x31fd9f?re(_0x5bb460,_0x1a8912):_0x5bb460,_0x42d8c9=_0x35d5e4[_0x24fbd8(0x230)]-0x1,_0x172e81;_0x42d8c9>=0x0;_0x42d8c9--)(_0x172e81=_0x35d5e4[_0x42d8c9])&&(_0x474c3e=_0x172e81(_0x474c3e)||_0x474c3e);return _0x474c3e;},N=(_0x17080e,_0x45ed40)=>(_0x1d4dc1,_0x10515e)=>_0x45ed40(_0x1d4dc1,_0x10515e,_0x17080e);let g=class extends _0x1f4696{constructor(_0x33b52a,_0x481875){const _0x4cb860=_0x5ce6d6;super(),this[_0x4cb860(0x1ec)]=_0x33b52a,this[_0x4cb860(0x203)]=_0x481875,this['_initDataSource']();}[_0x5ce6d6(0x213)](){const _0x655a87=_0x5ce6d6;this[_0x655a87(0x1ec)]['dataSource']=this['_threadCommentDataSource'],this[_0x655a87(0x1ec)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x173173),N(0x1,_0x59ab9f(f))],g);var se=Object['defineProperty'],oe=Object[_0x5ce6d6(0x1d2)],ne=(_0x52b464,_0xe3765,_0x16823e)=>_0xe3765 in _0x52b464?se(_0x52b464,_0xe3765,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x16823e}):_0x52b464[_0xe3765]=_0x16823e,ie=(_0x4e4a7b,_0x2b3292,_0x279b7e,_0x17da8b)=>{const _0x5033c9=_0x5ce6d6;for(var _0x462096=_0x17da8b>0x1?void 0x0:_0x17da8b?oe(_0x2b3292,_0x279b7e):_0x2b3292,_0x13038f=_0x4e4a7b[_0x5033c9(0x230)]-0x1,_0x210846;_0x13038f>=0x0;_0x13038f--)(_0x210846=_0x4e4a7b[_0x13038f])&&(_0x462096=_0x210846(_0x462096)||_0x462096);return _0x462096;},w=(_0x7dbc30,_0xe65d37)=>(_0x3c77ad,_0x4d0406)=>_0xe65d37(_0x3c77ad,_0x4d0406,_0x7dbc30),$=(_0x148cf4,_0x593ec9,_0x2f25ff)=>ne(_0x148cf4,typeof _0x593ec9!=_0x5ce6d6(0x1ee)?_0x593ec9+'':_0x593ec9,_0x2f25ff);let b=class extends _0x44f14f{constructor(_0x37c2fb=M,_0x3f9375,_0x4ee275){const _0x11c783=_0x5ce6d6;super(),this['_config']=_0x37c2fb,this['_injector']=_0x3f9375,this['_configService']=_0x4ee275;const {..._0x245f63}=_0x842076({},M,this['_config']);this[_0x11c783(0x1f2)]['setConfig'](z,_0x245f63);}[_0x5ce6d6(0x1d8)](){const _0x20db4d=_0x5ce6d6;[[f],[g],[S]][_0x20db4d(0x1ce)](_0x2a3874=>{const _0x6781a9=_0x20db4d;this[_0x6781a9(0x20b)][_0x6781a9(0x205)](_0x2a3874);});}[_0x5ce6d6(0x20e)](){const _0x3fd414=_0x5ce6d6;this[_0x3fd414(0x20b)][_0x3fd414(0x223)](g),this['_injector']['get'](S);}};$(b,'pluginName',W),$(b,'type',_0x563e5b['UNIVER_UNKNOWN']),b=ie([_0x24198d(_0x310ccb,_0x554242,_0x12a870),w(0x1,_0x59ab9f(_0x10ffc5)),w(0x2,_0x143756)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x42d6c8=_0x349d;(function(_0x3183ad,_0x136b00){const _0x110aed=_0x349d,_0x59da92=_0x3183ad();while(!![]){try{const _0x328e0b=-parseInt(_0x110aed(0x9a))/0x1*(parseInt(_0x110aed(0xe6))/0x2)+-parseInt(_0x110aed(0xc9))/0x3+parseInt(_0x110aed(0xbc))/0x4*(-parseInt(_0x110aed(0xdc))/0x5)+-parseInt(_0x110aed(0x98))/0x6*(parseInt(_0x110aed(0xd9))/0x7)+-parseInt(_0x110aed(0xd2))/0x8+parseInt(_0x110aed(0xbe))/0x9+-parseInt(_0x110aed(0xeb))/0xa*(-parseInt(_0x110aed(0xa8))/0xb);if(_0x328e0b===_0x136b00)break;else _0x59da92['push'](_0x59da92['shift']());}catch(_0x1b4338){_0x59da92['push'](_0x59da92['shift']());}}}(_0x4366,0xea804));import{CommentService as _0x533446,CollaborationSessionService as _0x251384,UniverCollaborationClientPlugin as _0x46ec77}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4f39a6}from'@univerjs-pro/license';import{dayjs as _0xfb9cd8,UserManagerService as _0x7fb736,Inject as _0x472303,Injector as _0x467098,Disposable as _0x526737,CustomRangeType as _0x2675b6,UniverInstanceType as _0x226e69,DependentOn as _0x3e7234,IConfigService as _0x566806,Plugin as _0x5837c0,merge as _0x1d5c2a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x47d75a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3f067b,IThreadCommentDataSourceService as _0x3b16b7}from'@univerjs/thread-comment';import{bufferTime as _0xe62590}from'rxjs';import{HTTPService as _0x4e8dcc}from'@univerjs/network';const W=_0x42d6c8(0xa4);var I=(_0x239ba0=>(_0x239ba0[_0x239ba0[_0x42d6c8(0xc0)]=0x0]=_0x42d6c8(0xc0),_0x239ba0[_0x239ba0['Solved']=0x1]=_0x42d6c8(0xc6),_0x239ba0[_0x239ba0['UNRECOGNIZED']=-0x1]=_0x42d6c8(0xac),_0x239ba0))(I||{}),v=(_0x4915e5=>(_0x4915e5[_0x4915e5[_0x42d6c8(0xd8)]=0x0]='Unknown',_0x4915e5[_0x4915e5['Add']=0x1]=_0x42d6c8(0x8b),_0x4915e5[_0x4915e5[_0x42d6c8(0x90)]=0x2]=_0x42d6c8(0x90),_0x4915e5[_0x4915e5[_0x42d6c8(0xc7)]=0x3]='Edit',_0x4915e5[_0x4915e5['Delete']=0x4]=_0x42d6c8(0xbb),_0x4915e5[_0x4915e5['Solve']=0x5]=_0x42d6c8(0xd6),_0x4915e5[_0x4915e5[_0x42d6c8(0xac)]=-0x1]=_0x42d6c8(0xac),_0x4915e5))(v||{});const D=_0x41e408=>_0xfb9cd8(new Date(+_0x41e408))[_0x42d6c8(0x8f)](_0x42d6c8(0xc5)),B=async(_0x263d31,_0x2171fd)=>{const _0x5b35df=_0x42d6c8,_0x576e04=_0x263d31['get'](_0x7fb736),_0x346964=_0x263d31[_0x5b35df(0xb8)](_0x4e8dcc);_0x2171fd[_0x5b35df(0xee)](_0x2f3815=>{const _0x31c53a=_0x5b35df;_0x576e04[_0x31c53a(0xe3)](_0x2f3815)&&_0x2171fd[_0x31c53a(0xab)](_0x2f3815);}),_0x2171fd['size']&&(await _0x346964[_0x5b35df(0xb8)](_0x5b35df(0xba),{'params':{'userIDs':[..._0x2171fd]}}))[_0x5b35df(0xd4)][_0x5b35df(0xe5)]['forEach'](_0x2789e4=>{_0x2789e4&&_0x576e04['addUser'](_0x2789e4);});};var K=Object[_0x42d6c8(0xe8)],V=(_0xf1da94,_0x19022d,_0x56b4c0,_0x128ade)=>{for(var _0x469081=_0x128ade>0x1?void 0x0:_0x128ade?K(_0x19022d,_0x56b4c0):_0x19022d,_0x214c63=_0xf1da94['length']-0x1,_0x547c4b;_0x214c63>=0x0;_0x214c63--)(_0x547c4b=_0xf1da94[_0x214c63])&&(_0x469081=_0x547c4b(_0x469081)||_0x469081);return _0x469081;},p=(_0x1e1f8b,_0x38f5c7)=>(_0x32e4d6,_0x125888)=>_0x38f5c7(_0x32e4d6,_0x125888,_0x1e1f8b);function _0x349d(_0x5da02b,_0x358b03){const _0x4366a2=_0x4366();return _0x349d=function(_0x349dcc,_0x290545){_0x349dcc=_0x349dcc-0x88;let _0x1c618e=_0x4366a2[_0x349dcc];return _0x1c618e;},_0x349d(_0x5da02b,_0x358b03);}let S=class extends _0x526737{constructor(_0xf2189a,_0x5e08d8,_0x5e723a,_0x34b380){const _0x1414fa=_0x42d6c8;super(),this[_0x1414fa(0xc1)]=_0xf2189a,this[_0x1414fa(0xe0)]=_0x5e08d8,this[_0x1414fa(0xde)]=_0x5e723a,this[_0x1414fa(0x89)]=_0x34b380,this[_0x1414fa(0xe4)](),this['_initUserSync']();}['_initUserSync'](){const _0x4ddede=_0x42d6c8;this['disposeWithMe'](this[_0x4ddede(0xe0)][_0x4ddede(0xd7)][_0x4ddede(0xaa)](_0xe62590(0x10))[_0x4ddede(0xec)](_0x55ed07=>{const _0x3ea18e=_0x4ddede,_0x16ad70=new Set();_0x55ed07[_0x3ea18e(0xee)](_0x51f4de=>{const _0x2eeca3=_0x3ea18e;switch(_0x51f4de[_0x2eeca3(0x91)]){case'add':{const _0x2ec707=_0x51f4de['payload'][_0x2eeca3(0x94)];_0x16ad70['add'](_0x2ec707);break;}}}),B(this[_0x3ea18e(0x89)],_0x16ad70);}));}[_0x42d6c8(0xe4)](){const _0x1337a8=_0x42d6c8;this[_0x1337a8(0xb3)](this[_0x1337a8(0xc1)]['commentUpdate$']['subscribe'](async _0x5ae4e5=>{const _0x40ad59=_0x1337a8;var _0x2648fb,_0x335a3e,_0x67ad07,_0x115db0;const _0x11e167=(_0x2648fb=this['_threadCommentModel']['getUnit'](_0x5ae4e5[_0x40ad59(0xc8)])[_0x40ad59(0xb4)](_0x1b3e96=>_0x1b3e96[_0x40ad59(0x99)]===_0x5ae4e5[_0x40ad59(0x99)]))==null?void 0x0:_0x2648fb[_0x40ad59(0x9f)];if(!_0x11e167)return;const {unitId:_0x1c68d1,subUnitId:_0x4894c3}=_0x11e167;switch(_0x5ae4e5[_0x40ad59(0xed)]&&this[_0x40ad59(0xde)]['addUser'](_0x5ae4e5[_0x40ad59(0xed)]),_0x5ae4e5[_0x40ad59(0x91)]){case v[_0x40ad59(0x8b)]:break;case v['Reply']:{this[_0x40ad59(0xe0)]['addComment'](_0x1c68d1,_0x4894c3,{'unitId':_0x1c68d1,'subUnitId':_0x4894c3,'ref':'','id':_0x5ae4e5[_0x40ad59(0xa6)],'dT':D(+_0x5ae4e5[_0x40ad59(0x8c)]),'threadId':_0x5ae4e5[_0x40ad59(0x99)],'personId':(_0x67ad07=(_0x335a3e=_0x5ae4e5[_0x40ad59(0xed)])==null?void 0x0:_0x335a3e['userID'])!=null?_0x67ad07:_0x5ae4e5[_0x40ad59(0xc4)],'text':JSON[_0x40ad59(0xa3)](_0x5ae4e5[_0x40ad59(0x95)]),'parentId':_0x11e167['id']});break;}case v['Delete']:{const _0x2c50e7=this[_0x40ad59(0xe0)][_0x40ad59(0xbd)](_0x1c68d1,_0x4894c3,_0x5ae4e5[_0x40ad59(0xa6)]);_0x2c50e7&&_0x2c50e7[_0x40ad59(0xca)]&&this[_0x40ad59(0xe0)][_0x40ad59(0xc2)](_0x1c68d1,_0x4894c3,_0x5ae4e5[_0x40ad59(0xa6)]);break;}case v[_0x40ad59(0xc7)]:{this[_0x40ad59(0xe0)][_0x40ad59(0xd5)](_0x1c68d1,_0x4894c3,{'commentId':_0x5ae4e5['replyId'],'text':JSON['parse'](_0x5ae4e5[_0x40ad59(0x95)])});break;}case v[_0x40ad59(0xd6)]:{const _0x4e32aa=(_0x115db0=this['_threadCommentModel'][_0x40ad59(0xae)](_0x5ae4e5[_0x40ad59(0xc8)])['find'](_0x525d31=>_0x525d31[_0x40ad59(0x99)]===_0x5ae4e5['threadId']))==null?void 0x0:_0x115db0[_0x40ad59(0x9f)];_0x4e32aa&&this[_0x40ad59(0xe0)][_0x40ad59(0xd0)](_0x1c68d1,_0x4894c3,_0x4e32aa['id'],_0x5ae4e5[_0x40ad59(0xaf)]===I[_0x40ad59(0xc6)]);break;}}}));}};S=V([p(0x0,_0x472303(_0x533446)),p(0x1,_0x472303(_0x3f067b)),p(0x2,_0x472303(_0x7fb736)),p(0x3,_0x472303(_0x467098))],S);const z=_0x42d6c8(0xe2),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x3d3472,_0x1a28d1,_0x4c068d,_0x3f4e3c)=>{for(var _0xab116b=_0x3f4e3c>0x1?void 0x0:_0x3f4e3c?k(_0x1a28d1,_0x4c068d):_0x1a28d1,_0x4573f6=_0x3d3472['length']-0x1,_0x59d157;_0x4573f6>=0x0;_0x4573f6--)(_0x59d157=_0x3d3472[_0x4573f6])&&(_0xab116b=_0x59d157(_0xab116b)||_0xab116b);return _0xab116b;},_=(_0x38d7ed,_0x14ea5d)=>(_0x58010f,_0x3efd9d)=>_0x14ea5d(_0x58010f,_0x3efd9d,_0x38d7ed);function X(_0x48c492,_0x4476ac){const _0x2269ca=_0x42d6c8,_0x485343=_0x48c492[_0x2269ca(0xb7)][0x0];return{..._0x4476ac,'id':_0x485343[_0x2269ca(0xa6)],'resolved':_0x48c492[_0x2269ca(0xaf)]===0x1,'dT':D(_0x485343['createTimestamp']),'personId':_0x485343[_0x2269ca(0xc4)],'threadId':_0x485343[_0x2269ca(0x99)]};}function ee(_0x486ad4,_0x4fbd3c,_0x4980df){const _0x2d2d59=_0x42d6c8;var _0x4978a8,_0x1d97cf;if(((_0x1d97cf=(_0x4978a8=_0x486ad4==null?void 0x0:_0x486ad4[_0x2d2d59(0xb7)])==null?void 0x0:_0x4978a8[_0x2d2d59(0xb0)])!=null?_0x1d97cf:0x0)>0x0){const _0xc4beaf=(_0x49dd0e,_0x860956)=>({'id':_0x49dd0e[_0x2d2d59(0xa6)],'threadId':_0x49dd0e[_0x2d2d59(0x99)],'dT':D(_0x49dd0e[_0x2d2d59(0x8c)]),'personId':_0x49dd0e[_0x2d2d59(0xc4)],'resolved':_0x486ad4[_0x2d2d59(0xaf)]===I[_0x2d2d59(0xc6)],'unitId':_0x4fbd3c,'subUnitId':_0x4980df,'text':JSON[_0x2d2d59(0xa3)](_0x49dd0e[_0x2d2d59(0x95)]),'parentId':_0x860956}),_0x374c5d=_0xc4beaf(_0x486ad4[_0x2d2d59(0xb7)][0x0]);return{..._0x374c5d,'children':_0x486ad4[_0x2d2d59(0xb7)][_0x2d2d59(0x96)](0x1)[_0x2d2d59(0xdd)](_0x5e5e5e=>_0xc4beaf(_0x5e5e5e,_0x374c5d['id']))};}return null;}let f=class{constructor(_0x3337,_0x4aec0e,_0x481023,_0x2c33b){const _0x11cb65=_0x42d6c8;this[_0x11cb65(0xb2)]=_0x3337,this[_0x11cb65(0xde)]=_0x4aec0e,this['_sessionService']=_0x481023,this['_injector']=_0x2c33b;}async[_0x42d6c8(0xa1)](_0x444fc8){const _0x43bdf0=_0x42d6c8;var _0x3aa470,_0x52cdbd;const {parentId:_0x32a98c,unitId:_0xd95eab,text:_0x3ccacb,threadId:_0x2d4701}=_0x444fc8,_0x5ce452=(_0x52cdbd=(_0x3aa470=_0x3ccacb['customRanges'])==null?void 0x0:_0x3aa470[_0x43bdf0(0xe1)](_0x118f0c=>_0x118f0c[_0x43bdf0(0x88)]===_0x2675b6[_0x43bdf0(0xb6)])[_0x43bdf0(0xdd)](_0x150134=>_0x150134[_0x43bdf0(0xb1)]))!=null?_0x52cdbd:[],_0x2f9f12=JSON['stringify'](_0x3ccacb),_0x41497a=(await this[_0x43bdf0(0xa0)][_0x43bdf0(0xe7)](_0xd95eab))[_0x43bdf0(0xbf)]();if(_0x32a98c){const _0x2fec15={'memberId':_0x41497a,'unitId':_0xd95eab,'content':_0x2f9f12,'mention':_0x5ce452,'threadId':_0x2d4701},_0x225829=(await this[_0x43bdf0(0xb2)]['post'](_0x43bdf0(0xea)+_0xd95eab+_0x43bdf0(0x92),{'body':_0x2fec15}))[_0x43bdf0(0xd4)]['reply'];return{..._0x444fc8,'id':_0x225829[_0x43bdf0(0xa6)],'dT':_0xfb9cd8(+_0x225829['createTimestamp'])[_0x43bdf0(0x8f)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x225829[_0x43bdf0(0xc4)]};}else{const _0x1f40ec={'memberId':_0x41497a,'unitId':_0xd95eab,'content':_0x2f9f12,'mention':_0x5ce452},_0x5046af=await this[_0x43bdf0(0xb2)][_0x43bdf0(0xce)](_0x43bdf0(0xea)+_0xd95eab+_0x43bdf0(0xcb),{'body':_0x1f40ec});return X(_0x5046af[_0x43bdf0(0xd4)][_0x43bdf0(0xd3)],_0x444fc8);}}async[_0x42d6c8(0xd5)](_0x1ba6d9){const _0xbdac0c=_0x42d6c8;var _0xd379c3,_0x334512;const {text:_0x16deed,unitId:_0x57a241}=_0x1ba6d9,_0x26c9cc=(_0x334512=(_0xd379c3=_0x16deed[_0xbdac0c(0x8a)])==null?void 0x0:_0xd379c3[_0xbdac0c(0xe1)](_0x2b92ac=>_0x2b92ac[_0xbdac0c(0x88)]===_0x2675b6[_0xbdac0c(0xb6)])[_0xbdac0c(0xdd)](_0x1cfd1c=>_0x1cfd1c['rangeId']))!=null?_0x334512:[],_0x84e5ec=JSON['stringify'](_0x16deed),_0x6ce363=_0x1ba6d9[_0xbdac0c(0x99)],_0x57c443=_0x1ba6d9['id'],_0x2f52ae={'memberId':(await this[_0xbdac0c(0xa0)]['requireSession'](_0x57a241))['getMemberID'](),'unitId':_0x57a241,'threadId':_0x6ce363,'mention':_0x26c9cc,'content':_0x84e5ec,'replyId':_0x57c443},_0x4c7335=await this[_0xbdac0c(0xb2)][_0xbdac0c(0xce)](_0xbdac0c(0xea)+_0x57a241+_0xbdac0c(0x8e),{'body':_0x2f52ae});return!_0x4c7335['body'][_0xbdac0c(0xcf)]||_0x4c7335[_0xbdac0c(0xd4)][_0xbdac0c(0xcf)]['code']===0x1;}async[_0x42d6c8(0xd0)](_0x503796){const _0x45d7a1=_0x42d6c8,{unitId:_0x4a0ea9}=_0x503796,_0x59c36f=_0x503796['threadId'],_0x1226bd={'memberId':this[_0x45d7a1(0xde)]['getCurrentUser']()[_0x45d7a1(0xcc)],'unitId':_0x4a0ea9,'threadId':_0x59c36f,'solved':_0x503796['resolved']?I[_0x45d7a1(0xc6)]:I[_0x45d7a1(0xc0)]},_0x122c57=await this[_0x45d7a1(0xb2)][_0x45d7a1(0xce)](_0x45d7a1(0xea)+_0x4a0ea9+_0x45d7a1(0xa5),{'body':_0x1226bd});return!_0x122c57[_0x45d7a1(0xd4)][_0x45d7a1(0xcf)]||_0x122c57['body']['error'][_0x45d7a1(0xdf)]===0x1;}async[_0x42d6c8(0xc2)](_0x4f84b,_0x7943a4,_0x519afe,_0xad7b98){const _0x47fddd=_0x42d6c8,_0x524c3d={'memberId':(await this[_0x47fddd(0xa0)][_0x47fddd(0xe7)](_0x4f84b))[_0x47fddd(0xbf)](),'threadId':_0x519afe,'replyId':_0xad7b98,'unitId':_0x4f84b},_0x27506d=await this['_httpService'][_0x47fddd(0xce)](_0x47fddd(0xea)+_0x4f84b+'/delete',{'body':_0x524c3d});return!_0x27506d[_0x47fddd(0xd4)][_0x47fddd(0xcf)]||_0x27506d['body'][_0x47fddd(0xcf)][_0x47fddd(0xdf)]===0x1;}async['listComments'](_0x17f9eb,_0x1dcda1,_0x56ba25){const _0x2f806e=_0x42d6c8,_0x59dd51={'unitId':_0x17f9eb,'threadId':_0x56ba25},_0x1065be=await this[_0x2f806e(0xb2)][_0x2f806e(0xce)](_0x2f806e(0xea)+_0x17f9eb+_0x2f806e(0xef),{'body':_0x59dd51}),_0x4a082f=_0x56ba25[_0x2f806e(0xdd)](_0x1a51db=>ee(_0x1065be[_0x2f806e(0xd4)][_0x2f806e(0xa7)][_0x1a51db],_0x17f9eb,_0x1dcda1))['filter'](Boolean);return Object[_0x2f806e(0x9b)](_0x1065be['body'][_0x2f806e(0xe5)])[_0x2f806e(0xee)](_0x4da87d=>{const _0x119d42=_0x2f806e;this[_0x119d42(0xde)][_0x119d42(0x97)](_0x4da87d);}),_0x4a082f;}[_0x42d6c8(0xb9)](_0x200390){const _0x3284ff=_0x42d6c8;return{'id':_0x200390['id'],'threadId':_0x200390['threadId'],'ref':_0x200390[_0x3284ff(0xcd)]};}};f=Q([_(0x0,_0x472303(_0x4e8dcc)),_(0x1,_0x472303(_0x7fb736)),_(0x2,_0x472303(_0x251384)),_(0x3,_0x472303(_0x467098))],f);var re=Object[_0x42d6c8(0xe8)],te=(_0x111186,_0x1b9f6f,_0xac75f1,_0x178135)=>{const _0x48d77d=_0x42d6c8;for(var _0x4286ed=_0x178135>0x1?void 0x0:_0x178135?re(_0x1b9f6f,_0xac75f1):_0x1b9f6f,_0x204af2=_0x111186[_0x48d77d(0xb0)]-0x1,_0x59ece1;_0x204af2>=0x0;_0x204af2--)(_0x59ece1=_0x111186[_0x204af2])&&(_0x4286ed=_0x59ece1(_0x4286ed)||_0x4286ed);return _0x4286ed;},N=(_0x5d9210,_0x4eaad4)=>(_0x51a7ce,_0x3d2b17)=>_0x4eaad4(_0x51a7ce,_0x3d2b17,_0x5d9210);let g=class extends _0x526737{constructor(_0x319975,_0x2ac535){const _0x513020=_0x42d6c8;super(),this[_0x513020(0x9e)]=_0x319975,this['_threadCommentDataSource']=_0x2ac535,this['_initDataSource']();}[_0x42d6c8(0xc3)](){const _0x3d2882=_0x42d6c8;this[_0x3d2882(0x9e)][_0x3d2882(0x93)]=this[_0x3d2882(0x9d)],this[_0x3d2882(0x9e)][_0x3d2882(0x9c)]=!0x1;}};g=te([N(0x0,_0x3b16b7),N(0x1,_0x472303(f))],g);var se=Object[_0x42d6c8(0xa9)],oe=Object[_0x42d6c8(0xe8)],ne=(_0x39326c,_0xb65e20,_0x2c5ee5)=>_0xb65e20 in _0x39326c?se(_0x39326c,_0xb65e20,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2c5ee5}):_0x39326c[_0xb65e20]=_0x2c5ee5,ie=(_0x493334,_0x92e46,_0x3e7e74,_0x3779cc)=>{for(var _0x58097b=_0x3779cc>0x1?void 0x0:_0x3779cc?oe(_0x92e46,_0x3e7e74):_0x92e46,_0x3aafc8=_0x493334['length']-0x1,_0x4d0bf8;_0x3aafc8>=0x0;_0x3aafc8--)(_0x4d0bf8=_0x493334[_0x3aafc8])&&(_0x58097b=_0x4d0bf8(_0x58097b)||_0x58097b);return _0x58097b;},w=(_0x11bac2,_0x195d4d)=>(_0x89604c,_0x3e03a4)=>_0x195d4d(_0x89604c,_0x3e03a4,_0x11bac2),$=(_0x59a620,_0x1643aa,_0x524809)=>ne(_0x59a620,typeof _0x1643aa!=_0x42d6c8(0xa2)?_0x1643aa+'':_0x1643aa,_0x524809);let b=class extends _0x5837c0{constructor(_0x18da39=M,_0x44a702,_0x1f3594){const _0x41a741=_0x42d6c8;super(),this[_0x41a741(0xda)]=_0x18da39,this[_0x41a741(0x89)]=_0x44a702,this[_0x41a741(0xd1)]=_0x1f3594;const {..._0xe4006}=_0x1d5c2a({},M,this['_config']);this[_0x41a741(0xd1)][_0x41a741(0xdb)](z,_0xe4006);}[_0x42d6c8(0xe9)](){[[f],[g],[S]]['forEach'](_0x5cd5a8=>{const _0x189612=_0x349d;this[_0x189612(0x89)][_0x189612(0xad)](_0x5cd5a8);});}[_0x42d6c8(0xb5)](){const _0xe7f9bf=_0x42d6c8;this[_0xe7f9bf(0x89)][_0xe7f9bf(0xb8)](g),this[_0xe7f9bf(0x89)][_0xe7f9bf(0xb8)](S);}};$(b,_0x42d6c8(0x8d),W),$(b,_0x42d6c8(0x91),_0x226e69['UNIVER_UNKNOWN']),b=ie([_0x3e7234(_0x47d75a,_0x46ec77,_0x4f39a6),w(0x1,_0x472303(_0x467098)),w(0x2,_0x566806)],b);export{b as UniverThreadCommentDataSourcePlugin};function _0x4366(){const _0x55655b=['_sessionService','addComment','symbol','parse','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/solved','replyId','comments','50739788tJgUgC','defineProperty','pipe','delete','UNRECOGNIZED','add','getUnit','solved','length','rangeId','_httpService','disposeWithMe','find','onReady','COMMENT','replies','get','saveCommentToSnapshot','/universer-api/user/list','Delete','68WtfpJQ','getComment','10141848KSqjaa','getMemberID','OpenOrReOpen','_commentService','deleteComment','_initDataSource','userId','YYYY/MM/DD\x20HH:mm','Solved','Edit','unitId','4504848YetFXz','parentId','/add','userID','ref','post','error','resolveComment','_configService','9037016ezhWRi','comment','body','updateComment','Solve','commentUpdate$','Unknown','28ZXRtBF','_config','setConfig','324395cfznjS','map','_userService','code','_threadCommentModel','filter','thread-comment-data-source.config','getUser','_init','users','613642ZUVrVr','requireSession','getOwnPropertyDescriptor','onStarting','/universer-api/comment/unit/','10Kraduv','subscribe','user','forEach','/list','rangeType','_injector','customRanges','Add','createTimestamp','pluginName','/edit','format','Reply','type','/reply','dataSource','personId','content','slice','addUser','646854FbaCyG','threadId','2TgaCSm','values','syncUpdateMutationToColla','_threadCommentDataSource','_threadCommentDataSourceService','root'];_0x4366=function(){return _0x55655b;};return _0x4366();}
1
+ const _0x5ce6d6=_0x1597;(function(_0x2e273f,_0x45ce0b){const _0x4abcd9=_0x1597,_0x194beb=_0x2e273f();while(!![]){try{const _0x22d439=parseInt(_0x4abcd9(0x1f8))/0x1+parseInt(_0x4abcd9(0x1d4))/0x2*(-parseInt(_0x4abcd9(0x1e7))/0x3)+parseInt(_0x4abcd9(0x201))/0x4*(parseInt(_0x4abcd9(0x209))/0x5)+parseInt(_0x4abcd9(0x1d9))/0x6*(-parseInt(_0x4abcd9(0x1cf))/0x7)+-parseInt(_0x4abcd9(0x1e2))/0x8*(-parseInt(_0x4abcd9(0x22e))/0x9)+parseInt(_0x4abcd9(0x212))/0xa+parseInt(_0x4abcd9(0x1e4))/0xb*(-parseInt(_0x4abcd9(0x1d1))/0xc);if(_0x22d439===_0x45ce0b)break;else _0x194beb['push'](_0x194beb['shift']());}catch(_0xd76287){_0x194beb['push'](_0x194beb['shift']());}}}(_0x188f,0xebd49));import{CommentService as _0xba2742,CollaborationSessionService as _0xfa68d,UniverCollaborationClientPlugin as _0x554242}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x12a870}from'@univerjs-pro/license';import{dayjs as _0x1e305e,UserManagerService as _0xd8758c,Inject as _0x59ab9f,Injector as _0x10ffc5,Disposable as _0x1f4696,CustomRangeType as _0x4a1339,UniverInstanceType as _0x563e5b,DependentOn as _0x24198d,IConfigService as _0x143756,Plugin as _0x44f14f,merge as _0x842076}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x310ccb}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x40f162,IThreadCommentDataSourceService as _0x173173}from'@univerjs/thread-comment';import{bufferTime as _0x121ead}from'rxjs';import{HTTPService as _0x1c0427}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5a0705=>(_0x5a0705[_0x5a0705['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x5a0705[_0x5a0705['Solved']=0x1]=_0x5ce6d6(0x1f4),_0x5a0705[_0x5a0705[_0x5ce6d6(0x20c)]=-0x1]='UNRECOGNIZED',_0x5a0705))(I||{}),v=(_0x57ac5c=>(_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x1df)]=0x0]=_0x5ce6d6(0x1df),_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x20f)]=0x1]='Add',_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x21e)]=0x2]='Reply',_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x1f5)]=0x3]='Edit',_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x1d6)]=0x4]=_0x5ce6d6(0x1d6),_0x57ac5c[_0x57ac5c['Solve']=0x5]=_0x5ce6d6(0x214),_0x57ac5c[_0x57ac5c[_0x5ce6d6(0x20c)]=-0x1]=_0x5ce6d6(0x20c),_0x57ac5c))(v||{});const D=_0x17ebd0=>_0x1e305e(new Date(+_0x17ebd0))[_0x5ce6d6(0x1cb)](_0x5ce6d6(0x1fc)),B=async(_0x33b4e9,_0x299153)=>{const _0x3fa37b=_0x5ce6d6,_0x5e2f94=_0x33b4e9[_0x3fa37b(0x223)](_0xd8758c),_0x4df365=_0x33b4e9[_0x3fa37b(0x223)](_0x1c0427);_0x299153[_0x3fa37b(0x1ce)](_0x572127=>{const _0x551729=_0x3fa37b;_0x5e2f94[_0x551729(0x21d)](_0x572127)&&_0x299153[_0x551729(0x1f7)](_0x572127);}),_0x299153[_0x3fa37b(0x1cc)]&&(await _0x4df365[_0x3fa37b(0x223)](_0x3fa37b(0x1e5),{'params':{'userIDs':[..._0x299153]}}))['body'][_0x3fa37b(0x204)][_0x3fa37b(0x1ce)](_0x3e55c7=>{const _0x83124d=_0x3fa37b;_0x3e55c7&&_0x5e2f94[_0x83124d(0x1ed)](_0x3e55c7);});};function _0x1597(_0x172810,_0x5a72d4){const _0x188fc8=_0x188f();return _0x1597=function(_0x15970e,_0x163375){_0x15970e=_0x15970e-0x1c9;let _0x585507=_0x188fc8[_0x15970e];return _0x585507;},_0x1597(_0x172810,_0x5a72d4);}function _0x188f(){const _0x4a5a23=['Delete','personId','onStarting','30mPToDC','unitId','resolved','requireSession','stringify','getMemberID','Unknown','pipe','root','8ibGjNr','userID','1672ociPiT','/universer-api/user/list','rangeType','201SUmZnQ','values','_commentService','reply','deleteComment','_threadCommentDataSourceService','addUser','symbol','/delete','_threadCommentModel','getCurrentUser','_configService','code','Solved','Edit','getUnit','delete','101731RdPckX','thread-comment-data-source.config','_httpService','post','YYYY/MM/DD\x20HH:mm','content','map','_initUserSync','parse','56JGoHxW','rangeId','_threadCommentDataSource','users','add','_init','/edit','replyId','661865RAfyzB','payload','_injector','UNRECOGNIZED','userId','onReady','Add','COMMENT','resolveComment','12805250aXJCaY','_initDataSource','Solve','/add','find','_userService','subscribe','solved','type','createTimestamp','customRanges','getUser','Reply','updateComment','ref','user','commentUpdate$','get','comments','disposeWithMe','body','/list','/universer-api/comment/unit/','OpenOrReOpen','threadId','addComment','replies','error','232209socOrE','slice','length','listComments','/solved','format','size','_sessionService','forEach','1276723mDqbyE','parentId','41556vmdDap','getOwnPropertyDescriptor','filter','25582ixdgQe','comment'];_0x188f=function(){return _0x4a5a23;};return _0x188f();}var K=Object[_0x5ce6d6(0x1d2)],V=(_0xab3062,_0x5ab8a6,_0x3ba0ef,_0x486938)=>{const _0x2d552a=_0x5ce6d6;for(var _0x366c17=_0x486938>0x1?void 0x0:_0x486938?K(_0x5ab8a6,_0x3ba0ef):_0x5ab8a6,_0x2a83ae=_0xab3062[_0x2d552a(0x230)]-0x1,_0x5c99b1;_0x2a83ae>=0x0;_0x2a83ae--)(_0x5c99b1=_0xab3062[_0x2a83ae])&&(_0x366c17=_0x5c99b1(_0x366c17)||_0x366c17);return _0x366c17;},p=(_0xf602d,_0x41dd73)=>(_0x108466,_0x30866f)=>_0x41dd73(_0x108466,_0x30866f,_0xf602d);let S=class extends _0x1f4696{constructor(_0x4eaa14,_0x1c29b0,_0x8dd5fa,_0x8e33be){const _0x1ff891=_0x5ce6d6;super(),this[_0x1ff891(0x1e9)]=_0x4eaa14,this[_0x1ff891(0x1f0)]=_0x1c29b0,this[_0x1ff891(0x217)]=_0x8dd5fa,this[_0x1ff891(0x20b)]=_0x8e33be,this[_0x1ff891(0x206)](),this[_0x1ff891(0x1ff)]();}['_initUserSync'](){const _0xe619d7=_0x5ce6d6;this[_0xe619d7(0x225)](this[_0xe619d7(0x1f0)][_0xe619d7(0x222)][_0xe619d7(0x1e0)](_0x121ead(0x10))[_0xe619d7(0x218)](_0x39986d=>{const _0x3879a7=new Set();_0x39986d['forEach'](_0x40c67c=>{const _0x201624=_0x1597;switch(_0x40c67c[_0x201624(0x21a)]){case _0x201624(0x205):{const _0x1b823e=_0x40c67c[_0x201624(0x20a)][_0x201624(0x1d7)];_0x3879a7['add'](_0x1b823e);break;}}}),B(this['_injector'],_0x3879a7);}));}[_0x5ce6d6(0x206)](){const _0x250aac=_0x5ce6d6;this[_0x250aac(0x225)](this['_commentService'][_0x250aac(0x222)][_0x250aac(0x218)](async _0x51e0d2=>{const _0x146159=_0x250aac;var _0x48265d,_0x3d3959,_0x4e8934,_0x3f9895;const _0x52297d=(_0x48265d=this[_0x146159(0x1f0)][_0x146159(0x1f6)](_0x51e0d2[_0x146159(0x1da)])[_0x146159(0x216)](_0x35a6d4=>_0x35a6d4[_0x146159(0x22a)]===_0x51e0d2[_0x146159(0x22a)]))==null?void 0x0:_0x48265d[_0x146159(0x1e1)];if(!_0x52297d)return;const {unitId:_0x5a96e6,subUnitId:_0x191a44}=_0x52297d;switch(_0x51e0d2['user']&&this['_userService'][_0x146159(0x1ed)](_0x51e0d2['user']),_0x51e0d2[_0x146159(0x21a)]){case v[_0x146159(0x20f)]:break;case v['Reply']:{this[_0x146159(0x1f0)][_0x146159(0x22b)](_0x5a96e6,_0x191a44,{'unitId':_0x5a96e6,'subUnitId':_0x191a44,'ref':'','id':_0x51e0d2[_0x146159(0x208)],'dT':D(+_0x51e0d2[_0x146159(0x21b)]),'threadId':_0x51e0d2[_0x146159(0x22a)],'personId':(_0x4e8934=(_0x3d3959=_0x51e0d2[_0x146159(0x221)])==null?void 0x0:_0x3d3959[_0x146159(0x1e3)])!=null?_0x4e8934:_0x51e0d2[_0x146159(0x20d)],'text':JSON[_0x146159(0x200)](_0x51e0d2[_0x146159(0x1fd)]),'parentId':_0x52297d['id']});break;}case v[_0x146159(0x1d6)]:{const _0x5bb6fe=this[_0x146159(0x1f0)]['getComment'](_0x5a96e6,_0x191a44,_0x51e0d2['replyId']);_0x5bb6fe&&_0x5bb6fe[_0x146159(0x1d0)]&&this[_0x146159(0x1f0)][_0x146159(0x1eb)](_0x5a96e6,_0x191a44,_0x51e0d2[_0x146159(0x208)]);break;}case v[_0x146159(0x1f5)]:{this['_threadCommentModel'][_0x146159(0x21f)](_0x5a96e6,_0x191a44,{'commentId':_0x51e0d2[_0x146159(0x208)],'text':JSON[_0x146159(0x200)](_0x51e0d2['content'])});break;}case v[_0x146159(0x214)]:{const _0xa2fd2a=(_0x3f9895=this[_0x146159(0x1f0)]['getUnit'](_0x51e0d2[_0x146159(0x1da)])[_0x146159(0x216)](_0x5cee72=>_0x5cee72[_0x146159(0x22a)]===_0x51e0d2[_0x146159(0x22a)]))==null?void 0x0:_0x3f9895[_0x146159(0x1e1)];_0xa2fd2a&&this['_threadCommentModel'][_0x146159(0x211)](_0x5a96e6,_0x191a44,_0xa2fd2a['id'],_0x51e0d2[_0x146159(0x219)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x59ab9f(_0xba2742)),p(0x1,_0x59ab9f(_0x40f162)),p(0x2,_0x59ab9f(_0xd8758c)),p(0x3,_0x59ab9f(_0x10ffc5))],S);const z=_0x5ce6d6(0x1f9),M={};var k=Object[_0x5ce6d6(0x1d2)],Q=(_0x3f239e,_0x435dab,_0x6f681b,_0x1c5651)=>{for(var _0x1d8197=_0x1c5651>0x1?void 0x0:_0x1c5651?k(_0x435dab,_0x6f681b):_0x435dab,_0x2a028b=_0x3f239e['length']-0x1,_0x382de1;_0x2a028b>=0x0;_0x2a028b--)(_0x382de1=_0x3f239e[_0x2a028b])&&(_0x1d8197=_0x382de1(_0x1d8197)||_0x1d8197);return _0x1d8197;},_=(_0x303e88,_0x32b15e)=>(_0x4939a1,_0x5edf7e)=>_0x32b15e(_0x4939a1,_0x5edf7e,_0x303e88);function X(_0x1d2313,_0xccca9f){const _0x197498=_0x5ce6d6,_0x161e8e=_0x1d2313[_0x197498(0x22c)][0x0];return{..._0xccca9f,'id':_0x161e8e[_0x197498(0x208)],'resolved':_0x1d2313[_0x197498(0x219)]===0x1,'dT':D(_0x161e8e[_0x197498(0x21b)]),'personId':_0x161e8e[_0x197498(0x20d)],'threadId':_0x161e8e[_0x197498(0x22a)]};}function ee(_0x4ff60d,_0x46620e,_0x18e14c){const _0x415989=_0x5ce6d6;var _0x155a32,_0x414cbd;if(((_0x414cbd=(_0x155a32=_0x4ff60d==null?void 0x0:_0x4ff60d[_0x415989(0x22c)])==null?void 0x0:_0x155a32[_0x415989(0x230)])!=null?_0x414cbd:0x0)>0x0){const _0x5e098d=(_0x30813b,_0x5f084d)=>({'id':_0x30813b[_0x415989(0x208)],'threadId':_0x30813b[_0x415989(0x22a)],'dT':D(_0x30813b[_0x415989(0x21b)]),'personId':_0x30813b[_0x415989(0x20d)],'resolved':_0x4ff60d[_0x415989(0x219)]===I[_0x415989(0x1f4)],'unitId':_0x46620e,'subUnitId':_0x18e14c,'text':JSON[_0x415989(0x200)](_0x30813b[_0x415989(0x1fd)]),'parentId':_0x5f084d}),_0x280fc0=_0x5e098d(_0x4ff60d[_0x415989(0x22c)][0x0]);return{..._0x280fc0,'children':_0x4ff60d[_0x415989(0x22c)][_0x415989(0x22f)](0x1)[_0x415989(0x1fe)](_0x351487=>_0x5e098d(_0x351487,_0x280fc0['id']))};}return null;}let f=class{constructor(_0x3c1497,_0x4b0308,_0x22e2d3,_0x47136c){const _0x2482a4=_0x5ce6d6;this['_httpService']=_0x3c1497,this[_0x2482a4(0x217)]=_0x4b0308,this['_sessionService']=_0x22e2d3,this[_0x2482a4(0x20b)]=_0x47136c;}async[_0x5ce6d6(0x22b)](_0x458b20){const _0x555017=_0x5ce6d6;var _0x1352ba,_0x42d966;const {parentId:_0x59b18c,unitId:_0x4cd18a,text:_0x49b408,threadId:_0x236e79}=_0x458b20,_0xf3bfe0=(_0x42d966=(_0x1352ba=_0x49b408[_0x555017(0x21c)])==null?void 0x0:_0x1352ba[_0x555017(0x1d3)](_0x151e2b=>_0x151e2b['rangeType']===_0x4a1339[_0x555017(0x210)])[_0x555017(0x1fe)](_0x567ac3=>_0x567ac3['rangeId']))!=null?_0x42d966:[],_0x37cd69=JSON[_0x555017(0x1dd)](_0x49b408),_0xe61618=(await this['_sessionService'][_0x555017(0x1dc)](_0x4cd18a))['getMemberID']();if(_0x59b18c){const _0x48b68f={'memberId':_0xe61618,'unitId':_0x4cd18a,'content':_0x37cd69,'mention':_0xf3bfe0,'threadId':_0x236e79},_0x332c07=(await this[_0x555017(0x1fa)][_0x555017(0x1fb)](_0x555017(0x228)+_0x4cd18a+'/reply',{'body':_0x48b68f}))[_0x555017(0x226)][_0x555017(0x1ea)];return{..._0x458b20,'id':_0x332c07[_0x555017(0x208)],'dT':_0x1e305e(+_0x332c07[_0x555017(0x21b)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x332c07[_0x555017(0x20d)]};}else{const _0x95a326={'memberId':_0xe61618,'unitId':_0x4cd18a,'content':_0x37cd69,'mention':_0xf3bfe0},_0x70eb65=await this['_httpService']['post'](_0x555017(0x228)+_0x4cd18a+_0x555017(0x215),{'body':_0x95a326});return X(_0x70eb65[_0x555017(0x226)][_0x555017(0x1d5)],_0x458b20);}}async[_0x5ce6d6(0x21f)](_0x4bd245){const _0x51ffda=_0x5ce6d6;var _0x5ae242,_0x22018a;const {text:_0x61b9bf,unitId:_0x2c71de}=_0x4bd245,_0x5ec4a5=(_0x22018a=(_0x5ae242=_0x61b9bf[_0x51ffda(0x21c)])==null?void 0x0:_0x5ae242[_0x51ffda(0x1d3)](_0x25e8bb=>_0x25e8bb[_0x51ffda(0x1e6)]===_0x4a1339[_0x51ffda(0x210)])[_0x51ffda(0x1fe)](_0xc415cf=>_0xc415cf[_0x51ffda(0x202)]))!=null?_0x22018a:[],_0x1f9643=JSON['stringify'](_0x61b9bf),_0x2ea379=_0x4bd245['threadId'],_0x4a46ba=_0x4bd245['id'],_0x5d3db7={'memberId':(await this[_0x51ffda(0x1cd)][_0x51ffda(0x1dc)](_0x2c71de))['getMemberID'](),'unitId':_0x2c71de,'threadId':_0x2ea379,'mention':_0x5ec4a5,'content':_0x1f9643,'replyId':_0x4a46ba},_0x3926d6=await this[_0x51ffda(0x1fa)][_0x51ffda(0x1fb)](_0x51ffda(0x228)+_0x2c71de+_0x51ffda(0x207),{'body':_0x5d3db7});return!_0x3926d6['body'][_0x51ffda(0x22d)]||_0x3926d6[_0x51ffda(0x226)][_0x51ffda(0x22d)][_0x51ffda(0x1f3)]===0x1;}async['resolveComment'](_0x1a7b5c){const _0x931ba7=_0x5ce6d6,{unitId:_0x46f6d1}=_0x1a7b5c,_0x38ec30=_0x1a7b5c['threadId'],_0x52f6d7={'memberId':this[_0x931ba7(0x217)][_0x931ba7(0x1f1)]()[_0x931ba7(0x1e3)],'unitId':_0x46f6d1,'threadId':_0x38ec30,'solved':_0x1a7b5c[_0x931ba7(0x1db)]?I[_0x931ba7(0x1f4)]:I[_0x931ba7(0x229)]},_0x57c4ed=await this[_0x931ba7(0x1fa)][_0x931ba7(0x1fb)](_0x931ba7(0x228)+_0x46f6d1+_0x931ba7(0x1ca),{'body':_0x52f6d7});return!_0x57c4ed[_0x931ba7(0x226)][_0x931ba7(0x22d)]||_0x57c4ed[_0x931ba7(0x226)][_0x931ba7(0x22d)][_0x931ba7(0x1f3)]===0x1;}async[_0x5ce6d6(0x1eb)](_0x448ed6,_0x5696ce,_0x2cdda3,_0x59d13a){const _0x5689de=_0x5ce6d6,_0x3d6456={'memberId':(await this[_0x5689de(0x1cd)]['requireSession'](_0x448ed6))[_0x5689de(0x1de)](),'threadId':_0x2cdda3,'replyId':_0x59d13a,'unitId':_0x448ed6},_0x40a87a=await this[_0x5689de(0x1fa)][_0x5689de(0x1fb)](_0x5689de(0x228)+_0x448ed6+_0x5689de(0x1ef),{'body':_0x3d6456});return!_0x40a87a[_0x5689de(0x226)]['error']||_0x40a87a[_0x5689de(0x226)][_0x5689de(0x22d)][_0x5689de(0x1f3)]===0x1;}async[_0x5ce6d6(0x1c9)](_0x1d0da3,_0x59b865,_0x2e187f){const _0x30c1f0=_0x5ce6d6,_0x3f21b5={'unitId':_0x1d0da3,'threadId':_0x2e187f},_0x3b27d9=await this[_0x30c1f0(0x1fa)]['post'](_0x30c1f0(0x228)+_0x1d0da3+_0x30c1f0(0x227),{'body':_0x3f21b5}),_0x4dc3bf=_0x2e187f[_0x30c1f0(0x1fe)](_0xfa5e04=>ee(_0x3b27d9['body'][_0x30c1f0(0x224)][_0xfa5e04],_0x1d0da3,_0x59b865))[_0x30c1f0(0x1d3)](Boolean);return Object[_0x30c1f0(0x1e8)](_0x3b27d9[_0x30c1f0(0x226)][_0x30c1f0(0x204)])[_0x30c1f0(0x1ce)](_0x3667f4=>{const _0x3b7980=_0x30c1f0;this[_0x3b7980(0x217)][_0x3b7980(0x1ed)](_0x3667f4);}),_0x4dc3bf;}['saveCommentToSnapshot'](_0x465833){const _0x2abb6e=_0x5ce6d6;return{'id':_0x465833['id'],'threadId':_0x465833['threadId'],'ref':_0x465833[_0x2abb6e(0x220)]};}};f=Q([_(0x0,_0x59ab9f(_0x1c0427)),_(0x1,_0x59ab9f(_0xd8758c)),_(0x2,_0x59ab9f(_0xfa68d)),_(0x3,_0x59ab9f(_0x10ffc5))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x35d5e4,_0x5bb460,_0x1a8912,_0x31fd9f)=>{const _0x24fbd8=_0x5ce6d6;for(var _0x474c3e=_0x31fd9f>0x1?void 0x0:_0x31fd9f?re(_0x5bb460,_0x1a8912):_0x5bb460,_0x42d8c9=_0x35d5e4[_0x24fbd8(0x230)]-0x1,_0x172e81;_0x42d8c9>=0x0;_0x42d8c9--)(_0x172e81=_0x35d5e4[_0x42d8c9])&&(_0x474c3e=_0x172e81(_0x474c3e)||_0x474c3e);return _0x474c3e;},N=(_0x17080e,_0x45ed40)=>(_0x1d4dc1,_0x10515e)=>_0x45ed40(_0x1d4dc1,_0x10515e,_0x17080e);let g=class extends _0x1f4696{constructor(_0x33b52a,_0x481875){const _0x4cb860=_0x5ce6d6;super(),this[_0x4cb860(0x1ec)]=_0x33b52a,this[_0x4cb860(0x203)]=_0x481875,this['_initDataSource']();}[_0x5ce6d6(0x213)](){const _0x655a87=_0x5ce6d6;this[_0x655a87(0x1ec)]['dataSource']=this['_threadCommentDataSource'],this[_0x655a87(0x1ec)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x173173),N(0x1,_0x59ab9f(f))],g);var se=Object['defineProperty'],oe=Object[_0x5ce6d6(0x1d2)],ne=(_0x52b464,_0xe3765,_0x16823e)=>_0xe3765 in _0x52b464?se(_0x52b464,_0xe3765,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x16823e}):_0x52b464[_0xe3765]=_0x16823e,ie=(_0x4e4a7b,_0x2b3292,_0x279b7e,_0x17da8b)=>{const _0x5033c9=_0x5ce6d6;for(var _0x462096=_0x17da8b>0x1?void 0x0:_0x17da8b?oe(_0x2b3292,_0x279b7e):_0x2b3292,_0x13038f=_0x4e4a7b[_0x5033c9(0x230)]-0x1,_0x210846;_0x13038f>=0x0;_0x13038f--)(_0x210846=_0x4e4a7b[_0x13038f])&&(_0x462096=_0x210846(_0x462096)||_0x462096);return _0x462096;},w=(_0x7dbc30,_0xe65d37)=>(_0x3c77ad,_0x4d0406)=>_0xe65d37(_0x3c77ad,_0x4d0406,_0x7dbc30),$=(_0x148cf4,_0x593ec9,_0x2f25ff)=>ne(_0x148cf4,typeof _0x593ec9!=_0x5ce6d6(0x1ee)?_0x593ec9+'':_0x593ec9,_0x2f25ff);let b=class extends _0x44f14f{constructor(_0x37c2fb=M,_0x3f9375,_0x4ee275){const _0x11c783=_0x5ce6d6;super(),this['_config']=_0x37c2fb,this['_injector']=_0x3f9375,this['_configService']=_0x4ee275;const {..._0x245f63}=_0x842076({},M,this['_config']);this[_0x11c783(0x1f2)]['setConfig'](z,_0x245f63);}[_0x5ce6d6(0x1d8)](){const _0x20db4d=_0x5ce6d6;[[f],[g],[S]][_0x20db4d(0x1ce)](_0x2a3874=>{const _0x6781a9=_0x20db4d;this[_0x6781a9(0x20b)][_0x6781a9(0x205)](_0x2a3874);});}[_0x5ce6d6(0x20e)](){const _0x3fd414=_0x5ce6d6;this[_0x3fd414(0x20b)][_0x3fd414(0x223)](g),this['_injector']['get'](S);}};$(b,'pluginName',W),$(b,'type',_0x563e5b['UNIVER_UNKNOWN']),b=ie([_0x24198d(_0x310ccb,_0x554242,_0x12a870),w(0x1,_0x59ab9f(_0x10ffc5)),w(0x2,_0x143756)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0xbc9ace,_0x59654f){const _0x4430bb=_0x53a2,_0x50b143=_0xbc9ace();while(!![]){try{const _0x2484ca=-parseInt(_0x4430bb(0x193))/0x1+parseInt(_0x4430bb(0x196))/0x2*(-parseInt(_0x4430bb(0x1dd))/0x3)+-parseInt(_0x4430bb(0x15d))/0x4*(parseInt(_0x4430bb(0x1c8))/0x5)+-parseInt(_0x4430bb(0x1c0))/0x6+parseInt(_0x4430bb(0x1a8))/0x7+-parseInt(_0x4430bb(0x15c))/0x8*(parseInt(_0x4430bb(0x189))/0x9)+-parseInt(_0x4430bb(0x1cf))/0xa*(-parseInt(_0x4430bb(0x19f))/0xb);if(_0x2484ca===_0x59654f)break;else _0x50b143['push'](_0x50b143['shift']());}catch(_0x37d8b6){_0x50b143['push'](_0x50b143['shift']());}}}(_0x5ee8,0x28fd4),function(_0xd6837a,_0x303bb6){const _0xc12799=_0x53a2;typeof exports==_0xc12799(0x1a7)&&typeof module<'u'?_0x303bb6(exports,require(_0xc12799(0x18c)),require(_0xc12799(0x186)),require(_0xc12799(0x1c4)),require(_0xc12799(0x19b)),require(_0xc12799(0x165)),require(_0xc12799(0x194)),require(_0xc12799(0x1d8))):typeof define==_0xc12799(0x180)&&define[_0xc12799(0x1b5)]?define(['exports',_0xc12799(0x18c),_0xc12799(0x186),'@univerjs/core',_0xc12799(0x19b),_0xc12799(0x165),_0xc12799(0x194),_0xc12799(0x1d8)],_0x303bb6):(_0xd6837a=typeof globalThis<'u'?globalThis:_0xd6837a||self,_0x303bb6(_0xd6837a[_0xc12799(0x1d3)]={},_0xd6837a[_0xc12799(0x1d4)],_0xd6837a[_0xc12799(0x1d9)],_0xd6837a[_0xc12799(0x18e)],_0xd6837a[_0xc12799(0x184)],_0xd6837a['UniverThreadComment'],_0xd6837a['rxjs'],_0xd6837a[_0xc12799(0x1cd)]));}(this,function(_0x119cd,_0x1c9d44,_0x26e160,_0x22bc10,_0x2b9c93,_0x522633,_0x2c56bb,_0x47762c){'use strict';const _0x2ac89c=_0x53a2;const _0xefad9f='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x7216f1=(_0x305c72=>(_0x305c72[_0x305c72[_0x2ac89c(0x1a9)]=0x0]='OpenOrReOpen',_0x305c72[_0x305c72['Solved']=0x1]=_0x2ac89c(0x170),_0x305c72[_0x305c72[_0x2ac89c(0x17f)]=-0x1]=_0x2ac89c(0x17f),_0x305c72))(_0x7216f1||{}),_0x10e4cc=(_0x22cc3b=>(_0x22cc3b[_0x22cc3b['Unknown']=0x0]=_0x2ac89c(0x166),_0x22cc3b[_0x22cc3b[_0x2ac89c(0x1d1)]=0x1]=_0x2ac89c(0x1d1),_0x22cc3b[_0x22cc3b[_0x2ac89c(0x1a1)]=0x2]=_0x2ac89c(0x1a1),_0x22cc3b[_0x22cc3b[_0x2ac89c(0x16d)]=0x3]=_0x2ac89c(0x16d),_0x22cc3b[_0x22cc3b[_0x2ac89c(0x1c2)]=0x4]=_0x2ac89c(0x1c2),_0x22cc3b[_0x22cc3b['Solve']=0x5]=_0x2ac89c(0x1e3),_0x22cc3b[_0x22cc3b[_0x2ac89c(0x17f)]=-0x1]=_0x2ac89c(0x17f),_0x22cc3b))(_0x10e4cc||{});const _0x329f0e=_0x503192=>_0x22bc10[_0x2ac89c(0x1a4)](new Date(+_0x503192))['format']('YYYY/MM/DD\x20HH:mm'),_0x17df73=async(_0x34f15a,_0x1a1f2d)=>{const _0x4c9c01=_0x2ac89c,_0x16cf19=_0x34f15a[_0x4c9c01(0x1e6)](_0x22bc10[_0x4c9c01(0x1ba)]),_0x4b941c=_0x34f15a[_0x4c9c01(0x1e6)](_0x47762c[_0x4c9c01(0x1bd)]);_0x1a1f2d[_0x4c9c01(0x16a)](_0xb2c468=>{const _0x16c3eb=_0x4c9c01;_0x16cf19[_0x16c3eb(0x1a2)](_0xb2c468)&&_0x1a1f2d[_0x16c3eb(0x1ae)](_0xb2c468);}),_0x1a1f2d[_0x4c9c01(0x173)]&&(await _0x4b941c[_0x4c9c01(0x1e6)](_0x4c9c01(0x195),{'params':{'userIDs':[..._0x1a1f2d]}}))[_0x4c9c01(0x16f)][_0x4c9c01(0x1b8)]['forEach'](_0x405239=>{const _0x5e9089=_0x4c9c01;_0x405239&&_0x16cf19[_0x5e9089(0x16b)](_0x405239);});};var _0x553fa0=Object['getOwnPropertyDescriptor'],_0x12dfd8=(_0x1c00c6,_0x196577,_0x229988,_0x57d025)=>{const _0x4b268c=_0x2ac89c;for(var _0x2b8433=_0x57d025>0x1?void 0x0:_0x57d025?_0x553fa0(_0x196577,_0x229988):_0x196577,_0x171350=_0x1c00c6[_0x4b268c(0x17b)]-0x1,_0x45134b;_0x171350>=0x0;_0x171350--)(_0x45134b=_0x1c00c6[_0x171350])&&(_0x2b8433=_0x45134b(_0x2b8433)||_0x2b8433);return _0x2b8433;},_0x221deb=(_0x5ad2d7,_0x3c4bbe)=>(_0x2e2390,_0xc470f0)=>_0x3c4bbe(_0x2e2390,_0xc470f0,_0x5ad2d7);let _0x2e7d24=class extends _0x22bc10[_0x2ac89c(0x199)]{constructor(_0x311a7d,_0x472dcd,_0x20fcc8,_0x237c4b){const _0x15bc81=_0x2ac89c;super(),this[_0x15bc81(0x163)]=_0x311a7d,this[_0x15bc81(0x1e0)]=_0x472dcd,this['_userService']=_0x20fcc8,this[_0x15bc81(0x17e)]=_0x237c4b,this[_0x15bc81(0x1d0)](),this[_0x15bc81(0x1d7)]();}[_0x2ac89c(0x1d7)](){const _0x43e4e1=_0x2ac89c;this[_0x43e4e1(0x191)](this[_0x43e4e1(0x1e0)][_0x43e4e1(0x1a6)][_0x43e4e1(0x16e)](_0x2c56bb[_0x43e4e1(0x1dc)](0x10))[_0x43e4e1(0x178)](_0x5bc030=>{const _0x512cbd=_0x43e4e1,_0xab15ce=new Set();_0x5bc030['forEach'](_0x27d0ab=>{const _0x3696c0=_0x53a2;switch(_0x27d0ab[_0x3696c0(0x1af)]){case _0x3696c0(0x17d):{const _0x63cc3d=_0x27d0ab[_0x3696c0(0x1a0)]['personId'];_0xab15ce[_0x3696c0(0x17d)](_0x63cc3d);break;}}}),_0x17df73(this[_0x512cbd(0x17e)],_0xab15ce);}));}[_0x2ac89c(0x1d0)](){const _0x3f8752=_0x2ac89c;this[_0x3f8752(0x191)](this[_0x3f8752(0x163)][_0x3f8752(0x1a6)]['subscribe'](async _0x15c185=>{const _0x2c8005=_0x3f8752;var _0x1df7eb,_0x43c42d,_0x4d9dd9,_0x104393;const _0x227ffa=(_0x1df7eb=this['_threadCommentModel'][_0x2c8005(0x177)](_0x15c185[_0x2c8005(0x1e4)])['find'](_0x4b3201=>_0x4b3201[_0x2c8005(0x1bc)]===_0x15c185[_0x2c8005(0x1bc)]))==null?void 0x0:_0x1df7eb[_0x2c8005(0x1c7)];if(!_0x227ffa)return;const {unitId:_0x446a5e,subUnitId:_0x2ceb91}=_0x227ffa;switch(_0x15c185[_0x2c8005(0x197)]&&this[_0x2c8005(0x15a)]['addUser'](_0x15c185['user']),_0x15c185[_0x2c8005(0x1af)]){case _0x10e4cc['Add']:break;case _0x10e4cc[_0x2c8005(0x1a1)]:{this[_0x2c8005(0x1e0)][_0x2c8005(0x16c)](_0x446a5e,_0x2ceb91,{'unitId':_0x446a5e,'subUnitId':_0x2ceb91,'ref':'','id':_0x15c185[_0x2c8005(0x1b3)],'dT':_0x329f0e(+_0x15c185[_0x2c8005(0x1be)]),'threadId':_0x15c185['threadId'],'personId':(_0x4d9dd9=(_0x43c42d=_0x15c185[_0x2c8005(0x197)])==null?void 0x0:_0x43c42d[_0x2c8005(0x19c)])!=null?_0x4d9dd9:_0x15c185['userId'],'text':JSON[_0x2c8005(0x18a)](_0x15c185[_0x2c8005(0x1b0)]),'parentId':_0x227ffa['id']});break;}case _0x10e4cc[_0x2c8005(0x1c2)]:{const _0x3c268c=this[_0x2c8005(0x1e0)]['getComment'](_0x446a5e,_0x2ceb91,_0x15c185[_0x2c8005(0x1b3)]);_0x3c268c&&_0x3c268c['parentId']&&this[_0x2c8005(0x1e0)][_0x2c8005(0x1ab)](_0x446a5e,_0x2ceb91,_0x15c185['replyId']);break;}case _0x10e4cc[_0x2c8005(0x16d)]:{this[_0x2c8005(0x1e0)]['updateComment'](_0x446a5e,_0x2ceb91,{'commentId':_0x15c185[_0x2c8005(0x1b3)],'text':JSON[_0x2c8005(0x18a)](_0x15c185[_0x2c8005(0x1b0)])});break;}case _0x10e4cc['Solve']:{const _0x25eb02=(_0x104393=this[_0x2c8005(0x1e0)][_0x2c8005(0x177)](_0x15c185[_0x2c8005(0x1e4)])[_0x2c8005(0x1d5)](_0x11dfc3=>_0x11dfc3[_0x2c8005(0x1bc)]===_0x15c185[_0x2c8005(0x1bc)]))==null?void 0x0:_0x104393['root'];_0x25eb02&&this['_threadCommentModel'][_0x2c8005(0x1d2)](_0x446a5e,_0x2ceb91,_0x25eb02['id'],_0x15c185[_0x2c8005(0x1a3)]===_0x7216f1[_0x2c8005(0x170)]);break;}}}));}};_0x2e7d24=_0x12dfd8([_0x221deb(0x0,_0x22bc10[_0x2ac89c(0x1ca)](_0x1c9d44[_0x2ac89c(0x188)])),_0x221deb(0x1,_0x22bc10[_0x2ac89c(0x1ca)](_0x522633[_0x2ac89c(0x185)])),_0x221deb(0x2,_0x22bc10[_0x2ac89c(0x1ca)](_0x22bc10[_0x2ac89c(0x1ba)])),_0x221deb(0x3,_0x22bc10[_0x2ac89c(0x1ca)](_0x22bc10['Injector']))],_0x2e7d24);const _0x27cf8b=_0x2ac89c(0x1df),_0x57e0c5={};var _0x285faf=Object['getOwnPropertyDescriptor'],_0x30cbf0=(_0x182f17,_0x3d04d9,_0x10936d,_0x53de07)=>{for(var _0x442f47=_0x53de07>0x1?void 0x0:_0x53de07?_0x285faf(_0x3d04d9,_0x10936d):_0x3d04d9,_0x25d875=_0x182f17['length']-0x1,_0x347d7c;_0x25d875>=0x0;_0x25d875--)(_0x347d7c=_0x182f17[_0x25d875])&&(_0x442f47=_0x347d7c(_0x442f47)||_0x442f47);return _0x442f47;},_0x28632d=(_0xfe7c63,_0xb6a217)=>(_0x21d33c,_0x184ffa)=>_0xb6a217(_0x21d33c,_0x184ffa,_0xfe7c63);function _0x2b952c(_0x3c53c4,_0x416770){const _0x2e60f8=_0x2ac89c,_0x2777f6=_0x3c53c4[_0x2e60f8(0x1c3)][0x0];return{..._0x416770,'id':_0x2777f6[_0x2e60f8(0x1b3)],'resolved':_0x3c53c4[_0x2e60f8(0x1a3)]===0x1,'dT':_0x329f0e(_0x2777f6['createTimestamp']),'personId':_0x2777f6[_0x2e60f8(0x168)],'threadId':_0x2777f6[_0x2e60f8(0x1bc)]};}function _0x4e2790(_0x29d0f6,_0x486f7a,_0x433bd4){const _0x1536bc=_0x2ac89c;var _0x5a2e10,_0x4104f2;if(((_0x4104f2=(_0x5a2e10=_0x29d0f6==null?void 0x0:_0x29d0f6['replies'])==null?void 0x0:_0x5a2e10[_0x1536bc(0x17b)])!=null?_0x4104f2:0x0)>0x0){const _0xdf1725=(_0x2f75e9,_0x24caf9)=>({'id':_0x2f75e9[_0x1536bc(0x1b3)],'threadId':_0x2f75e9[_0x1536bc(0x1bc)],'dT':_0x329f0e(_0x2f75e9['createTimestamp']),'personId':_0x2f75e9[_0x1536bc(0x168)],'resolved':_0x29d0f6[_0x1536bc(0x1a3)]===_0x7216f1[_0x1536bc(0x170)],'unitId':_0x486f7a,'subUnitId':_0x433bd4,'text':JSON[_0x1536bc(0x18a)](_0x2f75e9[_0x1536bc(0x1b0)]),'parentId':_0x24caf9}),_0x23eacc=_0xdf1725(_0x29d0f6[_0x1536bc(0x1c3)][0x0]);return{..._0x23eacc,'children':_0x29d0f6[_0x1536bc(0x1c3)][_0x1536bc(0x1b6)](0x1)[_0x1536bc(0x1b4)](_0x2b5fbc=>_0xdf1725(_0x2b5fbc,_0x23eacc['id']))};}return null;}let _0x4eb718=class{constructor(_0x318cfe,_0x1093e7,_0x45fcdc,_0x1d9478){const _0x57a2c9=_0x2ac89c;this['_httpService']=_0x318cfe,this[_0x57a2c9(0x15a)]=_0x1093e7,this[_0x57a2c9(0x162)]=_0x45fcdc,this[_0x57a2c9(0x17e)]=_0x1d9478;}async['addComment'](_0x302838){const _0x575ca3=_0x2ac89c;var _0x595f4b,_0x17956f;const {parentId:_0x4b8ea2,unitId:_0x52414e,text:_0x1b6c87,threadId:_0x1f2216}=_0x302838,_0x45391f=(_0x17956f=(_0x595f4b=_0x1b6c87['customRanges'])==null?void 0x0:_0x595f4b[_0x575ca3(0x1da)](_0x561ac3=>_0x561ac3[_0x575ca3(0x1d6)]===_0x22bc10[_0x575ca3(0x15e)][_0x575ca3(0x183)])[_0x575ca3(0x1b4)](_0xf6c65a=>_0xf6c65a['rangeId']))!=null?_0x17956f:[],_0x5acff1=JSON[_0x575ca3(0x181)](_0x1b6c87),_0x1d2a34=(await this['_sessionService'][_0x575ca3(0x175)](_0x52414e))[_0x575ca3(0x171)]();if(_0x4b8ea2){const _0x1e0f98={'memberId':_0x1d2a34,'unitId':_0x52414e,'content':_0x5acff1,'mention':_0x45391f,'threadId':_0x1f2216},_0x372708=(await this[_0x575ca3(0x174)]['post'](_0x575ca3(0x190)+_0x52414e+_0x575ca3(0x18b),{'body':_0x1e0f98}))['body'][_0x575ca3(0x161)];return{..._0x302838,'id':_0x372708[_0x575ca3(0x1b3)],'dT':_0x22bc10[_0x575ca3(0x1a4)](+_0x372708['createTimestamp'])[_0x575ca3(0x1c1)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x372708['userId']};}else{const _0x36f190={'memberId':_0x1d2a34,'unitId':_0x52414e,'content':_0x5acff1,'mention':_0x45391f},_0xe8d54e=await this[_0x575ca3(0x174)][_0x575ca3(0x1db)](_0x575ca3(0x190)+_0x52414e+_0x575ca3(0x164),{'body':_0x36f190});return _0x2b952c(_0xe8d54e[_0x575ca3(0x16f)][_0x575ca3(0x192)],_0x302838);}}async[_0x2ac89c(0x17c)](_0x4b31c9){const _0xfc0691=_0x2ac89c;var _0x258e90,_0x3ad81c;const {text:_0x2499ec,unitId:_0x5060ba}=_0x4b31c9,_0x380373=(_0x3ad81c=(_0x258e90=_0x2499ec[_0xfc0691(0x176)])==null?void 0x0:_0x258e90[_0xfc0691(0x1da)](_0x5e8f38=>_0x5e8f38[_0xfc0691(0x1d6)]===_0x22bc10[_0xfc0691(0x15e)][_0xfc0691(0x183)])['map'](_0x3d35cc=>_0x3d35cc[_0xfc0691(0x1ce)]))!=null?_0x3ad81c:[],_0xdf55dc=JSON[_0xfc0691(0x181)](_0x2499ec),_0x4b88c0=_0x4b31c9[_0xfc0691(0x1bc)],_0x317e5a=_0x4b31c9['id'],_0x241e10={'memberId':(await this[_0xfc0691(0x162)][_0xfc0691(0x175)](_0x5060ba))[_0xfc0691(0x171)](),'unitId':_0x5060ba,'threadId':_0x4b88c0,'mention':_0x380373,'content':_0xdf55dc,'replyId':_0x317e5a},_0x49b69e=await this[_0xfc0691(0x174)]['post'](_0xfc0691(0x190)+_0x5060ba+'/edit',{'body':_0x241e10});return!_0x49b69e['body'][_0xfc0691(0x198)]||_0x49b69e[_0xfc0691(0x16f)][_0xfc0691(0x198)][_0xfc0691(0x172)]===0x1;}async['resolveComment'](_0x3008d0){const _0x29cfb2=_0x2ac89c,{unitId:_0x5c4a28}=_0x3008d0,_0x48126f=_0x3008d0[_0x29cfb2(0x1bc)],_0x521b95={'memberId':this[_0x29cfb2(0x15a)][_0x29cfb2(0x19e)]()[_0x29cfb2(0x19c)],'unitId':_0x5c4a28,'threadId':_0x48126f,'solved':_0x3008d0[_0x29cfb2(0x1de)]?_0x7216f1[_0x29cfb2(0x170)]:_0x7216f1['OpenOrReOpen']},_0xd0f469=await this['_httpService'][_0x29cfb2(0x1db)](_0x29cfb2(0x190)+_0x5c4a28+_0x29cfb2(0x18d),{'body':_0x521b95});return!_0xd0f469[_0x29cfb2(0x16f)][_0x29cfb2(0x198)]||_0xd0f469['body'][_0x29cfb2(0x198)][_0x29cfb2(0x172)]===0x1;}async[_0x2ac89c(0x1ab)](_0x5563fb,_0x2cf49d,_0x81031d,_0x36490d){const _0x5b7f6c=_0x2ac89c,_0xb0823d={'memberId':(await this[_0x5b7f6c(0x162)][_0x5b7f6c(0x175)](_0x5563fb))[_0x5b7f6c(0x171)](),'threadId':_0x81031d,'replyId':_0x36490d,'unitId':_0x5563fb},_0x21c743=await this[_0x5b7f6c(0x174)][_0x5b7f6c(0x1db)](_0x5b7f6c(0x190)+_0x5563fb+_0x5b7f6c(0x1e1),{'body':_0xb0823d});return!_0x21c743[_0x5b7f6c(0x16f)][_0x5b7f6c(0x198)]||_0x21c743[_0x5b7f6c(0x16f)]['error'][_0x5b7f6c(0x172)]===0x1;}async[_0x2ac89c(0x1b7)](_0x373ab6,_0x36645d,_0x5ae688){const _0x2c7107=_0x2ac89c,_0x5e5686={'unitId':_0x373ab6,'threadId':_0x5ae688},_0x2c53ed=await this[_0x2c7107(0x174)][_0x2c7107(0x1db)](_0x2c7107(0x190)+_0x373ab6+_0x2c7107(0x167),{'body':_0x5e5686}),_0x4e7d84=_0x5ae688['map'](_0xad4be9=>_0x4e2790(_0x2c53ed[_0x2c7107(0x16f)][_0x2c7107(0x1bb)][_0xad4be9],_0x373ab6,_0x36645d))[_0x2c7107(0x1da)](Boolean);return Object[_0x2c7107(0x15b)](_0x2c53ed[_0x2c7107(0x16f)]['users'])[_0x2c7107(0x16a)](_0x22e82f=>{const _0x3dab79=_0x2c7107;this['_userService'][_0x3dab79(0x16b)](_0x22e82f);}),_0x4e7d84;}['saveCommentToSnapshot'](_0x1c3a6e){const _0xbefa0e=_0x2ac89c;return{'id':_0x1c3a6e['id'],'threadId':_0x1c3a6e[_0xbefa0e(0x1bc)],'ref':_0x1c3a6e[_0xbefa0e(0x19a)]};}};_0x4eb718=_0x30cbf0([_0x28632d(0x0,_0x22bc10[_0x2ac89c(0x1ca)](_0x47762c[_0x2ac89c(0x1bd)])),_0x28632d(0x1,_0x22bc10[_0x2ac89c(0x1ca)](_0x22bc10['UserManagerService'])),_0x28632d(0x2,_0x22bc10['Inject'](_0x1c9d44[_0x2ac89c(0x15f)])),_0x28632d(0x3,_0x22bc10['Inject'](_0x22bc10[_0x2ac89c(0x1c6)]))],_0x4eb718);var _0xa5c050=Object[_0x2ac89c(0x19d)],_0x2528bd=(_0x10be38,_0x1ca7e5,_0x231d2b,_0x2d2f33)=>{const _0x3b261c=_0x2ac89c;for(var _0x24c0f7=_0x2d2f33>0x1?void 0x0:_0x2d2f33?_0xa5c050(_0x1ca7e5,_0x231d2b):_0x1ca7e5,_0x33eacd=_0x10be38[_0x3b261c(0x17b)]-0x1,_0x4acb74;_0x33eacd>=0x0;_0x33eacd--)(_0x4acb74=_0x10be38[_0x33eacd])&&(_0x24c0f7=_0x4acb74(_0x24c0f7)||_0x24c0f7);return _0x24c0f7;},_0x11091c=(_0x511ae4,_0x30e77a)=>(_0x2b92e8,_0x57f83b)=>_0x30e77a(_0x2b92e8,_0x57f83b,_0x511ae4);let _0x3949fd=class extends _0x22bc10[_0x2ac89c(0x199)]{constructor(_0x2d5fe5,_0x442721){const _0x16a3a4=_0x2ac89c;super(),this[_0x16a3a4(0x1b9)]=_0x2d5fe5,this[_0x16a3a4(0x1ac)]=_0x442721,this[_0x16a3a4(0x187)]();}['_initDataSource'](){const _0x7f4153=_0x2ac89c;this[_0x7f4153(0x1b9)]['dataSource']=this[_0x7f4153(0x1ac)],this['_threadCommentDataSourceService'][_0x7f4153(0x1e5)]=!0x1;}};_0x3949fd=_0x2528bd([_0x11091c(0x0,_0x522633[_0x2ac89c(0x1c5)]),_0x11091c(0x1,_0x22bc10[_0x2ac89c(0x1ca)](_0x4eb718))],_0x3949fd);var _0x427079=Object['defineProperty'],_0x35a9d5=Object[_0x2ac89c(0x19d)],_0x2ac524=(_0x1749a3,_0x37b8fd,_0x190818)=>_0x37b8fd in _0x1749a3?_0x427079(_0x1749a3,_0x37b8fd,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x190818}):_0x1749a3[_0x37b8fd]=_0x190818,_0x26e169=(_0x1b1f70,_0x42edec,_0x4fd740,_0xf857df)=>{const _0x1ae82e=_0x2ac89c;for(var _0x3788bb=_0xf857df>0x1?void 0x0:_0xf857df?_0x35a9d5(_0x42edec,_0x4fd740):_0x42edec,_0x3a83f7=_0x1b1f70[_0x1ae82e(0x17b)]-0x1,_0x5414b2;_0x3a83f7>=0x0;_0x3a83f7--)(_0x5414b2=_0x1b1f70[_0x3a83f7])&&(_0x3788bb=_0x5414b2(_0x3788bb)||_0x3788bb);return _0x3788bb;},_0x93084=(_0x3b3ef6,_0x55f1e3)=>(_0x1a1c0a,_0x3b5ae6)=>_0x55f1e3(_0x1a1c0a,_0x3b5ae6,_0x3b3ef6),_0x18d367=(_0x495334,_0x2f52a7,_0x5a0bee)=>_0x2ac524(_0x495334,typeof _0x2f52a7!='symbol'?_0x2f52a7+'':_0x2f52a7,_0x5a0bee);_0x119cd[_0x2ac89c(0x1c9)]=class extends _0x22bc10[_0x2ac89c(0x18f)]{constructor(_0x712575=_0x57e0c5,_0x1c7ebc,_0x3d717c){const _0x3e9fe1=_0x2ac89c;super(),this[_0x3e9fe1(0x1a5)]=_0x712575,this['_injector']=_0x1c7ebc,this[_0x3e9fe1(0x1b2)]=_0x3d717c;const {..._0x2a9f52}=_0x22bc10[_0x3e9fe1(0x179)]({},_0x57e0c5,this['_config']);this[_0x3e9fe1(0x1b2)][_0x3e9fe1(0x1cc)](_0x27cf8b,_0x2a9f52);}[_0x2ac89c(0x1bf)](){const _0x2acf87=_0x2ac89c;[[_0x4eb718],[_0x3949fd],[_0x2e7d24]][_0x2acf87(0x16a)](_0x3234c5=>{const _0x757e14=_0x2acf87;this[_0x757e14(0x17e)][_0x757e14(0x17d)](_0x3234c5);});}[_0x2ac89c(0x160)](){const _0x3c8b09=_0x2ac89c;this[_0x3c8b09(0x17e)][_0x3c8b09(0x1e6)](_0x3949fd),this[_0x3c8b09(0x17e)][_0x3c8b09(0x1e6)](_0x2e7d24);}},_0x18d367(_0x119cd['UniverThreadCommentDataSourcePlugin'],_0x2ac89c(0x17a),_0xefad9f),_0x18d367(_0x119cd[_0x2ac89c(0x1c9)],_0x2ac89c(0x1af),_0x22bc10['UniverInstanceType']['UNIVER_UNKNOWN']),_0x119cd[_0x2ac89c(0x1c9)]=_0x26e169([_0x22bc10['DependentOn'](_0x2b9c93[_0x2ac89c(0x1b1)],_0x1c9d44[_0x2ac89c(0x1cb)],_0x26e160[_0x2ac89c(0x1aa)]),_0x93084(0x1,_0x22bc10['Inject'](_0x22bc10[_0x2ac89c(0x1c6)])),_0x93084(0x2,_0x22bc10[_0x2ac89c(0x1ad)])],_0x119cd['UniverThreadCommentDataSourcePlugin']),Object[_0x2ac89c(0x1e2)](_0x119cd,Symbol[_0x2ac89c(0x169)],{'value':_0x2ac89c(0x182)});}));function _0x53a2(_0x493a5a,_0x48f8f0){const _0x5ee83a=_0x5ee8();return _0x53a2=function(_0x53a27b,_0x532bc0){_0x53a27b=_0x53a27b-0x15a;let _0x19042b=_0x5ee83a[_0x53a27b];return _0x19042b;},_0x53a2(_0x493a5a,_0x48f8f0);}function _0x5ee8(){const _0x26e983=['Module','COMMENT','UniverThreadCommentUi','ThreadCommentModel','@univerjs-pro/license','_initDataSource','CommentService','81XlApmr','parse','/reply','@univerjs-pro/collaboration-client','/solved','UniverCore','Plugin','/universer-api/comment/unit/','disposeWithMe','comment','298197xOvyKV','rxjs','/universer-api/user/list','14EexEMB','user','error','Disposable','ref','@univerjs/thread-comment-ui','userID','getOwnPropertyDescriptor','getCurrentUser','671baRUKN','payload','Reply','getUser','solved','dayjs','_config','commentUpdate$','object','902216YoKFht','OpenOrReOpen','UniverLicensePlugin','deleteComment','_threadCommentDataSource','IConfigService','delete','type','content','UniverThreadCommentUIPlugin','_configService','replyId','map','amd','slice','listComments','users','_threadCommentDataSourceService','UserManagerService','comments','threadId','HTTPService','createTimestamp','onStarting','1001556YltUVo','format','Delete','replies','@univerjs/core','IThreadCommentDataSourceService','Injector','root','15YZuRzI','UniverThreadCommentDataSourcePlugin','Inject','UniverCollaborationClientPlugin','setConfig','UniverNetwork','rangeId','203160gOaKeU','_init','Add','resolveComment','UniverProThreadCommentDatasource','UniverProCollaborationClient','find','rangeType','_initUserSync','@univerjs/network','UniverProLicense','filter','post','bufferTime','94398pPCiTZ','resolved','thread-comment-data-source.config','_threadCommentModel','/delete','defineProperty','Solve','unitId','syncUpdateMutationToColla','get','_userService','values','276872qaNzsE','271208KTqxtj','CustomRangeType','CollaborationSessionService','onReady','reply','_sessionService','_commentService','/add','@univerjs/thread-comment','Unknown','/list','userId','toStringTag','forEach','addUser','addComment','Edit','pipe','body','Solved','getMemberID','code','size','_httpService','requireSession','customRanges','getUnit','subscribe','merge','pluginName','length','updateComment','add','_injector','UNRECOGNIZED','function','stringify'];_0x5ee8=function(){return _0x26e983;};return _0x5ee8();}
1
+ function _0xe027(){const _0x138747=['subscribe','Injector','Edit','type','payload','69160NHmLBv','Disposable','parentId','getComment','filter','saveCommentToSnapshot','Solved','Add','3943926ZeYDZf','/list','disposeWithMe','_userService','ThreadCommentModel','21630sgBnnQ','object','merge','UniverThreadCommentDataSourcePlugin','895815rMfFma','UniverProCollaborationClient','format','_config','UniverCore','addUser','listComments','thread-comment-data-source.config','UniverInstanceType','@univerjs/thread-comment-ui','rxjs','CommentService','UserManagerService','defineProperty','stringify','find','Solve','getMemberID','3DGdyzg','slice','_init','2214vEaMjU','delete','Delete','_threadCommentModel','userID','content','pipe','function','customRanges','UniverNetwork','getUnit','size','users','_injector','_initUserSync','679mQdgZR','getUser','comments','rangeType','@univerjs-pro/license','_threadCommentDataSource','bufferTime','_threadCommentDataSourceService','pluginName','replyId','requireSession','map','forEach','userId','@univerjs-pro/collaboration-client','get','/delete','add','IThreadCommentDataSourceService','IConfigService','syncUpdateMutationToColla','Unknown','/add','replies','UniverProThreadCommentDatasource','addComment','UniverThreadCommentUIPlugin','ref','rangeId','UniverCollaborationClientPlugin','symbol','UniverProLicense','_configService','205FGjebG','values','Reply','UNRECOGNIZED','@univerjs/network','/universer-api/comment/unit/','getCurrentUser','updateComment','deleteComment','28083484ykCfQG','setConfig','getOwnPropertyDescriptor','_initDataSource','2182866ouYduq','onReady','unitId','_httpService','Plugin','solved','reply','onStarting','error','@univerjs/core','personId','resolveComment','code','createTimestamp','user','commentUpdate$','@univerjs/thread-comment','post','amd','UNIVER_UNKNOWN','dayjs','Inject','parse','length','CustomRangeType','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','OpenOrReOpen','body','threadId','102412TKWSgi','_sessionService','COMMENT','dataSource','HTTPService','YYYY/MM/DD\x20HH:mm'];_0xe027=function(){return _0x138747;};return _0xe027();}function _0x52f8(_0x4fb342,_0x3373af){const _0xe0271f=_0xe027();return _0x52f8=function(_0x52f810,_0x3a4965){_0x52f810=_0x52f810-0x193;let _0x1864c6=_0xe0271f[_0x52f810];return _0x1864c6;},_0x52f8(_0x4fb342,_0x3373af);}(function(_0x34023c,_0x5d7969){const _0x45813d=_0x52f8,_0x2b3c37=_0x34023c();while(!![]){try{const _0x19d742=parseInt(_0x45813d(0x1de))/0x1+-parseInt(_0x45813d(0x1a5))/0x2*(parseInt(_0x45813d(0x1f0))/0x3)+-parseInt(_0x45813d(0x1c2))/0x4*(parseInt(_0x45813d(0x198))/0x5)+parseInt(_0x45813d(0x1d5))/0x6+-parseInt(_0x45813d(0x202))/0x7*(parseInt(_0x45813d(0x1cd))/0x8)+parseInt(_0x45813d(0x1f3))/0x9*(-parseInt(_0x45813d(0x1da))/0xa)+parseInt(_0x45813d(0x1a1))/0xb;if(_0x19d742===_0x5d7969)break;else _0x2b3c37['push'](_0x2b3c37['shift']());}catch(_0x26457a){_0x2b3c37['push'](_0x2b3c37['shift']());}}}(_0xe027,0x911b9),function(_0x2201f2,_0xc7da50){const _0x3ad85e=_0x52f8;typeof exports==_0x3ad85e(0x1db)&&typeof module<'u'?_0xc7da50(exports,require(_0x3ad85e(0x210)),require(_0x3ad85e(0x206)),require(_0x3ad85e(0x1ae)),require(_0x3ad85e(0x1e7)),require(_0x3ad85e(0x1b5)),require(_0x3ad85e(0x1e8)),require('@univerjs/network')):typeof define==_0x3ad85e(0x1fa)&&define[_0x3ad85e(0x1b7)]?define(['exports',_0x3ad85e(0x210),'@univerjs-pro/license',_0x3ad85e(0x1ae),_0x3ad85e(0x1e7),_0x3ad85e(0x1b5),_0x3ad85e(0x1e8),_0x3ad85e(0x19c)],_0xc7da50):(_0x2201f2=typeof globalThis<'u'?globalThis:_0x2201f2||self,_0xc7da50(_0x2201f2[_0x3ad85e(0x21a)]={},_0x2201f2[_0x3ad85e(0x1df)],_0x2201f2[_0x3ad85e(0x196)],_0x2201f2[_0x3ad85e(0x1e2)],_0x2201f2['UniverThreadCommentUi'],_0x2201f2['UniverThreadComment'],_0x2201f2['rxjs'],_0x2201f2[_0x3ad85e(0x1fc)]));}(this,function(_0x548496,_0x426221,_0xc37522,_0x1c699f,_0x87d4ea,_0xcce1a5,_0x147dd4,_0x521ef0){'use strict';const _0x116d82=_0x52f8;const _0x456c38=_0x116d82(0x1be);var _0x16e3d0=(_0x1af785=>(_0x1af785[_0x1af785['OpenOrReOpen']=0x0]=_0x116d82(0x1bf),_0x1af785[_0x1af785[_0x116d82(0x1d3)]=0x1]=_0x116d82(0x1d3),_0x1af785[_0x1af785['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x1af785))(_0x16e3d0||{}),_0x348269=(_0x40fa4c=>(_0x40fa4c[_0x40fa4c[_0x116d82(0x217)]=0x0]=_0x116d82(0x217),_0x40fa4c[_0x40fa4c['Add']=0x1]='Add',_0x40fa4c[_0x40fa4c[_0x116d82(0x19a)]=0x2]=_0x116d82(0x19a),_0x40fa4c[_0x40fa4c[_0x116d82(0x1ca)]=0x3]=_0x116d82(0x1ca),_0x40fa4c[_0x40fa4c[_0x116d82(0x1f5)]=0x4]=_0x116d82(0x1f5),_0x40fa4c[_0x40fa4c[_0x116d82(0x1ee)]=0x5]=_0x116d82(0x1ee),_0x40fa4c[_0x40fa4c[_0x116d82(0x19b)]=-0x1]=_0x116d82(0x19b),_0x40fa4c))(_0x348269||{});const _0x408a58=_0xefb243=>_0x1c699f[_0x116d82(0x1b9)](new Date(+_0xefb243))[_0x116d82(0x1e0)](_0x116d82(0x1c7)),_0x5f3f61=async(_0x29757c,_0x51ac4f)=>{const _0x1fd6a9=_0x116d82,_0x1db48f=_0x29757c[_0x1fd6a9(0x211)](_0x1c699f[_0x1fd6a9(0x1ea)]),_0x44e7d9=_0x29757c[_0x1fd6a9(0x211)](_0x521ef0[_0x1fd6a9(0x1c6)]);_0x51ac4f[_0x1fd6a9(0x20e)](_0x13bcd1=>{const _0x3f6484=_0x1fd6a9;_0x1db48f[_0x3f6484(0x203)](_0x13bcd1)&&_0x51ac4f[_0x3f6484(0x1f4)](_0x13bcd1);}),_0x51ac4f[_0x1fd6a9(0x1fe)]&&(await _0x44e7d9[_0x1fd6a9(0x211)]('/universer-api/user/list',{'params':{'userIDs':[..._0x51ac4f]}}))[_0x1fd6a9(0x1c0)]['users'][_0x1fd6a9(0x20e)](_0x5995ac=>{const _0xac934b=_0x1fd6a9;_0x5995ac&&_0x1db48f[_0xac934b(0x1e3)](_0x5995ac);});};var _0x5a206a=Object[_0x116d82(0x1a3)],_0x263b60=(_0x1fbe0a,_0x20341b,_0x183666,_0x496ece)=>{const _0x215ec8=_0x116d82;for(var _0x5afa5c=_0x496ece>0x1?void 0x0:_0x496ece?_0x5a206a(_0x20341b,_0x183666):_0x20341b,_0x48930a=_0x1fbe0a[_0x215ec8(0x1bc)]-0x1,_0x7c05ae;_0x48930a>=0x0;_0x48930a--)(_0x7c05ae=_0x1fbe0a[_0x48930a])&&(_0x5afa5c=_0x7c05ae(_0x5afa5c)||_0x5afa5c);return _0x5afa5c;},_0x5ac075=(_0x4d4148,_0xe81b4f)=>(_0x3136a5,_0x402d2b)=>_0xe81b4f(_0x3136a5,_0x402d2b,_0x4d4148);let _0x102805=class extends _0x1c699f[_0x116d82(0x1ce)]{constructor(_0x2af3a4,_0x53477f,_0x43fccb,_0x1b79ec){const _0x2a5b53=_0x116d82;super(),this['_commentService']=_0x2af3a4,this['_threadCommentModel']=_0x53477f,this['_userService']=_0x43fccb,this['_injector']=_0x1b79ec,this['_init'](),this[_0x2a5b53(0x201)]();}[_0x116d82(0x201)](){const _0x23d098=_0x116d82;this[_0x23d098(0x1d7)](this[_0x23d098(0x1f6)][_0x23d098(0x1b4)][_0x23d098(0x1f9)](_0x147dd4[_0x23d098(0x208)](0x10))[_0x23d098(0x1c8)](_0x1a253c=>{const _0x478236=_0x23d098,_0x5a814b=new Set();_0x1a253c[_0x478236(0x20e)](_0x444204=>{const _0x506986=_0x478236;switch(_0x444204[_0x506986(0x1cb)]){case _0x506986(0x213):{const _0x1f411a=_0x444204[_0x506986(0x1cc)][_0x506986(0x1af)];_0x5a814b[_0x506986(0x213)](_0x1f411a);break;}}}),_0x5f3f61(this[_0x478236(0x200)],_0x5a814b);}));}[_0x116d82(0x1f2)](){const _0x391011=_0x116d82;this[_0x391011(0x1d7)](this['_commentService']['commentUpdate$'][_0x391011(0x1c8)](async _0x19c4ca=>{const _0x41dc1=_0x391011;var _0x346823,_0x4b0569,_0x1f78f3,_0x3998f8;const _0x44e72c=(_0x346823=this['_threadCommentModel']['getUnit'](_0x19c4ca[_0x41dc1(0x1a7)])[_0x41dc1(0x1ed)](_0x5ca515=>_0x5ca515['threadId']===_0x19c4ca['threadId']))==null?void 0x0:_0x346823['root'];if(!_0x44e72c)return;const {unitId:_0x2a8853,subUnitId:_0x6a997f}=_0x44e72c;switch(_0x19c4ca[_0x41dc1(0x1b3)]&&this[_0x41dc1(0x1d8)][_0x41dc1(0x1e3)](_0x19c4ca[_0x41dc1(0x1b3)]),_0x19c4ca['type']){case _0x348269[_0x41dc1(0x1d4)]:break;case _0x348269[_0x41dc1(0x19a)]:{this[_0x41dc1(0x1f6)][_0x41dc1(0x21b)](_0x2a8853,_0x6a997f,{'unitId':_0x2a8853,'subUnitId':_0x6a997f,'ref':'','id':_0x19c4ca['replyId'],'dT':_0x408a58(+_0x19c4ca['createTimestamp']),'threadId':_0x19c4ca['threadId'],'personId':(_0x1f78f3=(_0x4b0569=_0x19c4ca[_0x41dc1(0x1b3)])==null?void 0x0:_0x4b0569[_0x41dc1(0x1f7)])!=null?_0x1f78f3:_0x19c4ca[_0x41dc1(0x20f)],'text':JSON['parse'](_0x19c4ca[_0x41dc1(0x1f8)]),'parentId':_0x44e72c['id']});break;}case _0x348269[_0x41dc1(0x1f5)]:{const _0x190aac=this['_threadCommentModel'][_0x41dc1(0x1d0)](_0x2a8853,_0x6a997f,_0x19c4ca['replyId']);_0x190aac&&_0x190aac[_0x41dc1(0x1cf)]&&this[_0x41dc1(0x1f6)][_0x41dc1(0x1a0)](_0x2a8853,_0x6a997f,_0x19c4ca[_0x41dc1(0x20b)]);break;}case _0x348269[_0x41dc1(0x1ca)]:{this[_0x41dc1(0x1f6)][_0x41dc1(0x19f)](_0x2a8853,_0x6a997f,{'commentId':_0x19c4ca[_0x41dc1(0x20b)],'text':JSON[_0x41dc1(0x1bb)](_0x19c4ca[_0x41dc1(0x1f8)])});break;}case _0x348269[_0x41dc1(0x1ee)]:{const _0x159724=(_0x3998f8=this[_0x41dc1(0x1f6)][_0x41dc1(0x1fd)](_0x19c4ca[_0x41dc1(0x1a7)])[_0x41dc1(0x1ed)](_0x449aea=>_0x449aea['threadId']===_0x19c4ca[_0x41dc1(0x1c1)]))==null?void 0x0:_0x3998f8['root'];_0x159724&&this[_0x41dc1(0x1f6)][_0x41dc1(0x1b0)](_0x2a8853,_0x6a997f,_0x159724['id'],_0x19c4ca[_0x41dc1(0x1aa)]===_0x16e3d0[_0x41dc1(0x1d3)]);break;}}}));}};_0x102805=_0x263b60([_0x5ac075(0x0,_0x1c699f[_0x116d82(0x1ba)](_0x426221[_0x116d82(0x1e9)])),_0x5ac075(0x1,_0x1c699f[_0x116d82(0x1ba)](_0xcce1a5[_0x116d82(0x1d9)])),_0x5ac075(0x2,_0x1c699f[_0x116d82(0x1ba)](_0x1c699f['UserManagerService'])),_0x5ac075(0x3,_0x1c699f[_0x116d82(0x1ba)](_0x1c699f[_0x116d82(0x1c9)]))],_0x102805);const _0x1eab7f=_0x116d82(0x1e5),_0xabd489={};var _0x5efb10=Object[_0x116d82(0x1a3)],_0xfa0ff3=(_0x541205,_0xb650c7,_0x5217ee,_0x349ff1)=>{const _0x326edc=_0x116d82;for(var _0xd85ac8=_0x349ff1>0x1?void 0x0:_0x349ff1?_0x5efb10(_0xb650c7,_0x5217ee):_0xb650c7,_0x352ce5=_0x541205[_0x326edc(0x1bc)]-0x1,_0x41053f;_0x352ce5>=0x0;_0x352ce5--)(_0x41053f=_0x541205[_0x352ce5])&&(_0xd85ac8=_0x41053f(_0xd85ac8)||_0xd85ac8);return _0xd85ac8;},_0xbf8b5b=(_0x297a5a,_0x3d8234)=>(_0x220058,_0x20bdd1)=>_0x3d8234(_0x220058,_0x20bdd1,_0x297a5a);function _0x34bfe5(_0x397723,_0x2ca247){const _0x8af5c3=_0x116d82,_0x2f1581=_0x397723[_0x8af5c3(0x219)][0x0];return{..._0x2ca247,'id':_0x2f1581[_0x8af5c3(0x20b)],'resolved':_0x397723[_0x8af5c3(0x1aa)]===0x1,'dT':_0x408a58(_0x2f1581[_0x8af5c3(0x1b2)]),'personId':_0x2f1581[_0x8af5c3(0x20f)],'threadId':_0x2f1581[_0x8af5c3(0x1c1)]};}function _0x4959a2(_0x5e4d87,_0x667d5d,_0x347ea2){const _0x3833e5=_0x116d82;var _0x4fdeaa,_0x3bf4fd;if(((_0x3bf4fd=(_0x4fdeaa=_0x5e4d87==null?void 0x0:_0x5e4d87[_0x3833e5(0x219)])==null?void 0x0:_0x4fdeaa[_0x3833e5(0x1bc)])!=null?_0x3bf4fd:0x0)>0x0){const _0x135770=(_0x9a188f,_0x15afd1)=>({'id':_0x9a188f[_0x3833e5(0x20b)],'threadId':_0x9a188f[_0x3833e5(0x1c1)],'dT':_0x408a58(_0x9a188f[_0x3833e5(0x1b2)]),'personId':_0x9a188f[_0x3833e5(0x20f)],'resolved':_0x5e4d87[_0x3833e5(0x1aa)]===_0x16e3d0[_0x3833e5(0x1d3)],'unitId':_0x667d5d,'subUnitId':_0x347ea2,'text':JSON[_0x3833e5(0x1bb)](_0x9a188f[_0x3833e5(0x1f8)]),'parentId':_0x15afd1}),_0x18acc6=_0x135770(_0x5e4d87[_0x3833e5(0x219)][0x0]);return{..._0x18acc6,'children':_0x5e4d87[_0x3833e5(0x219)][_0x3833e5(0x1f1)](0x1)[_0x3833e5(0x20d)](_0x129fc7=>_0x135770(_0x129fc7,_0x18acc6['id']))};}return null;}let _0x54b91b=class{constructor(_0x39ca5e,_0x1b4b63,_0x3926d3,_0x270d69){const _0x563a4a=_0x116d82;this[_0x563a4a(0x1a8)]=_0x39ca5e,this['_userService']=_0x1b4b63,this['_sessionService']=_0x3926d3,this[_0x563a4a(0x200)]=_0x270d69;}async[_0x116d82(0x21b)](_0x1bb360){const _0x3335f9=_0x116d82;var _0x1c6047,_0x20e732;const {parentId:_0x815b70,unitId:_0x56d781,text:_0x430df3,threadId:_0x5c8fee}=_0x1bb360,_0x371683=(_0x20e732=(_0x1c6047=_0x430df3[_0x3335f9(0x1fb)])==null?void 0x0:_0x1c6047[_0x3335f9(0x1d1)](_0x52079e=>_0x52079e[_0x3335f9(0x205)]===_0x1c699f[_0x3335f9(0x1bd)][_0x3335f9(0x1c4)])['map'](_0x4e6abc=>_0x4e6abc[_0x3335f9(0x193)]))!=null?_0x20e732:[],_0x38020b=JSON[_0x3335f9(0x1ec)](_0x430df3),_0x38fdf9=(await this[_0x3335f9(0x1c3)][_0x3335f9(0x20c)](_0x56d781))[_0x3335f9(0x1ef)]();if(_0x815b70){const _0x27d942={'memberId':_0x38fdf9,'unitId':_0x56d781,'content':_0x38020b,'mention':_0x371683,'threadId':_0x5c8fee},_0x434cc8=(await this['_httpService'][_0x3335f9(0x1b6)](_0x3335f9(0x19d)+_0x56d781+'/reply',{'body':_0x27d942}))[_0x3335f9(0x1c0)][_0x3335f9(0x1ab)];return{..._0x1bb360,'id':_0x434cc8[_0x3335f9(0x20b)],'dT':_0x1c699f[_0x3335f9(0x1b9)](+_0x434cc8[_0x3335f9(0x1b2)])[_0x3335f9(0x1e0)](_0x3335f9(0x1c7)),'personId':_0x434cc8[_0x3335f9(0x20f)]};}else{const _0x59a8da={'memberId':_0x38fdf9,'unitId':_0x56d781,'content':_0x38020b,'mention':_0x371683},_0x115952=await this['_httpService']['post'](_0x3335f9(0x19d)+_0x56d781+_0x3335f9(0x218),{'body':_0x59a8da});return _0x34bfe5(_0x115952['body']['comment'],_0x1bb360);}}async[_0x116d82(0x19f)](_0x59a569){const _0xa48423=_0x116d82;var _0x4795e5,_0x52c03c;const {text:_0x5ee8d3,unitId:_0x501209}=_0x59a569,_0x57d47a=(_0x52c03c=(_0x4795e5=_0x5ee8d3[_0xa48423(0x1fb)])==null?void 0x0:_0x4795e5['filter'](_0x1f3a9e=>_0x1f3a9e['rangeType']===_0x1c699f[_0xa48423(0x1bd)][_0xa48423(0x1c4)])['map'](_0x4d951d=>_0x4d951d[_0xa48423(0x193)]))!=null?_0x52c03c:[],_0x218496=JSON[_0xa48423(0x1ec)](_0x5ee8d3),_0x3f1db1=_0x59a569[_0xa48423(0x1c1)],_0x51c8a6=_0x59a569['id'],_0xe17eb4={'memberId':(await this['_sessionService'][_0xa48423(0x20c)](_0x501209))['getMemberID'](),'unitId':_0x501209,'threadId':_0x3f1db1,'mention':_0x57d47a,'content':_0x218496,'replyId':_0x51c8a6},_0x12cdf2=await this[_0xa48423(0x1a8)]['post']('/universer-api/comment/unit/'+_0x501209+'/edit',{'body':_0xe17eb4});return!_0x12cdf2[_0xa48423(0x1c0)][_0xa48423(0x1ad)]||_0x12cdf2['body'][_0xa48423(0x1ad)][_0xa48423(0x1b1)]===0x1;}async[_0x116d82(0x1b0)](_0x5abe8c){const _0x421e78=_0x116d82,{unitId:_0x1b7e39}=_0x5abe8c,_0xdc4ff9=_0x5abe8c[_0x421e78(0x1c1)],_0x3e3335={'memberId':this[_0x421e78(0x1d8)][_0x421e78(0x19e)]()['userID'],'unitId':_0x1b7e39,'threadId':_0xdc4ff9,'solved':_0x5abe8c['resolved']?_0x16e3d0['Solved']:_0x16e3d0[_0x421e78(0x1bf)]},_0x10c454=await this['_httpService']['post'](_0x421e78(0x19d)+_0x1b7e39+'/solved',{'body':_0x3e3335});return!_0x10c454['body']['error']||_0x10c454[_0x421e78(0x1c0)][_0x421e78(0x1ad)][_0x421e78(0x1b1)]===0x1;}async[_0x116d82(0x1a0)](_0x33c73e,_0x568d76,_0x3ba347,_0x2be894){const _0x3b8567=_0x116d82,_0xf1e7d6={'memberId':(await this[_0x3b8567(0x1c3)][_0x3b8567(0x20c)](_0x33c73e))[_0x3b8567(0x1ef)](),'threadId':_0x3ba347,'replyId':_0x2be894,'unitId':_0x33c73e},_0x37b982=await this[_0x3b8567(0x1a8)][_0x3b8567(0x1b6)](_0x3b8567(0x19d)+_0x33c73e+_0x3b8567(0x212),{'body':_0xf1e7d6});return!_0x37b982[_0x3b8567(0x1c0)][_0x3b8567(0x1ad)]||_0x37b982[_0x3b8567(0x1c0)]['error'][_0x3b8567(0x1b1)]===0x1;}async[_0x116d82(0x1e4)](_0x5674b5,_0x5bf4f6,_0x4876f9){const _0x161065=_0x116d82,_0x369366={'unitId':_0x5674b5,'threadId':_0x4876f9},_0x9e8f68=await this['_httpService']['post'](_0x161065(0x19d)+_0x5674b5+_0x161065(0x1d6),{'body':_0x369366}),_0x16f77b=_0x4876f9['map'](_0x4e8962=>_0x4959a2(_0x9e8f68[_0x161065(0x1c0)][_0x161065(0x204)][_0x4e8962],_0x5674b5,_0x5bf4f6))[_0x161065(0x1d1)](Boolean);return Object[_0x161065(0x199)](_0x9e8f68[_0x161065(0x1c0)][_0x161065(0x1ff)])[_0x161065(0x20e)](_0x80d514=>{const _0x314f8c=_0x161065;this[_0x314f8c(0x1d8)][_0x314f8c(0x1e3)](_0x80d514);}),_0x16f77b;}[_0x116d82(0x1d2)](_0x5b7314){const _0x1de497=_0x116d82;return{'id':_0x5b7314['id'],'threadId':_0x5b7314[_0x1de497(0x1c1)],'ref':_0x5b7314[_0x1de497(0x21d)]};}};_0x54b91b=_0xfa0ff3([_0xbf8b5b(0x0,_0x1c699f[_0x116d82(0x1ba)](_0x521ef0[_0x116d82(0x1c6)])),_0xbf8b5b(0x1,_0x1c699f[_0x116d82(0x1ba)](_0x1c699f[_0x116d82(0x1ea)])),_0xbf8b5b(0x2,_0x1c699f['Inject'](_0x426221['CollaborationSessionService'])),_0xbf8b5b(0x3,_0x1c699f[_0x116d82(0x1ba)](_0x1c699f[_0x116d82(0x1c9)]))],_0x54b91b);var _0xd9f954=Object[_0x116d82(0x1a3)],_0x21f4e2=(_0xa6e4ec,_0x5291f7,_0x25411a,_0x450458)=>{const _0x37369d=_0x116d82;for(var _0x221026=_0x450458>0x1?void 0x0:_0x450458?_0xd9f954(_0x5291f7,_0x25411a):_0x5291f7,_0x510ae6=_0xa6e4ec[_0x37369d(0x1bc)]-0x1,_0x566447;_0x510ae6>=0x0;_0x510ae6--)(_0x566447=_0xa6e4ec[_0x510ae6])&&(_0x221026=_0x566447(_0x221026)||_0x221026);return _0x221026;},_0x4dc25a=(_0xcfdc0e,_0x17cc5f)=>(_0x312fd5,_0x4b2496)=>_0x17cc5f(_0x312fd5,_0x4b2496,_0xcfdc0e);let _0x161aae=class extends _0x1c699f['Disposable']{constructor(_0x24295c,_0x5c6753){const _0x12e491=_0x116d82;super(),this[_0x12e491(0x209)]=_0x24295c,this[_0x12e491(0x207)]=_0x5c6753,this[_0x12e491(0x1a4)]();}[_0x116d82(0x1a4)](){const _0x1866bc=_0x116d82;this[_0x1866bc(0x209)][_0x1866bc(0x1c5)]=this[_0x1866bc(0x207)],this['_threadCommentDataSourceService'][_0x1866bc(0x216)]=!0x1;}};_0x161aae=_0x21f4e2([_0x4dc25a(0x0,_0xcce1a5[_0x116d82(0x214)]),_0x4dc25a(0x1,_0x1c699f[_0x116d82(0x1ba)](_0x54b91b))],_0x161aae);var _0x100f6e=Object[_0x116d82(0x1eb)],_0x5ecccc=Object['getOwnPropertyDescriptor'],_0x32371c=(_0x402718,_0x4f0803,_0x24988d)=>_0x4f0803 in _0x402718?_0x100f6e(_0x402718,_0x4f0803,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x24988d}):_0x402718[_0x4f0803]=_0x24988d,_0x1434f9=(_0x274279,_0x414d9f,_0x50fe16,_0x4685d9)=>{const _0x17f876=_0x116d82;for(var _0x55c349=_0x4685d9>0x1?void 0x0:_0x4685d9?_0x5ecccc(_0x414d9f,_0x50fe16):_0x414d9f,_0x58e2b4=_0x274279[_0x17f876(0x1bc)]-0x1,_0x5406fb;_0x58e2b4>=0x0;_0x58e2b4--)(_0x5406fb=_0x274279[_0x58e2b4])&&(_0x55c349=_0x5406fb(_0x55c349)||_0x55c349);return _0x55c349;},_0x466e95=(_0x477af6,_0x5b002c)=>(_0x251b06,_0x4d247f)=>_0x5b002c(_0x251b06,_0x4d247f,_0x477af6),_0x3b8683=(_0x1cc1b5,_0x4a396d,_0x5395bb)=>_0x32371c(_0x1cc1b5,typeof _0x4a396d!=_0x116d82(0x195)?_0x4a396d+'':_0x4a396d,_0x5395bb);_0x548496[_0x116d82(0x1dd)]=class extends _0x1c699f[_0x116d82(0x1a9)]{constructor(_0xf5a0d3=_0xabd489,_0xd9fecd,_0x5137a5){const _0x13851d=_0x116d82;super(),this[_0x13851d(0x1e1)]=_0xf5a0d3,this[_0x13851d(0x200)]=_0xd9fecd,this[_0x13851d(0x197)]=_0x5137a5;const {..._0x20c592}=_0x1c699f[_0x13851d(0x1dc)]({},_0xabd489,this[_0x13851d(0x1e1)]);this['_configService'][_0x13851d(0x1a2)](_0x1eab7f,_0x20c592);}[_0x116d82(0x1ac)](){[[_0x54b91b],[_0x161aae],[_0x102805]]['forEach'](_0x3bf10f=>{const _0x3b6ba9=_0x52f8;this[_0x3b6ba9(0x200)]['add'](_0x3bf10f);});}[_0x116d82(0x1a6)](){const _0x4d73c6=_0x116d82;this[_0x4d73c6(0x200)][_0x4d73c6(0x211)](_0x161aae),this[_0x4d73c6(0x200)][_0x4d73c6(0x211)](_0x102805);}},_0x3b8683(_0x548496[_0x116d82(0x1dd)],_0x116d82(0x20a),_0x456c38),_0x3b8683(_0x548496[_0x116d82(0x1dd)],_0x116d82(0x1cb),_0x1c699f[_0x116d82(0x1e6)][_0x116d82(0x1b8)]),_0x548496['UniverThreadCommentDataSourcePlugin']=_0x1434f9([_0x1c699f['DependentOn'](_0x87d4ea[_0x116d82(0x21c)],_0x426221[_0x116d82(0x194)],_0xc37522['UniverLicensePlugin']),_0x466e95(0x1,_0x1c699f[_0x116d82(0x1ba)](_0x1c699f[_0x116d82(0x1c9)])),_0x466e95(0x2,_0x1c699f[_0x116d82(0x215)])],_0x548496[_0x116d82(0x1dd)]),Object['defineProperty'](_0x548496,Symbol['toStringTag'],{'value':'Module'});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.7.0-nightly.202505211607",
3
+ "version": "0.7.0-nightly.202505231607",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,19 +45,19 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.7.0-nightly.202505211607",
49
- "@univerjs-pro/license": "0.7.0-nightly.202505211607",
50
- "@univerjs/network": "0.7.0-nightly.202505211607",
48
+ "@univerjs-pro/collaboration-client": "0.7.0-nightly.202505231607",
49
+ "@univerjs-pro/license": "0.7.0-nightly.202505231607",
50
+ "@univerjs/core": "0.7.0-nightly.202505231607",
51
51
  "@univerjs/protocol": "0.1.46-alpha.3",
52
- "@univerjs/core": "0.7.0-nightly.202505211607",
53
- "@univerjs/thread-comment": "0.7.0-nightly.202505211607",
54
- "@univerjs/thread-comment-ui": "0.7.0-nightly.202505211607"
52
+ "@univerjs/thread-comment": "0.7.0-nightly.202505231607",
53
+ "@univerjs/thread-comment-ui": "0.7.0-nightly.202505231607",
54
+ "@univerjs/network": "0.7.0-nightly.202505231607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.8.3",
59
59
  "vite": "^6.3.5",
60
- "vitest": "^3.1.3",
60
+ "vitest": "^3.1.4",
61
61
  "@univerjs-infra/shared": "0.7.0"
62
62
  },
63
63
  "scripts": {