@univerjs-pro/thread-comment-datasource 0.12.3 → 0.12.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x15a997=_0x5748;(function(_0x35cf59,_0x2adf24){const _0x92dd60=_0x5748,_0x1e1910=_0x35cf59();while(!![]){try{const _0x5371ae=-parseInt(_0x92dd60(0x226))/0x1*(parseInt(_0x92dd60(0x1c2))/0x2)+parseInt(_0x92dd60(0x210))/0x3*(parseInt(_0x92dd60(0x1dd))/0x4)+-parseInt(_0x92dd60(0x1e9))/0x5*(-parseInt(_0x92dd60(0x1c6))/0x6)+parseInt(_0x92dd60(0x1c5))/0x7+parseInt(_0x92dd60(0x1b8))/0x8+parseInt(_0x92dd60(0x22a))/0x9+parseInt(_0x92dd60(0x228))/0xa*(-parseInt(_0x92dd60(0x1fe))/0xb);if(_0x5371ae===_0x2adf24)break;else _0x1e1910['push'](_0x1e1910['shift']());}catch(_0x3b58bd){_0x1e1910['push'](_0x1e1910['shift']());}}}(_0x532b,0xb16b5));Object[_0x15a997(0x1f5)](exports,Symbol[_0x15a997(0x1e7)],{'value':_0x15a997(0x1b2)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x165252=>(_0x165252[_0x165252[_0x15a997(0x220)]=0x0]=_0x15a997(0x220),_0x165252[_0x165252[_0x15a997(0x1f7)]=0x1]='Solved',_0x165252[_0x165252[_0x15a997(0x1f8)]=-0x1]=_0x15a997(0x1f8),_0x165252))(I||{}),v=(_0x10786b=>(_0x10786b[_0x10786b['Unknown']=0x0]=_0x15a997(0x223),_0x10786b[_0x10786b['Add']=0x1]=_0x15a997(0x227),_0x10786b[_0x10786b[_0x15a997(0x21b)]=0x2]='Reply',_0x10786b[_0x10786b['Edit']=0x3]='Edit',_0x10786b[_0x10786b['Delete']=0x4]='Delete',_0x10786b[_0x10786b[_0x15a997(0x1bd)]=0x5]=_0x15a997(0x1bd),_0x10786b[_0x10786b[_0x15a997(0x1f8)]=-0x1]=_0x15a997(0x1f8),_0x10786b))(v||{});const f=_0x5497e3=>c[_0x15a997(0x205)](new Date(+_0x5497e3))[_0x15a997(0x22b)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x281528,_0x26248f)=>{const _0x5d36e1=_0x15a997,_0x5fe2e9=_0x281528[_0x5d36e1(0x1ea)](c['UserManagerService']),_0x436a23=_0x281528[_0x5d36e1(0x1ea)](P[_0x5d36e1(0x1d3)]);_0x26248f[_0x5d36e1(0x1fd)](_0x16ef47=>{const _0x53a1ef=_0x5d36e1;_0x5fe2e9[_0x53a1ef(0x1d9)](_0x16ef47)&&_0x26248f['delete'](_0x16ef47);}),_0x26248f[_0x5d36e1(0x1c1)]&&(await _0x436a23['get'](_0x5d36e1(0x1d5),{'params':{'userIDs':[..._0x26248f]}}))[_0x5d36e1(0x219)]['users'][_0x5d36e1(0x1fd)](_0x38440c=>{const _0x376eee=_0x5d36e1;_0x38440c&&_0x5fe2e9[_0x376eee(0x1fb)](_0x38440c);});};var $=Object[_0x15a997(0x1bb)],E=(_0x1a8947,_0x2c5bad,_0x5d5441,_0x447673)=>{const _0x52edeb=_0x15a997;for(var _0x59610a=_0x447673>0x1?void 0x0:_0x447673?$(_0x2c5bad,_0x5d5441):_0x2c5bad,_0x1a3f55=_0x1a8947[_0x52edeb(0x217)]-0x1,_0x5b82bb;_0x1a3f55>=0x0;_0x1a3f55--)(_0x5b82bb=_0x1a8947[_0x1a3f55])&&(_0x59610a=_0x5b82bb(_0x59610a)||_0x59610a);return _0x59610a;},S=(_0x47042b,_0x17272b)=>(_0x49da53,_0x463677)=>_0x17272b(_0x49da53,_0x463677,_0x47042b);let _=class extends c[_0x15a997(0x1e1)]{constructor(_0x4f17f0,_0x1827dc,_0x45c786,_0x13f1ce){const _0x15cb68=_0x15a997;super(),this[_0x15cb68(0x218)]=_0x4f17f0,this[_0x15cb68(0x202)]=_0x1827dc,this[_0x15cb68(0x21a)]=_0x45c786,this['_injector']=_0x13f1ce,this['_init'](),this[_0x15cb68(0x214)]();}[_0x15a997(0x214)](){const _0x475779=_0x15a997;this[_0x475779(0x222)](this[_0x475779(0x202)][_0x475779(0x204)][_0x475779(0x1f3)](j[_0x475779(0x211)](0x10))[_0x475779(0x21c)](_0xa83222=>{const _0x4e2246=_0x475779,_0x358653=new Set();_0xa83222[_0x4e2246(0x1fd)](_0x575efc=>{const _0x59be20=_0x4e2246;switch(_0x575efc[_0x59be20(0x1be)]){case'add':{const _0x214152=_0x575efc[_0x59be20(0x21f)]['personId'];_0x358653[_0x59be20(0x1e8)](_0x214152);break;}}}),R(this[_0x4e2246(0x1c3)],_0x358653);}));}['_init'](){const _0x1bf17f=_0x15a997;this[_0x1bf17f(0x222)](this[_0x1bf17f(0x218)]['commentUpdate$'][_0x1bf17f(0x21c)](async _0x3c33c8=>{const _0x5d29fe=_0x1bf17f;var _0x565205,_0x2484a8,_0x3b47e6,_0x1deccb;const _0x192599=(_0x565205=this[_0x5d29fe(0x202)]['getUnit'](_0x3c33c8[_0x5d29fe(0x1dc)])['find'](_0x547349=>_0x547349[_0x5d29fe(0x1c7)]===_0x3c33c8[_0x5d29fe(0x1c7)]))==null?void 0x0:_0x565205[_0x5d29fe(0x216)];if(!_0x192599)return;const {unitId:_0x437549,subUnitId:_0x1d1c08}=_0x192599;switch(_0x3c33c8[_0x5d29fe(0x215)]&&this[_0x5d29fe(0x21a)][_0x5d29fe(0x1fb)](_0x3c33c8[_0x5d29fe(0x215)]),_0x3c33c8[_0x5d29fe(0x1be)]){case v['Add']:break;case v[_0x5d29fe(0x21b)]:{this[_0x5d29fe(0x202)][_0x5d29fe(0x1e3)](_0x437549,_0x1d1c08,{'unitId':_0x437549,'subUnitId':_0x1d1c08,'ref':'','id':_0x3c33c8[_0x5d29fe(0x20f)],'dT':f(+_0x3c33c8[_0x5d29fe(0x1cb)]),'threadId':_0x3c33c8['threadId'],'personId':(_0x3b47e6=(_0x2484a8=_0x3c33c8['user'])==null?void 0x0:_0x2484a8['userID'])!=null?_0x3b47e6:_0x3c33c8[_0x5d29fe(0x20a)],'text':JSON[_0x5d29fe(0x1e5)](_0x3c33c8[_0x5d29fe(0x225)]),'parentId':_0x192599['id']});break;}case v[_0x5d29fe(0x209)]:{const _0x4366c0=this['_threadCommentModel'][_0x5d29fe(0x213)](_0x437549,_0x1d1c08,_0x3c33c8[_0x5d29fe(0x20f)]);_0x4366c0&&_0x4366c0[_0x5d29fe(0x203)]&&this[_0x5d29fe(0x202)][_0x5d29fe(0x206)](_0x437549,_0x1d1c08,_0x3c33c8[_0x5d29fe(0x20f)]);break;}case v[_0x5d29fe(0x20e)]:{this[_0x5d29fe(0x202)][_0x5d29fe(0x1fa)](_0x437549,_0x1d1c08,{'commentId':_0x3c33c8[_0x5d29fe(0x20f)],'text':JSON[_0x5d29fe(0x1e5)](_0x3c33c8[_0x5d29fe(0x225)])});break;}case v[_0x5d29fe(0x1bd)]:{const _0xe369b4=(_0x1deccb=this['_threadCommentModel'][_0x5d29fe(0x1d8)](_0x3c33c8[_0x5d29fe(0x1dc)])[_0x5d29fe(0x1d6)](_0x2f62bf=>_0x2f62bf[_0x5d29fe(0x1c7)]===_0x3c33c8[_0x5d29fe(0x1c7)]))==null?void 0x0:_0x1deccb[_0x5d29fe(0x216)];_0xe369b4&&this[_0x5d29fe(0x202)][_0x5d29fe(0x1e4)](_0x437549,_0x1d1c08,_0xe369b4['id'],_0x3c33c8[_0x5d29fe(0x212)]===I[_0x5d29fe(0x1f7)]);break;}}}));}};_=E([S(0x0,c[_0x15a997(0x1de)](b[_0x15a997(0x1df)])),S(0x1,c[_0x15a997(0x1de)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c['UserManagerService'])),S(0x3,c[_0x15a997(0x1de)](c[_0x15a997(0x207)]))],_);const q=_0x15a997(0x21d),D={};function _0x5748(_0x3577b2,_0x44bd10){const _0x532b7b=_0x532b();return _0x5748=function(_0x5748d6,_0x4215c9){_0x5748d6=_0x5748d6-0x1b1;let _0x1fb448=_0x532b7b[_0x5748d6];return _0x1fb448;},_0x5748(_0x3577b2,_0x44bd10);}var A=Object[_0x15a997(0x1bb)],x=(_0xb35001,_0x7a4f67,_0x50ed9f,_0x288d63)=>{for(var _0x4a6863=_0x288d63>0x1?void 0x0:_0x288d63?A(_0x7a4f67,_0x50ed9f):_0x7a4f67,_0x99ac6=_0xb35001['length']-0x1,_0x1d2f38;_0x99ac6>=0x0;_0x99ac6--)(_0x1d2f38=_0xb35001[_0x99ac6])&&(_0x4a6863=_0x1d2f38(_0x4a6863)||_0x4a6863);return _0x4a6863;},C=(_0x5c9e53,_0x52ca93)=>(_0x140e1b,_0x2bae03)=>_0x52ca93(_0x140e1b,_0x2bae03,_0x5c9e53);function Y(_0x301fbc,_0x79c39b){const _0x5cb637=_0x15a997,_0x51c106=_0x301fbc['replies'][0x0];return{..._0x79c39b,'id':_0x51c106[_0x5cb637(0x20f)],'resolved':_0x301fbc[_0x5cb637(0x212)]===0x1,'dT':f(_0x51c106[_0x5cb637(0x1cb)]),'personId':_0x51c106[_0x5cb637(0x20a)],'threadId':_0x51c106[_0x5cb637(0x1c7)]};}function G(_0x2f6f72,_0x397559,_0x252094){const _0x2f6bd4=_0x15a997;var _0x314d53,_0x2d1d7e;if(((_0x2d1d7e=(_0x314d53=_0x2f6f72==null?void 0x0:_0x2f6f72[_0x2f6bd4(0x208)])==null?void 0x0:_0x314d53['length'])!=null?_0x2d1d7e:0x0)>0x0){const _0x284399=(_0x34fa9d,_0x177cb1)=>({'id':_0x34fa9d[_0x2f6bd4(0x20f)],'threadId':_0x34fa9d['threadId'],'dT':f(_0x34fa9d[_0x2f6bd4(0x1cb)]),'personId':_0x34fa9d[_0x2f6bd4(0x20a)],'resolved':_0x2f6f72[_0x2f6bd4(0x212)]===I[_0x2f6bd4(0x1f7)],'unitId':_0x397559,'subUnitId':_0x252094,'text':JSON[_0x2f6bd4(0x1e5)](_0x34fa9d['content']),'parentId':_0x177cb1}),_0x4e418f=_0x284399(_0x2f6f72[_0x2f6bd4(0x208)][0x0]);return{..._0x4e418f,'children':_0x2f6f72[_0x2f6bd4(0x208)][_0x2f6bd4(0x1f6)](0x1)[_0x2f6bd4(0x1cd)](_0x52ac40=>_0x284399(_0x52ac40,_0x4e418f['id']))};}return null;}let p=class{constructor(_0x553c17,_0x5b40dd,_0x3f9a89){const _0x34400f=_0x15a997;this[_0x34400f(0x1ce)]=_0x553c17,this[_0x34400f(0x21a)]=_0x5b40dd,this[_0x34400f(0x1b4)]=_0x3f9a89;}async[_0x15a997(0x1e3)](_0x2732ce){const _0x54b979=_0x15a997;var _0x5ca4e8,_0x300f1b;const {parentId:_0x2bf8d0,unitId:_0x387365,text:_0xf197a5,threadId:_0x2e6526}=_0x2732ce,_0xcfa58c=(_0x300f1b=(_0x5ca4e8=_0xf197a5['customRanges'])==null?void 0x0:_0x5ca4e8['filter'](_0x5cf4dd=>_0x5cf4dd[_0x54b979(0x1bc)]===c[_0x54b979(0x1d1)]['COMMENT'])[_0x54b979(0x1cd)](_0x52233c=>_0x52233c['rangeId']))!=null?_0x300f1b:[],_0x5eb873=JSON['stringify'](_0xf197a5),_0x25b0cc=(await this[_0x54b979(0x1b4)][_0x54b979(0x1e6)](_0x387365))['getMemberID']();if(_0x2bf8d0){const _0x456e8d={'memberId':_0x25b0cc,'unitId':_0x387365,'content':_0x5eb873,'mention':_0xcfa58c,'threadId':_0x2e6526},_0x5bcfea=(await this['_httpService'][_0x54b979(0x1c9)](_0x54b979(0x1cf)+_0x387365+_0x54b979(0x22c),{'body':_0x456e8d}))[_0x54b979(0x219)][_0x54b979(0x1d2)];return{..._0x2732ce,'id':_0x5bcfea[_0x54b979(0x20f)],'dT':c[_0x54b979(0x205)](+_0x5bcfea[_0x54b979(0x1cb)])[_0x54b979(0x22b)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5bcfea[_0x54b979(0x20a)]};}else{const _0x5c20fc={'memberId':_0x25b0cc,'unitId':_0x387365,'content':_0x5eb873,'mention':_0xcfa58c},_0x46eee9=await this[_0x54b979(0x1ce)]['post']('/universer-api/comment/unit/'+_0x387365+_0x54b979(0x1db),{'body':_0x5c20fc});return Y(_0x46eee9[_0x54b979(0x219)][_0x54b979(0x1ef)],_0x2732ce);}}async['updateComment'](_0x3de5be){const _0xb392aa=_0x15a997;var _0x31c4d0,_0x354d48;const {text:_0x1ca0cf,unitId:_0x5cb877}=_0x3de5be,_0xbd752b=(_0x354d48=(_0x31c4d0=_0x1ca0cf[_0xb392aa(0x1ee)])==null?void 0x0:_0x31c4d0[_0xb392aa(0x1b6)](_0x186152=>_0x186152[_0xb392aa(0x1bc)]===c[_0xb392aa(0x1d1)][_0xb392aa(0x1f1)])[_0xb392aa(0x1cd)](_0x480d16=>_0x480d16[_0xb392aa(0x20c)]))!=null?_0x354d48:[],_0x4687c2=JSON[_0xb392aa(0x1d7)](_0x1ca0cf),_0x6629b1=_0x3de5be[_0xb392aa(0x1c7)],_0x4c6345=_0x3de5be['id'],_0x2386e9={'memberId':(await this['_sessionService']['requireSession'](_0x5cb877))['getMemberID'](),'unitId':_0x5cb877,'threadId':_0x6629b1,'mention':_0xbd752b,'content':_0x4687c2,'replyId':_0x4c6345},_0x42db5f=await this[_0xb392aa(0x1ce)][_0xb392aa(0x1c9)](_0xb392aa(0x1cf)+_0x5cb877+'/edit',{'body':_0x2386e9});return!_0x42db5f['body'][_0xb392aa(0x1f0)]||_0x42db5f[_0xb392aa(0x219)][_0xb392aa(0x1f0)]['code']===0x1;}async[_0x15a997(0x1e4)](_0x3fbdd0){const _0x265b15=_0x15a997,{unitId:_0x171b5e}=_0x3fbdd0,_0xa76af=_0x3fbdd0[_0x265b15(0x1c7)],_0x5a0cea={'memberId':this['_userService'][_0x265b15(0x1ec)]()[_0x265b15(0x201)],'unitId':_0x171b5e,'threadId':_0xa76af,'solved':_0x3fbdd0[_0x265b15(0x1fc)]?I[_0x265b15(0x1f7)]:I[_0x265b15(0x220)]},_0x3ee6a2=await this[_0x265b15(0x1ce)]['post'](_0x265b15(0x1cf)+_0x171b5e+'/solved',{'body':_0x5a0cea});return!_0x3ee6a2[_0x265b15(0x219)][_0x265b15(0x1f0)]||_0x3ee6a2[_0x265b15(0x219)][_0x265b15(0x1f0)][_0x265b15(0x221)]===0x1;}async[_0x15a997(0x206)](_0xa6a345,_0x400ecf,_0x1a1fff,_0x1ce96a){const _0x2c35f9=_0x15a997,_0x29e94c={'memberId':(await this[_0x2c35f9(0x1b4)][_0x2c35f9(0x1e6)](_0xa6a345))['getMemberID'](),'threadId':_0x1a1fff,'replyId':_0x1ce96a,'unitId':_0xa6a345},_0x2c25b1=await this[_0x2c35f9(0x1ce)][_0x2c35f9(0x1c9)](_0x2c35f9(0x1cf)+_0xa6a345+_0x2c35f9(0x1ed),{'body':_0x29e94c});return!_0x2c25b1['body'][_0x2c35f9(0x1f0)]||_0x2c25b1[_0x2c35f9(0x219)][_0x2c35f9(0x1f0)][_0x2c35f9(0x221)]===0x1;}async[_0x15a997(0x1c0)](_0x204f8d,_0x4bcd05,_0x5ba462){const _0xf936df=_0x15a997,_0x362418={'unitId':_0x204f8d,'threadId':_0x5ba462},_0x49c38b=await this[_0xf936df(0x1ce)][_0xf936df(0x1c9)]('/universer-api/comment/unit/'+_0x204f8d+_0xf936df(0x1ff),{'body':_0x362418}),_0x5c048b=_0x5ba462[_0xf936df(0x1cd)](_0x22d230=>G(_0x49c38b['body'][_0xf936df(0x1b9)][_0x22d230],_0x204f8d,_0x4bcd05))['filter'](Boolean);return Object[_0xf936df(0x1d4)](_0x49c38b[_0xf936df(0x219)][_0xf936df(0x1f9)])[_0xf936df(0x1fd)](_0x520919=>{const _0x4d99d1=_0xf936df;this[_0x4d99d1(0x21a)][_0x4d99d1(0x1fb)](_0x520919);}),_0x5c048b;}[_0x15a997(0x1ca)](_0x460596){const _0xf438fe=_0x15a997;return{'id':_0x460596['id'],'threadId':_0x460596['threadId'],'ref':_0x460596[_0xf438fe(0x1eb)]};}};p=x([C(0x0,c[_0x15a997(0x1de)](P[_0x15a997(0x1d3)])),C(0x1,c['Inject'](c[_0x15a997(0x1c4)])),C(0x2,c[_0x15a997(0x1de)](b[_0x15a997(0x1f4)]))],p);function _0x532b(){const _0x4c4cdf=['stringify','getUnit','getUser','_config','/add','unitId','8ULQCoo','Inject','CommentService','onStarting','Disposable','_configService','addComment','resolveComment','parse','requireSession','toStringTag','add','5VWgTKH','get','ref','getCurrentUser','/delete','customRanges','comment','error','COMMENT','_initDataSource','pipe','CollaborationSessionService','defineProperty','slice','Solved','UNRECOGNIZED','users','updateComment','addUser','resolved','forEach','34166BrflDe','/list','UniverCollaborationClientPlugin','userID','_threadCommentModel','parentId','commentUpdate$','dayjs','deleteComment','Injector','replies','Delete','userId','setConfig','rangeId','DependentOn','Edit','replyId','1109154MVUlAy','bufferTime','solved','getComment','_initUserSync','user','root','length','_commentService','body','_userService','Reply','subscribe','thread-comment-data-source.config','IThreadCommentDataSourceService','payload','OpenOrReOpen','code','disposeWithMe','Unknown','IConfigService','content','2339nxZRDo','Add','5790QCinHI','Plugin','5297175rBKDCy','format','/reply','UniverLicensePlugin','_threadCommentDataSource','Module','UNIVER_UNKNOWN','_sessionService','_threadCommentDataSourceService','filter','symbol','7240376EdIoxV','comments','UniverInstanceType','getOwnPropertyDescriptor','rangeType','Solve','type','UniverThreadCommentUIPlugin','listComments','size','802XaGiKL','_injector','UserManagerService','1219253jdtqVj','6334710Gzdsoe','threadId','dataSource','post','saveCommentToSnapshot','createTimestamp','pluginName','map','_httpService','/universer-api/comment/unit/','UniverThreadCommentDataSourcePlugin','CustomRangeType','reply','HTTPService','values','/universer-api/user/list','find'];_0x532b=function(){return _0x4c4cdf;};return _0x532b();}var H=Object[_0x15a997(0x1bb)],J=(_0x5d6208,_0x3a4fc0,_0x56173f,_0x575b5f)=>{const _0x6c855a=_0x15a997;for(var _0x5c0feb=_0x575b5f>0x1?void 0x0:_0x575b5f?H(_0x3a4fc0,_0x56173f):_0x3a4fc0,_0x4d7b3b=_0x5d6208[_0x6c855a(0x217)]-0x1,_0x8051f4;_0x4d7b3b>=0x0;_0x4d7b3b--)(_0x8051f4=_0x5d6208[_0x4d7b3b])&&(_0x5c0feb=_0x8051f4(_0x5c0feb)||_0x5c0feb);return _0x5c0feb;},y=(_0x2fd9ab,_0x385d7f)=>(_0x278747,_0x1c1ab1)=>_0x385d7f(_0x278747,_0x1c1ab1,_0x2fd9ab);let g=class extends c[_0x15a997(0x1e1)]{constructor(_0x309199,_0x31eefa){const _0x4a6a33=_0x15a997;super(),this['_threadCommentDataSourceService']=_0x309199,this[_0x4a6a33(0x1b1)]=_0x31eefa,this[_0x4a6a33(0x1f2)]();}['_initDataSource'](){const _0xf4b7ec=_0x15a997;this[_0xf4b7ec(0x1b5)][_0xf4b7ec(0x1c8)]=this[_0xf4b7ec(0x1b1)],this[_0xf4b7ec(0x1b5)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x15a997(0x21e)]),y(0x1,c['Inject'](p))],g);var F=Object[_0x15a997(0x1f5)],L=Object[_0x15a997(0x1bb)],Z=(_0x21cbca,_0x5295dc,_0x23292a)=>_0x5295dc in _0x21cbca?F(_0x21cbca,_0x5295dc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x23292a}):_0x21cbca[_0x5295dc]=_0x23292a,W=(_0x3b9afe,_0x3b1a61,_0x1043ef,_0x348d42)=>{const _0x278083=_0x15a997;for(var _0x29ba33=_0x348d42>0x1?void 0x0:_0x348d42?L(_0x3b1a61,_0x1043ef):_0x3b1a61,_0x364840=_0x3b9afe[_0x278083(0x217)]-0x1,_0x5b4049;_0x364840>=0x0;_0x364840--)(_0x5b4049=_0x3b9afe[_0x364840])&&(_0x29ba33=_0x5b4049(_0x29ba33)||_0x29ba33);return _0x29ba33;},O=(_0x587ef7,_0x54df89)=>(_0x25f1ab,_0x12a783)=>_0x54df89(_0x25f1ab,_0x12a783,_0x587ef7),N=(_0x58736f,_0x3f3aae,_0x29c8a8)=>Z(_0x58736f,typeof _0x3f3aae!=_0x15a997(0x1b7)?_0x3f3aae+'':_0x3f3aae,_0x29c8a8);exports[_0x15a997(0x1d0)]=class extends c[_0x15a997(0x229)]{constructor(_0x3154db=D,_0x4f94bd,_0xa0573b){const _0x441c93=_0x15a997;super(),this['_config']=_0x3154db,this[_0x441c93(0x1c3)]=_0x4f94bd,this[_0x441c93(0x1e2)]=_0xa0573b;const {..._0x59a8f6}=c['merge']({},D,this[_0x441c93(0x1da)]);this[_0x441c93(0x1e2)][_0x441c93(0x20b)](q,_0x59a8f6);}[_0x15a997(0x1e0)](){const _0x34aa84=_0x15a997;[[p],[g],[_]][_0x34aa84(0x1fd)](_0x1e7e9e=>{const _0x2ef6d0=_0x34aa84;this[_0x2ef6d0(0x1c3)][_0x2ef6d0(0x1e8)](_0x1e7e9e);});}['onReady'](){const _0x5b8e85=_0x15a997;this[_0x5b8e85(0x1c3)][_0x5b8e85(0x1ea)](g),this[_0x5b8e85(0x1c3)][_0x5b8e85(0x1ea)](_);}},N(exports[_0x15a997(0x1d0)],_0x15a997(0x1cc),U),N(exports[_0x15a997(0x1d0)],_0x15a997(0x1be),c[_0x15a997(0x1ba)][_0x15a997(0x1b3)]),exports[_0x15a997(0x1d0)]=W([c[_0x15a997(0x20d)](w[_0x15a997(0x1bf)],b[_0x15a997(0x200)],T[_0x15a997(0x22d)]),O(0x1,c[_0x15a997(0x1de)](c['Injector'])),O(0x2,c[_0x15a997(0x224)])],exports[_0x15a997(0x1d0)]);
1
+ 'use strict';const _0x53e49a=_0x3226;(function(_0x3bacf5,_0x30bd23){const _0x5d184f=_0x3226,_0x1c0d8=_0x3bacf5();while(!![]){try{const _0x50f836=-parseInt(_0x5d184f(0x1d6))/0x1*(parseInt(_0x5d184f(0x1ee))/0x2)+parseInt(_0x5d184f(0x1f1))/0x3+-parseInt(_0x5d184f(0x1b5))/0x4+-parseInt(_0x5d184f(0x1b9))/0x5+-parseInt(_0x5d184f(0x20a))/0x6+parseInt(_0x5d184f(0x1af))/0x7+parseInt(_0x5d184f(0x1b7))/0x8;if(_0x50f836===_0x30bd23)break;else _0x1c0d8['push'](_0x1c0d8['shift']());}catch(_0x41ac5d){_0x1c0d8['push'](_0x1c0d8['shift']());}}}(_0xec14,0xd1ddf));Object[_0x53e49a(0x211)](exports,Symbol['toStringTag'],{'value':_0x53e49a(0x20e)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x53e49a(0x1be);var I=(_0x3d920c=>(_0x3d920c[_0x3d920c[_0x53e49a(0x205)]=0x0]=_0x53e49a(0x205),_0x3d920c[_0x3d920c[_0x53e49a(0x1f8)]=0x1]=_0x53e49a(0x1f8),_0x3d920c[_0x3d920c[_0x53e49a(0x1ef)]=-0x1]=_0x53e49a(0x1ef),_0x3d920c))(I||{}),v=(_0x10c702=>(_0x10c702[_0x10c702['Unknown']=0x0]=_0x53e49a(0x20f),_0x10c702[_0x10c702['Add']=0x1]=_0x53e49a(0x1c4),_0x10c702[_0x10c702[_0x53e49a(0x20d)]=0x2]=_0x53e49a(0x20d),_0x10c702[_0x10c702['Edit']=0x3]=_0x53e49a(0x1e0),_0x10c702[_0x10c702[_0x53e49a(0x1b0)]=0x4]=_0x53e49a(0x1b0),_0x10c702[_0x10c702[_0x53e49a(0x214)]=0x5]=_0x53e49a(0x214),_0x10c702[_0x10c702[_0x53e49a(0x1ef)]=-0x1]=_0x53e49a(0x1ef),_0x10c702))(v||{});const f=_0x73de0b=>c[_0x53e49a(0x1d3)](new Date(+_0x73de0b))['format'](_0x53e49a(0x1d2)),R=async(_0x5546e0,_0x3f9998)=>{const _0x1ee178=_0x53e49a,_0x45b799=_0x5546e0[_0x1ee178(0x1cf)](c[_0x1ee178(0x1c0)]),_0x30d42d=_0x5546e0[_0x1ee178(0x1cf)](P[_0x1ee178(0x1a9)]);_0x3f9998[_0x1ee178(0x1e9)](_0x7ad3ca=>{const _0x3e126e=_0x1ee178;_0x45b799['getUser'](_0x7ad3ca)&&_0x3f9998[_0x3e126e(0x1bf)](_0x7ad3ca);}),_0x3f9998[_0x1ee178(0x20c)]&&(await _0x30d42d[_0x1ee178(0x1cf)](_0x1ee178(0x1de),{'params':{'userIDs':[..._0x3f9998]}}))[_0x1ee178(0x1dc)]['users'][_0x1ee178(0x1e9)](_0xf35d75=>{const _0x78f612=_0x1ee178;_0xf35d75&&_0x45b799[_0x78f612(0x1a3)](_0xf35d75);});};var $=Object[_0x53e49a(0x1c2)],E=(_0x26b516,_0x2109cc,_0x2c3b36,_0x5a88ee)=>{const _0x29cee5=_0x53e49a;for(var _0xa3e246=_0x5a88ee>0x1?void 0x0:_0x5a88ee?$(_0x2109cc,_0x2c3b36):_0x2109cc,_0x360547=_0x26b516[_0x29cee5(0x206)]-0x1,_0x2dc4dd;_0x360547>=0x0;_0x360547--)(_0x2dc4dd=_0x26b516[_0x360547])&&(_0xa3e246=_0x2dc4dd(_0xa3e246)||_0xa3e246);return _0xa3e246;},S=(_0x5693a7,_0x1e02a7)=>(_0x5e718a,_0x58a494)=>_0x1e02a7(_0x5e718a,_0x58a494,_0x5693a7);let _=class extends c[_0x53e49a(0x1a7)]{constructor(_0x2268b1,_0x32bdb8,_0x4682b0,_0x263c6c){const _0xcaf5c=_0x53e49a;super(),this[_0xcaf5c(0x1dd)]=_0x2268b1,this[_0xcaf5c(0x1f4)]=_0x32bdb8,this[_0xcaf5c(0x210)]=_0x4682b0,this[_0xcaf5c(0x201)]=_0x263c6c,this['_init'](),this[_0xcaf5c(0x1e2)]();}[_0x53e49a(0x1e2)](){const _0x32b79f=_0x53e49a;this[_0x32b79f(0x1ec)](this[_0x32b79f(0x1f4)][_0x32b79f(0x1e3)][_0x32b79f(0x1f0)](j['bufferTime'](0x10))[_0x32b79f(0x1aa)](_0x68294f=>{const _0x2f2b25=_0x32b79f,_0x144515=new Set();_0x68294f['forEach'](_0x45777c=>{const _0x2cabe0=_0x3226;switch(_0x45777c['type']){case _0x2cabe0(0x217):{const _0xaa1546=_0x45777c[_0x2cabe0(0x1f2)][_0x2cabe0(0x216)];_0x144515[_0x2cabe0(0x217)](_0xaa1546);break;}}}),R(this[_0x2f2b25(0x201)],_0x144515);}));}['_init'](){const _0x509911=_0x53e49a;this[_0x509911(0x1ec)](this['_commentService'][_0x509911(0x1e3)]['subscribe'](async _0x283973=>{const _0x1204df=_0x509911;var _0x22801b,_0x326422,_0x319e7c,_0x205600;const _0x4cef91=(_0x22801b=this[_0x1204df(0x1f4)][_0x1204df(0x1bc)](_0x283973[_0x1204df(0x1b3)])[_0x1204df(0x1f6)](_0x360030=>_0x360030[_0x1204df(0x1ad)]===_0x283973[_0x1204df(0x1ad)]))==null?void 0x0:_0x22801b['root'];if(!_0x4cef91)return;const {unitId:_0x2f3ec5,subUnitId:_0x68d722}=_0x4cef91;switch(_0x283973[_0x1204df(0x1e4)]&&this[_0x1204df(0x210)][_0x1204df(0x1a3)](_0x283973['user']),_0x283973['type']){case v[_0x1204df(0x1c4)]:break;case v[_0x1204df(0x20d)]:{this[_0x1204df(0x1f4)][_0x1204df(0x1b6)](_0x2f3ec5,_0x68d722,{'unitId':_0x2f3ec5,'subUnitId':_0x68d722,'ref':'','id':_0x283973[_0x1204df(0x1ea)],'dT':f(+_0x283973[_0x1204df(0x1fb)]),'threadId':_0x283973[_0x1204df(0x1ad)],'personId':(_0x319e7c=(_0x326422=_0x283973['user'])==null?void 0x0:_0x326422['userID'])!=null?_0x319e7c:_0x283973[_0x1204df(0x204)],'text':JSON[_0x1204df(0x1ab)](_0x283973[_0x1204df(0x1c6)]),'parentId':_0x4cef91['id']});break;}case v[_0x1204df(0x1b0)]:{const _0x3a7afb=this[_0x1204df(0x1f4)]['getComment'](_0x2f3ec5,_0x68d722,_0x283973[_0x1204df(0x1ea)]);_0x3a7afb&&_0x3a7afb[_0x1204df(0x1d0)]&&this[_0x1204df(0x1f4)][_0x1204df(0x1e1)](_0x2f3ec5,_0x68d722,_0x283973[_0x1204df(0x1ea)]);break;}case v[_0x1204df(0x1e0)]:{this[_0x1204df(0x1f4)][_0x1204df(0x1d5)](_0x2f3ec5,_0x68d722,{'commentId':_0x283973[_0x1204df(0x1ea)],'text':JSON[_0x1204df(0x1ab)](_0x283973[_0x1204df(0x1c6)])});break;}case v[_0x1204df(0x214)]:{const _0x1abecd=(_0x205600=this[_0x1204df(0x1f4)][_0x1204df(0x1bc)](_0x283973[_0x1204df(0x1b3)])['find'](_0xa8a218=>_0xa8a218[_0x1204df(0x1ad)]===_0x283973[_0x1204df(0x1ad)]))==null?void 0x0:_0x205600[_0x1204df(0x1fa)];_0x1abecd&&this[_0x1204df(0x1f4)]['resolveComment'](_0x2f3ec5,_0x68d722,_0x1abecd['id'],_0x283973['solved']===I[_0x1204df(0x1f8)]);break;}}}));}};_=E([S(0x0,c['Inject'](b[_0x53e49a(0x1d8)])),S(0x1,c[_0x53e49a(0x1d4)](M[_0x53e49a(0x1fe)])),S(0x2,c[_0x53e49a(0x1d4)](c['UserManagerService'])),S(0x3,c[_0x53e49a(0x1d4)](c['Injector']))],_);const q=_0x53e49a(0x1db),D={};var A=Object[_0x53e49a(0x1c2)],x=(_0x48cc9a,_0x2c5554,_0x400077,_0x10ab37)=>{for(var _0x5cf5f0=_0x10ab37>0x1?void 0x0:_0x10ab37?A(_0x2c5554,_0x400077):_0x2c5554,_0x24d939=_0x48cc9a['length']-0x1,_0x1e6bb6;_0x24d939>=0x0;_0x24d939--)(_0x1e6bb6=_0x48cc9a[_0x24d939])&&(_0x5cf5f0=_0x1e6bb6(_0x5cf5f0)||_0x5cf5f0);return _0x5cf5f0;},C=(_0x1d5c92,_0x57ef8d)=>(_0x498cde,_0x1e728a)=>_0x57ef8d(_0x498cde,_0x1e728a,_0x1d5c92);function _0xec14(){const _0x4b7853=['Reply','Module','Unknown','_userService','defineProperty','map','format','Solve','code','personId','add','/edit','IConfigService','addUser','UniverCollaborationClientPlugin','users','IThreadCommentDataSourceService','Disposable','_initDataSource','HTTPService','subscribe','parse','rangeType','threadId','customRanges','6675977CbdwyO','Delete','values','onReady','unitId','saveCommentToSnapshot','2189748jwpNxG','addComment','23081168IMqJoU','/add','3283195MePvXw','DependentOn','onStarting','getUnit','UNIVER_UNKNOWN','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','delete','UserManagerService','getMemberID','getOwnPropertyDescriptor','resolveComment','Add','getCurrentUser','content','_threadCommentDataSource','pluginName','CollaborationSessionService','UniverThreadCommentDataSourcePlugin','post','comment','COMMENT','_sessionService','get','parentId','UniverInstanceType','YYYY/MM/DD\x20HH:mm','dayjs','Inject','updateComment','3004aPnNlQ','_threadCommentDataSourceService','CommentService','Injector','replies','thread-comment-data-source.config','body','_commentService','/universer-api/user/list','requireSession','Edit','deleteComment','_initUserSync','commentUpdate$','user','listComments','_httpService','dataSource','/solved','forEach','replyId','/universer-api/comment/unit/','disposeWithMe','rangeId','450sMOIYL','UNRECOGNIZED','pipe','212865oiDWXy','payload','/delete','_threadCommentModel','/reply','find','type','Solved','error','root','createTimestamp','symbol','resolved','ThreadCommentModel','CustomRangeType','slice','_injector','filter','solved','userId','OpenOrReOpen','length','comments','syncUpdateMutationToColla','ref','7021326evgElO','setConfig','size'];_0xec14=function(){return _0x4b7853;};return _0xec14();}function _0x3226(_0xf119c1,_0x257ff4){_0xf119c1=_0xf119c1-0x1a3;const _0xec141=_0xec14();let _0x322652=_0xec141[_0xf119c1];return _0x322652;}function Y(_0x565dc7,_0x26665e){const _0x13ae2f=_0x53e49a,_0x5016c9=_0x565dc7[_0x13ae2f(0x1da)][0x0];return{..._0x26665e,'id':_0x5016c9[_0x13ae2f(0x1ea)],'resolved':_0x565dc7['solved']===0x1,'dT':f(_0x5016c9[_0x13ae2f(0x1fb)]),'personId':_0x5016c9[_0x13ae2f(0x204)],'threadId':_0x5016c9[_0x13ae2f(0x1ad)]};}function G(_0x34e2d9,_0x1a5036,_0x20753c){const _0x1dc9e1=_0x53e49a;var _0x13755d,_0x59839d;if(((_0x59839d=(_0x13755d=_0x34e2d9==null?void 0x0:_0x34e2d9[_0x1dc9e1(0x1da)])==null?void 0x0:_0x13755d[_0x1dc9e1(0x206)])!=null?_0x59839d:0x0)>0x0){const _0x2bf14e=(_0xda958c,_0x4f7b98)=>({'id':_0xda958c[_0x1dc9e1(0x1ea)],'threadId':_0xda958c[_0x1dc9e1(0x1ad)],'dT':f(_0xda958c[_0x1dc9e1(0x1fb)]),'personId':_0xda958c[_0x1dc9e1(0x204)],'resolved':_0x34e2d9[_0x1dc9e1(0x203)]===I[_0x1dc9e1(0x1f8)],'unitId':_0x1a5036,'subUnitId':_0x20753c,'text':JSON[_0x1dc9e1(0x1ab)](_0xda958c[_0x1dc9e1(0x1c6)]),'parentId':_0x4f7b98}),_0x7d71d9=_0x2bf14e(_0x34e2d9[_0x1dc9e1(0x1da)][0x0]);return{..._0x7d71d9,'children':_0x34e2d9['replies'][_0x1dc9e1(0x200)](0x1)[_0x1dc9e1(0x212)](_0x306ab5=>_0x2bf14e(_0x306ab5,_0x7d71d9['id']))};}return null;}let p=class{constructor(_0x452242,_0x10f9e0,_0x5b2560){const _0x37073a=_0x53e49a;this[_0x37073a(0x1e6)]=_0x452242,this['_userService']=_0x10f9e0,this[_0x37073a(0x1ce)]=_0x5b2560;}async[_0x53e49a(0x1b6)](_0x47373b){const _0x5c1fc3=_0x53e49a;var _0x2f314b,_0x371f1c;const {parentId:_0x278c05,unitId:_0xe3dcb,text:_0x26c610,threadId:_0x54f67c}=_0x47373b,_0x2a6372=(_0x371f1c=(_0x2f314b=_0x26c610[_0x5c1fc3(0x1ae)])==null?void 0x0:_0x2f314b['filter'](_0x3e0294=>_0x3e0294[_0x5c1fc3(0x1ac)]===c[_0x5c1fc3(0x1ff)][_0x5c1fc3(0x1cd)])['map'](_0x4d3a18=>_0x4d3a18[_0x5c1fc3(0x1ed)]))!=null?_0x371f1c:[],_0x4be59f=JSON['stringify'](_0x26c610),_0x546495=(await this[_0x5c1fc3(0x1ce)][_0x5c1fc3(0x1df)](_0xe3dcb))[_0x5c1fc3(0x1c1)]();if(_0x278c05){const _0x398f99={'memberId':_0x546495,'unitId':_0xe3dcb,'content':_0x4be59f,'mention':_0x2a6372,'threadId':_0x54f67c},_0x2136b0=(await this['_httpService'][_0x5c1fc3(0x1cb)](_0x5c1fc3(0x1eb)+_0xe3dcb+_0x5c1fc3(0x1f5),{'body':_0x398f99}))[_0x5c1fc3(0x1dc)]['reply'];return{..._0x47373b,'id':_0x2136b0[_0x5c1fc3(0x1ea)],'dT':c[_0x5c1fc3(0x1d3)](+_0x2136b0[_0x5c1fc3(0x1fb)])[_0x5c1fc3(0x213)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2136b0['userId']};}else{const _0x3f3fbf={'memberId':_0x546495,'unitId':_0xe3dcb,'content':_0x4be59f,'mention':_0x2a6372},_0x360f2f=await this['_httpService'][_0x5c1fc3(0x1cb)](_0x5c1fc3(0x1eb)+_0xe3dcb+_0x5c1fc3(0x1b8),{'body':_0x3f3fbf});return Y(_0x360f2f['body'][_0x5c1fc3(0x1cc)],_0x47373b);}}async[_0x53e49a(0x1d5)](_0x89ec9b){const _0x8d0684=_0x53e49a;var _0x5828fa,_0x13cef5;const {text:_0x45df44,unitId:_0x28058b}=_0x89ec9b,_0x6c8449=(_0x13cef5=(_0x5828fa=_0x45df44[_0x8d0684(0x1ae)])==null?void 0x0:_0x5828fa[_0x8d0684(0x202)](_0x21c30c=>_0x21c30c['rangeType']===c[_0x8d0684(0x1ff)]['COMMENT'])[_0x8d0684(0x212)](_0xab7ca9=>_0xab7ca9[_0x8d0684(0x1ed)]))!=null?_0x13cef5:[],_0x54c508=JSON['stringify'](_0x45df44),_0x40b464=_0x89ec9b['threadId'],_0x1de4c4=_0x89ec9b['id'],_0x3cae40={'memberId':(await this[_0x8d0684(0x1ce)]['requireSession'](_0x28058b))['getMemberID'](),'unitId':_0x28058b,'threadId':_0x40b464,'mention':_0x6c8449,'content':_0x54c508,'replyId':_0x1de4c4},_0x1e3885=await this[_0x8d0684(0x1e6)][_0x8d0684(0x1cb)]('/universer-api/comment/unit/'+_0x28058b+_0x8d0684(0x218),{'body':_0x3cae40});return!_0x1e3885['body'][_0x8d0684(0x1f9)]||_0x1e3885[_0x8d0684(0x1dc)][_0x8d0684(0x1f9)][_0x8d0684(0x215)]===0x1;}async[_0x53e49a(0x1c3)](_0x265beb){const _0x2f8f74=_0x53e49a,{unitId:_0x500e4d}=_0x265beb,_0x19bfa6=_0x265beb[_0x2f8f74(0x1ad)],_0x4a2eed={'memberId':this[_0x2f8f74(0x210)][_0x2f8f74(0x1c5)]()['userID'],'unitId':_0x500e4d,'threadId':_0x19bfa6,'solved':_0x265beb[_0x2f8f74(0x1fd)]?I[_0x2f8f74(0x1f8)]:I['OpenOrReOpen']},_0x10b86e=await this[_0x2f8f74(0x1e6)][_0x2f8f74(0x1cb)](_0x2f8f74(0x1eb)+_0x500e4d+_0x2f8f74(0x1e8),{'body':_0x4a2eed});return!_0x10b86e[_0x2f8f74(0x1dc)]['error']||_0x10b86e[_0x2f8f74(0x1dc)][_0x2f8f74(0x1f9)][_0x2f8f74(0x215)]===0x1;}async[_0x53e49a(0x1e1)](_0x3ed37a,_0x54767c,_0x59435a,_0x2f2431){const _0x1e6aad=_0x53e49a,_0x14ebc9={'memberId':(await this[_0x1e6aad(0x1ce)][_0x1e6aad(0x1df)](_0x3ed37a))[_0x1e6aad(0x1c1)](),'threadId':_0x59435a,'replyId':_0x2f2431,'unitId':_0x3ed37a},_0x4fb07b=await this[_0x1e6aad(0x1e6)][_0x1e6aad(0x1cb)](_0x1e6aad(0x1eb)+_0x3ed37a+_0x1e6aad(0x1f3),{'body':_0x14ebc9});return!_0x4fb07b['body'][_0x1e6aad(0x1f9)]||_0x4fb07b['body'][_0x1e6aad(0x1f9)][_0x1e6aad(0x215)]===0x1;}async[_0x53e49a(0x1e5)](_0x3f239e,_0x3d9e9f,_0x52d8f9){const _0x57028f=_0x53e49a,_0x58b21b={'unitId':_0x3f239e,'threadId':_0x52d8f9},_0x5edad7=await this[_0x57028f(0x1e6)]['post'](_0x57028f(0x1eb)+_0x3f239e+'/list',{'body':_0x58b21b}),_0x58a738=_0x52d8f9[_0x57028f(0x212)](_0x5be7c8=>G(_0x5edad7[_0x57028f(0x1dc)][_0x57028f(0x207)][_0x5be7c8],_0x3f239e,_0x3d9e9f))[_0x57028f(0x202)](Boolean);return Object[_0x57028f(0x1b1)](_0x5edad7[_0x57028f(0x1dc)][_0x57028f(0x1a5)])['forEach'](_0x5590b0=>{const _0x3de309=_0x57028f;this[_0x3de309(0x210)][_0x3de309(0x1a3)](_0x5590b0);}),_0x58a738;}[_0x53e49a(0x1b4)](_0x1aea97){const _0x1d7a7c=_0x53e49a;return{'id':_0x1aea97['id'],'threadId':_0x1aea97[_0x1d7a7c(0x1ad)],'ref':_0x1aea97[_0x1d7a7c(0x209)]};}};p=x([C(0x0,c[_0x53e49a(0x1d4)](P[_0x53e49a(0x1a9)])),C(0x1,c[_0x53e49a(0x1d4)](c[_0x53e49a(0x1c0)])),C(0x2,c[_0x53e49a(0x1d4)](b[_0x53e49a(0x1c9)]))],p);var H=Object[_0x53e49a(0x1c2)],J=(_0x20b79e,_0x500646,_0x4cd513,_0x5d9f41)=>{for(var _0x590116=_0x5d9f41>0x1?void 0x0:_0x5d9f41?H(_0x500646,_0x4cd513):_0x500646,_0xe4f35d=_0x20b79e['length']-0x1,_0x2c1905;_0xe4f35d>=0x0;_0xe4f35d--)(_0x2c1905=_0x20b79e[_0xe4f35d])&&(_0x590116=_0x2c1905(_0x590116)||_0x590116);return _0x590116;},y=(_0xe1d2b0,_0x507cea)=>(_0x23b7d1,_0x3e14e5)=>_0x507cea(_0x23b7d1,_0x3e14e5,_0xe1d2b0);let g=class extends c[_0x53e49a(0x1a7)]{constructor(_0x33e792,_0x45a273){const _0x1ad514=_0x53e49a;super(),this[_0x1ad514(0x1d7)]=_0x33e792,this[_0x1ad514(0x1c7)]=_0x45a273,this[_0x1ad514(0x1a8)]();}[_0x53e49a(0x1a8)](){const _0x3da989=_0x53e49a;this[_0x3da989(0x1d7)][_0x3da989(0x1e7)]=this[_0x3da989(0x1c7)],this[_0x3da989(0x1d7)][_0x3da989(0x208)]=!0x1;}};g=J([y(0x0,M[_0x53e49a(0x1a6)]),y(0x1,c[_0x53e49a(0x1d4)](p))],g);var F=Object[_0x53e49a(0x211)],L=Object[_0x53e49a(0x1c2)],Z=(_0x5e049a,_0x215259,_0x5f1048)=>_0x215259 in _0x5e049a?F(_0x5e049a,_0x215259,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5f1048}):_0x5e049a[_0x215259]=_0x5f1048,W=(_0x386f84,_0x47c617,_0x21da70,_0x3a7fb6)=>{const _0x28dee7=_0x53e49a;for(var _0x28938b=_0x3a7fb6>0x1?void 0x0:_0x3a7fb6?L(_0x47c617,_0x21da70):_0x47c617,_0xbe0146=_0x386f84[_0x28dee7(0x206)]-0x1,_0x764f6b;_0xbe0146>=0x0;_0xbe0146--)(_0x764f6b=_0x386f84[_0xbe0146])&&(_0x28938b=_0x764f6b(_0x28938b)||_0x28938b);return _0x28938b;},O=(_0x4ba098,_0x422b33)=>(_0x796f42,_0x3c8f72)=>_0x422b33(_0x796f42,_0x3c8f72,_0x4ba098),N=(_0x44cd35,_0x1973aa,_0x518eff)=>Z(_0x44cd35,typeof _0x1973aa!=_0x53e49a(0x1fc)?_0x1973aa+'':_0x1973aa,_0x518eff);exports[_0x53e49a(0x1ca)]=class extends c['Plugin']{constructor(_0x40614f=D,_0x5b9632,_0x38d209){const _0x5273df=_0x53e49a;super(),this['_config']=_0x40614f,this[_0x5273df(0x201)]=_0x5b9632,this['_configService']=_0x38d209;const {..._0x850019}=c['merge']({},D,this['_config']);this['_configService'][_0x5273df(0x20b)](q,_0x850019);}[_0x53e49a(0x1bb)](){const _0x17cbfe=_0x53e49a;[[p],[g],[_]][_0x17cbfe(0x1e9)](_0x3002b3=>{const _0xafaf1f=_0x17cbfe;this[_0xafaf1f(0x201)]['add'](_0x3002b3);});}[_0x53e49a(0x1b2)](){const _0x48cd52=_0x53e49a;this[_0x48cd52(0x201)][_0x48cd52(0x1cf)](g),this[_0x48cd52(0x201)][_0x48cd52(0x1cf)](_);}},N(exports[_0x53e49a(0x1ca)],_0x53e49a(0x1c8),U),N(exports[_0x53e49a(0x1ca)],_0x53e49a(0x1f7),c[_0x53e49a(0x1d1)][_0x53e49a(0x1bd)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x53e49a(0x1ba)](w['UniverThreadCommentUIPlugin'],b[_0x53e49a(0x1a4)],T['UniverLicensePlugin']),O(0x1,c[_0x53e49a(0x1d4)](c[_0x53e49a(0x1d9)])),O(0x2,c[_0x53e49a(0x219)])],exports[_0x53e49a(0x1ca)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x3b7ea6=_0x5f2a;(function(_0x283cf7,_0x46fba3){const _0x6d5814=_0x5f2a,_0x146e4a=_0x283cf7();while(!![]){try{const _0x48feeb=-parseInt(_0x6d5814(0x10e))/0x1*(-parseInt(_0x6d5814(0xe7))/0x2)+-parseInt(_0x6d5814(0x112))/0x3*(-parseInt(_0x6d5814(0x119))/0x4)+-parseInt(_0x6d5814(0x116))/0x5*(parseInt(_0x6d5814(0xf7))/0x6)+-parseInt(_0x6d5814(0xbc))/0x7+parseInt(_0x6d5814(0x118))/0x8*(-parseInt(_0x6d5814(0x106))/0x9)+parseInt(_0x6d5814(0xfe))/0xa+-parseInt(_0x6d5814(0xfc))/0xb;if(_0x48feeb===_0x46fba3)break;else _0x146e4a['push'](_0x146e4a['shift']());}catch(_0x4aa755){_0x146e4a['push'](_0x146e4a['shift']());}}}(_0x33ad,0x276c2));import{CommentService as _0x470bf5,CollaborationSessionService as _0x3a4aed,UniverCollaborationClientPlugin as _0x5ecb4e}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2d5534}from'@univerjs-pro/license';function _0x5f2a(_0x1a7afe,_0x5db058){const _0x33ad5d=_0x33ad();return _0x5f2a=function(_0x5f2a9e,_0x4773ad){_0x5f2a9e=_0x5f2a9e-0xb7;let _0x448c39=_0x33ad5d[_0x5f2a9e];return _0x448c39;},_0x5f2a(_0x1a7afe,_0x5db058);}import{dayjs as _0x595df9,UserManagerService as _0x5458cd,Inject as _0x28ae67,Injector as _0x44647b,Disposable as _0x5ac438,CustomRangeType as _0x325494,UniverInstanceType as _0x3366af,DependentOn as _0x31c2de,IConfigService as _0x3c3efa,Plugin as _0x59bcbe,merge as _0x4f527c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x52729f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2e7a6e,IThreadCommentDataSourceService as _0x482fdc}from'@univerjs/thread-comment';import{bufferTime as _0x466a99}from'rxjs';import{HTTPService as _0x568a11}from'@univerjs/network';const W=_0x3b7ea6(0xc1);var I=(_0x4105a8=>(_0x4105a8[_0x4105a8['OpenOrReOpen']=0x0]=_0x3b7ea6(0x105),_0x4105a8[_0x4105a8[_0x3b7ea6(0xd4)]=0x1]=_0x3b7ea6(0xd4),_0x4105a8[_0x4105a8[_0x3b7ea6(0xc8)]=-0x1]='UNRECOGNIZED',_0x4105a8))(I||{}),v=(_0x2e3b70=>(_0x2e3b70[_0x2e3b70[_0x3b7ea6(0xcc)]=0x0]='Unknown',_0x2e3b70[_0x2e3b70[_0x3b7ea6(0xc0)]=0x1]=_0x3b7ea6(0xc0),_0x2e3b70[_0x2e3b70['Reply']=0x2]=_0x3b7ea6(0xb9),_0x2e3b70[_0x2e3b70['Edit']=0x3]=_0x3b7ea6(0xdd),_0x2e3b70[_0x2e3b70[_0x3b7ea6(0xf0)]=0x4]=_0x3b7ea6(0xf0),_0x2e3b70[_0x2e3b70[_0x3b7ea6(0xc3)]=0x5]=_0x3b7ea6(0xc3),_0x2e3b70[_0x2e3b70[_0x3b7ea6(0xc8)]=-0x1]='UNRECOGNIZED',_0x2e3b70))(v||{});const y=_0x3d6e20=>_0x595df9(new Date(+_0x3d6e20))[_0x3b7ea6(0xe5)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x1e3f5f,_0x14e3f4)=>{const _0x2499b7=_0x3b7ea6,_0x19398d=_0x1e3f5f['get'](_0x5458cd),_0x296854=_0x1e3f5f[_0x2499b7(0xfa)](_0x568a11);_0x14e3f4['forEach'](_0x303083=>{const _0x20c0fd=_0x2499b7;_0x19398d[_0x20c0fd(0xbf)](_0x303083)&&_0x14e3f4[_0x20c0fd(0xf9)](_0x303083);}),_0x14e3f4[_0x2499b7(0xed)]&&(await _0x296854[_0x2499b7(0xfa)](_0x2499b7(0x115),{'params':{'userIDs':[..._0x14e3f4]}}))['body'][_0x2499b7(0xec)]['forEach'](_0x308462=>{const _0x12b557=_0x2499b7;_0x308462&&_0x19398d[_0x12b557(0xd9)](_0x308462);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x55a740,_0x472917,_0x5ab5b7,_0x564069)=>{const _0x320701=_0x3b7ea6;for(var _0xed6a3e=_0x564069>0x1?void 0x0:_0x564069?K(_0x472917,_0x5ab5b7):_0x472917,_0x4a0ac7=_0x55a740[_0x320701(0xf1)]-0x1,_0x5b64c4;_0x4a0ac7>=0x0;_0x4a0ac7--)(_0x5b64c4=_0x55a740[_0x4a0ac7])&&(_0xed6a3e=_0x5b64c4(_0xed6a3e)||_0xed6a3e);return _0xed6a3e;},p=(_0x2acd49,_0x29790c)=>(_0x23de51,_0x1fb4f4)=>_0x29790c(_0x23de51,_0x1fb4f4,_0x2acd49);let _=class extends _0x5ac438{constructor(_0x59bb49,_0x35bcf7,_0x583288,_0x241f1d){const _0x2ed31a=_0x3b7ea6;super(),this[_0x2ed31a(0x10c)]=_0x59bb49,this[_0x2ed31a(0xf5)]=_0x35bcf7,this[_0x2ed31a(0x113)]=_0x583288,this[_0x2ed31a(0xee)]=_0x241f1d,this[_0x2ed31a(0x110)](),this['_initUserSync']();}[_0x3b7ea6(0x100)](){const _0x36266e=_0x3b7ea6;this[_0x36266e(0x11d)](this['_threadCommentModel'][_0x36266e(0xb7)][_0x36266e(0xef)](_0x466a99(0x10))[_0x36266e(0xc7)](_0x36c9ce=>{const _0x4b5914=_0x36266e,_0x2ed94f=new Set();_0x36c9ce[_0x4b5914(0xea)](_0x54ac1b=>{const _0x51df4c=_0x4b5914;switch(_0x54ac1b[_0x51df4c(0xe4)]){case _0x51df4c(0x10b):{const _0x13d840=_0x54ac1b['payload'][_0x51df4c(0xf6)];_0x2ed94f['add'](_0x13d840);break;}}}),B(this[_0x4b5914(0xee)],_0x2ed94f);}));}['_init'](){const _0x3f5275=_0x3b7ea6;this['disposeWithMe'](this[_0x3f5275(0x10c)][_0x3f5275(0xb7)][_0x3f5275(0xc7)](async _0x4430b7=>{const _0xb0ca1a=_0x3f5275;var _0x9b3c3f,_0x3faf20,_0xb07964,_0x3e0545;const _0x46a076=(_0x9b3c3f=this[_0xb0ca1a(0xf5)][_0xb0ca1a(0xf3)](_0x4430b7[_0xb0ca1a(0xd2)])[_0xb0ca1a(0xda)](_0x37fa0f=>_0x37fa0f[_0xb0ca1a(0x11c)]===_0x4430b7['threadId']))==null?void 0x0:_0x9b3c3f['root'];if(!_0x46a076)return;const {unitId:_0x4636d2,subUnitId:_0x2214ff}=_0x46a076;switch(_0x4430b7[_0xb0ca1a(0x10a)]&&this['_userService'][_0xb0ca1a(0xd9)](_0x4430b7[_0xb0ca1a(0x10a)]),_0x4430b7[_0xb0ca1a(0xe4)]){case v[_0xb0ca1a(0xc0)]:break;case v['Reply']:{this[_0xb0ca1a(0xf5)][_0xb0ca1a(0xdc)](_0x4636d2,_0x2214ff,{'unitId':_0x4636d2,'subUnitId':_0x2214ff,'ref':'','id':_0x4430b7['replyId'],'dT':y(+_0x4430b7[_0xb0ca1a(0xcb)]),'threadId':_0x4430b7[_0xb0ca1a(0x11c)],'personId':(_0xb07964=(_0x3faf20=_0x4430b7[_0xb0ca1a(0x10a)])==null?void 0x0:_0x3faf20[_0xb0ca1a(0x107)])!=null?_0xb07964:_0x4430b7[_0xb0ca1a(0xd7)],'text':JSON['parse'](_0x4430b7[_0xb0ca1a(0xbe)]),'parentId':_0x46a076['id']});break;}case v[_0xb0ca1a(0xf0)]:{const _0x1fc21b=this[_0xb0ca1a(0xf5)]['getComment'](_0x4636d2,_0x2214ff,_0x4430b7[_0xb0ca1a(0x101)]);_0x1fc21b&&_0x1fc21b[_0xb0ca1a(0x104)]&&this[_0xb0ca1a(0xf5)][_0xb0ca1a(0x11a)](_0x4636d2,_0x2214ff,_0x4430b7[_0xb0ca1a(0x101)]);break;}case v['Edit']:{this[_0xb0ca1a(0xf5)][_0xb0ca1a(0xb8)](_0x4636d2,_0x2214ff,{'commentId':_0x4430b7[_0xb0ca1a(0x101)],'text':JSON[_0xb0ca1a(0xc6)](_0x4430b7[_0xb0ca1a(0xbe)])});break;}case v[_0xb0ca1a(0xc3)]:{const _0x37eb1e=(_0x3e0545=this[_0xb0ca1a(0xf5)]['getUnit'](_0x4430b7[_0xb0ca1a(0xd2)])[_0xb0ca1a(0xda)](_0x176e72=>_0x176e72[_0xb0ca1a(0x11c)]===_0x4430b7[_0xb0ca1a(0x11c)]))==null?void 0x0:_0x3e0545['root'];_0x37eb1e&&this[_0xb0ca1a(0xf5)][_0xb0ca1a(0xf4)](_0x4636d2,_0x2214ff,_0x37eb1e['id'],_0x4430b7[_0xb0ca1a(0xeb)]===I[_0xb0ca1a(0xd4)]);break;}}}));}};function _0x33ad(){const _0xfa4135=['_injector','pipe','Delete','length','code','getUnit','resolveComment','_threadCommentModel','personId','462MsFwhA','resolved','delete','get','_threadCommentDataSourceService','499026QHqcSv','/list','277920zILiob','listComments','_initUserSync','replyId','getMemberID','_configService','parentId','OpenOrReOpen','17163VKLgkr','userID','error','post','user','add','_commentService','_threadCommentDataSource','57993WWaqIB','syncUpdateMutationToColla','_init','saveCommentToSnapshot','6093zsLgaG','_userService','/delete','/universer-api/user/list','14205EGlZoX','map','144xWSrgm','596IFinBc','deleteComment','stringify','threadId','disposeWithMe','COMMENT','/universer-api/comment/unit/','commentUpdate$','updateComment','Reply','body','/add','311269JQnICV','setConfig','content','getUser','Add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','defineProperty','Solve','_httpService','_config','parse','subscribe','UNRECOGNIZED','_initDataSource','comments','createTimestamp','Unknown','/reply','slice','_sessionService','values','replies','unitId','filter','Solved','customRanges','pluginName','userId','ref','addUser','find','/solved','addComment','Edit','onReady','comment','rangeType','requireSession','onStarting','/edit','type','format','rangeId','6QohJIs','YYYY/MM/DD\x20HH:mm','getOwnPropertyDescriptor','forEach','solved','users','size'];_0x33ad=function(){return _0xfa4135;};return _0x33ad();}_=V([p(0x0,_0x28ae67(_0x470bf5)),p(0x1,_0x28ae67(_0x2e7a6e)),p(0x2,_0x28ae67(_0x5458cd)),p(0x3,_0x28ae67(_0x44647b))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x3b7ea6(0xe9)],Q=(_0x1937be,_0x594851,_0x40c47c,_0x380bd7)=>{for(var _0xbf1e64=_0x380bd7>0x1?void 0x0:_0x380bd7?k(_0x594851,_0x40c47c):_0x594851,_0x210a3e=_0x1937be['length']-0x1,_0x3ad3ef;_0x210a3e>=0x0;_0x210a3e--)(_0x3ad3ef=_0x1937be[_0x210a3e])&&(_0xbf1e64=_0x3ad3ef(_0xbf1e64)||_0xbf1e64);return _0xbf1e64;},b=(_0x4aeb2b,_0x4b65cf)=>(_0x267662,_0x77c4da)=>_0x4b65cf(_0x267662,_0x77c4da,_0x4aeb2b);function X(_0x1bfc6f,_0x496a2c){const _0x155726=_0x3b7ea6,_0x504f6c=_0x1bfc6f[_0x155726(0xd1)][0x0];return{..._0x496a2c,'id':_0x504f6c[_0x155726(0x101)],'resolved':_0x1bfc6f[_0x155726(0xeb)]===0x1,'dT':y(_0x504f6c[_0x155726(0xcb)]),'personId':_0x504f6c['userId'],'threadId':_0x504f6c[_0x155726(0x11c)]};}function ee(_0x5dbdc0,_0x5250e6,_0x2c0a8f){const _0x1134aa=_0x3b7ea6;var _0x3591e1,_0x58ee36;if(((_0x58ee36=(_0x3591e1=_0x5dbdc0==null?void 0x0:_0x5dbdc0[_0x1134aa(0xd1)])==null?void 0x0:_0x3591e1[_0x1134aa(0xf1)])!=null?_0x58ee36:0x0)>0x0){const _0x266b3f=(_0x5b6109,_0x3a124d)=>({'id':_0x5b6109[_0x1134aa(0x101)],'threadId':_0x5b6109[_0x1134aa(0x11c)],'dT':y(_0x5b6109['createTimestamp']),'personId':_0x5b6109[_0x1134aa(0xd7)],'resolved':_0x5dbdc0[_0x1134aa(0xeb)]===I[_0x1134aa(0xd4)],'unitId':_0x5250e6,'subUnitId':_0x2c0a8f,'text':JSON[_0x1134aa(0xc6)](_0x5b6109[_0x1134aa(0xbe)]),'parentId':_0x3a124d}),_0x35a508=_0x266b3f(_0x5dbdc0[_0x1134aa(0xd1)][0x0]);return{..._0x35a508,'children':_0x5dbdc0[_0x1134aa(0xd1)][_0x1134aa(0xce)](0x1)[_0x1134aa(0x117)](_0x5e937b=>_0x266b3f(_0x5e937b,_0x35a508['id']))};}return null;}let S=class{constructor(_0x3a7f5a,_0x3d747e,_0x3aad76){const _0x478ea6=_0x3b7ea6;this['_httpService']=_0x3a7f5a,this[_0x478ea6(0x113)]=_0x3d747e,this[_0x478ea6(0xcf)]=_0x3aad76;}async[_0x3b7ea6(0xdc)](_0x486127){const _0x151f9b=_0x3b7ea6;var _0x59e20e,_0x581230;const {parentId:_0x4c2cf1,unitId:_0x224636,text:_0x1d4c9c,threadId:_0x4f7eec}=_0x486127,_0x29a171=(_0x581230=(_0x59e20e=_0x1d4c9c[_0x151f9b(0xd5)])==null?void 0x0:_0x59e20e['filter'](_0x239ea0=>_0x239ea0[_0x151f9b(0xe0)]===_0x325494[_0x151f9b(0x11e)])['map'](_0x437cb2=>_0x437cb2[_0x151f9b(0xe6)]))!=null?_0x581230:[],_0x2b35d1=JSON[_0x151f9b(0x11b)](_0x1d4c9c),_0x45145e=(await this[_0x151f9b(0xcf)][_0x151f9b(0xe1)](_0x224636))[_0x151f9b(0x102)]();if(_0x4c2cf1){const _0x4098e0={'memberId':_0x45145e,'unitId':_0x224636,'content':_0x2b35d1,'mention':_0x29a171,'threadId':_0x4f7eec},_0x39797a=(await this['_httpService'][_0x151f9b(0x109)]('/universer-api/comment/unit/'+_0x224636+_0x151f9b(0xcd),{'body':_0x4098e0}))['body']['reply'];return{..._0x486127,'id':_0x39797a[_0x151f9b(0x101)],'dT':_0x595df9(+_0x39797a['createTimestamp'])[_0x151f9b(0xe5)](_0x151f9b(0xe8)),'personId':_0x39797a[_0x151f9b(0xd7)]};}else{const _0x56e93b={'memberId':_0x45145e,'unitId':_0x224636,'content':_0x2b35d1,'mention':_0x29a171},_0x560e94=await this[_0x151f9b(0xc4)][_0x151f9b(0x109)](_0x151f9b(0x11f)+_0x224636+_0x151f9b(0xbb),{'body':_0x56e93b});return X(_0x560e94['body'][_0x151f9b(0xdf)],_0x486127);}}async[_0x3b7ea6(0xb8)](_0x2d2cae){const _0x540afd=_0x3b7ea6;var _0x3f4b8c,_0x433ab3;const {text:_0x4f45d0,unitId:_0x59d4c3}=_0x2d2cae,_0x2fac39=(_0x433ab3=(_0x3f4b8c=_0x4f45d0[_0x540afd(0xd5)])==null?void 0x0:_0x3f4b8c[_0x540afd(0xd3)](_0x4d1f20=>_0x4d1f20[_0x540afd(0xe0)]===_0x325494[_0x540afd(0x11e)])[_0x540afd(0x117)](_0x5e5d95=>_0x5e5d95[_0x540afd(0xe6)]))!=null?_0x433ab3:[],_0x476e2f=JSON[_0x540afd(0x11b)](_0x4f45d0),_0x1e40cd=_0x2d2cae[_0x540afd(0x11c)],_0x45cbc4=_0x2d2cae['id'],_0x5d94a2={'memberId':(await this[_0x540afd(0xcf)][_0x540afd(0xe1)](_0x59d4c3))['getMemberID'](),'unitId':_0x59d4c3,'threadId':_0x1e40cd,'mention':_0x2fac39,'content':_0x476e2f,'replyId':_0x45cbc4},_0x132de1=await this[_0x540afd(0xc4)]['post'](_0x540afd(0x11f)+_0x59d4c3+_0x540afd(0xe3),{'body':_0x5d94a2});return!_0x132de1['body'][_0x540afd(0x108)]||_0x132de1[_0x540afd(0xba)][_0x540afd(0x108)]['code']===0x1;}async['resolveComment'](_0x5d8666){const _0x3e014f=_0x3b7ea6,{unitId:_0x43f062}=_0x5d8666,_0x423ce3=_0x5d8666[_0x3e014f(0x11c)],_0x3f8100={'memberId':this[_0x3e014f(0x113)]['getCurrentUser']()[_0x3e014f(0x107)],'unitId':_0x43f062,'threadId':_0x423ce3,'solved':_0x5d8666[_0x3e014f(0xf8)]?I[_0x3e014f(0xd4)]:I[_0x3e014f(0x105)]},_0x32155c=await this[_0x3e014f(0xc4)][_0x3e014f(0x109)](_0x3e014f(0x11f)+_0x43f062+_0x3e014f(0xdb),{'body':_0x3f8100});return!_0x32155c[_0x3e014f(0xba)][_0x3e014f(0x108)]||_0x32155c[_0x3e014f(0xba)][_0x3e014f(0x108)]['code']===0x1;}async[_0x3b7ea6(0x11a)](_0x1414ea,_0x4845dd,_0x2e9fdb,_0x4d0a4c){const _0x4ae809=_0x3b7ea6,_0x6f1db={'memberId':(await this[_0x4ae809(0xcf)][_0x4ae809(0xe1)](_0x1414ea))[_0x4ae809(0x102)](),'threadId':_0x2e9fdb,'replyId':_0x4d0a4c,'unitId':_0x1414ea},_0x5be884=await this[_0x4ae809(0xc4)][_0x4ae809(0x109)]('/universer-api/comment/unit/'+_0x1414ea+_0x4ae809(0x114),{'body':_0x6f1db});return!_0x5be884[_0x4ae809(0xba)]['error']||_0x5be884[_0x4ae809(0xba)][_0x4ae809(0x108)][_0x4ae809(0xf2)]===0x1;}async[_0x3b7ea6(0xff)](_0x574952,_0x40bf25,_0x364d30){const _0x2a19a5=_0x3b7ea6,_0x3760a1={'unitId':_0x574952,'threadId':_0x364d30},_0x280d86=await this[_0x2a19a5(0xc4)][_0x2a19a5(0x109)]('/universer-api/comment/unit/'+_0x574952+_0x2a19a5(0xfd),{'body':_0x3760a1}),_0x585d06=_0x364d30[_0x2a19a5(0x117)](_0x2e852a=>ee(_0x280d86[_0x2a19a5(0xba)][_0x2a19a5(0xca)][_0x2e852a],_0x574952,_0x40bf25))[_0x2a19a5(0xd3)](Boolean);return Object[_0x2a19a5(0xd0)](_0x280d86['body'][_0x2a19a5(0xec)])[_0x2a19a5(0xea)](_0x6acb74=>{const _0x316bec=_0x2a19a5;this[_0x316bec(0x113)][_0x316bec(0xd9)](_0x6acb74);}),_0x585d06;}[_0x3b7ea6(0x111)](_0xd032ca){const _0x5564a1=_0x3b7ea6;return{'id':_0xd032ca['id'],'threadId':_0xd032ca['threadId'],'ref':_0xd032ca[_0x5564a1(0xd8)]};}};S=Q([b(0x0,_0x28ae67(_0x568a11)),b(0x1,_0x28ae67(_0x5458cd)),b(0x2,_0x28ae67(_0x3a4aed))],S);var re=Object[_0x3b7ea6(0xe9)],te=(_0x15046b,_0x3e2467,_0xca2b8a,_0x374fe8)=>{const _0x20f4ec=_0x3b7ea6;for(var _0x13f899=_0x374fe8>0x1?void 0x0:_0x374fe8?re(_0x3e2467,_0xca2b8a):_0x3e2467,_0x2cad7a=_0x15046b[_0x20f4ec(0xf1)]-0x1,_0x28d9e3;_0x2cad7a>=0x0;_0x2cad7a--)(_0x28d9e3=_0x15046b[_0x2cad7a])&&(_0x13f899=_0x28d9e3(_0x13f899)||_0x13f899);return _0x13f899;},M=(_0x21d738,_0x2a29de)=>(_0x2454bc,_0x324117)=>_0x2a29de(_0x2454bc,_0x324117,_0x21d738);let f=class extends _0x5ac438{constructor(_0x17697d,_0x1ecef1){const _0x4ae032=_0x3b7ea6;super(),this[_0x4ae032(0xfb)]=_0x17697d,this[_0x4ae032(0x10d)]=_0x1ecef1,this[_0x4ae032(0xc9)]();}[_0x3b7ea6(0xc9)](){const _0x54f0f5=_0x3b7ea6;this['_threadCommentDataSourceService']['dataSource']=this[_0x54f0f5(0x10d)],this[_0x54f0f5(0xfb)][_0x54f0f5(0x10f)]=!0x1;}};f=te([M(0x0,_0x482fdc),M(0x1,_0x28ae67(S))],f);var se=Object[_0x3b7ea6(0xc2)],oe=Object[_0x3b7ea6(0xe9)],ne=(_0x112089,_0x405bc4,_0x452caf)=>_0x405bc4 in _0x112089?se(_0x112089,_0x405bc4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x452caf}):_0x112089[_0x405bc4]=_0x452caf,ie=(_0xf9d878,_0x57d109,_0x505f1b,_0x215772)=>{const _0xe616f3=_0x3b7ea6;for(var _0x121ce1=_0x215772>0x1?void 0x0:_0x215772?oe(_0x57d109,_0x505f1b):_0x57d109,_0x5bcf89=_0xf9d878[_0xe616f3(0xf1)]-0x1,_0x20bf0f;_0x5bcf89>=0x0;_0x5bcf89--)(_0x20bf0f=_0xf9d878[_0x5bcf89])&&(_0x121ce1=_0x20bf0f(_0x121ce1)||_0x121ce1);return _0x121ce1;},N=(_0x3a12eb,_0x2c1df4)=>(_0xc25808,_0x32a293)=>_0x2c1df4(_0xc25808,_0x32a293,_0x3a12eb),$=(_0x34edef,_0x32ea1e,_0x278cfc)=>ne(_0x34edef,typeof _0x32ea1e!='symbol'?_0x32ea1e+'':_0x32ea1e,_0x278cfc);let g=class extends _0x59bcbe{constructor(_0x268b0e=O,_0x41015c,_0x58833f){const _0x4bb2a2=_0x3b7ea6;super(),this[_0x4bb2a2(0xc5)]=_0x268b0e,this[_0x4bb2a2(0xee)]=_0x41015c,this[_0x4bb2a2(0x103)]=_0x58833f;const {..._0xdd0711}=_0x4f527c({},O,this[_0x4bb2a2(0xc5)]);this[_0x4bb2a2(0x103)][_0x4bb2a2(0xbd)](z,_0xdd0711);}[_0x3b7ea6(0xe2)](){const _0x5ed5ac=_0x3b7ea6;[[S],[f],[_]][_0x5ed5ac(0xea)](_0x173cc4=>{const _0x302ebb=_0x5ed5ac;this[_0x302ebb(0xee)][_0x302ebb(0x10b)](_0x173cc4);});}[_0x3b7ea6(0xde)](){const _0x50740b=_0x3b7ea6;this[_0x50740b(0xee)][_0x50740b(0xfa)](f),this[_0x50740b(0xee)]['get'](_);}};$(g,_0x3b7ea6(0xd6),W),$(g,'type',_0x3366af['UNIVER_UNKNOWN']),g=ie([_0x31c2de(_0x52729f,_0x5ecb4e,_0x2d5534),N(0x1,_0x28ae67(_0x44647b)),N(0x2,_0x3c3efa)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x427b0c=_0x2010;(function(_0x57dbff,_0x2de5b2){const _0x2736c7=_0x2010,_0x32937e=_0x57dbff();while(!![]){try{const _0x436f77=-parseInt(_0x2736c7(0x12f))/0x1*(parseInt(_0x2736c7(0x101))/0x2)+-parseInt(_0x2736c7(0x118))/0x3+parseInt(_0x2736c7(0x146))/0x4+parseInt(_0x2736c7(0x127))/0x5+-parseInt(_0x2736c7(0x115))/0x6+-parseInt(_0x2736c7(0x110))/0x7+parseInt(_0x2736c7(0x12b))/0x8;if(_0x436f77===_0x2de5b2)break;else _0x32937e['push'](_0x32937e['shift']());}catch(_0x306f43){_0x32937e['push'](_0x32937e['shift']());}}}(_0x377c,0x64619));import{CommentService as _0x406774,CollaborationSessionService as _0x264c29,UniverCollaborationClientPlugin as _0x4f9fad}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5e191e}from'@univerjs-pro/license';import{dayjs as _0x13fc8d,UserManagerService as _0x42c2f7,Inject as _0x51d02a,Injector as _0x440100,Disposable as _0x5a35c7,CustomRangeType as _0x38fd19,UniverInstanceType as _0x5c6fb1,DependentOn as _0x475c39,IConfigService as _0x2959e9,Plugin as _0x834bcd,merge as _0x523a0c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x9a2f36}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x335932,IThreadCommentDataSourceService as _0x2621a6}from'@univerjs/thread-comment';import{bufferTime as _0xe21b99}from'rxjs';import{HTTPService as _0x39ec00}from'@univerjs/network';const W=_0x427b0c(0x108);var I=(_0x2055aa=>(_0x2055aa[_0x2055aa['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x2055aa[_0x2055aa[_0x427b0c(0x141)]=0x1]=_0x427b0c(0x141),_0x2055aa[_0x2055aa[_0x427b0c(0x10c)]=-0x1]='UNRECOGNIZED',_0x2055aa))(I||{}),v=(_0x137c97=>(_0x137c97[_0x137c97['Unknown']=0x0]=_0x427b0c(0x113),_0x137c97[_0x137c97[_0x427b0c(0x12a)]=0x1]=_0x427b0c(0x12a),_0x137c97[_0x137c97['Reply']=0x2]=_0x427b0c(0x11b),_0x137c97[_0x137c97['Edit']=0x3]='Edit',_0x137c97[_0x137c97['Delete']=0x4]=_0x427b0c(0x11f),_0x137c97[_0x137c97[_0x427b0c(0x121)]=0x5]=_0x427b0c(0x121),_0x137c97[_0x137c97['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x137c97))(v||{});const y=_0x5f0fc8=>_0x13fc8d(new Date(+_0x5f0fc8))[_0x427b0c(0x10f)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x117742,_0x51f65e)=>{const _0x2e406f=_0x427b0c,_0x2b1424=_0x117742[_0x2e406f(0x11a)](_0x42c2f7),_0x5c5a4e=_0x117742[_0x2e406f(0x11a)](_0x39ec00);_0x51f65e[_0x2e406f(0x138)](_0x292d66=>{const _0x3f56a2=_0x2e406f;_0x2b1424[_0x3f56a2(0x11c)](_0x292d66)&&_0x51f65e[_0x3f56a2(0x13a)](_0x292d66);}),_0x51f65e[_0x2e406f(0x124)]&&(await _0x5c5a4e['get'](_0x2e406f(0x123),{'params':{'userIDs':[..._0x51f65e]}}))['body']['users'][_0x2e406f(0x138)](_0x365945=>{const _0x1ccd51=_0x2e406f;_0x365945&&_0x2b1424[_0x1ccd51(0x139)](_0x365945);});};var K=Object[_0x427b0c(0xe3)],V=(_0x18cb91,_0x497cbd,_0x5172e7,_0x4f1811)=>{const _0x33c830=_0x427b0c;for(var _0x24d2e6=_0x4f1811>0x1?void 0x0:_0x4f1811?K(_0x497cbd,_0x5172e7):_0x497cbd,_0x35a105=_0x18cb91[_0x33c830(0x13f)]-0x1,_0x5a17c1;_0x35a105>=0x0;_0x35a105--)(_0x5a17c1=_0x18cb91[_0x35a105])&&(_0x24d2e6=_0x5a17c1(_0x24d2e6)||_0x24d2e6);return _0x24d2e6;},p=(_0x175fb0,_0x35d032)=>(_0x3c588c,_0x5140d4)=>_0x35d032(_0x3c588c,_0x5140d4,_0x175fb0);let _=class extends _0x5a35c7{constructor(_0x108c68,_0xaf91c1,_0x30e61c,_0x2775fe){const _0x12bb0c=_0x427b0c;super(),this[_0x12bb0c(0x10d)]=_0x108c68,this[_0x12bb0c(0x102)]=_0xaf91c1,this[_0x12bb0c(0x12e)]=_0x30e61c,this[_0x12bb0c(0xe9)]=_0x2775fe,this[_0x12bb0c(0x130)](),this[_0x12bb0c(0x131)]();}['_initUserSync'](){const _0x5e4cab=_0x427b0c;this[_0x5e4cab(0x145)](this[_0x5e4cab(0x102)]['commentUpdate$']['pipe'](_0xe21b99(0x10))[_0x5e4cab(0xe8)](_0x15a592=>{const _0x550844=_0x5e4cab,_0x4bfbf8=new Set();_0x15a592[_0x550844(0x138)](_0x1fc900=>{const _0x36377f=_0x550844;switch(_0x1fc900[_0x36377f(0x13d)]){case _0x36377f(0xe2):{const _0x40004f=_0x1fc900['payload'][_0x36377f(0xe6)];_0x4bfbf8['add'](_0x40004f);break;}}}),B(this[_0x550844(0xe9)],_0x4bfbf8);}));}['_init'](){const _0x1a1608=_0x427b0c;this[_0x1a1608(0x145)](this[_0x1a1608(0x10d)][_0x1a1608(0x111)][_0x1a1608(0xe8)](async _0xba0dc1=>{const _0x43699d=_0x1a1608;var _0x2b91b9,_0x11f085,_0x5a1f92,_0x33a5c3;const _0x597b9b=(_0x2b91b9=this[_0x43699d(0x102)][_0x43699d(0xef)](_0xba0dc1[_0x43699d(0x10a)])[_0x43699d(0x135)](_0x42e84a=>_0x42e84a[_0x43699d(0xfa)]===_0xba0dc1['threadId']))==null?void 0x0:_0x2b91b9['root'];if(!_0x597b9b)return;const {unitId:_0x5b66cb,subUnitId:_0xa79809}=_0x597b9b;switch(_0xba0dc1[_0x43699d(0xf6)]&&this[_0x43699d(0x12e)][_0x43699d(0x139)](_0xba0dc1[_0x43699d(0xf6)]),_0xba0dc1[_0x43699d(0x13d)]){case v['Add']:break;case v[_0x43699d(0x11b)]:{this[_0x43699d(0x102)][_0x43699d(0xeb)](_0x5b66cb,_0xa79809,{'unitId':_0x5b66cb,'subUnitId':_0xa79809,'ref':'','id':_0xba0dc1[_0x43699d(0xfe)],'dT':y(+_0xba0dc1[_0x43699d(0x11e)]),'threadId':_0xba0dc1[_0x43699d(0xfa)],'personId':(_0x5a1f92=(_0x11f085=_0xba0dc1[_0x43699d(0xf6)])==null?void 0x0:_0x11f085[_0x43699d(0x100)])!=null?_0x5a1f92:_0xba0dc1['userId'],'text':JSON[_0x43699d(0xf7)](_0xba0dc1[_0x43699d(0x137)]),'parentId':_0x597b9b['id']});break;}case v[_0x43699d(0x11f)]:{const _0x5c1884=this[_0x43699d(0x102)]['getComment'](_0x5b66cb,_0xa79809,_0xba0dc1[_0x43699d(0xfe)]);_0x5c1884&&_0x5c1884['parentId']&&this[_0x43699d(0x102)][_0x43699d(0x103)](_0x5b66cb,_0xa79809,_0xba0dc1[_0x43699d(0xfe)]);break;}case v[_0x43699d(0x116)]:{this[_0x43699d(0x102)][_0x43699d(0x106)](_0x5b66cb,_0xa79809,{'commentId':_0xba0dc1[_0x43699d(0xfe)],'text':JSON['parse'](_0xba0dc1['content'])});break;}case v[_0x43699d(0x121)]:{const _0x2c178c=(_0x33a5c3=this[_0x43699d(0x102)]['getUnit'](_0xba0dc1[_0x43699d(0x10a)])[_0x43699d(0x135)](_0x57e23e=>_0x57e23e[_0x43699d(0xfa)]===_0xba0dc1['threadId']))==null?void 0x0:_0x33a5c3[_0x43699d(0xff)];_0x2c178c&&this[_0x43699d(0x102)][_0x43699d(0x11d)](_0x5b66cb,_0xa79809,_0x2c178c['id'],_0xba0dc1[_0x43699d(0x126)]===I[_0x43699d(0x141)]);break;}}}));}};_=V([p(0x0,_0x51d02a(_0x406774)),p(0x1,_0x51d02a(_0x335932)),p(0x2,_0x51d02a(_0x42c2f7)),p(0x3,_0x51d02a(_0x440100))],_);const z=_0x427b0c(0x129),O={};function _0x2010(_0x10d55b,_0x1006c1){_0x10d55b=_0x10d55b-0xe2;const _0x377c65=_0x377c();let _0x201066=_0x377c65[_0x10d55b];return _0x201066;}var k=Object[_0x427b0c(0xe3)],Q=(_0x4acb78,_0x3af339,_0x1465f0,_0x544465)=>{const _0x27a7e3=_0x427b0c;for(var _0x394834=_0x544465>0x1?void 0x0:_0x544465?k(_0x3af339,_0x1465f0):_0x3af339,_0x3320d6=_0x4acb78[_0x27a7e3(0x13f)]-0x1,_0x398335;_0x3320d6>=0x0;_0x3320d6--)(_0x398335=_0x4acb78[_0x3320d6])&&(_0x394834=_0x398335(_0x394834)||_0x394834);return _0x394834;},b=(_0x14c0d8,_0x98e02f)=>(_0xd323c7,_0x23bd47)=>_0x98e02f(_0xd323c7,_0x23bd47,_0x14c0d8);function X(_0x30d4e1,_0x3ddc67){const _0x5c4e94=_0x427b0c,_0x5b82be=_0x30d4e1[_0x5c4e94(0x132)][0x0];return{..._0x3ddc67,'id':_0x5b82be[_0x5c4e94(0xfe)],'resolved':_0x30d4e1[_0x5c4e94(0x126)]===0x1,'dT':y(_0x5b82be[_0x5c4e94(0x11e)]),'personId':_0x5b82be[_0x5c4e94(0xea)],'threadId':_0x5b82be['threadId']};}function _0x377c(){const _0x29caea=['body','unitId','onStarting','UNRECOGNIZED','_commentService','users','format','4723691KfrHJO','commentUpdate$','stringify','Unknown','rangeId','2042082JQQjaV','Edit','_config','1047003xsDrhE','/list','get','Reply','getUser','resolveComment','createTimestamp','Delete','onReady','Solve','syncUpdateMutationToColla','/universer-api/user/list','size','_httpService','solved','11710BRLVuU','_threadCommentDataSourceService','thread-comment-data-source.config','Add','17399304PGPVsW','/solved','COMMENT','_userService','10eVrVCL','_init','_initUserSync','replies','_sessionService','_threadCommentDataSource','find','_initDataSource','content','forEach','addUser','delete','/reply','UNIVER_UNKNOWN','type','/edit','length','values','Solved','saveCommentToSnapshot','setConfig','requireSession','disposeWithMe','132948EvmXrq','slice','add','getOwnPropertyDescriptor','ref','filter','personId','dataSource','subscribe','_injector','userId','addComment','code','customRanges','error','getUnit','/add','symbol','_configService','/universer-api/comment/unit/','OpenOrReOpen','getMemberID','user','parse','reply','resolved','threadId','post','getCurrentUser','map','replyId','root','userID','87034iRoCtl','_threadCommentModel','deleteComment','comment','rangeType','updateComment','pluginName','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'];_0x377c=function(){return _0x29caea;};return _0x377c();}function ee(_0x2f8ffc,_0x5477d3,_0x2acd17){const _0x79548c=_0x427b0c;var _0x4e3de5,_0x5b958e;if(((_0x5b958e=(_0x4e3de5=_0x2f8ffc==null?void 0x0:_0x2f8ffc['replies'])==null?void 0x0:_0x4e3de5[_0x79548c(0x13f)])!=null?_0x5b958e:0x0)>0x0){const _0x202afc=(_0x3c3e3f,_0x2f2657)=>({'id':_0x3c3e3f['replyId'],'threadId':_0x3c3e3f[_0x79548c(0xfa)],'dT':y(_0x3c3e3f[_0x79548c(0x11e)]),'personId':_0x3c3e3f[_0x79548c(0xea)],'resolved':_0x2f8ffc['solved']===I['Solved'],'unitId':_0x5477d3,'subUnitId':_0x2acd17,'text':JSON['parse'](_0x3c3e3f[_0x79548c(0x137)]),'parentId':_0x2f2657}),_0x2e4d9c=_0x202afc(_0x2f8ffc['replies'][0x0]);return{..._0x2e4d9c,'children':_0x2f8ffc[_0x79548c(0x132)][_0x79548c(0x147)](0x1)[_0x79548c(0xfd)](_0x5c3140=>_0x202afc(_0x5c3140,_0x2e4d9c['id']))};}return null;}let S=class{constructor(_0x38dbdc,_0x444e35,_0x4e70aa){const _0x1c0ea3=_0x427b0c;this[_0x1c0ea3(0x125)]=_0x38dbdc,this[_0x1c0ea3(0x12e)]=_0x444e35,this[_0x1c0ea3(0x133)]=_0x4e70aa;}async[_0x427b0c(0xeb)](_0x206698){const _0x2e40a4=_0x427b0c;var _0x508dc9,_0x20a1b8;const {parentId:_0x11b922,unitId:_0x328d09,text:_0x22f7d5,threadId:_0xad0233}=_0x206698,_0xb9714c=(_0x20a1b8=(_0x508dc9=_0x22f7d5['customRanges'])==null?void 0x0:_0x508dc9[_0x2e40a4(0xe5)](_0x47d84c=>_0x47d84c[_0x2e40a4(0x105)]===_0x38fd19[_0x2e40a4(0x12d)])[_0x2e40a4(0xfd)](_0x43d2bf=>_0x43d2bf[_0x2e40a4(0x114)]))!=null?_0x20a1b8:[],_0x3c8cbc=JSON[_0x2e40a4(0x112)](_0x22f7d5),_0x128309=(await this[_0x2e40a4(0x133)][_0x2e40a4(0x144)](_0x328d09))[_0x2e40a4(0xf5)]();if(_0x11b922){const _0x35e7a0={'memberId':_0x128309,'unitId':_0x328d09,'content':_0x3c8cbc,'mention':_0xb9714c,'threadId':_0xad0233},_0x29b5c2=(await this[_0x2e40a4(0x125)][_0x2e40a4(0xfb)]('/universer-api/comment/unit/'+_0x328d09+_0x2e40a4(0x13b),{'body':_0x35e7a0}))['body'][_0x2e40a4(0xf8)];return{..._0x206698,'id':_0x29b5c2[_0x2e40a4(0xfe)],'dT':_0x13fc8d(+_0x29b5c2[_0x2e40a4(0x11e)])[_0x2e40a4(0x10f)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x29b5c2['userId']};}else{const _0x573964={'memberId':_0x128309,'unitId':_0x328d09,'content':_0x3c8cbc,'mention':_0xb9714c},_0x40e359=await this[_0x2e40a4(0x125)][_0x2e40a4(0xfb)]('/universer-api/comment/unit/'+_0x328d09+_0x2e40a4(0xf0),{'body':_0x573964});return X(_0x40e359[_0x2e40a4(0x109)][_0x2e40a4(0x104)],_0x206698);}}async[_0x427b0c(0x106)](_0x3ee8dc){const _0x5e84d0=_0x427b0c;var _0x1638a8,_0x1440b;const {text:_0x26a911,unitId:_0x54dc3b}=_0x3ee8dc,_0x1c5ccb=(_0x1440b=(_0x1638a8=_0x26a911[_0x5e84d0(0xed)])==null?void 0x0:_0x1638a8[_0x5e84d0(0xe5)](_0x3971b8=>_0x3971b8[_0x5e84d0(0x105)]===_0x38fd19[_0x5e84d0(0x12d)])['map'](_0x5b5ca=>_0x5b5ca[_0x5e84d0(0x114)]))!=null?_0x1440b:[],_0x128f84=JSON['stringify'](_0x26a911),_0x51fc9e=_0x3ee8dc[_0x5e84d0(0xfa)],_0x4c3c7d=_0x3ee8dc['id'],_0xe0460f={'memberId':(await this['_sessionService'][_0x5e84d0(0x144)](_0x54dc3b))[_0x5e84d0(0xf5)](),'unitId':_0x54dc3b,'threadId':_0x51fc9e,'mention':_0x1c5ccb,'content':_0x128f84,'replyId':_0x4c3c7d},_0x1b9a85=await this[_0x5e84d0(0x125)][_0x5e84d0(0xfb)](_0x5e84d0(0xf3)+_0x54dc3b+_0x5e84d0(0x13e),{'body':_0xe0460f});return!_0x1b9a85[_0x5e84d0(0x109)][_0x5e84d0(0xee)]||_0x1b9a85[_0x5e84d0(0x109)][_0x5e84d0(0xee)]['code']===0x1;}async[_0x427b0c(0x11d)](_0x4fd442){const _0x42f27b=_0x427b0c,{unitId:_0x26f2f3}=_0x4fd442,_0x2a72f9=_0x4fd442[_0x42f27b(0xfa)],_0x961c14={'memberId':this[_0x42f27b(0x12e)][_0x42f27b(0xfc)]()[_0x42f27b(0x100)],'unitId':_0x26f2f3,'threadId':_0x2a72f9,'solved':_0x4fd442[_0x42f27b(0xf9)]?I[_0x42f27b(0x141)]:I[_0x42f27b(0xf4)]},_0x5f05c3=await this['_httpService'][_0x42f27b(0xfb)](_0x42f27b(0xf3)+_0x26f2f3+_0x42f27b(0x12c),{'body':_0x961c14});return!_0x5f05c3[_0x42f27b(0x109)][_0x42f27b(0xee)]||_0x5f05c3['body'][_0x42f27b(0xee)]['code']===0x1;}async[_0x427b0c(0x103)](_0x149f25,_0x4c1764,_0x2d3785,_0x1fcb69){const _0x5e63ee=_0x427b0c,_0xd18266={'memberId':(await this[_0x5e63ee(0x133)][_0x5e63ee(0x144)](_0x149f25))[_0x5e63ee(0xf5)](),'threadId':_0x2d3785,'replyId':_0x1fcb69,'unitId':_0x149f25},_0x5e7f8a=await this[_0x5e63ee(0x125)]['post'](_0x5e63ee(0xf3)+_0x149f25+'/delete',{'body':_0xd18266});return!_0x5e7f8a['body'][_0x5e63ee(0xee)]||_0x5e7f8a['body'][_0x5e63ee(0xee)][_0x5e63ee(0xec)]===0x1;}async['listComments'](_0x15f8d9,_0x3f392a,_0x4d90bf){const _0x229810=_0x427b0c,_0x588957={'unitId':_0x15f8d9,'threadId':_0x4d90bf},_0x3d822c=await this[_0x229810(0x125)]['post'](_0x229810(0xf3)+_0x15f8d9+_0x229810(0x119),{'body':_0x588957}),_0x38873f=_0x4d90bf[_0x229810(0xfd)](_0x555d5a=>ee(_0x3d822c[_0x229810(0x109)]['comments'][_0x555d5a],_0x15f8d9,_0x3f392a))[_0x229810(0xe5)](Boolean);return Object[_0x229810(0x140)](_0x3d822c[_0x229810(0x109)][_0x229810(0x10e)])['forEach'](_0x29f32b=>{const _0x301e58=_0x229810;this[_0x301e58(0x12e)]['addUser'](_0x29f32b);}),_0x38873f;}[_0x427b0c(0x142)](_0x521fe3){const _0x3dceac=_0x427b0c;return{'id':_0x521fe3['id'],'threadId':_0x521fe3[_0x3dceac(0xfa)],'ref':_0x521fe3[_0x3dceac(0xe4)]};}};S=Q([b(0x0,_0x51d02a(_0x39ec00)),b(0x1,_0x51d02a(_0x42c2f7)),b(0x2,_0x51d02a(_0x264c29))],S);var re=Object[_0x427b0c(0xe3)],te=(_0x3cf17f,_0x45659a,_0x177ff7,_0x77219c)=>{for(var _0x43e22d=_0x77219c>0x1?void 0x0:_0x77219c?re(_0x45659a,_0x177ff7):_0x45659a,_0x2790ad=_0x3cf17f['length']-0x1,_0x36fb3f;_0x2790ad>=0x0;_0x2790ad--)(_0x36fb3f=_0x3cf17f[_0x2790ad])&&(_0x43e22d=_0x36fb3f(_0x43e22d)||_0x43e22d);return _0x43e22d;},M=(_0x10ddbb,_0x26a2ed)=>(_0x3224c4,_0x34821d)=>_0x26a2ed(_0x3224c4,_0x34821d,_0x10ddbb);let f=class extends _0x5a35c7{constructor(_0x120284,_0x4e1185){const _0x127e87=_0x427b0c;super(),this[_0x127e87(0x128)]=_0x120284,this[_0x127e87(0x134)]=_0x4e1185,this[_0x127e87(0x136)]();}[_0x427b0c(0x136)](){const _0x4e53ff=_0x427b0c;this['_threadCommentDataSourceService'][_0x4e53ff(0xe7)]=this[_0x4e53ff(0x134)],this[_0x4e53ff(0x128)][_0x4e53ff(0x122)]=!0x1;}};f=te([M(0x0,_0x2621a6),M(0x1,_0x51d02a(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x2e3b18,_0x3e1d4b,_0xf82d82)=>_0x3e1d4b in _0x2e3b18?se(_0x2e3b18,_0x3e1d4b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf82d82}):_0x2e3b18[_0x3e1d4b]=_0xf82d82,ie=(_0xa75447,_0x3c4f30,_0x4383ac,_0x1cbeba)=>{const _0x190e10=_0x427b0c;for(var _0x5ec70f=_0x1cbeba>0x1?void 0x0:_0x1cbeba?oe(_0x3c4f30,_0x4383ac):_0x3c4f30,_0x1050fb=_0xa75447[_0x190e10(0x13f)]-0x1,_0x24f5c7;_0x1050fb>=0x0;_0x1050fb--)(_0x24f5c7=_0xa75447[_0x1050fb])&&(_0x5ec70f=_0x24f5c7(_0x5ec70f)||_0x5ec70f);return _0x5ec70f;},N=(_0x3ffbc3,_0x54bb51)=>(_0x56a5b8,_0x5c234f)=>_0x54bb51(_0x56a5b8,_0x5c234f,_0x3ffbc3),$=(_0x13d40f,_0x3e79b0,_0x45cdff)=>ne(_0x13d40f,typeof _0x3e79b0!=_0x427b0c(0xf1)?_0x3e79b0+'':_0x3e79b0,_0x45cdff);let g=class extends _0x834bcd{constructor(_0x2f76d2=O,_0x40b013,_0x3b0b8e){const _0x2328b2=_0x427b0c;super(),this[_0x2328b2(0x117)]=_0x2f76d2,this[_0x2328b2(0xe9)]=_0x40b013,this[_0x2328b2(0xf2)]=_0x3b0b8e;const {..._0x5a5d0c}=_0x523a0c({},O,this['_config']);this[_0x2328b2(0xf2)][_0x2328b2(0x143)](z,_0x5a5d0c);}[_0x427b0c(0x10b)](){const _0x40431b=_0x427b0c;[[S],[f],[_]][_0x40431b(0x138)](_0x104ee1=>{const _0xfb3871=_0x40431b;this[_0xfb3871(0xe9)][_0xfb3871(0xe2)](_0x104ee1);});}[_0x427b0c(0x120)](){const _0x4f823c=_0x427b0c;this['_injector'][_0x4f823c(0x11a)](f),this[_0x4f823c(0xe9)][_0x4f823c(0x11a)](_);}};$(g,_0x427b0c(0x107),W),$(g,_0x427b0c(0x13d),_0x5c6fb1[_0x427b0c(0x13c)]),g=ie([_0x475c39(_0x9a2f36,_0x4f9fad,_0x5e191e),N(0x1,_0x51d02a(_0x440100)),N(0x2,_0x2959e9)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x3b7ea6=_0x5f2a;(function(_0x283cf7,_0x46fba3){const _0x6d5814=_0x5f2a,_0x146e4a=_0x283cf7();while(!![]){try{const _0x48feeb=-parseInt(_0x6d5814(0x10e))/0x1*(-parseInt(_0x6d5814(0xe7))/0x2)+-parseInt(_0x6d5814(0x112))/0x3*(-parseInt(_0x6d5814(0x119))/0x4)+-parseInt(_0x6d5814(0x116))/0x5*(parseInt(_0x6d5814(0xf7))/0x6)+-parseInt(_0x6d5814(0xbc))/0x7+parseInt(_0x6d5814(0x118))/0x8*(-parseInt(_0x6d5814(0x106))/0x9)+parseInt(_0x6d5814(0xfe))/0xa+-parseInt(_0x6d5814(0xfc))/0xb;if(_0x48feeb===_0x46fba3)break;else _0x146e4a['push'](_0x146e4a['shift']());}catch(_0x4aa755){_0x146e4a['push'](_0x146e4a['shift']());}}}(_0x33ad,0x276c2));import{CommentService as _0x470bf5,CollaborationSessionService as _0x3a4aed,UniverCollaborationClientPlugin as _0x5ecb4e}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2d5534}from'@univerjs-pro/license';function _0x5f2a(_0x1a7afe,_0x5db058){const _0x33ad5d=_0x33ad();return _0x5f2a=function(_0x5f2a9e,_0x4773ad){_0x5f2a9e=_0x5f2a9e-0xb7;let _0x448c39=_0x33ad5d[_0x5f2a9e];return _0x448c39;},_0x5f2a(_0x1a7afe,_0x5db058);}import{dayjs as _0x595df9,UserManagerService as _0x5458cd,Inject as _0x28ae67,Injector as _0x44647b,Disposable as _0x5ac438,CustomRangeType as _0x325494,UniverInstanceType as _0x3366af,DependentOn as _0x31c2de,IConfigService as _0x3c3efa,Plugin as _0x59bcbe,merge as _0x4f527c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x52729f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2e7a6e,IThreadCommentDataSourceService as _0x482fdc}from'@univerjs/thread-comment';import{bufferTime as _0x466a99}from'rxjs';import{HTTPService as _0x568a11}from'@univerjs/network';const W=_0x3b7ea6(0xc1);var I=(_0x4105a8=>(_0x4105a8[_0x4105a8['OpenOrReOpen']=0x0]=_0x3b7ea6(0x105),_0x4105a8[_0x4105a8[_0x3b7ea6(0xd4)]=0x1]=_0x3b7ea6(0xd4),_0x4105a8[_0x4105a8[_0x3b7ea6(0xc8)]=-0x1]='UNRECOGNIZED',_0x4105a8))(I||{}),v=(_0x2e3b70=>(_0x2e3b70[_0x2e3b70[_0x3b7ea6(0xcc)]=0x0]='Unknown',_0x2e3b70[_0x2e3b70[_0x3b7ea6(0xc0)]=0x1]=_0x3b7ea6(0xc0),_0x2e3b70[_0x2e3b70['Reply']=0x2]=_0x3b7ea6(0xb9),_0x2e3b70[_0x2e3b70['Edit']=0x3]=_0x3b7ea6(0xdd),_0x2e3b70[_0x2e3b70[_0x3b7ea6(0xf0)]=0x4]=_0x3b7ea6(0xf0),_0x2e3b70[_0x2e3b70[_0x3b7ea6(0xc3)]=0x5]=_0x3b7ea6(0xc3),_0x2e3b70[_0x2e3b70[_0x3b7ea6(0xc8)]=-0x1]='UNRECOGNIZED',_0x2e3b70))(v||{});const y=_0x3d6e20=>_0x595df9(new Date(+_0x3d6e20))[_0x3b7ea6(0xe5)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x1e3f5f,_0x14e3f4)=>{const _0x2499b7=_0x3b7ea6,_0x19398d=_0x1e3f5f['get'](_0x5458cd),_0x296854=_0x1e3f5f[_0x2499b7(0xfa)](_0x568a11);_0x14e3f4['forEach'](_0x303083=>{const _0x20c0fd=_0x2499b7;_0x19398d[_0x20c0fd(0xbf)](_0x303083)&&_0x14e3f4[_0x20c0fd(0xf9)](_0x303083);}),_0x14e3f4[_0x2499b7(0xed)]&&(await _0x296854[_0x2499b7(0xfa)](_0x2499b7(0x115),{'params':{'userIDs':[..._0x14e3f4]}}))['body'][_0x2499b7(0xec)]['forEach'](_0x308462=>{const _0x12b557=_0x2499b7;_0x308462&&_0x19398d[_0x12b557(0xd9)](_0x308462);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x55a740,_0x472917,_0x5ab5b7,_0x564069)=>{const _0x320701=_0x3b7ea6;for(var _0xed6a3e=_0x564069>0x1?void 0x0:_0x564069?K(_0x472917,_0x5ab5b7):_0x472917,_0x4a0ac7=_0x55a740[_0x320701(0xf1)]-0x1,_0x5b64c4;_0x4a0ac7>=0x0;_0x4a0ac7--)(_0x5b64c4=_0x55a740[_0x4a0ac7])&&(_0xed6a3e=_0x5b64c4(_0xed6a3e)||_0xed6a3e);return _0xed6a3e;},p=(_0x2acd49,_0x29790c)=>(_0x23de51,_0x1fb4f4)=>_0x29790c(_0x23de51,_0x1fb4f4,_0x2acd49);let _=class extends _0x5ac438{constructor(_0x59bb49,_0x35bcf7,_0x583288,_0x241f1d){const _0x2ed31a=_0x3b7ea6;super(),this[_0x2ed31a(0x10c)]=_0x59bb49,this[_0x2ed31a(0xf5)]=_0x35bcf7,this[_0x2ed31a(0x113)]=_0x583288,this[_0x2ed31a(0xee)]=_0x241f1d,this[_0x2ed31a(0x110)](),this['_initUserSync']();}[_0x3b7ea6(0x100)](){const _0x36266e=_0x3b7ea6;this[_0x36266e(0x11d)](this['_threadCommentModel'][_0x36266e(0xb7)][_0x36266e(0xef)](_0x466a99(0x10))[_0x36266e(0xc7)](_0x36c9ce=>{const _0x4b5914=_0x36266e,_0x2ed94f=new Set();_0x36c9ce[_0x4b5914(0xea)](_0x54ac1b=>{const _0x51df4c=_0x4b5914;switch(_0x54ac1b[_0x51df4c(0xe4)]){case _0x51df4c(0x10b):{const _0x13d840=_0x54ac1b['payload'][_0x51df4c(0xf6)];_0x2ed94f['add'](_0x13d840);break;}}}),B(this[_0x4b5914(0xee)],_0x2ed94f);}));}['_init'](){const _0x3f5275=_0x3b7ea6;this['disposeWithMe'](this[_0x3f5275(0x10c)][_0x3f5275(0xb7)][_0x3f5275(0xc7)](async _0x4430b7=>{const _0xb0ca1a=_0x3f5275;var _0x9b3c3f,_0x3faf20,_0xb07964,_0x3e0545;const _0x46a076=(_0x9b3c3f=this[_0xb0ca1a(0xf5)][_0xb0ca1a(0xf3)](_0x4430b7[_0xb0ca1a(0xd2)])[_0xb0ca1a(0xda)](_0x37fa0f=>_0x37fa0f[_0xb0ca1a(0x11c)]===_0x4430b7['threadId']))==null?void 0x0:_0x9b3c3f['root'];if(!_0x46a076)return;const {unitId:_0x4636d2,subUnitId:_0x2214ff}=_0x46a076;switch(_0x4430b7[_0xb0ca1a(0x10a)]&&this['_userService'][_0xb0ca1a(0xd9)](_0x4430b7[_0xb0ca1a(0x10a)]),_0x4430b7[_0xb0ca1a(0xe4)]){case v[_0xb0ca1a(0xc0)]:break;case v['Reply']:{this[_0xb0ca1a(0xf5)][_0xb0ca1a(0xdc)](_0x4636d2,_0x2214ff,{'unitId':_0x4636d2,'subUnitId':_0x2214ff,'ref':'','id':_0x4430b7['replyId'],'dT':y(+_0x4430b7[_0xb0ca1a(0xcb)]),'threadId':_0x4430b7[_0xb0ca1a(0x11c)],'personId':(_0xb07964=(_0x3faf20=_0x4430b7[_0xb0ca1a(0x10a)])==null?void 0x0:_0x3faf20[_0xb0ca1a(0x107)])!=null?_0xb07964:_0x4430b7[_0xb0ca1a(0xd7)],'text':JSON['parse'](_0x4430b7[_0xb0ca1a(0xbe)]),'parentId':_0x46a076['id']});break;}case v[_0xb0ca1a(0xf0)]:{const _0x1fc21b=this[_0xb0ca1a(0xf5)]['getComment'](_0x4636d2,_0x2214ff,_0x4430b7[_0xb0ca1a(0x101)]);_0x1fc21b&&_0x1fc21b[_0xb0ca1a(0x104)]&&this[_0xb0ca1a(0xf5)][_0xb0ca1a(0x11a)](_0x4636d2,_0x2214ff,_0x4430b7[_0xb0ca1a(0x101)]);break;}case v['Edit']:{this[_0xb0ca1a(0xf5)][_0xb0ca1a(0xb8)](_0x4636d2,_0x2214ff,{'commentId':_0x4430b7[_0xb0ca1a(0x101)],'text':JSON[_0xb0ca1a(0xc6)](_0x4430b7[_0xb0ca1a(0xbe)])});break;}case v[_0xb0ca1a(0xc3)]:{const _0x37eb1e=(_0x3e0545=this[_0xb0ca1a(0xf5)]['getUnit'](_0x4430b7[_0xb0ca1a(0xd2)])[_0xb0ca1a(0xda)](_0x176e72=>_0x176e72[_0xb0ca1a(0x11c)]===_0x4430b7[_0xb0ca1a(0x11c)]))==null?void 0x0:_0x3e0545['root'];_0x37eb1e&&this[_0xb0ca1a(0xf5)][_0xb0ca1a(0xf4)](_0x4636d2,_0x2214ff,_0x37eb1e['id'],_0x4430b7[_0xb0ca1a(0xeb)]===I[_0xb0ca1a(0xd4)]);break;}}}));}};function _0x33ad(){const _0xfa4135=['_injector','pipe','Delete','length','code','getUnit','resolveComment','_threadCommentModel','personId','462MsFwhA','resolved','delete','get','_threadCommentDataSourceService','499026QHqcSv','/list','277920zILiob','listComments','_initUserSync','replyId','getMemberID','_configService','parentId','OpenOrReOpen','17163VKLgkr','userID','error','post','user','add','_commentService','_threadCommentDataSource','57993WWaqIB','syncUpdateMutationToColla','_init','saveCommentToSnapshot','6093zsLgaG','_userService','/delete','/universer-api/user/list','14205EGlZoX','map','144xWSrgm','596IFinBc','deleteComment','stringify','threadId','disposeWithMe','COMMENT','/universer-api/comment/unit/','commentUpdate$','updateComment','Reply','body','/add','311269JQnICV','setConfig','content','getUser','Add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','defineProperty','Solve','_httpService','_config','parse','subscribe','UNRECOGNIZED','_initDataSource','comments','createTimestamp','Unknown','/reply','slice','_sessionService','values','replies','unitId','filter','Solved','customRanges','pluginName','userId','ref','addUser','find','/solved','addComment','Edit','onReady','comment','rangeType','requireSession','onStarting','/edit','type','format','rangeId','6QohJIs','YYYY/MM/DD\x20HH:mm','getOwnPropertyDescriptor','forEach','solved','users','size'];_0x33ad=function(){return _0xfa4135;};return _0x33ad();}_=V([p(0x0,_0x28ae67(_0x470bf5)),p(0x1,_0x28ae67(_0x2e7a6e)),p(0x2,_0x28ae67(_0x5458cd)),p(0x3,_0x28ae67(_0x44647b))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x3b7ea6(0xe9)],Q=(_0x1937be,_0x594851,_0x40c47c,_0x380bd7)=>{for(var _0xbf1e64=_0x380bd7>0x1?void 0x0:_0x380bd7?k(_0x594851,_0x40c47c):_0x594851,_0x210a3e=_0x1937be['length']-0x1,_0x3ad3ef;_0x210a3e>=0x0;_0x210a3e--)(_0x3ad3ef=_0x1937be[_0x210a3e])&&(_0xbf1e64=_0x3ad3ef(_0xbf1e64)||_0xbf1e64);return _0xbf1e64;},b=(_0x4aeb2b,_0x4b65cf)=>(_0x267662,_0x77c4da)=>_0x4b65cf(_0x267662,_0x77c4da,_0x4aeb2b);function X(_0x1bfc6f,_0x496a2c){const _0x155726=_0x3b7ea6,_0x504f6c=_0x1bfc6f[_0x155726(0xd1)][0x0];return{..._0x496a2c,'id':_0x504f6c[_0x155726(0x101)],'resolved':_0x1bfc6f[_0x155726(0xeb)]===0x1,'dT':y(_0x504f6c[_0x155726(0xcb)]),'personId':_0x504f6c['userId'],'threadId':_0x504f6c[_0x155726(0x11c)]};}function ee(_0x5dbdc0,_0x5250e6,_0x2c0a8f){const _0x1134aa=_0x3b7ea6;var _0x3591e1,_0x58ee36;if(((_0x58ee36=(_0x3591e1=_0x5dbdc0==null?void 0x0:_0x5dbdc0[_0x1134aa(0xd1)])==null?void 0x0:_0x3591e1[_0x1134aa(0xf1)])!=null?_0x58ee36:0x0)>0x0){const _0x266b3f=(_0x5b6109,_0x3a124d)=>({'id':_0x5b6109[_0x1134aa(0x101)],'threadId':_0x5b6109[_0x1134aa(0x11c)],'dT':y(_0x5b6109['createTimestamp']),'personId':_0x5b6109[_0x1134aa(0xd7)],'resolved':_0x5dbdc0[_0x1134aa(0xeb)]===I[_0x1134aa(0xd4)],'unitId':_0x5250e6,'subUnitId':_0x2c0a8f,'text':JSON[_0x1134aa(0xc6)](_0x5b6109[_0x1134aa(0xbe)]),'parentId':_0x3a124d}),_0x35a508=_0x266b3f(_0x5dbdc0[_0x1134aa(0xd1)][0x0]);return{..._0x35a508,'children':_0x5dbdc0[_0x1134aa(0xd1)][_0x1134aa(0xce)](0x1)[_0x1134aa(0x117)](_0x5e937b=>_0x266b3f(_0x5e937b,_0x35a508['id']))};}return null;}let S=class{constructor(_0x3a7f5a,_0x3d747e,_0x3aad76){const _0x478ea6=_0x3b7ea6;this['_httpService']=_0x3a7f5a,this[_0x478ea6(0x113)]=_0x3d747e,this[_0x478ea6(0xcf)]=_0x3aad76;}async[_0x3b7ea6(0xdc)](_0x486127){const _0x151f9b=_0x3b7ea6;var _0x59e20e,_0x581230;const {parentId:_0x4c2cf1,unitId:_0x224636,text:_0x1d4c9c,threadId:_0x4f7eec}=_0x486127,_0x29a171=(_0x581230=(_0x59e20e=_0x1d4c9c[_0x151f9b(0xd5)])==null?void 0x0:_0x59e20e['filter'](_0x239ea0=>_0x239ea0[_0x151f9b(0xe0)]===_0x325494[_0x151f9b(0x11e)])['map'](_0x437cb2=>_0x437cb2[_0x151f9b(0xe6)]))!=null?_0x581230:[],_0x2b35d1=JSON[_0x151f9b(0x11b)](_0x1d4c9c),_0x45145e=(await this[_0x151f9b(0xcf)][_0x151f9b(0xe1)](_0x224636))[_0x151f9b(0x102)]();if(_0x4c2cf1){const _0x4098e0={'memberId':_0x45145e,'unitId':_0x224636,'content':_0x2b35d1,'mention':_0x29a171,'threadId':_0x4f7eec},_0x39797a=(await this['_httpService'][_0x151f9b(0x109)]('/universer-api/comment/unit/'+_0x224636+_0x151f9b(0xcd),{'body':_0x4098e0}))['body']['reply'];return{..._0x486127,'id':_0x39797a[_0x151f9b(0x101)],'dT':_0x595df9(+_0x39797a['createTimestamp'])[_0x151f9b(0xe5)](_0x151f9b(0xe8)),'personId':_0x39797a[_0x151f9b(0xd7)]};}else{const _0x56e93b={'memberId':_0x45145e,'unitId':_0x224636,'content':_0x2b35d1,'mention':_0x29a171},_0x560e94=await this[_0x151f9b(0xc4)][_0x151f9b(0x109)](_0x151f9b(0x11f)+_0x224636+_0x151f9b(0xbb),{'body':_0x56e93b});return X(_0x560e94['body'][_0x151f9b(0xdf)],_0x486127);}}async[_0x3b7ea6(0xb8)](_0x2d2cae){const _0x540afd=_0x3b7ea6;var _0x3f4b8c,_0x433ab3;const {text:_0x4f45d0,unitId:_0x59d4c3}=_0x2d2cae,_0x2fac39=(_0x433ab3=(_0x3f4b8c=_0x4f45d0[_0x540afd(0xd5)])==null?void 0x0:_0x3f4b8c[_0x540afd(0xd3)](_0x4d1f20=>_0x4d1f20[_0x540afd(0xe0)]===_0x325494[_0x540afd(0x11e)])[_0x540afd(0x117)](_0x5e5d95=>_0x5e5d95[_0x540afd(0xe6)]))!=null?_0x433ab3:[],_0x476e2f=JSON[_0x540afd(0x11b)](_0x4f45d0),_0x1e40cd=_0x2d2cae[_0x540afd(0x11c)],_0x45cbc4=_0x2d2cae['id'],_0x5d94a2={'memberId':(await this[_0x540afd(0xcf)][_0x540afd(0xe1)](_0x59d4c3))['getMemberID'](),'unitId':_0x59d4c3,'threadId':_0x1e40cd,'mention':_0x2fac39,'content':_0x476e2f,'replyId':_0x45cbc4},_0x132de1=await this[_0x540afd(0xc4)]['post'](_0x540afd(0x11f)+_0x59d4c3+_0x540afd(0xe3),{'body':_0x5d94a2});return!_0x132de1['body'][_0x540afd(0x108)]||_0x132de1[_0x540afd(0xba)][_0x540afd(0x108)]['code']===0x1;}async['resolveComment'](_0x5d8666){const _0x3e014f=_0x3b7ea6,{unitId:_0x43f062}=_0x5d8666,_0x423ce3=_0x5d8666[_0x3e014f(0x11c)],_0x3f8100={'memberId':this[_0x3e014f(0x113)]['getCurrentUser']()[_0x3e014f(0x107)],'unitId':_0x43f062,'threadId':_0x423ce3,'solved':_0x5d8666[_0x3e014f(0xf8)]?I[_0x3e014f(0xd4)]:I[_0x3e014f(0x105)]},_0x32155c=await this[_0x3e014f(0xc4)][_0x3e014f(0x109)](_0x3e014f(0x11f)+_0x43f062+_0x3e014f(0xdb),{'body':_0x3f8100});return!_0x32155c[_0x3e014f(0xba)][_0x3e014f(0x108)]||_0x32155c[_0x3e014f(0xba)][_0x3e014f(0x108)]['code']===0x1;}async[_0x3b7ea6(0x11a)](_0x1414ea,_0x4845dd,_0x2e9fdb,_0x4d0a4c){const _0x4ae809=_0x3b7ea6,_0x6f1db={'memberId':(await this[_0x4ae809(0xcf)][_0x4ae809(0xe1)](_0x1414ea))[_0x4ae809(0x102)](),'threadId':_0x2e9fdb,'replyId':_0x4d0a4c,'unitId':_0x1414ea},_0x5be884=await this[_0x4ae809(0xc4)][_0x4ae809(0x109)]('/universer-api/comment/unit/'+_0x1414ea+_0x4ae809(0x114),{'body':_0x6f1db});return!_0x5be884[_0x4ae809(0xba)]['error']||_0x5be884[_0x4ae809(0xba)][_0x4ae809(0x108)][_0x4ae809(0xf2)]===0x1;}async[_0x3b7ea6(0xff)](_0x574952,_0x40bf25,_0x364d30){const _0x2a19a5=_0x3b7ea6,_0x3760a1={'unitId':_0x574952,'threadId':_0x364d30},_0x280d86=await this[_0x2a19a5(0xc4)][_0x2a19a5(0x109)]('/universer-api/comment/unit/'+_0x574952+_0x2a19a5(0xfd),{'body':_0x3760a1}),_0x585d06=_0x364d30[_0x2a19a5(0x117)](_0x2e852a=>ee(_0x280d86[_0x2a19a5(0xba)][_0x2a19a5(0xca)][_0x2e852a],_0x574952,_0x40bf25))[_0x2a19a5(0xd3)](Boolean);return Object[_0x2a19a5(0xd0)](_0x280d86['body'][_0x2a19a5(0xec)])[_0x2a19a5(0xea)](_0x6acb74=>{const _0x316bec=_0x2a19a5;this[_0x316bec(0x113)][_0x316bec(0xd9)](_0x6acb74);}),_0x585d06;}[_0x3b7ea6(0x111)](_0xd032ca){const _0x5564a1=_0x3b7ea6;return{'id':_0xd032ca['id'],'threadId':_0xd032ca['threadId'],'ref':_0xd032ca[_0x5564a1(0xd8)]};}};S=Q([b(0x0,_0x28ae67(_0x568a11)),b(0x1,_0x28ae67(_0x5458cd)),b(0x2,_0x28ae67(_0x3a4aed))],S);var re=Object[_0x3b7ea6(0xe9)],te=(_0x15046b,_0x3e2467,_0xca2b8a,_0x374fe8)=>{const _0x20f4ec=_0x3b7ea6;for(var _0x13f899=_0x374fe8>0x1?void 0x0:_0x374fe8?re(_0x3e2467,_0xca2b8a):_0x3e2467,_0x2cad7a=_0x15046b[_0x20f4ec(0xf1)]-0x1,_0x28d9e3;_0x2cad7a>=0x0;_0x2cad7a--)(_0x28d9e3=_0x15046b[_0x2cad7a])&&(_0x13f899=_0x28d9e3(_0x13f899)||_0x13f899);return _0x13f899;},M=(_0x21d738,_0x2a29de)=>(_0x2454bc,_0x324117)=>_0x2a29de(_0x2454bc,_0x324117,_0x21d738);let f=class extends _0x5ac438{constructor(_0x17697d,_0x1ecef1){const _0x4ae032=_0x3b7ea6;super(),this[_0x4ae032(0xfb)]=_0x17697d,this[_0x4ae032(0x10d)]=_0x1ecef1,this[_0x4ae032(0xc9)]();}[_0x3b7ea6(0xc9)](){const _0x54f0f5=_0x3b7ea6;this['_threadCommentDataSourceService']['dataSource']=this[_0x54f0f5(0x10d)],this[_0x54f0f5(0xfb)][_0x54f0f5(0x10f)]=!0x1;}};f=te([M(0x0,_0x482fdc),M(0x1,_0x28ae67(S))],f);var se=Object[_0x3b7ea6(0xc2)],oe=Object[_0x3b7ea6(0xe9)],ne=(_0x112089,_0x405bc4,_0x452caf)=>_0x405bc4 in _0x112089?se(_0x112089,_0x405bc4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x452caf}):_0x112089[_0x405bc4]=_0x452caf,ie=(_0xf9d878,_0x57d109,_0x505f1b,_0x215772)=>{const _0xe616f3=_0x3b7ea6;for(var _0x121ce1=_0x215772>0x1?void 0x0:_0x215772?oe(_0x57d109,_0x505f1b):_0x57d109,_0x5bcf89=_0xf9d878[_0xe616f3(0xf1)]-0x1,_0x20bf0f;_0x5bcf89>=0x0;_0x5bcf89--)(_0x20bf0f=_0xf9d878[_0x5bcf89])&&(_0x121ce1=_0x20bf0f(_0x121ce1)||_0x121ce1);return _0x121ce1;},N=(_0x3a12eb,_0x2c1df4)=>(_0xc25808,_0x32a293)=>_0x2c1df4(_0xc25808,_0x32a293,_0x3a12eb),$=(_0x34edef,_0x32ea1e,_0x278cfc)=>ne(_0x34edef,typeof _0x32ea1e!='symbol'?_0x32ea1e+'':_0x32ea1e,_0x278cfc);let g=class extends _0x59bcbe{constructor(_0x268b0e=O,_0x41015c,_0x58833f){const _0x4bb2a2=_0x3b7ea6;super(),this[_0x4bb2a2(0xc5)]=_0x268b0e,this[_0x4bb2a2(0xee)]=_0x41015c,this[_0x4bb2a2(0x103)]=_0x58833f;const {..._0xdd0711}=_0x4f527c({},O,this[_0x4bb2a2(0xc5)]);this[_0x4bb2a2(0x103)][_0x4bb2a2(0xbd)](z,_0xdd0711);}[_0x3b7ea6(0xe2)](){const _0x5ed5ac=_0x3b7ea6;[[S],[f],[_]][_0x5ed5ac(0xea)](_0x173cc4=>{const _0x302ebb=_0x5ed5ac;this[_0x302ebb(0xee)][_0x302ebb(0x10b)](_0x173cc4);});}[_0x3b7ea6(0xde)](){const _0x50740b=_0x3b7ea6;this[_0x50740b(0xee)][_0x50740b(0xfa)](f),this[_0x50740b(0xee)]['get'](_);}};$(g,_0x3b7ea6(0xd6),W),$(g,'type',_0x3366af['UNIVER_UNKNOWN']),g=ie([_0x31c2de(_0x52729f,_0x5ecb4e,_0x2d5534),N(0x1,_0x28ae67(_0x44647b)),N(0x2,_0x3c3efa)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x427b0c=_0x2010;(function(_0x57dbff,_0x2de5b2){const _0x2736c7=_0x2010,_0x32937e=_0x57dbff();while(!![]){try{const _0x436f77=-parseInt(_0x2736c7(0x12f))/0x1*(parseInt(_0x2736c7(0x101))/0x2)+-parseInt(_0x2736c7(0x118))/0x3+parseInt(_0x2736c7(0x146))/0x4+parseInt(_0x2736c7(0x127))/0x5+-parseInt(_0x2736c7(0x115))/0x6+-parseInt(_0x2736c7(0x110))/0x7+parseInt(_0x2736c7(0x12b))/0x8;if(_0x436f77===_0x2de5b2)break;else _0x32937e['push'](_0x32937e['shift']());}catch(_0x306f43){_0x32937e['push'](_0x32937e['shift']());}}}(_0x377c,0x64619));import{CommentService as _0x406774,CollaborationSessionService as _0x264c29,UniverCollaborationClientPlugin as _0x4f9fad}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5e191e}from'@univerjs-pro/license';import{dayjs as _0x13fc8d,UserManagerService as _0x42c2f7,Inject as _0x51d02a,Injector as _0x440100,Disposable as _0x5a35c7,CustomRangeType as _0x38fd19,UniverInstanceType as _0x5c6fb1,DependentOn as _0x475c39,IConfigService as _0x2959e9,Plugin as _0x834bcd,merge as _0x523a0c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x9a2f36}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x335932,IThreadCommentDataSourceService as _0x2621a6}from'@univerjs/thread-comment';import{bufferTime as _0xe21b99}from'rxjs';import{HTTPService as _0x39ec00}from'@univerjs/network';const W=_0x427b0c(0x108);var I=(_0x2055aa=>(_0x2055aa[_0x2055aa['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x2055aa[_0x2055aa[_0x427b0c(0x141)]=0x1]=_0x427b0c(0x141),_0x2055aa[_0x2055aa[_0x427b0c(0x10c)]=-0x1]='UNRECOGNIZED',_0x2055aa))(I||{}),v=(_0x137c97=>(_0x137c97[_0x137c97['Unknown']=0x0]=_0x427b0c(0x113),_0x137c97[_0x137c97[_0x427b0c(0x12a)]=0x1]=_0x427b0c(0x12a),_0x137c97[_0x137c97['Reply']=0x2]=_0x427b0c(0x11b),_0x137c97[_0x137c97['Edit']=0x3]='Edit',_0x137c97[_0x137c97['Delete']=0x4]=_0x427b0c(0x11f),_0x137c97[_0x137c97[_0x427b0c(0x121)]=0x5]=_0x427b0c(0x121),_0x137c97[_0x137c97['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x137c97))(v||{});const y=_0x5f0fc8=>_0x13fc8d(new Date(+_0x5f0fc8))[_0x427b0c(0x10f)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x117742,_0x51f65e)=>{const _0x2e406f=_0x427b0c,_0x2b1424=_0x117742[_0x2e406f(0x11a)](_0x42c2f7),_0x5c5a4e=_0x117742[_0x2e406f(0x11a)](_0x39ec00);_0x51f65e[_0x2e406f(0x138)](_0x292d66=>{const _0x3f56a2=_0x2e406f;_0x2b1424[_0x3f56a2(0x11c)](_0x292d66)&&_0x51f65e[_0x3f56a2(0x13a)](_0x292d66);}),_0x51f65e[_0x2e406f(0x124)]&&(await _0x5c5a4e['get'](_0x2e406f(0x123),{'params':{'userIDs':[..._0x51f65e]}}))['body']['users'][_0x2e406f(0x138)](_0x365945=>{const _0x1ccd51=_0x2e406f;_0x365945&&_0x2b1424[_0x1ccd51(0x139)](_0x365945);});};var K=Object[_0x427b0c(0xe3)],V=(_0x18cb91,_0x497cbd,_0x5172e7,_0x4f1811)=>{const _0x33c830=_0x427b0c;for(var _0x24d2e6=_0x4f1811>0x1?void 0x0:_0x4f1811?K(_0x497cbd,_0x5172e7):_0x497cbd,_0x35a105=_0x18cb91[_0x33c830(0x13f)]-0x1,_0x5a17c1;_0x35a105>=0x0;_0x35a105--)(_0x5a17c1=_0x18cb91[_0x35a105])&&(_0x24d2e6=_0x5a17c1(_0x24d2e6)||_0x24d2e6);return _0x24d2e6;},p=(_0x175fb0,_0x35d032)=>(_0x3c588c,_0x5140d4)=>_0x35d032(_0x3c588c,_0x5140d4,_0x175fb0);let _=class extends _0x5a35c7{constructor(_0x108c68,_0xaf91c1,_0x30e61c,_0x2775fe){const _0x12bb0c=_0x427b0c;super(),this[_0x12bb0c(0x10d)]=_0x108c68,this[_0x12bb0c(0x102)]=_0xaf91c1,this[_0x12bb0c(0x12e)]=_0x30e61c,this[_0x12bb0c(0xe9)]=_0x2775fe,this[_0x12bb0c(0x130)](),this[_0x12bb0c(0x131)]();}['_initUserSync'](){const _0x5e4cab=_0x427b0c;this[_0x5e4cab(0x145)](this[_0x5e4cab(0x102)]['commentUpdate$']['pipe'](_0xe21b99(0x10))[_0x5e4cab(0xe8)](_0x15a592=>{const _0x550844=_0x5e4cab,_0x4bfbf8=new Set();_0x15a592[_0x550844(0x138)](_0x1fc900=>{const _0x36377f=_0x550844;switch(_0x1fc900[_0x36377f(0x13d)]){case _0x36377f(0xe2):{const _0x40004f=_0x1fc900['payload'][_0x36377f(0xe6)];_0x4bfbf8['add'](_0x40004f);break;}}}),B(this[_0x550844(0xe9)],_0x4bfbf8);}));}['_init'](){const _0x1a1608=_0x427b0c;this[_0x1a1608(0x145)](this[_0x1a1608(0x10d)][_0x1a1608(0x111)][_0x1a1608(0xe8)](async _0xba0dc1=>{const _0x43699d=_0x1a1608;var _0x2b91b9,_0x11f085,_0x5a1f92,_0x33a5c3;const _0x597b9b=(_0x2b91b9=this[_0x43699d(0x102)][_0x43699d(0xef)](_0xba0dc1[_0x43699d(0x10a)])[_0x43699d(0x135)](_0x42e84a=>_0x42e84a[_0x43699d(0xfa)]===_0xba0dc1['threadId']))==null?void 0x0:_0x2b91b9['root'];if(!_0x597b9b)return;const {unitId:_0x5b66cb,subUnitId:_0xa79809}=_0x597b9b;switch(_0xba0dc1[_0x43699d(0xf6)]&&this[_0x43699d(0x12e)][_0x43699d(0x139)](_0xba0dc1[_0x43699d(0xf6)]),_0xba0dc1[_0x43699d(0x13d)]){case v['Add']:break;case v[_0x43699d(0x11b)]:{this[_0x43699d(0x102)][_0x43699d(0xeb)](_0x5b66cb,_0xa79809,{'unitId':_0x5b66cb,'subUnitId':_0xa79809,'ref':'','id':_0xba0dc1[_0x43699d(0xfe)],'dT':y(+_0xba0dc1[_0x43699d(0x11e)]),'threadId':_0xba0dc1[_0x43699d(0xfa)],'personId':(_0x5a1f92=(_0x11f085=_0xba0dc1[_0x43699d(0xf6)])==null?void 0x0:_0x11f085[_0x43699d(0x100)])!=null?_0x5a1f92:_0xba0dc1['userId'],'text':JSON[_0x43699d(0xf7)](_0xba0dc1[_0x43699d(0x137)]),'parentId':_0x597b9b['id']});break;}case v[_0x43699d(0x11f)]:{const _0x5c1884=this[_0x43699d(0x102)]['getComment'](_0x5b66cb,_0xa79809,_0xba0dc1[_0x43699d(0xfe)]);_0x5c1884&&_0x5c1884['parentId']&&this[_0x43699d(0x102)][_0x43699d(0x103)](_0x5b66cb,_0xa79809,_0xba0dc1[_0x43699d(0xfe)]);break;}case v[_0x43699d(0x116)]:{this[_0x43699d(0x102)][_0x43699d(0x106)](_0x5b66cb,_0xa79809,{'commentId':_0xba0dc1[_0x43699d(0xfe)],'text':JSON['parse'](_0xba0dc1['content'])});break;}case v[_0x43699d(0x121)]:{const _0x2c178c=(_0x33a5c3=this[_0x43699d(0x102)]['getUnit'](_0xba0dc1[_0x43699d(0x10a)])[_0x43699d(0x135)](_0x57e23e=>_0x57e23e[_0x43699d(0xfa)]===_0xba0dc1['threadId']))==null?void 0x0:_0x33a5c3[_0x43699d(0xff)];_0x2c178c&&this[_0x43699d(0x102)][_0x43699d(0x11d)](_0x5b66cb,_0xa79809,_0x2c178c['id'],_0xba0dc1[_0x43699d(0x126)]===I[_0x43699d(0x141)]);break;}}}));}};_=V([p(0x0,_0x51d02a(_0x406774)),p(0x1,_0x51d02a(_0x335932)),p(0x2,_0x51d02a(_0x42c2f7)),p(0x3,_0x51d02a(_0x440100))],_);const z=_0x427b0c(0x129),O={};function _0x2010(_0x10d55b,_0x1006c1){_0x10d55b=_0x10d55b-0xe2;const _0x377c65=_0x377c();let _0x201066=_0x377c65[_0x10d55b];return _0x201066;}var k=Object[_0x427b0c(0xe3)],Q=(_0x4acb78,_0x3af339,_0x1465f0,_0x544465)=>{const _0x27a7e3=_0x427b0c;for(var _0x394834=_0x544465>0x1?void 0x0:_0x544465?k(_0x3af339,_0x1465f0):_0x3af339,_0x3320d6=_0x4acb78[_0x27a7e3(0x13f)]-0x1,_0x398335;_0x3320d6>=0x0;_0x3320d6--)(_0x398335=_0x4acb78[_0x3320d6])&&(_0x394834=_0x398335(_0x394834)||_0x394834);return _0x394834;},b=(_0x14c0d8,_0x98e02f)=>(_0xd323c7,_0x23bd47)=>_0x98e02f(_0xd323c7,_0x23bd47,_0x14c0d8);function X(_0x30d4e1,_0x3ddc67){const _0x5c4e94=_0x427b0c,_0x5b82be=_0x30d4e1[_0x5c4e94(0x132)][0x0];return{..._0x3ddc67,'id':_0x5b82be[_0x5c4e94(0xfe)],'resolved':_0x30d4e1[_0x5c4e94(0x126)]===0x1,'dT':y(_0x5b82be[_0x5c4e94(0x11e)]),'personId':_0x5b82be[_0x5c4e94(0xea)],'threadId':_0x5b82be['threadId']};}function _0x377c(){const _0x29caea=['body','unitId','onStarting','UNRECOGNIZED','_commentService','users','format','4723691KfrHJO','commentUpdate$','stringify','Unknown','rangeId','2042082JQQjaV','Edit','_config','1047003xsDrhE','/list','get','Reply','getUser','resolveComment','createTimestamp','Delete','onReady','Solve','syncUpdateMutationToColla','/universer-api/user/list','size','_httpService','solved','11710BRLVuU','_threadCommentDataSourceService','thread-comment-data-source.config','Add','17399304PGPVsW','/solved','COMMENT','_userService','10eVrVCL','_init','_initUserSync','replies','_sessionService','_threadCommentDataSource','find','_initDataSource','content','forEach','addUser','delete','/reply','UNIVER_UNKNOWN','type','/edit','length','values','Solved','saveCommentToSnapshot','setConfig','requireSession','disposeWithMe','132948EvmXrq','slice','add','getOwnPropertyDescriptor','ref','filter','personId','dataSource','subscribe','_injector','userId','addComment','code','customRanges','error','getUnit','/add','symbol','_configService','/universer-api/comment/unit/','OpenOrReOpen','getMemberID','user','parse','reply','resolved','threadId','post','getCurrentUser','map','replyId','root','userID','87034iRoCtl','_threadCommentModel','deleteComment','comment','rangeType','updateComment','pluginName','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'];_0x377c=function(){return _0x29caea;};return _0x377c();}function ee(_0x2f8ffc,_0x5477d3,_0x2acd17){const _0x79548c=_0x427b0c;var _0x4e3de5,_0x5b958e;if(((_0x5b958e=(_0x4e3de5=_0x2f8ffc==null?void 0x0:_0x2f8ffc['replies'])==null?void 0x0:_0x4e3de5[_0x79548c(0x13f)])!=null?_0x5b958e:0x0)>0x0){const _0x202afc=(_0x3c3e3f,_0x2f2657)=>({'id':_0x3c3e3f['replyId'],'threadId':_0x3c3e3f[_0x79548c(0xfa)],'dT':y(_0x3c3e3f[_0x79548c(0x11e)]),'personId':_0x3c3e3f[_0x79548c(0xea)],'resolved':_0x2f8ffc['solved']===I['Solved'],'unitId':_0x5477d3,'subUnitId':_0x2acd17,'text':JSON['parse'](_0x3c3e3f[_0x79548c(0x137)]),'parentId':_0x2f2657}),_0x2e4d9c=_0x202afc(_0x2f8ffc['replies'][0x0]);return{..._0x2e4d9c,'children':_0x2f8ffc[_0x79548c(0x132)][_0x79548c(0x147)](0x1)[_0x79548c(0xfd)](_0x5c3140=>_0x202afc(_0x5c3140,_0x2e4d9c['id']))};}return null;}let S=class{constructor(_0x38dbdc,_0x444e35,_0x4e70aa){const _0x1c0ea3=_0x427b0c;this[_0x1c0ea3(0x125)]=_0x38dbdc,this[_0x1c0ea3(0x12e)]=_0x444e35,this[_0x1c0ea3(0x133)]=_0x4e70aa;}async[_0x427b0c(0xeb)](_0x206698){const _0x2e40a4=_0x427b0c;var _0x508dc9,_0x20a1b8;const {parentId:_0x11b922,unitId:_0x328d09,text:_0x22f7d5,threadId:_0xad0233}=_0x206698,_0xb9714c=(_0x20a1b8=(_0x508dc9=_0x22f7d5['customRanges'])==null?void 0x0:_0x508dc9[_0x2e40a4(0xe5)](_0x47d84c=>_0x47d84c[_0x2e40a4(0x105)]===_0x38fd19[_0x2e40a4(0x12d)])[_0x2e40a4(0xfd)](_0x43d2bf=>_0x43d2bf[_0x2e40a4(0x114)]))!=null?_0x20a1b8:[],_0x3c8cbc=JSON[_0x2e40a4(0x112)](_0x22f7d5),_0x128309=(await this[_0x2e40a4(0x133)][_0x2e40a4(0x144)](_0x328d09))[_0x2e40a4(0xf5)]();if(_0x11b922){const _0x35e7a0={'memberId':_0x128309,'unitId':_0x328d09,'content':_0x3c8cbc,'mention':_0xb9714c,'threadId':_0xad0233},_0x29b5c2=(await this[_0x2e40a4(0x125)][_0x2e40a4(0xfb)]('/universer-api/comment/unit/'+_0x328d09+_0x2e40a4(0x13b),{'body':_0x35e7a0}))['body'][_0x2e40a4(0xf8)];return{..._0x206698,'id':_0x29b5c2[_0x2e40a4(0xfe)],'dT':_0x13fc8d(+_0x29b5c2[_0x2e40a4(0x11e)])[_0x2e40a4(0x10f)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x29b5c2['userId']};}else{const _0x573964={'memberId':_0x128309,'unitId':_0x328d09,'content':_0x3c8cbc,'mention':_0xb9714c},_0x40e359=await this[_0x2e40a4(0x125)][_0x2e40a4(0xfb)]('/universer-api/comment/unit/'+_0x328d09+_0x2e40a4(0xf0),{'body':_0x573964});return X(_0x40e359[_0x2e40a4(0x109)][_0x2e40a4(0x104)],_0x206698);}}async[_0x427b0c(0x106)](_0x3ee8dc){const _0x5e84d0=_0x427b0c;var _0x1638a8,_0x1440b;const {text:_0x26a911,unitId:_0x54dc3b}=_0x3ee8dc,_0x1c5ccb=(_0x1440b=(_0x1638a8=_0x26a911[_0x5e84d0(0xed)])==null?void 0x0:_0x1638a8[_0x5e84d0(0xe5)](_0x3971b8=>_0x3971b8[_0x5e84d0(0x105)]===_0x38fd19[_0x5e84d0(0x12d)])['map'](_0x5b5ca=>_0x5b5ca[_0x5e84d0(0x114)]))!=null?_0x1440b:[],_0x128f84=JSON['stringify'](_0x26a911),_0x51fc9e=_0x3ee8dc[_0x5e84d0(0xfa)],_0x4c3c7d=_0x3ee8dc['id'],_0xe0460f={'memberId':(await this['_sessionService'][_0x5e84d0(0x144)](_0x54dc3b))[_0x5e84d0(0xf5)](),'unitId':_0x54dc3b,'threadId':_0x51fc9e,'mention':_0x1c5ccb,'content':_0x128f84,'replyId':_0x4c3c7d},_0x1b9a85=await this[_0x5e84d0(0x125)][_0x5e84d0(0xfb)](_0x5e84d0(0xf3)+_0x54dc3b+_0x5e84d0(0x13e),{'body':_0xe0460f});return!_0x1b9a85[_0x5e84d0(0x109)][_0x5e84d0(0xee)]||_0x1b9a85[_0x5e84d0(0x109)][_0x5e84d0(0xee)]['code']===0x1;}async[_0x427b0c(0x11d)](_0x4fd442){const _0x42f27b=_0x427b0c,{unitId:_0x26f2f3}=_0x4fd442,_0x2a72f9=_0x4fd442[_0x42f27b(0xfa)],_0x961c14={'memberId':this[_0x42f27b(0x12e)][_0x42f27b(0xfc)]()[_0x42f27b(0x100)],'unitId':_0x26f2f3,'threadId':_0x2a72f9,'solved':_0x4fd442[_0x42f27b(0xf9)]?I[_0x42f27b(0x141)]:I[_0x42f27b(0xf4)]},_0x5f05c3=await this['_httpService'][_0x42f27b(0xfb)](_0x42f27b(0xf3)+_0x26f2f3+_0x42f27b(0x12c),{'body':_0x961c14});return!_0x5f05c3[_0x42f27b(0x109)][_0x42f27b(0xee)]||_0x5f05c3['body'][_0x42f27b(0xee)]['code']===0x1;}async[_0x427b0c(0x103)](_0x149f25,_0x4c1764,_0x2d3785,_0x1fcb69){const _0x5e63ee=_0x427b0c,_0xd18266={'memberId':(await this[_0x5e63ee(0x133)][_0x5e63ee(0x144)](_0x149f25))[_0x5e63ee(0xf5)](),'threadId':_0x2d3785,'replyId':_0x1fcb69,'unitId':_0x149f25},_0x5e7f8a=await this[_0x5e63ee(0x125)]['post'](_0x5e63ee(0xf3)+_0x149f25+'/delete',{'body':_0xd18266});return!_0x5e7f8a['body'][_0x5e63ee(0xee)]||_0x5e7f8a['body'][_0x5e63ee(0xee)][_0x5e63ee(0xec)]===0x1;}async['listComments'](_0x15f8d9,_0x3f392a,_0x4d90bf){const _0x229810=_0x427b0c,_0x588957={'unitId':_0x15f8d9,'threadId':_0x4d90bf},_0x3d822c=await this[_0x229810(0x125)]['post'](_0x229810(0xf3)+_0x15f8d9+_0x229810(0x119),{'body':_0x588957}),_0x38873f=_0x4d90bf[_0x229810(0xfd)](_0x555d5a=>ee(_0x3d822c[_0x229810(0x109)]['comments'][_0x555d5a],_0x15f8d9,_0x3f392a))[_0x229810(0xe5)](Boolean);return Object[_0x229810(0x140)](_0x3d822c[_0x229810(0x109)][_0x229810(0x10e)])['forEach'](_0x29f32b=>{const _0x301e58=_0x229810;this[_0x301e58(0x12e)]['addUser'](_0x29f32b);}),_0x38873f;}[_0x427b0c(0x142)](_0x521fe3){const _0x3dceac=_0x427b0c;return{'id':_0x521fe3['id'],'threadId':_0x521fe3[_0x3dceac(0xfa)],'ref':_0x521fe3[_0x3dceac(0xe4)]};}};S=Q([b(0x0,_0x51d02a(_0x39ec00)),b(0x1,_0x51d02a(_0x42c2f7)),b(0x2,_0x51d02a(_0x264c29))],S);var re=Object[_0x427b0c(0xe3)],te=(_0x3cf17f,_0x45659a,_0x177ff7,_0x77219c)=>{for(var _0x43e22d=_0x77219c>0x1?void 0x0:_0x77219c?re(_0x45659a,_0x177ff7):_0x45659a,_0x2790ad=_0x3cf17f['length']-0x1,_0x36fb3f;_0x2790ad>=0x0;_0x2790ad--)(_0x36fb3f=_0x3cf17f[_0x2790ad])&&(_0x43e22d=_0x36fb3f(_0x43e22d)||_0x43e22d);return _0x43e22d;},M=(_0x10ddbb,_0x26a2ed)=>(_0x3224c4,_0x34821d)=>_0x26a2ed(_0x3224c4,_0x34821d,_0x10ddbb);let f=class extends _0x5a35c7{constructor(_0x120284,_0x4e1185){const _0x127e87=_0x427b0c;super(),this[_0x127e87(0x128)]=_0x120284,this[_0x127e87(0x134)]=_0x4e1185,this[_0x127e87(0x136)]();}[_0x427b0c(0x136)](){const _0x4e53ff=_0x427b0c;this['_threadCommentDataSourceService'][_0x4e53ff(0xe7)]=this[_0x4e53ff(0x134)],this[_0x4e53ff(0x128)][_0x4e53ff(0x122)]=!0x1;}};f=te([M(0x0,_0x2621a6),M(0x1,_0x51d02a(S))],f);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x2e3b18,_0x3e1d4b,_0xf82d82)=>_0x3e1d4b in _0x2e3b18?se(_0x2e3b18,_0x3e1d4b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf82d82}):_0x2e3b18[_0x3e1d4b]=_0xf82d82,ie=(_0xa75447,_0x3c4f30,_0x4383ac,_0x1cbeba)=>{const _0x190e10=_0x427b0c;for(var _0x5ec70f=_0x1cbeba>0x1?void 0x0:_0x1cbeba?oe(_0x3c4f30,_0x4383ac):_0x3c4f30,_0x1050fb=_0xa75447[_0x190e10(0x13f)]-0x1,_0x24f5c7;_0x1050fb>=0x0;_0x1050fb--)(_0x24f5c7=_0xa75447[_0x1050fb])&&(_0x5ec70f=_0x24f5c7(_0x5ec70f)||_0x5ec70f);return _0x5ec70f;},N=(_0x3ffbc3,_0x54bb51)=>(_0x56a5b8,_0x5c234f)=>_0x54bb51(_0x56a5b8,_0x5c234f,_0x3ffbc3),$=(_0x13d40f,_0x3e79b0,_0x45cdff)=>ne(_0x13d40f,typeof _0x3e79b0!=_0x427b0c(0xf1)?_0x3e79b0+'':_0x3e79b0,_0x45cdff);let g=class extends _0x834bcd{constructor(_0x2f76d2=O,_0x40b013,_0x3b0b8e){const _0x2328b2=_0x427b0c;super(),this[_0x2328b2(0x117)]=_0x2f76d2,this[_0x2328b2(0xe9)]=_0x40b013,this[_0x2328b2(0xf2)]=_0x3b0b8e;const {..._0x5a5d0c}=_0x523a0c({},O,this['_config']);this[_0x2328b2(0xf2)][_0x2328b2(0x143)](z,_0x5a5d0c);}[_0x427b0c(0x10b)](){const _0x40431b=_0x427b0c;[[S],[f],[_]][_0x40431b(0x138)](_0x104ee1=>{const _0xfb3871=_0x40431b;this[_0xfb3871(0xe9)][_0xfb3871(0xe2)](_0x104ee1);});}[_0x427b0c(0x120)](){const _0x4f823c=_0x427b0c;this['_injector'][_0x4f823c(0x11a)](f),this[_0x4f823c(0xe9)][_0x4f823c(0x11a)](_);}};$(g,_0x427b0c(0x107),W),$(g,_0x427b0c(0x13d),_0x5c6fb1[_0x427b0c(0x13c)]),g=ie([_0x475c39(_0x9a2f36,_0x4f9fad,_0x5e191e),N(0x1,_0x51d02a(_0x440100)),N(0x2,_0x2959e9)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x257b(_0x2edf39,_0x31084c){const _0x3ff652=_0x3ff6();return _0x257b=function(_0x257b18,_0x10e1f4){_0x257b18=_0x257b18-0x1c7;let _0x4fe5c9=_0x3ff652[_0x257b18];return _0x4fe5c9;},_0x257b(_0x2edf39,_0x31084c);}function _0x3ff6(){const _0x5e816a=['delete','_init','onReady','10wLvSJy','getUnit','exports','resolveComment','/delete','IThreadCommentDataSourceService','Injector','addComment','object','_config','173868fyoVSl','UNRECOGNIZED','customRanges','/universer-api/user/list','setConfig','/universer-api/comment/unit/','user','Reply','getMemberID','UniverProCollaborationClient','CustomRangeType','UniverThreadComment','reply','ref','unitId','threadId','getOwnPropertyDescriptor','map','rxjs','/edit','rangeId','UniverThreadCommentDataSourcePlugin','UniverCollaborationClientPlugin','YYYY/MM/DD\x20HH:mm','_threadCommentDataSource','addUser','CollaborationSessionService','_initDataSource','216787pnsVSD','IConfigService','solved','UniverThreadCommentUi','@univerjs/thread-comment-ui','personId','body','_threadCommentModel','Add','/list','150MgzQiG','Delete','CommentService','/solved','_sessionService','format','pluginName','forEach','createTimestamp','7471360vDBnWK','HTTPService','deleteComment','@univerjs/network','OpenOrReOpen','Module','Unknown','parentId','_commentService','defineProperty','2630466PBVnzZ','filter','UniverLicensePlugin','resolved','thread-comment-data-source.config','type','comments','dayjs','code','listComments','add','slice','bufferTime','function','COMMENT','/add','UniverThreadCommentUIPlugin','_threadCommentDataSourceService','10787562rtvPWF','merge','_configService','Inject','dataSource','userID','pipe','post','root','@univerjs-pro/license','error','@univerjs/core','subscribe','syncUpdateMutationToColla','UniverProLicense','commentUpdate$','parse','userId','_httpService','Disposable','Edit','1465270qKziDz','get','users','stringify','values','UserManagerService','payload','find','amd','symbol','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','DependentOn','requireSession','size','Plugin','UniverInstanceType','updateComment','Solve','65ZeVMOj','getUser','replyId','length','_initUserSync','@univerjs-pro/collaboration-client','Solved','replies','230503kSVOCG','comment','_userService','_injector','rangeType','disposeWithMe'];_0x3ff6=function(){return _0x5e816a;};return _0x3ff6();}(function(_0x4c20ba,_0x24cf92){const _0x1334c7=_0x257b,_0x5e2b50=_0x4c20ba();while(!![]){try{const _0x31660c=parseInt(_0x1334c7(0x1e8))/0x1+parseInt(_0x1334c7(0x22c))/0x2+-parseInt(_0x1334c7(0x205))/0x3+-parseInt(_0x1334c7(0x1cc))/0x4*(parseInt(_0x1334c7(0x23f))/0x5)+parseInt(_0x1334c7(0x1f2))/0x6*(parseInt(_0x1334c7(0x247))/0x7)+-parseInt(_0x1334c7(0x1fb))/0x8+-parseInt(_0x1334c7(0x217))/0x9*(-parseInt(_0x1334c7(0x250))/0xa);if(_0x31660c===_0x24cf92)break;else _0x5e2b50['push'](_0x5e2b50['shift']());}catch(_0x1448c3){_0x5e2b50['push'](_0x5e2b50['shift']());}}}(_0x3ff6,0x915fc),function(_0x2138b7,_0x22b525){const _0xe1e551=_0x257b;typeof exports==_0xe1e551(0x1ca)&&typeof module<'u'?_0x22b525(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0xe1e551(0x212)&&define[_0xe1e551(0x234)]?define([_0xe1e551(0x252),_0xe1e551(0x244),_0xe1e551(0x220),_0xe1e551(0x222),_0xe1e551(0x1ec),'@univerjs/thread-comment','rxjs',_0xe1e551(0x1fe)],_0x22b525):(_0x2138b7=typeof globalThis<'u'?globalThis:_0x2138b7||self,_0x22b525(_0x2138b7['UniverProThreadCommentDatasource']={},_0x2138b7[_0xe1e551(0x1d5)],_0x2138b7[_0xe1e551(0x225)],_0x2138b7['UniverCore'],_0x2138b7[_0xe1e551(0x1eb)],_0x2138b7[_0xe1e551(0x1d7)],_0x2138b7[_0xe1e551(0x1de)],_0x2138b7['UniverNetwork']));}(this,function(_0x389f2b,_0x268431,_0x198b16,_0xa92e6,_0x203d16,_0x2437b5,_0x2d260e,_0x1524a4){'use strict';const _0x593213=_0x257b;const _0x3cc975=_0x593213(0x237);var _0x4656cb=(_0x440c2d=>(_0x440c2d[_0x440c2d[_0x593213(0x1ff)]=0x0]='OpenOrReOpen',_0x440c2d[_0x440c2d[_0x593213(0x245)]=0x1]=_0x593213(0x245),_0x440c2d[_0x440c2d['UNRECOGNIZED']=-0x1]=_0x593213(0x1cd),_0x440c2d))(_0x4656cb||{}),_0x11237e=(_0x5adf41=>(_0x5adf41[_0x5adf41[_0x593213(0x201)]=0x0]='Unknown',_0x5adf41[_0x5adf41[_0x593213(0x1f0)]=0x1]=_0x593213(0x1f0),_0x5adf41[_0x5adf41[_0x593213(0x1d3)]=0x2]='Reply',_0x5adf41[_0x5adf41[_0x593213(0x22b)]=0x3]='Edit',_0x5adf41[_0x5adf41[_0x593213(0x1f3)]=0x4]=_0x593213(0x1f3),_0x5adf41[_0x5adf41[_0x593213(0x23e)]=0x5]=_0x593213(0x23e),_0x5adf41[_0x5adf41[_0x593213(0x1cd)]=-0x1]=_0x593213(0x1cd),_0x5adf41))(_0x11237e||{});const _0x3993c6=_0x36e3e0=>_0xa92e6['dayjs'](new Date(+_0x36e3e0))[_0x593213(0x1f7)](_0x593213(0x1e3)),_0x48e0e6=async(_0x16125f,_0x3e13a4)=>{const _0x531044=_0x593213,_0x24c7fa=_0x16125f[_0x531044(0x22d)](_0xa92e6[_0x531044(0x231)]),_0x33fb2c=_0x16125f[_0x531044(0x22d)](_0x1524a4[_0x531044(0x1fc)]);_0x3e13a4['forEach'](_0x3e9da1=>{const _0x157dae=_0x531044;_0x24c7fa[_0x157dae(0x240)](_0x3e9da1)&&_0x3e13a4[_0x157dae(0x24d)](_0x3e9da1);}),_0x3e13a4[_0x531044(0x23a)]&&(await _0x33fb2c[_0x531044(0x22d)](_0x531044(0x1cf),{'params':{'userIDs':[..._0x3e13a4]}}))['body'][_0x531044(0x22e)][_0x531044(0x1f9)](_0x27090b=>{_0x27090b&&_0x24c7fa['addUser'](_0x27090b);});};var _0x21964f=Object[_0x593213(0x1dc)],_0x4c8e28=(_0xaedd71,_0x5a111f,_0x542856,_0x2d8dfc)=>{const _0x2dc28d=_0x593213;for(var _0x47d22f=_0x2d8dfc>0x1?void 0x0:_0x2d8dfc?_0x21964f(_0x5a111f,_0x542856):_0x5a111f,_0x14fb77=_0xaedd71[_0x2dc28d(0x242)]-0x1,_0x3381f4;_0x14fb77>=0x0;_0x14fb77--)(_0x3381f4=_0xaedd71[_0x14fb77])&&(_0x47d22f=_0x3381f4(_0x47d22f)||_0x47d22f);return _0x47d22f;},_0x9d97ee=(_0x193981,_0x496e4b)=>(_0xff3690,_0xdf6322)=>_0x496e4b(_0xff3690,_0xdf6322,_0x193981);let _0x862e64=class extends _0xa92e6[_0x593213(0x22a)]{constructor(_0x5b045d,_0x19ff15,_0xc63f01,_0x48542e){const _0x58d619=_0x593213;super(),this['_commentService']=_0x5b045d,this[_0x58d619(0x1ef)]=_0x19ff15,this[_0x58d619(0x249)]=_0xc63f01,this[_0x58d619(0x24a)]=_0x48542e,this['_init'](),this['_initUserSync']();}[_0x593213(0x243)](){const _0x2e2be2=_0x593213;this['disposeWithMe'](this[_0x2e2be2(0x1ef)][_0x2e2be2(0x226)][_0x2e2be2(0x21d)](_0x2d260e[_0x2e2be2(0x211)](0x10))[_0x2e2be2(0x223)](_0x52160b=>{const _0x3df8ed=_0x2e2be2,_0x1fb321=new Set();_0x52160b[_0x3df8ed(0x1f9)](_0x16efb7=>{const _0x5c02c2=_0x3df8ed;switch(_0x16efb7[_0x5c02c2(0x20a)]){case'add':{const _0x44c595=_0x16efb7[_0x5c02c2(0x232)][_0x5c02c2(0x1ed)];_0x1fb321['add'](_0x44c595);break;}}}),_0x48e0e6(this[_0x3df8ed(0x24a)],_0x1fb321);}));}[_0x593213(0x24e)](){const _0xa31507=_0x593213;this[_0xa31507(0x24c)](this[_0xa31507(0x203)][_0xa31507(0x226)][_0xa31507(0x223)](async _0x56a656=>{const _0x363870=_0xa31507;var _0x1b18a6,_0x6665f7,_0x4da948,_0x405840;const _0x585a6a=(_0x1b18a6=this[_0x363870(0x1ef)][_0x363870(0x251)](_0x56a656['unitId'])[_0x363870(0x233)](_0x26931e=>_0x26931e['threadId']===_0x56a656[_0x363870(0x1db)]))==null?void 0x0:_0x1b18a6['root'];if(!_0x585a6a)return;const {unitId:_0x36db4d,subUnitId:_0x14699d}=_0x585a6a;switch(_0x56a656[_0x363870(0x1d2)]&&this[_0x363870(0x249)][_0x363870(0x1e5)](_0x56a656['user']),_0x56a656[_0x363870(0x20a)]){case _0x11237e[_0x363870(0x1f0)]:break;case _0x11237e['Reply']:{this[_0x363870(0x1ef)]['addComment'](_0x36db4d,_0x14699d,{'unitId':_0x36db4d,'subUnitId':_0x14699d,'ref':'','id':_0x56a656[_0x363870(0x241)],'dT':_0x3993c6(+_0x56a656[_0x363870(0x1fa)]),'threadId':_0x56a656[_0x363870(0x1db)],'personId':(_0x4da948=(_0x6665f7=_0x56a656[_0x363870(0x1d2)])==null?void 0x0:_0x6665f7[_0x363870(0x21c)])!=null?_0x4da948:_0x56a656[_0x363870(0x228)],'text':JSON[_0x363870(0x227)](_0x56a656[_0x363870(0x236)]),'parentId':_0x585a6a['id']});break;}case _0x11237e[_0x363870(0x1f3)]:{const _0x222c4=this[_0x363870(0x1ef)]['getComment'](_0x36db4d,_0x14699d,_0x56a656['replyId']);_0x222c4&&_0x222c4[_0x363870(0x202)]&&this[_0x363870(0x1ef)][_0x363870(0x1fd)](_0x36db4d,_0x14699d,_0x56a656['replyId']);break;}case _0x11237e[_0x363870(0x22b)]:{this[_0x363870(0x1ef)]['updateComment'](_0x36db4d,_0x14699d,{'commentId':_0x56a656[_0x363870(0x241)],'text':JSON[_0x363870(0x227)](_0x56a656[_0x363870(0x236)])});break;}case _0x11237e[_0x363870(0x23e)]:{const _0x4bc996=(_0x405840=this[_0x363870(0x1ef)][_0x363870(0x251)](_0x56a656[_0x363870(0x1da)])[_0x363870(0x233)](_0x4fd80b=>_0x4fd80b[_0x363870(0x1db)]===_0x56a656[_0x363870(0x1db)]))==null?void 0x0:_0x405840[_0x363870(0x21f)];_0x4bc996&&this[_0x363870(0x1ef)][_0x363870(0x253)](_0x36db4d,_0x14699d,_0x4bc996['id'],_0x56a656[_0x363870(0x1ea)]===_0x4656cb[_0x363870(0x245)]);break;}}}));}};_0x862e64=_0x4c8e28([_0x9d97ee(0x0,_0xa92e6[_0x593213(0x21a)](_0x268431[_0x593213(0x1f4)])),_0x9d97ee(0x1,_0xa92e6[_0x593213(0x21a)](_0x2437b5['ThreadCommentModel'])),_0x9d97ee(0x2,_0xa92e6[_0x593213(0x21a)](_0xa92e6[_0x593213(0x231)])),_0x9d97ee(0x3,_0xa92e6[_0x593213(0x21a)](_0xa92e6['Injector']))],_0x862e64);const _0x1ad1d7=_0x593213(0x209),_0x440bb2={};var _0x5547ec=Object['getOwnPropertyDescriptor'],_0x59c3c0=(_0xa556be,_0x321ca2,_0x5261f3,_0x3367f9)=>{const _0x1b03ca=_0x593213;for(var _0x452ac4=_0x3367f9>0x1?void 0x0:_0x3367f9?_0x5547ec(_0x321ca2,_0x5261f3):_0x321ca2,_0x13db4c=_0xa556be[_0x1b03ca(0x242)]-0x1,_0x5f3500;_0x13db4c>=0x0;_0x13db4c--)(_0x5f3500=_0xa556be[_0x13db4c])&&(_0x452ac4=_0x5f3500(_0x452ac4)||_0x452ac4);return _0x452ac4;},_0x456707=(_0x514e41,_0x179e7c)=>(_0x3bfc3d,_0x51e36c)=>_0x179e7c(_0x3bfc3d,_0x51e36c,_0x514e41);function _0x595c81(_0x3e1be3,_0x2c7b7f){const _0x3a8e28=_0x593213,_0x5e5353=_0x3e1be3[_0x3a8e28(0x246)][0x0];return{..._0x2c7b7f,'id':_0x5e5353[_0x3a8e28(0x241)],'resolved':_0x3e1be3[_0x3a8e28(0x1ea)]===0x1,'dT':_0x3993c6(_0x5e5353[_0x3a8e28(0x1fa)]),'personId':_0x5e5353['userId'],'threadId':_0x5e5353[_0x3a8e28(0x1db)]};}function _0x4278a4(_0x57fc8a,_0x223a49,_0x47afef){const _0x32b4ab=_0x593213;var _0x36012f,_0x63dc8f;if(((_0x63dc8f=(_0x36012f=_0x57fc8a==null?void 0x0:_0x57fc8a['replies'])==null?void 0x0:_0x36012f['length'])!=null?_0x63dc8f:0x0)>0x0){const _0x2a978a=(_0x4130eb,_0x619b78)=>({'id':_0x4130eb[_0x32b4ab(0x241)],'threadId':_0x4130eb[_0x32b4ab(0x1db)],'dT':_0x3993c6(_0x4130eb[_0x32b4ab(0x1fa)]),'personId':_0x4130eb[_0x32b4ab(0x228)],'resolved':_0x57fc8a[_0x32b4ab(0x1ea)]===_0x4656cb[_0x32b4ab(0x245)],'unitId':_0x223a49,'subUnitId':_0x47afef,'text':JSON[_0x32b4ab(0x227)](_0x4130eb['content']),'parentId':_0x619b78}),_0x4c034d=_0x2a978a(_0x57fc8a[_0x32b4ab(0x246)][0x0]);return{..._0x4c034d,'children':_0x57fc8a[_0x32b4ab(0x246)][_0x32b4ab(0x210)](0x1)[_0x32b4ab(0x1dd)](_0x2fb18c=>_0x2a978a(_0x2fb18c,_0x4c034d['id']))};}return null;}let _0xf6b40f=class{constructor(_0x50ac40,_0x435a35,_0x1fff76){const _0x43ccac=_0x593213;this['_httpService']=_0x50ac40,this[_0x43ccac(0x249)]=_0x435a35,this[_0x43ccac(0x1f6)]=_0x1fff76;}async[_0x593213(0x1c9)](_0x1ea2f5){const _0x2a63c4=_0x593213;var _0x92c0bd,_0x1e5354;const {parentId:_0x55e23f,unitId:_0x416c36,text:_0x3c6355,threadId:_0x5dbd10}=_0x1ea2f5,_0x29f371=(_0x1e5354=(_0x92c0bd=_0x3c6355[_0x2a63c4(0x1ce)])==null?void 0x0:_0x92c0bd[_0x2a63c4(0x206)](_0x1cff8e=>_0x1cff8e['rangeType']===_0xa92e6[_0x2a63c4(0x1d6)][_0x2a63c4(0x213)])[_0x2a63c4(0x1dd)](_0x3af89d=>_0x3af89d[_0x2a63c4(0x1e0)]))!=null?_0x1e5354:[],_0xc9fa09=JSON['stringify'](_0x3c6355),_0x5d7d42=(await this['_sessionService'][_0x2a63c4(0x239)](_0x416c36))[_0x2a63c4(0x1d4)]();if(_0x55e23f){const _0x38de80={'memberId':_0x5d7d42,'unitId':_0x416c36,'content':_0xc9fa09,'mention':_0x29f371,'threadId':_0x5dbd10},_0x5ac00c=(await this[_0x2a63c4(0x229)][_0x2a63c4(0x21e)](_0x2a63c4(0x1d1)+_0x416c36+'/reply',{'body':_0x38de80}))[_0x2a63c4(0x1ee)][_0x2a63c4(0x1d8)];return{..._0x1ea2f5,'id':_0x5ac00c[_0x2a63c4(0x241)],'dT':_0xa92e6[_0x2a63c4(0x20c)](+_0x5ac00c[_0x2a63c4(0x1fa)])[_0x2a63c4(0x1f7)](_0x2a63c4(0x1e3)),'personId':_0x5ac00c[_0x2a63c4(0x228)]};}else{const _0x1243a8={'memberId':_0x5d7d42,'unitId':_0x416c36,'content':_0xc9fa09,'mention':_0x29f371},_0x3135db=await this[_0x2a63c4(0x229)][_0x2a63c4(0x21e)](_0x2a63c4(0x1d1)+_0x416c36+_0x2a63c4(0x214),{'body':_0x1243a8});return _0x595c81(_0x3135db[_0x2a63c4(0x1ee)][_0x2a63c4(0x248)],_0x1ea2f5);}}async[_0x593213(0x23d)](_0x1bcec6){const _0x3e9cf9=_0x593213;var _0x214a24,_0x5066d8;const {text:_0x5322e1,unitId:_0x3cb955}=_0x1bcec6,_0x31e9f1=(_0x5066d8=(_0x214a24=_0x5322e1['customRanges'])==null?void 0x0:_0x214a24[_0x3e9cf9(0x206)](_0x48c1ed=>_0x48c1ed[_0x3e9cf9(0x24b)]===_0xa92e6[_0x3e9cf9(0x1d6)][_0x3e9cf9(0x213)])[_0x3e9cf9(0x1dd)](_0x4fe6fa=>_0x4fe6fa['rangeId']))!=null?_0x5066d8:[],_0x4c4e27=JSON[_0x3e9cf9(0x22f)](_0x5322e1),_0xf9f2c4=_0x1bcec6[_0x3e9cf9(0x1db)],_0x55e83c=_0x1bcec6['id'],_0x1a1916={'memberId':(await this[_0x3e9cf9(0x1f6)][_0x3e9cf9(0x239)](_0x3cb955))['getMemberID'](),'unitId':_0x3cb955,'threadId':_0xf9f2c4,'mention':_0x31e9f1,'content':_0x4c4e27,'replyId':_0x55e83c},_0x41423d=await this[_0x3e9cf9(0x229)][_0x3e9cf9(0x21e)](_0x3e9cf9(0x1d1)+_0x3cb955+_0x3e9cf9(0x1df),{'body':_0x1a1916});return!_0x41423d[_0x3e9cf9(0x1ee)][_0x3e9cf9(0x221)]||_0x41423d[_0x3e9cf9(0x1ee)][_0x3e9cf9(0x221)][_0x3e9cf9(0x20d)]===0x1;}async[_0x593213(0x253)](_0x347245){const _0x3897f0=_0x593213,{unitId:_0x2e6b3d}=_0x347245,_0x4251ef=_0x347245[_0x3897f0(0x1db)],_0x3b0e00={'memberId':this[_0x3897f0(0x249)]['getCurrentUser']()[_0x3897f0(0x21c)],'unitId':_0x2e6b3d,'threadId':_0x4251ef,'solved':_0x347245[_0x3897f0(0x208)]?_0x4656cb['Solved']:_0x4656cb[_0x3897f0(0x1ff)]},_0x300dcd=await this['_httpService'][_0x3897f0(0x21e)](_0x3897f0(0x1d1)+_0x2e6b3d+_0x3897f0(0x1f5),{'body':_0x3b0e00});return!_0x300dcd[_0x3897f0(0x1ee)][_0x3897f0(0x221)]||_0x300dcd[_0x3897f0(0x1ee)][_0x3897f0(0x221)][_0x3897f0(0x20d)]===0x1;}async[_0x593213(0x1fd)](_0x3f137b,_0x29e5e4,_0x51b05c,_0x3096dc){const _0x3ad491=_0x593213,_0x4b255c={'memberId':(await this[_0x3ad491(0x1f6)][_0x3ad491(0x239)](_0x3f137b))['getMemberID'](),'threadId':_0x51b05c,'replyId':_0x3096dc,'unitId':_0x3f137b},_0x1d7cd4=await this[_0x3ad491(0x229)][_0x3ad491(0x21e)](_0x3ad491(0x1d1)+_0x3f137b+_0x3ad491(0x254),{'body':_0x4b255c});return!_0x1d7cd4[_0x3ad491(0x1ee)][_0x3ad491(0x221)]||_0x1d7cd4['body'][_0x3ad491(0x221)][_0x3ad491(0x20d)]===0x1;}async[_0x593213(0x20e)](_0x64c3b3,_0x299b77,_0xfc454b){const _0xc82b67=_0x593213,_0x12b6dc={'unitId':_0x64c3b3,'threadId':_0xfc454b},_0x1ead42=await this[_0xc82b67(0x229)]['post']('/universer-api/comment/unit/'+_0x64c3b3+_0xc82b67(0x1f1),{'body':_0x12b6dc}),_0x50f23a=_0xfc454b[_0xc82b67(0x1dd)](_0x5b706e=>_0x4278a4(_0x1ead42['body'][_0xc82b67(0x20b)][_0x5b706e],_0x64c3b3,_0x299b77))[_0xc82b67(0x206)](Boolean);return Object[_0xc82b67(0x230)](_0x1ead42[_0xc82b67(0x1ee)][_0xc82b67(0x22e)])[_0xc82b67(0x1f9)](_0x56b0d6=>{const _0x463e72=_0xc82b67;this[_0x463e72(0x249)][_0x463e72(0x1e5)](_0x56b0d6);}),_0x50f23a;}['saveCommentToSnapshot'](_0x1733fd){const _0x1ea7eb=_0x593213;return{'id':_0x1733fd['id'],'threadId':_0x1733fd['threadId'],'ref':_0x1733fd[_0x1ea7eb(0x1d9)]};}};_0xf6b40f=_0x59c3c0([_0x456707(0x0,_0xa92e6[_0x593213(0x21a)](_0x1524a4[_0x593213(0x1fc)])),_0x456707(0x1,_0xa92e6[_0x593213(0x21a)](_0xa92e6[_0x593213(0x231)])),_0x456707(0x2,_0xa92e6[_0x593213(0x21a)](_0x268431[_0x593213(0x1e6)]))],_0xf6b40f);var _0x5992e2=Object[_0x593213(0x1dc)],_0x134d50=(_0x429f9c,_0x31fc94,_0x5af2c8,_0x443d68)=>{const _0x5b9b1b=_0x593213;for(var _0x1f797c=_0x443d68>0x1?void 0x0:_0x443d68?_0x5992e2(_0x31fc94,_0x5af2c8):_0x31fc94,_0x54ffd8=_0x429f9c[_0x5b9b1b(0x242)]-0x1,_0x4d3b0d;_0x54ffd8>=0x0;_0x54ffd8--)(_0x4d3b0d=_0x429f9c[_0x54ffd8])&&(_0x1f797c=_0x4d3b0d(_0x1f797c)||_0x1f797c);return _0x1f797c;},_0x3d9f78=(_0x22605c,_0x57c8f7)=>(_0x93928e,_0x579fa6)=>_0x57c8f7(_0x93928e,_0x579fa6,_0x22605c);let _0x5a2af2=class extends _0xa92e6[_0x593213(0x22a)]{constructor(_0x5d557f,_0x115a10){const _0x62b6cb=_0x593213;super(),this[_0x62b6cb(0x216)]=_0x5d557f,this[_0x62b6cb(0x1e4)]=_0x115a10,this[_0x62b6cb(0x1e7)]();}['_initDataSource'](){const _0x28ae58=_0x593213;this[_0x28ae58(0x216)][_0x28ae58(0x21b)]=this[_0x28ae58(0x1e4)],this['_threadCommentDataSourceService'][_0x28ae58(0x224)]=!0x1;}};_0x5a2af2=_0x134d50([_0x3d9f78(0x0,_0x2437b5[_0x593213(0x1c7)]),_0x3d9f78(0x1,_0xa92e6[_0x593213(0x21a)](_0xf6b40f))],_0x5a2af2);var _0x22255f=Object[_0x593213(0x204)],_0xd6f677=Object[_0x593213(0x1dc)],_0x4373c9=(_0x1d2281,_0x4dc788,_0x1d7ec1)=>_0x4dc788 in _0x1d2281?_0x22255f(_0x1d2281,_0x4dc788,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1d7ec1}):_0x1d2281[_0x4dc788]=_0x1d7ec1,_0x43b263=(_0x47e61d,_0x111354,_0x28579e,_0x467b8f)=>{const _0x15fc5d=_0x593213;for(var _0x20a4e9=_0x467b8f>0x1?void 0x0:_0x467b8f?_0xd6f677(_0x111354,_0x28579e):_0x111354,_0x3d3c2=_0x47e61d[_0x15fc5d(0x242)]-0x1,_0x28d6f8;_0x3d3c2>=0x0;_0x3d3c2--)(_0x28d6f8=_0x47e61d[_0x3d3c2])&&(_0x20a4e9=_0x28d6f8(_0x20a4e9)||_0x20a4e9);return _0x20a4e9;},_0x3d2c34=(_0x5f3c13,_0x214544)=>(_0x4e4bfb,_0x34e4a4)=>_0x214544(_0x4e4bfb,_0x34e4a4,_0x5f3c13),_0x4a64e6=(_0x1c52c1,_0x2d9e6f,_0x4031d4)=>_0x4373c9(_0x1c52c1,typeof _0x2d9e6f!=_0x593213(0x235)?_0x2d9e6f+'':_0x2d9e6f,_0x4031d4);_0x389f2b[_0x593213(0x1e1)]=class extends _0xa92e6[_0x593213(0x23b)]{constructor(_0x31cb9a=_0x440bb2,_0x297b52,_0x436ed2){const _0x41401c=_0x593213;super(),this[_0x41401c(0x1cb)]=_0x31cb9a,this[_0x41401c(0x24a)]=_0x297b52,this[_0x41401c(0x219)]=_0x436ed2;const {..._0x46adeb}=_0xa92e6[_0x41401c(0x218)]({},_0x440bb2,this[_0x41401c(0x1cb)]);this[_0x41401c(0x219)][_0x41401c(0x1d0)](_0x1ad1d7,_0x46adeb);}['onStarting'](){const _0x628fa0=_0x593213;[[_0xf6b40f],[_0x5a2af2],[_0x862e64]][_0x628fa0(0x1f9)](_0x15a2f4=>{const _0xa199be=_0x628fa0;this[_0xa199be(0x24a)][_0xa199be(0x20f)](_0x15a2f4);});}[_0x593213(0x24f)](){const _0x330277=_0x593213;this[_0x330277(0x24a)]['get'](_0x5a2af2),this[_0x330277(0x24a)][_0x330277(0x22d)](_0x862e64);}},_0x4a64e6(_0x389f2b[_0x593213(0x1e1)],_0x593213(0x1f8),_0x3cc975),_0x4a64e6(_0x389f2b[_0x593213(0x1e1)],_0x593213(0x20a),_0xa92e6[_0x593213(0x23c)]['UNIVER_UNKNOWN']),_0x389f2b['UniverThreadCommentDataSourcePlugin']=_0x43b263([_0xa92e6[_0x593213(0x238)](_0x203d16[_0x593213(0x215)],_0x268431[_0x593213(0x1e2)],_0x198b16[_0x593213(0x207)]),_0x3d2c34(0x1,_0xa92e6['Inject'](_0xa92e6[_0x593213(0x1c8)])),_0x3d2c34(0x2,_0xa92e6[_0x593213(0x1e9)])],_0x389f2b[_0x593213(0x1e1)]),Object[_0x593213(0x204)](_0x389f2b,Symbol['toStringTag'],{'value':_0x593213(0x200)});}));
1
+ function _0x1151(_0x2b2155,_0x4121c4){_0x2b2155=_0x2b2155-0xd8;const _0x975761=_0x9757();let _0x115190=_0x975761[_0x2b2155];return _0x115190;}(function(_0xb54e4e,_0x2a06dc){const _0x361048=_0x1151,_0x10f70b=_0xb54e4e();while(!![]){try{const _0x1dc94d=parseInt(_0x361048(0x10e))/0x1*(-parseInt(_0x361048(0x11e))/0x2)+-parseInt(_0x361048(0xf9))/0x3+parseInt(_0x361048(0x11c))/0x4*(-parseInt(_0x361048(0x10c))/0x5)+parseInt(_0x361048(0x14d))/0x6*(-parseInt(_0x361048(0xf8))/0x7)+-parseInt(_0x361048(0xeb))/0x8+parseInt(_0x361048(0x12b))/0x9+parseInt(_0x361048(0x122))/0xa*(parseInt(_0x361048(0x100))/0xb);if(_0x1dc94d===_0x2a06dc)break;else _0x10f70b['push'](_0x10f70b['shift']());}catch(_0x5dc0ae){_0x10f70b['push'](_0x10f70b['shift']());}}}(_0x9757,0x85107),function(_0x18b9e3,_0x5a11b3){const _0x135924=_0x1151;typeof exports=='object'&&typeof module<'u'?_0x5a11b3(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x135924(0xfe)&&define[_0x135924(0x13c)]?define(['exports','@univerjs-pro/collaboration-client','@univerjs-pro/license',_0x135924(0x154),_0x135924(0xfb),_0x135924(0xf7),'rxjs',_0x135924(0xf5)],_0x5a11b3):(_0x18b9e3=typeof globalThis<'u'?globalThis:_0x18b9e3||self,_0x5a11b3(_0x18b9e3[_0x135924(0x14b)]={},_0x18b9e3[_0x135924(0x12e)],_0x18b9e3['UniverProLicense'],_0x18b9e3[_0x135924(0x12d)],_0x18b9e3['UniverThreadCommentUi'],_0x18b9e3[_0x135924(0x14f)],_0x18b9e3[_0x135924(0x121)],_0x18b9e3[_0x135924(0x13d)]));}(this,function(_0x4295a0,_0x3869c4,_0x43efe2,_0x38b33b,_0x1d7685,_0xd1e86d,_0xbcfdf6,_0x338ad3){'use strict';const _0x7566ed=_0x1151;const _0x40d9a5='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x4e36fd=(_0xf91b4e=>(_0xf91b4e[_0xf91b4e[_0x7566ed(0x109)]=0x0]=_0x7566ed(0x109),_0xf91b4e[_0xf91b4e[_0x7566ed(0xf2)]=0x1]=_0x7566ed(0xf2),_0xf91b4e[_0xf91b4e['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0xf91b4e))(_0x4e36fd||{}),_0x54f0e3=(_0x2e35ee=>(_0x2e35ee[_0x2e35ee[_0x7566ed(0x136)]=0x0]=_0x7566ed(0x136),_0x2e35ee[_0x2e35ee[_0x7566ed(0x113)]=0x1]='Add',_0x2e35ee[_0x2e35ee[_0x7566ed(0xd8)]=0x2]=_0x7566ed(0xd8),_0x2e35ee[_0x2e35ee[_0x7566ed(0x10a)]=0x3]=_0x7566ed(0x10a),_0x2e35ee[_0x2e35ee[_0x7566ed(0x152)]=0x4]=_0x7566ed(0x152),_0x2e35ee[_0x2e35ee['Solve']=0x5]=_0x7566ed(0x128),_0x2e35ee[_0x2e35ee[_0x7566ed(0x11b)]=-0x1]=_0x7566ed(0x11b),_0x2e35ee))(_0x54f0e3||{});const _0xb02b86=_0x54b4dc=>_0x38b33b['dayjs'](new Date(+_0x54b4dc))[_0x7566ed(0xff)](_0x7566ed(0x103)),_0x306f5e=async(_0x21c48a,_0x2648ea)=>{const _0x33ecf3=_0x7566ed,_0xe1ce90=_0x21c48a[_0x33ecf3(0x11d)](_0x38b33b[_0x33ecf3(0x14e)]),_0x2f6b2b=_0x21c48a[_0x33ecf3(0x11d)](_0x338ad3[_0x33ecf3(0xe1)]);_0x2648ea[_0x33ecf3(0xe5)](_0x1cde4b=>{const _0x271d24=_0x33ecf3;_0xe1ce90[_0x271d24(0x10b)](_0x1cde4b)&&_0x2648ea[_0x271d24(0x137)](_0x1cde4b);}),_0x2648ea[_0x33ecf3(0xfc)]&&(await _0x2f6b2b['get'](_0x33ecf3(0x102),{'params':{'userIDs':[..._0x2648ea]}}))[_0x33ecf3(0xf1)]['users'][_0x33ecf3(0xe5)](_0x37ffc1=>{const _0x216fa9=_0x33ecf3;_0x37ffc1&&_0xe1ce90[_0x216fa9(0x104)](_0x37ffc1);});};var _0x149953=Object[_0x7566ed(0xe6)],_0x421834=(_0x54caf2,_0x40ab93,_0x31acb1,_0x5e95d2)=>{const _0xe5eea7=_0x7566ed;for(var _0x4090ed=_0x5e95d2>0x1?void 0x0:_0x5e95d2?_0x149953(_0x40ab93,_0x31acb1):_0x40ab93,_0x82175d=_0x54caf2[_0xe5eea7(0x149)]-0x1,_0x1dfea0;_0x82175d>=0x0;_0x82175d--)(_0x1dfea0=_0x54caf2[_0x82175d])&&(_0x4090ed=_0x1dfea0(_0x4090ed)||_0x4090ed);return _0x4090ed;},_0x22545f=(_0x12c7ba,_0x3c2391)=>(_0x1be9b9,_0x322fb7)=>_0x3c2391(_0x1be9b9,_0x322fb7,_0x12c7ba);let _0x1a821a=class extends _0x38b33b[_0x7566ed(0x129)]{constructor(_0x50b406,_0x53ce12,_0x2590a9,_0x1bab27){const _0x8d8246=_0x7566ed;super(),this['_commentService']=_0x50b406,this[_0x8d8246(0x148)]=_0x53ce12,this[_0x8d8246(0x118)]=_0x2590a9,this[_0x8d8246(0x123)]=_0x1bab27,this['_init'](),this['_initUserSync']();}[_0x7566ed(0x139)](){const _0x29c23d=_0x7566ed;this[_0x29c23d(0xf6)](this['_threadCommentModel'][_0x29c23d(0x144)][_0x29c23d(0xdf)](_0xbcfdf6[_0x29c23d(0x138)](0x10))['subscribe'](_0x5a32c9=>{const _0x1697a7=_0x29c23d,_0x17c3af=new Set();_0x5a32c9[_0x1697a7(0xe5)](_0x4ef9df=>{const _0x4fe433=_0x1697a7;switch(_0x4ef9df['type']){case'add':{const _0x5bfdfc=_0x4ef9df[_0x4fe433(0x106)][_0x4fe433(0x101)];_0x17c3af[_0x4fe433(0x11a)](_0x5bfdfc);break;}}}),_0x306f5e(this['_injector'],_0x17c3af);}));}['_init'](){const _0x4bd3ef=_0x7566ed;this[_0x4bd3ef(0xf6)](this[_0x4bd3ef(0xda)][_0x4bd3ef(0x144)]['subscribe'](async _0x5ce2c8=>{const _0xb50706=_0x4bd3ef;var _0x37e263,_0x1d733c,_0x540c4c,_0x4ba011;const _0x569f59=(_0x37e263=this[_0xb50706(0x148)][_0xb50706(0x150)](_0x5ce2c8[_0xb50706(0x13e)])[_0xb50706(0xfa)](_0x4a010e=>_0x4a010e['threadId']===_0x5ce2c8['threadId']))==null?void 0x0:_0x37e263[_0xb50706(0xd9)];if(!_0x569f59)return;const {unitId:_0x92b9f9,subUnitId:_0x58253d}=_0x569f59;switch(_0x5ce2c8['user']&&this['_userService']['addUser'](_0x5ce2c8[_0xb50706(0x14a)]),_0x5ce2c8[_0xb50706(0x140)]){case _0x54f0e3[_0xb50706(0x113)]:break;case _0x54f0e3[_0xb50706(0xd8)]:{this[_0xb50706(0x148)]['addComment'](_0x92b9f9,_0x58253d,{'unitId':_0x92b9f9,'subUnitId':_0x58253d,'ref':'','id':_0x5ce2c8[_0xb50706(0xf0)],'dT':_0xb02b86(+_0x5ce2c8['createTimestamp']),'threadId':_0x5ce2c8['threadId'],'personId':(_0x540c4c=(_0x1d733c=_0x5ce2c8[_0xb50706(0x14a)])==null?void 0x0:_0x1d733c[_0xb50706(0x110)])!=null?_0x540c4c:_0x5ce2c8['userId'],'text':JSON[_0xb50706(0x116)](_0x5ce2c8['content']),'parentId':_0x569f59['id']});break;}case _0x54f0e3[_0xb50706(0x152)]:{const _0x15c54f=this[_0xb50706(0x148)][_0xb50706(0xf3)](_0x92b9f9,_0x58253d,_0x5ce2c8[_0xb50706(0xf0)]);_0x15c54f&&_0x15c54f[_0xb50706(0x108)]&&this['_threadCommentModel'][_0xb50706(0x111)](_0x92b9f9,_0x58253d,_0x5ce2c8['replyId']);break;}case _0x54f0e3[_0xb50706(0x10a)]:{this[_0xb50706(0x148)][_0xb50706(0x12a)](_0x92b9f9,_0x58253d,{'commentId':_0x5ce2c8['replyId'],'text':JSON['parse'](_0x5ce2c8[_0xb50706(0x13f)])});break;}case _0x54f0e3[_0xb50706(0x128)]:{const _0x35b503=(_0x4ba011=this[_0xb50706(0x148)][_0xb50706(0x150)](_0x5ce2c8['unitId'])[_0xb50706(0xfa)](_0x2e1922=>_0x2e1922[_0xb50706(0xef)]===_0x5ce2c8['threadId']))==null?void 0x0:_0x4ba011['root'];_0x35b503&&this[_0xb50706(0x148)][_0xb50706(0xe3)](_0x92b9f9,_0x58253d,_0x35b503['id'],_0x5ce2c8[_0xb50706(0xe9)]===_0x4e36fd[_0xb50706(0xf2)]);break;}}}));}};_0x1a821a=_0x421834([_0x22545f(0x0,_0x38b33b[_0x7566ed(0x151)](_0x3869c4[_0x7566ed(0x135)])),_0x22545f(0x1,_0x38b33b[_0x7566ed(0x151)](_0xd1e86d[_0x7566ed(0xfd)])),_0x22545f(0x2,_0x38b33b[_0x7566ed(0x151)](_0x38b33b[_0x7566ed(0x14e)])),_0x22545f(0x3,_0x38b33b[_0x7566ed(0x151)](_0x38b33b[_0x7566ed(0x14c)]))],_0x1a821a);const _0x14b2d4=_0x7566ed(0x156),_0x490158={};var _0x2d7ff8=Object['getOwnPropertyDescriptor'],_0x5009c7=(_0x2cedfc,_0x32abc7,_0x623da,_0x4a5083)=>{for(var _0xea5fc=_0x4a5083>0x1?void 0x0:_0x4a5083?_0x2d7ff8(_0x32abc7,_0x623da):_0x32abc7,_0x29b5c5=_0x2cedfc['length']-0x1,_0x5ac627;_0x29b5c5>=0x0;_0x29b5c5--)(_0x5ac627=_0x2cedfc[_0x29b5c5])&&(_0xea5fc=_0x5ac627(_0xea5fc)||_0xea5fc);return _0xea5fc;},_0x4eeee0=(_0x56349b,_0x5e6c6a)=>(_0x4e9ec5,_0x48d6ee)=>_0x5e6c6a(_0x4e9ec5,_0x48d6ee,_0x56349b);function _0x11e423(_0x5d03ce,_0x18cf29){const _0x111204=_0x7566ed,_0x8b2422=_0x5d03ce['replies'][0x0];return{..._0x18cf29,'id':_0x8b2422[_0x111204(0xf0)],'resolved':_0x5d03ce[_0x111204(0xe9)]===0x1,'dT':_0xb02b86(_0x8b2422[_0x111204(0xed)]),'personId':_0x8b2422[_0x111204(0xe4)],'threadId':_0x8b2422['threadId']};}function _0x479d4e(_0x26fa9f,_0x3bcdc3,_0x4b4ce6){const _0x24bdde=_0x7566ed;var _0x1ea1a5,_0x2a6793;if(((_0x2a6793=(_0x1ea1a5=_0x26fa9f==null?void 0x0:_0x26fa9f[_0x24bdde(0x10d)])==null?void 0x0:_0x1ea1a5[_0x24bdde(0x149)])!=null?_0x2a6793:0x0)>0x0){const _0x24aad2=(_0x4a0dbe,_0x1c07ed)=>({'id':_0x4a0dbe[_0x24bdde(0xf0)],'threadId':_0x4a0dbe[_0x24bdde(0xef)],'dT':_0xb02b86(_0x4a0dbe[_0x24bdde(0xed)]),'personId':_0x4a0dbe[_0x24bdde(0xe4)],'resolved':_0x26fa9f[_0x24bdde(0xe9)]===_0x4e36fd['Solved'],'unitId':_0x3bcdc3,'subUnitId':_0x4b4ce6,'text':JSON['parse'](_0x4a0dbe[_0x24bdde(0x13f)]),'parentId':_0x1c07ed}),_0x4a9e3c=_0x24aad2(_0x26fa9f[_0x24bdde(0x10d)][0x0]);return{..._0x4a9e3c,'children':_0x26fa9f[_0x24bdde(0x10d)][_0x24bdde(0x13a)](0x1)[_0x24bdde(0x155)](_0x17f466=>_0x24aad2(_0x17f466,_0x4a9e3c['id']))};}return null;}let _0x19ffd9=class{constructor(_0x206045,_0x32358a,_0x53eda4){const _0x10e758=_0x7566ed;this[_0x10e758(0x132)]=_0x206045,this[_0x10e758(0x118)]=_0x32358a,this[_0x10e758(0xdc)]=_0x53eda4;}async[_0x7566ed(0x134)](_0x21cef8){const _0x47becd=_0x7566ed;var _0x2aa013,_0xf27626;const {parentId:_0x38c518,unitId:_0x5a560f,text:_0x5571a8,threadId:_0x5dfaf9}=_0x21cef8,_0x888524=(_0xf27626=(_0x2aa013=_0x5571a8['customRanges'])==null?void 0x0:_0x2aa013['filter'](_0x7d3907=>_0x7d3907[_0x47becd(0x127)]===_0x38b33b[_0x47becd(0x12f)][_0x47becd(0xee)])[_0x47becd(0x155)](_0x20a340=>_0x20a340[_0x47becd(0x13b)]))!=null?_0xf27626:[],_0x389840=JSON[_0x47becd(0x131)](_0x5571a8),_0x37483b=(await this[_0x47becd(0xdc)]['requireSession'](_0x5a560f))['getMemberID']();if(_0x38c518){const _0x8e03fd={'memberId':_0x37483b,'unitId':_0x5a560f,'content':_0x389840,'mention':_0x888524,'threadId':_0x5dfaf9},_0x1e506b=(await this[_0x47becd(0x132)][_0x47becd(0xe8)](_0x47becd(0xde)+_0x5a560f+'/reply',{'body':_0x8e03fd}))[_0x47becd(0xf1)]['reply'];return{..._0x21cef8,'id':_0x1e506b[_0x47becd(0xf0)],'dT':_0x38b33b[_0x47becd(0x10f)](+_0x1e506b[_0x47becd(0xed)])['format'](_0x47becd(0x103)),'personId':_0x1e506b['userId']};}else{const _0x2c4372={'memberId':_0x37483b,'unitId':_0x5a560f,'content':_0x389840,'mention':_0x888524},_0x3e2ca0=await this['_httpService'][_0x47becd(0xe8)]('/universer-api/comment/unit/'+_0x5a560f+_0x47becd(0x112),{'body':_0x2c4372});return _0x11e423(_0x3e2ca0[_0x47becd(0xf1)]['comment'],_0x21cef8);}}async[_0x7566ed(0x12a)](_0x1b4e2f){const _0x3512b1=_0x7566ed;var _0x4cf22c,_0x244e9b;const {text:_0x32e00f,unitId:_0x6753f8}=_0x1b4e2f,_0x29c3cf=(_0x244e9b=(_0x4cf22c=_0x32e00f[_0x3512b1(0x125)])==null?void 0x0:_0x4cf22c['filter'](_0x43ea83=>_0x43ea83[_0x3512b1(0x127)]===_0x38b33b[_0x3512b1(0x12f)][_0x3512b1(0xee)])[_0x3512b1(0x155)](_0x3a0b24=>_0x3a0b24['rangeId']))!=null?_0x244e9b:[],_0x16aa9e=JSON['stringify'](_0x32e00f),_0x369923=_0x1b4e2f[_0x3512b1(0xef)],_0x311891=_0x1b4e2f['id'],_0x29f99={'memberId':(await this[_0x3512b1(0xdc)][_0x3512b1(0xea)](_0x6753f8))[_0x3512b1(0x143)](),'unitId':_0x6753f8,'threadId':_0x369923,'mention':_0x29c3cf,'content':_0x16aa9e,'replyId':_0x311891},_0x52b594=await this[_0x3512b1(0x132)][_0x3512b1(0xe8)](_0x3512b1(0xde)+_0x6753f8+_0x3512b1(0x158),{'body':_0x29f99});return!_0x52b594[_0x3512b1(0xf1)][_0x3512b1(0x145)]||_0x52b594[_0x3512b1(0xf1)][_0x3512b1(0x145)]['code']===0x1;}async[_0x7566ed(0xe3)](_0x20bc7f){const _0x2f61fd=_0x7566ed,{unitId:_0x4fb01a}=_0x20bc7f,_0x24d828=_0x20bc7f[_0x2f61fd(0xef)],_0x347896={'memberId':this[_0x2f61fd(0x118)][_0x2f61fd(0xdd)]()[_0x2f61fd(0x110)],'unitId':_0x4fb01a,'threadId':_0x24d828,'solved':_0x20bc7f['resolved']?_0x4e36fd[_0x2f61fd(0xf2)]:_0x4e36fd[_0x2f61fd(0x109)]},_0x264e6c=await this['_httpService']['post'](_0x2f61fd(0xde)+_0x4fb01a+'/solved',{'body':_0x347896});return!_0x264e6c['body'][_0x2f61fd(0x145)]||_0x264e6c['body']['error']['code']===0x1;}async[_0x7566ed(0x111)](_0x4e5e1c,_0x4dff25,_0x2c2413,_0x498e1d){const _0xd12c08=_0x7566ed,_0x5365b5={'memberId':(await this[_0xd12c08(0xdc)][_0xd12c08(0xea)](_0x4e5e1c))[_0xd12c08(0x143)](),'threadId':_0x2c2413,'replyId':_0x498e1d,'unitId':_0x4e5e1c},_0x499774=await this[_0xd12c08(0x132)]['post']('/universer-api/comment/unit/'+_0x4e5e1c+_0xd12c08(0x130),{'body':_0x5365b5});return!_0x499774['body']['error']||_0x499774[_0xd12c08(0xf1)][_0xd12c08(0x145)][_0xd12c08(0x124)]===0x1;}async[_0x7566ed(0x153)](_0x11b66b,_0x23db09,_0x3c4841){const _0x3914a7=_0x7566ed,_0x28fc33={'unitId':_0x11b66b,'threadId':_0x3c4841},_0x343255=await this[_0x3914a7(0x132)]['post'](_0x3914a7(0xde)+_0x11b66b+_0x3914a7(0x105),{'body':_0x28fc33}),_0x476e7b=_0x3c4841['map'](_0x5d25c9=>_0x479d4e(_0x343255[_0x3914a7(0xf1)][_0x3914a7(0xe7)][_0x5d25c9],_0x11b66b,_0x23db09))[_0x3914a7(0x11f)](Boolean);return Object[_0x3914a7(0x12c)](_0x343255[_0x3914a7(0xf1)][_0x3914a7(0x120)])[_0x3914a7(0xe5)](_0x5beab5=>{const _0x4470a1=_0x3914a7;this[_0x4470a1(0x118)]['addUser'](_0x5beab5);}),_0x476e7b;}[_0x7566ed(0xe2)](_0x3ee35d){const _0x3ff782=_0x7566ed;return{'id':_0x3ee35d['id'],'threadId':_0x3ee35d[_0x3ff782(0xef)],'ref':_0x3ee35d['ref']};}};_0x19ffd9=_0x5009c7([_0x4eeee0(0x0,_0x38b33b[_0x7566ed(0x151)](_0x338ad3[_0x7566ed(0xe1)])),_0x4eeee0(0x1,_0x38b33b['Inject'](_0x38b33b[_0x7566ed(0x14e)])),_0x4eeee0(0x2,_0x38b33b['Inject'](_0x3869c4[_0x7566ed(0x115)]))],_0x19ffd9);var _0x463857=Object[_0x7566ed(0xe6)],_0x5d5ef0=(_0x80451a,_0x5205e0,_0x27d68d,_0x9c4edd)=>{for(var _0x4e9055=_0x9c4edd>0x1?void 0x0:_0x9c4edd?_0x463857(_0x5205e0,_0x27d68d):_0x5205e0,_0x59af36=_0x80451a['length']-0x1,_0x2fe65b;_0x59af36>=0x0;_0x59af36--)(_0x2fe65b=_0x80451a[_0x59af36])&&(_0x4e9055=_0x2fe65b(_0x4e9055)||_0x4e9055);return _0x4e9055;},_0x24a9ff=(_0x5e54fa,_0xbde856)=>(_0x3210c3,_0x7f7a63)=>_0xbde856(_0x3210c3,_0x7f7a63,_0x5e54fa);let _0x1e18ca=class extends _0x38b33b['Disposable']{constructor(_0x499364,_0x259bcb){const _0x4c119b=_0x7566ed;super(),this[_0x4c119b(0x133)]=_0x499364,this['_threadCommentDataSource']=_0x259bcb,this[_0x4c119b(0x117)]();}['_initDataSource'](){const _0x9f20a2=_0x7566ed;this[_0x9f20a2(0x133)]['dataSource']=this[_0x9f20a2(0x114)],this['_threadCommentDataSourceService'][_0x9f20a2(0x157)]=!0x1;}};_0x1e18ca=_0x5d5ef0([_0x24a9ff(0x0,_0xd1e86d[_0x7566ed(0x159)]),_0x24a9ff(0x1,_0x38b33b[_0x7566ed(0x151)](_0x19ffd9))],_0x1e18ca);var _0x210831=Object[_0x7566ed(0x141)],_0x638d1f=Object[_0x7566ed(0xe6)],_0x27d730=(_0x220b8d,_0x58a65b,_0x561b4d)=>_0x58a65b in _0x220b8d?_0x210831(_0x220b8d,_0x58a65b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x561b4d}):_0x220b8d[_0x58a65b]=_0x561b4d,_0x60a6f9=(_0x103685,_0x2b4abc,_0x43b3dd,_0x2e908a)=>{for(var _0x3ded88=_0x2e908a>0x1?void 0x0:_0x2e908a?_0x638d1f(_0x2b4abc,_0x43b3dd):_0x2b4abc,_0x47313a=_0x103685['length']-0x1,_0x49bcba;_0x47313a>=0x0;_0x47313a--)(_0x49bcba=_0x103685[_0x47313a])&&(_0x3ded88=_0x49bcba(_0x3ded88)||_0x3ded88);return _0x3ded88;},_0x1dc24c=(_0x528a11,_0x360a31)=>(_0x3c38f6,_0xb230a5)=>_0x360a31(_0x3c38f6,_0xb230a5,_0x528a11),_0x253d3c=(_0xaa0d34,_0x4b7a73,_0x4a2163)=>_0x27d730(_0xaa0d34,typeof _0x4b7a73!=_0x7566ed(0x126)?_0x4b7a73+'':_0x4b7a73,_0x4a2163);_0x4295a0[_0x7566ed(0xe0)]=class extends _0x38b33b[_0x7566ed(0xec)]{constructor(_0x389efb=_0x490158,_0x263bcc,_0x3a2ed2){const _0x1a8312=_0x7566ed;super(),this['_config']=_0x389efb,this[_0x1a8312(0x123)]=_0x263bcc,this['_configService']=_0x3a2ed2;const {..._0x173e13}=_0x38b33b['merge']({},_0x490158,this['_config']);this['_configService'][_0x1a8312(0x119)](_0x14b2d4,_0x173e13);}['onStarting'](){[[_0x19ffd9],[_0x1e18ca],[_0x1a821a]]['forEach'](_0x1c63bb=>{const _0xc269e=_0x1151;this[_0xc269e(0x123)][_0xc269e(0x11a)](_0x1c63bb);});}[_0x7566ed(0x107)](){const _0x1fb29a=_0x7566ed;this['_injector'][_0x1fb29a(0x11d)](_0x1e18ca),this[_0x1fb29a(0x123)]['get'](_0x1a821a);}},_0x253d3c(_0x4295a0[_0x7566ed(0xe0)],_0x7566ed(0x146),_0x40d9a5),_0x253d3c(_0x4295a0[_0x7566ed(0xe0)],'type',_0x38b33b[_0x7566ed(0x142)]['UNIVER_UNKNOWN']),_0x4295a0[_0x7566ed(0xe0)]=_0x60a6f9([_0x38b33b[_0x7566ed(0xf4)](_0x1d7685[_0x7566ed(0xdb)],_0x3869c4['UniverCollaborationClientPlugin'],_0x43efe2['UniverLicensePlugin']),_0x1dc24c(0x1,_0x38b33b[_0x7566ed(0x151)](_0x38b33b['Injector'])),_0x1dc24c(0x2,_0x38b33b[_0x7566ed(0x147)])],_0x4295a0[_0x7566ed(0xe0)]),Object['defineProperty'](_0x4295a0,Symbol['toStringTag'],{'value':'Module'});}));function _0x9757(){const _0xe9cf6c=['userID','deleteComment','/add','Add','_threadCommentDataSource','CollaborationSessionService','parse','_initDataSource','_userService','setConfig','add','UNRECOGNIZED','514100RoIvWT','get','2083154TFExDQ','filter','users','rxjs','1610QAHDIC','_injector','code','customRanges','symbol','rangeType','Solve','Disposable','updateComment','8529678gOIuom','values','UniverCore','UniverProCollaborationClient','CustomRangeType','/delete','stringify','_httpService','_threadCommentDataSourceService','addComment','CommentService','Unknown','delete','bufferTime','_initUserSync','slice','rangeId','amd','UniverNetwork','unitId','content','type','defineProperty','UniverInstanceType','getMemberID','commentUpdate$','error','pluginName','IConfigService','_threadCommentModel','length','user','UniverProThreadCommentDatasource','Injector','3781230PdFfZn','UserManagerService','UniverThreadComment','getUnit','Inject','Delete','listComments','@univerjs/core','map','thread-comment-data-source.config','syncUpdateMutationToColla','/edit','IThreadCommentDataSourceService','Reply','root','_commentService','UniverThreadCommentUIPlugin','_sessionService','getCurrentUser','/universer-api/comment/unit/','pipe','UniverThreadCommentDataSourcePlugin','HTTPService','saveCommentToSnapshot','resolveComment','userId','forEach','getOwnPropertyDescriptor','comments','post','solved','requireSession','1508664DoJItd','Plugin','createTimestamp','COMMENT','threadId','replyId','body','Solved','getComment','DependentOn','@univerjs/network','disposeWithMe','@univerjs/thread-comment','7tmrEgN','1770294DNLnXU','find','@univerjs/thread-comment-ui','size','ThreadCommentModel','function','format','201377mmCRVo','personId','/universer-api/user/list','YYYY/MM/DD\x20HH:mm','addUser','/list','payload','onReady','parentId','OpenOrReOpen','Edit','getUser','35sANlOj','replies','1EhhbFm','dayjs'];_0x9757=function(){return _0xe9cf6c;};return _0x9757();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.12.3",
3
+ "version": "0.12.4",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.12.3",
49
- "@univerjs-pro/license": "0.12.3",
50
- "@univerjs/core": "0.12.3",
51
- "@univerjs/network": "0.12.3",
52
- "@univerjs/thread-comment-ui": "0.12.3",
53
- "@univerjs/thread-comment": "0.12.3",
54
- "@univerjs/protocol": "0.1.47"
48
+ "@univerjs-pro/collaboration-client": "0.12.4",
49
+ "@univerjs/core": "0.12.4",
50
+ "@univerjs/network": "0.12.4",
51
+ "@univerjs/protocol": "0.1.47",
52
+ "@univerjs/thread-comment": "0.12.4",
53
+ "@univerjs/thread-comment-ui": "0.12.4",
54
+ "@univerjs-pro/license": "0.12.4"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.9.3",
59
- "vite": "^7.2.4",
60
- "vitest": "^4.0.14",
61
- "@univerjs-infra/shared": "0.12.3"
59
+ "vite": "^7.2.6",
60
+ "vitest": "^4.0.15",
61
+ "@univerjs-infra/shared": "0.12.4"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",