@univerjs-pro/thread-comment-datasource 0.12.3 → 0.12.4-experimental.20251208-c4b8a44

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 _0x278ed8=_0x1016;(function(_0x3ecf74,_0x181f01){const _0x146c8e=_0x1016,_0x4425ea=_0x3ecf74();while(!![]){try{const _0x111309=-parseInt(_0x146c8e(0x157))/0x1*(parseInt(_0x146c8e(0x1a8))/0x2)+-parseInt(_0x146c8e(0x180))/0x3+-parseInt(_0x146c8e(0x152))/0x4+parseInt(_0x146c8e(0x1a0))/0x5*(parseInt(_0x146c8e(0x146))/0x6)+-parseInt(_0x146c8e(0x173))/0x7+parseInt(_0x146c8e(0x17c))/0x8*(-parseInt(_0x146c8e(0x140))/0x9)+parseInt(_0x146c8e(0x14d))/0xa;if(_0x111309===_0x181f01)break;else _0x4425ea['push'](_0x4425ea['shift']());}catch(_0x420a2b){_0x4425ea['push'](_0x4425ea['shift']());}}}(_0x44de,0x4409c));Object[_0x278ed8(0x12e)](exports,Symbol[_0x278ed8(0x135)],{'value':_0x278ed8(0x186)});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=_0x278ed8(0x16e);var I=(_0x2df397=>(_0x2df397[_0x2df397[_0x278ed8(0x137)]=0x0]=_0x278ed8(0x137),_0x2df397[_0x2df397['Solved']=0x1]=_0x278ed8(0x159),_0x2df397[_0x2df397[_0x278ed8(0x181)]=-0x1]='UNRECOGNIZED',_0x2df397))(I||{}),v=(_0x2d6fd2=>(_0x2d6fd2[_0x2d6fd2[_0x278ed8(0x142)]=0x0]=_0x278ed8(0x142),_0x2d6fd2[_0x2d6fd2[_0x278ed8(0x13f)]=0x1]=_0x278ed8(0x13f),_0x2d6fd2[_0x2d6fd2[_0x278ed8(0x199)]=0x2]=_0x278ed8(0x199),_0x2d6fd2[_0x2d6fd2[_0x278ed8(0x19c)]=0x3]=_0x278ed8(0x19c),_0x2d6fd2[_0x2d6fd2['Delete']=0x4]=_0x278ed8(0x138),_0x2d6fd2[_0x2d6fd2[_0x278ed8(0x15a)]=0x5]=_0x278ed8(0x15a),_0x2d6fd2[_0x2d6fd2['UNRECOGNIZED']=-0x1]=_0x278ed8(0x181),_0x2d6fd2))(v||{});function _0x44de(){const _0x288a59=['ref','_init','bufferTime','rangeId','deleteComment','unitId','getUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','resolved','_initDataSource','comments','threadId','2306367wvmLUB','/reply','replyId','getCurrentUser','getComment','pipe','requireSession','merge','stringify','2992UYhuXW','rangeType','CollaborationSessionService','/solved','1636281QiuDPH','UNRECOGNIZED','payload','saveCommentToSnapshot','customRanges','parse','Module','resolveComment','_configService','add','onReady','root','UniverCollaborationClientPlugin','_commentService','_injector','_config','type','UserManagerService','UniverThreadCommentUIPlugin','content','/edit','map','listComments','format','_threadCommentDataSourceService','Reply','Disposable','onStarting','Edit','dataSource','forEach','getOwnPropertyDescriptor','1135SDGuWF','addUser','commentUpdate$','_sessionService','/add','Injector','body','CommentService','910zVzhGa','/delete','Inject','get','reply','code','defineProperty','HTTPService','Plugin','getUnit','disposeWithMe','UniverThreadCommentDataSourcePlugin','dayjs','toStringTag','/universer-api/user/list','OpenOrReOpen','Delete','getMemberID','createTimestamp','COMMENT','delete','YYYY/MM/DD\x20HH:mm','_threadCommentModel','Add','1881wkxCDG','IConfigService','Unknown','IThreadCommentDataSourceService','thread-comment-data-source.config','CustomRangeType','3570aImVTZ','UniverLicensePlugin','_threadCommentDataSource','subscribe','find','solved','length','13970100bhkfgN','addComment','size','updateComment','_httpService','78328WGIdUt','parentId','comment','replies','personId','617DyVxtr','ThreadCommentModel','Solved','Solve','user','error','syncUpdateMutationToColla','_initUserSync','userId','post','_userService','filter','userID','users','UniverInstanceType','/universer-api/comment/unit/'];_0x44de=function(){return _0x288a59;};return _0x44de();}const f=_0x3c1cc6=>c['dayjs'](new Date(+_0x3c1cc6))['format'](_0x278ed8(0x13d)),R=async(_0x5f35a6,_0xb2d4f8)=>{const _0x46c47b=_0x278ed8,_0x9f9f67=_0x5f35a6[_0x46c47b(0x12b)](c['UserManagerService']),_0x36db87=_0x5f35a6[_0x46c47b(0x12b)](P['HTTPService']);_0xb2d4f8[_0x46c47b(0x19e)](_0x48b1f0=>{const _0x3db998=_0x46c47b;_0x9f9f67[_0x3db998(0x16d)](_0x48b1f0)&&_0xb2d4f8[_0x3db998(0x13c)](_0x48b1f0);}),_0xb2d4f8[_0x46c47b(0x14f)]&&(await _0x36db87['get'](_0x46c47b(0x136),{'params':{'userIDs':[..._0xb2d4f8]}}))[_0x46c47b(0x1a6)][_0x46c47b(0x164)][_0x46c47b(0x19e)](_0x30e80=>{const _0x2d98f7=_0x46c47b;_0x30e80&&_0x9f9f67[_0x2d98f7(0x1a1)](_0x30e80);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x3bcdea,_0x55c76a,_0x48910d,_0x234ce8)=>{const _0x1e8f44=_0x278ed8;for(var _0x25d13b=_0x234ce8>0x1?void 0x0:_0x234ce8?$(_0x55c76a,_0x48910d):_0x55c76a,_0x39d736=_0x3bcdea[_0x1e8f44(0x14c)]-0x1,_0xb756fd;_0x39d736>=0x0;_0x39d736--)(_0xb756fd=_0x3bcdea[_0x39d736])&&(_0x25d13b=_0xb756fd(_0x25d13b)||_0x25d13b);return _0x25d13b;},S=(_0xa64a9b,_0x25162f)=>(_0xbf014b,_0x4bfc3d)=>_0x25162f(_0xbf014b,_0x4bfc3d,_0xa64a9b);let _=class extends c[_0x278ed8(0x19a)]{constructor(_0x2ee0ed,_0x2eb936,_0x5a4199,_0x5a100b){const _0x58e029=_0x278ed8;super(),this[_0x58e029(0x18d)]=_0x2ee0ed,this[_0x58e029(0x13e)]=_0x2eb936,this[_0x58e029(0x161)]=_0x5a4199,this['_injector']=_0x5a100b,this[_0x58e029(0x168)](),this[_0x58e029(0x15e)]();}[_0x278ed8(0x15e)](){const _0x61fc44=_0x278ed8;this[_0x61fc44(0x132)](this[_0x61fc44(0x13e)][_0x61fc44(0x1a2)][_0x61fc44(0x178)](j[_0x61fc44(0x169)](0x10))[_0x61fc44(0x149)](_0x48cd76=>{const _0x11cd64=_0x61fc44,_0x19e633=new Set();_0x48cd76[_0x11cd64(0x19e)](_0x4f779f=>{const _0xf5768b=_0x11cd64;switch(_0x4f779f[_0xf5768b(0x190)]){case _0xf5768b(0x189):{const _0x2db6e1=_0x4f779f[_0xf5768b(0x182)][_0xf5768b(0x156)];_0x19e633[_0xf5768b(0x189)](_0x2db6e1);break;}}}),R(this[_0x11cd64(0x18e)],_0x19e633);}));}[_0x278ed8(0x168)](){const _0xb571e0=_0x278ed8;this[_0xb571e0(0x132)](this[_0xb571e0(0x18d)][_0xb571e0(0x1a2)][_0xb571e0(0x149)](async _0x53d7a7=>{const _0x95cea0=_0xb571e0;var _0x3b376f,_0x296cb8,_0x21c2d3,_0x31a0fd;const _0x28432c=(_0x3b376f=this[_0x95cea0(0x13e)]['getUnit'](_0x53d7a7[_0x95cea0(0x16c)])[_0x95cea0(0x14a)](_0x9e19af=>_0x9e19af['threadId']===_0x53d7a7['threadId']))==null?void 0x0:_0x3b376f[_0x95cea0(0x18b)];if(!_0x28432c)return;const {unitId:_0x365248,subUnitId:_0x9f4d75}=_0x28432c;switch(_0x53d7a7[_0x95cea0(0x15b)]&&this[_0x95cea0(0x161)][_0x95cea0(0x1a1)](_0x53d7a7[_0x95cea0(0x15b)]),_0x53d7a7['type']){case v[_0x95cea0(0x13f)]:break;case v['Reply']:{this['_threadCommentModel'][_0x95cea0(0x14e)](_0x365248,_0x9f4d75,{'unitId':_0x365248,'subUnitId':_0x9f4d75,'ref':'','id':_0x53d7a7[_0x95cea0(0x175)],'dT':f(+_0x53d7a7[_0x95cea0(0x13a)]),'threadId':_0x53d7a7[_0x95cea0(0x172)],'personId':(_0x21c2d3=(_0x296cb8=_0x53d7a7[_0x95cea0(0x15b)])==null?void 0x0:_0x296cb8['userID'])!=null?_0x21c2d3:_0x53d7a7[_0x95cea0(0x15f)],'text':JSON[_0x95cea0(0x185)](_0x53d7a7['content']),'parentId':_0x28432c['id']});break;}case v[_0x95cea0(0x138)]:{const _0x1fd558=this[_0x95cea0(0x13e)][_0x95cea0(0x177)](_0x365248,_0x9f4d75,_0x53d7a7[_0x95cea0(0x175)]);_0x1fd558&&_0x1fd558[_0x95cea0(0x153)]&&this[_0x95cea0(0x13e)]['deleteComment'](_0x365248,_0x9f4d75,_0x53d7a7[_0x95cea0(0x175)]);break;}case v[_0x95cea0(0x19c)]:{this[_0x95cea0(0x13e)][_0x95cea0(0x150)](_0x365248,_0x9f4d75,{'commentId':_0x53d7a7[_0x95cea0(0x175)],'text':JSON['parse'](_0x53d7a7[_0x95cea0(0x193)])});break;}case v[_0x95cea0(0x15a)]:{const _0x526efa=(_0x31a0fd=this[_0x95cea0(0x13e)][_0x95cea0(0x131)](_0x53d7a7['unitId'])[_0x95cea0(0x14a)](_0x42761b=>_0x42761b[_0x95cea0(0x172)]===_0x53d7a7[_0x95cea0(0x172)]))==null?void 0x0:_0x31a0fd[_0x95cea0(0x18b)];_0x526efa&&this['_threadCommentModel'][_0x95cea0(0x187)](_0x365248,_0x9f4d75,_0x526efa['id'],_0x53d7a7[_0x95cea0(0x14b)]===I[_0x95cea0(0x159)]);break;}}}));}};_=E([S(0x0,c[_0x278ed8(0x12a)](b[_0x278ed8(0x1a7)])),S(0x1,c[_0x278ed8(0x12a)](M[_0x278ed8(0x158)])),S(0x2,c[_0x278ed8(0x12a)](c[_0x278ed8(0x191)])),S(0x3,c['Inject'](c[_0x278ed8(0x1a5)]))],_);const q=_0x278ed8(0x144),D={};var A=Object[_0x278ed8(0x19f)],x=(_0x4f24ee,_0x56132b,_0x4bbd9b,_0x4e5507)=>{const _0x1d62e7=_0x278ed8;for(var _0x43fcf1=_0x4e5507>0x1?void 0x0:_0x4e5507?A(_0x56132b,_0x4bbd9b):_0x56132b,_0x1c951d=_0x4f24ee[_0x1d62e7(0x14c)]-0x1,_0x1c8be1;_0x1c951d>=0x0;_0x1c951d--)(_0x1c8be1=_0x4f24ee[_0x1c951d])&&(_0x43fcf1=_0x1c8be1(_0x43fcf1)||_0x43fcf1);return _0x43fcf1;},C=(_0x4d01fe,_0x283bab)=>(_0xc99d1b,_0x109ead)=>_0x283bab(_0xc99d1b,_0x109ead,_0x4d01fe);function _0x1016(_0x37c7e1,_0x32ae33){_0x37c7e1=_0x37c7e1-0x129;const _0x44deec=_0x44de();let _0x1016b3=_0x44deec[_0x37c7e1];return _0x1016b3;}function Y(_0x4a1670,_0x48b24f){const _0x4b3585=_0x278ed8,_0x2406cf=_0x4a1670[_0x4b3585(0x155)][0x0];return{..._0x48b24f,'id':_0x2406cf[_0x4b3585(0x175)],'resolved':_0x4a1670[_0x4b3585(0x14b)]===0x1,'dT':f(_0x2406cf[_0x4b3585(0x13a)]),'personId':_0x2406cf[_0x4b3585(0x15f)],'threadId':_0x2406cf[_0x4b3585(0x172)]};}function G(_0x383867,_0x237c68,_0x5abeb0){const _0x10d534=_0x278ed8;var _0x1fa980,_0x3c4f3c;if(((_0x3c4f3c=(_0x1fa980=_0x383867==null?void 0x0:_0x383867[_0x10d534(0x155)])==null?void 0x0:_0x1fa980[_0x10d534(0x14c)])!=null?_0x3c4f3c:0x0)>0x0){const _0x1fbaea=(_0xfded55,_0x529e67)=>({'id':_0xfded55[_0x10d534(0x175)],'threadId':_0xfded55[_0x10d534(0x172)],'dT':f(_0xfded55[_0x10d534(0x13a)]),'personId':_0xfded55[_0x10d534(0x15f)],'resolved':_0x383867['solved']===I[_0x10d534(0x159)],'unitId':_0x237c68,'subUnitId':_0x5abeb0,'text':JSON['parse'](_0xfded55[_0x10d534(0x193)]),'parentId':_0x529e67}),_0x37b578=_0x1fbaea(_0x383867[_0x10d534(0x155)][0x0]);return{..._0x37b578,'children':_0x383867['replies']['slice'](0x1)[_0x10d534(0x195)](_0x28d095=>_0x1fbaea(_0x28d095,_0x37b578['id']))};}return null;}let p=class{constructor(_0x41112c,_0x587d9f,_0x21f024){const _0x366108=_0x278ed8;this[_0x366108(0x151)]=_0x41112c,this[_0x366108(0x161)]=_0x587d9f,this[_0x366108(0x1a3)]=_0x21f024;}async[_0x278ed8(0x14e)](_0x36d285){const _0xa756f=_0x278ed8;var _0x2716e1,_0x2c556f;const {parentId:_0xc2631a,unitId:_0xa81247,text:_0x19a670,threadId:_0x90613a}=_0x36d285,_0x54e9c0=(_0x2c556f=(_0x2716e1=_0x19a670[_0xa756f(0x184)])==null?void 0x0:_0x2716e1[_0xa756f(0x162)](_0x195b25=>_0x195b25[_0xa756f(0x17d)]===c['CustomRangeType']['COMMENT'])[_0xa756f(0x195)](_0x3cd1e0=>_0x3cd1e0['rangeId']))!=null?_0x2c556f:[],_0x172d5d=JSON[_0xa756f(0x17b)](_0x19a670),_0x444e11=(await this[_0xa756f(0x1a3)][_0xa756f(0x179)](_0xa81247))[_0xa756f(0x139)]();if(_0xc2631a){const _0x147b47={'memberId':_0x444e11,'unitId':_0xa81247,'content':_0x172d5d,'mention':_0x54e9c0,'threadId':_0x90613a},_0x447659=(await this['_httpService'][_0xa756f(0x160)](_0xa756f(0x166)+_0xa81247+_0xa756f(0x174),{'body':_0x147b47}))[_0xa756f(0x1a6)][_0xa756f(0x12c)];return{..._0x36d285,'id':_0x447659[_0xa756f(0x175)],'dT':c[_0xa756f(0x134)](+_0x447659[_0xa756f(0x13a)])[_0xa756f(0x197)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x447659[_0xa756f(0x15f)]};}else{const _0x433ab1={'memberId':_0x444e11,'unitId':_0xa81247,'content':_0x172d5d,'mention':_0x54e9c0},_0x79b4ac=await this[_0xa756f(0x151)][_0xa756f(0x160)](_0xa756f(0x166)+_0xa81247+_0xa756f(0x1a4),{'body':_0x433ab1});return Y(_0x79b4ac['body'][_0xa756f(0x154)],_0x36d285);}}async['updateComment'](_0x301cae){const _0x51e63e=_0x278ed8;var _0x38e322,_0x26431b;const {text:_0x2805d1,unitId:_0x364e56}=_0x301cae,_0x3589f3=(_0x26431b=(_0x38e322=_0x2805d1[_0x51e63e(0x184)])==null?void 0x0:_0x38e322['filter'](_0x3649a1=>_0x3649a1['rangeType']===c[_0x51e63e(0x145)][_0x51e63e(0x13b)])['map'](_0xef4451=>_0xef4451[_0x51e63e(0x16a)]))!=null?_0x26431b:[],_0x147c92=JSON['stringify'](_0x2805d1),_0x177b29=_0x301cae[_0x51e63e(0x172)],_0x2555cf=_0x301cae['id'],_0x2fab02={'memberId':(await this[_0x51e63e(0x1a3)][_0x51e63e(0x179)](_0x364e56))[_0x51e63e(0x139)](),'unitId':_0x364e56,'threadId':_0x177b29,'mention':_0x3589f3,'content':_0x147c92,'replyId':_0x2555cf},_0x529935=await this[_0x51e63e(0x151)][_0x51e63e(0x160)](_0x51e63e(0x166)+_0x364e56+_0x51e63e(0x194),{'body':_0x2fab02});return!_0x529935[_0x51e63e(0x1a6)]['error']||_0x529935[_0x51e63e(0x1a6)][_0x51e63e(0x15c)][_0x51e63e(0x12d)]===0x1;}async[_0x278ed8(0x187)](_0x2de858){const _0xd74a94=_0x278ed8,{unitId:_0x540cbe}=_0x2de858,_0x193cbc=_0x2de858[_0xd74a94(0x172)],_0x313cdc={'memberId':this[_0xd74a94(0x161)][_0xd74a94(0x176)]()[_0xd74a94(0x163)],'unitId':_0x540cbe,'threadId':_0x193cbc,'solved':_0x2de858[_0xd74a94(0x16f)]?I[_0xd74a94(0x159)]:I[_0xd74a94(0x137)]},_0x40813d=await this[_0xd74a94(0x151)][_0xd74a94(0x160)](_0xd74a94(0x166)+_0x540cbe+_0xd74a94(0x17f),{'body':_0x313cdc});return!_0x40813d[_0xd74a94(0x1a6)][_0xd74a94(0x15c)]||_0x40813d['body'][_0xd74a94(0x15c)][_0xd74a94(0x12d)]===0x1;}async[_0x278ed8(0x16b)](_0x201f36,_0x190a9d,_0x5a5f84,_0x5eab5d){const _0x1384dd=_0x278ed8,_0x5edaac={'memberId':(await this[_0x1384dd(0x1a3)][_0x1384dd(0x179)](_0x201f36))['getMemberID'](),'threadId':_0x5a5f84,'replyId':_0x5eab5d,'unitId':_0x201f36},_0xdb314a=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x201f36+_0x1384dd(0x129),{'body':_0x5edaac});return!_0xdb314a[_0x1384dd(0x1a6)][_0x1384dd(0x15c)]||_0xdb314a[_0x1384dd(0x1a6)][_0x1384dd(0x15c)][_0x1384dd(0x12d)]===0x1;}async[_0x278ed8(0x196)](_0x3e0d98,_0x190583,_0x2581c5){const _0x177e34=_0x278ed8,_0x26db13={'unitId':_0x3e0d98,'threadId':_0x2581c5},_0x15e01b=await this['_httpService'][_0x177e34(0x160)]('/universer-api/comment/unit/'+_0x3e0d98+'/list',{'body':_0x26db13}),_0x3b0408=_0x2581c5['map'](_0x3a7bea=>G(_0x15e01b['body'][_0x177e34(0x171)][_0x3a7bea],_0x3e0d98,_0x190583))[_0x177e34(0x162)](Boolean);return Object['values'](_0x15e01b[_0x177e34(0x1a6)][_0x177e34(0x164)])['forEach'](_0x6f6b61=>{const _0x4aaa8a=_0x177e34;this[_0x4aaa8a(0x161)][_0x4aaa8a(0x1a1)](_0x6f6b61);}),_0x3b0408;}[_0x278ed8(0x183)](_0x5e1bf3){const _0x15009a=_0x278ed8;return{'id':_0x5e1bf3['id'],'threadId':_0x5e1bf3[_0x15009a(0x172)],'ref':_0x5e1bf3[_0x15009a(0x167)]};}};p=x([C(0x0,c[_0x278ed8(0x12a)](P[_0x278ed8(0x12f)])),C(0x1,c[_0x278ed8(0x12a)](c[_0x278ed8(0x191)])),C(0x2,c[_0x278ed8(0x12a)](b[_0x278ed8(0x17e)]))],p);var H=Object[_0x278ed8(0x19f)],J=(_0x60f551,_0x2cd7a6,_0x3a95db,_0x37e670)=>{for(var _0x3bdb3b=_0x37e670>0x1?void 0x0:_0x37e670?H(_0x2cd7a6,_0x3a95db):_0x2cd7a6,_0x2a37bc=_0x60f551['length']-0x1,_0xd08401;_0x2a37bc>=0x0;_0x2a37bc--)(_0xd08401=_0x60f551[_0x2a37bc])&&(_0x3bdb3b=_0xd08401(_0x3bdb3b)||_0x3bdb3b);return _0x3bdb3b;},y=(_0x4c04be,_0x81ad90)=>(_0xeb7726,_0x4f7d9a)=>_0x81ad90(_0xeb7726,_0x4f7d9a,_0x4c04be);let g=class extends c[_0x278ed8(0x19a)]{constructor(_0x2d0812,_0x326b0d){const _0x548b7f=_0x278ed8;super(),this['_threadCommentDataSourceService']=_0x2d0812,this[_0x548b7f(0x148)]=_0x326b0d,this['_initDataSource']();}[_0x278ed8(0x170)](){const _0x4eb6a8=_0x278ed8;this[_0x4eb6a8(0x198)][_0x4eb6a8(0x19d)]=this[_0x4eb6a8(0x148)],this['_threadCommentDataSourceService'][_0x4eb6a8(0x15d)]=!0x1;}};g=J([y(0x0,M[_0x278ed8(0x143)]),y(0x1,c[_0x278ed8(0x12a)](p))],g);var F=Object['defineProperty'],L=Object[_0x278ed8(0x19f)],Z=(_0x154bba,_0x59702a,_0x490302)=>_0x59702a in _0x154bba?F(_0x154bba,_0x59702a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x490302}):_0x154bba[_0x59702a]=_0x490302,W=(_0x2890ac,_0x3dfa1c,_0x2bb7e3,_0x552c70)=>{const _0xb024a5=_0x278ed8;for(var _0x110d38=_0x552c70>0x1?void 0x0:_0x552c70?L(_0x3dfa1c,_0x2bb7e3):_0x3dfa1c,_0x2ba49e=_0x2890ac[_0xb024a5(0x14c)]-0x1,_0x20d7ff;_0x2ba49e>=0x0;_0x2ba49e--)(_0x20d7ff=_0x2890ac[_0x2ba49e])&&(_0x110d38=_0x20d7ff(_0x110d38)||_0x110d38);return _0x110d38;},O=(_0x5576e3,_0x4f8218)=>(_0x3ce1e9,_0x5332ad)=>_0x4f8218(_0x3ce1e9,_0x5332ad,_0x5576e3),N=(_0x4dbdb1,_0x7131a9,_0xfb32f6)=>Z(_0x4dbdb1,typeof _0x7131a9!='symbol'?_0x7131a9+'':_0x7131a9,_0xfb32f6);exports[_0x278ed8(0x133)]=class extends c[_0x278ed8(0x130)]{constructor(_0x476844=D,_0x406440,_0x1716a9){const _0x38ee53=_0x278ed8;super(),this[_0x38ee53(0x18f)]=_0x476844,this[_0x38ee53(0x18e)]=_0x406440,this[_0x38ee53(0x188)]=_0x1716a9;const {..._0x219258}=c[_0x38ee53(0x17a)]({},D,this[_0x38ee53(0x18f)]);this[_0x38ee53(0x188)]['setConfig'](q,_0x219258);}[_0x278ed8(0x19b)](){const _0x7fae47=_0x278ed8;[[p],[g],[_]][_0x7fae47(0x19e)](_0x52dea5=>{const _0x34e816=_0x7fae47;this[_0x34e816(0x18e)]['add'](_0x52dea5);});}[_0x278ed8(0x18a)](){const _0x125511=_0x278ed8;this[_0x125511(0x18e)][_0x125511(0x12b)](g),this[_0x125511(0x18e)][_0x125511(0x12b)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports[_0x278ed8(0x133)],_0x278ed8(0x190),c[_0x278ed8(0x165)]['UNIVER_UNKNOWN']),exports[_0x278ed8(0x133)]=W([c['DependentOn'](w[_0x278ed8(0x192)],b[_0x278ed8(0x18c)],T[_0x278ed8(0x147)]),O(0x1,c['Inject'](c[_0x278ed8(0x1a5)])),O(0x2,c[_0x278ed8(0x141)])],exports[_0x278ed8(0x133)]);
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 _0x1bdfca=_0x5533;(function(_0xfb79f,_0x33210c){const _0x1204d4=_0x5533,_0x25c9e5=_0xfb79f();while(!![]){try{const _0x4f2acc=parseInt(_0x1204d4(0x1ed))/0x1*(parseInt(_0x1204d4(0x23c))/0x2)+parseInt(_0x1204d4(0x1f8))/0x3+parseInt(_0x1204d4(0x1fe))/0x4*(-parseInt(_0x1204d4(0x212))/0x5)+parseInt(_0x1204d4(0x1eb))/0x6*(parseInt(_0x1204d4(0x1e9))/0x7)+-parseInt(_0x1204d4(0x215))/0x8+-parseInt(_0x1204d4(0x1fd))/0x9+parseInt(_0x1204d4(0x1fc))/0xa;if(_0x4f2acc===_0x33210c)break;else _0x25c9e5['push'](_0x25c9e5['shift']());}catch(_0x4c0f23){_0x25c9e5['push'](_0x25c9e5['shift']());}}}(_0x51a9,0x31991));import{CommentService as _0x494070,CollaborationSessionService as _0x186ef6,UniverCollaborationClientPlugin as _0x82913d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1b76e0}from'@univerjs-pro/license';import{dayjs as _0x118231,UserManagerService as _0x2ebc4d,Inject as _0x58577d,Injector as _0x418b1b,Disposable as _0x50a167,CustomRangeType as _0x28d5b5,UniverInstanceType as _0x12b441,DependentOn as _0x1e955f,IConfigService as _0x30ca1b,Plugin as _0x10008e,merge as _0xccd7ac}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x23fc9b}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x303d6b,IThreadCommentDataSourceService as _0x4babee}from'@univerjs/thread-comment';import{bufferTime as _0x2e4209}from'rxjs';import{HTTPService as _0x1f697f}from'@univerjs/network';function _0x51a9(){const _0x202810=['COMMENT','addComment','/solved','704105PAvUQt','/add','resolved','1157384CkixYI','rangeType','getMemberID','setConfig','replyId','_commentService','disposeWithMe','Delete','size','addUser','/list','/reply','_initUserSync','pluginName','length','threadId','payload','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_injector','deleteComment','Solve','_httpService','defineProperty','resolveComment','get','_init','Unknown','dataSource','requireSession','replies','solved','reply','updateComment','Add','find','_userService','symbol','body','182lwBayO','commentUpdate$','createTimestamp','_threadCommentDataSource','forEach','Edit','comment','customRanges','getComment','Reply','rangeId','userId','post','_threadCommentDataSourceService','personId','userID','onStarting','7042yjqATK','pipe','792zpVaCo','stringify','1979cZwbkj','_threadCommentModel','users','getOwnPropertyDescriptor','user','Solved','UNRECOGNIZED','root','comments','error','/edit','436962nOtTxX','_sessionService','ref','onReady','666110VluHHY','328491HEnHPx','4TdobPT','code','/universer-api/comment/unit/','map','getUnit','_configService','UNIVER_UNKNOWN','filter','listComments','unitId','type','format','parse','_config','OpenOrReOpen','delete','subscribe'];_0x51a9=function(){return _0x202810;};return _0x51a9();}const W=_0x1bdfca(0x227);var I=(_0x4f2f5f=>(_0x4f2f5f[_0x4f2f5f['OpenOrReOpen']=0x0]=_0x1bdfca(0x20c),_0x4f2f5f[_0x4f2f5f['Solved']=0x1]=_0x1bdfca(0x1f2),_0x4f2f5f[_0x4f2f5f[_0x1bdfca(0x1f3)]=-0x1]=_0x1bdfca(0x1f3),_0x4f2f5f))(I||{}),v=(_0x52c843=>(_0x52c843[_0x52c843[_0x1bdfca(0x230)]=0x0]=_0x1bdfca(0x230),_0x52c843[_0x52c843[_0x1bdfca(0x237)]=0x1]=_0x1bdfca(0x237),_0x52c843[_0x52c843['Reply']=0x2]='Reply',_0x52c843[_0x52c843['Edit']=0x3]=_0x1bdfca(0x241),_0x52c843[_0x52c843[_0x1bdfca(0x21c)]=0x4]=_0x1bdfca(0x21c),_0x52c843[_0x52c843[_0x1bdfca(0x22a)]=0x5]='Solve',_0x52c843[_0x52c843[_0x1bdfca(0x1f3)]=-0x1]=_0x1bdfca(0x1f3),_0x52c843))(v||{});const y=_0x55878a=>_0x118231(new Date(+_0x55878a))[_0x1bdfca(0x209)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x480652,_0x5d149f)=>{const _0x2fc9a2=_0x1bdfca,_0x3a3a9a=_0x480652[_0x2fc9a2(0x22e)](_0x2ebc4d),_0x422c7a=_0x480652[_0x2fc9a2(0x22e)](_0x1f697f);_0x5d149f[_0x2fc9a2(0x240)](_0x5d678a=>{const _0x544cce=_0x2fc9a2;_0x3a3a9a['getUser'](_0x5d678a)&&_0x5d149f[_0x544cce(0x20d)](_0x5d678a);}),_0x5d149f[_0x2fc9a2(0x21d)]&&(await _0x422c7a[_0x2fc9a2(0x22e)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5d149f]}}))['body']['users'][_0x2fc9a2(0x240)](_0x1153b9=>{_0x1153b9&&_0x3a3a9a['addUser'](_0x1153b9);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x46f9ee,_0x3b2c16,_0x284fa3,_0x46b68f)=>{const _0xe280e7=_0x1bdfca;for(var _0x506c00=_0x46b68f>0x1?void 0x0:_0x46b68f?K(_0x3b2c16,_0x284fa3):_0x3b2c16,_0x161513=_0x46f9ee[_0xe280e7(0x223)]-0x1,_0x1b6630;_0x161513>=0x0;_0x161513--)(_0x1b6630=_0x46f9ee[_0x161513])&&(_0x506c00=_0x1b6630(_0x506c00)||_0x506c00);return _0x506c00;},p=(_0x14278c,_0x4403c4)=>(_0x2859df,_0x39e467)=>_0x4403c4(_0x2859df,_0x39e467,_0x14278c);let _=class extends _0x50a167{constructor(_0x51b89c,_0x1f169c,_0x5f3951,_0xffe9c6){const _0x8f5bf9=_0x1bdfca;super(),this[_0x8f5bf9(0x21a)]=_0x51b89c,this['_threadCommentModel']=_0x1f169c,this[_0x8f5bf9(0x239)]=_0x5f3951,this[_0x8f5bf9(0x228)]=_0xffe9c6,this[_0x8f5bf9(0x22f)](),this[_0x8f5bf9(0x221)]();}[_0x1bdfca(0x221)](){const _0x158fa4=_0x1bdfca;this[_0x158fa4(0x21b)](this['_threadCommentModel'][_0x158fa4(0x23d)][_0x158fa4(0x1ea)](_0x2e4209(0x10))[_0x158fa4(0x20e)](_0xc6c4bb=>{const _0x2cf343=new Set();_0xc6c4bb['forEach'](_0x473dea=>{const _0x483fb6=_0x5533;switch(_0x473dea[_0x483fb6(0x208)]){case'add':{const _0xc44d10=_0x473dea[_0x483fb6(0x225)][_0x483fb6(0x24a)];_0x2cf343['add'](_0xc44d10);break;}}}),B(this['_injector'],_0x2cf343);}));}[_0x1bdfca(0x22f)](){const _0x7bf000=_0x1bdfca;this[_0x7bf000(0x21b)](this[_0x7bf000(0x21a)][_0x7bf000(0x23d)][_0x7bf000(0x20e)](async _0x49ac9e=>{const _0x9491aa=_0x7bf000;var _0x49f8e3,_0x4ed501,_0xcc6137,_0x3fc950;const _0x28f568=(_0x49f8e3=this[_0x9491aa(0x1ee)][_0x9491aa(0x202)](_0x49ac9e[_0x9491aa(0x207)])[_0x9491aa(0x238)](_0x5b532f=>_0x5b532f[_0x9491aa(0x224)]===_0x49ac9e[_0x9491aa(0x224)]))==null?void 0x0:_0x49f8e3[_0x9491aa(0x1f4)];if(!_0x28f568)return;const {unitId:_0x1ed3e5,subUnitId:_0x4d723e}=_0x28f568;switch(_0x49ac9e['user']&&this['_userService'][_0x9491aa(0x21e)](_0x49ac9e[_0x9491aa(0x1f1)]),_0x49ac9e[_0x9491aa(0x208)]){case v['Add']:break;case v[_0x9491aa(0x245)]:{this[_0x9491aa(0x1ee)][_0x9491aa(0x210)](_0x1ed3e5,_0x4d723e,{'unitId':_0x1ed3e5,'subUnitId':_0x4d723e,'ref':'','id':_0x49ac9e[_0x9491aa(0x219)],'dT':y(+_0x49ac9e[_0x9491aa(0x23e)]),'threadId':_0x49ac9e['threadId'],'personId':(_0xcc6137=(_0x4ed501=_0x49ac9e[_0x9491aa(0x1f1)])==null?void 0x0:_0x4ed501['userID'])!=null?_0xcc6137:_0x49ac9e[_0x9491aa(0x247)],'text':JSON[_0x9491aa(0x20a)](_0x49ac9e[_0x9491aa(0x226)]),'parentId':_0x28f568['id']});break;}case v[_0x9491aa(0x21c)]:{const _0x407009=this[_0x9491aa(0x1ee)][_0x9491aa(0x244)](_0x1ed3e5,_0x4d723e,_0x49ac9e['replyId']);_0x407009&&_0x407009['parentId']&&this['_threadCommentModel'][_0x9491aa(0x229)](_0x1ed3e5,_0x4d723e,_0x49ac9e['replyId']);break;}case v['Edit']:{this[_0x9491aa(0x1ee)]['updateComment'](_0x1ed3e5,_0x4d723e,{'commentId':_0x49ac9e[_0x9491aa(0x219)],'text':JSON['parse'](_0x49ac9e[_0x9491aa(0x226)])});break;}case v[_0x9491aa(0x22a)]:{const _0x42e457=(_0x3fc950=this[_0x9491aa(0x1ee)][_0x9491aa(0x202)](_0x49ac9e[_0x9491aa(0x207)])[_0x9491aa(0x238)](_0x58225e=>_0x58225e[_0x9491aa(0x224)]===_0x49ac9e[_0x9491aa(0x224)]))==null?void 0x0:_0x3fc950['root'];_0x42e457&&this['_threadCommentModel'][_0x9491aa(0x22d)](_0x1ed3e5,_0x4d723e,_0x42e457['id'],_0x49ac9e['solved']===I[_0x9491aa(0x1f2)]);break;}}}));}};_=V([p(0x0,_0x58577d(_0x494070)),p(0x1,_0x58577d(_0x303d6b)),p(0x2,_0x58577d(_0x2ebc4d)),p(0x3,_0x58577d(_0x418b1b))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x1bdfca(0x1f0)],Q=(_0x409e4a,_0x4c9b9e,_0x5c2103,_0x97cd34)=>{const _0x47b94b=_0x1bdfca;for(var _0x8ee573=_0x97cd34>0x1?void 0x0:_0x97cd34?k(_0x4c9b9e,_0x5c2103):_0x4c9b9e,_0x5bfe73=_0x409e4a[_0x47b94b(0x223)]-0x1,_0x19e3ce;_0x5bfe73>=0x0;_0x5bfe73--)(_0x19e3ce=_0x409e4a[_0x5bfe73])&&(_0x8ee573=_0x19e3ce(_0x8ee573)||_0x8ee573);return _0x8ee573;},b=(_0x2fca9f,_0x283211)=>(_0xba5294,_0x245891)=>_0x283211(_0xba5294,_0x245891,_0x2fca9f);function X(_0x1095fd,_0x4ab505){const _0x4500c9=_0x1bdfca,_0x24582c=_0x1095fd[_0x4500c9(0x233)][0x0];return{..._0x4ab505,'id':_0x24582c[_0x4500c9(0x219)],'resolved':_0x1095fd[_0x4500c9(0x234)]===0x1,'dT':y(_0x24582c[_0x4500c9(0x23e)]),'personId':_0x24582c[_0x4500c9(0x247)],'threadId':_0x24582c[_0x4500c9(0x224)]};}function _0x5533(_0x4a58e5,_0x3cb8b5){_0x4a58e5=_0x4a58e5-0x1e8;const _0x51a9e6=_0x51a9();let _0x5533ca=_0x51a9e6[_0x4a58e5];return _0x5533ca;}function ee(_0x36163f,_0x50ee22,_0x3a19d6){const _0x442797=_0x1bdfca;var _0x4fddae,_0xd0e08c;if(((_0xd0e08c=(_0x4fddae=_0x36163f==null?void 0x0:_0x36163f[_0x442797(0x233)])==null?void 0x0:_0x4fddae[_0x442797(0x223)])!=null?_0xd0e08c:0x0)>0x0){const _0x448bad=(_0x6411f2,_0x57cfe7)=>({'id':_0x6411f2['replyId'],'threadId':_0x6411f2['threadId'],'dT':y(_0x6411f2['createTimestamp']),'personId':_0x6411f2[_0x442797(0x247)],'resolved':_0x36163f[_0x442797(0x234)]===I[_0x442797(0x1f2)],'unitId':_0x50ee22,'subUnitId':_0x3a19d6,'text':JSON[_0x442797(0x20a)](_0x6411f2[_0x442797(0x226)]),'parentId':_0x57cfe7}),_0x3fd306=_0x448bad(_0x36163f[_0x442797(0x233)][0x0]);return{..._0x3fd306,'children':_0x36163f['replies']['slice'](0x1)[_0x442797(0x201)](_0x42ba3d=>_0x448bad(_0x42ba3d,_0x3fd306['id']))};}return null;}let S=class{constructor(_0x5d841f,_0x1a3dae,_0x1f07da){const _0x3e5caf=_0x1bdfca;this['_httpService']=_0x5d841f,this[_0x3e5caf(0x239)]=_0x1a3dae,this[_0x3e5caf(0x1f9)]=_0x1f07da;}async[_0x1bdfca(0x210)](_0x463269){const _0x202c68=_0x1bdfca;var _0x42cd19,_0x1729b8;const {parentId:_0x123226,unitId:_0x85051f,text:_0x5da09d,threadId:_0x26a88a}=_0x463269,_0x551e15=(_0x1729b8=(_0x42cd19=_0x5da09d[_0x202c68(0x243)])==null?void 0x0:_0x42cd19[_0x202c68(0x205)](_0x17b1c8=>_0x17b1c8[_0x202c68(0x216)]===_0x28d5b5[_0x202c68(0x20f)])[_0x202c68(0x201)](_0x28203b=>_0x28203b['rangeId']))!=null?_0x1729b8:[],_0x524a5b=JSON['stringify'](_0x5da09d),_0xe5e07f=(await this[_0x202c68(0x1f9)][_0x202c68(0x232)](_0x85051f))[_0x202c68(0x217)]();if(_0x123226){const _0x3e817b={'memberId':_0xe5e07f,'unitId':_0x85051f,'content':_0x524a5b,'mention':_0x551e15,'threadId':_0x26a88a},_0x51ac0b=(await this[_0x202c68(0x22b)][_0x202c68(0x248)](_0x202c68(0x200)+_0x85051f+_0x202c68(0x220),{'body':_0x3e817b}))[_0x202c68(0x23b)][_0x202c68(0x235)];return{..._0x463269,'id':_0x51ac0b[_0x202c68(0x219)],'dT':_0x118231(+_0x51ac0b[_0x202c68(0x23e)])[_0x202c68(0x209)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x51ac0b['userId']};}else{const _0x25d323={'memberId':_0xe5e07f,'unitId':_0x85051f,'content':_0x524a5b,'mention':_0x551e15},_0x3b2385=await this[_0x202c68(0x22b)][_0x202c68(0x248)](_0x202c68(0x200)+_0x85051f+_0x202c68(0x213),{'body':_0x25d323});return X(_0x3b2385[_0x202c68(0x23b)][_0x202c68(0x242)],_0x463269);}}async[_0x1bdfca(0x236)](_0x4b6f50){const _0x260d75=_0x1bdfca;var _0x7df826,_0x2beab6;const {text:_0x306ec8,unitId:_0x4c0d43}=_0x4b6f50,_0x329961=(_0x2beab6=(_0x7df826=_0x306ec8[_0x260d75(0x243)])==null?void 0x0:_0x7df826['filter'](_0xef5cae=>_0xef5cae[_0x260d75(0x216)]===_0x28d5b5[_0x260d75(0x20f)])['map'](_0x45152f=>_0x45152f[_0x260d75(0x246)]))!=null?_0x2beab6:[],_0x351942=JSON[_0x260d75(0x1ec)](_0x306ec8),_0x28f864=_0x4b6f50[_0x260d75(0x224)],_0x132bdd=_0x4b6f50['id'],_0x115f99={'memberId':(await this['_sessionService'][_0x260d75(0x232)](_0x4c0d43))[_0x260d75(0x217)](),'unitId':_0x4c0d43,'threadId':_0x28f864,'mention':_0x329961,'content':_0x351942,'replyId':_0x132bdd},_0x340398=await this[_0x260d75(0x22b)][_0x260d75(0x248)](_0x260d75(0x200)+_0x4c0d43+_0x260d75(0x1f7),{'body':_0x115f99});return!_0x340398['body']['error']||_0x340398[_0x260d75(0x23b)][_0x260d75(0x1f6)][_0x260d75(0x1ff)]===0x1;}async['resolveComment'](_0x25576f){const _0x1512e7=_0x1bdfca,{unitId:_0x312032}=_0x25576f,_0x275c9c=_0x25576f[_0x1512e7(0x224)],_0x94f4bb={'memberId':this[_0x1512e7(0x239)]['getCurrentUser']()[_0x1512e7(0x24b)],'unitId':_0x312032,'threadId':_0x275c9c,'solved':_0x25576f[_0x1512e7(0x214)]?I['Solved']:I[_0x1512e7(0x20c)]},_0x2c25e3=await this[_0x1512e7(0x22b)][_0x1512e7(0x248)](_0x1512e7(0x200)+_0x312032+_0x1512e7(0x211),{'body':_0x94f4bb});return!_0x2c25e3[_0x1512e7(0x23b)][_0x1512e7(0x1f6)]||_0x2c25e3[_0x1512e7(0x23b)][_0x1512e7(0x1f6)][_0x1512e7(0x1ff)]===0x1;}async[_0x1bdfca(0x229)](_0x59fa22,_0x434a33,_0x1bac73,_0x23c309){const _0x50abe8=_0x1bdfca,_0x79e59b={'memberId':(await this[_0x50abe8(0x1f9)][_0x50abe8(0x232)](_0x59fa22))[_0x50abe8(0x217)](),'threadId':_0x1bac73,'replyId':_0x23c309,'unitId':_0x59fa22},_0x56ecca=await this[_0x50abe8(0x22b)][_0x50abe8(0x248)](_0x50abe8(0x200)+_0x59fa22+'/delete',{'body':_0x79e59b});return!_0x56ecca[_0x50abe8(0x23b)]['error']||_0x56ecca[_0x50abe8(0x23b)][_0x50abe8(0x1f6)][_0x50abe8(0x1ff)]===0x1;}async[_0x1bdfca(0x206)](_0x17d402,_0x45630b,_0x3adc83){const _0x579531=_0x1bdfca,_0x4c4611={'unitId':_0x17d402,'threadId':_0x3adc83},_0x534a10=await this[_0x579531(0x22b)][_0x579531(0x248)]('/universer-api/comment/unit/'+_0x17d402+_0x579531(0x21f),{'body':_0x4c4611}),_0x3182f6=_0x3adc83[_0x579531(0x201)](_0xe5d033=>ee(_0x534a10['body'][_0x579531(0x1f5)][_0xe5d033],_0x17d402,_0x45630b))[_0x579531(0x205)](Boolean);return Object['values'](_0x534a10[_0x579531(0x23b)][_0x579531(0x1ef)])['forEach'](_0x2a4fa7=>{const _0x3367db=_0x579531;this['_userService'][_0x3367db(0x21e)](_0x2a4fa7);}),_0x3182f6;}['saveCommentToSnapshot'](_0x55ccf7){const _0x1a6028=_0x1bdfca;return{'id':_0x55ccf7['id'],'threadId':_0x55ccf7[_0x1a6028(0x224)],'ref':_0x55ccf7[_0x1a6028(0x1fa)]};}};S=Q([b(0x0,_0x58577d(_0x1f697f)),b(0x1,_0x58577d(_0x2ebc4d)),b(0x2,_0x58577d(_0x186ef6))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x38ca22,_0x45d8e2,_0x50a57a,_0x416bda)=>{const _0x925489=_0x1bdfca;for(var _0xf86d79=_0x416bda>0x1?void 0x0:_0x416bda?re(_0x45d8e2,_0x50a57a):_0x45d8e2,_0x3dc5ca=_0x38ca22[_0x925489(0x223)]-0x1,_0x13cefe;_0x3dc5ca>=0x0;_0x3dc5ca--)(_0x13cefe=_0x38ca22[_0x3dc5ca])&&(_0xf86d79=_0x13cefe(_0xf86d79)||_0xf86d79);return _0xf86d79;},M=(_0x4050a9,_0x4945f5)=>(_0x47a348,_0x4b5022)=>_0x4945f5(_0x47a348,_0x4b5022,_0x4050a9);let f=class extends _0x50a167{constructor(_0x571375,_0x166e60){const _0x4d30a3=_0x1bdfca;super(),this[_0x4d30a3(0x249)]=_0x571375,this[_0x4d30a3(0x23f)]=_0x166e60,this['_initDataSource']();}['_initDataSource'](){const _0x46dca6=_0x1bdfca;this[_0x46dca6(0x249)][_0x46dca6(0x231)]=this['_threadCommentDataSource'],this[_0x46dca6(0x249)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x4babee),M(0x1,_0x58577d(S))],f);var se=Object[_0x1bdfca(0x22c)],oe=Object[_0x1bdfca(0x1f0)],ne=(_0x470bdd,_0x5f25e9,_0x523605)=>_0x5f25e9 in _0x470bdd?se(_0x470bdd,_0x5f25e9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x523605}):_0x470bdd[_0x5f25e9]=_0x523605,ie=(_0x306133,_0xd18e40,_0x35b6d1,_0x5bf0ba)=>{const _0x4a7b1c=_0x1bdfca;for(var _0x33a395=_0x5bf0ba>0x1?void 0x0:_0x5bf0ba?oe(_0xd18e40,_0x35b6d1):_0xd18e40,_0x17d2dc=_0x306133[_0x4a7b1c(0x223)]-0x1,_0x3fd7fa;_0x17d2dc>=0x0;_0x17d2dc--)(_0x3fd7fa=_0x306133[_0x17d2dc])&&(_0x33a395=_0x3fd7fa(_0x33a395)||_0x33a395);return _0x33a395;},N=(_0x19f5c4,_0x6fe8d5)=>(_0x26bdb4,_0x54669f)=>_0x6fe8d5(_0x26bdb4,_0x54669f,_0x19f5c4),$=(_0x4ccd71,_0x1bfa1f,_0x16bd86)=>ne(_0x4ccd71,typeof _0x1bfa1f!=_0x1bdfca(0x23a)?_0x1bfa1f+'':_0x1bfa1f,_0x16bd86);let g=class extends _0x10008e{constructor(_0x37fa83=O,_0x265c42,_0x50f65e){const _0x579b6a=_0x1bdfca;super(),this[_0x579b6a(0x20b)]=_0x37fa83,this['_injector']=_0x265c42,this[_0x579b6a(0x203)]=_0x50f65e;const {..._0x47930d}=_0xccd7ac({},O,this[_0x579b6a(0x20b)]);this[_0x579b6a(0x203)][_0x579b6a(0x218)](z,_0x47930d);}[_0x1bdfca(0x1e8)](){const _0x1dcd0a=_0x1bdfca;[[S],[f],[_]][_0x1dcd0a(0x240)](_0x14fcc3=>{const _0x55e342=_0x1dcd0a;this[_0x55e342(0x228)]['add'](_0x14fcc3);});}[_0x1bdfca(0x1fb)](){const _0x581d00=_0x1bdfca;this[_0x581d00(0x228)][_0x581d00(0x22e)](f),this[_0x581d00(0x228)][_0x581d00(0x22e)](_);}};$(g,_0x1bdfca(0x222),W),$(g,'type',_0x12b441[_0x1bdfca(0x204)]),g=ie([_0x1e955f(_0x23fc9b,_0x82913d,_0x1b76e0),N(0x1,_0x58577d(_0x418b1b)),N(0x2,_0x30ca1b)],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 _0x1bdfca=_0x5533;(function(_0xfb79f,_0x33210c){const _0x1204d4=_0x5533,_0x25c9e5=_0xfb79f();while(!![]){try{const _0x4f2acc=parseInt(_0x1204d4(0x1ed))/0x1*(parseInt(_0x1204d4(0x23c))/0x2)+parseInt(_0x1204d4(0x1f8))/0x3+parseInt(_0x1204d4(0x1fe))/0x4*(-parseInt(_0x1204d4(0x212))/0x5)+parseInt(_0x1204d4(0x1eb))/0x6*(parseInt(_0x1204d4(0x1e9))/0x7)+-parseInt(_0x1204d4(0x215))/0x8+-parseInt(_0x1204d4(0x1fd))/0x9+parseInt(_0x1204d4(0x1fc))/0xa;if(_0x4f2acc===_0x33210c)break;else _0x25c9e5['push'](_0x25c9e5['shift']());}catch(_0x4c0f23){_0x25c9e5['push'](_0x25c9e5['shift']());}}}(_0x51a9,0x31991));import{CommentService as _0x494070,CollaborationSessionService as _0x186ef6,UniverCollaborationClientPlugin as _0x82913d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1b76e0}from'@univerjs-pro/license';import{dayjs as _0x118231,UserManagerService as _0x2ebc4d,Inject as _0x58577d,Injector as _0x418b1b,Disposable as _0x50a167,CustomRangeType as _0x28d5b5,UniverInstanceType as _0x12b441,DependentOn as _0x1e955f,IConfigService as _0x30ca1b,Plugin as _0x10008e,merge as _0xccd7ac}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x23fc9b}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x303d6b,IThreadCommentDataSourceService as _0x4babee}from'@univerjs/thread-comment';import{bufferTime as _0x2e4209}from'rxjs';import{HTTPService as _0x1f697f}from'@univerjs/network';function _0x51a9(){const _0x202810=['COMMENT','addComment','/solved','704105PAvUQt','/add','resolved','1157384CkixYI','rangeType','getMemberID','setConfig','replyId','_commentService','disposeWithMe','Delete','size','addUser','/list','/reply','_initUserSync','pluginName','length','threadId','payload','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_injector','deleteComment','Solve','_httpService','defineProperty','resolveComment','get','_init','Unknown','dataSource','requireSession','replies','solved','reply','updateComment','Add','find','_userService','symbol','body','182lwBayO','commentUpdate$','createTimestamp','_threadCommentDataSource','forEach','Edit','comment','customRanges','getComment','Reply','rangeId','userId','post','_threadCommentDataSourceService','personId','userID','onStarting','7042yjqATK','pipe','792zpVaCo','stringify','1979cZwbkj','_threadCommentModel','users','getOwnPropertyDescriptor','user','Solved','UNRECOGNIZED','root','comments','error','/edit','436962nOtTxX','_sessionService','ref','onReady','666110VluHHY','328491HEnHPx','4TdobPT','code','/universer-api/comment/unit/','map','getUnit','_configService','UNIVER_UNKNOWN','filter','listComments','unitId','type','format','parse','_config','OpenOrReOpen','delete','subscribe'];_0x51a9=function(){return _0x202810;};return _0x51a9();}const W=_0x1bdfca(0x227);var I=(_0x4f2f5f=>(_0x4f2f5f[_0x4f2f5f['OpenOrReOpen']=0x0]=_0x1bdfca(0x20c),_0x4f2f5f[_0x4f2f5f['Solved']=0x1]=_0x1bdfca(0x1f2),_0x4f2f5f[_0x4f2f5f[_0x1bdfca(0x1f3)]=-0x1]=_0x1bdfca(0x1f3),_0x4f2f5f))(I||{}),v=(_0x52c843=>(_0x52c843[_0x52c843[_0x1bdfca(0x230)]=0x0]=_0x1bdfca(0x230),_0x52c843[_0x52c843[_0x1bdfca(0x237)]=0x1]=_0x1bdfca(0x237),_0x52c843[_0x52c843['Reply']=0x2]='Reply',_0x52c843[_0x52c843['Edit']=0x3]=_0x1bdfca(0x241),_0x52c843[_0x52c843[_0x1bdfca(0x21c)]=0x4]=_0x1bdfca(0x21c),_0x52c843[_0x52c843[_0x1bdfca(0x22a)]=0x5]='Solve',_0x52c843[_0x52c843[_0x1bdfca(0x1f3)]=-0x1]=_0x1bdfca(0x1f3),_0x52c843))(v||{});const y=_0x55878a=>_0x118231(new Date(+_0x55878a))[_0x1bdfca(0x209)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x480652,_0x5d149f)=>{const _0x2fc9a2=_0x1bdfca,_0x3a3a9a=_0x480652[_0x2fc9a2(0x22e)](_0x2ebc4d),_0x422c7a=_0x480652[_0x2fc9a2(0x22e)](_0x1f697f);_0x5d149f[_0x2fc9a2(0x240)](_0x5d678a=>{const _0x544cce=_0x2fc9a2;_0x3a3a9a['getUser'](_0x5d678a)&&_0x5d149f[_0x544cce(0x20d)](_0x5d678a);}),_0x5d149f[_0x2fc9a2(0x21d)]&&(await _0x422c7a[_0x2fc9a2(0x22e)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5d149f]}}))['body']['users'][_0x2fc9a2(0x240)](_0x1153b9=>{_0x1153b9&&_0x3a3a9a['addUser'](_0x1153b9);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x46f9ee,_0x3b2c16,_0x284fa3,_0x46b68f)=>{const _0xe280e7=_0x1bdfca;for(var _0x506c00=_0x46b68f>0x1?void 0x0:_0x46b68f?K(_0x3b2c16,_0x284fa3):_0x3b2c16,_0x161513=_0x46f9ee[_0xe280e7(0x223)]-0x1,_0x1b6630;_0x161513>=0x0;_0x161513--)(_0x1b6630=_0x46f9ee[_0x161513])&&(_0x506c00=_0x1b6630(_0x506c00)||_0x506c00);return _0x506c00;},p=(_0x14278c,_0x4403c4)=>(_0x2859df,_0x39e467)=>_0x4403c4(_0x2859df,_0x39e467,_0x14278c);let _=class extends _0x50a167{constructor(_0x51b89c,_0x1f169c,_0x5f3951,_0xffe9c6){const _0x8f5bf9=_0x1bdfca;super(),this[_0x8f5bf9(0x21a)]=_0x51b89c,this['_threadCommentModel']=_0x1f169c,this[_0x8f5bf9(0x239)]=_0x5f3951,this[_0x8f5bf9(0x228)]=_0xffe9c6,this[_0x8f5bf9(0x22f)](),this[_0x8f5bf9(0x221)]();}[_0x1bdfca(0x221)](){const _0x158fa4=_0x1bdfca;this[_0x158fa4(0x21b)](this['_threadCommentModel'][_0x158fa4(0x23d)][_0x158fa4(0x1ea)](_0x2e4209(0x10))[_0x158fa4(0x20e)](_0xc6c4bb=>{const _0x2cf343=new Set();_0xc6c4bb['forEach'](_0x473dea=>{const _0x483fb6=_0x5533;switch(_0x473dea[_0x483fb6(0x208)]){case'add':{const _0xc44d10=_0x473dea[_0x483fb6(0x225)][_0x483fb6(0x24a)];_0x2cf343['add'](_0xc44d10);break;}}}),B(this['_injector'],_0x2cf343);}));}[_0x1bdfca(0x22f)](){const _0x7bf000=_0x1bdfca;this[_0x7bf000(0x21b)](this[_0x7bf000(0x21a)][_0x7bf000(0x23d)][_0x7bf000(0x20e)](async _0x49ac9e=>{const _0x9491aa=_0x7bf000;var _0x49f8e3,_0x4ed501,_0xcc6137,_0x3fc950;const _0x28f568=(_0x49f8e3=this[_0x9491aa(0x1ee)][_0x9491aa(0x202)](_0x49ac9e[_0x9491aa(0x207)])[_0x9491aa(0x238)](_0x5b532f=>_0x5b532f[_0x9491aa(0x224)]===_0x49ac9e[_0x9491aa(0x224)]))==null?void 0x0:_0x49f8e3[_0x9491aa(0x1f4)];if(!_0x28f568)return;const {unitId:_0x1ed3e5,subUnitId:_0x4d723e}=_0x28f568;switch(_0x49ac9e['user']&&this['_userService'][_0x9491aa(0x21e)](_0x49ac9e[_0x9491aa(0x1f1)]),_0x49ac9e[_0x9491aa(0x208)]){case v['Add']:break;case v[_0x9491aa(0x245)]:{this[_0x9491aa(0x1ee)][_0x9491aa(0x210)](_0x1ed3e5,_0x4d723e,{'unitId':_0x1ed3e5,'subUnitId':_0x4d723e,'ref':'','id':_0x49ac9e[_0x9491aa(0x219)],'dT':y(+_0x49ac9e[_0x9491aa(0x23e)]),'threadId':_0x49ac9e['threadId'],'personId':(_0xcc6137=(_0x4ed501=_0x49ac9e[_0x9491aa(0x1f1)])==null?void 0x0:_0x4ed501['userID'])!=null?_0xcc6137:_0x49ac9e[_0x9491aa(0x247)],'text':JSON[_0x9491aa(0x20a)](_0x49ac9e[_0x9491aa(0x226)]),'parentId':_0x28f568['id']});break;}case v[_0x9491aa(0x21c)]:{const _0x407009=this[_0x9491aa(0x1ee)][_0x9491aa(0x244)](_0x1ed3e5,_0x4d723e,_0x49ac9e['replyId']);_0x407009&&_0x407009['parentId']&&this['_threadCommentModel'][_0x9491aa(0x229)](_0x1ed3e5,_0x4d723e,_0x49ac9e['replyId']);break;}case v['Edit']:{this[_0x9491aa(0x1ee)]['updateComment'](_0x1ed3e5,_0x4d723e,{'commentId':_0x49ac9e[_0x9491aa(0x219)],'text':JSON['parse'](_0x49ac9e[_0x9491aa(0x226)])});break;}case v[_0x9491aa(0x22a)]:{const _0x42e457=(_0x3fc950=this[_0x9491aa(0x1ee)][_0x9491aa(0x202)](_0x49ac9e[_0x9491aa(0x207)])[_0x9491aa(0x238)](_0x58225e=>_0x58225e[_0x9491aa(0x224)]===_0x49ac9e[_0x9491aa(0x224)]))==null?void 0x0:_0x3fc950['root'];_0x42e457&&this['_threadCommentModel'][_0x9491aa(0x22d)](_0x1ed3e5,_0x4d723e,_0x42e457['id'],_0x49ac9e['solved']===I[_0x9491aa(0x1f2)]);break;}}}));}};_=V([p(0x0,_0x58577d(_0x494070)),p(0x1,_0x58577d(_0x303d6b)),p(0x2,_0x58577d(_0x2ebc4d)),p(0x3,_0x58577d(_0x418b1b))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x1bdfca(0x1f0)],Q=(_0x409e4a,_0x4c9b9e,_0x5c2103,_0x97cd34)=>{const _0x47b94b=_0x1bdfca;for(var _0x8ee573=_0x97cd34>0x1?void 0x0:_0x97cd34?k(_0x4c9b9e,_0x5c2103):_0x4c9b9e,_0x5bfe73=_0x409e4a[_0x47b94b(0x223)]-0x1,_0x19e3ce;_0x5bfe73>=0x0;_0x5bfe73--)(_0x19e3ce=_0x409e4a[_0x5bfe73])&&(_0x8ee573=_0x19e3ce(_0x8ee573)||_0x8ee573);return _0x8ee573;},b=(_0x2fca9f,_0x283211)=>(_0xba5294,_0x245891)=>_0x283211(_0xba5294,_0x245891,_0x2fca9f);function X(_0x1095fd,_0x4ab505){const _0x4500c9=_0x1bdfca,_0x24582c=_0x1095fd[_0x4500c9(0x233)][0x0];return{..._0x4ab505,'id':_0x24582c[_0x4500c9(0x219)],'resolved':_0x1095fd[_0x4500c9(0x234)]===0x1,'dT':y(_0x24582c[_0x4500c9(0x23e)]),'personId':_0x24582c[_0x4500c9(0x247)],'threadId':_0x24582c[_0x4500c9(0x224)]};}function _0x5533(_0x4a58e5,_0x3cb8b5){_0x4a58e5=_0x4a58e5-0x1e8;const _0x51a9e6=_0x51a9();let _0x5533ca=_0x51a9e6[_0x4a58e5];return _0x5533ca;}function ee(_0x36163f,_0x50ee22,_0x3a19d6){const _0x442797=_0x1bdfca;var _0x4fddae,_0xd0e08c;if(((_0xd0e08c=(_0x4fddae=_0x36163f==null?void 0x0:_0x36163f[_0x442797(0x233)])==null?void 0x0:_0x4fddae[_0x442797(0x223)])!=null?_0xd0e08c:0x0)>0x0){const _0x448bad=(_0x6411f2,_0x57cfe7)=>({'id':_0x6411f2['replyId'],'threadId':_0x6411f2['threadId'],'dT':y(_0x6411f2['createTimestamp']),'personId':_0x6411f2[_0x442797(0x247)],'resolved':_0x36163f[_0x442797(0x234)]===I[_0x442797(0x1f2)],'unitId':_0x50ee22,'subUnitId':_0x3a19d6,'text':JSON[_0x442797(0x20a)](_0x6411f2[_0x442797(0x226)]),'parentId':_0x57cfe7}),_0x3fd306=_0x448bad(_0x36163f[_0x442797(0x233)][0x0]);return{..._0x3fd306,'children':_0x36163f['replies']['slice'](0x1)[_0x442797(0x201)](_0x42ba3d=>_0x448bad(_0x42ba3d,_0x3fd306['id']))};}return null;}let S=class{constructor(_0x5d841f,_0x1a3dae,_0x1f07da){const _0x3e5caf=_0x1bdfca;this['_httpService']=_0x5d841f,this[_0x3e5caf(0x239)]=_0x1a3dae,this[_0x3e5caf(0x1f9)]=_0x1f07da;}async[_0x1bdfca(0x210)](_0x463269){const _0x202c68=_0x1bdfca;var _0x42cd19,_0x1729b8;const {parentId:_0x123226,unitId:_0x85051f,text:_0x5da09d,threadId:_0x26a88a}=_0x463269,_0x551e15=(_0x1729b8=(_0x42cd19=_0x5da09d[_0x202c68(0x243)])==null?void 0x0:_0x42cd19[_0x202c68(0x205)](_0x17b1c8=>_0x17b1c8[_0x202c68(0x216)]===_0x28d5b5[_0x202c68(0x20f)])[_0x202c68(0x201)](_0x28203b=>_0x28203b['rangeId']))!=null?_0x1729b8:[],_0x524a5b=JSON['stringify'](_0x5da09d),_0xe5e07f=(await this[_0x202c68(0x1f9)][_0x202c68(0x232)](_0x85051f))[_0x202c68(0x217)]();if(_0x123226){const _0x3e817b={'memberId':_0xe5e07f,'unitId':_0x85051f,'content':_0x524a5b,'mention':_0x551e15,'threadId':_0x26a88a},_0x51ac0b=(await this[_0x202c68(0x22b)][_0x202c68(0x248)](_0x202c68(0x200)+_0x85051f+_0x202c68(0x220),{'body':_0x3e817b}))[_0x202c68(0x23b)][_0x202c68(0x235)];return{..._0x463269,'id':_0x51ac0b[_0x202c68(0x219)],'dT':_0x118231(+_0x51ac0b[_0x202c68(0x23e)])[_0x202c68(0x209)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x51ac0b['userId']};}else{const _0x25d323={'memberId':_0xe5e07f,'unitId':_0x85051f,'content':_0x524a5b,'mention':_0x551e15},_0x3b2385=await this[_0x202c68(0x22b)][_0x202c68(0x248)](_0x202c68(0x200)+_0x85051f+_0x202c68(0x213),{'body':_0x25d323});return X(_0x3b2385[_0x202c68(0x23b)][_0x202c68(0x242)],_0x463269);}}async[_0x1bdfca(0x236)](_0x4b6f50){const _0x260d75=_0x1bdfca;var _0x7df826,_0x2beab6;const {text:_0x306ec8,unitId:_0x4c0d43}=_0x4b6f50,_0x329961=(_0x2beab6=(_0x7df826=_0x306ec8[_0x260d75(0x243)])==null?void 0x0:_0x7df826['filter'](_0xef5cae=>_0xef5cae[_0x260d75(0x216)]===_0x28d5b5[_0x260d75(0x20f)])['map'](_0x45152f=>_0x45152f[_0x260d75(0x246)]))!=null?_0x2beab6:[],_0x351942=JSON[_0x260d75(0x1ec)](_0x306ec8),_0x28f864=_0x4b6f50[_0x260d75(0x224)],_0x132bdd=_0x4b6f50['id'],_0x115f99={'memberId':(await this['_sessionService'][_0x260d75(0x232)](_0x4c0d43))[_0x260d75(0x217)](),'unitId':_0x4c0d43,'threadId':_0x28f864,'mention':_0x329961,'content':_0x351942,'replyId':_0x132bdd},_0x340398=await this[_0x260d75(0x22b)][_0x260d75(0x248)](_0x260d75(0x200)+_0x4c0d43+_0x260d75(0x1f7),{'body':_0x115f99});return!_0x340398['body']['error']||_0x340398[_0x260d75(0x23b)][_0x260d75(0x1f6)][_0x260d75(0x1ff)]===0x1;}async['resolveComment'](_0x25576f){const _0x1512e7=_0x1bdfca,{unitId:_0x312032}=_0x25576f,_0x275c9c=_0x25576f[_0x1512e7(0x224)],_0x94f4bb={'memberId':this[_0x1512e7(0x239)]['getCurrentUser']()[_0x1512e7(0x24b)],'unitId':_0x312032,'threadId':_0x275c9c,'solved':_0x25576f[_0x1512e7(0x214)]?I['Solved']:I[_0x1512e7(0x20c)]},_0x2c25e3=await this[_0x1512e7(0x22b)][_0x1512e7(0x248)](_0x1512e7(0x200)+_0x312032+_0x1512e7(0x211),{'body':_0x94f4bb});return!_0x2c25e3[_0x1512e7(0x23b)][_0x1512e7(0x1f6)]||_0x2c25e3[_0x1512e7(0x23b)][_0x1512e7(0x1f6)][_0x1512e7(0x1ff)]===0x1;}async[_0x1bdfca(0x229)](_0x59fa22,_0x434a33,_0x1bac73,_0x23c309){const _0x50abe8=_0x1bdfca,_0x79e59b={'memberId':(await this[_0x50abe8(0x1f9)][_0x50abe8(0x232)](_0x59fa22))[_0x50abe8(0x217)](),'threadId':_0x1bac73,'replyId':_0x23c309,'unitId':_0x59fa22},_0x56ecca=await this[_0x50abe8(0x22b)][_0x50abe8(0x248)](_0x50abe8(0x200)+_0x59fa22+'/delete',{'body':_0x79e59b});return!_0x56ecca[_0x50abe8(0x23b)]['error']||_0x56ecca[_0x50abe8(0x23b)][_0x50abe8(0x1f6)][_0x50abe8(0x1ff)]===0x1;}async[_0x1bdfca(0x206)](_0x17d402,_0x45630b,_0x3adc83){const _0x579531=_0x1bdfca,_0x4c4611={'unitId':_0x17d402,'threadId':_0x3adc83},_0x534a10=await this[_0x579531(0x22b)][_0x579531(0x248)]('/universer-api/comment/unit/'+_0x17d402+_0x579531(0x21f),{'body':_0x4c4611}),_0x3182f6=_0x3adc83[_0x579531(0x201)](_0xe5d033=>ee(_0x534a10['body'][_0x579531(0x1f5)][_0xe5d033],_0x17d402,_0x45630b))[_0x579531(0x205)](Boolean);return Object['values'](_0x534a10[_0x579531(0x23b)][_0x579531(0x1ef)])['forEach'](_0x2a4fa7=>{const _0x3367db=_0x579531;this['_userService'][_0x3367db(0x21e)](_0x2a4fa7);}),_0x3182f6;}['saveCommentToSnapshot'](_0x55ccf7){const _0x1a6028=_0x1bdfca;return{'id':_0x55ccf7['id'],'threadId':_0x55ccf7[_0x1a6028(0x224)],'ref':_0x55ccf7[_0x1a6028(0x1fa)]};}};S=Q([b(0x0,_0x58577d(_0x1f697f)),b(0x1,_0x58577d(_0x2ebc4d)),b(0x2,_0x58577d(_0x186ef6))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x38ca22,_0x45d8e2,_0x50a57a,_0x416bda)=>{const _0x925489=_0x1bdfca;for(var _0xf86d79=_0x416bda>0x1?void 0x0:_0x416bda?re(_0x45d8e2,_0x50a57a):_0x45d8e2,_0x3dc5ca=_0x38ca22[_0x925489(0x223)]-0x1,_0x13cefe;_0x3dc5ca>=0x0;_0x3dc5ca--)(_0x13cefe=_0x38ca22[_0x3dc5ca])&&(_0xf86d79=_0x13cefe(_0xf86d79)||_0xf86d79);return _0xf86d79;},M=(_0x4050a9,_0x4945f5)=>(_0x47a348,_0x4b5022)=>_0x4945f5(_0x47a348,_0x4b5022,_0x4050a9);let f=class extends _0x50a167{constructor(_0x571375,_0x166e60){const _0x4d30a3=_0x1bdfca;super(),this[_0x4d30a3(0x249)]=_0x571375,this[_0x4d30a3(0x23f)]=_0x166e60,this['_initDataSource']();}['_initDataSource'](){const _0x46dca6=_0x1bdfca;this[_0x46dca6(0x249)][_0x46dca6(0x231)]=this['_threadCommentDataSource'],this[_0x46dca6(0x249)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x4babee),M(0x1,_0x58577d(S))],f);var se=Object[_0x1bdfca(0x22c)],oe=Object[_0x1bdfca(0x1f0)],ne=(_0x470bdd,_0x5f25e9,_0x523605)=>_0x5f25e9 in _0x470bdd?se(_0x470bdd,_0x5f25e9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x523605}):_0x470bdd[_0x5f25e9]=_0x523605,ie=(_0x306133,_0xd18e40,_0x35b6d1,_0x5bf0ba)=>{const _0x4a7b1c=_0x1bdfca;for(var _0x33a395=_0x5bf0ba>0x1?void 0x0:_0x5bf0ba?oe(_0xd18e40,_0x35b6d1):_0xd18e40,_0x17d2dc=_0x306133[_0x4a7b1c(0x223)]-0x1,_0x3fd7fa;_0x17d2dc>=0x0;_0x17d2dc--)(_0x3fd7fa=_0x306133[_0x17d2dc])&&(_0x33a395=_0x3fd7fa(_0x33a395)||_0x33a395);return _0x33a395;},N=(_0x19f5c4,_0x6fe8d5)=>(_0x26bdb4,_0x54669f)=>_0x6fe8d5(_0x26bdb4,_0x54669f,_0x19f5c4),$=(_0x4ccd71,_0x1bfa1f,_0x16bd86)=>ne(_0x4ccd71,typeof _0x1bfa1f!=_0x1bdfca(0x23a)?_0x1bfa1f+'':_0x1bfa1f,_0x16bd86);let g=class extends _0x10008e{constructor(_0x37fa83=O,_0x265c42,_0x50f65e){const _0x579b6a=_0x1bdfca;super(),this[_0x579b6a(0x20b)]=_0x37fa83,this['_injector']=_0x265c42,this[_0x579b6a(0x203)]=_0x50f65e;const {..._0x47930d}=_0xccd7ac({},O,this[_0x579b6a(0x20b)]);this[_0x579b6a(0x203)][_0x579b6a(0x218)](z,_0x47930d);}[_0x1bdfca(0x1e8)](){const _0x1dcd0a=_0x1bdfca;[[S],[f],[_]][_0x1dcd0a(0x240)](_0x14fcc3=>{const _0x55e342=_0x1dcd0a;this[_0x55e342(0x228)]['add'](_0x14fcc3);});}[_0x1bdfca(0x1fb)](){const _0x581d00=_0x1bdfca;this[_0x581d00(0x228)][_0x581d00(0x22e)](f),this[_0x581d00(0x228)][_0x581d00(0x22e)](_);}};$(g,_0x1bdfca(0x222),W),$(g,'type',_0x12b441[_0x1bdfca(0x204)]),g=ie([_0x1e955f(_0x23fc9b,_0x82913d,_0x1b76e0),N(0x1,_0x58577d(_0x418b1b)),N(0x2,_0x30ca1b)],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 _0x22f4(){const _0x1d3983=['defineProperty','Module','dayjs','add','users','get','exports','1499643XxXRdt','Unknown','UniverThreadComment','forEach','addComment','/add','code','DependentOn','ThreadCommentModel','onReady','user','UniverInstanceType','syncUpdateMutationToColla','UniverCollaborationClientPlugin','_initUserSync','thread-comment-data-source.config','values','Disposable','1197588qDimJf','getComment','2058748deatBd','Injector','UniverThreadCommentUi','10hZQWMv','12490BzCUyP','userID','_threadCommentDataSourceService','@univerjs/network','find','@univerjs/thread-comment','subscribe','pipe','_userService','getOwnPropertyDescriptor','_httpService','payload','slice','_config','size','onStarting','Edit','_configService','addUser','Inject','/solved','/universer-api/comment/unit/','4597180klnwOa','Solved','rxjs','CustomRangeType','1ThehKj','requireSession','Plugin','_threadCommentModel','error','saveCommentToSnapshot','type','threadId','/reply','_commentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getUnit','/edit','Reply','getCurrentUser','format','parentId','Solve','merge','UniverProCollaborationClient','stringify','IThreadCommentDataSourceService','post','parse','YYYY/MM/DD\x20HH:mm','Add','dataSource','map','rangeType','unitId','/delete','8iixrzV','root','UniverThreadCommentDataSourcePlugin','4170330zPNEqT','ref','pluginName','Delete','body','updateComment','userId','resolveComment','OpenOrReOpen','_init','rangeId','function','amd','delete','customRanges','filter','_threadCommentDataSource','personId','createTimestamp','content','replies','comments','UNRECOGNIZED','disposeWithMe','44759bjYBvT','_injector','HTTPService','getMemberID','replyId','_sessionService','length','UniverProLicense','commentUpdate$','UserManagerService','solved','3025454ctsmZS'];_0x22f4=function(){return _0x1d3983;};return _0x22f4();}function _0x2946(_0x573ffd,_0xca1819){_0x573ffd=_0x573ffd-0x9e;const _0x22f4cc=_0x22f4();let _0x29467e=_0x22f4cc[_0x573ffd];return _0x29467e;}(function(_0x245cb3,_0xf6e2a){const _0x3166ff=_0x2946,_0x3e5d5a=_0x245cb3();while(!![]){try{const _0x2d1075=parseInt(_0x3166ff(0xb8))/0x1*(-parseInt(_0x3166ff(0xfd))/0x2)+-parseInt(_0x3166ff(0x117))/0x3+-parseInt(_0x3166ff(0x119))/0x4+-parseInt(_0x3166ff(0x11c))/0x5*(parseInt(_0x3166ff(0xda))/0x6)+-parseInt(_0x3166ff(0xb4))/0x7+parseInt(_0x3166ff(0xd7))/0x8*(parseInt(_0x3166ff(0x105))/0x9)+parseInt(_0x3166ff(0x9e))/0xa*(parseInt(_0x3166ff(0xf2))/0xb);if(_0x2d1075===_0xf6e2a)break;else _0x3e5d5a['push'](_0x3e5d5a['shift']());}catch(_0x5730be){_0x3e5d5a['push'](_0x3e5d5a['shift']());}}}(_0x22f4,0xbd4b4),function(_0x10f796,_0x162c10){const _0x5af409=_0x2946;typeof exports=='object'&&typeof module<'u'?_0x162c10(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==_0x5af409(0xe5)&&define[_0x5af409(0xe6)]?define([_0x5af409(0x104),'@univerjs-pro/collaboration-client','@univerjs-pro/license','@univerjs/core','@univerjs/thread-comment-ui',_0x5af409(0xa3),_0x5af409(0xb6),_0x5af409(0xa1)],_0x162c10):(_0x10f796=typeof globalThis<'u'?globalThis:_0x10f796||self,_0x162c10(_0x10f796['UniverProThreadCommentDatasource']={},_0x10f796[_0x5af409(0xcb)],_0x10f796[_0x5af409(0xf9)],_0x10f796['UniverCore'],_0x10f796[_0x5af409(0x11b)],_0x10f796[_0x5af409(0x107)],_0x10f796['rxjs'],_0x10f796['UniverNetwork']));}(this,function(_0x3d19a0,_0x323c91,_0x43588,_0x851170,_0x1daef5,_0x3b6309,_0x45bce8,_0x2629c9){'use strict';const _0x395cb0=_0x2946;const _0x44019f=_0x395cb0(0xc2);var _0x37e9b8=(_0x5e59a4=>(_0x5e59a4[_0x5e59a4['OpenOrReOpen']=0x0]=_0x395cb0(0xe2),_0x5e59a4[_0x5e59a4[_0x395cb0(0xb5)]=0x1]='Solved',_0x5e59a4[_0x5e59a4['UNRECOGNIZED']=-0x1]=_0x395cb0(0xf0),_0x5e59a4))(_0x37e9b8||{}),_0x20c545=(_0x3702dd=>(_0x3702dd[_0x3702dd['Unknown']=0x0]=_0x395cb0(0x106),_0x3702dd[_0x3702dd[_0x395cb0(0xd1)]=0x1]=_0x395cb0(0xd1),_0x3702dd[_0x3702dd[_0x395cb0(0xc5)]=0x2]=_0x395cb0(0xc5),_0x3702dd[_0x3702dd[_0x395cb0(0xae)]=0x3]='Edit',_0x3702dd[_0x3702dd[_0x395cb0(0xdd)]=0x4]=_0x395cb0(0xdd),_0x3702dd[_0x3702dd[_0x395cb0(0xc9)]=0x5]='Solve',_0x3702dd[_0x3702dd['UNRECOGNIZED']=-0x1]=_0x395cb0(0xf0),_0x3702dd))(_0x20c545||{});const _0x5e0d8f=_0x59be48=>_0x851170[_0x395cb0(0x100)](new Date(+_0x59be48))[_0x395cb0(0xc7)]('YYYY/MM/DD\x20HH:mm'),_0x2507bd=async(_0x251ee6,_0x3850bb)=>{const _0x3663c9=_0x395cb0,_0x8edbfb=_0x251ee6[_0x3663c9(0x103)](_0x851170['UserManagerService']),_0x50bb98=_0x251ee6[_0x3663c9(0x103)](_0x2629c9[_0x3663c9(0xf4)]);_0x3850bb[_0x3663c9(0x108)](_0x3c24ed=>{const _0x39cd4e=_0x3663c9;_0x8edbfb['getUser'](_0x3c24ed)&&_0x3850bb[_0x39cd4e(0xe7)](_0x3c24ed);}),_0x3850bb[_0x3663c9(0xac)]&&(await _0x50bb98['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x3850bb]}}))['body'][_0x3663c9(0x102)][_0x3663c9(0x108)](_0x17efa6=>{const _0x453abd=_0x3663c9;_0x17efa6&&_0x8edbfb[_0x453abd(0xb0)](_0x17efa6);});};var _0x3b6d8e=Object[_0x395cb0(0xa7)],_0x569419=(_0x4892dc,_0x4068fb,_0x5a0a72,_0x40b98f)=>{const _0x57da7=_0x395cb0;for(var _0xad0646=_0x40b98f>0x1?void 0x0:_0x40b98f?_0x3b6d8e(_0x4068fb,_0x5a0a72):_0x4068fb,_0x4f7c24=_0x4892dc[_0x57da7(0xf8)]-0x1,_0xb94e18;_0x4f7c24>=0x0;_0x4f7c24--)(_0xb94e18=_0x4892dc[_0x4f7c24])&&(_0xad0646=_0xb94e18(_0xad0646)||_0xad0646);return _0xad0646;},_0x162d5d=(_0x567990,_0x353969)=>(_0x26a060,_0x5960f2)=>_0x353969(_0x26a060,_0x5960f2,_0x567990);let _0x3ecf5b=class extends _0x851170[_0x395cb0(0x116)]{constructor(_0x538608,_0xe543a,_0x53ceac,_0x19ee11){const _0x28de32=_0x395cb0;super(),this[_0x28de32(0xc1)]=_0x538608,this[_0x28de32(0xbb)]=_0xe543a,this[_0x28de32(0xa6)]=_0x53ceac,this['_injector']=_0x19ee11,this[_0x28de32(0xe3)](),this['_initUserSync']();}[_0x395cb0(0x113)](){const _0x1b8b5b=_0x395cb0;this[_0x1b8b5b(0xf1)](this['_threadCommentModel'][_0x1b8b5b(0xfa)][_0x1b8b5b(0xa5)](_0x45bce8['bufferTime'](0x10))[_0x1b8b5b(0xa4)](_0x246169=>{const _0x4ebcd0=_0x1b8b5b,_0x3448e8=new Set();_0x246169[_0x4ebcd0(0x108)](_0x3aa051=>{const _0x50f263=_0x4ebcd0;switch(_0x3aa051[_0x50f263(0xbe)]){case _0x50f263(0x101):{const _0x41b677=_0x3aa051[_0x50f263(0xa9)][_0x50f263(0xeb)];_0x3448e8[_0x50f263(0x101)](_0x41b677);break;}}}),_0x2507bd(this[_0x4ebcd0(0xf3)],_0x3448e8);}));}['_init'](){const _0x5d5b7a=_0x395cb0;this[_0x5d5b7a(0xf1)](this['_commentService'][_0x5d5b7a(0xfa)][_0x5d5b7a(0xa4)](async _0x105362=>{const _0x46d03f=_0x5d5b7a;var _0x2df702,_0x2802f3,_0x43f747,_0x17b230;const _0x27cffa=(_0x2df702=this['_threadCommentModel'][_0x46d03f(0xc3)](_0x105362[_0x46d03f(0xd5)])[_0x46d03f(0xa2)](_0x31a109=>_0x31a109[_0x46d03f(0xbf)]===_0x105362[_0x46d03f(0xbf)]))==null?void 0x0:_0x2df702[_0x46d03f(0xd8)];if(!_0x27cffa)return;const {unitId:_0x5c979d,subUnitId:_0x5c72ab}=_0x27cffa;switch(_0x105362[_0x46d03f(0x10f)]&&this[_0x46d03f(0xa6)][_0x46d03f(0xb0)](_0x105362[_0x46d03f(0x10f)]),_0x105362[_0x46d03f(0xbe)]){case _0x20c545[_0x46d03f(0xd1)]:break;case _0x20c545[_0x46d03f(0xc5)]:{this[_0x46d03f(0xbb)]['addComment'](_0x5c979d,_0x5c72ab,{'unitId':_0x5c979d,'subUnitId':_0x5c72ab,'ref':'','id':_0x105362[_0x46d03f(0xf6)],'dT':_0x5e0d8f(+_0x105362['createTimestamp']),'threadId':_0x105362[_0x46d03f(0xbf)],'personId':(_0x43f747=(_0x2802f3=_0x105362[_0x46d03f(0x10f)])==null?void 0x0:_0x2802f3[_0x46d03f(0x9f)])!=null?_0x43f747:_0x105362[_0x46d03f(0xe0)],'text':JSON['parse'](_0x105362['content']),'parentId':_0x27cffa['id']});break;}case _0x20c545[_0x46d03f(0xdd)]:{const _0x21bf0=this['_threadCommentModel'][_0x46d03f(0x118)](_0x5c979d,_0x5c72ab,_0x105362['replyId']);_0x21bf0&&_0x21bf0[_0x46d03f(0xc8)]&&this[_0x46d03f(0xbb)]['deleteComment'](_0x5c979d,_0x5c72ab,_0x105362['replyId']);break;}case _0x20c545[_0x46d03f(0xae)]:{this[_0x46d03f(0xbb)][_0x46d03f(0xdf)](_0x5c979d,_0x5c72ab,{'commentId':_0x105362[_0x46d03f(0xf6)],'text':JSON['parse'](_0x105362['content'])});break;}case _0x20c545[_0x46d03f(0xc9)]:{const _0x11522d=(_0x17b230=this[_0x46d03f(0xbb)]['getUnit'](_0x105362[_0x46d03f(0xd5)])['find'](_0x353f72=>_0x353f72[_0x46d03f(0xbf)]===_0x105362[_0x46d03f(0xbf)]))==null?void 0x0:_0x17b230[_0x46d03f(0xd8)];_0x11522d&&this['_threadCommentModel'][_0x46d03f(0xe1)](_0x5c979d,_0x5c72ab,_0x11522d['id'],_0x105362[_0x46d03f(0xfc)]===_0x37e9b8[_0x46d03f(0xb5)]);break;}}}));}};_0x3ecf5b=_0x569419([_0x162d5d(0x0,_0x851170[_0x395cb0(0xb1)](_0x323c91['CommentService'])),_0x162d5d(0x1,_0x851170['Inject'](_0x3b6309[_0x395cb0(0x10d)])),_0x162d5d(0x2,_0x851170[_0x395cb0(0xb1)](_0x851170[_0x395cb0(0xfb)])),_0x162d5d(0x3,_0x851170[_0x395cb0(0xb1)](_0x851170['Injector']))],_0x3ecf5b);const _0x318184=_0x395cb0(0x114),_0x5e5749={};var _0x306f61=Object['getOwnPropertyDescriptor'],_0x4eddf0=(_0x2723fb,_0x571ab0,_0x414b6d,_0x5dbdf9)=>{for(var _0x40acaf=_0x5dbdf9>0x1?void 0x0:_0x5dbdf9?_0x306f61(_0x571ab0,_0x414b6d):_0x571ab0,_0x5c7ad4=_0x2723fb['length']-0x1,_0x21bf3a;_0x5c7ad4>=0x0;_0x5c7ad4--)(_0x21bf3a=_0x2723fb[_0x5c7ad4])&&(_0x40acaf=_0x21bf3a(_0x40acaf)||_0x40acaf);return _0x40acaf;},_0x4513ae=(_0x3f862a,_0x2e5959)=>(_0x4322fb,_0x7a6573)=>_0x2e5959(_0x4322fb,_0x7a6573,_0x3f862a);function _0x2d615d(_0xe399ac,_0xe5ad38){const _0x8c7345=_0x395cb0,_0x2c516b=_0xe399ac[_0x8c7345(0xee)][0x0];return{..._0xe5ad38,'id':_0x2c516b['replyId'],'resolved':_0xe399ac[_0x8c7345(0xfc)]===0x1,'dT':_0x5e0d8f(_0x2c516b[_0x8c7345(0xec)]),'personId':_0x2c516b[_0x8c7345(0xe0)],'threadId':_0x2c516b['threadId']};}function _0x244604(_0x477cd7,_0x4ac8b1,_0x521b23){const _0x6a33ff=_0x395cb0;var _0x1d8ed5,_0x55c706;if(((_0x55c706=(_0x1d8ed5=_0x477cd7==null?void 0x0:_0x477cd7[_0x6a33ff(0xee)])==null?void 0x0:_0x1d8ed5[_0x6a33ff(0xf8)])!=null?_0x55c706:0x0)>0x0){const _0x1bd37e=(_0x1d9af5,_0xf34887)=>({'id':_0x1d9af5[_0x6a33ff(0xf6)],'threadId':_0x1d9af5[_0x6a33ff(0xbf)],'dT':_0x5e0d8f(_0x1d9af5[_0x6a33ff(0xec)]),'personId':_0x1d9af5['userId'],'resolved':_0x477cd7['solved']===_0x37e9b8['Solved'],'unitId':_0x4ac8b1,'subUnitId':_0x521b23,'text':JSON[_0x6a33ff(0xcf)](_0x1d9af5[_0x6a33ff(0xed)]),'parentId':_0xf34887}),_0x47119d=_0x1bd37e(_0x477cd7[_0x6a33ff(0xee)][0x0]);return{..._0x47119d,'children':_0x477cd7[_0x6a33ff(0xee)][_0x6a33ff(0xaa)](0x1)['map'](_0x4f0233=>_0x1bd37e(_0x4f0233,_0x47119d['id']))};}return null;}let _0x479b54=class{constructor(_0x42f12c,_0x28479f,_0x4d6327){const _0x17db6b=_0x395cb0;this[_0x17db6b(0xa8)]=_0x42f12c,this[_0x17db6b(0xa6)]=_0x28479f,this[_0x17db6b(0xf7)]=_0x4d6327;}async[_0x395cb0(0x109)](_0x1ab694){const _0x33dc6b=_0x395cb0;var _0x1b889e,_0x39ece9;const {parentId:_0x4ca085,unitId:_0x1f7cd4,text:_0x4b299e,threadId:_0x58cb93}=_0x1ab694,_0x2d28de=(_0x39ece9=(_0x1b889e=_0x4b299e[_0x33dc6b(0xe8)])==null?void 0x0:_0x1b889e['filter'](_0x1d24f0=>_0x1d24f0[_0x33dc6b(0xd4)]===_0x851170[_0x33dc6b(0xb7)]['COMMENT'])[_0x33dc6b(0xd3)](_0xd2c274=>_0xd2c274[_0x33dc6b(0xe4)]))!=null?_0x39ece9:[],_0x50b604=JSON[_0x33dc6b(0xcc)](_0x4b299e),_0x5363d4=(await this[_0x33dc6b(0xf7)]['requireSession'](_0x1f7cd4))[_0x33dc6b(0xf5)]();if(_0x4ca085){const _0x352985={'memberId':_0x5363d4,'unitId':_0x1f7cd4,'content':_0x50b604,'mention':_0x2d28de,'threadId':_0x58cb93},_0x1a0148=(await this[_0x33dc6b(0xa8)][_0x33dc6b(0xce)]('/universer-api/comment/unit/'+_0x1f7cd4+_0x33dc6b(0xc0),{'body':_0x352985}))[_0x33dc6b(0xde)]['reply'];return{..._0x1ab694,'id':_0x1a0148[_0x33dc6b(0xf6)],'dT':_0x851170[_0x33dc6b(0x100)](+_0x1a0148[_0x33dc6b(0xec)])['format'](_0x33dc6b(0xd0)),'personId':_0x1a0148[_0x33dc6b(0xe0)]};}else{const _0x16e62c={'memberId':_0x5363d4,'unitId':_0x1f7cd4,'content':_0x50b604,'mention':_0x2d28de},_0x280bad=await this[_0x33dc6b(0xa8)][_0x33dc6b(0xce)](_0x33dc6b(0xb3)+_0x1f7cd4+_0x33dc6b(0x10a),{'body':_0x16e62c});return _0x2d615d(_0x280bad[_0x33dc6b(0xde)]['comment'],_0x1ab694);}}async[_0x395cb0(0xdf)](_0x5e38f2){const _0x1bab11=_0x395cb0;var _0x922ebf,_0x714df9;const {text:_0x5a48a1,unitId:_0x3f77a0}=_0x5e38f2,_0x3f2e2a=(_0x714df9=(_0x922ebf=_0x5a48a1[_0x1bab11(0xe8)])==null?void 0x0:_0x922ebf[_0x1bab11(0xe9)](_0x13e217=>_0x13e217['rangeType']===_0x851170[_0x1bab11(0xb7)]['COMMENT'])[_0x1bab11(0xd3)](_0x1adaf7=>_0x1adaf7['rangeId']))!=null?_0x714df9:[],_0x48835d=JSON[_0x1bab11(0xcc)](_0x5a48a1),_0x20bf8c=_0x5e38f2[_0x1bab11(0xbf)],_0x542d45=_0x5e38f2['id'],_0x3a663e={'memberId':(await this[_0x1bab11(0xf7)][_0x1bab11(0xb9)](_0x3f77a0))[_0x1bab11(0xf5)](),'unitId':_0x3f77a0,'threadId':_0x20bf8c,'mention':_0x3f2e2a,'content':_0x48835d,'replyId':_0x542d45},_0xdc4747=await this[_0x1bab11(0xa8)][_0x1bab11(0xce)]('/universer-api/comment/unit/'+_0x3f77a0+_0x1bab11(0xc4),{'body':_0x3a663e});return!_0xdc4747[_0x1bab11(0xde)][_0x1bab11(0xbc)]||_0xdc4747[_0x1bab11(0xde)][_0x1bab11(0xbc)]['code']===0x1;}async[_0x395cb0(0xe1)](_0x5d2f21){const _0x208513=_0x395cb0,{unitId:_0x4b698f}=_0x5d2f21,_0x4b83f6=_0x5d2f21[_0x208513(0xbf)],_0x1dfced={'memberId':this[_0x208513(0xa6)][_0x208513(0xc6)]()[_0x208513(0x9f)],'unitId':_0x4b698f,'threadId':_0x4b83f6,'solved':_0x5d2f21['resolved']?_0x37e9b8['Solved']:_0x37e9b8[_0x208513(0xe2)]},_0x217fea=await this[_0x208513(0xa8)][_0x208513(0xce)](_0x208513(0xb3)+_0x4b698f+_0x208513(0xb2),{'body':_0x1dfced});return!_0x217fea[_0x208513(0xde)][_0x208513(0xbc)]||_0x217fea['body'][_0x208513(0xbc)][_0x208513(0x10b)]===0x1;}async['deleteComment'](_0x4c18fd,_0x2490e7,_0x1ab53f,_0x2212bc){const _0x55751a=_0x395cb0,_0x232e0e={'memberId':(await this['_sessionService'][_0x55751a(0xb9)](_0x4c18fd))[_0x55751a(0xf5)](),'threadId':_0x1ab53f,'replyId':_0x2212bc,'unitId':_0x4c18fd},_0x2ece6f=await this[_0x55751a(0xa8)][_0x55751a(0xce)](_0x55751a(0xb3)+_0x4c18fd+_0x55751a(0xd6),{'body':_0x232e0e});return!_0x2ece6f['body']['error']||_0x2ece6f['body']['error'][_0x55751a(0x10b)]===0x1;}async['listComments'](_0x42b5f8,_0x45b4ff,_0x17dc24){const _0x55bf5f=_0x395cb0,_0x4b3867={'unitId':_0x42b5f8,'threadId':_0x17dc24},_0x351a8b=await this[_0x55bf5f(0xa8)][_0x55bf5f(0xce)](_0x55bf5f(0xb3)+_0x42b5f8+'/list',{'body':_0x4b3867}),_0x449fd3=_0x17dc24['map'](_0x265bd0=>_0x244604(_0x351a8b[_0x55bf5f(0xde)][_0x55bf5f(0xef)][_0x265bd0],_0x42b5f8,_0x45b4ff))[_0x55bf5f(0xe9)](Boolean);return Object[_0x55bf5f(0x115)](_0x351a8b[_0x55bf5f(0xde)][_0x55bf5f(0x102)])[_0x55bf5f(0x108)](_0x59c5d1=>{const _0xda1a92=_0x55bf5f;this[_0xda1a92(0xa6)][_0xda1a92(0xb0)](_0x59c5d1);}),_0x449fd3;}[_0x395cb0(0xbd)](_0x9ba281){const _0x4adb78=_0x395cb0;return{'id':_0x9ba281['id'],'threadId':_0x9ba281[_0x4adb78(0xbf)],'ref':_0x9ba281[_0x4adb78(0xdb)]};}};_0x479b54=_0x4eddf0([_0x4513ae(0x0,_0x851170[_0x395cb0(0xb1)](_0x2629c9[_0x395cb0(0xf4)])),_0x4513ae(0x1,_0x851170['Inject'](_0x851170[_0x395cb0(0xfb)])),_0x4513ae(0x2,_0x851170[_0x395cb0(0xb1)](_0x323c91['CollaborationSessionService']))],_0x479b54);var _0x508a90=Object[_0x395cb0(0xa7)],_0x570dd8=(_0x1a410d,_0x1aba50,_0xd7d79f,_0x4eddc4)=>{for(var _0xfe983c=_0x4eddc4>0x1?void 0x0:_0x4eddc4?_0x508a90(_0x1aba50,_0xd7d79f):_0x1aba50,_0x51ba26=_0x1a410d['length']-0x1,_0x54e498;_0x51ba26>=0x0;_0x51ba26--)(_0x54e498=_0x1a410d[_0x51ba26])&&(_0xfe983c=_0x54e498(_0xfe983c)||_0xfe983c);return _0xfe983c;},_0x99d86c=(_0x35f1e3,_0x2e01a2)=>(_0x911f46,_0x1a1577)=>_0x2e01a2(_0x911f46,_0x1a1577,_0x35f1e3);let _0xf85777=class extends _0x851170[_0x395cb0(0x116)]{constructor(_0x47f8cd,_0x552627){const _0x12d275=_0x395cb0;super(),this[_0x12d275(0xa0)]=_0x47f8cd,this[_0x12d275(0xea)]=_0x552627,this['_initDataSource']();}['_initDataSource'](){const _0xc7a85d=_0x395cb0;this[_0xc7a85d(0xa0)][_0xc7a85d(0xd2)]=this['_threadCommentDataSource'],this[_0xc7a85d(0xa0)][_0xc7a85d(0x111)]=!0x1;}};_0xf85777=_0x570dd8([_0x99d86c(0x0,_0x3b6309[_0x395cb0(0xcd)]),_0x99d86c(0x1,_0x851170['Inject'](_0x479b54))],_0xf85777);var _0x1dc6cc=Object[_0x395cb0(0xfe)],_0x39bea6=Object['getOwnPropertyDescriptor'],_0x2bc154=(_0x361b33,_0x2647b3,_0x8ed16f)=>_0x2647b3 in _0x361b33?_0x1dc6cc(_0x361b33,_0x2647b3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x8ed16f}):_0x361b33[_0x2647b3]=_0x8ed16f,_0x43c345=(_0xf9856b,_0x55a25b,_0x2315ac,_0x2c4df2)=>{const _0x8e9cd0=_0x395cb0;for(var _0x1f10c0=_0x2c4df2>0x1?void 0x0:_0x2c4df2?_0x39bea6(_0x55a25b,_0x2315ac):_0x55a25b,_0xcd379c=_0xf9856b[_0x8e9cd0(0xf8)]-0x1,_0xf6bcbf;_0xcd379c>=0x0;_0xcd379c--)(_0xf6bcbf=_0xf9856b[_0xcd379c])&&(_0x1f10c0=_0xf6bcbf(_0x1f10c0)||_0x1f10c0);return _0x1f10c0;},_0x28296a=(_0x6ad3a4,_0x12cd0b)=>(_0x4a72e2,_0x3181ee)=>_0x12cd0b(_0x4a72e2,_0x3181ee,_0x6ad3a4),_0x757c88=(_0x1747f7,_0x3a4811,_0x1c60ec)=>_0x2bc154(_0x1747f7,typeof _0x3a4811!='symbol'?_0x3a4811+'':_0x3a4811,_0x1c60ec);_0x3d19a0[_0x395cb0(0xd9)]=class extends _0x851170[_0x395cb0(0xba)]{constructor(_0x5472ad=_0x5e5749,_0x1c5f61,_0x18696d){const _0x505bb6=_0x395cb0;super(),this[_0x505bb6(0xab)]=_0x5472ad,this[_0x505bb6(0xf3)]=_0x1c5f61,this[_0x505bb6(0xaf)]=_0x18696d;const {..._0x1a65b3}=_0x851170[_0x505bb6(0xca)]({},_0x5e5749,this['_config']);this[_0x505bb6(0xaf)]['setConfig'](_0x318184,_0x1a65b3);}[_0x395cb0(0xad)](){const _0x2bf940=_0x395cb0;[[_0x479b54],[_0xf85777],[_0x3ecf5b]][_0x2bf940(0x108)](_0x517e94=>{const _0x2e15e4=_0x2bf940;this['_injector'][_0x2e15e4(0x101)](_0x517e94);});}[_0x395cb0(0x10e)](){const _0x102c59=_0x395cb0;this[_0x102c59(0xf3)]['get'](_0xf85777),this[_0x102c59(0xf3)][_0x102c59(0x103)](_0x3ecf5b);}},_0x757c88(_0x3d19a0['UniverThreadCommentDataSourcePlugin'],_0x395cb0(0xdc),_0x44019f),_0x757c88(_0x3d19a0[_0x395cb0(0xd9)],'type',_0x851170[_0x395cb0(0x110)]['UNIVER_UNKNOWN']),_0x3d19a0['UniverThreadCommentDataSourcePlugin']=_0x43c345([_0x851170[_0x395cb0(0x10c)](_0x1daef5['UniverThreadCommentUIPlugin'],_0x323c91[_0x395cb0(0x112)],_0x43588['UniverLicensePlugin']),_0x28296a(0x1,_0x851170[_0x395cb0(0xb1)](_0x851170[_0x395cb0(0x11a)])),_0x28296a(0x2,_0x851170['IConfigService'])],_0x3d19a0['UniverThreadCommentDataSourcePlugin']),Object[_0x395cb0(0xfe)](_0x3d19a0,Symbol['toStringTag'],{'value':_0x395cb0(0xff)});}));
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-experimental.20251208-c4b8a44",
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-experimental.20251208-c4b8a44",
49
+ "@univerjs-pro/license": "0.12.4-experimental.20251208-c4b8a44",
50
+ "@univerjs/core": "0.12.4-experimental.20251208-c4b8a44",
51
+ "@univerjs/network": "0.12.4-experimental.20251208-c4b8a44",
52
+ "@univerjs/protocol": "0.1.47",
53
+ "@univerjs/thread-comment": "0.12.4-experimental.20251208-c4b8a44",
54
+ "@univerjs/thread-comment-ui": "0.12.4-experimental.20251208-c4b8a44"
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",