@univerjs-pro/thread-comment-datasource 0.6.0 → 0.6.1-nightly.202502221605
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 +1 -1
- package/lib/es/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +11 -11
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 _0x235e21=_0x1829;(function(_0x288050,_0x30d3e6){const _0x9bd09a=_0x1829,_0x4683b0=_0x288050();while(!![]){try{const _0xa4ec7b=parseInt(_0x9bd09a(0x16f))/0x1*(-parseInt(_0x9bd09a(0x163))/0x2)+parseInt(_0x9bd09a(0x17c))/0x3*(-parseInt(_0x9bd09a(0x1a1))/0x4)+parseInt(_0x9bd09a(0x16e))/0x5*(parseInt(_0x9bd09a(0x19f))/0x6)+-parseInt(_0x9bd09a(0x181))/0x7*(parseInt(_0x9bd09a(0x1b5))/0x8)+parseInt(_0x9bd09a(0x155))/0x9+parseInt(_0x9bd09a(0x1b7))/0xa*(parseInt(_0x9bd09a(0x1ab))/0xb)+parseInt(_0x9bd09a(0x1a0))/0xc;if(_0xa4ec7b===_0x30d3e6)break;else _0x4683b0['push'](_0x4683b0['shift']());}catch(_0x26f0ff){_0x4683b0['push'](_0x4683b0['shift']());}}}(_0xe090,0x68f5a));Object[_0x235e21(0x187)](exports,Symbol[_0x235e21(0x1bf)],{'value':'Module'});const b=require(_0x235e21(0x1a6)),T=require('@univerjs-pro/license'),c=require(_0x235e21(0x18d)),j=require(_0x235e21(0x156)),M=require(_0x235e21(0x18c)),w=require(_0x235e21(0x159)),P=require(_0x235e21(0x150)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2dfef5=>(_0x2dfef5[_0x2dfef5[_0x235e21(0x16b)]=0x0]=_0x235e21(0x16b),_0x2dfef5[_0x2dfef5[_0x235e21(0x14f)]=0x1]='Solved',_0x2dfef5[_0x2dfef5[_0x235e21(0x192)]=-0x1]=_0x235e21(0x192),_0x2dfef5))(I||{}),v=(_0x5877dd=>(_0x5877dd[_0x5877dd[_0x235e21(0x153)]=0x0]=_0x235e21(0x153),_0x5877dd[_0x5877dd[_0x235e21(0x1ba)]=0x1]=_0x235e21(0x1ba),_0x5877dd[_0x5877dd['Reply']=0x2]=_0x235e21(0x151),_0x5877dd[_0x5877dd[_0x235e21(0x178)]=0x3]=_0x235e21(0x178),_0x5877dd[_0x5877dd[_0x235e21(0x164)]=0x4]=_0x235e21(0x164),_0x5877dd[_0x5877dd[_0x235e21(0x16a)]=0x5]=_0x235e21(0x16a),_0x5877dd[_0x5877dd[_0x235e21(0x192)]=-0x1]=_0x235e21(0x192),_0x5877dd))(v||{});const f=_0x5e0b2b=>c[_0x235e21(0x176)](new Date(+_0x5e0b2b))[_0x235e21(0x169)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x3f3235,_0x2cb58f)=>{const _0x22d6c7=_0x235e21,_0x32f88f=_0x3f3235['get'](c[_0x22d6c7(0x1a8)]),_0x94218f=_0x3f3235[_0x22d6c7(0x180)](P[_0x22d6c7(0x1c9)]);_0x2cb58f['forEach'](_0xc236fd=>{const _0x1e04df=_0x22d6c7;_0x32f88f[_0x1e04df(0x1bc)](_0xc236fd)&&_0x2cb58f[_0x1e04df(0x1c6)](_0xc236fd);}),_0x2cb58f[_0x22d6c7(0x1ca)]&&(await _0x94218f[_0x22d6c7(0x180)](_0x22d6c7(0x162),{'params':{'userIDs':[..._0x2cb58f]}}))[_0x22d6c7(0x195)][_0x22d6c7(0x179)]['forEach'](_0x3041c3=>{const _0x55b401=_0x22d6c7;_0x3041c3&&_0x32f88f[_0x55b401(0x17b)](_0x3041c3);});};var $=Object[_0x235e21(0x19d)],E=(_0x5d5738,_0x14e9bd,_0x30ce94,_0x1025cd)=>{const _0x2184bc=_0x235e21;for(var _0x176443=_0x1025cd>0x1?void 0x0:_0x1025cd?$(_0x14e9bd,_0x30ce94):_0x14e9bd,_0x4ff17a=_0x5d5738[_0x2184bc(0x149)]-0x1,_0x3ce3f1;_0x4ff17a>=0x0;_0x4ff17a--)(_0x3ce3f1=_0x5d5738[_0x4ff17a])&&(_0x176443=_0x3ce3f1(_0x176443)||_0x176443);return _0x176443;},S=(_0x2e14c8,_0x25ac94)=>(_0x4b0819,_0x9d53e8)=>_0x25ac94(_0x4b0819,_0x9d53e8,_0x2e14c8);function _0x1829(_0xf791bb,_0x5e562f){const _0xe09032=_0xe090();return _0x1829=function(_0x182972,_0x26c244){_0x182972=_0x182972-0x149;let _0x27a6be=_0xe09032[_0x182972];return _0x27a6be;},_0x1829(_0xf791bb,_0x5e562f);}let p=class extends c[_0x235e21(0x189)]{constructor(_0x4e7773,_0x21fe5a,_0x881762,_0x5b9d6b){const _0x285f63=_0x235e21;super(),this[_0x285f63(0x1ad)]=_0x4e7773,this[_0x285f63(0x17a)]=_0x21fe5a,this[_0x285f63(0x1b9)]=_0x881762,this[_0x285f63(0x190)]=_0x5b9d6b,this['_init'](),this[_0x285f63(0x1b8)]();}[_0x235e21(0x1b8)](){const _0x45f591=_0x235e21;this[_0x45f591(0x168)](this[_0x45f591(0x17a)][_0x45f591(0x14b)]['pipe'](w['bufferTime'](0x10))['subscribe'](_0x3b4322=>{const _0x23083f=_0x45f591,_0x304946=new Set();_0x3b4322[_0x23083f(0x18f)](_0x2ea8a3=>{const _0x55b35e=_0x23083f;switch(_0x2ea8a3[_0x55b35e(0x19a)]){case _0x55b35e(0x1be):{const _0x25c9a3=_0x2ea8a3[_0x55b35e(0x183)][_0x55b35e(0x1b4)];_0x304946['add'](_0x25c9a3);break;}}}),R(this[_0x23083f(0x190)],_0x304946);}));}['_init'](){const _0x24d1cb=_0x235e21;this[_0x24d1cb(0x168)](this[_0x24d1cb(0x1ad)][_0x24d1cb(0x14b)][_0x24d1cb(0x177)](async _0x41ec97=>{const _0x26a4cb=_0x24d1cb;var _0x1f2c09,_0x45193e,_0x7c7b8c,_0x3e265c;const _0x1b0dae=(_0x1f2c09=this[_0x26a4cb(0x17a)][_0x26a4cb(0x1b0)](_0x41ec97['unitId'])[_0x26a4cb(0x173)](_0x43ef66=>_0x43ef66['threadId']===_0x41ec97[_0x26a4cb(0x15c)]))==null?void 0x0:_0x1f2c09[_0x26a4cb(0x1a7)];if(!_0x1b0dae)return;const {unitId:_0x1dc041,subUnitId:_0x2c3f6f}=_0x1b0dae;switch(_0x41ec97[_0x26a4cb(0x171)]&&this[_0x26a4cb(0x1b9)][_0x26a4cb(0x17b)](_0x41ec97['user']),_0x41ec97[_0x26a4cb(0x19a)]){case v[_0x26a4cb(0x1ba)]:break;case v['Reply']:{this[_0x26a4cb(0x17a)][_0x26a4cb(0x196)](_0x1dc041,_0x2c3f6f,{'unitId':_0x1dc041,'subUnitId':_0x2c3f6f,'ref':'','id':_0x41ec97[_0x26a4cb(0x182)],'dT':f(+_0x41ec97[_0x26a4cb(0x1c5)]),'threadId':_0x41ec97[_0x26a4cb(0x15c)],'personId':(_0x7c7b8c=(_0x45193e=_0x41ec97[_0x26a4cb(0x171)])==null?void 0x0:_0x45193e[_0x26a4cb(0x14d)])!=null?_0x7c7b8c:_0x41ec97[_0x26a4cb(0x17f)],'text':JSON[_0x26a4cb(0x157)](_0x41ec97['content']),'parentId':_0x1b0dae['id']});break;}case v[_0x26a4cb(0x164)]:{const _0x32796c=this[_0x26a4cb(0x17a)]['getComment'](_0x1dc041,_0x2c3f6f,_0x41ec97['replyId']);_0x32796c&&_0x32796c[_0x26a4cb(0x199)]&&this[_0x26a4cb(0x17a)][_0x26a4cb(0x1ac)](_0x1dc041,_0x2c3f6f,_0x41ec97['replyId']);break;}case v['Edit']:{this[_0x26a4cb(0x17a)][_0x26a4cb(0x1a5)](_0x1dc041,_0x2c3f6f,{'commentId':_0x41ec97[_0x26a4cb(0x182)],'text':JSON[_0x26a4cb(0x157)](_0x41ec97[_0x26a4cb(0x17d)])});break;}case v[_0x26a4cb(0x16a)]:{const _0x371c6f=(_0x3e265c=this[_0x26a4cb(0x17a)][_0x26a4cb(0x1b0)](_0x41ec97['unitId'])[_0x26a4cb(0x173)](_0x53b00d=>_0x53b00d[_0x26a4cb(0x15c)]===_0x41ec97[_0x26a4cb(0x15c)]))==null?void 0x0:_0x3e265c['root'];_0x371c6f&&this[_0x26a4cb(0x17a)][_0x26a4cb(0x1aa)](_0x1dc041,_0x2c3f6f,_0x371c6f['id'],_0x41ec97[_0x26a4cb(0x194)]===I[_0x26a4cb(0x14f)]);break;}}}));}};p=E([S(0x0,c[_0x235e21(0x172)](b[_0x235e21(0x1bd)])),S(0x1,c[_0x235e21(0x172)](M['ThreadCommentModel'])),S(0x2,c[_0x235e21(0x172)](c[_0x235e21(0x1a8)])),S(0x3,c[_0x235e21(0x172)](c[_0x235e21(0x1b6)]))],p);const q=_0x235e21(0x186),D={};var A=Object[_0x235e21(0x19d)],x=(_0xefc5ef,_0x1435b9,_0x3f1e9b,_0x56611e)=>{const _0x3f5596=_0x235e21;for(var _0x382e71=_0x56611e>0x1?void 0x0:_0x56611e?A(_0x1435b9,_0x3f1e9b):_0x1435b9,_0x2db463=_0xefc5ef[_0x3f5596(0x149)]-0x1,_0x5b3719;_0x2db463>=0x0;_0x2db463--)(_0x5b3719=_0xefc5ef[_0x2db463])&&(_0x382e71=_0x5b3719(_0x382e71)||_0x382e71);return _0x382e71;},_=(_0x19554d,_0x5affff)=>(_0x23174e,_0x26ecdc)=>_0x5affff(_0x23174e,_0x26ecdc,_0x19554d);function Y(_0x443054,_0x1b2680){const _0x1241ef=_0x235e21,_0x5f53e8=_0x443054[_0x1241ef(0x19c)][0x0];return{..._0x1b2680,'id':_0x5f53e8[_0x1241ef(0x182)],'resolved':_0x443054[_0x1241ef(0x194)]===0x1,'dT':f(_0x5f53e8[_0x1241ef(0x1c5)]),'personId':_0x5f53e8['userId'],'threadId':_0x5f53e8[_0x1241ef(0x15c)]};}function G(_0x2d5b58,_0x4de030,_0x58ec80){const _0x2f2dac=_0x235e21;var _0x354cde,_0x34e4a8;if(((_0x34e4a8=(_0x354cde=_0x2d5b58==null?void 0x0:_0x2d5b58['replies'])==null?void 0x0:_0x354cde[_0x2f2dac(0x149)])!=null?_0x34e4a8:0x0)>0x0){const _0x2406fc=(_0x2f62cd,_0x3c23e4)=>({'id':_0x2f62cd[_0x2f2dac(0x182)],'threadId':_0x2f62cd[_0x2f2dac(0x15c)],'dT':f(_0x2f62cd[_0x2f2dac(0x1c5)]),'personId':_0x2f62cd['userId'],'resolved':_0x2d5b58[_0x2f2dac(0x194)]===I[_0x2f2dac(0x14f)],'unitId':_0x4de030,'subUnitId':_0x58ec80,'text':JSON[_0x2f2dac(0x157)](_0x2f62cd[_0x2f2dac(0x17d)]),'parentId':_0x3c23e4}),_0x6d4282=_0x2406fc(_0x2d5b58[_0x2f2dac(0x19c)][0x0]);return{..._0x6d4282,'children':_0x2d5b58[_0x2f2dac(0x19c)][_0x2f2dac(0x193)](0x1)[_0x2f2dac(0x15b)](_0x1ea870=>_0x2406fc(_0x1ea870,_0x6d4282['id']))};}return null;}let g=class{constructor(_0x2fded7,_0x6c6b2e,_0x596956,_0x443a2b){const _0x18ba6b=_0x235e21;this[_0x18ba6b(0x1b1)]=_0x2fded7,this[_0x18ba6b(0x1b9)]=_0x6c6b2e,this[_0x18ba6b(0x16c)]=_0x596956,this[_0x18ba6b(0x190)]=_0x443a2b;}async['addComment'](_0x49f5d3){const _0x1ba050=_0x235e21;var _0x176c33,_0x2286f7;const {parentId:_0x1cc1a6,unitId:_0x5b1056,text:_0x2c9f8e,threadId:_0x3d9075}=_0x49f5d3,_0x2f667b=(_0x2286f7=(_0x176c33=_0x2c9f8e[_0x1ba050(0x1c0)])==null?void 0x0:_0x176c33[_0x1ba050(0x1c2)](_0x47d066=>_0x47d066['rangeType']===c['CustomRangeType']['COMMENT'])[_0x1ba050(0x15b)](_0x54070d=>_0x54070d[_0x1ba050(0x19b)]))!=null?_0x2286f7:[],_0x82dc21=JSON[_0x1ba050(0x18e)](_0x2c9f8e),_0x285423=(await this[_0x1ba050(0x16c)]['requireSession'](_0x5b1056))[_0x1ba050(0x18a)]();if(_0x1cc1a6){const _0x2f307c={'memberId':_0x285423,'unitId':_0x5b1056,'content':_0x82dc21,'mention':_0x2f667b,'threadId':_0x3d9075},_0x2f37e6=(await this['_httpService']['post'](_0x1ba050(0x14a)+_0x5b1056+_0x1ba050(0x1b2),{'body':_0x2f307c}))[_0x1ba050(0x195)]['reply'];return{..._0x49f5d3,'id':_0x2f37e6[_0x1ba050(0x182)],'dT':c['dayjs'](+_0x2f37e6[_0x1ba050(0x1c5)])[_0x1ba050(0x169)](_0x1ba050(0x1c1)),'personId':_0x2f37e6['userId']};}else{const _0x3bfa1a={'memberId':_0x285423,'unitId':_0x5b1056,'content':_0x82dc21,'mention':_0x2f667b},_0x2c4ab7=await this['_httpService'][_0x1ba050(0x160)](_0x1ba050(0x14a)+_0x5b1056+_0x1ba050(0x154),{'body':_0x3bfa1a});return Y(_0x2c4ab7[_0x1ba050(0x195)][_0x1ba050(0x1bb)],_0x49f5d3);}}async[_0x235e21(0x1a5)](_0x19078d){const _0x4afa3c=_0x235e21;var _0x435008,_0x2cecb2;const {text:_0x2b7f49,unitId:_0x2f2051}=_0x19078d,_0xe8ec86=(_0x2cecb2=(_0x435008=_0x2b7f49[_0x4afa3c(0x1c0)])==null?void 0x0:_0x435008[_0x4afa3c(0x1c2)](_0x533b90=>_0x533b90[_0x4afa3c(0x165)]===c['CustomRangeType'][_0x4afa3c(0x1a3)])[_0x4afa3c(0x15b)](_0x532510=>_0x532510[_0x4afa3c(0x19b)]))!=null?_0x2cecb2:[],_0x4a2c64=JSON[_0x4afa3c(0x18e)](_0x2b7f49),_0x366cfb=_0x19078d['threadId'],_0x7e0be5=_0x19078d['id'],_0xbf12f4={'memberId':(await this[_0x4afa3c(0x16c)]['requireSession'](_0x2f2051))[_0x4afa3c(0x18a)](),'unitId':_0x2f2051,'threadId':_0x366cfb,'mention':_0xe8ec86,'content':_0x4a2c64,'replyId':_0x7e0be5},_0x54778e=await this[_0x4afa3c(0x1b1)][_0x4afa3c(0x160)](_0x4afa3c(0x14a)+_0x2f2051+_0x4afa3c(0x1ae),{'body':_0xbf12f4});return!_0x54778e[_0x4afa3c(0x195)][_0x4afa3c(0x15f)]||_0x54778e[_0x4afa3c(0x195)][_0x4afa3c(0x15f)][_0x4afa3c(0x14c)]===0x1;}async[_0x235e21(0x1aa)](_0x2cb8aa){const _0x5745ff=_0x235e21,{unitId:_0x32ad39}=_0x2cb8aa,_0x4fd207=_0x2cb8aa[_0x5745ff(0x15c)],_0x41de80={'memberId':this[_0x5745ff(0x1b9)][_0x5745ff(0x175)]()['userID'],'unitId':_0x32ad39,'threadId':_0x4fd207,'solved':_0x2cb8aa[_0x5745ff(0x17e)]?I[_0x5745ff(0x14f)]:I[_0x5745ff(0x16b)]},_0x28501f=await this[_0x5745ff(0x1b1)][_0x5745ff(0x160)](_0x5745ff(0x14a)+_0x32ad39+_0x5745ff(0x1a4),{'body':_0x41de80});return!_0x28501f[_0x5745ff(0x195)][_0x5745ff(0x15f)]||_0x28501f[_0x5745ff(0x195)][_0x5745ff(0x15f)][_0x5745ff(0x14c)]===0x1;}async[_0x235e21(0x1ac)](_0x568b47,_0x39a9ba,_0x53dd7e,_0x1961bf){const _0x11354f=_0x235e21,_0x4c29e7={'memberId':(await this[_0x11354f(0x16c)][_0x11354f(0x191)](_0x568b47))[_0x11354f(0x18a)](),'threadId':_0x53dd7e,'replyId':_0x1961bf,'unitId':_0x568b47},_0x2c5b89=await this[_0x11354f(0x1b1)][_0x11354f(0x160)](_0x11354f(0x14a)+_0x568b47+_0x11354f(0x1c4),{'body':_0x4c29e7});return!_0x2c5b89[_0x11354f(0x195)]['error']||_0x2c5b89[_0x11354f(0x195)]['error'][_0x11354f(0x14c)]===0x1;}async[_0x235e21(0x158)](_0x44a3da,_0x576489,_0x3c5a17){const _0x1b522d=_0x235e21,_0x4bd2af={'unitId':_0x44a3da,'threadId':_0x3c5a17},_0x4b6297=await this[_0x1b522d(0x1b1)][_0x1b522d(0x160)](_0x1b522d(0x14a)+_0x44a3da+_0x1b522d(0x198),{'body':_0x4bd2af}),_0x1e407a=_0x3c5a17[_0x1b522d(0x15b)](_0x405126=>G(_0x4b6297[_0x1b522d(0x195)][_0x1b522d(0x197)][_0x405126],_0x44a3da,_0x576489))[_0x1b522d(0x1c2)](Boolean);return Object[_0x1b522d(0x1c3)](_0x4b6297[_0x1b522d(0x195)][_0x1b522d(0x179)])['forEach'](_0x281d07=>{const _0x183d53=_0x1b522d;this[_0x183d53(0x1b9)][_0x183d53(0x17b)](_0x281d07);}),_0x1e407a;}[_0x235e21(0x16d)](_0x17135e){const _0x53050e=_0x235e21;return{'id':_0x17135e['id'],'threadId':_0x17135e[_0x53050e(0x15c)],'ref':_0x17135e[_0x53050e(0x167)]};}};g=x([_(0x0,c[_0x235e21(0x172)](P[_0x235e21(0x1c9)])),_(0x1,c[_0x235e21(0x172)](c[_0x235e21(0x1a8)])),_(0x2,c['Inject'](b[_0x235e21(0x1c8)])),_(0x3,c[_0x235e21(0x172)](c[_0x235e21(0x1b6)]))],g);function _0xe090(){const _0x5cb754=['20SBJJjQ','_initUserSync','_userService','Add','comment','getUser','CommentService','add','toStringTag','customRanges','YYYY/MM/DD\x20HH:mm','filter','values','/delete','createTimestamp','delete','_threadCommentDataSourceService','CollaborationSessionService','HTTPService','size','length','/universer-api/comment/unit/','commentUpdate$','code','userID','syncUpdateMutationToColla','Solved','@univerjs/network','Reply','merge','Unknown','/add','2828979OrWVUE','@univerjs/thread-comment-ui','parse','listComments','rxjs','onReady','map','threadId','_initDataSource','UniverThreadCommentUIPlugin','error','post','IConfigService','/universer-api/user/list','1031076GIdIcS','Delete','rangeType','IThreadCommentDataSourceService','ref','disposeWithMe','format','Solve','OpenOrReOpen','_sessionService','saveCommentToSnapshot','5ASsBCh','1RrvXRX','UNIVER_UNKNOWN','user','Inject','find','pluginName','getCurrentUser','dayjs','subscribe','Edit','users','_threadCommentModel','addUser','67047FNmiBJ','content','resolved','userId','get','854DkEhtX','replyId','payload','UniverLicensePlugin','_configService','thread-comment-data-source.config','defineProperty','DependentOn','Disposable','getMemberID','_threadCommentDataSource','@univerjs/thread-comment','@univerjs/core','stringify','forEach','_injector','requireSession','UNRECOGNIZED','slice','solved','body','addComment','comments','/list','parentId','type','rangeId','replies','getOwnPropertyDescriptor','_config','2019426chVkdl','3188160LLtBtM','40MjhYQI','setConfig','COMMENT','/solved','updateComment','@univerjs-pro/collaboration-client','root','UserManagerService','symbol','resolveComment','1600687TovynH','deleteComment','_commentService','/edit','UniverCollaborationClientPlugin','getUnit','_httpService','/reply','UniverThreadCommentDataSourcePlugin','personId','2536nEcxwR','Injector'];_0xe090=function(){return _0x5cb754;};return _0xe090();}var H=Object[_0x235e21(0x19d)],J=(_0x9d1d6c,_0x3a08f7,_0x21d824,_0x78dcc5)=>{const _0xcc4447=_0x235e21;for(var _0x45fb9e=_0x78dcc5>0x1?void 0x0:_0x78dcc5?H(_0x3a08f7,_0x21d824):_0x3a08f7,_0x16bd43=_0x9d1d6c[_0xcc4447(0x149)]-0x1,_0x4e00a;_0x16bd43>=0x0;_0x16bd43--)(_0x4e00a=_0x9d1d6c[_0x16bd43])&&(_0x45fb9e=_0x4e00a(_0x45fb9e)||_0x45fb9e);return _0x45fb9e;},y=(_0x2fc14a,_0x42b63a)=>(_0x445d2d,_0x2bf1a3)=>_0x42b63a(_0x445d2d,_0x2bf1a3,_0x2fc14a);let C=class extends c[_0x235e21(0x189)]{constructor(_0xcd0711,_0x377c20){const _0x5d9aaf=_0x235e21;super(),this['_threadCommentDataSourceService']=_0xcd0711,this[_0x5d9aaf(0x18b)]=_0x377c20,this['_initDataSource']();}[_0x235e21(0x15d)](){const _0x128439=_0x235e21;this[_0x128439(0x1c7)]['dataSource']=this[_0x128439(0x18b)],this[_0x128439(0x1c7)][_0x128439(0x14e)]=!0x1;}};C=J([y(0x0,M[_0x235e21(0x166)]),y(0x1,c[_0x235e21(0x172)](g))],C);var F=Object[_0x235e21(0x187)],L=Object[_0x235e21(0x19d)],Z=(_0xfca63a,_0x296933,_0x1f5ada)=>_0x296933 in _0xfca63a?F(_0xfca63a,_0x296933,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1f5ada}):_0xfca63a[_0x296933]=_0x1f5ada,W=(_0x19b8e2,_0x1c8370,_0x1380e6,_0x19f65c)=>{const _0x11de84=_0x235e21;for(var _0x252832=_0x19f65c>0x1?void 0x0:_0x19f65c?L(_0x1c8370,_0x1380e6):_0x1c8370,_0x2fbf1a=_0x19b8e2[_0x11de84(0x149)]-0x1,_0x4c7a74;_0x2fbf1a>=0x0;_0x2fbf1a--)(_0x4c7a74=_0x19b8e2[_0x2fbf1a])&&(_0x252832=_0x4c7a74(_0x252832)||_0x252832);return _0x252832;},O=(_0xc1795e,_0x3f5caa)=>(_0x1edaa5,_0x49fab2)=>_0x3f5caa(_0x1edaa5,_0x49fab2,_0xc1795e),N=(_0x1679eb,_0x1f3327,_0x34ebee)=>Z(_0x1679eb,typeof _0x1f3327!=_0x235e21(0x1a9)?_0x1f3327+'':_0x1f3327,_0x34ebee);exports[_0x235e21(0x1b3)]=class extends c['Plugin']{constructor(_0x53610a=D,_0x34cbb7,_0xf70d8a){const _0x135f9a=_0x235e21;super(),this['_config']=_0x53610a,this[_0x135f9a(0x190)]=_0x34cbb7,this[_0x135f9a(0x185)]=_0xf70d8a;const {..._0x5f376d}=c[_0x135f9a(0x152)]({},D,this[_0x135f9a(0x19e)]);this[_0x135f9a(0x185)][_0x135f9a(0x1a2)](q,_0x5f376d);}['onStarting'](){[[g],[C],[p]]['forEach'](_0x4831ea=>{const _0x2ccf8d=_0x1829;this['_injector'][_0x2ccf8d(0x1be)](_0x4831ea);});}[_0x235e21(0x15a)](){const _0x341d4b=_0x235e21;this[_0x341d4b(0x190)][_0x341d4b(0x180)](C),this[_0x341d4b(0x190)][_0x341d4b(0x180)](p);}},N(exports[_0x235e21(0x1b3)],_0x235e21(0x174),U),N(exports[_0x235e21(0x1b3)],_0x235e21(0x19a),c['UniverInstanceType'][_0x235e21(0x170)]),exports[_0x235e21(0x1b3)]=W([c[_0x235e21(0x188)](j[_0x235e21(0x15e)],b[_0x235e21(0x1af)],T[_0x235e21(0x184)]),O(0x1,c[_0x235e21(0x172)](c[_0x235e21(0x1b6)])),O(0x2,c[_0x235e21(0x161)])],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 _0x4c2757=_0x3944;(function(_0x1ca896,_0x431553){const _0x283ca2=_0x3944,_0x2a73a0=_0x1ca896();while(!![]){try{const _0x4322c5=-parseInt(_0x283ca2(0x1d8))/0x1+parseInt(_0x283ca2(0x1e0))/0x2+parseInt(_0x283ca2(0x1d1))/0x3+parseInt(_0x283ca2(0x201))/0x4+-parseInt(_0x283ca2(0x1e7))/0x5*(-parseInt(_0x283ca2(0x1db))/0x6)+-parseInt(_0x283ca2(0x1d0))/0x7+parseInt(_0x283ca2(0x1fb))/0x8*(-parseInt(_0x283ca2(0x1ee))/0x9);if(_0x4322c5===_0x431553)break;else _0x2a73a0['push'](_0x2a73a0['shift']());}catch(_0x2cc260){_0x2a73a0['push'](_0x2a73a0['shift']());}}}(_0x5abd,0xb2ed7));import{CommentService as _0x5c6da5,CollaborationSessionService as _0x3bfb31,UniverCollaborationClientPlugin as _0x7c9c7d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x58778a}from'@univerjs-pro/license';import{dayjs as _0x3c5312,UserManagerService as _0x13c6d8,Inject as _0x149c9c,Injector as _0x2c89d4,Disposable as _0x112497,CustomRangeType as _0x1036ac,UniverInstanceType as _0xdfd459,DependentOn as _0x580e66,IConfigService as _0x39d155,Plugin as _0x381037,merge as _0x2384e6}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3bb58e}from'@univerjs/thread-comment-ui';function _0x5abd(){const _0x49172b=['comments','add','unitId','_config','size','customRanges','requireSession','/universer-api/comment/unit/','addComment','resolved','_initUserSync','error','getUser','Solve','disposeWithMe','OpenOrReOpen','_httpService','/delete','personId','userId','length','onStarting','Reply','get','getMemberID','ref','delete','syncUpdateMutationToColla','parse','solved','createTimestamp','_init','replies','_commentService','onReady','Edit','pluginName','setConfig','getOwnPropertyDescriptor','4416629VUxhsH','3897282jKpMQj','/universer-api/user/list','addUser','/reply','payload','rangeType','pipe','77725UvoygT','COMMENT','resolveComment','8094xNGvMg','forEach','user','post','Delete','485606tiTQvc','userID','listComments','Unknown','_threadCommentModel','_userService','content','5025NBqTBR','defineProperty','body','values','/list','UNRECOGNIZED','root','694206mpucVE','_sessionService','_initDataSource','find','users','subscribe','code','stringify','/solved','type','getComment','replyId','_configService','272LBuATO','commentUpdate$','_injector','getCurrentUser','_threadCommentDataSourceService','rangeId','4665892sRtoaZ','getUnit','updateComment','filter','Add','/add','Solved','map','deleteComment','parentId','threadId','dataSource','format','YYYY/MM/DD\x20HH:mm'];_0x5abd=function(){return _0x49172b;};return _0x5abd();}import{ThreadCommentModel as _0x2c21a5,IThreadCommentDataSourceService as _0x48e23b}from'@univerjs/thread-comment';import{bufferTime as _0x540fe0}from'rxjs';import{HTTPService as _0x19e850}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x23622f=>(_0x23622f[_0x23622f[_0x4c2757(0x1b8)]=0x0]=_0x4c2757(0x1b8),_0x23622f[_0x23622f[_0x4c2757(0x207)]=0x1]='Solved',_0x23622f[_0x23622f['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x23622f))(I||{}),v=(_0x40ae88=>(_0x40ae88[_0x40ae88[_0x4c2757(0x1e3)]=0x0]=_0x4c2757(0x1e3),_0x40ae88[_0x40ae88[_0x4c2757(0x205)]=0x1]=_0x4c2757(0x205),_0x40ae88[_0x40ae88['Reply']=0x2]=_0x4c2757(0x1bf),_0x40ae88[_0x40ae88[_0x4c2757(0x1cc)]=0x3]=_0x4c2757(0x1cc),_0x40ae88[_0x40ae88[_0x4c2757(0x1df)]=0x4]='Delete',_0x40ae88[_0x40ae88[_0x4c2757(0x1b6)]=0x5]=_0x4c2757(0x1b6),_0x40ae88[_0x40ae88['UNRECOGNIZED']=-0x1]=_0x4c2757(0x1ec),_0x40ae88))(v||{});const D=_0x1e2136=>_0x3c5312(new Date(+_0x1e2136))[_0x4c2757(0x20d)](_0x4c2757(0x20e)),B=async(_0xb892f8,_0x18c133)=>{const _0x57d6ec=_0x4c2757,_0x52d502=_0xb892f8[_0x57d6ec(0x1c0)](_0x13c6d8),_0x5cffe3=_0xb892f8[_0x57d6ec(0x1c0)](_0x19e850);_0x18c133[_0x57d6ec(0x1dc)](_0x32a587=>{const _0x4e5cda=_0x57d6ec;_0x52d502[_0x4e5cda(0x1b5)](_0x32a587)&&_0x18c133[_0x4e5cda(0x1c3)](_0x32a587);}),_0x18c133[_0x57d6ec(0x213)]&&(await _0x5cffe3[_0x57d6ec(0x1c0)](_0x57d6ec(0x1d2),{'params':{'userIDs':[..._0x18c133]}}))[_0x57d6ec(0x1e9)][_0x57d6ec(0x1f2)][_0x57d6ec(0x1dc)](_0x1a1fe6=>{_0x1a1fe6&&_0x52d502['addUser'](_0x1a1fe6);});};var K=Object[_0x4c2757(0x1cf)],V=(_0x53b3ac,_0x4c9c11,_0x2500d8,_0x1820e9)=>{const _0x4435a6=_0x4c2757;for(var _0x616320=_0x1820e9>0x1?void 0x0:_0x1820e9?K(_0x4c9c11,_0x2500d8):_0x4c9c11,_0x165722=_0x53b3ac[_0x4435a6(0x1bd)]-0x1,_0x20c2a7;_0x165722>=0x0;_0x165722--)(_0x20c2a7=_0x53b3ac[_0x165722])&&(_0x616320=_0x20c2a7(_0x616320)||_0x616320);return _0x616320;},p=(_0x3ec00a,_0x54abcd)=>(_0x2576c1,_0x439b9e)=>_0x54abcd(_0x2576c1,_0x439b9e,_0x3ec00a);let S=class extends _0x112497{constructor(_0x338857,_0x4df5c4,_0x44a044,_0x1bfe06){const _0x57ef9d=_0x4c2757;super(),this[_0x57ef9d(0x1ca)]=_0x338857,this[_0x57ef9d(0x1e4)]=_0x4df5c4,this[_0x57ef9d(0x1e5)]=_0x44a044,this['_injector']=_0x1bfe06,this[_0x57ef9d(0x1c8)](),this[_0x57ef9d(0x1b3)]();}[_0x4c2757(0x1b3)](){const _0x1814ca=_0x4c2757;this[_0x1814ca(0x1b7)](this['_threadCommentModel'][_0x1814ca(0x1fc)][_0x1814ca(0x1d7)](_0x540fe0(0x10))[_0x1814ca(0x1f3)](_0x276c9f=>{const _0x48dab8=_0x1814ca,_0x188d62=new Set();_0x276c9f[_0x48dab8(0x1dc)](_0x4bce14=>{const _0x45854b=_0x48dab8;switch(_0x4bce14[_0x45854b(0x1f7)]){case _0x45854b(0x210):{const _0x2a3206=_0x4bce14[_0x45854b(0x1d5)][_0x45854b(0x1bb)];_0x188d62[_0x45854b(0x210)](_0x2a3206);break;}}}),B(this[_0x48dab8(0x1fd)],_0x188d62);}));}[_0x4c2757(0x1c8)](){const _0x4debc3=_0x4c2757;this[_0x4debc3(0x1b7)](this[_0x4debc3(0x1ca)][_0x4debc3(0x1fc)][_0x4debc3(0x1f3)](async _0x37e470=>{const _0x5a65d3=_0x4debc3;var _0x491835,_0x34a2e9,_0xb54c3e,_0x3974c3;const _0x2b3099=(_0x491835=this['_threadCommentModel']['getUnit'](_0x37e470[_0x5a65d3(0x211)])[_0x5a65d3(0x1f1)](_0x4cbcb8=>_0x4cbcb8[_0x5a65d3(0x20b)]===_0x37e470['threadId']))==null?void 0x0:_0x491835[_0x5a65d3(0x1ed)];if(!_0x2b3099)return;const {unitId:_0x1f4705,subUnitId:_0xec9915}=_0x2b3099;switch(_0x37e470[_0x5a65d3(0x1dd)]&&this[_0x5a65d3(0x1e5)]['addUser'](_0x37e470[_0x5a65d3(0x1dd)]),_0x37e470[_0x5a65d3(0x1f7)]){case v[_0x5a65d3(0x205)]:break;case v[_0x5a65d3(0x1bf)]:{this[_0x5a65d3(0x1e4)][_0x5a65d3(0x217)](_0x1f4705,_0xec9915,{'unitId':_0x1f4705,'subUnitId':_0xec9915,'ref':'','id':_0x37e470[_0x5a65d3(0x1f9)],'dT':D(+_0x37e470[_0x5a65d3(0x1c7)]),'threadId':_0x37e470['threadId'],'personId':(_0xb54c3e=(_0x34a2e9=_0x37e470[_0x5a65d3(0x1dd)])==null?void 0x0:_0x34a2e9[_0x5a65d3(0x1e1)])!=null?_0xb54c3e:_0x37e470[_0x5a65d3(0x1bc)],'text':JSON[_0x5a65d3(0x1c5)](_0x37e470['content']),'parentId':_0x2b3099['id']});break;}case v[_0x5a65d3(0x1df)]:{const _0x525397=this['_threadCommentModel'][_0x5a65d3(0x1f8)](_0x1f4705,_0xec9915,_0x37e470[_0x5a65d3(0x1f9)]);_0x525397&&_0x525397[_0x5a65d3(0x20a)]&&this[_0x5a65d3(0x1e4)][_0x5a65d3(0x209)](_0x1f4705,_0xec9915,_0x37e470[_0x5a65d3(0x1f9)]);break;}case v[_0x5a65d3(0x1cc)]:{this['_threadCommentModel'][_0x5a65d3(0x203)](_0x1f4705,_0xec9915,{'commentId':_0x37e470[_0x5a65d3(0x1f9)],'text':JSON[_0x5a65d3(0x1c5)](_0x37e470[_0x5a65d3(0x1e6)])});break;}case v[_0x5a65d3(0x1b6)]:{const _0x2529ef=(_0x3974c3=this[_0x5a65d3(0x1e4)][_0x5a65d3(0x202)](_0x37e470[_0x5a65d3(0x211)])['find'](_0x5243fc=>_0x5243fc[_0x5a65d3(0x20b)]===_0x37e470[_0x5a65d3(0x20b)]))==null?void 0x0:_0x3974c3['root'];_0x2529ef&&this[_0x5a65d3(0x1e4)][_0x5a65d3(0x1da)](_0x1f4705,_0xec9915,_0x2529ef['id'],_0x37e470[_0x5a65d3(0x1c6)]===I[_0x5a65d3(0x207)]);break;}}}));}};S=V([p(0x0,_0x149c9c(_0x5c6da5)),p(0x1,_0x149c9c(_0x2c21a5)),p(0x2,_0x149c9c(_0x13c6d8)),p(0x3,_0x149c9c(_0x2c89d4))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x4c2757(0x1cf)],Q=(_0x5a6c01,_0x5abceb,_0x1c31a5,_0x22e0c3)=>{const _0x57114b=_0x4c2757;for(var _0x1e2d8c=_0x22e0c3>0x1?void 0x0:_0x22e0c3?k(_0x5abceb,_0x1c31a5):_0x5abceb,_0x409edf=_0x5a6c01[_0x57114b(0x1bd)]-0x1,_0x20b1d2;_0x409edf>=0x0;_0x409edf--)(_0x20b1d2=_0x5a6c01[_0x409edf])&&(_0x1e2d8c=_0x20b1d2(_0x1e2d8c)||_0x1e2d8c);return _0x1e2d8c;},_=(_0xc899d2,_0x2bfa4)=>(_0x5b0251,_0x590b55)=>_0x2bfa4(_0x5b0251,_0x590b55,_0xc899d2);function X(_0x1719de,_0xc9c4f){const _0x4986a9=_0x4c2757,_0x20f25d=_0x1719de['replies'][0x0];return{..._0xc9c4f,'id':_0x20f25d[_0x4986a9(0x1f9)],'resolved':_0x1719de[_0x4986a9(0x1c6)]===0x1,'dT':D(_0x20f25d[_0x4986a9(0x1c7)]),'personId':_0x20f25d[_0x4986a9(0x1bc)],'threadId':_0x20f25d[_0x4986a9(0x20b)]};}function ee(_0x4ab6c4,_0x2e0f7c,_0x1a6bb9){const _0x540207=_0x4c2757;var _0x253ec3,_0x3b5873;if(((_0x3b5873=(_0x253ec3=_0x4ab6c4==null?void 0x0:_0x4ab6c4[_0x540207(0x1c9)])==null?void 0x0:_0x253ec3[_0x540207(0x1bd)])!=null?_0x3b5873:0x0)>0x0){const _0x442357=(_0x2f6498,_0x21a6f4)=>({'id':_0x2f6498[_0x540207(0x1f9)],'threadId':_0x2f6498[_0x540207(0x20b)],'dT':D(_0x2f6498[_0x540207(0x1c7)]),'personId':_0x2f6498['userId'],'resolved':_0x4ab6c4[_0x540207(0x1c6)]===I[_0x540207(0x207)],'unitId':_0x2e0f7c,'subUnitId':_0x1a6bb9,'text':JSON[_0x540207(0x1c5)](_0x2f6498[_0x540207(0x1e6)]),'parentId':_0x21a6f4}),_0x126266=_0x442357(_0x4ab6c4[_0x540207(0x1c9)][0x0]);return{..._0x126266,'children':_0x4ab6c4[_0x540207(0x1c9)]['slice'](0x1)['map'](_0x17ff74=>_0x442357(_0x17ff74,_0x126266['id']))};}return null;}let f=class{constructor(_0x474a4f,_0x120800,_0x3fb870,_0xd4eb31){const _0xb3a1c6=_0x4c2757;this[_0xb3a1c6(0x1b9)]=_0x474a4f,this[_0xb3a1c6(0x1e5)]=_0x120800,this[_0xb3a1c6(0x1ef)]=_0x3fb870,this[_0xb3a1c6(0x1fd)]=_0xd4eb31;}async[_0x4c2757(0x217)](_0x44ae36){const _0x3ff6fc=_0x4c2757;var _0x5319f1,_0x403d27;const {parentId:_0x5b31b6,unitId:_0x524fc3,text:_0x1adc6f,threadId:_0x197ec6}=_0x44ae36,_0x382ff7=(_0x403d27=(_0x5319f1=_0x1adc6f[_0x3ff6fc(0x214)])==null?void 0x0:_0x5319f1[_0x3ff6fc(0x204)](_0x558f8f=>_0x558f8f[_0x3ff6fc(0x1d6)]===_0x1036ac[_0x3ff6fc(0x1d9)])[_0x3ff6fc(0x208)](_0x5bd381=>_0x5bd381[_0x3ff6fc(0x200)]))!=null?_0x403d27:[],_0x482f67=JSON[_0x3ff6fc(0x1f5)](_0x1adc6f),_0x202059=(await this[_0x3ff6fc(0x1ef)][_0x3ff6fc(0x215)](_0x524fc3))[_0x3ff6fc(0x1c1)]();if(_0x5b31b6){const _0x2b6d47={'memberId':_0x202059,'unitId':_0x524fc3,'content':_0x482f67,'mention':_0x382ff7,'threadId':_0x197ec6},_0x1661e0=(await this[_0x3ff6fc(0x1b9)][_0x3ff6fc(0x1de)](_0x3ff6fc(0x216)+_0x524fc3+_0x3ff6fc(0x1d4),{'body':_0x2b6d47}))['body']['reply'];return{..._0x44ae36,'id':_0x1661e0[_0x3ff6fc(0x1f9)],'dT':_0x3c5312(+_0x1661e0[_0x3ff6fc(0x1c7)])[_0x3ff6fc(0x20d)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1661e0[_0x3ff6fc(0x1bc)]};}else{const _0x4e94e5={'memberId':_0x202059,'unitId':_0x524fc3,'content':_0x482f67,'mention':_0x382ff7},_0x4af213=await this['_httpService']['post'](_0x3ff6fc(0x216)+_0x524fc3+_0x3ff6fc(0x206),{'body':_0x4e94e5});return X(_0x4af213[_0x3ff6fc(0x1e9)]['comment'],_0x44ae36);}}async[_0x4c2757(0x203)](_0x7f1cca){const _0x2739eb=_0x4c2757;var _0x38955e,_0x199763;const {text:_0x412363,unitId:_0x29ebd5}=_0x7f1cca,_0x24d48e=(_0x199763=(_0x38955e=_0x412363[_0x2739eb(0x214)])==null?void 0x0:_0x38955e[_0x2739eb(0x204)](_0x439bc8=>_0x439bc8[_0x2739eb(0x1d6)]===_0x1036ac[_0x2739eb(0x1d9)])[_0x2739eb(0x208)](_0x9dc057=>_0x9dc057[_0x2739eb(0x200)]))!=null?_0x199763:[],_0x5baef0=JSON[_0x2739eb(0x1f5)](_0x412363),_0x5805f7=_0x7f1cca[_0x2739eb(0x20b)],_0x48b18b=_0x7f1cca['id'],_0x56305b={'memberId':(await this[_0x2739eb(0x1ef)]['requireSession'](_0x29ebd5))[_0x2739eb(0x1c1)](),'unitId':_0x29ebd5,'threadId':_0x5805f7,'mention':_0x24d48e,'content':_0x5baef0,'replyId':_0x48b18b},_0x234bb2=await this[_0x2739eb(0x1b9)]['post']('/universer-api/comment/unit/'+_0x29ebd5+'/edit',{'body':_0x56305b});return!_0x234bb2[_0x2739eb(0x1e9)][_0x2739eb(0x1b4)]||_0x234bb2[_0x2739eb(0x1e9)][_0x2739eb(0x1b4)][_0x2739eb(0x1f4)]===0x1;}async[_0x4c2757(0x1da)](_0x572323){const _0x28a6f5=_0x4c2757,{unitId:_0x548ce9}=_0x572323,_0x4babe9=_0x572323[_0x28a6f5(0x20b)],_0x67267a={'memberId':this['_userService'][_0x28a6f5(0x1fe)]()[_0x28a6f5(0x1e1)],'unitId':_0x548ce9,'threadId':_0x4babe9,'solved':_0x572323[_0x28a6f5(0x218)]?I[_0x28a6f5(0x207)]:I[_0x28a6f5(0x1b8)]},_0x55754d=await this['_httpService'][_0x28a6f5(0x1de)](_0x28a6f5(0x216)+_0x548ce9+_0x28a6f5(0x1f6),{'body':_0x67267a});return!_0x55754d[_0x28a6f5(0x1e9)][_0x28a6f5(0x1b4)]||_0x55754d['body'][_0x28a6f5(0x1b4)][_0x28a6f5(0x1f4)]===0x1;}async[_0x4c2757(0x209)](_0x40e27d,_0x14b24a,_0xa8dcd6,_0x51308e){const _0x2f5394=_0x4c2757,_0xda14dc={'memberId':(await this['_sessionService'][_0x2f5394(0x215)](_0x40e27d))['getMemberID'](),'threadId':_0xa8dcd6,'replyId':_0x51308e,'unitId':_0x40e27d},_0x87d24b=await this[_0x2f5394(0x1b9)][_0x2f5394(0x1de)](_0x2f5394(0x216)+_0x40e27d+_0x2f5394(0x1ba),{'body':_0xda14dc});return!_0x87d24b['body'][_0x2f5394(0x1b4)]||_0x87d24b[_0x2f5394(0x1e9)][_0x2f5394(0x1b4)][_0x2f5394(0x1f4)]===0x1;}async[_0x4c2757(0x1e2)](_0x5affb3,_0xb8123a,_0x50e923){const _0x49c76f=_0x4c2757,_0x30e677={'unitId':_0x5affb3,'threadId':_0x50e923},_0x309086=await this[_0x49c76f(0x1b9)][_0x49c76f(0x1de)](_0x49c76f(0x216)+_0x5affb3+_0x49c76f(0x1eb),{'body':_0x30e677}),_0x1cd015=_0x50e923[_0x49c76f(0x208)](_0x4f27ef=>ee(_0x309086[_0x49c76f(0x1e9)][_0x49c76f(0x20f)][_0x4f27ef],_0x5affb3,_0xb8123a))['filter'](Boolean);return Object[_0x49c76f(0x1ea)](_0x309086[_0x49c76f(0x1e9)]['users'])[_0x49c76f(0x1dc)](_0x41785a=>{const _0x2ad832=_0x49c76f;this['_userService'][_0x2ad832(0x1d3)](_0x41785a);}),_0x1cd015;}['saveCommentToSnapshot'](_0x57dc9d){const _0x299fa7=_0x4c2757;return{'id':_0x57dc9d['id'],'threadId':_0x57dc9d[_0x299fa7(0x20b)],'ref':_0x57dc9d[_0x299fa7(0x1c2)]};}};f=Q([_(0x0,_0x149c9c(_0x19e850)),_(0x1,_0x149c9c(_0x13c6d8)),_(0x2,_0x149c9c(_0x3bfb31)),_(0x3,_0x149c9c(_0x2c89d4))],f);var re=Object[_0x4c2757(0x1cf)],te=(_0x596e08,_0x59e30c,_0x3f04d9,_0x1a3edc)=>{for(var _0x11d19c=_0x1a3edc>0x1?void 0x0:_0x1a3edc?re(_0x59e30c,_0x3f04d9):_0x59e30c,_0x450b22=_0x596e08['length']-0x1,_0x3ba1ea;_0x450b22>=0x0;_0x450b22--)(_0x3ba1ea=_0x596e08[_0x450b22])&&(_0x11d19c=_0x3ba1ea(_0x11d19c)||_0x11d19c);return _0x11d19c;},N=(_0x532dd9,_0x392006)=>(_0x2298ce,_0x2eb428)=>_0x392006(_0x2298ce,_0x2eb428,_0x532dd9);let g=class extends _0x112497{constructor(_0x4d7556,_0x153fa5){const _0x8cd9d9=_0x4c2757;super(),this[_0x8cd9d9(0x1ff)]=_0x4d7556,this['_threadCommentDataSource']=_0x153fa5,this[_0x8cd9d9(0x1f0)]();}['_initDataSource'](){const _0x111478=_0x4c2757;this[_0x111478(0x1ff)][_0x111478(0x20c)]=this['_threadCommentDataSource'],this[_0x111478(0x1ff)][_0x111478(0x1c4)]=!0x1;}};g=te([N(0x0,_0x48e23b),N(0x1,_0x149c9c(f))],g);function _0x3944(_0x47b23e,_0x37c033){const _0x5abd12=_0x5abd();return _0x3944=function(_0x3944dd,_0x5db2f5){_0x3944dd=_0x3944dd-0x1b3;let _0x28f310=_0x5abd12[_0x3944dd];return _0x28f310;},_0x3944(_0x47b23e,_0x37c033);}var se=Object[_0x4c2757(0x1e8)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x6cb253,_0x22dc90,_0x3730e4)=>_0x22dc90 in _0x6cb253?se(_0x6cb253,_0x22dc90,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3730e4}):_0x6cb253[_0x22dc90]=_0x3730e4,ie=(_0x2edd75,_0x2f6c74,_0x37ffeb,_0xd38e99)=>{const _0x1f0937=_0x4c2757;for(var _0x39db1a=_0xd38e99>0x1?void 0x0:_0xd38e99?oe(_0x2f6c74,_0x37ffeb):_0x2f6c74,_0xe993b7=_0x2edd75[_0x1f0937(0x1bd)]-0x1,_0xf86d71;_0xe993b7>=0x0;_0xe993b7--)(_0xf86d71=_0x2edd75[_0xe993b7])&&(_0x39db1a=_0xf86d71(_0x39db1a)||_0x39db1a);return _0x39db1a;},w=(_0x2efea9,_0x40470d)=>(_0x36c428,_0x25f007)=>_0x40470d(_0x36c428,_0x25f007,_0x2efea9),$=(_0x1173c5,_0x2418d5,_0x5e1a28)=>ne(_0x1173c5,typeof _0x2418d5!='symbol'?_0x2418d5+'':_0x2418d5,_0x5e1a28);let b=class extends _0x381037{constructor(_0x21aa1d=M,_0x10e05b,_0x5ac332){const _0x1ba9d7=_0x4c2757;super(),this[_0x1ba9d7(0x212)]=_0x21aa1d,this[_0x1ba9d7(0x1fd)]=_0x10e05b,this[_0x1ba9d7(0x1fa)]=_0x5ac332;const {..._0x5c0d11}=_0x2384e6({},M,this[_0x1ba9d7(0x212)]);this[_0x1ba9d7(0x1fa)][_0x1ba9d7(0x1ce)](z,_0x5c0d11);}[_0x4c2757(0x1be)](){const _0xb0ca50=_0x4c2757;[[f],[g],[S]][_0xb0ca50(0x1dc)](_0x4e4594=>{const _0x8ef369=_0xb0ca50;this[_0x8ef369(0x1fd)][_0x8ef369(0x210)](_0x4e4594);});}[_0x4c2757(0x1cb)](){const _0x15fec8=_0x4c2757;this['_injector'][_0x15fec8(0x1c0)](g),this[_0x15fec8(0x1fd)][_0x15fec8(0x1c0)](S);}};$(b,_0x4c2757(0x1cd),W),$(b,_0x4c2757(0x1f7),_0xdfd459['UNIVER_UNKNOWN']),b=ie([_0x580e66(_0x3bb58e,_0x7c9c7d,_0x58778a),w(0x1,_0x149c9c(_0x2c89d4)),w(0x2,_0x39d155)],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(_0x46ea76,_0x36b90e){const _0x3ffb3f=_0x4f63,_0x470a3f=_0x46ea76();while(!![]){try{const _0x2aeecf=-parseInt(_0x3ffb3f(0x1f9))/0x1*(-parseInt(_0x3ffb3f(0x220))/0x2)+-parseInt(_0x3ffb3f(0x1df))/0x3+parseInt(_0x3ffb3f(0x1e1))/0x4*(parseInt(_0x3ffb3f(0x20b))/0x5)+-parseInt(_0x3ffb3f(0x21f))/0x6*(parseInt(_0x3ffb3f(0x20f))/0x7)+parseInt(_0x3ffb3f(0x215))/0x8*(-parseInt(_0x3ffb3f(0x1d1))/0x9)+-parseInt(_0x3ffb3f(0x23b))/0xa+parseInt(_0x3ffb3f(0x22c))/0xb*(parseInt(_0x3ffb3f(0x1d0))/0xc);if(_0x2aeecf===_0x36b90e)break;else _0x470a3f['push'](_0x470a3f['shift']());}catch(_0x18456b){_0x470a3f['push'](_0x470a3f['shift']());}}}(_0x5221,0x3e0cb),function(_0x619201,_0x5f28ba){const _0x1844f7=_0x4f63;typeof exports==_0x1844f7(0x201)&&typeof module<'u'?_0x5f28ba(exports,require(_0x1844f7(0x1d9)),require('@univerjs-pro/license'),require(_0x1844f7(0x1ce)),require(_0x1844f7(0x212)),require(_0x1844f7(0x1ed)),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x1844f7(0x1d8)]?define([_0x1844f7(0x217),_0x1844f7(0x1d9),_0x1844f7(0x21d),_0x1844f7(0x1ce),'@univerjs/thread-comment-ui',_0x1844f7(0x1ed),_0x1844f7(0x1fc),_0x1844f7(0x1fe)],_0x5f28ba):(_0x619201=typeof globalThis<'u'?globalThis:_0x619201||self,_0x5f28ba(_0x619201[_0x1844f7(0x1f2)]={},_0x619201[_0x1844f7(0x21b)],_0x619201[_0x1844f7(0x231)],_0x619201['UniverCore'],_0x619201['UniverThreadCommentUi'],_0x619201[_0x1844f7(0x1cd)],_0x619201[_0x1844f7(0x1fc)],_0x619201[_0x1844f7(0x1e8)]));}(this,function(_0x3ef5c0,_0x1fa1fd,_0x1fdb03,_0x14f1a3,_0x80518c,_0x24c7fc,_0x34abfe,_0xa8eec2){'use strict';const _0x492f50=_0x4f63;const _0x972281='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x245086=(_0x36a1a2=>(_0x36a1a2[_0x36a1a2['OpenOrReOpen']=0x0]=_0x492f50(0x1e0),_0x36a1a2[_0x36a1a2['Solved']=0x1]=_0x492f50(0x1cf),_0x36a1a2[_0x36a1a2['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x36a1a2))(_0x245086||{}),_0x3a4940=(_0x3a3880=>(_0x3a3880[_0x3a3880['Unknown']=0x0]='Unknown',_0x3a3880[_0x3a3880['Add']=0x1]=_0x492f50(0x227),_0x3a3880[_0x3a3880[_0x492f50(0x1c8)]=0x2]='Reply',_0x3a3880[_0x3a3880[_0x492f50(0x208)]=0x3]=_0x492f50(0x208),_0x3a3880[_0x3a3880[_0x492f50(0x1cc)]=0x4]=_0x492f50(0x1cc),_0x3a3880[_0x3a3880[_0x492f50(0x1db)]=0x5]=_0x492f50(0x1db),_0x3a3880[_0x3a3880[_0x492f50(0x207)]=-0x1]=_0x492f50(0x207),_0x3a3880))(_0x3a4940||{});const _0x46570d=_0x3a34c6=>_0x14f1a3[_0x492f50(0x210)](new Date(+_0x3a34c6))[_0x492f50(0x21a)](_0x492f50(0x205)),_0x2f22a2=async(_0x5baa4d,_0x22cd13)=>{const _0x218ecf=_0x492f50,_0x159d98=_0x5baa4d[_0x218ecf(0x209)](_0x14f1a3[_0x218ecf(0x1ca)]),_0x5788fd=_0x5baa4d[_0x218ecf(0x209)](_0xa8eec2[_0x218ecf(0x22b)]);_0x22cd13[_0x218ecf(0x1c5)](_0x337375=>{const _0x54eb9d=_0x218ecf;_0x159d98[_0x54eb9d(0x20a)](_0x337375)&&_0x22cd13['delete'](_0x337375);}),_0x22cd13['size']&&(await _0x5788fd[_0x218ecf(0x209)](_0x218ecf(0x1b9),{'params':{'userIDs':[..._0x22cd13]}}))[_0x218ecf(0x23c)][_0x218ecf(0x238)][_0x218ecf(0x1c5)](_0x13939f=>{_0x13939f&&_0x159d98['addUser'](_0x13939f);});};var _0x44f243=Object[_0x492f50(0x1c3)],_0x5a9860=(_0x11e896,_0xde139b,_0x4caf3c,_0x2d165c)=>{const _0xd4268f=_0x492f50;for(var _0x5a4c80=_0x2d165c>0x1?void 0x0:_0x2d165c?_0x44f243(_0xde139b,_0x4caf3c):_0xde139b,_0x35ce3d=_0x11e896[_0xd4268f(0x1f7)]-0x1,_0x234513;_0x35ce3d>=0x0;_0x35ce3d--)(_0x234513=_0x11e896[_0x35ce3d])&&(_0x5a4c80=_0x234513(_0x5a4c80)||_0x5a4c80);return _0x5a4c80;},_0x50f1f5=(_0x208f75,_0x567348)=>(_0x5714ae,_0x535e32)=>_0x567348(_0x5714ae,_0x535e32,_0x208f75);let _0x4292a6=class extends _0x14f1a3[_0x492f50(0x1d6)]{constructor(_0x9afc99,_0x19d449,_0x50bed4,_0x454dba){const _0x54e0c3=_0x492f50;super(),this['_commentService']=_0x9afc99,this['_threadCommentModel']=_0x19d449,this[_0x54e0c3(0x23d)]=_0x50bed4,this['_injector']=_0x454dba,this['_init'](),this[_0x54e0c3(0x1ef)]();}[_0x492f50(0x1ef)](){const _0x274fbe=_0x492f50;this[_0x274fbe(0x226)](this[_0x274fbe(0x1e5)][_0x274fbe(0x204)]['pipe'](_0x34abfe[_0x274fbe(0x1f6)](0x10))['subscribe'](_0x2bd512=>{const _0xac5cff=_0x274fbe,_0x57a92c=new Set();_0x2bd512[_0xac5cff(0x1c5)](_0x1a95c8=>{const _0xe0dd9f=_0xac5cff;switch(_0x1a95c8[_0xe0dd9f(0x1da)]){case _0xe0dd9f(0x1e2):{const _0x556cb7=_0x1a95c8[_0xe0dd9f(0x20c)][_0xe0dd9f(0x1e9)];_0x57a92c[_0xe0dd9f(0x1e2)](_0x556cb7);break;}}}),_0x2f22a2(this[_0xac5cff(0x1bd)],_0x57a92c);}));}['_init'](){const _0x4f6a3f=_0x492f50;this[_0x4f6a3f(0x226)](this['_commentService'][_0x4f6a3f(0x204)][_0x4f6a3f(0x203)](async _0x112936=>{const _0x30b8df=_0x4f6a3f;var _0x20c563,_0x428e22,_0x147c5f,_0x5df1e1;const _0x37eb25=(_0x20c563=this[_0x30b8df(0x1e5)][_0x30b8df(0x1c1)](_0x112936[_0x30b8df(0x225)])[_0x30b8df(0x1e6)](_0x5226e3=>_0x5226e3['threadId']===_0x112936[_0x30b8df(0x230)]))==null?void 0x0:_0x20c563[_0x30b8df(0x213)];if(!_0x37eb25)return;const {unitId:_0x2cda8c,subUnitId:_0x103e34}=_0x37eb25;switch(_0x112936['user']&&this['_userService']['addUser'](_0x112936[_0x30b8df(0x206)]),_0x112936[_0x30b8df(0x1da)]){case _0x3a4940[_0x30b8df(0x227)]:break;case _0x3a4940[_0x30b8df(0x1c8)]:{this['_threadCommentModel'][_0x30b8df(0x221)](_0x2cda8c,_0x103e34,{'unitId':_0x2cda8c,'subUnitId':_0x103e34,'ref':'','id':_0x112936[_0x30b8df(0x1c6)],'dT':_0x46570d(+_0x112936['createTimestamp']),'threadId':_0x112936[_0x30b8df(0x230)],'personId':(_0x147c5f=(_0x428e22=_0x112936[_0x30b8df(0x206)])==null?void 0x0:_0x428e22[_0x30b8df(0x1b8)])!=null?_0x147c5f:_0x112936[_0x30b8df(0x1c7)],'text':JSON[_0x30b8df(0x218)](_0x112936['content']),'parentId':_0x37eb25['id']});break;}case _0x3a4940[_0x30b8df(0x1cc)]:{const _0x4e34fd=this[_0x30b8df(0x1e5)]['getComment'](_0x2cda8c,_0x103e34,_0x112936[_0x30b8df(0x1c6)]);_0x4e34fd&&_0x4e34fd['parentId']&&this['_threadCommentModel'][_0x30b8df(0x1bf)](_0x2cda8c,_0x103e34,_0x112936[_0x30b8df(0x1c6)]);break;}case _0x3a4940['Edit']:{this[_0x30b8df(0x1e5)]['updateComment'](_0x2cda8c,_0x103e34,{'commentId':_0x112936[_0x30b8df(0x1c6)],'text':JSON['parse'](_0x112936[_0x30b8df(0x214)])});break;}case _0x3a4940[_0x30b8df(0x1db)]:{const _0x4b6ef2=(_0x5df1e1=this[_0x30b8df(0x1e5)][_0x30b8df(0x1c1)](_0x112936[_0x30b8df(0x225)])[_0x30b8df(0x1e6)](_0x3d3d6c=>_0x3d3d6c[_0x30b8df(0x230)]===_0x112936['threadId']))==null?void 0x0:_0x5df1e1[_0x30b8df(0x213)];_0x4b6ef2&&this[_0x30b8df(0x1e5)][_0x30b8df(0x21e)](_0x2cda8c,_0x103e34,_0x4b6ef2['id'],_0x112936[_0x30b8df(0x1d3)]===_0x245086[_0x30b8df(0x1cf)]);break;}}}));}};_0x4292a6=_0x5a9860([_0x50f1f5(0x0,_0x14f1a3['Inject'](_0x1fa1fd[_0x492f50(0x239)])),_0x50f1f5(0x1,_0x14f1a3[_0x492f50(0x1ff)](_0x24c7fc[_0x492f50(0x1f3)])),_0x50f1f5(0x2,_0x14f1a3[_0x492f50(0x1ff)](_0x14f1a3['UserManagerService'])),_0x50f1f5(0x3,_0x14f1a3['Inject'](_0x14f1a3[_0x492f50(0x1ba)]))],_0x4292a6);const _0x3fefd6=_0x492f50(0x1dc),_0x3957cc={};var _0x2a2e93=Object[_0x492f50(0x1c3)],_0x2edca3=(_0x59757f,_0x19ee95,_0x13de65,_0x2b503f)=>{for(var _0x3f4b3c=_0x2b503f>0x1?void 0x0:_0x2b503f?_0x2a2e93(_0x19ee95,_0x13de65):_0x19ee95,_0x4a61a1=_0x59757f['length']-0x1,_0x195f28;_0x4a61a1>=0x0;_0x4a61a1--)(_0x195f28=_0x59757f[_0x4a61a1])&&(_0x3f4b3c=_0x195f28(_0x3f4b3c)||_0x3f4b3c);return _0x3f4b3c;},_0x3e8605=(_0x1ad25f,_0x55e16d)=>(_0x40094f,_0x422140)=>_0x55e16d(_0x40094f,_0x422140,_0x1ad25f);function _0x3506a2(_0x952c24,_0x4952d8){const _0x4c8a6a=_0x492f50,_0xfd9e4d=_0x952c24['replies'][0x0];return{..._0x4952d8,'id':_0xfd9e4d['replyId'],'resolved':_0x952c24[_0x4c8a6a(0x1d3)]===0x1,'dT':_0x46570d(_0xfd9e4d[_0x4c8a6a(0x1d2)]),'personId':_0xfd9e4d['userId'],'threadId':_0xfd9e4d[_0x4c8a6a(0x230)]};}function _0x12ac8a(_0x483dbe,_0x5a9fa2,_0x2fb0e3){const _0x1ac297=_0x492f50;var _0x512eaf,_0x2edaec;if(((_0x2edaec=(_0x512eaf=_0x483dbe==null?void 0x0:_0x483dbe[_0x1ac297(0x235)])==null?void 0x0:_0x512eaf[_0x1ac297(0x1f7)])!=null?_0x2edaec:0x0)>0x0){const _0x266776=(_0x16e8ba,_0x1984ac)=>({'id':_0x16e8ba[_0x1ac297(0x1c6)],'threadId':_0x16e8ba[_0x1ac297(0x230)],'dT':_0x46570d(_0x16e8ba[_0x1ac297(0x1d2)]),'personId':_0x16e8ba[_0x1ac297(0x1c7)],'resolved':_0x483dbe[_0x1ac297(0x1d3)]===_0x245086['Solved'],'unitId':_0x5a9fa2,'subUnitId':_0x2fb0e3,'text':JSON[_0x1ac297(0x218)](_0x16e8ba[_0x1ac297(0x214)]),'parentId':_0x1984ac}),_0x3854ae=_0x266776(_0x483dbe[_0x1ac297(0x235)][0x0]);return{..._0x3854ae,'children':_0x483dbe['replies'][_0x1ac297(0x234)](0x1)['map'](_0x474a50=>_0x266776(_0x474a50,_0x3854ae['id']))};}return null;}let _0x673943=class{constructor(_0x5e341,_0x18f4d7,_0x1ddb9f,_0x265d02){const _0x41ab9f=_0x492f50;this['_httpService']=_0x5e341,this[_0x41ab9f(0x23d)]=_0x18f4d7,this[_0x41ab9f(0x233)]=_0x1ddb9f,this[_0x41ab9f(0x1bd)]=_0x265d02;}async['addComment'](_0x485fe3){const _0x48150d=_0x492f50;var _0x324a1f,_0x15d4a1;const {parentId:_0x34350e,unitId:_0x3eb6d6,text:_0x49808b,threadId:_0x16f975}=_0x485fe3,_0x44932a=(_0x15d4a1=(_0x324a1f=_0x49808b[_0x48150d(0x22e)])==null?void 0x0:_0x324a1f[_0x48150d(0x202)](_0x2f635=>_0x2f635[_0x48150d(0x20e)]===_0x14f1a3[_0x48150d(0x237)][_0x48150d(0x1fd)])[_0x48150d(0x228)](_0x1800c6=>_0x1800c6[_0x48150d(0x1d5)]))!=null?_0x15d4a1:[],_0x3fcc50=JSON[_0x48150d(0x1bb)](_0x49808b),_0x5e4892=(await this[_0x48150d(0x233)][_0x48150d(0x1fb)](_0x3eb6d6))['getMemberID']();if(_0x34350e){const _0x3d3a9e={'memberId':_0x5e4892,'unitId':_0x3eb6d6,'content':_0x3fcc50,'mention':_0x44932a,'threadId':_0x16f975},_0xeea4a9=(await this[_0x48150d(0x1c4)][_0x48150d(0x1c9)](_0x48150d(0x23a)+_0x3eb6d6+_0x48150d(0x1f4),{'body':_0x3d3a9e}))['body']['reply'];return{..._0x485fe3,'id':_0xeea4a9[_0x48150d(0x1c6)],'dT':_0x14f1a3[_0x48150d(0x210)](+_0xeea4a9['createTimestamp'])[_0x48150d(0x21a)](_0x48150d(0x205)),'personId':_0xeea4a9[_0x48150d(0x1c7)]};}else{const _0x4d44f4={'memberId':_0x5e4892,'unitId':_0x3eb6d6,'content':_0x3fcc50,'mention':_0x44932a},_0x1fe71a=await this[_0x48150d(0x1c4)][_0x48150d(0x1c9)]('/universer-api/comment/unit/'+_0x3eb6d6+'/add',{'body':_0x4d44f4});return _0x3506a2(_0x1fe71a[_0x48150d(0x23c)][_0x48150d(0x1d7)],_0x485fe3);}}async[_0x492f50(0x232)](_0x48f3a4){const _0x32a285=_0x492f50;var _0x4d372b,_0x5715e0;const {text:_0x51b6b4,unitId:_0x2063ec}=_0x48f3a4,_0x1e55d4=(_0x5715e0=(_0x4d372b=_0x51b6b4[_0x32a285(0x22e)])==null?void 0x0:_0x4d372b[_0x32a285(0x202)](_0xfe92d=>_0xfe92d['rangeType']===_0x14f1a3[_0x32a285(0x237)][_0x32a285(0x1fd)])[_0x32a285(0x228)](_0x15552c=>_0x15552c[_0x32a285(0x1d5)]))!=null?_0x5715e0:[],_0x591d49=JSON['stringify'](_0x51b6b4),_0x6ba902=_0x48f3a4[_0x32a285(0x230)],_0x29a363=_0x48f3a4['id'],_0x3b05f0={'memberId':(await this['_sessionService'][_0x32a285(0x1fb)](_0x2063ec))[_0x32a285(0x1f5)](),'unitId':_0x2063ec,'threadId':_0x6ba902,'mention':_0x1e55d4,'content':_0x591d49,'replyId':_0x29a363},_0x1bedaf=await this['_httpService'][_0x32a285(0x1c9)]('/universer-api/comment/unit/'+_0x2063ec+_0x32a285(0x224),{'body':_0x3b05f0});return!_0x1bedaf[_0x32a285(0x23c)][_0x32a285(0x1c0)]||_0x1bedaf[_0x32a285(0x23c)]['error'][_0x32a285(0x1ea)]===0x1;}async[_0x492f50(0x21e)](_0x4f57ff){const _0x588b11=_0x492f50,{unitId:_0x338a41}=_0x4f57ff,_0x1c6329=_0x4f57ff['threadId'],_0x265afb={'memberId':this[_0x588b11(0x23d)]['getCurrentUser']()[_0x588b11(0x1b8)],'unitId':_0x338a41,'threadId':_0x1c6329,'solved':_0x4f57ff['resolved']?_0x245086[_0x588b11(0x1cf)]:_0x245086[_0x588b11(0x1e0)]},_0x1e69e5=await this[_0x588b11(0x1c4)][_0x588b11(0x1c9)]('/universer-api/comment/unit/'+_0x338a41+_0x588b11(0x1de),{'body':_0x265afb});return!_0x1e69e5[_0x588b11(0x23c)][_0x588b11(0x1c0)]||_0x1e69e5[_0x588b11(0x23c)][_0x588b11(0x1c0)][_0x588b11(0x1ea)]===0x1;}async[_0x492f50(0x1bf)](_0xb9d69c,_0x5e7956,_0x18dd0f,_0x506701){const _0x4b1695=_0x492f50,_0x16e130={'memberId':(await this[_0x4b1695(0x233)]['requireSession'](_0xb9d69c))[_0x4b1695(0x1f5)](),'threadId':_0x18dd0f,'replyId':_0x506701,'unitId':_0xb9d69c},_0x4049f9=await this[_0x4b1695(0x1c4)][_0x4b1695(0x1c9)](_0x4b1695(0x23a)+_0xb9d69c+_0x4b1695(0x1eb),{'body':_0x16e130});return!_0x4049f9['body']['error']||_0x4049f9[_0x4b1695(0x23c)][_0x4b1695(0x1c0)][_0x4b1695(0x1ea)]===0x1;}async[_0x492f50(0x229)](_0x49dea9,_0x5b621a,_0x36cff0){const _0x557c0a=_0x492f50,_0x4ae225={'unitId':_0x49dea9,'threadId':_0x36cff0},_0x56b654=await this[_0x557c0a(0x1c4)][_0x557c0a(0x1c9)](_0x557c0a(0x23a)+_0x49dea9+_0x557c0a(0x236),{'body':_0x4ae225}),_0x633df9=_0x36cff0[_0x557c0a(0x228)](_0x1f4299=>_0x12ac8a(_0x56b654[_0x557c0a(0x23c)][_0x557c0a(0x211)][_0x1f4299],_0x49dea9,_0x5b621a))[_0x557c0a(0x202)](Boolean);return Object[_0x557c0a(0x216)](_0x56b654[_0x557c0a(0x23c)][_0x557c0a(0x238)])[_0x557c0a(0x1c5)](_0x226d5e=>{const _0x206e0e=_0x557c0a;this[_0x206e0e(0x23d)][_0x206e0e(0x1fa)](_0x226d5e);}),_0x633df9;}['saveCommentToSnapshot'](_0x1c07e1){const _0x47729e=_0x492f50;return{'id':_0x1c07e1['id'],'threadId':_0x1c07e1['threadId'],'ref':_0x1c07e1[_0x47729e(0x1e7)]};}};_0x673943=_0x2edca3([_0x3e8605(0x0,_0x14f1a3[_0x492f50(0x1ff)](_0xa8eec2[_0x492f50(0x22b)])),_0x3e8605(0x1,_0x14f1a3['Inject'](_0x14f1a3[_0x492f50(0x1ca)])),_0x3e8605(0x2,_0x14f1a3['Inject'](_0x1fa1fd[_0x492f50(0x1f1)])),_0x3e8605(0x3,_0x14f1a3[_0x492f50(0x1ff)](_0x14f1a3[_0x492f50(0x1ba)]))],_0x673943);var _0x1a4b65=Object['getOwnPropertyDescriptor'],_0x464083=(_0x3b35f0,_0x5d2e81,_0x1f40ef,_0x1a86eb)=>{const _0x3de015=_0x492f50;for(var _0x1a7347=_0x1a86eb>0x1?void 0x0:_0x1a86eb?_0x1a4b65(_0x5d2e81,_0x1f40ef):_0x5d2e81,_0x15332d=_0x3b35f0[_0x3de015(0x1f7)]-0x1,_0x281dfc;_0x15332d>=0x0;_0x15332d--)(_0x281dfc=_0x3b35f0[_0x15332d])&&(_0x1a7347=_0x281dfc(_0x1a7347)||_0x1a7347);return _0x1a7347;},_0x1863e8=(_0x12145c,_0x5a1599)=>(_0x2a963d,_0x542220)=>_0x5a1599(_0x2a963d,_0x542220,_0x12145c);let _0x231847=class extends _0x14f1a3[_0x492f50(0x1d6)]{constructor(_0x563850,_0x175406){const _0x3b4c5f=_0x492f50;super(),this['_threadCommentDataSourceService']=_0x563850,this[_0x3b4c5f(0x1ee)]=_0x175406,this[_0x3b4c5f(0x1dd)]();}['_initDataSource'](){const _0x1f2ea2=_0x492f50;this[_0x1f2ea2(0x1f0)]['dataSource']=this['_threadCommentDataSource'],this[_0x1f2ea2(0x1f0)]['syncUpdateMutationToColla']=!0x1;}};_0x231847=_0x464083([_0x1863e8(0x0,_0x24c7fc[_0x492f50(0x22a)]),_0x1863e8(0x1,_0x14f1a3['Inject'](_0x673943))],_0x231847);var _0x27ba63=Object[_0x492f50(0x1c2)],_0x374969=Object[_0x492f50(0x1c3)],_0x1801af=(_0x2b751f,_0x22c408,_0x1dee62)=>_0x22c408 in _0x2b751f?_0x27ba63(_0x2b751f,_0x22c408,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1dee62}):_0x2b751f[_0x22c408]=_0x1dee62,_0x8bfa78=(_0x2b1bd9,_0xee0180,_0x565b27,_0x480dd4)=>{const _0x2408ae=_0x492f50;for(var _0x4fc435=_0x480dd4>0x1?void 0x0:_0x480dd4?_0x374969(_0xee0180,_0x565b27):_0xee0180,_0x2628f3=_0x2b1bd9[_0x2408ae(0x1f7)]-0x1,_0x400648;_0x2628f3>=0x0;_0x2628f3--)(_0x400648=_0x2b1bd9[_0x2628f3])&&(_0x4fc435=_0x400648(_0x4fc435)||_0x4fc435);return _0x4fc435;},_0x2c70d9=(_0x46e346,_0x3642d5)=>(_0x7928ad,_0x2f2e86)=>_0x3642d5(_0x7928ad,_0x2f2e86,_0x46e346),_0x6d8582=(_0x176643,_0x21881f,_0x454483)=>_0x1801af(_0x176643,typeof _0x21881f!=_0x492f50(0x1cb)?_0x21881f+'':_0x21881f,_0x454483);_0x3ef5c0[_0x492f50(0x1ec)]=class extends _0x14f1a3[_0x492f50(0x1bc)]{constructor(_0x30ac05=_0x3957cc,_0x104e98,_0x1c3e72){const _0x319c15=_0x492f50;super(),this[_0x319c15(0x1be)]=_0x30ac05,this[_0x319c15(0x1bd)]=_0x104e98,this[_0x319c15(0x1d4)]=_0x1c3e72;const {..._0x4c14f3}=_0x14f1a3[_0x319c15(0x223)]({},_0x3957cc,this['_config']);this['_configService'][_0x319c15(0x1f8)](_0x3fefd6,_0x4c14f3);}['onStarting'](){const _0xfadbd2=_0x492f50;[[_0x673943],[_0x231847],[_0x4292a6]][_0xfadbd2(0x1c5)](_0x2b801e=>{const _0x17401e=_0xfadbd2;this[_0x17401e(0x1bd)]['add'](_0x2b801e);});}[_0x492f50(0x1e4)](){const _0x246bde=_0x492f50;this['_injector'][_0x246bde(0x209)](_0x231847),this[_0x246bde(0x1bd)][_0x246bde(0x209)](_0x4292a6);}},_0x6d8582(_0x3ef5c0[_0x492f50(0x1ec)],_0x492f50(0x200),_0x972281),_0x6d8582(_0x3ef5c0[_0x492f50(0x1ec)],_0x492f50(0x1da),_0x14f1a3[_0x492f50(0x22f)][_0x492f50(0x21c)]),_0x3ef5c0[_0x492f50(0x1ec)]=_0x8bfa78([_0x14f1a3[_0x492f50(0x20d)](_0x80518c[_0x492f50(0x222)],_0x1fa1fd['UniverCollaborationClientPlugin'],_0x1fdb03[_0x492f50(0x22d)]),_0x2c70d9(0x1,_0x14f1a3[_0x492f50(0x1ff)](_0x14f1a3['Injector'])),_0x2c70d9(0x2,_0x14f1a3['IConfigService'])],_0x3ef5c0[_0x492f50(0x1ec)]),Object['defineProperty'](_0x3ef5c0,Symbol[_0x492f50(0x219)],{'value':_0x492f50(0x1e3)});}));function _0x4f63(_0x1ebeea,_0x566ccc){const _0x522195=_0x5221();return _0x4f63=function(_0x4f63a1,_0x4d51cf){_0x4f63a1=_0x4f63a1-0x1b8;let _0x2e75c8=_0x522195[_0x4f63a1];return _0x2e75c8;},_0x4f63(_0x1ebeea,_0x566ccc);}function _0x5221(){const _0x166976=['rxjs','COMMENT','@univerjs/network','Inject','pluginName','object','filter','subscribe','commentUpdate$','YYYY/MM/DD\x20HH:mm','user','UNRECOGNIZED','Edit','get','getUser','670iDeLPo','payload','DependentOn','rangeType','1582ttPoVP','dayjs','comments','@univerjs/thread-comment-ui','root','content','77992IjvzfQ','values','exports','parse','toStringTag','format','UniverProCollaborationClient','UNIVER_UNKNOWN','@univerjs-pro/license','resolveComment','1662RfqeYz','263170BhVptq','addComment','UniverThreadCommentUIPlugin','merge','/edit','unitId','disposeWithMe','Add','map','listComments','IThreadCommentDataSourceService','HTTPService','8822LwSAyS','UniverLicensePlugin','customRanges','UniverInstanceType','threadId','UniverProLicense','updateComment','_sessionService','slice','replies','/list','CustomRangeType','users','CommentService','/universer-api/comment/unit/','304770itpAbT','body','_userService','userID','/universer-api/user/list','Injector','stringify','Plugin','_injector','_config','deleteComment','error','getUnit','defineProperty','getOwnPropertyDescriptor','_httpService','forEach','replyId','userId','Reply','post','UserManagerService','symbol','Delete','UniverThreadComment','@univerjs/core','Solved','12BXwphs','306WTrfYp','createTimestamp','solved','_configService','rangeId','Disposable','comment','amd','@univerjs-pro/collaboration-client','type','Solve','thread-comment-data-source.config','_initDataSource','/solved','139089MwUAEY','OpenOrReOpen','9836jsRisM','add','Module','onReady','_threadCommentModel','find','ref','UniverNetwork','personId','code','/delete','UniverThreadCommentDataSourcePlugin','@univerjs/thread-comment','_threadCommentDataSource','_initUserSync','_threadCommentDataSourceService','CollaborationSessionService','UniverProThreadCommentDatasource','ThreadCommentModel','/reply','getMemberID','bufferTime','length','setConfig','3EeeXBO','addUser','requireSession'];_0x5221=function(){return _0x166976;};return _0x5221();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1-nightly.202502221605",
|
|
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/
|
|
49
|
-
"@univerjs/core": "0.6.
|
|
50
|
-
"@univerjs
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment": "0.6.
|
|
54
|
-
"@univerjs/thread-comment
|
|
48
|
+
"@univerjs-pro/license": "0.6.1-nightly.202502221605",
|
|
49
|
+
"@univerjs/core": "0.6.1-nightly.202502221605",
|
|
50
|
+
"@univerjs/protocol": "0.1.44-alpha.3",
|
|
51
|
+
"@univerjs-pro/collaboration-client": "0.6.1-nightly.202502221605",
|
|
52
|
+
"@univerjs/network": "0.6.1-nightly.202502221605",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.6.1-nightly.202502221605",
|
|
54
|
+
"@univerjs/thread-comment": "0.6.1-nightly.202502221605"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|
|
58
58
|
"typescript": "^5.7.3",
|
|
59
|
-
"vite": "^6.1.
|
|
60
|
-
"vitest": "^3.0.
|
|
61
|
-
"@univerjs-infra/shared": "0.6.
|
|
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",
|