@univerjs-pro/thread-comment-datasource 0.6.0 → 0.6.1-nightly.202502211606

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 _0x199a68=_0x162f;(function(_0x4deadf,_0x411b60){const _0x56c706=_0x162f,_0x2c862b=_0x4deadf();while(!![]){try{const _0x13bdc8=parseInt(_0x56c706(0x1dd))/0x1+parseInt(_0x56c706(0x223))/0x2*(-parseInt(_0x56c706(0x22b))/0x3)+-parseInt(_0x56c706(0x24d))/0x4*(parseInt(_0x56c706(0x1eb))/0x5)+-parseInt(_0x56c706(0x1e5))/0x6*(parseInt(_0x56c706(0x22c))/0x7)+parseInt(_0x56c706(0x235))/0x8+-parseInt(_0x56c706(0x1ec))/0x9*(parseInt(_0x56c706(0x230))/0xa)+-parseInt(_0x56c706(0x1f6))/0xb*(-parseInt(_0x56c706(0x207))/0xc);if(_0x13bdc8===_0x411b60)break;else _0x2c862b['push'](_0x2c862b['shift']());}catch(_0x1d4671){_0x2c862b['push'](_0x2c862b['shift']());}}}(_0x3037,0x862ce));Object[_0x199a68(0x237)](exports,Symbol[_0x199a68(0x249)],{'value':_0x199a68(0x205)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x199a68(0x21d)),c=require('@univerjs/core'),j=require(_0x199a68(0x218)),M=require(_0x199a68(0x1fe)),w=require(_0x199a68(0x1ed)),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x38114a=>(_0x38114a[_0x38114a[_0x199a68(0x1f3)]=0x0]='OpenOrReOpen',_0x38114a[_0x38114a[_0x199a68(0x1df)]=0x1]='Solved',_0x38114a[_0x38114a[_0x199a68(0x1f5)]=-0x1]=_0x199a68(0x1f5),_0x38114a))(I||{}),v=(_0x4dabf0=>(_0x4dabf0[_0x4dabf0['Unknown']=0x0]=_0x199a68(0x24f),_0x4dabf0[_0x4dabf0[_0x199a68(0x214)]=0x1]=_0x199a68(0x214),_0x4dabf0[_0x4dabf0[_0x199a68(0x23a)]=0x2]='Reply',_0x4dabf0[_0x4dabf0[_0x199a68(0x204)]=0x3]=_0x199a68(0x204),_0x4dabf0[_0x4dabf0['Delete']=0x4]='Delete',_0x4dabf0[_0x4dabf0[_0x199a68(0x206)]=0x5]=_0x199a68(0x206),_0x4dabf0[_0x4dabf0['UNRECOGNIZED']=-0x1]=_0x199a68(0x1f5),_0x4dabf0))(v||{});const f=_0x9688c0=>c['dayjs'](new Date(+_0x9688c0))[_0x199a68(0x215)](_0x199a68(0x239)),R=async(_0x317340,_0x2ec7fb)=>{const _0x293118=_0x199a68,_0x2f1342=_0x317340[_0x293118(0x23e)](c[_0x293118(0x242)]),_0x29c11=_0x317340[_0x293118(0x23e)](P['HTTPService']);_0x2ec7fb['forEach'](_0x1ccee4=>{const _0xb8c34f=_0x293118;_0x2f1342['getUser'](_0x1ccee4)&&_0x2ec7fb[_0xb8c34f(0x212)](_0x1ccee4);}),_0x2ec7fb[_0x293118(0x21e)]&&(await _0x29c11[_0x293118(0x23e)](_0x293118(0x24a),{'params':{'userIDs':[..._0x2ec7fb]}}))[_0x293118(0x202)][_0x293118(0x1d7)][_0x293118(0x228)](_0x453bfa=>{const _0x1c31e5=_0x293118;_0x453bfa&&_0x2f1342[_0x1c31e5(0x1db)](_0x453bfa);});};var $=Object[_0x199a68(0x20f)],E=(_0x385992,_0x16f738,_0x35db3a,_0x232d8a)=>{for(var _0x271c27=_0x232d8a>0x1?void 0x0:_0x232d8a?$(_0x16f738,_0x35db3a):_0x16f738,_0x230db9=_0x385992['length']-0x1,_0x2482d5;_0x230db9>=0x0;_0x230db9--)(_0x2482d5=_0x385992[_0x230db9])&&(_0x271c27=_0x2482d5(_0x271c27)||_0x271c27);return _0x271c27;},S=(_0x3a621e,_0xc31fd7)=>(_0x2a3232,_0x1bd4a2)=>_0xc31fd7(_0x2a3232,_0x1bd4a2,_0x3a621e);let p=class extends c[_0x199a68(0x244)]{constructor(_0x57ae5a,_0x574758,_0x45a4f7,_0x6ee4a8){const _0x576c56=_0x199a68;super(),this['_commentService']=_0x57ae5a,this['_threadCommentModel']=_0x574758,this[_0x576c56(0x220)]=_0x45a4f7,this['_injector']=_0x6ee4a8,this[_0x576c56(0x225)](),this['_initUserSync']();}[_0x199a68(0x211)](){const _0x4a13e1=_0x199a68;this[_0x4a13e1(0x1e9)](this['_threadCommentModel']['commentUpdate$'][_0x4a13e1(0x210)](w[_0x4a13e1(0x1ef)](0x10))['subscribe'](_0x5d3cb2=>{const _0x57dd0f=_0x4a13e1,_0x417dc5=new Set();_0x5d3cb2[_0x57dd0f(0x228)](_0x2a9257=>{const _0x2433fc=_0x57dd0f;switch(_0x2a9257[_0x2433fc(0x1de)]){case _0x2433fc(0x1f8):{const _0x4598c8=_0x2a9257[_0x2433fc(0x1e4)][_0x2433fc(0x1dc)];_0x417dc5[_0x2433fc(0x1f8)](_0x4598c8);break;}}}),R(this[_0x57dd0f(0x22d)],_0x417dc5);}));}[_0x199a68(0x225)](){const _0x3762b0=_0x199a68;this['disposeWithMe'](this[_0x3762b0(0x221)]['commentUpdate$']['subscribe'](async _0xb192b4=>{const _0xbd7ddd=_0x3762b0;var _0x400397,_0x53f904,_0x2d6460,_0xff31a3;const _0x1fe9ac=(_0x400397=this[_0xbd7ddd(0x20b)][_0xbd7ddd(0x201)](_0xb192b4[_0xbd7ddd(0x24b)])[_0xbd7ddd(0x234)](_0x33f655=>_0x33f655['threadId']===_0xb192b4[_0xbd7ddd(0x1fa)]))==null?void 0x0:_0x400397['root'];if(!_0x1fe9ac)return;const {unitId:_0x2803d8,subUnitId:_0x2ad1a8}=_0x1fe9ac;switch(_0xb192b4[_0xbd7ddd(0x1da)]&&this[_0xbd7ddd(0x220)][_0xbd7ddd(0x1db)](_0xb192b4[_0xbd7ddd(0x1da)]),_0xb192b4[_0xbd7ddd(0x1de)]){case v[_0xbd7ddd(0x214)]:break;case v[_0xbd7ddd(0x23a)]:{this[_0xbd7ddd(0x20b)][_0xbd7ddd(0x1d9)](_0x2803d8,_0x2ad1a8,{'unitId':_0x2803d8,'subUnitId':_0x2ad1a8,'ref':'','id':_0xb192b4['replyId'],'dT':f(+_0xb192b4[_0xbd7ddd(0x247)]),'threadId':_0xb192b4[_0xbd7ddd(0x1fa)],'personId':(_0x2d6460=(_0x53f904=_0xb192b4[_0xbd7ddd(0x1da)])==null?void 0x0:_0x53f904['userID'])!=null?_0x2d6460:_0xb192b4[_0xbd7ddd(0x1f0)],'text':JSON[_0xbd7ddd(0x22f)](_0xb192b4[_0xbd7ddd(0x1e8)]),'parentId':_0x1fe9ac['id']});break;}case v[_0xbd7ddd(0x1ff)]:{const _0x15b90a=this[_0xbd7ddd(0x20b)][_0xbd7ddd(0x219)](_0x2803d8,_0x2ad1a8,_0xb192b4[_0xbd7ddd(0x1e3)]);_0x15b90a&&_0x15b90a[_0xbd7ddd(0x241)]&&this[_0xbd7ddd(0x20b)][_0xbd7ddd(0x21c)](_0x2803d8,_0x2ad1a8,_0xb192b4[_0xbd7ddd(0x1e3)]);break;}case v[_0xbd7ddd(0x204)]:{this['_threadCommentModel']['updateComment'](_0x2803d8,_0x2ad1a8,{'commentId':_0xb192b4[_0xbd7ddd(0x1e3)],'text':JSON[_0xbd7ddd(0x22f)](_0xb192b4[_0xbd7ddd(0x1e8)])});break;}case v[_0xbd7ddd(0x206)]:{const _0x23a306=(_0xff31a3=this[_0xbd7ddd(0x20b)][_0xbd7ddd(0x201)](_0xb192b4[_0xbd7ddd(0x24b)])['find'](_0x91b28d=>_0x91b28d[_0xbd7ddd(0x1fa)]===_0xb192b4[_0xbd7ddd(0x1fa)]))==null?void 0x0:_0xff31a3[_0xbd7ddd(0x20d)];_0x23a306&&this[_0xbd7ddd(0x20b)]['resolveComment'](_0x2803d8,_0x2ad1a8,_0x23a306['id'],_0xb192b4[_0xbd7ddd(0x216)]===I[_0xbd7ddd(0x1df)]);break;}}}));}};function _0x162f(_0x45271f,_0x38b8e8){const _0x30378e=_0x3037();return _0x162f=function(_0x162f0d,_0x1e2450){_0x162f0d=_0x162f0d-0x1d5;let _0x3b831d=_0x30378e[_0x162f0d];return _0x3b831d;},_0x162f(_0x45271f,_0x38b8e8);}p=E([S(0x0,c[_0x199a68(0x20c)](b['CommentService'])),S(0x1,c[_0x199a68(0x20c)](M[_0x199a68(0x231)])),S(0x2,c[_0x199a68(0x20c)](c[_0x199a68(0x242)])),S(0x3,c['Inject'](c['Injector']))],p);const q=_0x199a68(0x1e7),D={};var A=Object[_0x199a68(0x20f)],x=(_0xfc4044,_0x353194,_0x3ea2a7,_0x186996)=>{const _0x365c22=_0x199a68;for(var _0x66a31=_0x186996>0x1?void 0x0:_0x186996?A(_0x353194,_0x3ea2a7):_0x353194,_0x2747b1=_0xfc4044[_0x365c22(0x243)]-0x1,_0x2b4f54;_0x2747b1>=0x0;_0x2747b1--)(_0x2b4f54=_0xfc4044[_0x2747b1])&&(_0x66a31=_0x2b4f54(_0x66a31)||_0x66a31);return _0x66a31;},_=(_0x40c201,_0x431078)=>(_0x1ac641,_0x345d2b)=>_0x431078(_0x1ac641,_0x345d2b,_0x40c201);function Y(_0x141b1c,_0x5f4c4e){const _0x17bb06=_0x199a68,_0x52962d=_0x141b1c[_0x17bb06(0x24c)][0x0];return{..._0x5f4c4e,'id':_0x52962d[_0x17bb06(0x1e3)],'resolved':_0x141b1c[_0x17bb06(0x216)]===0x1,'dT':f(_0x52962d[_0x17bb06(0x247)]),'personId':_0x52962d[_0x17bb06(0x1f0)],'threadId':_0x52962d[_0x17bb06(0x1fa)]};}function G(_0x5de724,_0x53ed62,_0x4714c4){const _0x286c49=_0x199a68;var _0x193be4,_0x253530;if(((_0x253530=(_0x193be4=_0x5de724==null?void 0x0:_0x5de724[_0x286c49(0x24c)])==null?void 0x0:_0x193be4[_0x286c49(0x243)])!=null?_0x253530:0x0)>0x0){const _0x42b015=(_0xc127b6,_0x383f82)=>({'id':_0xc127b6[_0x286c49(0x1e3)],'threadId':_0xc127b6['threadId'],'dT':f(_0xc127b6[_0x286c49(0x247)]),'personId':_0xc127b6['userId'],'resolved':_0x5de724[_0x286c49(0x216)]===I[_0x286c49(0x1df)],'unitId':_0x53ed62,'subUnitId':_0x4714c4,'text':JSON[_0x286c49(0x22f)](_0xc127b6[_0x286c49(0x1e8)]),'parentId':_0x383f82}),_0x28f1cb=_0x42b015(_0x5de724['replies'][0x0]);return{..._0x28f1cb,'children':_0x5de724[_0x286c49(0x24c)][_0x286c49(0x21b)](0x1)['map'](_0x57bd9f=>_0x42b015(_0x57bd9f,_0x28f1cb['id']))};}return null;}let g=class{constructor(_0x369e6c,_0x2b56f4,_0x17f50b,_0x43e09c){const _0x490d41=_0x199a68;this[_0x490d41(0x1d5)]=_0x369e6c,this[_0x490d41(0x220)]=_0x2b56f4,this[_0x490d41(0x1f1)]=_0x17f50b,this[_0x490d41(0x22d)]=_0x43e09c;}async[_0x199a68(0x1d9)](_0x2a1aa7){const _0x55111e=_0x199a68;var _0x43092b,_0xa29dd6;const {parentId:_0x36a49d,unitId:_0x357f02,text:_0x59beb0,threadId:_0x531d5b}=_0x2a1aa7,_0xabdd05=(_0xa29dd6=(_0x43092b=_0x59beb0[_0x55111e(0x23f)])==null?void 0x0:_0x43092b[_0x55111e(0x22a)](_0x42f1ef=>_0x42f1ef['rangeType']===c[_0x55111e(0x23b)][_0x55111e(0x203)])[_0x55111e(0x217)](_0x324c68=>_0x324c68['rangeId']))!=null?_0xa29dd6:[],_0x15a199=JSON['stringify'](_0x59beb0),_0x230cf8=(await this[_0x55111e(0x1f1)][_0x55111e(0x1fb)](_0x357f02))['getMemberID']();if(_0x36a49d){const _0x33e860={'memberId':_0x230cf8,'unitId':_0x357f02,'content':_0x15a199,'mention':_0xabdd05,'threadId':_0x531d5b},_0x15b901=(await this[_0x55111e(0x1d5)][_0x55111e(0x208)]('/universer-api/comment/unit/'+_0x357f02+'/reply',{'body':_0x33e860}))[_0x55111e(0x202)]['reply'];return{..._0x2a1aa7,'id':_0x15b901[_0x55111e(0x1e3)],'dT':c['dayjs'](+_0x15b901[_0x55111e(0x247)])[_0x55111e(0x215)](_0x55111e(0x239)),'personId':_0x15b901[_0x55111e(0x1f0)]};}else{const _0x2b340c={'memberId':_0x230cf8,'unitId':_0x357f02,'content':_0x15a199,'mention':_0xabdd05},_0x49d1a7=await this['_httpService'][_0x55111e(0x208)](_0x55111e(0x23d)+_0x357f02+_0x55111e(0x21f),{'body':_0x2b340c});return Y(_0x49d1a7['body'][_0x55111e(0x238)],_0x2a1aa7);}}async[_0x199a68(0x1f7)](_0x4446b6){const _0x485ea6=_0x199a68;var _0x412044,_0x399877;const {text:_0x27cfa2,unitId:_0x5b3f56}=_0x4446b6,_0x26ce39=(_0x399877=(_0x412044=_0x27cfa2[_0x485ea6(0x23f)])==null?void 0x0:_0x412044['filter'](_0x225a7e=>_0x225a7e[_0x485ea6(0x21a)]===c[_0x485ea6(0x23b)][_0x485ea6(0x203)])[_0x485ea6(0x217)](_0x4dd8ab=>_0x4dd8ab[_0x485ea6(0x248)]))!=null?_0x399877:[],_0xf62382=JSON['stringify'](_0x27cfa2),_0x2d5019=_0x4446b6['threadId'],_0x1d433b=_0x4446b6['id'],_0x6a64c1={'memberId':(await this[_0x485ea6(0x1f1)]['requireSession'](_0x5b3f56))[_0x485ea6(0x1d6)](),'unitId':_0x5b3f56,'threadId':_0x2d5019,'mention':_0x26ce39,'content':_0xf62382,'replyId':_0x1d433b},_0x295b6b=await this['_httpService'][_0x485ea6(0x208)](_0x485ea6(0x23d)+_0x5b3f56+_0x485ea6(0x229),{'body':_0x6a64c1});return!_0x295b6b[_0x485ea6(0x202)][_0x485ea6(0x200)]||_0x295b6b[_0x485ea6(0x202)][_0x485ea6(0x200)][_0x485ea6(0x1ea)]===0x1;}async[_0x199a68(0x224)](_0x4db5f8){const _0x195958=_0x199a68,{unitId:_0x20093a}=_0x4db5f8,_0x240038=_0x4db5f8[_0x195958(0x1fa)],_0x362d05={'memberId':this[_0x195958(0x220)][_0x195958(0x232)]()['userID'],'unitId':_0x20093a,'threadId':_0x240038,'solved':_0x4db5f8[_0x195958(0x233)]?I[_0x195958(0x1df)]:I[_0x195958(0x1f3)]},_0x29cac0=await this[_0x195958(0x1d5)][_0x195958(0x208)](_0x195958(0x23d)+_0x20093a+_0x195958(0x20e),{'body':_0x362d05});return!_0x29cac0[_0x195958(0x202)][_0x195958(0x200)]||_0x29cac0[_0x195958(0x202)][_0x195958(0x200)]['code']===0x1;}async[_0x199a68(0x21c)](_0x1823ab,_0x26d5b9,_0x2f1c5f,_0x172fdd){const _0x149c93=_0x199a68,_0x8482c3={'memberId':(await this['_sessionService'][_0x149c93(0x1fb)](_0x1823ab))[_0x149c93(0x1d6)](),'threadId':_0x2f1c5f,'replyId':_0x172fdd,'unitId':_0x1823ab},_0x54a4cf=await this[_0x149c93(0x1d5)][_0x149c93(0x208)]('/universer-api/comment/unit/'+_0x1823ab+_0x149c93(0x1fd),{'body':_0x8482c3});return!_0x54a4cf[_0x149c93(0x202)][_0x149c93(0x200)]||_0x54a4cf[_0x149c93(0x202)][_0x149c93(0x200)][_0x149c93(0x1ea)]===0x1;}async[_0x199a68(0x1e6)](_0x19eb17,_0x56137b,_0x2022ef){const _0x38753a=_0x199a68,_0xaef30={'unitId':_0x19eb17,'threadId':_0x2022ef},_0x1f3eca=await this[_0x38753a(0x1d5)][_0x38753a(0x208)](_0x38753a(0x23d)+_0x19eb17+'/list',{'body':_0xaef30}),_0x1666ee=_0x2022ef['map'](_0x23b4f3=>G(_0x1f3eca[_0x38753a(0x202)][_0x38753a(0x226)][_0x23b4f3],_0x19eb17,_0x56137b))['filter'](Boolean);return Object[_0x38753a(0x1f9)](_0x1f3eca[_0x38753a(0x202)][_0x38753a(0x1d7)])[_0x38753a(0x228)](_0x4bc4b4=>{const _0xd9ad2c=_0x38753a;this[_0xd9ad2c(0x220)][_0xd9ad2c(0x1db)](_0x4bc4b4);}),_0x1666ee;}[_0x199a68(0x222)](_0x1b149f){const _0xb8a5f0=_0x199a68;return{'id':_0x1b149f['id'],'threadId':_0x1b149f['threadId'],'ref':_0x1b149f[_0xb8a5f0(0x213)]};}};g=x([_(0x0,c['Inject'](P[_0x199a68(0x246)])),_(0x1,c[_0x199a68(0x20c)](c[_0x199a68(0x242)])),_(0x2,c[_0x199a68(0x20c)](b['CollaborationSessionService'])),_(0x3,c[_0x199a68(0x20c)](c['Injector']))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x492512,_0x40d0a2,_0x4afc10,_0x5518f4)=>{const _0x327e00=_0x199a68;for(var _0x7b0044=_0x5518f4>0x1?void 0x0:_0x5518f4?H(_0x40d0a2,_0x4afc10):_0x40d0a2,_0x3740aa=_0x492512[_0x327e00(0x243)]-0x1,_0x556ab8;_0x3740aa>=0x0;_0x3740aa--)(_0x556ab8=_0x492512[_0x3740aa])&&(_0x7b0044=_0x556ab8(_0x7b0044)||_0x7b0044);return _0x7b0044;},y=(_0x484312,_0x474330)=>(_0x5d2f5d,_0x3df9e3)=>_0x474330(_0x5d2f5d,_0x3df9e3,_0x484312);let C=class extends c[_0x199a68(0x244)]{constructor(_0x388a6d,_0x5bdcf4){const _0x366666=_0x199a68;super(),this[_0x366666(0x1f4)]=_0x388a6d,this[_0x366666(0x1e0)]=_0x5bdcf4,this[_0x366666(0x1e2)]();}['_initDataSource'](){const _0x745df9=_0x199a68;this[_0x745df9(0x1f4)][_0x745df9(0x209)]=this[_0x745df9(0x1e0)],this[_0x745df9(0x1f4)][_0x745df9(0x1ee)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x199a68(0x20c)](g))],C);var F=Object[_0x199a68(0x237)],L=Object[_0x199a68(0x20f)],Z=(_0x560dc6,_0x22e096,_0x2f2a19)=>_0x22e096 in _0x560dc6?F(_0x560dc6,_0x22e096,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2f2a19}):_0x560dc6[_0x22e096]=_0x2f2a19,W=(_0x50cbd1,_0x12de9e,_0x54290b,_0x15ae4a)=>{const _0x186b58=_0x199a68;for(var _0x330e50=_0x15ae4a>0x1?void 0x0:_0x15ae4a?L(_0x12de9e,_0x54290b):_0x12de9e,_0x5aa541=_0x50cbd1[_0x186b58(0x243)]-0x1,_0x3b7c30;_0x5aa541>=0x0;_0x5aa541--)(_0x3b7c30=_0x50cbd1[_0x5aa541])&&(_0x330e50=_0x3b7c30(_0x330e50)||_0x330e50);return _0x330e50;},O=(_0x9e0d2a,_0x43e5d3)=>(_0x5ed6ba,_0x2c9964)=>_0x43e5d3(_0x5ed6ba,_0x2c9964,_0x9e0d2a),N=(_0x3d9fb4,_0x532835,_0x4b9022)=>Z(_0x3d9fb4,typeof _0x532835!=_0x199a68(0x1fc)?_0x532835+'':_0x532835,_0x4b9022);function _0x3037(){const _0x2e707d=['UNIVER_UNKNOWN','HTTPService','createTimestamp','rangeId','toStringTag','/universer-api/user/list','unitId','replies','4EIvqEZ','_configService','Unknown','_httpService','getMemberID','users','UniverInstanceType','addComment','user','addUser','personId','827389FRxNEc','type','Solved','_threadCommentDataSource','_config','_initDataSource','replyId','payload','175614dFfZBY','listComments','thread-comment-data-source.config','content','disposeWithMe','code','591235tXiAPY','3717NxKlIX','rxjs','syncUpdateMutationToColla','bufferTime','userId','_sessionService','pluginName','OpenOrReOpen','_threadCommentDataSourceService','UNRECOGNIZED','22aHlVbD','updateComment','add','values','threadId','requireSession','symbol','/delete','@univerjs/thread-comment','Delete','error','getUnit','body','COMMENT','Edit','Module','Solve','1125924OcMqPZ','post','dataSource','UniverThreadCommentDataSourcePlugin','_threadCommentModel','Inject','root','/solved','getOwnPropertyDescriptor','pipe','_initUserSync','delete','ref','Add','format','solved','map','@univerjs/thread-comment-ui','getComment','rangeType','slice','deleteComment','@univerjs-pro/license','size','/add','_userService','_commentService','saveCommentToSnapshot','343692fOGWuk','resolveComment','_init','comments','Injector','forEach','/edit','filter','6OHBkEN','224kqvyIG','_injector','UniverLicensePlugin','parse','70asDXVR','ThreadCommentModel','getCurrentUser','resolved','find','7487816iqfExW','onStarting','defineProperty','comment','YYYY/MM/DD\x20HH:mm','Reply','CustomRangeType','UniverCollaborationClientPlugin','/universer-api/comment/unit/','get','customRanges','UniverThreadCommentUIPlugin','parentId','UserManagerService','length','Disposable'];_0x3037=function(){return _0x2e707d;};return _0x3037();}exports[_0x199a68(0x20a)]=class extends c['Plugin']{constructor(_0x828df0=D,_0xe7708b,_0x3fc30e){const _0x279c17=_0x199a68;super(),this[_0x279c17(0x1e1)]=_0x828df0,this[_0x279c17(0x22d)]=_0xe7708b,this[_0x279c17(0x24e)]=_0x3fc30e;const {..._0xbf41e6}=c['merge']({},D,this[_0x279c17(0x1e1)]);this[_0x279c17(0x24e)]['setConfig'](q,_0xbf41e6);}[_0x199a68(0x236)](){const _0x262e2e=_0x199a68;[[g],[C],[p]][_0x262e2e(0x228)](_0x117fe7=>{const _0x3d8d18=_0x262e2e;this[_0x3d8d18(0x22d)][_0x3d8d18(0x1f8)](_0x117fe7);});}['onReady'](){const _0x4d4c0e=_0x199a68;this[_0x4d4c0e(0x22d)]['get'](C),this[_0x4d4c0e(0x22d)][_0x4d4c0e(0x23e)](p);}},N(exports[_0x199a68(0x20a)],_0x199a68(0x1f2),U),N(exports[_0x199a68(0x20a)],'type',c[_0x199a68(0x1d8)][_0x199a68(0x245)]),exports[_0x199a68(0x20a)]=W([c['DependentOn'](j[_0x199a68(0x240)],b[_0x199a68(0x23c)],T[_0x199a68(0x22e)]),O(0x1,c['Inject'](c[_0x199a68(0x227)])),O(0x2,c['IConfigService'])],exports[_0x199a68(0x20a)]);
1
+ 'use strict';const _0xf124ff=_0x5ef0;(function(_0x585e7e,_0x291910){const _0x5dfe60=_0x5ef0,_0x355a51=_0x585e7e();while(!![]){try{const _0x229670=parseInt(_0x5dfe60(0x167))/0x1*(parseInt(_0x5dfe60(0x14b))/0x2)+parseInt(_0x5dfe60(0x16d))/0x3*(parseInt(_0x5dfe60(0x180))/0x4)+-parseInt(_0x5dfe60(0x14d))/0x5*(parseInt(_0x5dfe60(0x196))/0x6)+parseInt(_0x5dfe60(0x11e))/0x7+parseInt(_0x5dfe60(0x13a))/0x8+-parseInt(_0x5dfe60(0x13c))/0x9+-parseInt(_0x5dfe60(0x130))/0xa;if(_0x229670===_0x291910)break;else _0x355a51['push'](_0x355a51['shift']());}catch(_0x367897){_0x355a51['push'](_0x355a51['shift']());}}}(_0x3dca,0x7e218));function _0x5ef0(_0x5179b8,_0x3f0cc1){const _0x3dca16=_0x3dca();return _0x5ef0=function(_0x5ef0f5,_0x6247d9){_0x5ef0f5=_0x5ef0f5-0x11e;let _0x4c2680=_0x3dca16[_0x5ef0f5];return _0x4c2680;},_0x5ef0(_0x5179b8,_0x3f0cc1);}Object[_0xf124ff(0x16a)](exports,Symbol[_0xf124ff(0x123)],{'value':_0xf124ff(0x169)});const b=require(_0xf124ff(0x144)),T=require(_0xf124ff(0x131)),c=require(_0xf124ff(0x171)),j=require(_0xf124ff(0x160)),M=require(_0xf124ff(0x159)),w=require(_0xf124ff(0x15a)),P=require('@univerjs/network'),U=_0xf124ff(0x120);var I=(_0x350366=>(_0x350366[_0x350366[_0xf124ff(0x127)]=0x0]='OpenOrReOpen',_0x350366[_0x350366['Solved']=0x1]=_0xf124ff(0x13f),_0x350366[_0x350366['UNRECOGNIZED']=-0x1]=_0xf124ff(0x199),_0x350366))(I||{}),v=(_0x44a79f=>(_0x44a79f[_0x44a79f[_0xf124ff(0x14a)]=0x0]=_0xf124ff(0x14a),_0x44a79f[_0x44a79f[_0xf124ff(0x198)]=0x1]=_0xf124ff(0x198),_0x44a79f[_0x44a79f[_0xf124ff(0x14e)]=0x2]='Reply',_0x44a79f[_0x44a79f[_0xf124ff(0x12b)]=0x3]=_0xf124ff(0x12b),_0x44a79f[_0x44a79f['Delete']=0x4]=_0xf124ff(0x128),_0x44a79f[_0x44a79f[_0xf124ff(0x168)]=0x5]=_0xf124ff(0x168),_0x44a79f[_0x44a79f[_0xf124ff(0x199)]=-0x1]='UNRECOGNIZED',_0x44a79f))(v||{});const f=_0x5b9908=>c[_0xf124ff(0x145)](new Date(+_0x5b9908))[_0xf124ff(0x16b)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x38b32d,_0x38520c)=>{const _0x4e604e=_0xf124ff,_0x41e290=_0x38b32d[_0x4e604e(0x12a)](c[_0x4e604e(0x178)]),_0x432a2d=_0x38b32d[_0x4e604e(0x12a)](P[_0x4e604e(0x186)]);_0x38520c[_0x4e604e(0x155)](_0x2e778d=>{const _0x320d89=_0x4e604e;_0x41e290[_0x320d89(0x138)](_0x2e778d)&&_0x38520c['delete'](_0x2e778d);}),_0x38520c[_0x4e604e(0x191)]&&(await _0x432a2d['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x38520c]}}))[_0x4e604e(0x177)][_0x4e604e(0x13b)][_0x4e604e(0x155)](_0x3e472f=>{const _0x6ccf03=_0x4e604e;_0x3e472f&&_0x41e290[_0x6ccf03(0x185)](_0x3e472f);});};var $=Object[_0xf124ff(0x164)],E=(_0x4c8b48,_0x420523,_0x1bcee1,_0x29b1b7)=>{const _0x2a6a69=_0xf124ff;for(var _0x1074e0=_0x29b1b7>0x1?void 0x0:_0x29b1b7?$(_0x420523,_0x1bcee1):_0x420523,_0x463820=_0x4c8b48[_0x2a6a69(0x17c)]-0x1,_0x1e87a8;_0x463820>=0x0;_0x463820--)(_0x1e87a8=_0x4c8b48[_0x463820])&&(_0x1074e0=_0x1e87a8(_0x1074e0)||_0x1074e0);return _0x1074e0;},S=(_0x3b5038,_0x1bcd59)=>(_0x4b4f2d,_0x4da563)=>_0x1bcd59(_0x4b4f2d,_0x4da563,_0x3b5038);let p=class extends c[_0xf124ff(0x193)]{constructor(_0x2b728e,_0x45b783,_0x3658dc,_0x577f9b){const _0xc33d14=_0xf124ff;super(),this['_commentService']=_0x2b728e,this['_threadCommentModel']=_0x45b783,this[_0xc33d14(0x157)]=_0x3658dc,this['_injector']=_0x577f9b,this[_0xc33d14(0x17b)](),this[_0xc33d14(0x147)]();}[_0xf124ff(0x147)](){const _0x5f4ba0=_0xf124ff;this[_0x5f4ba0(0x18a)](this['_threadCommentModel'][_0x5f4ba0(0x18e)]['pipe'](w[_0x5f4ba0(0x197)](0x10))[_0x5f4ba0(0x19a)](_0x3949e2=>{const _0x5733a2=new Set();_0x3949e2['forEach'](_0x37aed2=>{const _0x523fb9=_0x5ef0;switch(_0x37aed2[_0x523fb9(0x188)]){case _0x523fb9(0x16c):{const _0x17cdbe=_0x37aed2['payload'][_0x523fb9(0x140)];_0x5733a2[_0x523fb9(0x16c)](_0x17cdbe);break;}}}),R(this['_injector'],_0x5733a2);}));}[_0xf124ff(0x17b)](){const _0x383caf=_0xf124ff;this[_0x383caf(0x18a)](this['_commentService'][_0x383caf(0x18e)][_0x383caf(0x19a)](async _0x40f4d6=>{const _0x1a5bc4=_0x383caf;var _0x112047,_0x29e84d,_0x4f46be,_0x47d6c8;const _0x4c3fe1=(_0x112047=this[_0x1a5bc4(0x122)][_0x1a5bc4(0x183)](_0x40f4d6[_0x1a5bc4(0x181)])[_0x1a5bc4(0x156)](_0x4d0746=>_0x4d0746[_0x1a5bc4(0x150)]===_0x40f4d6[_0x1a5bc4(0x150)]))==null?void 0x0:_0x112047[_0x1a5bc4(0x13e)];if(!_0x4c3fe1)return;const {unitId:_0x39f32e,subUnitId:_0x36a661}=_0x4c3fe1;switch(_0x40f4d6[_0x1a5bc4(0x142)]&&this['_userService'][_0x1a5bc4(0x185)](_0x40f4d6[_0x1a5bc4(0x142)]),_0x40f4d6['type']){case v[_0x1a5bc4(0x198)]:break;case v[_0x1a5bc4(0x14e)]:{this[_0x1a5bc4(0x122)]['addComment'](_0x39f32e,_0x36a661,{'unitId':_0x39f32e,'subUnitId':_0x36a661,'ref':'','id':_0x40f4d6['replyId'],'dT':f(+_0x40f4d6[_0x1a5bc4(0x17e)]),'threadId':_0x40f4d6[_0x1a5bc4(0x150)],'personId':(_0x4f46be=(_0x29e84d=_0x40f4d6[_0x1a5bc4(0x142)])==null?void 0x0:_0x29e84d[_0x1a5bc4(0x152)])!=null?_0x4f46be:_0x40f4d6[_0x1a5bc4(0x153)],'text':JSON[_0x1a5bc4(0x192)](_0x40f4d6[_0x1a5bc4(0x146)]),'parentId':_0x4c3fe1['id']});break;}case v[_0x1a5bc4(0x128)]:{const _0x54351d=this[_0x1a5bc4(0x122)][_0x1a5bc4(0x187)](_0x39f32e,_0x36a661,_0x40f4d6['replyId']);_0x54351d&&_0x54351d[_0x1a5bc4(0x121)]&&this[_0x1a5bc4(0x122)][_0x1a5bc4(0x148)](_0x39f32e,_0x36a661,_0x40f4d6['replyId']);break;}case v[_0x1a5bc4(0x12b)]:{this['_threadCommentModel']['updateComment'](_0x39f32e,_0x36a661,{'commentId':_0x40f4d6[_0x1a5bc4(0x18c)],'text':JSON[_0x1a5bc4(0x192)](_0x40f4d6[_0x1a5bc4(0x146)])});break;}case v[_0x1a5bc4(0x168)]:{const _0x351748=(_0x47d6c8=this[_0x1a5bc4(0x122)][_0x1a5bc4(0x183)](_0x40f4d6[_0x1a5bc4(0x181)])[_0x1a5bc4(0x156)](_0x4b167f=>_0x4b167f[_0x1a5bc4(0x150)]===_0x40f4d6['threadId']))==null?void 0x0:_0x47d6c8[_0x1a5bc4(0x13e)];_0x351748&&this[_0x1a5bc4(0x122)][_0x1a5bc4(0x163)](_0x39f32e,_0x36a661,_0x351748['id'],_0x40f4d6[_0x1a5bc4(0x194)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0xf124ff(0x12f)](b[_0xf124ff(0x17a)])),S(0x1,c[_0xf124ff(0x12f)](M[_0xf124ff(0x132)])),S(0x2,c[_0xf124ff(0x12f)](c[_0xf124ff(0x178)])),S(0x3,c[_0xf124ff(0x12f)](c[_0xf124ff(0x14f)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0xf124ff(0x164)],x=(_0x1336ca,_0x45f01e,_0x1d4716,_0x17a8e0)=>{const _0xabf264=_0xf124ff;for(var _0x4f8623=_0x17a8e0>0x1?void 0x0:_0x17a8e0?A(_0x45f01e,_0x1d4716):_0x45f01e,_0x377640=_0x1336ca[_0xabf264(0x17c)]-0x1,_0x4bcbdc;_0x377640>=0x0;_0x377640--)(_0x4bcbdc=_0x1336ca[_0x377640])&&(_0x4f8623=_0x4bcbdc(_0x4f8623)||_0x4f8623);return _0x4f8623;},_=(_0x57e4db,_0x5e7c08)=>(_0x1b84b5,_0x25aecb)=>_0x5e7c08(_0x1b84b5,_0x25aecb,_0x57e4db);function Y(_0x3a4e44,_0xf98edf){const _0xa550b2=_0xf124ff,_0x1f876e=_0x3a4e44[_0xa550b2(0x161)][0x0];return{..._0xf98edf,'id':_0x1f876e['replyId'],'resolved':_0x3a4e44['solved']===0x1,'dT':f(_0x1f876e[_0xa550b2(0x17e)]),'personId':_0x1f876e['userId'],'threadId':_0x1f876e[_0xa550b2(0x150)]};}function G(_0x484163,_0x4d530e,_0x2893ae){const _0xe86ec2=_0xf124ff;var _0x3a7263,_0x10d915;if(((_0x10d915=(_0x3a7263=_0x484163==null?void 0x0:_0x484163['replies'])==null?void 0x0:_0x3a7263[_0xe86ec2(0x17c)])!=null?_0x10d915:0x0)>0x0){const _0x5b2fc1=(_0x12637a,_0x2dc9aa)=>({'id':_0x12637a['replyId'],'threadId':_0x12637a[_0xe86ec2(0x150)],'dT':f(_0x12637a['createTimestamp']),'personId':_0x12637a['userId'],'resolved':_0x484163[_0xe86ec2(0x194)]===I['Solved'],'unitId':_0x4d530e,'subUnitId':_0x2893ae,'text':JSON['parse'](_0x12637a[_0xe86ec2(0x146)]),'parentId':_0x2dc9aa}),_0x947db2=_0x5b2fc1(_0x484163[_0xe86ec2(0x161)][0x0]);return{..._0x947db2,'children':_0x484163[_0xe86ec2(0x161)][_0xe86ec2(0x15b)](0x1)[_0xe86ec2(0x141)](_0x4e7164=>_0x5b2fc1(_0x4e7164,_0x947db2['id']))};}return null;}let g=class{constructor(_0x501196,_0xb3c389,_0xb98f26,_0xca0452){const _0x1a485a=_0xf124ff;this[_0x1a485a(0x175)]=_0x501196,this[_0x1a485a(0x157)]=_0xb3c389,this[_0x1a485a(0x17f)]=_0xb98f26,this[_0x1a485a(0x189)]=_0xca0452;}async[_0xf124ff(0x165)](_0x16143c){const _0x107340=_0xf124ff;var _0x4cd0b1,_0x50de53;const {parentId:_0x128374,unitId:_0x146fe0,text:_0x54a495,threadId:_0x225a23}=_0x16143c,_0x1a7077=(_0x50de53=(_0x4cd0b1=_0x54a495[_0x107340(0x125)])==null?void 0x0:_0x4cd0b1[_0x107340(0x124)](_0xfe6e4f=>_0xfe6e4f[_0x107340(0x15d)]===c[_0x107340(0x136)][_0x107340(0x195)])[_0x107340(0x141)](_0x32762f=>_0x32762f[_0x107340(0x18d)]))!=null?_0x50de53:[],_0x2f5095=JSON[_0x107340(0x176)](_0x54a495),_0x3f0d8b=(await this[_0x107340(0x17f)][_0x107340(0x154)](_0x146fe0))[_0x107340(0x16f)]();if(_0x128374){const _0x185de1={'memberId':_0x3f0d8b,'unitId':_0x146fe0,'content':_0x2f5095,'mention':_0x1a7077,'threadId':_0x225a23},_0x2fa745=(await this[_0x107340(0x175)][_0x107340(0x12e)]('/universer-api/comment/unit/'+_0x146fe0+'/reply',{'body':_0x185de1}))[_0x107340(0x177)]['reply'];return{..._0x16143c,'id':_0x2fa745[_0x107340(0x18c)],'dT':c[_0x107340(0x145)](+_0x2fa745[_0x107340(0x17e)])[_0x107340(0x16b)](_0x107340(0x126)),'personId':_0x2fa745['userId']};}else{const _0x41b724={'memberId':_0x3f0d8b,'unitId':_0x146fe0,'content':_0x2f5095,'mention':_0x1a7077},_0x20ae12=await this[_0x107340(0x175)][_0x107340(0x12e)](_0x107340(0x17d)+_0x146fe0+_0x107340(0x12d),{'body':_0x41b724});return Y(_0x20ae12['body']['comment'],_0x16143c);}}async['updateComment'](_0x4dec0f){const _0xf0f9db=_0xf124ff;var _0x438cef,_0xce04e6;const {text:_0x4a2de8,unitId:_0x1000bb}=_0x4dec0f,_0x6cba5c=(_0xce04e6=(_0x438cef=_0x4a2de8[_0xf0f9db(0x125)])==null?void 0x0:_0x438cef[_0xf0f9db(0x124)](_0x1b43ee=>_0x1b43ee[_0xf0f9db(0x15d)]===c[_0xf0f9db(0x136)][_0xf0f9db(0x195)])['map'](_0x207ed8=>_0x207ed8[_0xf0f9db(0x18d)]))!=null?_0xce04e6:[],_0x53be65=JSON[_0xf0f9db(0x176)](_0x4a2de8),_0x51614e=_0x4dec0f['threadId'],_0x57da22=_0x4dec0f['id'],_0x1f7575={'memberId':(await this[_0xf0f9db(0x17f)][_0xf0f9db(0x154)](_0x1000bb))[_0xf0f9db(0x16f)](),'unitId':_0x1000bb,'threadId':_0x51614e,'mention':_0x6cba5c,'content':_0x53be65,'replyId':_0x57da22},_0x168aac=await this[_0xf0f9db(0x175)][_0xf0f9db(0x12e)](_0xf0f9db(0x17d)+_0x1000bb+'/edit',{'body':_0x1f7575});return!_0x168aac[_0xf0f9db(0x177)][_0xf0f9db(0x129)]||_0x168aac['body'][_0xf0f9db(0x129)][_0xf0f9db(0x15f)]===0x1;}async[_0xf124ff(0x163)](_0x238c3a){const _0x21d979=_0xf124ff,{unitId:_0x1cabb7}=_0x238c3a,_0x1d5991=_0x238c3a[_0x21d979(0x150)],_0x124cab={'memberId':this[_0x21d979(0x157)][_0x21d979(0x179)]()[_0x21d979(0x152)],'unitId':_0x1cabb7,'threadId':_0x1d5991,'solved':_0x238c3a[_0x21d979(0x173)]?I[_0x21d979(0x13f)]:I[_0x21d979(0x127)]},_0x50ec17=await this[_0x21d979(0x175)][_0x21d979(0x12e)]('/universer-api/comment/unit/'+_0x1cabb7+_0x21d979(0x170),{'body':_0x124cab});return!_0x50ec17[_0x21d979(0x177)]['error']||_0x50ec17[_0x21d979(0x177)][_0x21d979(0x129)][_0x21d979(0x15f)]===0x1;}async[_0xf124ff(0x148)](_0x4a0b9a,_0x12801d,_0x2d960d,_0x2aa8b1){const _0x79337b=_0xf124ff,_0x463b45={'memberId':(await this['_sessionService'][_0x79337b(0x154)](_0x4a0b9a))[_0x79337b(0x16f)](),'threadId':_0x2d960d,'replyId':_0x2aa8b1,'unitId':_0x4a0b9a},_0x3e2e73=await this[_0x79337b(0x175)][_0x79337b(0x12e)](_0x79337b(0x17d)+_0x4a0b9a+_0x79337b(0x18b),{'body':_0x463b45});return!_0x3e2e73['body']['error']||_0x3e2e73['body'][_0x79337b(0x129)][_0x79337b(0x15f)]===0x1;}async[_0xf124ff(0x13d)](_0x1a4d41,_0x399540,_0x90a1fb){const _0xa112ed=_0xf124ff,_0x5957ed={'unitId':_0x1a4d41,'threadId':_0x90a1fb},_0x4972cc=await this[_0xa112ed(0x175)][_0xa112ed(0x12e)]('/universer-api/comment/unit/'+_0x1a4d41+_0xa112ed(0x149),{'body':_0x5957ed}),_0x5cc172=_0x90a1fb[_0xa112ed(0x141)](_0x2cd44f=>G(_0x4972cc['body'][_0xa112ed(0x12c)][_0x2cd44f],_0x1a4d41,_0x399540))[_0xa112ed(0x124)](Boolean);return Object[_0xa112ed(0x151)](_0x4972cc[_0xa112ed(0x177)]['users'])[_0xa112ed(0x155)](_0x124515=>{const _0x3bd9b7=_0xa112ed;this['_userService'][_0x3bd9b7(0x185)](_0x124515);}),_0x5cc172;}[_0xf124ff(0x15c)](_0x2c3fa9){const _0x3316fe=_0xf124ff;return{'id':_0x2c3fa9['id'],'threadId':_0x2c3fa9[_0x3316fe(0x150)],'ref':_0x2c3fa9['ref']};}};g=x([_(0x0,c[_0xf124ff(0x12f)](P[_0xf124ff(0x186)])),_(0x1,c[_0xf124ff(0x12f)](c[_0xf124ff(0x178)])),_(0x2,c[_0xf124ff(0x12f)](b[_0xf124ff(0x133)])),_(0x3,c[_0xf124ff(0x12f)](c[_0xf124ff(0x14f)]))],g);var H=Object[_0xf124ff(0x164)],J=(_0x297b19,_0x345980,_0x3c1c6f,_0xee59f0)=>{const _0x295ac5=_0xf124ff;for(var _0x4d9881=_0xee59f0>0x1?void 0x0:_0xee59f0?H(_0x345980,_0x3c1c6f):_0x345980,_0x3c88=_0x297b19[_0x295ac5(0x17c)]-0x1,_0x55dab4;_0x3c88>=0x0;_0x3c88--)(_0x55dab4=_0x297b19[_0x3c88])&&(_0x4d9881=_0x55dab4(_0x4d9881)||_0x4d9881);return _0x4d9881;},y=(_0x31eacd,_0x592599)=>(_0x1beb15,_0x3ab60f)=>_0x592599(_0x1beb15,_0x3ab60f,_0x31eacd);function _0x3dca(){const _0x4d9ced=['onReady','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','parentId','_threadCommentModel','toStringTag','filter','customRanges','YYYY/MM/DD\x20HH:mm','OpenOrReOpen','Delete','error','get','Edit','comments','/add','post','Inject','7951990fJlutp','@univerjs-pro/license','ThreadCommentModel','CollaborationSessionService','UniverCollaborationClientPlugin','IThreadCommentDataSourceService','CustomRangeType','UniverLicensePlugin','getUser','UniverThreadCommentDataSourcePlugin','1962496Olbnjf','users','5125113KaSIMF','listComments','root','Solved','personId','map','user','Plugin','@univerjs-pro/collaboration-client','dayjs','content','_initUserSync','deleteComment','/list','Unknown','288PoiTYx','_threadCommentDataSource','312175XFIfIy','Reply','Injector','threadId','values','userID','userId','requireSession','forEach','find','_userService','pluginName','@univerjs/thread-comment','rxjs','slice','saveCommentToSnapshot','rangeType','dataSource','code','@univerjs/thread-comment-ui','replies','_config','resolveComment','getOwnPropertyDescriptor','addComment','_initDataSource','102LjcaaX','Solve','Module','defineProperty','format','add','579786weRXEM','_configService','getMemberID','/solved','@univerjs/core','merge','resolved','IConfigService','_httpService','stringify','body','UserManagerService','getCurrentUser','CommentService','_init','length','/universer-api/comment/unit/','createTimestamp','_sessionService','20NYUDpC','unitId','_threadCommentDataSourceService','getUnit','UniverThreadCommentUIPlugin','addUser','HTTPService','getComment','type','_injector','disposeWithMe','/delete','replyId','rangeId','commentUpdate$','UniverInstanceType','syncUpdateMutationToColla','size','parse','Disposable','solved','COMMENT','12yLKmMM','bufferTime','Add','UNRECOGNIZED','subscribe','5458936MoIIUB'];_0x3dca=function(){return _0x4d9ced;};return _0x3dca();}let C=class extends c['Disposable']{constructor(_0x2727d9,_0x27b0d5){const _0x102d08=_0xf124ff;super(),this[_0x102d08(0x182)]=_0x2727d9,this['_threadCommentDataSource']=_0x27b0d5,this[_0x102d08(0x166)]();}[_0xf124ff(0x166)](){const _0x47a7ee=_0xf124ff;this['_threadCommentDataSourceService'][_0x47a7ee(0x15e)]=this[_0x47a7ee(0x14c)],this[_0x47a7ee(0x182)][_0x47a7ee(0x190)]=!0x1;}};C=J([y(0x0,M[_0xf124ff(0x135)]),y(0x1,c[_0xf124ff(0x12f)](g))],C);var F=Object[_0xf124ff(0x16a)],L=Object['getOwnPropertyDescriptor'],Z=(_0xdf46aa,_0x14d318,_0xbc7789)=>_0x14d318 in _0xdf46aa?F(_0xdf46aa,_0x14d318,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xbc7789}):_0xdf46aa[_0x14d318]=_0xbc7789,W=(_0x275081,_0xf1d01,_0x2d623c,_0x2826e1)=>{const _0x113767=_0xf124ff;for(var _0x2c4cde=_0x2826e1>0x1?void 0x0:_0x2826e1?L(_0xf1d01,_0x2d623c):_0xf1d01,_0x33c150=_0x275081[_0x113767(0x17c)]-0x1,_0x4eceb7;_0x33c150>=0x0;_0x33c150--)(_0x4eceb7=_0x275081[_0x33c150])&&(_0x2c4cde=_0x4eceb7(_0x2c4cde)||_0x2c4cde);return _0x2c4cde;},O=(_0x425cfc,_0x2df940)=>(_0x355066,_0x3d64d0)=>_0x2df940(_0x355066,_0x3d64d0,_0x425cfc),N=(_0xd44e77,_0x3b5c21,_0x59367a)=>Z(_0xd44e77,typeof _0x3b5c21!='symbol'?_0x3b5c21+'':_0x3b5c21,_0x59367a);exports[_0xf124ff(0x139)]=class extends c[_0xf124ff(0x143)]{constructor(_0x4ab69e=D,_0x1eb900,_0x1cd81e){const _0x245c57=_0xf124ff;super(),this[_0x245c57(0x162)]=_0x4ab69e,this[_0x245c57(0x189)]=_0x1eb900,this[_0x245c57(0x16e)]=_0x1cd81e;const {..._0x3dbf15}=c[_0x245c57(0x172)]({},D,this[_0x245c57(0x162)]);this[_0x245c57(0x16e)]['setConfig'](q,_0x3dbf15);}['onStarting'](){[[g],[C],[p]]['forEach'](_0x449752=>{const _0x23c727=_0x5ef0;this[_0x23c727(0x189)]['add'](_0x449752);});}[_0xf124ff(0x11f)](){const _0x447087=_0xf124ff;this[_0x447087(0x189)][_0x447087(0x12a)](C),this[_0x447087(0x189)][_0x447087(0x12a)](p);}},N(exports[_0xf124ff(0x139)],_0xf124ff(0x158),U),N(exports['UniverThreadCommentDataSourcePlugin'],'type',c[_0xf124ff(0x18f)]['UNIVER_UNKNOWN']),exports[_0xf124ff(0x139)]=W([c['DependentOn'](j[_0xf124ff(0x184)],b[_0xf124ff(0x134)],T[_0xf124ff(0x137)]),O(0x1,c[_0xf124ff(0x12f)](c[_0xf124ff(0x14f)])),O(0x2,c[_0xf124ff(0x174)])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x4e06ef=_0x3080;(function(_0x38c186,_0x3d8d72){const _0x30d6f2=_0x3080,_0x187865=_0x38c186();while(!![]){try{const _0x14b94e=parseInt(_0x30d6f2(0x195))/0x1*(parseInt(_0x30d6f2(0x178))/0x2)+parseInt(_0x30d6f2(0x173))/0x3+-parseInt(_0x30d6f2(0x158))/0x4*(parseInt(_0x30d6f2(0x166))/0x5)+-parseInt(_0x30d6f2(0x199))/0x6+parseInt(_0x30d6f2(0x16e))/0x7+-parseInt(_0x30d6f2(0x16a))/0x8+-parseInt(_0x30d6f2(0x15a))/0x9*(-parseInt(_0x30d6f2(0x137))/0xa);if(_0x14b94e===_0x3d8d72)break;else _0x187865['push'](_0x187865['shift']());}catch(_0x225bef){_0x187865['push'](_0x187865['shift']());}}}(_0x5993,0x45107));import{CommentService as _0x31cd0a,CollaborationSessionService as _0x4c4e6e,UniverCollaborationClientPlugin as _0x571e91}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4d5765}from'@univerjs-pro/license';import{dayjs as _0x456f15,UserManagerService as _0x34b56b,Inject as _0x542cd4,Injector as _0x2e2c1d,Disposable as _0x252bc6,CustomRangeType as _0x390935,UniverInstanceType as _0x10dc0a,DependentOn as _0x3a69bd,IConfigService as _0x29ffb3,Plugin as _0xc29b4f,merge as _0x1882a1}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x492f5e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4d7437,IThreadCommentDataSourceService as _0x207718}from'@univerjs/thread-comment';import{bufferTime as _0x5bfb61}from'rxjs';import{HTTPService as _0x54f72f}from'@univerjs/network';const W=_0x4e06ef(0x198);var I=(_0x2604c1=>(_0x2604c1[_0x2604c1['OpenOrReOpen']=0x0]=_0x4e06ef(0x184),_0x2604c1[_0x2604c1[_0x4e06ef(0x15d)]=0x1]=_0x4e06ef(0x15d),_0x2604c1[_0x2604c1[_0x4e06ef(0x159)]=-0x1]=_0x4e06ef(0x159),_0x2604c1))(I||{}),v=(_0x52f08c=>(_0x52f08c[_0x52f08c['Unknown']=0x0]=_0x4e06ef(0x194),_0x52f08c[_0x52f08c['Add']=0x1]=_0x4e06ef(0x18f),_0x52f08c[_0x52f08c['Reply']=0x2]='Reply',_0x52f08c[_0x52f08c['Edit']=0x3]=_0x4e06ef(0x197),_0x52f08c[_0x52f08c[_0x4e06ef(0x181)]=0x4]='Delete',_0x52f08c[_0x52f08c['Solve']=0x5]=_0x4e06ef(0x177),_0x52f08c[_0x52f08c[_0x4e06ef(0x159)]=-0x1]=_0x4e06ef(0x159),_0x52f08c))(v||{});const D=_0x24124d=>_0x456f15(new Date(+_0x24124d))[_0x4e06ef(0x172)](_0x4e06ef(0x154)),B=async(_0x58e51e,_0x377f08)=>{const _0x5eebaa=_0x4e06ef,_0x23abfb=_0x58e51e[_0x5eebaa(0x189)](_0x34b56b),_0xca5f99=_0x58e51e[_0x5eebaa(0x189)](_0x54f72f);_0x377f08[_0x5eebaa(0x176)](_0x5edb8f=>{const _0x21c574=_0x5eebaa;_0x23abfb[_0x21c574(0x141)](_0x5edb8f)&&_0x377f08[_0x21c574(0x163)](_0x5edb8f);}),_0x377f08[_0x5eebaa(0x188)]&&(await _0xca5f99[_0x5eebaa(0x189)](_0x5eebaa(0x167),{'params':{'userIDs':[..._0x377f08]}}))[_0x5eebaa(0x14f)][_0x5eebaa(0x146)][_0x5eebaa(0x176)](_0x284d42=>{const _0x4d9ba7=_0x5eebaa;_0x284d42&&_0x23abfb[_0x4d9ba7(0x14e)](_0x284d42);});};var K=Object[_0x4e06ef(0x180)],V=(_0x593c82,_0x5ed532,_0x221dbd,_0x14d6a5)=>{for(var _0x104e18=_0x14d6a5>0x1?void 0x0:_0x14d6a5?K(_0x5ed532,_0x221dbd):_0x5ed532,_0x22a379=_0x593c82['length']-0x1,_0x1d6b82;_0x22a379>=0x0;_0x22a379--)(_0x1d6b82=_0x593c82[_0x22a379])&&(_0x104e18=_0x1d6b82(_0x104e18)||_0x104e18);return _0x104e18;},p=(_0x516ece,_0xc82d23)=>(_0x2499bf,_0x35e1be)=>_0xc82d23(_0x2499bf,_0x35e1be,_0x516ece);let S=class extends _0x252bc6{constructor(_0x574e30,_0x2b8db0,_0x38e2fa,_0x142d00){const _0x250219=_0x4e06ef;super(),this[_0x250219(0x151)]=_0x574e30,this[_0x250219(0x183)]=_0x2b8db0,this['_userService']=_0x38e2fa,this[_0x250219(0x160)]=_0x142d00,this[_0x250219(0x15b)](),this['_initUserSync']();}['_initUserSync'](){const _0x1d0fa2=_0x4e06ef;this[_0x1d0fa2(0x17e)](this[_0x1d0fa2(0x183)][_0x1d0fa2(0x16c)][_0x1d0fa2(0x174)](_0x5bfb61(0x10))['subscribe'](_0x17bbd6=>{const _0x2e4acb=_0x1d0fa2,_0x331ce6=new Set();_0x17bbd6[_0x2e4acb(0x176)](_0x1911a8=>{const _0x348a1f=_0x2e4acb;switch(_0x1911a8['type']){case _0x348a1f(0x139):{const _0x59ddff=_0x1911a8['payload']['personId'];_0x331ce6[_0x348a1f(0x139)](_0x59ddff);break;}}}),B(this[_0x2e4acb(0x160)],_0x331ce6);}));}[_0x4e06ef(0x15b)](){const _0xc3a05b=_0x4e06ef;this[_0xc3a05b(0x17e)](this[_0xc3a05b(0x151)][_0xc3a05b(0x16c)][_0xc3a05b(0x18d)](async _0x5d8cba=>{const _0x26f47a=_0xc3a05b;var _0x49d98e,_0x75f1d8,_0x462858,_0x4b33bc;const _0x19300f=(_0x49d98e=this['_threadCommentModel'][_0x26f47a(0x16b)](_0x5d8cba[_0x26f47a(0x16d)])['find'](_0x3baa28=>_0x3baa28[_0x26f47a(0x152)]===_0x5d8cba[_0x26f47a(0x152)]))==null?void 0x0:_0x49d98e[_0x26f47a(0x185)];if(!_0x19300f)return;const {unitId:_0xbefc51,subUnitId:_0x3c9237}=_0x19300f;switch(_0x5d8cba['user']&&this[_0x26f47a(0x136)][_0x26f47a(0x14e)](_0x5d8cba[_0x26f47a(0x175)]),_0x5d8cba['type']){case v[_0x26f47a(0x18f)]:break;case v[_0x26f47a(0x140)]:{this['_threadCommentModel'][_0x26f47a(0x13f)](_0xbefc51,_0x3c9237,{'unitId':_0xbefc51,'subUnitId':_0x3c9237,'ref':'','id':_0x5d8cba[_0x26f47a(0x161)],'dT':D(+_0x5d8cba[_0x26f47a(0x17b)]),'threadId':_0x5d8cba['threadId'],'personId':(_0x462858=(_0x75f1d8=_0x5d8cba[_0x26f47a(0x175)])==null?void 0x0:_0x75f1d8['userID'])!=null?_0x462858:_0x5d8cba[_0x26f47a(0x147)],'text':JSON[_0x26f47a(0x157)](_0x5d8cba['content']),'parentId':_0x19300f['id']});break;}case v[_0x26f47a(0x181)]:{const _0x3c5fc6=this[_0x26f47a(0x183)][_0x26f47a(0x13a)](_0xbefc51,_0x3c9237,_0x5d8cba['replyId']);_0x3c5fc6&&_0x3c5fc6['parentId']&&this[_0x26f47a(0x183)][_0x26f47a(0x192)](_0xbefc51,_0x3c9237,_0x5d8cba[_0x26f47a(0x161)]);break;}case v[_0x26f47a(0x197)]:{this[_0x26f47a(0x183)][_0x26f47a(0x13d)](_0xbefc51,_0x3c9237,{'commentId':_0x5d8cba[_0x26f47a(0x161)],'text':JSON[_0x26f47a(0x157)](_0x5d8cba[_0x26f47a(0x171)])});break;}case v[_0x26f47a(0x177)]:{const _0x2d2504=(_0x4b33bc=this[_0x26f47a(0x183)][_0x26f47a(0x16b)](_0x5d8cba[_0x26f47a(0x16d)])['find'](_0x42b609=>_0x42b609[_0x26f47a(0x152)]===_0x5d8cba[_0x26f47a(0x152)]))==null?void 0x0:_0x4b33bc[_0x26f47a(0x185)];_0x2d2504&&this[_0x26f47a(0x183)][_0x26f47a(0x162)](_0xbefc51,_0x3c9237,_0x2d2504['id'],_0x5d8cba['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x542cd4(_0x31cd0a)),p(0x1,_0x542cd4(_0x4d7437)),p(0x2,_0x542cd4(_0x34b56b)),p(0x3,_0x542cd4(_0x2e2c1d))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x4e06ef(0x180)],Q=(_0x48d3c6,_0x50f2c6,_0x506657,_0x38f068)=>{const _0x40b2f2=_0x4e06ef;for(var _0x43b3fe=_0x38f068>0x1?void 0x0:_0x38f068?k(_0x50f2c6,_0x506657):_0x50f2c6,_0x4716a6=_0x48d3c6[_0x40b2f2(0x18a)]-0x1,_0xb5bcd3;_0x4716a6>=0x0;_0x4716a6--)(_0xb5bcd3=_0x48d3c6[_0x4716a6])&&(_0x43b3fe=_0xb5bcd3(_0x43b3fe)||_0x43b3fe);return _0x43b3fe;},_=(_0x5269a4,_0x33061b)=>(_0x5ef270,_0x2842a0)=>_0x33061b(_0x5ef270,_0x2842a0,_0x5269a4);function X(_0x2b2449,_0x468ed0){const _0x56463a=_0x4e06ef,_0x104cc3=_0x2b2449[_0x56463a(0x187)][0x0];return{..._0x468ed0,'id':_0x104cc3[_0x56463a(0x161)],'resolved':_0x2b2449['solved']===0x1,'dT':D(_0x104cc3[_0x56463a(0x17b)]),'personId':_0x104cc3[_0x56463a(0x147)],'threadId':_0x104cc3['threadId']};}function ee(_0xe4d8cb,_0x31115c,_0x4a9a5c){const _0x346ab3=_0x4e06ef;var _0x5429a7,_0x15c925;if(((_0x15c925=(_0x5429a7=_0xe4d8cb==null?void 0x0:_0xe4d8cb['replies'])==null?void 0x0:_0x5429a7[_0x346ab3(0x18a)])!=null?_0x15c925:0x0)>0x0){const _0x2666f4=(_0x43007e,_0x4a87c1)=>({'id':_0x43007e['replyId'],'threadId':_0x43007e[_0x346ab3(0x152)],'dT':D(_0x43007e[_0x346ab3(0x17b)]),'personId':_0x43007e[_0x346ab3(0x147)],'resolved':_0xe4d8cb[_0x346ab3(0x186)]===I['Solved'],'unitId':_0x31115c,'subUnitId':_0x4a9a5c,'text':JSON[_0x346ab3(0x157)](_0x43007e[_0x346ab3(0x171)]),'parentId':_0x4a87c1}),_0x2dd370=_0x2666f4(_0xe4d8cb[_0x346ab3(0x187)][0x0]);return{..._0x2dd370,'children':_0xe4d8cb[_0x346ab3(0x187)][_0x346ab3(0x17a)](0x1)[_0x346ab3(0x143)](_0x56b2eb=>_0x2666f4(_0x56b2eb,_0x2dd370['id']))};}return null;}let f=class{constructor(_0x11edcd,_0x2caa32,_0x16728a,_0x186f6c){const _0x216f42=_0x4e06ef;this[_0x216f42(0x18c)]=_0x11edcd,this[_0x216f42(0x136)]=_0x2caa32,this[_0x216f42(0x193)]=_0x16728a,this[_0x216f42(0x160)]=_0x186f6c;}async[_0x4e06ef(0x13f)](_0x4dfb4b){const _0x5dcd0c=_0x4e06ef;var _0x4036d3,_0xa697b9;const {parentId:_0x2e493f,unitId:_0x5b5d97,text:_0x58908b,threadId:_0x4f7e76}=_0x4dfb4b,_0xd3e3cf=(_0xa697b9=(_0x4036d3=_0x58908b[_0x5dcd0c(0x18b)])==null?void 0x0:_0x4036d3[_0x5dcd0c(0x179)](_0x59e3f5=>_0x59e3f5[_0x5dcd0c(0x153)]===_0x390935[_0x5dcd0c(0x170)])[_0x5dcd0c(0x143)](_0x115ee0=>_0x115ee0['rangeId']))!=null?_0xa697b9:[],_0x2ac442=JSON['stringify'](_0x58908b),_0x597e32=(await this[_0x5dcd0c(0x193)][_0x5dcd0c(0x148)](_0x5b5d97))[_0x5dcd0c(0x145)]();if(_0x2e493f){const _0x5431a8={'memberId':_0x597e32,'unitId':_0x5b5d97,'content':_0x2ac442,'mention':_0xd3e3cf,'threadId':_0x4f7e76},_0x26a7da=(await this[_0x5dcd0c(0x18c)][_0x5dcd0c(0x15c)]('/universer-api/comment/unit/'+_0x5b5d97+'/reply',{'body':_0x5431a8}))[_0x5dcd0c(0x14f)][_0x5dcd0c(0x14b)];return{..._0x4dfb4b,'id':_0x26a7da[_0x5dcd0c(0x161)],'dT':_0x456f15(+_0x26a7da[_0x5dcd0c(0x17b)])['format'](_0x5dcd0c(0x154)),'personId':_0x26a7da[_0x5dcd0c(0x147)]};}else{const _0x37e1ac={'memberId':_0x597e32,'unitId':_0x5b5d97,'content':_0x2ac442,'mention':_0xd3e3cf},_0x5dac03=await this[_0x5dcd0c(0x18c)][_0x5dcd0c(0x15c)](_0x5dcd0c(0x17d)+_0x5b5d97+_0x5dcd0c(0x13e),{'body':_0x37e1ac});return X(_0x5dac03['body']['comment'],_0x4dfb4b);}}async['updateComment'](_0x40df76){const _0x3384dd=_0x4e06ef;var _0x1c40d6,_0x2ebbfa;const {text:_0x4e0b68,unitId:_0x3650b3}=_0x40df76,_0x24f922=(_0x2ebbfa=(_0x1c40d6=_0x4e0b68[_0x3384dd(0x18b)])==null?void 0x0:_0x1c40d6['filter'](_0x3dc1c9=>_0x3dc1c9[_0x3384dd(0x153)]===_0x390935['COMMENT'])[_0x3384dd(0x143)](_0x270c4b=>_0x270c4b[_0x3384dd(0x17c)]))!=null?_0x2ebbfa:[],_0x7eb67f=JSON[_0x3384dd(0x13b)](_0x4e0b68),_0x4725ec=_0x40df76[_0x3384dd(0x152)],_0x19265a=_0x40df76['id'],_0x4ace34={'memberId':(await this[_0x3384dd(0x193)][_0x3384dd(0x148)](_0x3650b3))[_0x3384dd(0x145)](),'unitId':_0x3650b3,'threadId':_0x4725ec,'mention':_0x24f922,'content':_0x7eb67f,'replyId':_0x19265a},_0x146f8e=await this[_0x3384dd(0x18c)][_0x3384dd(0x15c)](_0x3384dd(0x17d)+_0x3650b3+_0x3384dd(0x144),{'body':_0x4ace34});return!_0x146f8e[_0x3384dd(0x14f)]['error']||_0x146f8e[_0x3384dd(0x14f)][_0x3384dd(0x155)][_0x3384dd(0x15e)]===0x1;}async[_0x4e06ef(0x162)](_0x415bb8){const _0x126233=_0x4e06ef,{unitId:_0x628bb1}=_0x415bb8,_0x5caff8=_0x415bb8[_0x126233(0x152)],_0x2836e7={'memberId':this[_0x126233(0x136)][_0x126233(0x168)]()[_0x126233(0x196)],'unitId':_0x628bb1,'threadId':_0x5caff8,'solved':_0x415bb8[_0x126233(0x17f)]?I[_0x126233(0x15d)]:I[_0x126233(0x184)]},_0x74857d=await this['_httpService'][_0x126233(0x15c)](_0x126233(0x17d)+_0x628bb1+_0x126233(0x182),{'body':_0x2836e7});return!_0x74857d[_0x126233(0x14f)]['error']||_0x74857d[_0x126233(0x14f)][_0x126233(0x155)][_0x126233(0x15e)]===0x1;}async[_0x4e06ef(0x192)](_0x467a2a,_0x570cb3,_0x322a66,_0x267f73){const _0x22a226=_0x4e06ef,_0x5dbdec={'memberId':(await this[_0x22a226(0x193)][_0x22a226(0x148)](_0x467a2a))['getMemberID'](),'threadId':_0x322a66,'replyId':_0x267f73,'unitId':_0x467a2a},_0x55bf8b=await this[_0x22a226(0x18c)][_0x22a226(0x15c)](_0x22a226(0x17d)+_0x467a2a+_0x22a226(0x14c),{'body':_0x5dbdec});return!_0x55bf8b['body'][_0x22a226(0x155)]||_0x55bf8b['body'][_0x22a226(0x155)]['code']===0x1;}async[_0x4e06ef(0x138)](_0x1e5329,_0x43b76e,_0x232072){const _0x2b5378=_0x4e06ef,_0x47f7b6={'unitId':_0x1e5329,'threadId':_0x232072},_0x508e8b=await this[_0x2b5378(0x18c)]['post'](_0x2b5378(0x17d)+_0x1e5329+'/list',{'body':_0x47f7b6}),_0x434ae9=_0x232072[_0x2b5378(0x143)](_0x5057b5=>ee(_0x508e8b[_0x2b5378(0x14f)][_0x2b5378(0x191)][_0x5057b5],_0x1e5329,_0x43b76e))['filter'](Boolean);return Object[_0x2b5378(0x142)](_0x508e8b[_0x2b5378(0x14f)]['users'])[_0x2b5378(0x176)](_0x55951a=>{const _0x4f03df=_0x2b5378;this['_userService'][_0x4f03df(0x14e)](_0x55951a);}),_0x434ae9;}[_0x4e06ef(0x150)](_0x4bc862){const _0x26ea4f=_0x4e06ef;return{'id':_0x4bc862['id'],'threadId':_0x4bc862[_0x26ea4f(0x152)],'ref':_0x4bc862[_0x26ea4f(0x165)]};}};function _0x5993(){const _0x1e1a5e=['onReady','comments','deleteComment','_sessionService','Unknown','88106iVctpm','userID','Edit','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','693816IwmNRk','_userService','90680Jwztwd','listComments','add','getComment','stringify','defineProperty','updateComment','/add','addComment','Reply','getUser','values','map','/edit','getMemberID','users','userId','requireSession','symbol','_initDataSource','reply','/delete','_threadCommentDataSource','addUser','body','saveCommentToSnapshot','_commentService','threadId','rangeType','YYYY/MM/DD\x20HH:mm','error','dataSource','parse','4TIKfaB','UNRECOGNIZED','162glzIXj','_init','post','Solved','code','_threadCommentDataSourceService','_injector','replyId','resolveComment','delete','_config','ref','1448170XAzpEz','/universer-api/user/list','getCurrentUser','UNIVER_UNKNOWN','463760MYLhxK','getUnit','commentUpdate$','unitId','2066134hMUIew','_configService','COMMENT','content','format','334587NfBPdd','pipe','user','forEach','Solve','4XQcaOW','filter','slice','createTimestamp','rangeId','/universer-api/comment/unit/','disposeWithMe','resolved','getOwnPropertyDescriptor','Delete','/solved','_threadCommentModel','OpenOrReOpen','root','solved','replies','size','get','length','customRanges','_httpService','subscribe','setConfig','Add'];_0x5993=function(){return _0x1e1a5e;};return _0x5993();}f=Q([_(0x0,_0x542cd4(_0x54f72f)),_(0x1,_0x542cd4(_0x34b56b)),_(0x2,_0x542cd4(_0x4c4e6e)),_(0x3,_0x542cd4(_0x2e2c1d))],f);var re=Object[_0x4e06ef(0x180)],te=(_0x3a7e28,_0xcfd556,_0x462bb2,_0x501513)=>{for(var _0x3b0da8=_0x501513>0x1?void 0x0:_0x501513?re(_0xcfd556,_0x462bb2):_0xcfd556,_0x4342d5=_0x3a7e28['length']-0x1,_0x30df20;_0x4342d5>=0x0;_0x4342d5--)(_0x30df20=_0x3a7e28[_0x4342d5])&&(_0x3b0da8=_0x30df20(_0x3b0da8)||_0x3b0da8);return _0x3b0da8;},N=(_0x5b05fd,_0x4aca87)=>(_0xd6bb5,_0x3751a0)=>_0x4aca87(_0xd6bb5,_0x3751a0,_0x5b05fd);let g=class extends _0x252bc6{constructor(_0x1923aa,_0x5a563d){const _0x1c7321=_0x4e06ef;super(),this['_threadCommentDataSourceService']=_0x1923aa,this[_0x1c7321(0x14d)]=_0x5a563d,this['_initDataSource']();}[_0x4e06ef(0x14a)](){const _0x56304b=_0x4e06ef;this[_0x56304b(0x15f)][_0x56304b(0x156)]=this[_0x56304b(0x14d)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x207718),N(0x1,_0x542cd4(f))],g);var se=Object[_0x4e06ef(0x13c)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x4d17a9,_0x4e6bfa,_0x5e4b57)=>_0x4e6bfa in _0x4d17a9?se(_0x4d17a9,_0x4e6bfa,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5e4b57}):_0x4d17a9[_0x4e6bfa]=_0x5e4b57,ie=(_0x1cfa35,_0x31ce85,_0x10b909,_0x20b8c6)=>{const _0x5d8e16=_0x4e06ef;for(var _0xfa93f2=_0x20b8c6>0x1?void 0x0:_0x20b8c6?oe(_0x31ce85,_0x10b909):_0x31ce85,_0x4e3e0c=_0x1cfa35[_0x5d8e16(0x18a)]-0x1,_0x42d89e;_0x4e3e0c>=0x0;_0x4e3e0c--)(_0x42d89e=_0x1cfa35[_0x4e3e0c])&&(_0xfa93f2=_0x42d89e(_0xfa93f2)||_0xfa93f2);return _0xfa93f2;},w=(_0x309a91,_0x56a48d)=>(_0x30c142,_0x483b79)=>_0x56a48d(_0x30c142,_0x483b79,_0x309a91),$=(_0x1e5eb3,_0x752b63,_0x466d34)=>ne(_0x1e5eb3,typeof _0x752b63!=_0x4e06ef(0x149)?_0x752b63+'':_0x752b63,_0x466d34);let b=class extends _0xc29b4f{constructor(_0x423dbd=M,_0x416525,_0x5a50ae){const _0x59797e=_0x4e06ef;super(),this[_0x59797e(0x164)]=_0x423dbd,this[_0x59797e(0x160)]=_0x416525,this[_0x59797e(0x16f)]=_0x5a50ae;const {..._0x4c380d}=_0x1882a1({},M,this[_0x59797e(0x164)]);this[_0x59797e(0x16f)][_0x59797e(0x18e)](z,_0x4c380d);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x340c23=>{const _0x39d369=_0x3080;this[_0x39d369(0x160)]['add'](_0x340c23);});}[_0x4e06ef(0x190)](){const _0x16de0c=_0x4e06ef;this[_0x16de0c(0x160)]['get'](g),this['_injector'][_0x16de0c(0x189)](S);}};$(b,'pluginName',W),$(b,'type',_0x10dc0a[_0x4e06ef(0x169)]),b=ie([_0x3a69bd(_0x492f5e,_0x571e91,_0x4d5765),w(0x1,_0x542cd4(_0x2e2c1d)),w(0x2,_0x29ffb3)],b);function _0x3080(_0x3050e0,_0x2c1261){const _0x5993f7=_0x5993();return _0x3080=function(_0x30808d,_0x179306){_0x30808d=_0x30808d-0x136;let _0x1f1ffb=_0x5993f7[_0x30808d];return _0x1f1ffb;},_0x3080(_0x3050e0,_0x2c1261);}export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x29c532=_0x4ce5;(function(_0x52bca0,_0x232706){const _0x65c7d4=_0x4ce5,_0x5c42b1=_0x52bca0();while(!![]){try{const _0x3857cf=-parseInt(_0x65c7d4(0xa7))/0x1+parseInt(_0x65c7d4(0xa2))/0x2+-parseInt(_0x65c7d4(0xb5))/0x3*(-parseInt(_0x65c7d4(0xab))/0x4)+parseInt(_0x65c7d4(0xca))/0x5+parseInt(_0x65c7d4(0xeb))/0x6+-parseInt(_0x65c7d4(0xe3))/0x7*(-parseInt(_0x65c7d4(0xd6))/0x8)+-parseInt(_0x65c7d4(0xe5))/0x9;if(_0x3857cf===_0x232706)break;else _0x5c42b1['push'](_0x5c42b1['shift']());}catch(_0x3c47a1){_0x5c42b1['push'](_0x5c42b1['shift']());}}}(_0x5b4d,0xba522));function _0x5b4d(){const _0x44d3da=['_threadCommentModel','map','subscribe','1063107dehiSt','Delete','ref','root','68zqLSiB','getOwnPropertyDescriptor','resolveComment','find','Unknown','_config','UNRECOGNIZED','comments','replyId','add','90780LsLwNc','slice','commentUpdate$','solved','length','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Solve','_threadCommentDataSource','body','_httpService','syncUpdateMutationToColla','Solved','requireSession','OpenOrReOpen','/list','unitId','reply','personId','type','users','forEach','897490PtgGBB','pipe','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','_initUserSync','values','disposeWithMe','size','parentId','getUnit','code','_init','8pBgNEN','_initDataSource','userId','Edit','_commentService','deleteComment','_injector','createTimestamp','updateComment','rangeId','userID','get','onStarting','6103937Yyiers','listComments','13741668AqHWyJ','rangeType','_configService','/universer-api/user/list','resolved','getMemberID','3253434kJYpUO','pluginName','_sessionService','delete','getCurrentUser','UNIVER_UNKNOWN','filter','getUser','/add','/delete','format','error','replies','user','symbol','dataSource','COMMENT','getComment','/universer-api/comment/unit/','Add','threadId','payload','/edit','content','parse','Reply','_userService','post','saveCommentToSnapshot','addUser','2489962bdFMCt','thread-comment-data-source.config'];_0x5b4d=function(){return _0x44d3da;};return _0x5b4d();}import{CommentService as _0x103fa9,CollaborationSessionService as _0x4f8e15,UniverCollaborationClientPlugin as _0x481daf}from'@univerjs-pro/collaboration-client';function _0x4ce5(_0x2a1eb6,_0x57d14a){const _0x5b4d1f=_0x5b4d();return _0x4ce5=function(_0x4ce536,_0x2982d0){_0x4ce536=_0x4ce536-0xa2;let _0x52c1f2=_0x5b4d1f[_0x4ce536];return _0x52c1f2;},_0x4ce5(_0x2a1eb6,_0x57d14a);}import{UniverLicensePlugin as _0x43c9dc}from'@univerjs-pro/license';import{dayjs as _0x19122e,UserManagerService as _0x565a3d,Inject as _0x3ac3e1,Injector as _0x3a679c,Disposable as _0xeebaba,CustomRangeType as _0x2fe7dd,UniverInstanceType as _0x4292e6,DependentOn as _0x346c46,IConfigService as _0x971ad0,Plugin as _0x42c9b8,merge as _0x56342c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x177aec}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1be085,IThreadCommentDataSourceService as _0x99ca19}from'@univerjs/thread-comment';import{bufferTime as _0x264a79}from'rxjs';import{HTTPService as _0x172eaa}from'@univerjs/network';const W=_0x29c532(0xba);var I=(_0x36a2a5=>(_0x36a2a5[_0x36a2a5['OpenOrReOpen']=0x0]=_0x29c532(0xc2),_0x36a2a5[_0x36a2a5[_0x29c532(0xc0)]=0x1]='Solved',_0x36a2a5[_0x36a2a5['UNRECOGNIZED']=-0x1]=_0x29c532(0xb1),_0x36a2a5))(I||{}),v=(_0x5b6a4f=>(_0x5b6a4f[_0x5b6a4f[_0x29c532(0xaf)]=0x0]=_0x29c532(0xaf),_0x5b6a4f[_0x5b6a4f[_0x29c532(0xfe)]=0x1]=_0x29c532(0xfe),_0x5b6a4f[_0x5b6a4f[_0x29c532(0x104)]=0x2]='Reply',_0x5b6a4f[_0x5b6a4f['Edit']=0x3]=_0x29c532(0xd9),_0x5b6a4f[_0x5b6a4f[_0x29c532(0xa8)]=0x4]=_0x29c532(0xa8),_0x5b6a4f[_0x5b6a4f[_0x29c532(0xbb)]=0x5]=_0x29c532(0xbb),_0x5b6a4f[_0x5b6a4f[_0x29c532(0xb1)]=-0x1]=_0x29c532(0xb1),_0x5b6a4f))(v||{});const D=_0x300d84=>_0x19122e(new Date(+_0x300d84))[_0x29c532(0xf5)](_0x29c532(0xcc)),B=async(_0x139fe2,_0x1b091d)=>{const _0x122f06=_0x29c532,_0x1479d5=_0x139fe2[_0x122f06(0xe1)](_0x565a3d),_0x504296=_0x139fe2[_0x122f06(0xe1)](_0x172eaa);_0x1b091d[_0x122f06(0xc9)](_0x3d1fe8=>{const _0x12fd03=_0x122f06;_0x1479d5[_0x12fd03(0xf2)](_0x3d1fe8)&&_0x1b091d[_0x12fd03(0xee)](_0x3d1fe8);}),_0x1b091d[_0x122f06(0xd1)]&&(await _0x504296[_0x122f06(0xe1)](_0x122f06(0xe8),{'params':{'userIDs':[..._0x1b091d]}}))['body'][_0x122f06(0xc8)][_0x122f06(0xc9)](_0x5e28a5=>{const _0x57452d=_0x122f06;_0x5e28a5&&_0x1479d5[_0x57452d(0x108)](_0x5e28a5);});};var K=Object['getOwnPropertyDescriptor'],V=(_0xeea43b,_0x3ccbda,_0x24eb5a,_0x3b40b8)=>{for(var _0x132f9a=_0x3b40b8>0x1?void 0x0:_0x3b40b8?K(_0x3ccbda,_0x24eb5a):_0x3ccbda,_0x38a372=_0xeea43b['length']-0x1,_0x4212ef;_0x38a372>=0x0;_0x38a372--)(_0x4212ef=_0xeea43b[_0x38a372])&&(_0x132f9a=_0x4212ef(_0x132f9a)||_0x132f9a);return _0x132f9a;},p=(_0x5a8712,_0x515a00)=>(_0x8062cd,_0x49d726)=>_0x515a00(_0x8062cd,_0x49d726,_0x5a8712);let S=class extends _0xeebaba{constructor(_0x53e590,_0x17da06,_0x411119,_0x1d06e4){const _0x4f4bcf=_0x29c532;super(),this[_0x4f4bcf(0xda)]=_0x53e590,this[_0x4f4bcf(0xa4)]=_0x17da06,this[_0x4f4bcf(0x105)]=_0x411119,this[_0x4f4bcf(0xdc)]=_0x1d06e4,this['_init'](),this[_0x4f4bcf(0xce)]();}[_0x29c532(0xce)](){const _0x376d86=_0x29c532;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$'][_0x376d86(0xcb)](_0x264a79(0x10))[_0x376d86(0xa6)](_0x1a3a54=>{const _0x50b0dc=_0x376d86,_0x88e56e=new Set();_0x1a3a54[_0x50b0dc(0xc9)](_0x46d763=>{const _0xa24d4d=_0x50b0dc;switch(_0x46d763['type']){case _0xa24d4d(0xb4):{const _0x339d3b=_0x46d763[_0xa24d4d(0x100)][_0xa24d4d(0xc6)];_0x88e56e[_0xa24d4d(0xb4)](_0x339d3b);break;}}}),B(this[_0x50b0dc(0xdc)],_0x88e56e);}));}[_0x29c532(0xd5)](){const _0x5606c5=_0x29c532;this[_0x5606c5(0xd0)](this['_commentService'][_0x5606c5(0xb7)]['subscribe'](async _0x3f1927=>{const _0x2fd0ca=_0x5606c5;var _0x45140d,_0x4832c6,_0x96a618,_0x58c99f;const _0x4be2e1=(_0x45140d=this['_threadCommentModel'][_0x2fd0ca(0xd3)](_0x3f1927[_0x2fd0ca(0xc4)])['find'](_0x51cff7=>_0x51cff7[_0x2fd0ca(0xff)]===_0x3f1927[_0x2fd0ca(0xff)]))==null?void 0x0:_0x45140d[_0x2fd0ca(0xaa)];if(!_0x4be2e1)return;const {unitId:_0x3db8fc,subUnitId:_0x479082}=_0x4be2e1;switch(_0x3f1927[_0x2fd0ca(0xf8)]&&this['_userService'][_0x2fd0ca(0x108)](_0x3f1927['user']),_0x3f1927[_0x2fd0ca(0xc7)]){case v[_0x2fd0ca(0xfe)]:break;case v[_0x2fd0ca(0x104)]:{this['_threadCommentModel']['addComment'](_0x3db8fc,_0x479082,{'unitId':_0x3db8fc,'subUnitId':_0x479082,'ref':'','id':_0x3f1927[_0x2fd0ca(0xb3)],'dT':D(+_0x3f1927[_0x2fd0ca(0xdd)]),'threadId':_0x3f1927[_0x2fd0ca(0xff)],'personId':(_0x96a618=(_0x4832c6=_0x3f1927[_0x2fd0ca(0xf8)])==null?void 0x0:_0x4832c6[_0x2fd0ca(0xe0)])!=null?_0x96a618:_0x3f1927[_0x2fd0ca(0xd8)],'text':JSON[_0x2fd0ca(0x103)](_0x3f1927[_0x2fd0ca(0x102)]),'parentId':_0x4be2e1['id']});break;}case v[_0x2fd0ca(0xa8)]:{const _0x1d5f1b=this[_0x2fd0ca(0xa4)][_0x2fd0ca(0xfc)](_0x3db8fc,_0x479082,_0x3f1927[_0x2fd0ca(0xb3)]);_0x1d5f1b&&_0x1d5f1b[_0x2fd0ca(0xd2)]&&this[_0x2fd0ca(0xa4)][_0x2fd0ca(0xdb)](_0x3db8fc,_0x479082,_0x3f1927[_0x2fd0ca(0xb3)]);break;}case v[_0x2fd0ca(0xd9)]:{this[_0x2fd0ca(0xa4)][_0x2fd0ca(0xde)](_0x3db8fc,_0x479082,{'commentId':_0x3f1927['replyId'],'text':JSON[_0x2fd0ca(0x103)](_0x3f1927[_0x2fd0ca(0x102)])});break;}case v[_0x2fd0ca(0xbb)]:{const _0x5a6782=(_0x58c99f=this[_0x2fd0ca(0xa4)][_0x2fd0ca(0xd3)](_0x3f1927[_0x2fd0ca(0xc4)])[_0x2fd0ca(0xae)](_0xb74887=>_0xb74887[_0x2fd0ca(0xff)]===_0x3f1927[_0x2fd0ca(0xff)]))==null?void 0x0:_0x58c99f[_0x2fd0ca(0xaa)];_0x5a6782&&this['_threadCommentModel'][_0x2fd0ca(0xad)](_0x3db8fc,_0x479082,_0x5a6782['id'],_0x3f1927['solved']===I[_0x2fd0ca(0xc0)]);break;}}}));}};S=V([p(0x0,_0x3ac3e1(_0x103fa9)),p(0x1,_0x3ac3e1(_0x1be085)),p(0x2,_0x3ac3e1(_0x565a3d)),p(0x3,_0x3ac3e1(_0x3a679c))],S);const z=_0x29c532(0xa3),M={};var k=Object[_0x29c532(0xac)],Q=(_0x25b489,_0x4ad6a4,_0x223a24,_0x554afd)=>{const _0xb07cfd=_0x29c532;for(var _0x27c114=_0x554afd>0x1?void 0x0:_0x554afd?k(_0x4ad6a4,_0x223a24):_0x4ad6a4,_0x201360=_0x25b489[_0xb07cfd(0xb9)]-0x1,_0x472bcd;_0x201360>=0x0;_0x201360--)(_0x472bcd=_0x25b489[_0x201360])&&(_0x27c114=_0x472bcd(_0x27c114)||_0x27c114);return _0x27c114;},_=(_0x11663c,_0x3539a5)=>(_0x4c3813,_0x21db63)=>_0x3539a5(_0x4c3813,_0x21db63,_0x11663c);function X(_0x32c3b8,_0x534822){const _0x60ed6e=_0x29c532,_0x245035=_0x32c3b8['replies'][0x0];return{..._0x534822,'id':_0x245035[_0x60ed6e(0xb3)],'resolved':_0x32c3b8['solved']===0x1,'dT':D(_0x245035[_0x60ed6e(0xdd)]),'personId':_0x245035[_0x60ed6e(0xd8)],'threadId':_0x245035[_0x60ed6e(0xff)]};}function ee(_0x52b20d,_0x40157f,_0x148350){const _0x5e6b76=_0x29c532;var _0x410b92,_0x1cffb6;if(((_0x1cffb6=(_0x410b92=_0x52b20d==null?void 0x0:_0x52b20d[_0x5e6b76(0xf7)])==null?void 0x0:_0x410b92[_0x5e6b76(0xb9)])!=null?_0x1cffb6:0x0)>0x0){const _0x1b1371=(_0x3da824,_0x245676)=>({'id':_0x3da824['replyId'],'threadId':_0x3da824[_0x5e6b76(0xff)],'dT':D(_0x3da824[_0x5e6b76(0xdd)]),'personId':_0x3da824[_0x5e6b76(0xd8)],'resolved':_0x52b20d[_0x5e6b76(0xb8)]===I[_0x5e6b76(0xc0)],'unitId':_0x40157f,'subUnitId':_0x148350,'text':JSON['parse'](_0x3da824[_0x5e6b76(0x102)]),'parentId':_0x245676}),_0x51ca03=_0x1b1371(_0x52b20d[_0x5e6b76(0xf7)][0x0]);return{..._0x51ca03,'children':_0x52b20d[_0x5e6b76(0xf7)][_0x5e6b76(0xb6)](0x1)[_0x5e6b76(0xa5)](_0x33f551=>_0x1b1371(_0x33f551,_0x51ca03['id']))};}return null;}let f=class{constructor(_0x5d11bd,_0x21ec93,_0x35bb7b,_0x188404){const _0x2f4c61=_0x29c532;this[_0x2f4c61(0xbe)]=_0x5d11bd,this[_0x2f4c61(0x105)]=_0x21ec93,this[_0x2f4c61(0xed)]=_0x35bb7b,this[_0x2f4c61(0xdc)]=_0x188404;}async['addComment'](_0x3551ee){const _0x372bac=_0x29c532;var _0x46292c,_0x30e2e8;const {parentId:_0x5b711e,unitId:_0x1d4c6e,text:_0xc40ec8,threadId:_0x633c4e}=_0x3551ee,_0x5ea806=(_0x30e2e8=(_0x46292c=_0xc40ec8['customRanges'])==null?void 0x0:_0x46292c[_0x372bac(0xf1)](_0x4852a0=>_0x4852a0[_0x372bac(0xe6)]===_0x2fe7dd[_0x372bac(0xfb)])[_0x372bac(0xa5)](_0x417f0d=>_0x417f0d[_0x372bac(0xdf)]))!=null?_0x30e2e8:[],_0x3f2220=JSON['stringify'](_0xc40ec8),_0x58e127=(await this[_0x372bac(0xed)][_0x372bac(0xc1)](_0x1d4c6e))[_0x372bac(0xea)]();if(_0x5b711e){const _0x518672={'memberId':_0x58e127,'unitId':_0x1d4c6e,'content':_0x3f2220,'mention':_0x5ea806,'threadId':_0x633c4e},_0x459b5e=(await this[_0x372bac(0xbe)][_0x372bac(0x106)]('/universer-api/comment/unit/'+_0x1d4c6e+'/reply',{'body':_0x518672}))['body'][_0x372bac(0xc5)];return{..._0x3551ee,'id':_0x459b5e['replyId'],'dT':_0x19122e(+_0x459b5e['createTimestamp'])[_0x372bac(0xf5)](_0x372bac(0xcc)),'personId':_0x459b5e['userId']};}else{const _0x4c2f9b={'memberId':_0x58e127,'unitId':_0x1d4c6e,'content':_0x3f2220,'mention':_0x5ea806},_0x3d45a6=await this[_0x372bac(0xbe)]['post'](_0x372bac(0xfd)+_0x1d4c6e+_0x372bac(0xf3),{'body':_0x4c2f9b});return X(_0x3d45a6[_0x372bac(0xbd)]['comment'],_0x3551ee);}}async[_0x29c532(0xde)](_0x272837){const _0x56ea6f=_0x29c532;var _0x2865ed,_0x1d0a7f;const {text:_0x1f57d5,unitId:_0x3b6c9e}=_0x272837,_0x1c9e09=(_0x1d0a7f=(_0x2865ed=_0x1f57d5['customRanges'])==null?void 0x0:_0x2865ed[_0x56ea6f(0xf1)](_0x233e12=>_0x233e12[_0x56ea6f(0xe6)]===_0x2fe7dd[_0x56ea6f(0xfb)])[_0x56ea6f(0xa5)](_0x112ab0=>_0x112ab0[_0x56ea6f(0xdf)]))!=null?_0x1d0a7f:[],_0x5c7cf6=JSON['stringify'](_0x1f57d5),_0x416210=_0x272837[_0x56ea6f(0xff)],_0x5a2f50=_0x272837['id'],_0x40cdbd={'memberId':(await this[_0x56ea6f(0xed)]['requireSession'](_0x3b6c9e))[_0x56ea6f(0xea)](),'unitId':_0x3b6c9e,'threadId':_0x416210,'mention':_0x1c9e09,'content':_0x5c7cf6,'replyId':_0x5a2f50},_0x967365=await this[_0x56ea6f(0xbe)][_0x56ea6f(0x106)]('/universer-api/comment/unit/'+_0x3b6c9e+_0x56ea6f(0x101),{'body':_0x40cdbd});return!_0x967365['body'][_0x56ea6f(0xf6)]||_0x967365[_0x56ea6f(0xbd)][_0x56ea6f(0xf6)][_0x56ea6f(0xd4)]===0x1;}async['resolveComment'](_0x114f79){const _0x559a4d=_0x29c532,{unitId:_0x145f19}=_0x114f79,_0x505eeb=_0x114f79[_0x559a4d(0xff)],_0x5acbf7={'memberId':this['_userService'][_0x559a4d(0xef)]()[_0x559a4d(0xe0)],'unitId':_0x145f19,'threadId':_0x505eeb,'solved':_0x114f79[_0x559a4d(0xe9)]?I[_0x559a4d(0xc0)]:I[_0x559a4d(0xc2)]},_0x407d83=await this[_0x559a4d(0xbe)]['post']('/universer-api/comment/unit/'+_0x145f19+'/solved',{'body':_0x5acbf7});return!_0x407d83[_0x559a4d(0xbd)]['error']||_0x407d83['body'][_0x559a4d(0xf6)][_0x559a4d(0xd4)]===0x1;}async[_0x29c532(0xdb)](_0x3a529e,_0x56c21b,_0x3b9c2b,_0x6a22eb){const _0x22c2f9=_0x29c532,_0x4f0d0a={'memberId':(await this[_0x22c2f9(0xed)][_0x22c2f9(0xc1)](_0x3a529e))[_0x22c2f9(0xea)](),'threadId':_0x3b9c2b,'replyId':_0x6a22eb,'unitId':_0x3a529e},_0x29b36=await this['_httpService'][_0x22c2f9(0x106)](_0x22c2f9(0xfd)+_0x3a529e+_0x22c2f9(0xf4),{'body':_0x4f0d0a});return!_0x29b36['body']['error']||_0x29b36[_0x22c2f9(0xbd)][_0x22c2f9(0xf6)][_0x22c2f9(0xd4)]===0x1;}async[_0x29c532(0xe4)](_0x11f97d,_0xbd087e,_0x1cefa4){const _0x277663=_0x29c532,_0x43383b={'unitId':_0x11f97d,'threadId':_0x1cefa4},_0x51c845=await this['_httpService'][_0x277663(0x106)]('/universer-api/comment/unit/'+_0x11f97d+_0x277663(0xc3),{'body':_0x43383b}),_0x3059ad=_0x1cefa4[_0x277663(0xa5)](_0x5c1fde=>ee(_0x51c845[_0x277663(0xbd)][_0x277663(0xb2)][_0x5c1fde],_0x11f97d,_0xbd087e))[_0x277663(0xf1)](Boolean);return Object[_0x277663(0xcf)](_0x51c845['body']['users'])[_0x277663(0xc9)](_0x532c2f=>{const _0x477d90=_0x277663;this[_0x477d90(0x105)][_0x477d90(0x108)](_0x532c2f);}),_0x3059ad;}[_0x29c532(0x107)](_0x1e676c){const _0xf1b6ff=_0x29c532;return{'id':_0x1e676c['id'],'threadId':_0x1e676c[_0xf1b6ff(0xff)],'ref':_0x1e676c[_0xf1b6ff(0xa9)]};}};f=Q([_(0x0,_0x3ac3e1(_0x172eaa)),_(0x1,_0x3ac3e1(_0x565a3d)),_(0x2,_0x3ac3e1(_0x4f8e15)),_(0x3,_0x3ac3e1(_0x3a679c))],f);var re=Object[_0x29c532(0xac)],te=(_0xbcd055,_0x2c5011,_0x4f5325,_0x1ab609)=>{const _0x28b57b=_0x29c532;for(var _0xfc5bf6=_0x1ab609>0x1?void 0x0:_0x1ab609?re(_0x2c5011,_0x4f5325):_0x2c5011,_0x50781a=_0xbcd055[_0x28b57b(0xb9)]-0x1,_0x131b9b;_0x50781a>=0x0;_0x50781a--)(_0x131b9b=_0xbcd055[_0x50781a])&&(_0xfc5bf6=_0x131b9b(_0xfc5bf6)||_0xfc5bf6);return _0xfc5bf6;},N=(_0x15f90e,_0x3c6ae0)=>(_0xc4c24d,_0x130ac7)=>_0x3c6ae0(_0xc4c24d,_0x130ac7,_0x15f90e);let g=class extends _0xeebaba{constructor(_0x3dc292,_0x4aa983){const _0x33c21b=_0x29c532;super(),this[_0x33c21b(0xcd)]=_0x3dc292,this[_0x33c21b(0xbc)]=_0x4aa983,this[_0x33c21b(0xd7)]();}[_0x29c532(0xd7)](){const _0x562d02=_0x29c532;this[_0x562d02(0xcd)][_0x562d02(0xfa)]=this['_threadCommentDataSource'],this[_0x562d02(0xcd)][_0x562d02(0xbf)]=!0x1;}};g=te([N(0x0,_0x99ca19),N(0x1,_0x3ac3e1(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x168eff,_0x17bf3c,_0xf01e71)=>_0x17bf3c in _0x168eff?se(_0x168eff,_0x17bf3c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf01e71}):_0x168eff[_0x17bf3c]=_0xf01e71,ie=(_0x36589c,_0x5cf9e8,_0x54bd04,_0xabc349)=>{const _0x3dd220=_0x29c532;for(var _0x48f0f3=_0xabc349>0x1?void 0x0:_0xabc349?oe(_0x5cf9e8,_0x54bd04):_0x5cf9e8,_0x192b4a=_0x36589c[_0x3dd220(0xb9)]-0x1,_0x496437;_0x192b4a>=0x0;_0x192b4a--)(_0x496437=_0x36589c[_0x192b4a])&&(_0x48f0f3=_0x496437(_0x48f0f3)||_0x48f0f3);return _0x48f0f3;},w=(_0x218e1a,_0x4c469d)=>(_0x3b7359,_0x1e68ca)=>_0x4c469d(_0x3b7359,_0x1e68ca,_0x218e1a),$=(_0xaaca68,_0x5c3be1,_0x57f892)=>ne(_0xaaca68,typeof _0x5c3be1!=_0x29c532(0xf9)?_0x5c3be1+'':_0x5c3be1,_0x57f892);let b=class extends _0x42c9b8{constructor(_0x46475e=M,_0x55ad2a,_0x432ca3){const _0x34405f=_0x29c532;super(),this[_0x34405f(0xb0)]=_0x46475e,this['_injector']=_0x55ad2a,this[_0x34405f(0xe7)]=_0x432ca3;const {..._0x2a48e5}=_0x56342c({},M,this[_0x34405f(0xb0)]);this[_0x34405f(0xe7)]['setConfig'](z,_0x2a48e5);}[_0x29c532(0xe2)](){[[f],[g],[S]]['forEach'](_0x545d32=>{const _0x83542e=_0x4ce5;this['_injector'][_0x83542e(0xb4)](_0x545d32);});}['onReady'](){const _0x47e692=_0x29c532;this['_injector'][_0x47e692(0xe1)](g),this['_injector'][_0x47e692(0xe1)](S);}};$(b,_0x29c532(0xec),W),$(b,_0x29c532(0xc7),_0x4292e6[_0x29c532(0xf0)]),b=ie([_0x346c46(_0x177aec,_0x481daf,_0x43c9dc),w(0x1,_0x3ac3e1(_0x3a679c)),w(0x2,_0x971ad0)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x27ff(_0x4dfe48,_0x31d53d){const _0x2e9f78=_0x2e9f();return _0x27ff=function(_0x27ff56,_0x58a3b4){_0x27ff56=_0x27ff56-0x109;let _0xd5b26f=_0x2e9f78[_0x27ff56];return _0xd5b26f;},_0x27ff(_0x4dfe48,_0x31d53d);}function _0x2e9f(){const _0x513c76=['filter','exports','pipe','find','getUser','UNIVER_UNKNOWN','root','/list','UniverProCollaborationClient','UniverInstanceType','639736KzZkli','2449426gIjNPa','UserManagerService','2114380JecsXX','_initUserSync','CustomRangeType','OpenOrReOpen','UniverCollaborationClientPlugin','merge','YYYY/MM/DD\x20HH:mm','commentUpdate$','post','Injector','solved','subscribe','forEach','Unknown','_httpService','4728618ZmDgDM','3309345LutOOR','get','disposeWithMe','COMMENT','_injector','pluginName','symbol','Reply','getOwnPropertyDescriptor','error','UniverProThreadCommentDatasource','@univerjs/network','threadId','_config','replyId','24IKUCZr','listComments','onStarting','slice','body','Delete','thread-comment-data-source.config','1287IIBqAi','IThreadCommentDataSourceService','_threadCommentDataSource','CollaborationSessionService','addUser','/add','format','_userService','resolved','payload','rxjs','replies','Solved','_commentService','/universer-api/comment/unit/','HTTPService','Edit','UniverThreadComment','stringify','comments','length','6BJqasE','getCurrentUser','_configService','user','_threadCommentDataSourceService','/solved','customRanges','dataSource','resolveComment','UniverCore','updateComment','add','saveCommentToSnapshot','type','CommentService','unitId','parse','content','object','Plugin','userId','@univerjs-pro/collaboration-client','UniverThreadCommentDataSourcePlugin','Solve','UNRECOGNIZED','size','getUnit','_sessionService','@univerjs/core','createTimestamp','@univerjs/thread-comment-ui','/edit','Add','deleteComment','reply','Inject','UniverThreadCommentUIPlugin','setConfig','DependentOn','parentId','defineProperty','bufferTime','UniverLicensePlugin','_threadCommentModel','@univerjs/thread-comment','4268460ZMQgpt','1uwMCgq','_init','rangeId','UniverProLicense','dayjs','_initDataSource','UniverThreadCommentUi','map','172170FuuzVr','users','@univerjs-pro/license','IConfigService','requireSession','personId','rangeType','code'];_0x2e9f=function(){return _0x513c76;};return _0x2e9f();}(function(_0x20baaa,_0x5679f6){const _0x508fee=_0x27ff,_0x4b3d17=_0x20baaa();while(!![]){try{const _0x2a7bf1=-parseInt(_0x508fee(0x13c))/0x1*(-parseInt(_0x508fee(0x159))/0x2)+-parseInt(_0x508fee(0x13b))/0x3+parseInt(_0x508fee(0x156))/0x4+-parseInt(_0x508fee(0x169))/0x5*(-parseInt(_0x508fee(0x10e))/0x6)+-parseInt(_0x508fee(0x157))/0x7*(parseInt(_0x508fee(0x178))/0x8)+-parseInt(_0x508fee(0x168))/0x9+parseInt(_0x508fee(0x144))/0xa*(parseInt(_0x508fee(0x17f))/0xb);if(_0x2a7bf1===_0x5679f6)break;else _0x4b3d17['push'](_0x4b3d17['shift']());}catch(_0x48fccc){_0x4b3d17['push'](_0x4b3d17['shift']());}}}(_0x2e9f,0xda9ae),function(_0x192ba9,_0x423917){const _0x433cfa=_0x27ff;typeof exports==_0x433cfa(0x120)&&typeof module<'u'?_0x423917(exports,require('@univerjs-pro/collaboration-client'),require(_0x433cfa(0x146)),require(_0x433cfa(0x12a)),require(_0x433cfa(0x12c)),require(_0x433cfa(0x13a)),require(_0x433cfa(0x189)),require(_0x433cfa(0x174))):typeof define=='function'&&define['amd']?define([_0x433cfa(0x14d),_0x433cfa(0x123),_0x433cfa(0x146),_0x433cfa(0x12a),_0x433cfa(0x12c),_0x433cfa(0x13a),_0x433cfa(0x189),_0x433cfa(0x174)],_0x423917):(_0x192ba9=typeof globalThis<'u'?globalThis:_0x192ba9||self,_0x423917(_0x192ba9[_0x433cfa(0x173)]={},_0x192ba9[_0x433cfa(0x154)],_0x192ba9[_0x433cfa(0x13f)],_0x192ba9[_0x433cfa(0x117)],_0x192ba9[_0x433cfa(0x142)],_0x192ba9[_0x433cfa(0x10a)],_0x192ba9[_0x433cfa(0x189)],_0x192ba9['UniverNetwork']));}(this,function(_0x208d67,_0x512cec,_0x116b22,_0x4c72af,_0x768b18,_0x1da53d,_0x171811,_0x1534ea){'use strict';const _0x1847fc=_0x27ff;const _0x525e6e='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x442e7b=(_0x309b36=>(_0x309b36[_0x309b36['OpenOrReOpen']=0x0]=_0x1847fc(0x15c),_0x309b36[_0x309b36[_0x1847fc(0x18b)]=0x1]=_0x1847fc(0x18b),_0x309b36[_0x309b36[_0x1847fc(0x126)]=-0x1]=_0x1847fc(0x126),_0x309b36))(_0x442e7b||{}),_0x8d4419=(_0x19a131=>(_0x19a131[_0x19a131['Unknown']=0x0]=_0x1847fc(0x166),_0x19a131[_0x19a131[_0x1847fc(0x12e)]=0x1]=_0x1847fc(0x12e),_0x19a131[_0x19a131['Reply']=0x2]=_0x1847fc(0x170),_0x19a131[_0x19a131[_0x1847fc(0x109)]=0x3]=_0x1847fc(0x109),_0x19a131[_0x19a131[_0x1847fc(0x17d)]=0x4]=_0x1847fc(0x17d),_0x19a131[_0x19a131[_0x1847fc(0x125)]=0x5]='Solve',_0x19a131[_0x19a131['UNRECOGNIZED']=-0x1]=_0x1847fc(0x126),_0x19a131))(_0x8d4419||{});const _0x3fe7c4=_0x5a6b86=>_0x4c72af[_0x1847fc(0x140)](new Date(+_0x5a6b86))[_0x1847fc(0x185)](_0x1847fc(0x15f)),_0x5012ad=async(_0x519b0c,_0x2b7a90)=>{const _0x280702=_0x1847fc,_0x20e807=_0x519b0c[_0x280702(0x16a)](_0x4c72af[_0x280702(0x158)]),_0x1c1e35=_0x519b0c[_0x280702(0x16a)](_0x1534ea[_0x280702(0x18e)]);_0x2b7a90[_0x280702(0x165)](_0x2e83bb=>{const _0x5e1001=_0x280702;_0x20e807[_0x5e1001(0x150)](_0x2e83bb)&&_0x2b7a90['delete'](_0x2e83bb);}),_0x2b7a90[_0x280702(0x127)]&&(await _0x1c1e35['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x2b7a90]}}))[_0x280702(0x17c)]['users'][_0x280702(0x165)](_0x5e0642=>{const _0x4eb072=_0x280702;_0x5e0642&&_0x20e807[_0x4eb072(0x183)](_0x5e0642);});};var _0x3b6f91=Object[_0x1847fc(0x171)],_0x485b33=(_0x2832a3,_0x7d805d,_0x2bbc86,_0x4a2bcc)=>{const _0xcc8695=_0x1847fc;for(var _0x2a7e37=_0x4a2bcc>0x1?void 0x0:_0x4a2bcc?_0x3b6f91(_0x7d805d,_0x2bbc86):_0x7d805d,_0x189b23=_0x2832a3[_0xcc8695(0x10d)]-0x1,_0x647ee6;_0x189b23>=0x0;_0x189b23--)(_0x647ee6=_0x2832a3[_0x189b23])&&(_0x2a7e37=_0x647ee6(_0x2a7e37)||_0x2a7e37);return _0x2a7e37;},_0x40db28=(_0x241529,_0x5b79a4)=>(_0x1ad0bd,_0x5598a2)=>_0x5b79a4(_0x1ad0bd,_0x5598a2,_0x241529);let _0x150d3a=class extends _0x4c72af['Disposable']{constructor(_0x4bc159,_0x580ee1,_0x18e4db,_0xd109ec){const _0x2cd573=_0x1847fc;super(),this[_0x2cd573(0x18c)]=_0x4bc159,this[_0x2cd573(0x139)]=_0x580ee1,this[_0x2cd573(0x186)]=_0x18e4db,this[_0x2cd573(0x16d)]=_0xd109ec,this['_init'](),this['_initUserSync']();}[_0x1847fc(0x15a)](){const _0x6fb474=_0x1847fc;this['disposeWithMe'](this[_0x6fb474(0x139)][_0x6fb474(0x160)][_0x6fb474(0x14e)](_0x171811[_0x6fb474(0x137)](0x10))[_0x6fb474(0x164)](_0x16cd8a=>{const _0x1119f=new Set();_0x16cd8a['forEach'](_0x8fbfa0=>{const _0x257f4a=_0x27ff;switch(_0x8fbfa0[_0x257f4a(0x11b)]){case _0x257f4a(0x119):{const _0x3fd3e2=_0x8fbfa0[_0x257f4a(0x188)][_0x257f4a(0x149)];_0x1119f[_0x257f4a(0x119)](_0x3fd3e2);break;}}}),_0x5012ad(this['_injector'],_0x1119f);}));}[_0x1847fc(0x13d)](){const _0x5981a5=_0x1847fc;this[_0x5981a5(0x16b)](this[_0x5981a5(0x18c)]['commentUpdate$'][_0x5981a5(0x164)](async _0x52e5eb=>{const _0x153d6d=_0x5981a5;var _0x1e361b,_0x18b5a9,_0xd478b3,_0x52d0df;const _0x1e343c=(_0x1e361b=this['_threadCommentModel'][_0x153d6d(0x128)](_0x52e5eb[_0x153d6d(0x11d)])[_0x153d6d(0x14f)](_0x4669ae=>_0x4669ae[_0x153d6d(0x175)]===_0x52e5eb[_0x153d6d(0x175)]))==null?void 0x0:_0x1e361b[_0x153d6d(0x152)];if(!_0x1e343c)return;const {unitId:_0xfefdb2,subUnitId:_0xb4c6c4}=_0x1e343c;switch(_0x52e5eb[_0x153d6d(0x111)]&&this[_0x153d6d(0x186)][_0x153d6d(0x183)](_0x52e5eb[_0x153d6d(0x111)]),_0x52e5eb[_0x153d6d(0x11b)]){case _0x8d4419[_0x153d6d(0x12e)]:break;case _0x8d4419['Reply']:{this['_threadCommentModel']['addComment'](_0xfefdb2,_0xb4c6c4,{'unitId':_0xfefdb2,'subUnitId':_0xb4c6c4,'ref':'','id':_0x52e5eb['replyId'],'dT':_0x3fe7c4(+_0x52e5eb['createTimestamp']),'threadId':_0x52e5eb[_0x153d6d(0x175)],'personId':(_0xd478b3=(_0x18b5a9=_0x52e5eb[_0x153d6d(0x111)])==null?void 0x0:_0x18b5a9['userID'])!=null?_0xd478b3:_0x52e5eb['userId'],'text':JSON[_0x153d6d(0x11e)](_0x52e5eb['content']),'parentId':_0x1e343c['id']});break;}case _0x8d4419[_0x153d6d(0x17d)]:{const _0x58e3f6=this[_0x153d6d(0x139)]['getComment'](_0xfefdb2,_0xb4c6c4,_0x52e5eb[_0x153d6d(0x177)]);_0x58e3f6&&_0x58e3f6[_0x153d6d(0x135)]&&this[_0x153d6d(0x139)][_0x153d6d(0x12f)](_0xfefdb2,_0xb4c6c4,_0x52e5eb['replyId']);break;}case _0x8d4419[_0x153d6d(0x109)]:{this[_0x153d6d(0x139)][_0x153d6d(0x118)](_0xfefdb2,_0xb4c6c4,{'commentId':_0x52e5eb['replyId'],'text':JSON['parse'](_0x52e5eb['content'])});break;}case _0x8d4419[_0x153d6d(0x125)]:{const _0x10046c=(_0x52d0df=this[_0x153d6d(0x139)][_0x153d6d(0x128)](_0x52e5eb[_0x153d6d(0x11d)])[_0x153d6d(0x14f)](_0x5f3e51=>_0x5f3e51[_0x153d6d(0x175)]===_0x52e5eb[_0x153d6d(0x175)]))==null?void 0x0:_0x52d0df[_0x153d6d(0x152)];_0x10046c&&this[_0x153d6d(0x139)][_0x153d6d(0x116)](_0xfefdb2,_0xb4c6c4,_0x10046c['id'],_0x52e5eb[_0x153d6d(0x163)]===_0x442e7b[_0x153d6d(0x18b)]);break;}}}));}};_0x150d3a=_0x485b33([_0x40db28(0x0,_0x4c72af[_0x1847fc(0x131)](_0x512cec[_0x1847fc(0x11c)])),_0x40db28(0x1,_0x4c72af['Inject'](_0x1da53d['ThreadCommentModel'])),_0x40db28(0x2,_0x4c72af[_0x1847fc(0x131)](_0x4c72af['UserManagerService'])),_0x40db28(0x3,_0x4c72af['Inject'](_0x4c72af['Injector']))],_0x150d3a);const _0xeb771a=_0x1847fc(0x17e),_0x4ee598={};var _0x1598f5=Object[_0x1847fc(0x171)],_0x34b079=(_0x4e172c,_0x4579e8,_0x955d68,_0x3c7aa3)=>{for(var _0x50bab4=_0x3c7aa3>0x1?void 0x0:_0x3c7aa3?_0x1598f5(_0x4579e8,_0x955d68):_0x4579e8,_0x2e2e05=_0x4e172c['length']-0x1,_0x48a193;_0x2e2e05>=0x0;_0x2e2e05--)(_0x48a193=_0x4e172c[_0x2e2e05])&&(_0x50bab4=_0x48a193(_0x50bab4)||_0x50bab4);return _0x50bab4;},_0x14c14a=(_0x448ed0,_0x5b65a3)=>(_0x5e8eba,_0x41c721)=>_0x5b65a3(_0x5e8eba,_0x41c721,_0x448ed0);function _0x1aedfb(_0x25cd98,_0x4e7acc){const _0x4aff2c=_0x1847fc,_0x4061a8=_0x25cd98[_0x4aff2c(0x18a)][0x0];return{..._0x4e7acc,'id':_0x4061a8['replyId'],'resolved':_0x25cd98[_0x4aff2c(0x163)]===0x1,'dT':_0x3fe7c4(_0x4061a8[_0x4aff2c(0x12b)]),'personId':_0x4061a8['userId'],'threadId':_0x4061a8[_0x4aff2c(0x175)]};}function _0x51f13b(_0x55d49b,_0x1194cd,_0xac9dc2){const _0x491143=_0x1847fc;var _0x43d7b7,_0x5b470d;if(((_0x5b470d=(_0x43d7b7=_0x55d49b==null?void 0x0:_0x55d49b['replies'])==null?void 0x0:_0x43d7b7[_0x491143(0x10d)])!=null?_0x5b470d:0x0)>0x0){const _0xde3788=(_0x52395d,_0x13f96c)=>({'id':_0x52395d[_0x491143(0x177)],'threadId':_0x52395d[_0x491143(0x175)],'dT':_0x3fe7c4(_0x52395d[_0x491143(0x12b)]),'personId':_0x52395d[_0x491143(0x122)],'resolved':_0x55d49b[_0x491143(0x163)]===_0x442e7b['Solved'],'unitId':_0x1194cd,'subUnitId':_0xac9dc2,'text':JSON[_0x491143(0x11e)](_0x52395d[_0x491143(0x11f)]),'parentId':_0x13f96c}),_0x54480a=_0xde3788(_0x55d49b['replies'][0x0]);return{..._0x54480a,'children':_0x55d49b[_0x491143(0x18a)][_0x491143(0x17b)](0x1)[_0x491143(0x143)](_0x3086f7=>_0xde3788(_0x3086f7,_0x54480a['id']))};}return null;}let _0x5e6757=class{constructor(_0x4734a5,_0x162c80,_0x6927c8,_0x4de540){const _0x54296f=_0x1847fc;this[_0x54296f(0x167)]=_0x4734a5,this['_userService']=_0x162c80,this[_0x54296f(0x129)]=_0x6927c8,this[_0x54296f(0x16d)]=_0x4de540;}async['addComment'](_0x48e582){const _0x24e0b7=_0x1847fc;var _0x2140ee,_0x4a0ad8;const {parentId:_0x588d02,unitId:_0x36ac04,text:_0x4d5a89,threadId:_0x468e85}=_0x48e582,_0x2b9b64=(_0x4a0ad8=(_0x2140ee=_0x4d5a89[_0x24e0b7(0x114)])==null?void 0x0:_0x2140ee[_0x24e0b7(0x14c)](_0x4146a7=>_0x4146a7[_0x24e0b7(0x14a)]===_0x4c72af[_0x24e0b7(0x15b)][_0x24e0b7(0x16c)])[_0x24e0b7(0x143)](_0x531b89=>_0x531b89['rangeId']))!=null?_0x4a0ad8:[],_0x286861=JSON[_0x24e0b7(0x10b)](_0x4d5a89),_0x50906d=(await this['_sessionService'][_0x24e0b7(0x148)](_0x36ac04))['getMemberID']();if(_0x588d02){const _0x215eeb={'memberId':_0x50906d,'unitId':_0x36ac04,'content':_0x286861,'mention':_0x2b9b64,'threadId':_0x468e85},_0x5f022d=(await this[_0x24e0b7(0x167)]['post'](_0x24e0b7(0x18d)+_0x36ac04+'/reply',{'body':_0x215eeb}))[_0x24e0b7(0x17c)][_0x24e0b7(0x130)];return{..._0x48e582,'id':_0x5f022d[_0x24e0b7(0x177)],'dT':_0x4c72af[_0x24e0b7(0x140)](+_0x5f022d[_0x24e0b7(0x12b)])[_0x24e0b7(0x185)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5f022d[_0x24e0b7(0x122)]};}else{const _0xd2162b={'memberId':_0x50906d,'unitId':_0x36ac04,'content':_0x286861,'mention':_0x2b9b64},_0xe338d7=await this[_0x24e0b7(0x167)]['post'](_0x24e0b7(0x18d)+_0x36ac04+_0x24e0b7(0x184),{'body':_0xd2162b});return _0x1aedfb(_0xe338d7['body']['comment'],_0x48e582);}}async[_0x1847fc(0x118)](_0xb17a4b){const _0x5d79ee=_0x1847fc;var _0xb16066,_0x246569;const {text:_0x58c22b,unitId:_0x246060}=_0xb17a4b,_0x58f202=(_0x246569=(_0xb16066=_0x58c22b[_0x5d79ee(0x114)])==null?void 0x0:_0xb16066[_0x5d79ee(0x14c)](_0x3fcd8c=>_0x3fcd8c[_0x5d79ee(0x14a)]===_0x4c72af[_0x5d79ee(0x15b)][_0x5d79ee(0x16c)])[_0x5d79ee(0x143)](_0x31b472=>_0x31b472[_0x5d79ee(0x13e)]))!=null?_0x246569:[],_0x86f1f6=JSON[_0x5d79ee(0x10b)](_0x58c22b),_0x5db0e8=_0xb17a4b[_0x5d79ee(0x175)],_0x453faa=_0xb17a4b['id'],_0x505abd={'memberId':(await this[_0x5d79ee(0x129)][_0x5d79ee(0x148)](_0x246060))['getMemberID'](),'unitId':_0x246060,'threadId':_0x5db0e8,'mention':_0x58f202,'content':_0x86f1f6,'replyId':_0x453faa},_0x2e3f16=await this[_0x5d79ee(0x167)][_0x5d79ee(0x161)](_0x5d79ee(0x18d)+_0x246060+_0x5d79ee(0x12d),{'body':_0x505abd});return!_0x2e3f16[_0x5d79ee(0x17c)][_0x5d79ee(0x172)]||_0x2e3f16['body'][_0x5d79ee(0x172)][_0x5d79ee(0x14b)]===0x1;}async['resolveComment'](_0x1ace60){const _0x121e64=_0x1847fc,{unitId:_0x96c17d}=_0x1ace60,_0xbf2954=_0x1ace60[_0x121e64(0x175)],_0x588132={'memberId':this[_0x121e64(0x186)][_0x121e64(0x10f)]()['userID'],'unitId':_0x96c17d,'threadId':_0xbf2954,'solved':_0x1ace60[_0x121e64(0x187)]?_0x442e7b[_0x121e64(0x18b)]:_0x442e7b[_0x121e64(0x15c)]},_0x51535e=await this[_0x121e64(0x167)]['post'](_0x121e64(0x18d)+_0x96c17d+_0x121e64(0x113),{'body':_0x588132});return!_0x51535e['body'][_0x121e64(0x172)]||_0x51535e[_0x121e64(0x17c)]['error'][_0x121e64(0x14b)]===0x1;}async[_0x1847fc(0x12f)](_0x531563,_0x55c173,_0x4a20bc,_0x47d909){const _0x148889=_0x1847fc,_0x290f45={'memberId':(await this[_0x148889(0x129)][_0x148889(0x148)](_0x531563))['getMemberID'](),'threadId':_0x4a20bc,'replyId':_0x47d909,'unitId':_0x531563},_0x2c0457=await this[_0x148889(0x167)][_0x148889(0x161)](_0x148889(0x18d)+_0x531563+'/delete',{'body':_0x290f45});return!_0x2c0457[_0x148889(0x17c)][_0x148889(0x172)]||_0x2c0457[_0x148889(0x17c)]['error'][_0x148889(0x14b)]===0x1;}async[_0x1847fc(0x179)](_0x392ae5,_0x5b95cb,_0x4ee0e9){const _0x5e9868=_0x1847fc,_0x156c04={'unitId':_0x392ae5,'threadId':_0x4ee0e9},_0xbcef20=await this[_0x5e9868(0x167)][_0x5e9868(0x161)](_0x5e9868(0x18d)+_0x392ae5+_0x5e9868(0x153),{'body':_0x156c04}),_0x3be057=_0x4ee0e9[_0x5e9868(0x143)](_0x3eb41a=>_0x51f13b(_0xbcef20[_0x5e9868(0x17c)][_0x5e9868(0x10c)][_0x3eb41a],_0x392ae5,_0x5b95cb))[_0x5e9868(0x14c)](Boolean);return Object['values'](_0xbcef20['body'][_0x5e9868(0x145)])[_0x5e9868(0x165)](_0x2e36c1=>{const _0x2ce171=_0x5e9868;this[_0x2ce171(0x186)]['addUser'](_0x2e36c1);}),_0x3be057;}[_0x1847fc(0x11a)](_0x429c56){const _0x8f0400=_0x1847fc;return{'id':_0x429c56['id'],'threadId':_0x429c56[_0x8f0400(0x175)],'ref':_0x429c56['ref']};}};_0x5e6757=_0x34b079([_0x14c14a(0x0,_0x4c72af[_0x1847fc(0x131)](_0x1534ea[_0x1847fc(0x18e)])),_0x14c14a(0x1,_0x4c72af['Inject'](_0x4c72af['UserManagerService'])),_0x14c14a(0x2,_0x4c72af[_0x1847fc(0x131)](_0x512cec[_0x1847fc(0x182)])),_0x14c14a(0x3,_0x4c72af[_0x1847fc(0x131)](_0x4c72af[_0x1847fc(0x162)]))],_0x5e6757);var _0x30e7a7=Object[_0x1847fc(0x171)],_0x36aed0=(_0x3175c5,_0x376bb3,_0x396726,_0x5e173c)=>{const _0x2588d8=_0x1847fc;for(var _0x8e0f73=_0x5e173c>0x1?void 0x0:_0x5e173c?_0x30e7a7(_0x376bb3,_0x396726):_0x376bb3,_0x3bf99b=_0x3175c5[_0x2588d8(0x10d)]-0x1,_0x1d7301;_0x3bf99b>=0x0;_0x3bf99b--)(_0x1d7301=_0x3175c5[_0x3bf99b])&&(_0x8e0f73=_0x1d7301(_0x8e0f73)||_0x8e0f73);return _0x8e0f73;},_0x51356c=(_0x497ee7,_0x1ec94b)=>(_0x4eb1ba,_0x143a98)=>_0x1ec94b(_0x4eb1ba,_0x143a98,_0x497ee7);let _0x52b74f=class extends _0x4c72af['Disposable']{constructor(_0x41a224,_0x23f86f){const _0x4c7efd=_0x1847fc;super(),this[_0x4c7efd(0x112)]=_0x41a224,this['_threadCommentDataSource']=_0x23f86f,this[_0x4c7efd(0x141)]();}['_initDataSource'](){const _0x4f5ea4=_0x1847fc;this[_0x4f5ea4(0x112)][_0x4f5ea4(0x115)]=this[_0x4f5ea4(0x181)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x52b74f=_0x36aed0([_0x51356c(0x0,_0x1da53d[_0x1847fc(0x180)]),_0x51356c(0x1,_0x4c72af[_0x1847fc(0x131)](_0x5e6757))],_0x52b74f);var _0x4ffa55=Object[_0x1847fc(0x136)],_0x51772b=Object[_0x1847fc(0x171)],_0x55355c=(_0x406e9c,_0x14ff2d,_0x413086)=>_0x14ff2d in _0x406e9c?_0x4ffa55(_0x406e9c,_0x14ff2d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x413086}):_0x406e9c[_0x14ff2d]=_0x413086,_0x55e57c=(_0x5a83fe,_0x466c18,_0x4a5ffc,_0x324fd3)=>{const _0x37d09c=_0x1847fc;for(var _0x39a988=_0x324fd3>0x1?void 0x0:_0x324fd3?_0x51772b(_0x466c18,_0x4a5ffc):_0x466c18,_0x103492=_0x5a83fe[_0x37d09c(0x10d)]-0x1,_0x139fa8;_0x103492>=0x0;_0x103492--)(_0x139fa8=_0x5a83fe[_0x103492])&&(_0x39a988=_0x139fa8(_0x39a988)||_0x39a988);return _0x39a988;},_0x327c18=(_0x27f42d,_0x5d3d83)=>(_0x4c4f8a,_0x37f684)=>_0x5d3d83(_0x4c4f8a,_0x37f684,_0x27f42d),_0xb69d95=(_0x2e8198,_0x5ee923,_0x24e38b)=>_0x55355c(_0x2e8198,typeof _0x5ee923!=_0x1847fc(0x16f)?_0x5ee923+'':_0x5ee923,_0x24e38b);_0x208d67['UniverThreadCommentDataSourcePlugin']=class extends _0x4c72af[_0x1847fc(0x121)]{constructor(_0x1b7c58=_0x4ee598,_0xac8e65,_0x1714bc){const _0x26c048=_0x1847fc;super(),this[_0x26c048(0x176)]=_0x1b7c58,this[_0x26c048(0x16d)]=_0xac8e65,this[_0x26c048(0x110)]=_0x1714bc;const {..._0x2f1e7a}=_0x4c72af[_0x26c048(0x15e)]({},_0x4ee598,this[_0x26c048(0x176)]);this['_configService'][_0x26c048(0x133)](_0xeb771a,_0x2f1e7a);}[_0x1847fc(0x17a)](){const _0xf2d03=_0x1847fc;[[_0x5e6757],[_0x52b74f],[_0x150d3a]][_0xf2d03(0x165)](_0x1f30b7=>{this['_injector']['add'](_0x1f30b7);});}['onReady'](){const _0x339513=_0x1847fc;this[_0x339513(0x16d)]['get'](_0x52b74f),this['_injector']['get'](_0x150d3a);}},_0xb69d95(_0x208d67[_0x1847fc(0x124)],_0x1847fc(0x16e),_0x525e6e),_0xb69d95(_0x208d67[_0x1847fc(0x124)],'type',_0x4c72af[_0x1847fc(0x155)][_0x1847fc(0x151)]),_0x208d67['UniverThreadCommentDataSourcePlugin']=_0x55e57c([_0x4c72af[_0x1847fc(0x134)](_0x768b18[_0x1847fc(0x132)],_0x512cec[_0x1847fc(0x15d)],_0x116b22[_0x1847fc(0x138)]),_0x327c18(0x1,_0x4c72af[_0x1847fc(0x131)](_0x4c72af[_0x1847fc(0x162)])),_0x327c18(0x2,_0x4c72af[_0x1847fc(0x147)])],_0x208d67[_0x1847fc(0x124)]),Object[_0x1847fc(0x136)](_0x208d67,Symbol['toStringTag'],{'value':'Module'});}));
1
+ function _0x43f1(_0x36da2f,_0x16b387){const _0xc2cf7=_0xc2cf();return _0x43f1=function(_0x43f1df,_0x140aed){_0x43f1df=_0x43f1df-0xba;let _0x4c2016=_0xc2cf7[_0x43f1df];return _0x4c2016;},_0x43f1(_0x36da2f,_0x16b387);}(function(_0x470bea,_0x42c240){const _0x391169=_0x43f1,_0x284deb=_0x470bea();while(!![]){try{const _0x1a6ba5=-parseInt(_0x391169(0x126))/0x1+parseInt(_0x391169(0x12e))/0x2*(parseInt(_0x391169(0xfe))/0x3)+-parseInt(_0x391169(0xdc))/0x4+parseInt(_0x391169(0xe2))/0x5*(parseInt(_0x391169(0xeb))/0x6)+-parseInt(_0x391169(0x129))/0x7+-parseInt(_0x391169(0xe3))/0x8+-parseInt(_0x391169(0xd6))/0x9*(-parseInt(_0x391169(0x113))/0xa);if(_0x1a6ba5===_0x42c240)break;else _0x284deb['push'](_0x284deb['shift']());}catch(_0x281fa3){_0x284deb['push'](_0x284deb['shift']());}}}(_0xc2cf,0xe3372),function(_0x15a951,_0x35b3a8){const _0x5dad30=_0x43f1;typeof exports==_0x5dad30(0x13d)&&typeof module<'u'?_0x35b3a8(exports,require('@univerjs-pro/collaboration-client'),require(_0x5dad30(0x10d)),require('@univerjs/core'),require(_0x5dad30(0x10b)),require(_0x5dad30(0x12c)),require(_0x5dad30(0xd7)),require(_0x5dad30(0xf6))):typeof define=='function'&&define[_0x5dad30(0xd4)]?define([_0x5dad30(0xbf),_0x5dad30(0x145),_0x5dad30(0x10d),_0x5dad30(0x143),_0x5dad30(0x10b),'@univerjs/thread-comment',_0x5dad30(0xd7),'@univerjs/network'],_0x35b3a8):(_0x15a951=typeof globalThis<'u'?globalThis:_0x15a951||self,_0x35b3a8(_0x15a951[_0x5dad30(0xc1)]={},_0x15a951[_0x5dad30(0xd0)],_0x15a951[_0x5dad30(0x120)],_0x15a951[_0x5dad30(0xd2)],_0x15a951[_0x5dad30(0xc0)],_0x15a951[_0x5dad30(0x112)],_0x15a951['rxjs'],_0x15a951[_0x5dad30(0xcf)]));}(this,function(_0x54d49c,_0x4c1c17,_0x8482c3,_0x579369,_0x156ba2,_0x141fb6,_0x3ebea4,_0x5582af){'use strict';const _0x2d2e45=_0x43f1;const _0xc38d30=_0x2d2e45(0x11e);var _0x3a052c=(_0x49e25f=>(_0x49e25f[_0x49e25f[_0x2d2e45(0x11b)]=0x0]=_0x2d2e45(0x11b),_0x49e25f[_0x49e25f[_0x2d2e45(0xee)]=0x1]=_0x2d2e45(0xee),_0x49e25f[_0x49e25f[_0x2d2e45(0x133)]=-0x1]=_0x2d2e45(0x133),_0x49e25f))(_0x3a052c||{}),_0x4ea703=(_0x4ae1cb=>(_0x4ae1cb[_0x4ae1cb[_0x2d2e45(0x12f)]=0x0]=_0x2d2e45(0x12f),_0x4ae1cb[_0x4ae1cb[_0x2d2e45(0xbd)]=0x1]=_0x2d2e45(0xbd),_0x4ae1cb[_0x4ae1cb[_0x2d2e45(0xe8)]=0x2]=_0x2d2e45(0xe8),_0x4ae1cb[_0x4ae1cb[_0x2d2e45(0xc3)]=0x3]='Edit',_0x4ae1cb[_0x4ae1cb[_0x2d2e45(0x11c)]=0x4]=_0x2d2e45(0x11c),_0x4ae1cb[_0x4ae1cb[_0x2d2e45(0xc6)]=0x5]=_0x2d2e45(0xc6),_0x4ae1cb[_0x4ae1cb[_0x2d2e45(0x133)]=-0x1]=_0x2d2e45(0x133),_0x4ae1cb))(_0x4ea703||{});const _0x165b22=_0x4e7e9f=>_0x579369[_0x2d2e45(0x12b)](new Date(+_0x4e7e9f))[_0x2d2e45(0x130)](_0x2d2e45(0x137)),_0x590b74=async(_0x570457,_0x268ed5)=>{const _0x35f1e6=_0x2d2e45,_0x4042a7=_0x570457[_0x35f1e6(0x10f)](_0x579369[_0x35f1e6(0x135)]),_0x2aff2d=_0x570457[_0x35f1e6(0x10f)](_0x5582af[_0x35f1e6(0x106)]);_0x268ed5[_0x35f1e6(0x144)](_0x22f679=>{const _0x72a06=_0x35f1e6;_0x4042a7['getUser'](_0x22f679)&&_0x268ed5[_0x72a06(0x121)](_0x22f679);}),_0x268ed5[_0x35f1e6(0xe6)]&&(await _0x2aff2d['get'](_0x35f1e6(0xdd),{'params':{'userIDs':[..._0x268ed5]}}))[_0x35f1e6(0xc4)]['users']['forEach'](_0x445c32=>{const _0x2af246=_0x35f1e6;_0x445c32&&_0x4042a7[_0x2af246(0x107)](_0x445c32);});};var _0x17280b=Object[_0x2d2e45(0xda)],_0xc05f0=(_0xf3d194,_0x392ed6,_0x3453d0,_0x5f164c)=>{const _0x5e578c=_0x2d2e45;for(var _0x420901=_0x5f164c>0x1?void 0x0:_0x5f164c?_0x17280b(_0x392ed6,_0x3453d0):_0x392ed6,_0x10bfc1=_0xf3d194[_0x5e578c(0xfd)]-0x1,_0x2efc8b;_0x10bfc1>=0x0;_0x10bfc1--)(_0x2efc8b=_0xf3d194[_0x10bfc1])&&(_0x420901=_0x2efc8b(_0x420901)||_0x420901);return _0x420901;},_0x38404b=(_0x37eab3,_0x405e11)=>(_0x376ec2,_0x401b41)=>_0x405e11(_0x376ec2,_0x401b41,_0x37eab3);let _0x151021=class extends _0x579369[_0x2d2e45(0x104)]{constructor(_0x2962bd,_0x3096bc,_0x40f619,_0x54b175){const _0x4598e3=_0x2d2e45;super(),this['_commentService']=_0x2962bd,this[_0x4598e3(0xe1)]=_0x3096bc,this['_userService']=_0x40f619,this[_0x4598e3(0x119)]=_0x54b175,this[_0x4598e3(0xe7)](),this['_initUserSync']();}['_initUserSync'](){const _0x16b0cd=_0x2d2e45;this['disposeWithMe'](this[_0x16b0cd(0xe1)][_0x16b0cd(0xf4)][_0x16b0cd(0x124)](_0x3ebea4[_0x16b0cd(0xd8)](0x10))['subscribe'](_0x1d2257=>{const _0x10731b=_0x16b0cd,_0x4ae0e4=new Set();_0x1d2257[_0x10731b(0x144)](_0x1cf72b=>{const _0x52cca0=_0x10731b;switch(_0x1cf72b[_0x52cca0(0x101)]){case _0x52cca0(0x11a):{const _0x4388b2=_0x1cf72b[_0x52cca0(0xf2)][_0x52cca0(0x13b)];_0x4ae0e4[_0x52cca0(0x11a)](_0x4388b2);break;}}}),_0x590b74(this[_0x10731b(0x119)],_0x4ae0e4);}));}[_0x2d2e45(0xe7)](){const _0x2c86ab=_0x2d2e45;this[_0x2c86ab(0x142)](this[_0x2c86ab(0x13a)]['commentUpdate$']['subscribe'](async _0x1c917f=>{const _0x11809c=_0x2c86ab;var _0x2c7029,_0x46a428,_0x793cf0,_0x599e13;const _0x4d613f=(_0x2c7029=this[_0x11809c(0xe1)][_0x11809c(0x146)](_0x1c917f['unitId'])['find'](_0x5ace7e=>_0x5ace7e['threadId']===_0x1c917f[_0x11809c(0x103)]))==null?void 0x0:_0x2c7029[_0x11809c(0xde)];if(!_0x4d613f)return;const {unitId:_0x142f69,subUnitId:_0x328480}=_0x4d613f;switch(_0x1c917f['user']&&this[_0x11809c(0x100)][_0x11809c(0x107)](_0x1c917f[_0x11809c(0x138)]),_0x1c917f[_0x11809c(0x101)]){case _0x4ea703['Add']:break;case _0x4ea703[_0x11809c(0xe8)]:{this['_threadCommentModel']['addComment'](_0x142f69,_0x328480,{'unitId':_0x142f69,'subUnitId':_0x328480,'ref':'','id':_0x1c917f[_0x11809c(0xd5)],'dT':_0x165b22(+_0x1c917f[_0x11809c(0xc2)]),'threadId':_0x1c917f['threadId'],'personId':(_0x793cf0=(_0x46a428=_0x1c917f[_0x11809c(0x138)])==null?void 0x0:_0x46a428[_0x11809c(0x139)])!=null?_0x793cf0:_0x1c917f[_0x11809c(0xfc)],'text':JSON[_0x11809c(0xcd)](_0x1c917f[_0x11809c(0xc5)]),'parentId':_0x4d613f['id']});break;}case _0x4ea703['Delete']:{const _0xf7a5b=this[_0x11809c(0xe1)][_0x11809c(0xdb)](_0x142f69,_0x328480,_0x1c917f[_0x11809c(0xd5)]);_0xf7a5b&&_0xf7a5b[_0x11809c(0xf3)]&&this[_0x11809c(0xe1)][_0x11809c(0xe5)](_0x142f69,_0x328480,_0x1c917f['replyId']);break;}case _0x4ea703[_0x11809c(0xc3)]:{this[_0x11809c(0xe1)][_0x11809c(0xcb)](_0x142f69,_0x328480,{'commentId':_0x1c917f[_0x11809c(0xd5)],'text':JSON['parse'](_0x1c917f[_0x11809c(0xc5)])});break;}case _0x4ea703[_0x11809c(0xc6)]:{const _0x43eccc=(_0x599e13=this[_0x11809c(0xe1)][_0x11809c(0x146)](_0x1c917f[_0x11809c(0x109)])[_0x11809c(0xf8)](_0x179012=>_0x179012[_0x11809c(0x103)]===_0x1c917f[_0x11809c(0x103)]))==null?void 0x0:_0x599e13[_0x11809c(0xde)];_0x43eccc&&this[_0x11809c(0xe1)]['resolveComment'](_0x142f69,_0x328480,_0x43eccc['id'],_0x1c917f[_0x11809c(0xed)]===_0x3a052c[_0x11809c(0xee)]);break;}}}));}};_0x151021=_0xc05f0([_0x38404b(0x0,_0x579369[_0x2d2e45(0xbb)](_0x4c1c17['CommentService'])),_0x38404b(0x1,_0x579369[_0x2d2e45(0xbb)](_0x141fb6['ThreadCommentModel'])),_0x38404b(0x2,_0x579369[_0x2d2e45(0xbb)](_0x579369[_0x2d2e45(0x135)])),_0x38404b(0x3,_0x579369[_0x2d2e45(0xbb)](_0x579369[_0x2d2e45(0x125)]))],_0x151021);const _0x1ed8b0=_0x2d2e45(0x10e),_0x10ccf9={};var _0x351495=Object['getOwnPropertyDescriptor'],_0xfb05f=(_0x4d20da,_0x65ece1,_0x35df26,_0x1f6712)=>{const _0xc54400=_0x2d2e45;for(var _0xa39a2=_0x1f6712>0x1?void 0x0:_0x1f6712?_0x351495(_0x65ece1,_0x35df26):_0x65ece1,_0x2d22a5=_0x4d20da[_0xc54400(0xfd)]-0x1,_0x1d1f96;_0x2d22a5>=0x0;_0x2d22a5--)(_0x1d1f96=_0x4d20da[_0x2d22a5])&&(_0xa39a2=_0x1d1f96(_0xa39a2)||_0xa39a2);return _0xa39a2;},_0x26547a=(_0x35124e,_0x1219d6)=>(_0x1626df,_0x4a0c87)=>_0x1219d6(_0x1626df,_0x4a0c87,_0x35124e);function _0x3a0a8f(_0x591ed4,_0x28a3d4){const _0x5a821a=_0x2d2e45,_0x3e7931=_0x591ed4[_0x5a821a(0x132)][0x0];return{..._0x28a3d4,'id':_0x3e7931[_0x5a821a(0xd5)],'resolved':_0x591ed4[_0x5a821a(0xed)]===0x1,'dT':_0x165b22(_0x3e7931[_0x5a821a(0xc2)]),'personId':_0x3e7931[_0x5a821a(0xfc)],'threadId':_0x3e7931[_0x5a821a(0x103)]};}function _0x3f98ee(_0x395db8,_0x26022c,_0x4deb74){const _0x51a0de=_0x2d2e45;var _0x5b87a3,_0x93ccc3;if(((_0x93ccc3=(_0x5b87a3=_0x395db8==null?void 0x0:_0x395db8[_0x51a0de(0x132)])==null?void 0x0:_0x5b87a3[_0x51a0de(0xfd)])!=null?_0x93ccc3:0x0)>0x0){const _0x65c31d=(_0x182663,_0x204dad)=>({'id':_0x182663[_0x51a0de(0xd5)],'threadId':_0x182663[_0x51a0de(0x103)],'dT':_0x165b22(_0x182663['createTimestamp']),'personId':_0x182663[_0x51a0de(0xfc)],'resolved':_0x395db8[_0x51a0de(0xed)]===_0x3a052c['Solved'],'unitId':_0x26022c,'subUnitId':_0x4deb74,'text':JSON[_0x51a0de(0xcd)](_0x182663['content']),'parentId':_0x204dad}),_0x2a97af=_0x65c31d(_0x395db8[_0x51a0de(0x132)][0x0]);return{..._0x2a97af,'children':_0x395db8[_0x51a0de(0x132)][_0x51a0de(0xfa)](0x1)[_0x51a0de(0xf1)](_0x1a6701=>_0x65c31d(_0x1a6701,_0x2a97af['id']))};}return null;}let _0x1e5aab=class{constructor(_0x250a6c,_0x2df400,_0x54bf0e,_0x69e55a){const _0x1bb8f9=_0x2d2e45;this[_0x1bb8f9(0x11f)]=_0x250a6c,this[_0x1bb8f9(0x100)]=_0x2df400,this[_0x1bb8f9(0xff)]=_0x54bf0e,this[_0x1bb8f9(0x119)]=_0x69e55a;}async[_0x2d2e45(0x13f)](_0x3dd93d){const _0x5991bb=_0x2d2e45;var _0x1cf2f5,_0x13702d;const {parentId:_0x23d76b,unitId:_0x1e503f,text:_0x3ebe46,threadId:_0x48d87b}=_0x3dd93d,_0x2516ef=(_0x13702d=(_0x1cf2f5=_0x3ebe46[_0x5991bb(0xc7)])==null?void 0x0:_0x1cf2f5[_0x5991bb(0xf9)](_0x132c0e=>_0x132c0e['rangeType']===_0x579369[_0x5991bb(0xe9)][_0x5991bb(0x116)])[_0x5991bb(0xf1)](_0x36b32c=>_0x36b32c[_0x5991bb(0x108)]))!=null?_0x13702d:[],_0x237f42=JSON[_0x5991bb(0x13e)](_0x3ebe46),_0x183bb2=(await this[_0x5991bb(0xff)][_0x5991bb(0x115)](_0x1e503f))[_0x5991bb(0x123)]();if(_0x23d76b){const _0xa88051={'memberId':_0x183bb2,'unitId':_0x1e503f,'content':_0x237f42,'mention':_0x2516ef,'threadId':_0x48d87b},_0x491ddb=(await this[_0x5991bb(0x11f)][_0x5991bb(0xef)]('/universer-api/comment/unit/'+_0x1e503f+_0x5991bb(0x10c),{'body':_0xa88051}))['body'][_0x5991bb(0x136)];return{..._0x3dd93d,'id':_0x491ddb[_0x5991bb(0xd5)],'dT':_0x579369['dayjs'](+_0x491ddb[_0x5991bb(0xc2)])[_0x5991bb(0x130)](_0x5991bb(0x137)),'personId':_0x491ddb[_0x5991bb(0xfc)]};}else{const _0x5bc52d={'memberId':_0x183bb2,'unitId':_0x1e503f,'content':_0x237f42,'mention':_0x2516ef},_0x238297=await this[_0x5991bb(0x11f)][_0x5991bb(0xef)]('/universer-api/comment/unit/'+_0x1e503f+_0x5991bb(0xf0),{'body':_0x5bc52d});return _0x3a0a8f(_0x238297[_0x5991bb(0xc4)][_0x5991bb(0x117)],_0x3dd93d);}}async['updateComment'](_0x5a34cd){const _0x4283bd=_0x2d2e45;var _0x1c2240,_0x54950b;const {text:_0x457534,unitId:_0x397a4e}=_0x5a34cd,_0x3db34f=(_0x54950b=(_0x1c2240=_0x457534[_0x4283bd(0xc7)])==null?void 0x0:_0x1c2240[_0x4283bd(0xf9)](_0x36accb=>_0x36accb[_0x4283bd(0xce)]===_0x579369['CustomRangeType'][_0x4283bd(0x116)])[_0x4283bd(0xf1)](_0x326741=>_0x326741[_0x4283bd(0x108)]))!=null?_0x54950b:[],_0x48d0f2=JSON[_0x4283bd(0x13e)](_0x457534),_0xb5ae0a=_0x5a34cd['threadId'],_0x74f73f=_0x5a34cd['id'],_0x2648ba={'memberId':(await this['_sessionService'][_0x4283bd(0x115)](_0x397a4e))[_0x4283bd(0x123)](),'unitId':_0x397a4e,'threadId':_0xb5ae0a,'mention':_0x3db34f,'content':_0x48d0f2,'replyId':_0x74f73f},_0x2bcf35=await this['_httpService'][_0x4283bd(0xef)](_0x4283bd(0x111)+_0x397a4e+_0x4283bd(0x110),{'body':_0x2648ba});return!_0x2bcf35['body']['error']||_0x2bcf35[_0x4283bd(0xc4)][_0x4283bd(0x12d)]['code']===0x1;}async[_0x2d2e45(0xfb)](_0x393c5e){const _0x34b5b3=_0x2d2e45,{unitId:_0x23a057}=_0x393c5e,_0x34dda0=_0x393c5e[_0x34b5b3(0x103)],_0x36cda6={'memberId':this[_0x34b5b3(0x100)]['getCurrentUser']()[_0x34b5b3(0x139)],'unitId':_0x23a057,'threadId':_0x34dda0,'solved':_0x393c5e[_0x34b5b3(0x141)]?_0x3a052c['Solved']:_0x3a052c[_0x34b5b3(0x11b)]},_0x5c5986=await this[_0x34b5b3(0x11f)]['post']('/universer-api/comment/unit/'+_0x23a057+_0x34b5b3(0xd1),{'body':_0x36cda6});return!_0x5c5986[_0x34b5b3(0xc4)][_0x34b5b3(0x12d)]||_0x5c5986['body'][_0x34b5b3(0x12d)][_0x34b5b3(0x10a)]===0x1;}async[_0x2d2e45(0xe5)](_0x3c32c3,_0xd63927,_0x1a475f,_0x186ebd){const _0x3b38d4=_0x2d2e45,_0x37fdeb={'memberId':(await this[_0x3b38d4(0xff)][_0x3b38d4(0x115)](_0x3c32c3))['getMemberID'](),'threadId':_0x1a475f,'replyId':_0x186ebd,'unitId':_0x3c32c3},_0x6396cd=await this[_0x3b38d4(0x11f)][_0x3b38d4(0xef)](_0x3b38d4(0x111)+_0x3c32c3+'/delete',{'body':_0x37fdeb});return!_0x6396cd[_0x3b38d4(0xc4)][_0x3b38d4(0x12d)]||_0x6396cd[_0x3b38d4(0xc4)][_0x3b38d4(0x12d)][_0x3b38d4(0x10a)]===0x1;}async[_0x2d2e45(0x134)](_0x1dd913,_0x2149bd,_0x335df5){const _0x5c0cbc=_0x2d2e45,_0xca5248={'unitId':_0x1dd913,'threadId':_0x335df5},_0x156b29=await this[_0x5c0cbc(0x11f)][_0x5c0cbc(0xef)](_0x5c0cbc(0x111)+_0x1dd913+'/list',{'body':_0xca5248}),_0x1ed055=_0x335df5[_0x5c0cbc(0xf1)](_0x2cd7c6=>_0x3f98ee(_0x156b29[_0x5c0cbc(0xc4)]['comments'][_0x2cd7c6],_0x1dd913,_0x2149bd))['filter'](Boolean);return Object['values'](_0x156b29[_0x5c0cbc(0xc4)][_0x5c0cbc(0xc8)])[_0x5c0cbc(0x144)](_0x242e15=>{const _0x43aedf=_0x5c0cbc;this['_userService'][_0x43aedf(0x107)](_0x242e15);}),_0x1ed055;}[_0x2d2e45(0xbe)](_0x419f3f){const _0x2279b2=_0x2d2e45;return{'id':_0x419f3f['id'],'threadId':_0x419f3f[_0x2279b2(0x103)],'ref':_0x419f3f['ref']};}};_0x1e5aab=_0xfb05f([_0x26547a(0x0,_0x579369[_0x2d2e45(0xbb)](_0x5582af['HTTPService'])),_0x26547a(0x1,_0x579369['Inject'](_0x579369[_0x2d2e45(0x135)])),_0x26547a(0x2,_0x579369[_0x2d2e45(0xbb)](_0x4c1c17[_0x2d2e45(0xd3)])),_0x26547a(0x3,_0x579369[_0x2d2e45(0xbb)](_0x579369[_0x2d2e45(0x125)]))],_0x1e5aab);var _0x1c26fa=Object[_0x2d2e45(0xda)],_0x3bd9aa=(_0x5dfde3,_0x58715f,_0x28aa15,_0x3a0e9f)=>{const _0x1a56f0=_0x2d2e45;for(var _0x243a6c=_0x3a0e9f>0x1?void 0x0:_0x3a0e9f?_0x1c26fa(_0x58715f,_0x28aa15):_0x58715f,_0x8d19ab=_0x5dfde3[_0x1a56f0(0xfd)]-0x1,_0x2bbbdb;_0x8d19ab>=0x0;_0x8d19ab--)(_0x2bbbdb=_0x5dfde3[_0x8d19ab])&&(_0x243a6c=_0x2bbbdb(_0x243a6c)||_0x243a6c);return _0x243a6c;},_0x4c242e=(_0xdf3d45,_0x282a0d)=>(_0xc0f7c6,_0x50e051)=>_0x282a0d(_0xc0f7c6,_0x50e051,_0xdf3d45);let _0x7f0734=class extends _0x579369['Disposable']{constructor(_0x11fed3,_0x5c1e25){const _0x4bb6dc=_0x2d2e45;super(),this[_0x4bb6dc(0x13c)]=_0x11fed3,this['_threadCommentDataSource']=_0x5c1e25,this[_0x4bb6dc(0xba)]();}['_initDataSource'](){const _0xcda8f4=_0x2d2e45;this[_0xcda8f4(0x13c)][_0xcda8f4(0xbc)]=this[_0xcda8f4(0x118)],this[_0xcda8f4(0x13c)][_0xcda8f4(0xf7)]=!0x1;}};_0x7f0734=_0x3bd9aa([_0x4c242e(0x0,_0x141fb6[_0x2d2e45(0x122)]),_0x4c242e(0x1,_0x579369[_0x2d2e45(0xbb)](_0x1e5aab))],_0x7f0734);var _0x5226aa=Object['defineProperty'],_0x20d7a4=Object[_0x2d2e45(0xda)],_0x47eaff=(_0x4ce230,_0x119661,_0xab66b)=>_0x119661 in _0x4ce230?_0x5226aa(_0x4ce230,_0x119661,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xab66b}):_0x4ce230[_0x119661]=_0xab66b,_0x31c789=(_0xbd519,_0x47cd3a,_0x24c25c,_0x511981)=>{for(var _0x1a00c1=_0x511981>0x1?void 0x0:_0x511981?_0x20d7a4(_0x47cd3a,_0x24c25c):_0x47cd3a,_0x2941fb=_0xbd519['length']-0x1,_0x1f1cd5;_0x2941fb>=0x0;_0x2941fb--)(_0x1f1cd5=_0xbd519[_0x2941fb])&&(_0x1a00c1=_0x1f1cd5(_0x1a00c1)||_0x1a00c1);return _0x1a00c1;},_0x1004a2=(_0x4b739a,_0x2d99ed)=>(_0x385b25,_0x11f869)=>_0x2d99ed(_0x385b25,_0x11f869,_0x4b739a),_0x589588=(_0x1a0738,_0x3283bf,_0x5dc0f5)=>_0x47eaff(_0x1a0738,typeof _0x3283bf!=_0x2d2e45(0xc9)?_0x3283bf+'':_0x3283bf,_0x5dc0f5);_0x54d49c[_0x2d2e45(0xcc)]=class extends _0x579369[_0x2d2e45(0xe4)]{constructor(_0x9daa5a=_0x10ccf9,_0x115ecf,_0x53cc4e){const _0x235a36=_0x2d2e45;super(),this[_0x235a36(0xea)]=_0x9daa5a,this[_0x235a36(0x119)]=_0x115ecf,this[_0x235a36(0x127)]=_0x53cc4e;const {..._0x48ad8f}=_0x579369[_0x235a36(0x102)]({},_0x10ccf9,this[_0x235a36(0xea)]);this[_0x235a36(0x127)][_0x235a36(0xd9)](_0x1ed8b0,_0x48ad8f);}[_0x2d2e45(0xec)](){[[_0x1e5aab],[_0x7f0734],[_0x151021]]['forEach'](_0x359d39=>{const _0x3fbdf5=_0x43f1;this[_0x3fbdf5(0x119)][_0x3fbdf5(0x11a)](_0x359d39);});}[_0x2d2e45(0xe0)](){const _0x42df1c=_0x2d2e45;this['_injector'][_0x42df1c(0x10f)](_0x7f0734),this[_0x42df1c(0x119)]['get'](_0x151021);}},_0x589588(_0x54d49c[_0x2d2e45(0xcc)],_0x2d2e45(0x11d),_0xc38d30),_0x589588(_0x54d49c['UniverThreadCommentDataSourcePlugin'],_0x2d2e45(0x101),_0x579369['UniverInstanceType'][_0x2d2e45(0x114)]),_0x54d49c[_0x2d2e45(0xcc)]=_0x31c789([_0x579369[_0x2d2e45(0xdf)](_0x156ba2[_0x2d2e45(0x131)],_0x4c1c17[_0x2d2e45(0xca)],_0x8482c3[_0x2d2e45(0x12a)]),_0x1004a2(0x1,_0x579369[_0x2d2e45(0xbb)](_0x579369['Injector'])),_0x1004a2(0x2,_0x579369[_0x2d2e45(0xf5)])],_0x54d49c[_0x2d2e45(0xcc)]),Object[_0x2d2e45(0x105)](_0x54d49c,Symbol[_0x2d2e45(0x140)],{'value':_0x2d2e45(0x128)});}));function _0xc2cf(){const _0x45aa3f=['delete','IThreadCommentDataSourceService','getMemberID','pipe','Injector','264475mAFZQp','_configService','Module','2985605voyKld','UniverLicensePlugin','dayjs','@univerjs/thread-comment','error','6QArDEL','Unknown','format','UniverThreadCommentUIPlugin','replies','UNRECOGNIZED','listComments','UserManagerService','reply','YYYY/MM/DD\x20HH:mm','user','userID','_commentService','personId','_threadCommentDataSourceService','object','stringify','addComment','toStringTag','resolved','disposeWithMe','@univerjs/core','forEach','@univerjs-pro/collaboration-client','getUnit','_initDataSource','Inject','dataSource','Add','saveCommentToSnapshot','exports','UniverThreadCommentUi','UniverProThreadCommentDatasource','createTimestamp','Edit','body','content','Solve','customRanges','users','symbol','UniverCollaborationClientPlugin','updateComment','UniverThreadCommentDataSourcePlugin','parse','rangeType','UniverNetwork','UniverProCollaborationClient','/solved','UniverCore','CollaborationSessionService','amd','replyId','3522753aAMYph','rxjs','bufferTime','setConfig','getOwnPropertyDescriptor','getComment','2449468wEVInF','/universer-api/user/list','root','DependentOn','onReady','_threadCommentModel','35IHzjIQ','6858088UaSoUk','Plugin','deleteComment','size','_init','Reply','CustomRangeType','_config','406446AbDFwI','onStarting','solved','Solved','post','/add','map','payload','parentId','commentUpdate$','IConfigService','@univerjs/network','syncUpdateMutationToColla','find','filter','slice','resolveComment','userId','length','1051437DnPdVf','_sessionService','_userService','type','merge','threadId','Disposable','defineProperty','HTTPService','addUser','rangeId','unitId','code','@univerjs/thread-comment-ui','/reply','@univerjs-pro/license','thread-comment-data-source.config','get','/edit','/universer-api/comment/unit/','UniverThreadComment','40bzvWPo','UNIVER_UNKNOWN','requireSession','COMMENT','comment','_threadCommentDataSource','_injector','add','OpenOrReOpen','Delete','pluginName','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_httpService','UniverProLicense'];_0xc2cf=function(){return _0x45aa3f;};return _0xc2cf();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.6.0",
3
+ "version": "0.6.1-nightly.202502211606",
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.6.0",
49
- "@univerjs/core": "0.6.0",
50
- "@univerjs-pro/license": "0.6.0",
51
- "@univerjs/network": "0.6.0",
52
- "@univerjs/protocol": "0.1.44-alpha.2",
53
- "@univerjs/thread-comment": "0.6.0",
54
- "@univerjs/thread-comment-ui": "0.6.0"
48
+ "@univerjs-pro/collaboration-client": "0.6.1-nightly.202502211606",
49
+ "@univerjs-pro/license": "0.6.1-nightly.202502211606",
50
+ "@univerjs/core": "0.6.1-nightly.202502211606",
51
+ "@univerjs/network": "0.6.1-nightly.202502211606",
52
+ "@univerjs/thread-comment": "0.6.1-nightly.202502211606",
53
+ "@univerjs/thread-comment-ui": "0.6.1-nightly.202502211606",
54
+ "@univerjs/protocol": "0.1.44-alpha.3"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",
58
58
  "typescript": "^5.7.3",
59
- "vite": "^6.1.0",
60
- "vitest": "^3.0.5",
61
- "@univerjs-infra/shared": "0.6.0"
59
+ "vite": "^6.1.1",
60
+ "vitest": "^3.0.6",
61
+ "@univerjs-infra/shared": "0.6.1"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",