@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202505021607 → 0.7.0-nightly.202505031606
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/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x3ed0e1=_0x1c58;(function(_0x46db32,_0x4e1edd){const _0x4e0390=_0x1c58,_0xc34431=_0x46db32();while(!![]){try{const _0x38e436=parseInt(_0x4e0390(0x182))/0x1*(parseInt(_0x4e0390(0x14b))/0x2)+-parseInt(_0x4e0390(0x19d))/0x3*(parseInt(_0x4e0390(0x176))/0x4)+-parseInt(_0x4e0390(0x14f))/0x5*(parseInt(_0x4e0390(0x174))/0x6)+-parseInt(_0x4e0390(0x16c))/0x7+parseInt(_0x4e0390(0x1ba))/0x8*(-parseInt(_0x4e0390(0x1c5))/0x9)+parseInt(_0x4e0390(0x1be))/0xa*(parseInt(_0x4e0390(0x17d))/0xb)+parseInt(_0x4e0390(0x153))/0xc;if(_0x38e436===_0x4e1edd)break;else _0xc34431['push'](_0xc34431['shift']());}catch(_0x277f5a){_0xc34431['push'](_0xc34431['shift']());}}}(_0x436c,0xbdf6e));Object[_0x3ed0e1(0x1a5)](exports,Symbol['toStringTag'],{'value':'Module'});const b=require(_0x3ed0e1(0x151)),T=require(_0x3ed0e1(0x18b)),c=require(_0x3ed0e1(0x152)),j=require(_0x3ed0e1(0x16b)),M=require(_0x3ed0e1(0x166)),w=require(_0x3ed0e1(0x1bb)),P=require(_0x3ed0e1(0x16d)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x245d99=>(_0x245d99[_0x245d99[_0x3ed0e1(0x15f)]=0x0]=_0x3ed0e1(0x15f),_0x245d99[_0x245d99[_0x3ed0e1(0x1b9)]=0x1]=_0x3ed0e1(0x1b9),_0x245d99[_0x245d99['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x245d99))(I||{}),v=(_0x4bbab2=>(_0x4bbab2[_0x4bbab2['Unknown']=0x0]=_0x3ed0e1(0x197),_0x4bbab2[_0x4bbab2[_0x3ed0e1(0x184)]=0x1]=_0x3ed0e1(0x184),_0x4bbab2[_0x4bbab2[_0x3ed0e1(0x1a2)]=0x2]='Reply',_0x4bbab2[_0x4bbab2[_0x3ed0e1(0x15c)]=0x3]=_0x3ed0e1(0x15c),_0x4bbab2[_0x4bbab2[_0x3ed0e1(0x175)]=0x4]='Delete',_0x4bbab2[_0x4bbab2[_0x3ed0e1(0x178)]=0x5]=_0x3ed0e1(0x178),_0x4bbab2[_0x4bbab2[_0x3ed0e1(0x17a)]=-0x1]=_0x3ed0e1(0x17a),_0x4bbab2))(v||{});const f=_0x1f2329=>c[_0x3ed0e1(0x159)](new Date(+_0x1f2329))[_0x3ed0e1(0x183)](_0x3ed0e1(0x148)),R=async(_0x5f0d27,_0x1f6541)=>{const _0x77272f=_0x3ed0e1,_0x10d01c=_0x5f0d27[_0x77272f(0x19e)](c[_0x77272f(0x179)]),_0x4b78bb=_0x5f0d27['get'](P[_0x77272f(0x1b0)]);_0x1f6541['forEach'](_0x398320=>{const _0x2dbb75=_0x77272f;_0x10d01c['getUser'](_0x398320)&&_0x1f6541[_0x2dbb75(0x1b5)](_0x398320);}),_0x1f6541['size']&&(await _0x4b78bb[_0x77272f(0x19e)]('/universer-api/user/list',{'params':{'userIDs':[..._0x1f6541]}}))['body']['users'][_0x77272f(0x198)](_0x9b0847=>{_0x9b0847&&_0x10d01c['addUser'](_0x9b0847);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x2fec3d,_0x4986b7,_0x566c84,_0x31c4cd)=>{const _0x1a23f5=_0x3ed0e1;for(var _0x5e08b4=_0x31c4cd>0x1?void 0x0:_0x31c4cd?$(_0x4986b7,_0x566c84):_0x4986b7,_0x1dc188=_0x2fec3d[_0x1a23f5(0x1ad)]-0x1,_0x333ae0;_0x1dc188>=0x0;_0x1dc188--)(_0x333ae0=_0x2fec3d[_0x1dc188])&&(_0x5e08b4=_0x333ae0(_0x5e08b4)||_0x5e08b4);return _0x5e08b4;},S=(_0x21442d,_0x1d9404)=>(_0x5cfd14,_0x2d211e)=>_0x1d9404(_0x5cfd14,_0x2d211e,_0x21442d);let p=class extends c[_0x3ed0e1(0x167)]{constructor(_0x56e152,_0x445c16,_0x5a69cb,_0x3b70e7){const _0x21c28b=_0x3ed0e1;super(),this[_0x21c28b(0x19a)]=_0x56e152,this[_0x21c28b(0x1a7)]=_0x445c16,this[_0x21c28b(0x18f)]=_0x5a69cb,this['_injector']=_0x3b70e7,this[_0x21c28b(0x155)](),this[_0x21c28b(0x165)]();}['_initUserSync'](){const _0x5db32a=_0x3ed0e1;this['disposeWithMe'](this[_0x5db32a(0x1a7)][_0x5db32a(0x147)][_0x5db32a(0x149)](w['bufferTime'](0x10))[_0x5db32a(0x156)](_0x4edded=>{const _0x187e61=_0x5db32a,_0x3693f9=new Set();_0x4edded['forEach'](_0x111282=>{const _0xbd5c8d=_0x1c58;switch(_0x111282[_0xbd5c8d(0x1aa)]){case _0xbd5c8d(0x18c):{const _0x27ecee=_0x111282[_0xbd5c8d(0x188)][_0xbd5c8d(0x171)];_0x3693f9[_0xbd5c8d(0x18c)](_0x27ecee);break;}}}),R(this[_0x187e61(0x1b6)],_0x3693f9);}));}[_0x3ed0e1(0x155)](){const _0x31e9c9=_0x3ed0e1;this[_0x31e9c9(0x160)](this['_commentService']['commentUpdate$'][_0x31e9c9(0x156)](async _0x3f98af=>{const _0x1a2e12=_0x31e9c9;var _0x56bcce,_0x530086,_0xe4551a,_0x58ddcd;const _0x1b39ac=(_0x56bcce=this[_0x1a2e12(0x1a7)][_0x1a2e12(0x14d)](_0x3f98af[_0x1a2e12(0x1ab)])[_0x1a2e12(0x187)](_0x2daa38=>_0x2daa38[_0x1a2e12(0x1c0)]===_0x3f98af[_0x1a2e12(0x1c0)]))==null?void 0x0:_0x56bcce[_0x1a2e12(0x1bd)];if(!_0x1b39ac)return;const {unitId:_0x5c0b1d,subUnitId:_0x50427e}=_0x1b39ac;switch(_0x3f98af[_0x1a2e12(0x177)]&&this['_userService'][_0x1a2e12(0x1b3)](_0x3f98af[_0x1a2e12(0x177)]),_0x3f98af['type']){case v[_0x1a2e12(0x184)]:break;case v[_0x1a2e12(0x1a2)]:{this[_0x1a2e12(0x1a7)][_0x1a2e12(0x15d)](_0x5c0b1d,_0x50427e,{'unitId':_0x5c0b1d,'subUnitId':_0x50427e,'ref':'','id':_0x3f98af[_0x1a2e12(0x157)],'dT':f(+_0x3f98af[_0x1a2e12(0x18d)]),'threadId':_0x3f98af[_0x1a2e12(0x1c0)],'personId':(_0xe4551a=(_0x530086=_0x3f98af[_0x1a2e12(0x177)])==null?void 0x0:_0x530086[_0x1a2e12(0x1c9)])!=null?_0xe4551a:_0x3f98af[_0x1a2e12(0x1a8)],'text':JSON['parse'](_0x3f98af[_0x1a2e12(0x15b)]),'parentId':_0x1b39ac['id']});break;}case v[_0x1a2e12(0x175)]:{const _0x564cfd=this[_0x1a2e12(0x1a7)][_0x1a2e12(0x181)](_0x5c0b1d,_0x50427e,_0x3f98af[_0x1a2e12(0x157)]);_0x564cfd&&_0x564cfd['parentId']&&this['_threadCommentModel'][_0x1a2e12(0x1c8)](_0x5c0b1d,_0x50427e,_0x3f98af[_0x1a2e12(0x157)]);break;}case v[_0x1a2e12(0x15c)]:{this[_0x1a2e12(0x1a7)]['updateComment'](_0x5c0b1d,_0x50427e,{'commentId':_0x3f98af['replyId'],'text':JSON[_0x1a2e12(0x16a)](_0x3f98af[_0x1a2e12(0x15b)])});break;}case v[_0x1a2e12(0x178)]:{const _0x4098ba=(_0x58ddcd=this[_0x1a2e12(0x1a7)][_0x1a2e12(0x14d)](_0x3f98af[_0x1a2e12(0x1ab)])['find'](_0x357e9d=>_0x357e9d[_0x1a2e12(0x1c0)]===_0x3f98af[_0x1a2e12(0x1c0)]))==null?void 0x0:_0x58ddcd[_0x1a2e12(0x1bd)];_0x4098ba&&this[_0x1a2e12(0x1a7)][_0x1a2e12(0x196)](_0x5c0b1d,_0x50427e,_0x4098ba['id'],_0x3f98af[_0x1a2e12(0x164)]===I[_0x1a2e12(0x1b9)]);break;}}}));}};p=E([S(0x0,c[_0x3ed0e1(0x1a3)](b[_0x3ed0e1(0x1c2)])),S(0x1,c[_0x3ed0e1(0x1a3)](M[_0x3ed0e1(0x161)])),S(0x2,c[_0x3ed0e1(0x1a3)](c[_0x3ed0e1(0x179)])),S(0x3,c['Inject'](c[_0x3ed0e1(0x1c7)]))],p);const q=_0x3ed0e1(0x1c4),D={};var A=Object[_0x3ed0e1(0x1bc)],x=(_0xaa4aab,_0x516053,_0x5b794d,_0x101aec)=>{for(var _0x4c1b49=_0x101aec>0x1?void 0x0:_0x101aec?A(_0x516053,_0x5b794d):_0x516053,_0x2e0c92=_0xaa4aab['length']-0x1,_0x3cdf5a;_0x2e0c92>=0x0;_0x2e0c92--)(_0x3cdf5a=_0xaa4aab[_0x2e0c92])&&(_0x4c1b49=_0x3cdf5a(_0x4c1b49)||_0x4c1b49);return _0x4c1b49;},_=(_0xd45d4c,_0x13043b)=>(_0x2c6fe2,_0x1314e4)=>_0x13043b(_0x2c6fe2,_0x1314e4,_0xd45d4c);function Y(_0x14d9c6,_0x204c97){const _0xeb97f0=_0x3ed0e1,_0x1d75f3=_0x14d9c6[_0xeb97f0(0x168)][0x0];return{..._0x204c97,'id':_0x1d75f3[_0xeb97f0(0x157)],'resolved':_0x14d9c6['solved']===0x1,'dT':f(_0x1d75f3[_0xeb97f0(0x18d)]),'personId':_0x1d75f3['userId'],'threadId':_0x1d75f3[_0xeb97f0(0x1c0)]};}function G(_0x3547c5,_0x37ee8c,_0x303b4b){const _0x1e2b90=_0x3ed0e1;var _0x53bb2b,_0x1810e4;if(((_0x1810e4=(_0x53bb2b=_0x3547c5==null?void 0x0:_0x3547c5[_0x1e2b90(0x168)])==null?void 0x0:_0x53bb2b[_0x1e2b90(0x1ad)])!=null?_0x1810e4:0x0)>0x0){const _0x3ec478=(_0x32c14f,_0x4982a9)=>({'id':_0x32c14f[_0x1e2b90(0x157)],'threadId':_0x32c14f[_0x1e2b90(0x1c0)],'dT':f(_0x32c14f[_0x1e2b90(0x18d)]),'personId':_0x32c14f['userId'],'resolved':_0x3547c5[_0x1e2b90(0x164)]===I[_0x1e2b90(0x1b9)],'unitId':_0x37ee8c,'subUnitId':_0x303b4b,'text':JSON[_0x1e2b90(0x16a)](_0x32c14f[_0x1e2b90(0x15b)]),'parentId':_0x4982a9}),_0x9ff4df=_0x3ec478(_0x3547c5[_0x1e2b90(0x168)][0x0]);return{..._0x9ff4df,'children':_0x3547c5['replies'][_0x1e2b90(0x17f)](0x1)[_0x1e2b90(0x1b2)](_0x143688=>_0x3ec478(_0x143688,_0x9ff4df['id']))};}return null;}let g=class{constructor(_0x4fc172,_0x4e6787,_0x3a55c1,_0xb378dc){const _0x4c2277=_0x3ed0e1;this[_0x4c2277(0x180)]=_0x4fc172,this['_userService']=_0x4e6787,this['_sessionService']=_0x3a55c1,this[_0x4c2277(0x1b6)]=_0xb378dc;}async['addComment'](_0x581c70){const _0x46aa34=_0x3ed0e1;var _0x418ed2,_0x493888;const {parentId:_0x42d9aa,unitId:_0x4bc1a9,text:_0x53297a,threadId:_0x876243}=_0x581c70,_0x5bc3b0=(_0x493888=(_0x418ed2=_0x53297a[_0x46aa34(0x16f)])==null?void 0x0:_0x418ed2[_0x46aa34(0x15e)](_0x7b419f=>_0x7b419f[_0x46aa34(0x192)]===c[_0x46aa34(0x17e)][_0x46aa34(0x195)])[_0x46aa34(0x1b2)](_0x3cb5ce=>_0x3cb5ce['rangeId']))!=null?_0x493888:[],_0x3fd067=JSON['stringify'](_0x53297a),_0x137edd=(await this[_0x46aa34(0x17c)][_0x46aa34(0x14e)](_0x4bc1a9))[_0x46aa34(0x146)]();if(_0x42d9aa){const _0x181a99={'memberId':_0x137edd,'unitId':_0x4bc1a9,'content':_0x3fd067,'mention':_0x5bc3b0,'threadId':_0x876243},_0x57a3b4=(await this[_0x46aa34(0x180)][_0x46aa34(0x158)]('/universer-api/comment/unit/'+_0x4bc1a9+_0x46aa34(0x1b7),{'body':_0x181a99}))[_0x46aa34(0x185)]['reply'];return{..._0x581c70,'id':_0x57a3b4[_0x46aa34(0x157)],'dT':c[_0x46aa34(0x159)](+_0x57a3b4[_0x46aa34(0x18d)])[_0x46aa34(0x183)](_0x46aa34(0x148)),'personId':_0x57a3b4[_0x46aa34(0x1a8)]};}else{const _0x1640e5={'memberId':_0x137edd,'unitId':_0x4bc1a9,'content':_0x3fd067,'mention':_0x5bc3b0},_0x381324=await this['_httpService'][_0x46aa34(0x158)](_0x46aa34(0x190)+_0x4bc1a9+_0x46aa34(0x1c1),{'body':_0x1640e5});return Y(_0x381324['body']['comment'],_0x581c70);}}async[_0x3ed0e1(0x1ae)](_0xa6b27){const _0x28b3e8=_0x3ed0e1;var _0x36617b,_0x3955b6;const {text:_0x525eba,unitId:_0x3b02ee}=_0xa6b27,_0x50a7ab=(_0x3955b6=(_0x36617b=_0x525eba[_0x28b3e8(0x16f)])==null?void 0x0:_0x36617b[_0x28b3e8(0x15e)](_0x3ad0f4=>_0x3ad0f4[_0x28b3e8(0x192)]===c[_0x28b3e8(0x17e)][_0x28b3e8(0x195)])['map'](_0x11191e=>_0x11191e[_0x28b3e8(0x19c)]))!=null?_0x3955b6:[],_0x4a05d2=JSON[_0x28b3e8(0x1a6)](_0x525eba),_0x2cc556=_0xa6b27[_0x28b3e8(0x1c0)],_0x1f2bb6=_0xa6b27['id'],_0x55c1bf={'memberId':(await this['_sessionService'][_0x28b3e8(0x14e)](_0x3b02ee))[_0x28b3e8(0x146)](),'unitId':_0x3b02ee,'threadId':_0x2cc556,'mention':_0x50a7ab,'content':_0x4a05d2,'replyId':_0x1f2bb6},_0x144990=await this['_httpService'][_0x28b3e8(0x158)](_0x28b3e8(0x190)+_0x3b02ee+_0x28b3e8(0x1b1),{'body':_0x55c1bf});return!_0x144990[_0x28b3e8(0x185)][_0x28b3e8(0x1a1)]||_0x144990['body'][_0x28b3e8(0x1a1)][_0x28b3e8(0x150)]===0x1;}async[_0x3ed0e1(0x196)](_0x5e5e4c){const _0x5e0074=_0x3ed0e1,{unitId:_0x236c88}=_0x5e5e4c,_0x580924=_0x5e5e4c[_0x5e0074(0x1c0)],_0xa4fe65={'memberId':this[_0x5e0074(0x18f)][_0x5e0074(0x1c6)]()[_0x5e0074(0x1c9)],'unitId':_0x236c88,'threadId':_0x580924,'solved':_0x5e5e4c[_0x5e0074(0x172)]?I['Solved']:I[_0x5e0074(0x15f)]},_0xdbee80=await this[_0x5e0074(0x180)][_0x5e0074(0x158)]('/universer-api/comment/unit/'+_0x236c88+'/solved',{'body':_0xa4fe65});return!_0xdbee80[_0x5e0074(0x185)][_0x5e0074(0x1a1)]||_0xdbee80[_0x5e0074(0x185)][_0x5e0074(0x1a1)][_0x5e0074(0x150)]===0x1;}async[_0x3ed0e1(0x1c8)](_0x13b5ee,_0xd88afc,_0x5d37c8,_0x7f90ef){const _0xfe8f6a=_0x3ed0e1,_0x5ecf4a={'memberId':(await this[_0xfe8f6a(0x17c)]['requireSession'](_0x13b5ee))[_0xfe8f6a(0x146)](),'threadId':_0x5d37c8,'replyId':_0x7f90ef,'unitId':_0x13b5ee},_0x1fdaf7=await this[_0xfe8f6a(0x180)][_0xfe8f6a(0x158)](_0xfe8f6a(0x190)+_0x13b5ee+_0xfe8f6a(0x1a9),{'body':_0x5ecf4a});return!_0x1fdaf7[_0xfe8f6a(0x185)][_0xfe8f6a(0x1a1)]||_0x1fdaf7[_0xfe8f6a(0x185)][_0xfe8f6a(0x1a1)][_0xfe8f6a(0x150)]===0x1;}async[_0x3ed0e1(0x1b8)](_0x267814,_0x47e6de,_0x4ceaff){const _0x2c9ce8=_0x3ed0e1,_0x1ea6d0={'unitId':_0x267814,'threadId':_0x4ceaff},_0x4f7712=await this[_0x2c9ce8(0x180)][_0x2c9ce8(0x158)](_0x2c9ce8(0x190)+_0x267814+_0x2c9ce8(0x194),{'body':_0x1ea6d0}),_0x3001e5=_0x4ceaff['map'](_0x1c4482=>G(_0x4f7712[_0x2c9ce8(0x185)][_0x2c9ce8(0x193)][_0x1c4482],_0x267814,_0x47e6de))[_0x2c9ce8(0x15e)](Boolean);return Object[_0x2c9ce8(0x14c)](_0x4f7712[_0x2c9ce8(0x185)][_0x2c9ce8(0x1af)])['forEach'](_0x308f5e=>{const _0x4bb702=_0x2c9ce8;this[_0x4bb702(0x18f)]['addUser'](_0x308f5e);}),_0x3001e5;}['saveCommentToSnapshot'](_0x52a16a){const _0x5ba25a=_0x3ed0e1;return{'id':_0x52a16a['id'],'threadId':_0x52a16a[_0x5ba25a(0x1c0)],'ref':_0x52a16a[_0x5ba25a(0x16e)]};}};g=x([_(0x0,c[_0x3ed0e1(0x1a3)](P['HTTPService'])),_(0x1,c['Inject'](c['UserManagerService'])),_(0x2,c['Inject'](b[_0x3ed0e1(0x162)])),_(0x3,c[_0x3ed0e1(0x1a3)](c[_0x3ed0e1(0x1c7)]))],g);var H=Object[_0x3ed0e1(0x1bc)],J=(_0x5bf4d9,_0x40e22d,_0x4ce978,_0x33197f)=>{const _0x31ff74=_0x3ed0e1;for(var _0xc8e53d=_0x33197f>0x1?void 0x0:_0x33197f?H(_0x40e22d,_0x4ce978):_0x40e22d,_0xa79031=_0x5bf4d9[_0x31ff74(0x1ad)]-0x1,_0x21b3c2;_0xa79031>=0x0;_0xa79031--)(_0x21b3c2=_0x5bf4d9[_0xa79031])&&(_0xc8e53d=_0x21b3c2(_0xc8e53d)||_0xc8e53d);return _0xc8e53d;},y=(_0xb3ff02,_0x2dd5f8)=>(_0x2857d6,_0x452f5c)=>_0x2dd5f8(_0x2857d6,_0x452f5c,_0xb3ff02);let C=class extends c[_0x3ed0e1(0x167)]{constructor(_0x363f00,_0x20090a){const _0xd2a6a3=_0x3ed0e1;super(),this['_threadCommentDataSourceService']=_0x363f00,this[_0xd2a6a3(0x1b4)]=_0x20090a,this[_0xd2a6a3(0x199)]();}['_initDataSource'](){const _0x361678=_0x3ed0e1;this['_threadCommentDataSourceService'][_0x361678(0x169)]=this[_0x361678(0x1b4)],this['_threadCommentDataSourceService'][_0x361678(0x18a)]=!0x1;}};function _0x1c58(_0x1188d6,_0x26357e){const _0x436c6f=_0x436c();return _0x1c58=function(_0x1c581c,_0x348c1a){_0x1c581c=_0x1c581c-0x146;let _0x3bdc26=_0x436c6f[_0x1c581c];return _0x3bdc26;},_0x1c58(_0x1188d6,_0x26357e);}C=J([y(0x0,M[_0x3ed0e1(0x189)]),y(0x1,c[_0x3ed0e1(0x1a3)](g))],C);var F=Object[_0x3ed0e1(0x1a5)],L=Object[_0x3ed0e1(0x1bc)],Z=(_0x221d2a,_0xbf73f7,_0xf3daf2)=>_0xbf73f7 in _0x221d2a?F(_0x221d2a,_0xbf73f7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf3daf2}):_0x221d2a[_0xbf73f7]=_0xf3daf2,W=(_0x342011,_0x33161e,_0x556b24,_0x432072)=>{const _0x3cf3c8=_0x3ed0e1;for(var _0x527883=_0x432072>0x1?void 0x0:_0x432072?L(_0x33161e,_0x556b24):_0x33161e,_0x2cc72f=_0x342011[_0x3cf3c8(0x1ad)]-0x1,_0x3b0466;_0x2cc72f>=0x0;_0x2cc72f--)(_0x3b0466=_0x342011[_0x2cc72f])&&(_0x527883=_0x3b0466(_0x527883)||_0x527883);return _0x527883;},O=(_0xd5c228,_0x451b26)=>(_0x53b717,_0x1ebcf8)=>_0x451b26(_0x53b717,_0x1ebcf8,_0xd5c228),N=(_0x12f26b,_0xd2c6fe,_0x2f7a92)=>Z(_0x12f26b,typeof _0xd2c6fe!=_0x3ed0e1(0x19b)?_0xd2c6fe+'':_0xd2c6fe,_0x2f7a92);exports[_0x3ed0e1(0x17b)]=class extends c[_0x3ed0e1(0x191)]{constructor(_0xedef1c=D,_0x29722d,_0x8eefa5){const _0x588ee2=_0x3ed0e1;super(),this[_0x588ee2(0x1c3)]=_0xedef1c,this[_0x588ee2(0x1b6)]=_0x29722d,this[_0x588ee2(0x173)]=_0x8eefa5;const {..._0x2c4bd8}=c[_0x588ee2(0x1bf)]({},D,this['_config']);this[_0x588ee2(0x173)][_0x588ee2(0x15a)](q,_0x2c4bd8);}[_0x3ed0e1(0x19f)](){const _0x24c772=_0x3ed0e1;[[g],[C],[p]][_0x24c772(0x198)](_0x56c892=>{const _0x3ecc33=_0x24c772;this[_0x3ecc33(0x1b6)][_0x3ecc33(0x18c)](_0x56c892);});}[_0x3ed0e1(0x18e)](){const _0x2305c1=_0x3ed0e1;this[_0x2305c1(0x1b6)]['get'](C),this[_0x2305c1(0x1b6)][_0x2305c1(0x19e)](p);}},N(exports[_0x3ed0e1(0x17b)],_0x3ed0e1(0x14a),U),N(exports[_0x3ed0e1(0x17b)],_0x3ed0e1(0x1aa),c[_0x3ed0e1(0x186)][_0x3ed0e1(0x163)]),exports[_0x3ed0e1(0x17b)]=W([c[_0x3ed0e1(0x1a4)](j[_0x3ed0e1(0x1a0)],b[_0x3ed0e1(0x1ac)],T[_0x3ed0e1(0x154)]),O(0x1,c['Inject'](c[_0x3ed0e1(0x1c7)])),O(0x2,c[_0x3ed0e1(0x170)])],exports[_0x3ed0e1(0x17b)]);function _0x436c(){const _0x24b50d=['userID','getMemberID','commentUpdate$','YYYY/MM/DD\x20HH:mm','pipe','pluginName','666080CSWUXD','values','getUnit','requireSession','8900fYYzuf','code','@univerjs-pro/collaboration-client','@univerjs/core','32348580ReHSFt','UniverLicensePlugin','_init','subscribe','replyId','post','dayjs','setConfig','content','Edit','addComment','filter','OpenOrReOpen','disposeWithMe','ThreadCommentModel','CollaborationSessionService','UNIVER_UNKNOWN','solved','_initUserSync','@univerjs/thread-comment','Disposable','replies','dataSource','parse','@univerjs/thread-comment-ui','10455879HdMlkH','@univerjs/network','ref','customRanges','IConfigService','personId','resolved','_configService','18icwPPG','Delete','1844ZrUNlo','user','Solve','UserManagerService','UNRECOGNIZED','UniverThreadCommentDataSourcePlugin','_sessionService','764390unOWpe','CustomRangeType','slice','_httpService','getComment','2VVNpqo','format','Add','body','UniverInstanceType','find','payload','IThreadCommentDataSourceService','syncUpdateMutationToColla','@univerjs-pro/license','add','createTimestamp','onReady','_userService','/universer-api/comment/unit/','Plugin','rangeType','comments','/list','COMMENT','resolveComment','Unknown','forEach','_initDataSource','_commentService','symbol','rangeId','4137nXgCZO','get','onStarting','UniverThreadCommentUIPlugin','error','Reply','Inject','DependentOn','defineProperty','stringify','_threadCommentModel','userId','/delete','type','unitId','UniverCollaborationClientPlugin','length','updateComment','users','HTTPService','/edit','map','addUser','_threadCommentDataSource','delete','_injector','/reply','listComments','Solved','8PmsXer','rxjs','getOwnPropertyDescriptor','root','130rrlTMl','merge','threadId','/add','CommentService','_config','thread-comment-data-source.config','12170835BHTxdr','getCurrentUser','Injector','deleteComment'];_0x436c=function(){return _0x24b50d;};return _0x436c();}
|
|
1
|
+
'use strict';const _0x32f557=_0x4b25;function _0x13fd(){const _0x2468f4=['Edit','commentUpdate$','Injector','@univerjs/network','map','userId','12BhKqVc','replyId','IThreadCommentDataSourceService','users','_sessionService','add','onReady','size','dataSource','_injector','type','10365579XRQCFA','error','UniverThreadCommentUIPlugin','_threadCommentDataSourceService','COMMENT','deleteComment','UserManagerService','code','format','forEach','getMemberID','10WBoiuX','rangeId','@univerjs-pro/license','getOwnPropertyDescriptor','getUnit','bufferTime','CustomRangeType','UNRECOGNIZED','DependentOn','_threadCommentModel','payload','27735ghEWus','Solve','/list','IConfigService','post','YYYY/MM/DD\x20HH:mm','customRanges','body','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','saveCommentToSnapshot','UniverLicensePlugin','UniverThreadCommentDataSourcePlugin','/edit','filter','OpenOrReOpen','replies','dayjs','/reply','comments','defineProperty','addComment','unitId','solved','Disposable','9669471eyOWPN','parentId','threadId','ref','@univerjs/core','syncUpdateMutationToColla','toStringTag','rangeType','slice','_initDataSource','_init','_configService','943945LlJAOd','parse','Delete','createTimestamp','_threadCommentDataSource','addUser','UniverCollaborationClientPlugin','_config','Unknown','_userService','UniverInstanceType','setConfig','userID','Solved','find','/solved','onStarting','requireSession','_commentService','131659TGlPdM','length','updateComment','Plugin','pipe','content','CommentService','resolveComment','@univerjs-pro/collaboration-client','HTTPService','Inject','listComments','resolved','getUser','520CSoAQY','getComment','_initUserSync','/delete','get','root','values','10tqSeqC','rxjs','_httpService','18682576ksdtUi','disposeWithMe','6lkmRjm','Add','user','7442080kkmlmr','thread-comment-data-source.config','/universer-api/comment/unit/','Reply'];_0x13fd=function(){return _0x2468f4;};return _0x13fd();}(function(_0x5dc8b8,_0x272859){const _0x144857=_0x4b25,_0x3b8c4d=_0x5dc8b8();while(!![]){try{const _0x4a1d52=-parseInt(_0x144857(0xfa))/0x1*(parseInt(_0x144857(0x10f))/0x2)+-parseInt(_0x144857(0x142))/0x3*(parseInt(_0x144857(0x108))/0x4)+-parseInt(_0x144857(0xe7))/0x5*(-parseInt(_0x144857(0x114))/0x6)+-parseInt(_0x144857(0xdb))/0x7+parseInt(_0x144857(0x117))/0x8+parseInt(_0x144857(0x12c))/0x9*(parseInt(_0x144857(0x137))/0xa)+parseInt(_0x144857(0x112))/0xb*(parseInt(_0x144857(0x121))/0xc);if(_0x4a1d52===_0x272859)break;else _0x3b8c4d['push'](_0x3b8c4d['shift']());}catch(_0x10b08b){_0x3b8c4d['push'](_0x3b8c4d['shift']());}}}(_0x13fd,0xb1a92));Object[_0x32f557(0xd6)](exports,Symbol[_0x32f557(0xe1)],{'value':'Module'});const b=require(_0x32f557(0x102)),T=require(_0x32f557(0x139)),c=require(_0x32f557(0xdf)),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require(_0x32f557(0x110)),P=require(_0x32f557(0x11e)),U=_0x32f557(0xcb);var I=(_0x22f456=>(_0x22f456[_0x22f456[_0x32f557(0xd1)]=0x0]=_0x32f557(0xd1),_0x22f456[_0x22f456[_0x32f557(0xf4)]=0x1]=_0x32f557(0xf4),_0x22f456[_0x22f456[_0x32f557(0x13e)]=-0x1]=_0x32f557(0x13e),_0x22f456))(I||{}),v=(_0x1345bc=>(_0x1345bc[_0x1345bc[_0x32f557(0xef)]=0x0]='Unknown',_0x1345bc[_0x1345bc[_0x32f557(0x115)]=0x1]=_0x32f557(0x115),_0x1345bc[_0x1345bc['Reply']=0x2]='Reply',_0x1345bc[_0x1345bc[_0x32f557(0x11b)]=0x3]=_0x32f557(0x11b),_0x1345bc[_0x1345bc['Delete']=0x4]=_0x32f557(0xe9),_0x1345bc[_0x1345bc['Solve']=0x5]=_0x32f557(0x143),_0x1345bc[_0x1345bc[_0x32f557(0x13e)]=-0x1]='UNRECOGNIZED',_0x1345bc))(v||{});const f=_0x13f110=>c[_0x32f557(0xd3)](new Date(+_0x13f110))[_0x32f557(0x134)](_0x32f557(0xc8)),R=async(_0x538661,_0xc90266)=>{const _0x390e25=_0x32f557,_0x610b00=_0x538661[_0x390e25(0x10c)](c[_0x390e25(0x132)]),_0x2a9214=_0x538661[_0x390e25(0x10c)](P[_0x390e25(0x103)]);_0xc90266[_0x390e25(0x135)](_0x32c8fd=>{const _0x3fd1d8=_0x390e25;_0x610b00[_0x3fd1d8(0x107)](_0x32c8fd)&&_0xc90266['delete'](_0x32c8fd);}),_0xc90266[_0x390e25(0x128)]&&(await _0x2a9214['get']('/universer-api/user/list',{'params':{'userIDs':[..._0xc90266]}}))['body'][_0x390e25(0x124)]['forEach'](_0x5c363d=>{const _0x49d0da=_0x390e25;_0x5c363d&&_0x610b00[_0x49d0da(0xec)](_0x5c363d);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x42e747,_0x3c628b,_0x180ffd,_0x442bc2)=>{const _0x49755e=_0x32f557;for(var _0x8e16e0=_0x442bc2>0x1?void 0x0:_0x442bc2?$(_0x3c628b,_0x180ffd):_0x3c628b,_0x4fa8d5=_0x42e747[_0x49755e(0xfb)]-0x1,_0xa83c72;_0x4fa8d5>=0x0;_0x4fa8d5--)(_0xa83c72=_0x42e747[_0x4fa8d5])&&(_0x8e16e0=_0xa83c72(_0x8e16e0)||_0x8e16e0);return _0x8e16e0;},S=(_0x219ca0,_0x1a06f2)=>(_0x3a7cb9,_0x17a6e1)=>_0x1a06f2(_0x3a7cb9,_0x17a6e1,_0x219ca0);let p=class extends c[_0x32f557(0xda)]{constructor(_0x4e9429,_0x12fa65,_0x5255a2,_0x249a8a){const _0x4bfa53=_0x32f557;super(),this[_0x4bfa53(0xf9)]=_0x4e9429,this[_0x4bfa53(0x140)]=_0x12fa65,this[_0x4bfa53(0xf0)]=_0x5255a2,this[_0x4bfa53(0x12a)]=_0x249a8a,this[_0x4bfa53(0xe5)](),this[_0x4bfa53(0x10a)]();}['_initUserSync'](){const _0x59684c=_0x32f557;this['disposeWithMe'](this[_0x59684c(0x140)]['commentUpdate$'][_0x59684c(0xfe)](w[_0x59684c(0x13c)](0x10))['subscribe'](_0x2812fe=>{const _0x7bbcfe=_0x59684c,_0x12af50=new Set();_0x2812fe[_0x7bbcfe(0x135)](_0x57ba84=>{const _0x46236d=_0x7bbcfe;switch(_0x57ba84['type']){case'add':{const _0x2e43f6=_0x57ba84[_0x46236d(0x141)]['personId'];_0x12af50[_0x46236d(0x126)](_0x2e43f6);break;}}}),R(this['_injector'],_0x12af50);}));}['_init'](){const _0x1a6bbe=_0x32f557;this[_0x1a6bbe(0x113)](this['_commentService'][_0x1a6bbe(0x11c)]['subscribe'](async _0x54faf6=>{const _0x385769=_0x1a6bbe;var _0x49a190,_0x434e94,_0xf6ded6,_0x1b679b;const _0x4ad70c=(_0x49a190=this[_0x385769(0x140)][_0x385769(0x13b)](_0x54faf6[_0x385769(0xd8)])[_0x385769(0xf5)](_0x151c0e=>_0x151c0e[_0x385769(0xdd)]===_0x54faf6[_0x385769(0xdd)]))==null?void 0x0:_0x49a190[_0x385769(0x10d)];if(!_0x4ad70c)return;const {unitId:_0x20297d,subUnitId:_0x5dc6e2}=_0x4ad70c;switch(_0x54faf6['user']&&this[_0x385769(0xf0)][_0x385769(0xec)](_0x54faf6[_0x385769(0x116)]),_0x54faf6[_0x385769(0x12b)]){case v['Add']:break;case v[_0x385769(0x11a)]:{this[_0x385769(0x140)][_0x385769(0xd7)](_0x20297d,_0x5dc6e2,{'unitId':_0x20297d,'subUnitId':_0x5dc6e2,'ref':'','id':_0x54faf6['replyId'],'dT':f(+_0x54faf6[_0x385769(0xea)]),'threadId':_0x54faf6['threadId'],'personId':(_0xf6ded6=(_0x434e94=_0x54faf6[_0x385769(0x116)])==null?void 0x0:_0x434e94[_0x385769(0xf3)])!=null?_0xf6ded6:_0x54faf6[_0x385769(0x120)],'text':JSON[_0x385769(0xe8)](_0x54faf6[_0x385769(0xff)]),'parentId':_0x4ad70c['id']});break;}case v[_0x385769(0xe9)]:{const _0x4b042c=this[_0x385769(0x140)][_0x385769(0x109)](_0x20297d,_0x5dc6e2,_0x54faf6[_0x385769(0x122)]);_0x4b042c&&_0x4b042c[_0x385769(0xdc)]&&this[_0x385769(0x140)][_0x385769(0x131)](_0x20297d,_0x5dc6e2,_0x54faf6['replyId']);break;}case v['Edit']:{this['_threadCommentModel'][_0x385769(0xfc)](_0x20297d,_0x5dc6e2,{'commentId':_0x54faf6[_0x385769(0x122)],'text':JSON[_0x385769(0xe8)](_0x54faf6[_0x385769(0xff)])});break;}case v['Solve']:{const _0x33d002=(_0x1b679b=this['_threadCommentModel'][_0x385769(0x13b)](_0x54faf6['unitId'])[_0x385769(0xf5)](_0x5d53f0=>_0x5d53f0[_0x385769(0xdd)]===_0x54faf6['threadId']))==null?void 0x0:_0x1b679b[_0x385769(0x10d)];_0x33d002&&this[_0x385769(0x140)][_0x385769(0x101)](_0x20297d,_0x5dc6e2,_0x33d002['id'],_0x54faf6[_0x385769(0xd9)]===I[_0x385769(0xf4)]);break;}}}));}};p=E([S(0x0,c[_0x32f557(0x104)](b[_0x32f557(0x100)])),S(0x1,c[_0x32f557(0x104)](M['ThreadCommentModel'])),S(0x2,c[_0x32f557(0x104)](c[_0x32f557(0x132)])),S(0x3,c[_0x32f557(0x104)](c['Injector']))],p);function _0x4b25(_0x2c88b1,_0x746f91){const _0x13fdd2=_0x13fd();return _0x4b25=function(_0x4b2570,_0x2dc614){_0x4b2570=_0x4b2570-0xc7;let _0x36478e=_0x13fdd2[_0x4b2570];return _0x36478e;},_0x4b25(_0x2c88b1,_0x746f91);}const q=_0x32f557(0x118),D={};var A=Object[_0x32f557(0x13a)],x=(_0x5487c8,_0x571ec9,_0x4e5be7,_0x374aa6)=>{const _0x1db4ce=_0x32f557;for(var _0x114206=_0x374aa6>0x1?void 0x0:_0x374aa6?A(_0x571ec9,_0x4e5be7):_0x571ec9,_0x414cc0=_0x5487c8[_0x1db4ce(0xfb)]-0x1,_0x14279a;_0x414cc0>=0x0;_0x414cc0--)(_0x14279a=_0x5487c8[_0x414cc0])&&(_0x114206=_0x14279a(_0x114206)||_0x114206);return _0x114206;},_=(_0x225e92,_0x5354df)=>(_0x4d3044,_0xd7835d)=>_0x5354df(_0x4d3044,_0xd7835d,_0x225e92);function Y(_0x1141e7,_0xe4c749){const _0x1718e5=_0x32f557,_0x44333f=_0x1141e7[_0x1718e5(0xd2)][0x0];return{..._0xe4c749,'id':_0x44333f['replyId'],'resolved':_0x1141e7[_0x1718e5(0xd9)]===0x1,'dT':f(_0x44333f['createTimestamp']),'personId':_0x44333f[_0x1718e5(0x120)],'threadId':_0x44333f['threadId']};}function G(_0x2aae39,_0x579d93,_0x16b547){const _0xe33351=_0x32f557;var _0x209a69,_0x17ced7;if(((_0x17ced7=(_0x209a69=_0x2aae39==null?void 0x0:_0x2aae39[_0xe33351(0xd2)])==null?void 0x0:_0x209a69[_0xe33351(0xfb)])!=null?_0x17ced7:0x0)>0x0){const _0x5f357f=(_0x3dd822,_0x26c98c)=>({'id':_0x3dd822[_0xe33351(0x122)],'threadId':_0x3dd822['threadId'],'dT':f(_0x3dd822['createTimestamp']),'personId':_0x3dd822[_0xe33351(0x120)],'resolved':_0x2aae39[_0xe33351(0xd9)]===I[_0xe33351(0xf4)],'unitId':_0x579d93,'subUnitId':_0x16b547,'text':JSON[_0xe33351(0xe8)](_0x3dd822[_0xe33351(0xff)]),'parentId':_0x26c98c}),_0x58fb0a=_0x5f357f(_0x2aae39[_0xe33351(0xd2)][0x0]);return{..._0x58fb0a,'children':_0x2aae39[_0xe33351(0xd2)][_0xe33351(0xe3)](0x1)[_0xe33351(0x11f)](_0x4ec89b=>_0x5f357f(_0x4ec89b,_0x58fb0a['id']))};}return null;}let g=class{constructor(_0x1df2fc,_0x3eda06,_0x4b0a9a,_0x2b8f98){const _0x386364=_0x32f557;this[_0x386364(0x111)]=_0x1df2fc,this[_0x386364(0xf0)]=_0x3eda06,this['_sessionService']=_0x4b0a9a,this['_injector']=_0x2b8f98;}async[_0x32f557(0xd7)](_0x511a61){const _0x1199c0=_0x32f557;var _0x447616,_0x306039;const {parentId:_0x2954c1,unitId:_0x203ad6,text:_0xe2543a,threadId:_0x56b6e1}=_0x511a61,_0x5772c4=(_0x306039=(_0x447616=_0xe2543a['customRanges'])==null?void 0x0:_0x447616[_0x1199c0(0xd0)](_0x54ce6b=>_0x54ce6b[_0x1199c0(0xe2)]===c[_0x1199c0(0x13d)][_0x1199c0(0x130)])[_0x1199c0(0x11f)](_0x4f6d1f=>_0x4f6d1f[_0x1199c0(0x138)]))!=null?_0x306039:[],_0x10f226=JSON['stringify'](_0xe2543a),_0x2bf0b8=(await this[_0x1199c0(0x125)][_0x1199c0(0xf8)](_0x203ad6))[_0x1199c0(0x136)]();if(_0x2954c1){const _0x5b6a02={'memberId':_0x2bf0b8,'unitId':_0x203ad6,'content':_0x10f226,'mention':_0x5772c4,'threadId':_0x56b6e1},_0x2f6e1a=(await this[_0x1199c0(0x111)]['post'](_0x1199c0(0x119)+_0x203ad6+_0x1199c0(0xd4),{'body':_0x5b6a02}))['body']['reply'];return{..._0x511a61,'id':_0x2f6e1a[_0x1199c0(0x122)],'dT':c['dayjs'](+_0x2f6e1a[_0x1199c0(0xea)])[_0x1199c0(0x134)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2f6e1a[_0x1199c0(0x120)]};}else{const _0x217117={'memberId':_0x2bf0b8,'unitId':_0x203ad6,'content':_0x10f226,'mention':_0x5772c4},_0x4236e4=await this[_0x1199c0(0x111)][_0x1199c0(0xc7)](_0x1199c0(0x119)+_0x203ad6+'/add',{'body':_0x217117});return Y(_0x4236e4[_0x1199c0(0xca)]['comment'],_0x511a61);}}async[_0x32f557(0xfc)](_0x179512){const _0x639026=_0x32f557;var _0x4adeec,_0x2f55a0;const {text:_0xada0b7,unitId:_0x4e88e8}=_0x179512,_0x9afe61=(_0x2f55a0=(_0x4adeec=_0xada0b7[_0x639026(0xc9)])==null?void 0x0:_0x4adeec['filter'](_0x5d369c=>_0x5d369c[_0x639026(0xe2)]===c[_0x639026(0x13d)][_0x639026(0x130)])[_0x639026(0x11f)](_0x5e155b=>_0x5e155b[_0x639026(0x138)]))!=null?_0x2f55a0:[],_0x313f36=JSON['stringify'](_0xada0b7),_0x41131c=_0x179512[_0x639026(0xdd)],_0x25fcdc=_0x179512['id'],_0x585109={'memberId':(await this[_0x639026(0x125)][_0x639026(0xf8)](_0x4e88e8))[_0x639026(0x136)](),'unitId':_0x4e88e8,'threadId':_0x41131c,'mention':_0x9afe61,'content':_0x313f36,'replyId':_0x25fcdc},_0x1a5b8f=await this[_0x639026(0x111)][_0x639026(0xc7)](_0x639026(0x119)+_0x4e88e8+_0x639026(0xcf),{'body':_0x585109});return!_0x1a5b8f[_0x639026(0xca)]['error']||_0x1a5b8f['body'][_0x639026(0x12d)][_0x639026(0x133)]===0x1;}async['resolveComment'](_0xbc916a){const _0x2d6a67=_0x32f557,{unitId:_0x554a3a}=_0xbc916a,_0x54175a=_0xbc916a[_0x2d6a67(0xdd)],_0x3c28af={'memberId':this[_0x2d6a67(0xf0)]['getCurrentUser']()[_0x2d6a67(0xf3)],'unitId':_0x554a3a,'threadId':_0x54175a,'solved':_0xbc916a[_0x2d6a67(0x106)]?I[_0x2d6a67(0xf4)]:I[_0x2d6a67(0xd1)]},_0x1d7c2d=await this[_0x2d6a67(0x111)][_0x2d6a67(0xc7)](_0x2d6a67(0x119)+_0x554a3a+_0x2d6a67(0xf6),{'body':_0x3c28af});return!_0x1d7c2d['body'][_0x2d6a67(0x12d)]||_0x1d7c2d[_0x2d6a67(0xca)]['error'][_0x2d6a67(0x133)]===0x1;}async['deleteComment'](_0x35ddda,_0x531139,_0x1bfbc3,_0x56a748){const _0x33db51=_0x32f557,_0x1b6ba9={'memberId':(await this[_0x33db51(0x125)][_0x33db51(0xf8)](_0x35ddda))['getMemberID'](),'threadId':_0x1bfbc3,'replyId':_0x56a748,'unitId':_0x35ddda},_0x36659e=await this[_0x33db51(0x111)]['post'](_0x33db51(0x119)+_0x35ddda+_0x33db51(0x10b),{'body':_0x1b6ba9});return!_0x36659e[_0x33db51(0xca)][_0x33db51(0x12d)]||_0x36659e[_0x33db51(0xca)][_0x33db51(0x12d)]['code']===0x1;}async[_0x32f557(0x105)](_0xd350fd,_0x322e4e,_0x2f7e7c){const _0x40405f=_0x32f557,_0x39aca1={'unitId':_0xd350fd,'threadId':_0x2f7e7c},_0x551d5a=await this[_0x40405f(0x111)][_0x40405f(0xc7)](_0x40405f(0x119)+_0xd350fd+_0x40405f(0x144),{'body':_0x39aca1}),_0x338c52=_0x2f7e7c[_0x40405f(0x11f)](_0x11d877=>G(_0x551d5a['body'][_0x40405f(0xd5)][_0x11d877],_0xd350fd,_0x322e4e))[_0x40405f(0xd0)](Boolean);return Object[_0x40405f(0x10e)](_0x551d5a[_0x40405f(0xca)]['users'])[_0x40405f(0x135)](_0x5ee923=>{const _0x427a9f=_0x40405f;this[_0x427a9f(0xf0)][_0x427a9f(0xec)](_0x5ee923);}),_0x338c52;}[_0x32f557(0xcc)](_0x5aa4f5){const _0x4dc6ad=_0x32f557;return{'id':_0x5aa4f5['id'],'threadId':_0x5aa4f5['threadId'],'ref':_0x5aa4f5[_0x4dc6ad(0xde)]};}};g=x([_(0x0,c['Inject'](P[_0x32f557(0x103)])),_(0x1,c[_0x32f557(0x104)](c[_0x32f557(0x132)])),_(0x2,c[_0x32f557(0x104)](b['CollaborationSessionService'])),_(0x3,c[_0x32f557(0x104)](c[_0x32f557(0x11d)]))],g);var H=Object[_0x32f557(0x13a)],J=(_0x2aee28,_0x35baf8,_0x48d8d8,_0x3fdd78)=>{const _0x2eafb1=_0x32f557;for(var _0x3ac55c=_0x3fdd78>0x1?void 0x0:_0x3fdd78?H(_0x35baf8,_0x48d8d8):_0x35baf8,_0x49472e=_0x2aee28[_0x2eafb1(0xfb)]-0x1,_0x4a95d1;_0x49472e>=0x0;_0x49472e--)(_0x4a95d1=_0x2aee28[_0x49472e])&&(_0x3ac55c=_0x4a95d1(_0x3ac55c)||_0x3ac55c);return _0x3ac55c;},y=(_0x15d57b,_0x7a458b)=>(_0x43bc47,_0x2d3ba9)=>_0x7a458b(_0x43bc47,_0x2d3ba9,_0x15d57b);let C=class extends c['Disposable']{constructor(_0x3509d3,_0x2de376){const _0x3a4098=_0x32f557;super(),this[_0x3a4098(0x12f)]=_0x3509d3,this['_threadCommentDataSource']=_0x2de376,this[_0x3a4098(0xe4)]();}[_0x32f557(0xe4)](){const _0x368f0b=_0x32f557;this[_0x368f0b(0x12f)][_0x368f0b(0x129)]=this[_0x368f0b(0xeb)],this[_0x368f0b(0x12f)][_0x368f0b(0xe0)]=!0x1;}};C=J([y(0x0,M[_0x32f557(0x123)]),y(0x1,c[_0x32f557(0x104)](g))],C);var F=Object[_0x32f557(0xd6)],L=Object['getOwnPropertyDescriptor'],Z=(_0xd22c46,_0x5741ac,_0x4d2abc)=>_0x5741ac in _0xd22c46?F(_0xd22c46,_0x5741ac,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4d2abc}):_0xd22c46[_0x5741ac]=_0x4d2abc,W=(_0x365e7e,_0x45bea9,_0xbc6050,_0x5987ed)=>{const _0x538f0d=_0x32f557;for(var _0x174daf=_0x5987ed>0x1?void 0x0:_0x5987ed?L(_0x45bea9,_0xbc6050):_0x45bea9,_0x25cbc0=_0x365e7e[_0x538f0d(0xfb)]-0x1,_0x1f673b;_0x25cbc0>=0x0;_0x25cbc0--)(_0x1f673b=_0x365e7e[_0x25cbc0])&&(_0x174daf=_0x1f673b(_0x174daf)||_0x174daf);return _0x174daf;},O=(_0x510576,_0xa8b207)=>(_0x487b64,_0x16a677)=>_0xa8b207(_0x487b64,_0x16a677,_0x510576),N=(_0x5da3e5,_0x10d5fc,_0x573761)=>Z(_0x5da3e5,typeof _0x10d5fc!='symbol'?_0x10d5fc+'':_0x10d5fc,_0x573761);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x32f557(0xfd)]{constructor(_0x303c1b=D,_0xac886b,_0x3632b5){const _0x2d8ec1=_0x32f557;super(),this[_0x2d8ec1(0xee)]=_0x303c1b,this[_0x2d8ec1(0x12a)]=_0xac886b,this['_configService']=_0x3632b5;const {..._0x3146f4}=c['merge']({},D,this[_0x2d8ec1(0xee)]);this[_0x2d8ec1(0xe6)][_0x2d8ec1(0xf2)](q,_0x3146f4);}[_0x32f557(0xf7)](){const _0x2be033=_0x32f557;[[g],[C],[p]][_0x2be033(0x135)](_0x2af829=>{const _0x35ad4e=_0x2be033;this[_0x35ad4e(0x12a)]['add'](_0x2af829);});}[_0x32f557(0x127)](){const _0x4850f3=_0x32f557;this[_0x4850f3(0x12a)][_0x4850f3(0x10c)](C),this[_0x4850f3(0x12a)][_0x4850f3(0x10c)](p);}},N(exports[_0x32f557(0xce)],'pluginName',U),N(exports[_0x32f557(0xce)],_0x32f557(0x12b),c[_0x32f557(0xf1)]['UNIVER_UNKNOWN']),exports[_0x32f557(0xce)]=W([c[_0x32f557(0x13f)](j[_0x32f557(0x12e)],b[_0x32f557(0xed)],T[_0x32f557(0xcd)]),O(0x1,c[_0x32f557(0x104)](c['Injector'])),O(0x2,c[_0x32f557(0x145)])],exports[_0x32f557(0xce)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x8eb16d=_0xa644;(function(_0x26f565,_0x4a5003){const _0x54cbc0=_0xa644,_0x11892c=_0x26f565();while(!![]){try{const _0x4e8a81=-parseInt(_0x54cbc0(0x181))/0x1*(parseInt(_0x54cbc0(0x1c4))/0x2)+-parseInt(_0x54cbc0(0x19a))/0x3*(-parseInt(_0x54cbc0(0x16b))/0x4)+parseInt(_0x54cbc0(0x176))/0x5+parseInt(_0x54cbc0(0x16e))/0x6*(-parseInt(_0x54cbc0(0x1a9))/0x7)+parseInt(_0x54cbc0(0x194))/0x8+-parseInt(_0x54cbc0(0x177))/0x9+parseInt(_0x54cbc0(0x1a7))/0xa;if(_0x4e8a81===_0x4a5003)break;else _0x11892c['push'](_0x11892c['shift']());}catch(_0x47526e){_0x11892c['push'](_0x11892c['shift']());}}}(_0x118a,0x2f9ea));import{CommentService as _0x1ccc3b,CollaborationSessionService as _0x3d3196,UniverCollaborationClientPlugin as _0x2caa97}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xe51017}from'@univerjs-pro/license';import{dayjs as _0x5eb8ae,UserManagerService as _0x4ba4f5,Inject as _0xdc24c4,Injector as _0x446729,Disposable as _0x4f817d,CustomRangeType as _0x19605a,UniverInstanceType as _0x20c5bd,DependentOn as _0x5aa5bd,IConfigService as _0x17f2a0,Plugin as _0x1d9dc9,merge as _0x147312}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x24bb62}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5c51a6,IThreadCommentDataSourceService as _0x1004f0}from'@univerjs/thread-comment';import{bufferTime as _0x200bd8}from'rxjs';import{HTTPService as _0x40e085}from'@univerjs/network';const W=_0x8eb16d(0x180);var I=(_0x4ed037=>(_0x4ed037[_0x4ed037[_0x8eb16d(0x1a2)]=0x0]='OpenOrReOpen',_0x4ed037[_0x4ed037[_0x8eb16d(0x1ce)]=0x1]=_0x8eb16d(0x1ce),_0x4ed037[_0x4ed037[_0x8eb16d(0x191)]=-0x1]='UNRECOGNIZED',_0x4ed037))(I||{}),v=(_0x4bf901=>(_0x4bf901[_0x4bf901[_0x8eb16d(0x192)]=0x0]=_0x8eb16d(0x192),_0x4bf901[_0x4bf901[_0x8eb16d(0x17e)]=0x1]=_0x8eb16d(0x17e),_0x4bf901[_0x4bf901['Reply']=0x2]='Reply',_0x4bf901[_0x4bf901[_0x8eb16d(0x17d)]=0x3]=_0x8eb16d(0x17d),_0x4bf901[_0x4bf901['Delete']=0x4]=_0x8eb16d(0x1b7),_0x4bf901[_0x4bf901[_0x8eb16d(0x197)]=0x5]=_0x8eb16d(0x197),_0x4bf901[_0x4bf901[_0x8eb16d(0x191)]=-0x1]=_0x8eb16d(0x191),_0x4bf901))(v||{});function _0x118a(){const _0x46d758=['6329fRKInW','syncUpdateMutationToColla','solved','parentId','customRanges','getMemberID','get','ref','saveCommentToSnapshot','_initUserSync','error','replyId','COMMENT','size','_threadCommentDataSource','length','UNRECOGNIZED','Unknown','userId','1711568NOOgTA','pipe','dataSource','Solve','getUser','content','3RcYeMr','_init','commentUpdate$','subscribe','/add','_config','setConfig','updateComment','OpenOrReOpen','user','getComment','symbol','add','4622420jpGjrG','body','1059730qnvOdn','payload','type','_httpService','createTimestamp','onStarting','userID','filter','root','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','_initDataSource','unitId','find','Delete','deleteComment','pluginName','reply','parse','Reply','defineProperty','_sessionService','_injector','UNIVER_UNKNOWN','post','/delete','/universer-api/user/list','56oJQoaw','threadId','/universer-api/comment/unit/','/list','forEach','listComments','users','_userService','map','values','Solved','replies','116868tYUBEI','_threadCommentModel','getCurrentUser','6dqmWOu','resolveComment','rangeId','addComment','_commentService','stringify','/solved','addUser','1028480wZfnXW','3487041OtjmXa','requireSession','getOwnPropertyDescriptor','getUnit','disposeWithMe','code','Edit','Add','onReady','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'];_0x118a=function(){return _0x46d758;};return _0x118a();}const D=_0x142eb4=>_0x5eb8ae(new Date(+_0x142eb4))['format'](_0x8eb16d(0x1b2)),B=async(_0x342391,_0x1ee11b)=>{const _0x3a57ee=_0x8eb16d,_0x30d120=_0x342391[_0x3a57ee(0x187)](_0x4ba4f5),_0xa4e10e=_0x342391[_0x3a57ee(0x187)](_0x40e085);_0x1ee11b[_0x3a57ee(0x1c8)](_0xf2ed1d=>{const _0x25ad56=_0x3a57ee;_0x30d120[_0x25ad56(0x198)](_0xf2ed1d)&&_0x1ee11b['delete'](_0xf2ed1d);}),_0x1ee11b[_0x3a57ee(0x18e)]&&(await _0xa4e10e[_0x3a57ee(0x187)](_0x3a57ee(0x1c3),{'params':{'userIDs':[..._0x1ee11b]}}))[_0x3a57ee(0x1a8)][_0x3a57ee(0x1ca)]['forEach'](_0x3019f4=>{const _0x281dd2=_0x3a57ee;_0x3019f4&&_0x30d120[_0x281dd2(0x175)](_0x3019f4);});};var K=Object[_0x8eb16d(0x179)],V=(_0x3c5927,_0x5460f6,_0x354784,_0x17d86c)=>{for(var _0x58200e=_0x17d86c>0x1?void 0x0:_0x17d86c?K(_0x5460f6,_0x354784):_0x5460f6,_0x5be380=_0x3c5927['length']-0x1,_0x4f4b0b;_0x5be380>=0x0;_0x5be380--)(_0x4f4b0b=_0x3c5927[_0x5be380])&&(_0x58200e=_0x4f4b0b(_0x58200e)||_0x58200e);return _0x58200e;},p=(_0x404226,_0x10b535)=>(_0x5efc4f,_0x5a6ec1)=>_0x10b535(_0x5efc4f,_0x5a6ec1,_0x404226);let S=class extends _0x4f817d{constructor(_0x3cb562,_0x2ffe30,_0x1dd3ff,_0x57a9dc){const _0x206d68=_0x8eb16d;super(),this['_commentService']=_0x3cb562,this[_0x206d68(0x16c)]=_0x2ffe30,this['_userService']=_0x1dd3ff,this['_injector']=_0x57a9dc,this[_0x206d68(0x19b)](),this[_0x206d68(0x18a)]();}[_0x8eb16d(0x18a)](){const _0x389b82=_0x8eb16d;this[_0x389b82(0x17b)](this[_0x389b82(0x16c)]['commentUpdate$'][_0x389b82(0x195)](_0x200bd8(0x10))[_0x389b82(0x19d)](_0x1eff56=>{const _0x486510=_0x389b82,_0xa1cf08=new Set();_0x1eff56[_0x486510(0x1c8)](_0x377008=>{const _0x1c4306=_0x486510;switch(_0x377008[_0x1c4306(0x1ab)]){case _0x1c4306(0x1a6):{const _0x5e5b80=_0x377008[_0x1c4306(0x1aa)]['personId'];_0xa1cf08[_0x1c4306(0x1a6)](_0x5e5b80);break;}}}),B(this[_0x486510(0x1bf)],_0xa1cf08);}));}['_init'](){const _0x4cb971=_0x8eb16d;this['disposeWithMe'](this[_0x4cb971(0x172)][_0x4cb971(0x19c)][_0x4cb971(0x19d)](async _0x80891f=>{const _0x27846d=_0x4cb971;var _0x2c0708,_0x16aaed,_0x1dbd4f,_0x479cc1;const _0xe01919=(_0x2c0708=this[_0x27846d(0x16c)][_0x27846d(0x17a)](_0x80891f['unitId'])[_0x27846d(0x1b6)](_0x17b8ca=>_0x17b8ca[_0x27846d(0x1c5)]===_0x80891f[_0x27846d(0x1c5)]))==null?void 0x0:_0x2c0708[_0x27846d(0x1b1)];if(!_0xe01919)return;const {unitId:_0x24c545,subUnitId:_0x506b4d}=_0xe01919;switch(_0x80891f['user']&&this[_0x27846d(0x1cb)]['addUser'](_0x80891f[_0x27846d(0x1a3)]),_0x80891f[_0x27846d(0x1ab)]){case v[_0x27846d(0x17e)]:break;case v[_0x27846d(0x1bc)]:{this[_0x27846d(0x16c)][_0x27846d(0x171)](_0x24c545,_0x506b4d,{'unitId':_0x24c545,'subUnitId':_0x506b4d,'ref':'','id':_0x80891f[_0x27846d(0x18c)],'dT':D(+_0x80891f[_0x27846d(0x1ad)]),'threadId':_0x80891f[_0x27846d(0x1c5)],'personId':(_0x1dbd4f=(_0x16aaed=_0x80891f[_0x27846d(0x1a3)])==null?void 0x0:_0x16aaed['userID'])!=null?_0x1dbd4f:_0x80891f['userId'],'text':JSON[_0x27846d(0x1bb)](_0x80891f['content']),'parentId':_0xe01919['id']});break;}case v[_0x27846d(0x1b7)]:{const _0x121518=this['_threadCommentModel'][_0x27846d(0x1a4)](_0x24c545,_0x506b4d,_0x80891f[_0x27846d(0x18c)]);_0x121518&&_0x121518[_0x27846d(0x184)]&&this[_0x27846d(0x16c)][_0x27846d(0x1b8)](_0x24c545,_0x506b4d,_0x80891f[_0x27846d(0x18c)]);break;}case v[_0x27846d(0x17d)]:{this[_0x27846d(0x16c)][_0x27846d(0x1a1)](_0x24c545,_0x506b4d,{'commentId':_0x80891f[_0x27846d(0x18c)],'text':JSON['parse'](_0x80891f[_0x27846d(0x199)])});break;}case v[_0x27846d(0x197)]:{const _0x52d86e=(_0x479cc1=this[_0x27846d(0x16c)]['getUnit'](_0x80891f[_0x27846d(0x1b5)])[_0x27846d(0x1b6)](_0x3f9878=>_0x3f9878[_0x27846d(0x1c5)]===_0x80891f[_0x27846d(0x1c5)]))==null?void 0x0:_0x479cc1[_0x27846d(0x1b1)];_0x52d86e&&this[_0x27846d(0x16c)]['resolveComment'](_0x24c545,_0x506b4d,_0x52d86e['id'],_0x80891f[_0x27846d(0x183)]===I[_0x27846d(0x1ce)]);break;}}}));}};S=V([p(0x0,_0xdc24c4(_0x1ccc3b)),p(0x1,_0xdc24c4(_0x5c51a6)),p(0x2,_0xdc24c4(_0x4ba4f5)),p(0x3,_0xdc24c4(_0x446729))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x17c693,_0x4d23a6,_0x2984df,_0xa31c13)=>{for(var _0xdc3e2d=_0xa31c13>0x1?void 0x0:_0xa31c13?k(_0x4d23a6,_0x2984df):_0x4d23a6,_0x36cdd9=_0x17c693['length']-0x1,_0x54f304;_0x36cdd9>=0x0;_0x36cdd9--)(_0x54f304=_0x17c693[_0x36cdd9])&&(_0xdc3e2d=_0x54f304(_0xdc3e2d)||_0xdc3e2d);return _0xdc3e2d;},_=(_0xe4c82f,_0x57f10e)=>(_0x16a164,_0x55a361)=>_0x57f10e(_0x16a164,_0x55a361,_0xe4c82f);function X(_0x5d0474,_0x1f2072){const _0x1b1af5=_0x8eb16d,_0x4ec919=_0x5d0474[_0x1b1af5(0x16a)][0x0];return{..._0x1f2072,'id':_0x4ec919['replyId'],'resolved':_0x5d0474[_0x1b1af5(0x183)]===0x1,'dT':D(_0x4ec919[_0x1b1af5(0x1ad)]),'personId':_0x4ec919['userId'],'threadId':_0x4ec919[_0x1b1af5(0x1c5)]};}function ee(_0x1dc058,_0x1d33a1,_0x4a29b8){const _0x3e4429=_0x8eb16d;var _0x16905e,_0x380e3e;if(((_0x380e3e=(_0x16905e=_0x1dc058==null?void 0x0:_0x1dc058[_0x3e4429(0x16a)])==null?void 0x0:_0x16905e[_0x3e4429(0x190)])!=null?_0x380e3e:0x0)>0x0){const _0x12a6fc=(_0x26be21,_0x102ff0)=>({'id':_0x26be21[_0x3e4429(0x18c)],'threadId':_0x26be21[_0x3e4429(0x1c5)],'dT':D(_0x26be21['createTimestamp']),'personId':_0x26be21[_0x3e4429(0x193)],'resolved':_0x1dc058[_0x3e4429(0x183)]===I['Solved'],'unitId':_0x1d33a1,'subUnitId':_0x4a29b8,'text':JSON[_0x3e4429(0x1bb)](_0x26be21[_0x3e4429(0x199)]),'parentId':_0x102ff0}),_0xa1c339=_0x12a6fc(_0x1dc058[_0x3e4429(0x16a)][0x0]);return{..._0xa1c339,'children':_0x1dc058[_0x3e4429(0x16a)]['slice'](0x1)['map'](_0x4353c8=>_0x12a6fc(_0x4353c8,_0xa1c339['id']))};}return null;}let f=class{constructor(_0xd527d1,_0x7b2f99,_0x5854ac,_0x43c529){const _0x16cda7=_0x8eb16d;this[_0x16cda7(0x1ac)]=_0xd527d1,this['_userService']=_0x7b2f99,this[_0x16cda7(0x1be)]=_0x5854ac,this[_0x16cda7(0x1bf)]=_0x43c529;}async['addComment'](_0x4e7085){const _0x3cabd4=_0x8eb16d;var _0x3d1b7c,_0x559fb9;const {parentId:_0x2ba49e,unitId:_0x460949,text:_0x1deed3,threadId:_0x96e33}=_0x4e7085,_0x3a2114=(_0x559fb9=(_0x3d1b7c=_0x1deed3[_0x3cabd4(0x185)])==null?void 0x0:_0x3d1b7c['filter'](_0x3cee94=>_0x3cee94['rangeType']===_0x19605a[_0x3cabd4(0x18d)])[_0x3cabd4(0x1cc)](_0x570fe8=>_0x570fe8['rangeId']))!=null?_0x559fb9:[],_0x4e9bb1=JSON[_0x3cabd4(0x173)](_0x1deed3),_0xaf8c4=(await this['_sessionService'][_0x3cabd4(0x178)](_0x460949))[_0x3cabd4(0x186)]();if(_0x2ba49e){const _0x3c9c5e={'memberId':_0xaf8c4,'unitId':_0x460949,'content':_0x4e9bb1,'mention':_0x3a2114,'threadId':_0x96e33},_0x7d3202=(await this[_0x3cabd4(0x1ac)][_0x3cabd4(0x1c1)](_0x3cabd4(0x1c6)+_0x460949+'/reply',{'body':_0x3c9c5e}))['body'][_0x3cabd4(0x1ba)];return{..._0x4e7085,'id':_0x7d3202[_0x3cabd4(0x18c)],'dT':_0x5eb8ae(+_0x7d3202[_0x3cabd4(0x1ad)])['format'](_0x3cabd4(0x1b2)),'personId':_0x7d3202['userId']};}else{const _0x4f2575={'memberId':_0xaf8c4,'unitId':_0x460949,'content':_0x4e9bb1,'mention':_0x3a2114},_0x5d5519=await this[_0x3cabd4(0x1ac)]['post'](_0x3cabd4(0x1c6)+_0x460949+_0x3cabd4(0x19e),{'body':_0x4f2575});return X(_0x5d5519[_0x3cabd4(0x1a8)]['comment'],_0x4e7085);}}async[_0x8eb16d(0x1a1)](_0x1d395f){const _0x31ebd5=_0x8eb16d;var _0x68d19,_0x45e08e;const {text:_0x16f826,unitId:_0x3aa872}=_0x1d395f,_0x47db8e=(_0x45e08e=(_0x68d19=_0x16f826[_0x31ebd5(0x185)])==null?void 0x0:_0x68d19[_0x31ebd5(0x1b0)](_0x28b20f=>_0x28b20f['rangeType']===_0x19605a[_0x31ebd5(0x18d)])[_0x31ebd5(0x1cc)](_0x31cdbd=>_0x31cdbd[_0x31ebd5(0x170)]))!=null?_0x45e08e:[],_0x65d2a2=JSON[_0x31ebd5(0x173)](_0x16f826),_0x2bdbe0=_0x1d395f[_0x31ebd5(0x1c5)],_0xfbdfbc=_0x1d395f['id'],_0x51b782={'memberId':(await this[_0x31ebd5(0x1be)][_0x31ebd5(0x178)](_0x3aa872))[_0x31ebd5(0x186)](),'unitId':_0x3aa872,'threadId':_0x2bdbe0,'mention':_0x47db8e,'content':_0x65d2a2,'replyId':_0xfbdfbc},_0x42177c=await this[_0x31ebd5(0x1ac)][_0x31ebd5(0x1c1)](_0x31ebd5(0x1c6)+_0x3aa872+'/edit',{'body':_0x51b782});return!_0x42177c[_0x31ebd5(0x1a8)]['error']||_0x42177c[_0x31ebd5(0x1a8)][_0x31ebd5(0x18b)][_0x31ebd5(0x17c)]===0x1;}async[_0x8eb16d(0x16f)](_0xc6e78){const _0x2cf62b=_0x8eb16d,{unitId:_0x1094dc}=_0xc6e78,_0x3577a6=_0xc6e78[_0x2cf62b(0x1c5)],_0x52d09a={'memberId':this['_userService'][_0x2cf62b(0x16d)]()[_0x2cf62b(0x1af)],'unitId':_0x1094dc,'threadId':_0x3577a6,'solved':_0xc6e78['resolved']?I['Solved']:I[_0x2cf62b(0x1a2)]},_0x4e9c2e=await this[_0x2cf62b(0x1ac)]['post']('/universer-api/comment/unit/'+_0x1094dc+_0x2cf62b(0x174),{'body':_0x52d09a});return!_0x4e9c2e[_0x2cf62b(0x1a8)][_0x2cf62b(0x18b)]||_0x4e9c2e['body'][_0x2cf62b(0x18b)][_0x2cf62b(0x17c)]===0x1;}async[_0x8eb16d(0x1b8)](_0x33b212,_0x495a01,_0x267a16,_0x418271){const _0x8964af=_0x8eb16d,_0x22d066={'memberId':(await this[_0x8964af(0x1be)]['requireSession'](_0x33b212))[_0x8964af(0x186)](),'threadId':_0x267a16,'replyId':_0x418271,'unitId':_0x33b212},_0x1d20bb=await this[_0x8964af(0x1ac)]['post']('/universer-api/comment/unit/'+_0x33b212+_0x8964af(0x1c2),{'body':_0x22d066});return!_0x1d20bb[_0x8964af(0x1a8)][_0x8964af(0x18b)]||_0x1d20bb[_0x8964af(0x1a8)][_0x8964af(0x18b)][_0x8964af(0x17c)]===0x1;}async[_0x8eb16d(0x1c9)](_0x27fe30,_0x4c6d96,_0xfce698){const _0x323c5f=_0x8eb16d,_0x2f967c={'unitId':_0x27fe30,'threadId':_0xfce698},_0xbcffa5=await this[_0x323c5f(0x1ac)][_0x323c5f(0x1c1)](_0x323c5f(0x1c6)+_0x27fe30+_0x323c5f(0x1c7),{'body':_0x2f967c}),_0x245734=_0xfce698['map'](_0x1092d9=>ee(_0xbcffa5[_0x323c5f(0x1a8)]['comments'][_0x1092d9],_0x27fe30,_0x4c6d96))[_0x323c5f(0x1b0)](Boolean);return Object[_0x323c5f(0x1cd)](_0xbcffa5[_0x323c5f(0x1a8)][_0x323c5f(0x1ca)])[_0x323c5f(0x1c8)](_0x1d3b4f=>{const _0x263c53=_0x323c5f;this['_userService'][_0x263c53(0x175)](_0x1d3b4f);}),_0x245734;}[_0x8eb16d(0x189)](_0x471f37){const _0xa6d548=_0x8eb16d;return{'id':_0x471f37['id'],'threadId':_0x471f37['threadId'],'ref':_0x471f37[_0xa6d548(0x188)]};}};f=Q([_(0x0,_0xdc24c4(_0x40e085)),_(0x1,_0xdc24c4(_0x4ba4f5)),_(0x2,_0xdc24c4(_0x3d3196)),_(0x3,_0xdc24c4(_0x446729))],f);function _0xa644(_0x4637c9,_0x265c74){const _0x118a90=_0x118a();return _0xa644=function(_0xa64400,_0x274b13){_0xa64400=_0xa64400-0x16a;let _0x3234dd=_0x118a90[_0xa64400];return _0x3234dd;},_0xa644(_0x4637c9,_0x265c74);}var re=Object[_0x8eb16d(0x179)],te=(_0x303b71,_0x52317d,_0x3de470,_0x264898)=>{for(var _0x2d7bfe=_0x264898>0x1?void 0x0:_0x264898?re(_0x52317d,_0x3de470):_0x52317d,_0x58bd3d=_0x303b71['length']-0x1,_0x1a17c3;_0x58bd3d>=0x0;_0x58bd3d--)(_0x1a17c3=_0x303b71[_0x58bd3d])&&(_0x2d7bfe=_0x1a17c3(_0x2d7bfe)||_0x2d7bfe);return _0x2d7bfe;},N=(_0x1ba854,_0x260363)=>(_0x42d615,_0x95e093)=>_0x260363(_0x42d615,_0x95e093,_0x1ba854);let g=class extends _0x4f817d{constructor(_0x248f39,_0x16617b){const _0x2dac32=_0x8eb16d;super(),this[_0x2dac32(0x1b3)]=_0x248f39,this['_threadCommentDataSource']=_0x16617b,this[_0x2dac32(0x1b4)]();}[_0x8eb16d(0x1b4)](){const _0x52ad67=_0x8eb16d;this['_threadCommentDataSourceService'][_0x52ad67(0x196)]=this[_0x52ad67(0x18f)],this['_threadCommentDataSourceService'][_0x52ad67(0x182)]=!0x1;}};g=te([N(0x0,_0x1004f0),N(0x1,_0xdc24c4(f))],g);var se=Object[_0x8eb16d(0x1bd)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x19bb16,_0x95b4f1,_0x3fbb49)=>_0x95b4f1 in _0x19bb16?se(_0x19bb16,_0x95b4f1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3fbb49}):_0x19bb16[_0x95b4f1]=_0x3fbb49,ie=(_0x3402be,_0x5b174a,_0x42d9bb,_0x28c724)=>{const _0x3c25d5=_0x8eb16d;for(var _0x48d123=_0x28c724>0x1?void 0x0:_0x28c724?oe(_0x5b174a,_0x42d9bb):_0x5b174a,_0x1b8a30=_0x3402be[_0x3c25d5(0x190)]-0x1,_0x28e325;_0x1b8a30>=0x0;_0x1b8a30--)(_0x28e325=_0x3402be[_0x1b8a30])&&(_0x48d123=_0x28e325(_0x48d123)||_0x48d123);return _0x48d123;},w=(_0x1724c1,_0x44ebcd)=>(_0x21969d,_0x194b4d)=>_0x44ebcd(_0x21969d,_0x194b4d,_0x1724c1),$=(_0x1fef6b,_0x57c003,_0x17f93f)=>ne(_0x1fef6b,typeof _0x57c003!=_0x8eb16d(0x1a5)?_0x57c003+'':_0x57c003,_0x17f93f);let b=class extends _0x1d9dc9{constructor(_0x210702=M,_0x227bab,_0x2a3f5a){const _0x3d47bc=_0x8eb16d;super(),this[_0x3d47bc(0x19f)]=_0x210702,this['_injector']=_0x227bab,this['_configService']=_0x2a3f5a;const {..._0x3fc915}=_0x147312({},M,this[_0x3d47bc(0x19f)]);this['_configService'][_0x3d47bc(0x1a0)](z,_0x3fc915);}[_0x8eb16d(0x1ae)](){const _0x46d7bd=_0x8eb16d;[[f],[g],[S]][_0x46d7bd(0x1c8)](_0xb809a5=>{const _0x4f1008=_0x46d7bd;this[_0x4f1008(0x1bf)]['add'](_0xb809a5);});}[_0x8eb16d(0x17f)](){const _0x19a14d=_0x8eb16d;this[_0x19a14d(0x1bf)][_0x19a14d(0x187)](g),this[_0x19a14d(0x1bf)][_0x19a14d(0x187)](S);}};$(b,_0x8eb16d(0x1b9),W),$(b,'type',_0x20c5bd[_0x8eb16d(0x1c0)]),b=ie([_0x5aa5bd(_0x24bb62,_0x2caa97,_0xe51017),w(0x1,_0xdc24c4(_0x446729)),w(0x2,_0x17f2a0)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x527767=_0x31d8;(function(_0x17b2fd,_0x2ddbdd){const _0x210e68=_0x31d8,_0x44913c=_0x17b2fd();while(!![]){try{const _0x2bbbd1=-parseInt(_0x210e68(0x170))/0x1*(parseInt(_0x210e68(0x172))/0x2)+-parseInt(_0x210e68(0x194))/0x3*(-parseInt(_0x210e68(0x1a0))/0x4)+-parseInt(_0x210e68(0x15c))/0x5*(-parseInt(_0x210e68(0x19e))/0x6)+parseInt(_0x210e68(0x1b5))/0x7*(-parseInt(_0x210e68(0x1a6))/0x8)+parseInt(_0x210e68(0x195))/0x9+-parseInt(_0x210e68(0x196))/0xa*(parseInt(_0x210e68(0x17c))/0xb)+-parseInt(_0x210e68(0x187))/0xc;if(_0x2bbbd1===_0x2ddbdd)break;else _0x44913c['push'](_0x44913c['shift']());}catch(_0x5f3d24){_0x44913c['push'](_0x44913c['shift']());}}}(_0x4c7b,0xcc9b7));import{CommentService as _0x33030c,CollaborationSessionService as _0x2bd9c2,UniverCollaborationClientPlugin as _0x1d440a}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4ae0c4}from'@univerjs-pro/license';import{dayjs as _0xc6c96a,UserManagerService as _0x2a03b2,Inject as _0x298b9b,Injector as _0x188a2e,Disposable as _0x122226,CustomRangeType as _0x3da30b,UniverInstanceType as _0x49b1ca,DependentOn as _0x56b124,IConfigService as _0xc5891e,Plugin as _0x2c1efc,merge as _0x53f88d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x452024}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x48925f,IThreadCommentDataSourceService as _0x22bfe1}from'@univerjs/thread-comment';import{bufferTime as _0x3bb693}from'rxjs';import{HTTPService as _0x16b7e8}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x356ae6=>(_0x356ae6[_0x356ae6[_0x527767(0x15b)]=0x0]=_0x527767(0x15b),_0x356ae6[_0x356ae6[_0x527767(0x19b)]=0x1]=_0x527767(0x19b),_0x356ae6[_0x356ae6[_0x527767(0x163)]=-0x1]='UNRECOGNIZED',_0x356ae6))(I||{}),v=(_0x126048=>(_0x126048[_0x126048[_0x527767(0x1b1)]=0x0]=_0x527767(0x1b1),_0x126048[_0x126048[_0x527767(0x1b4)]=0x1]=_0x527767(0x1b4),_0x126048[_0x126048[_0x527767(0x162)]=0x2]=_0x527767(0x162),_0x126048[_0x126048[_0x527767(0x18e)]=0x3]=_0x527767(0x18e),_0x126048[_0x126048[_0x527767(0x1b2)]=0x4]=_0x527767(0x1b2),_0x126048[_0x126048['Solve']=0x5]='Solve',_0x126048[_0x126048[_0x527767(0x163)]=-0x1]='UNRECOGNIZED',_0x126048))(v||{});const D=_0x4c999c=>_0xc6c96a(new Date(+_0x4c999c))[_0x527767(0x179)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x2bb37a,_0x1ef064)=>{const _0xdf02ab=_0x527767,_0x2f2275=_0x2bb37a['get'](_0x2a03b2),_0x128392=_0x2bb37a['get'](_0x16b7e8);_0x1ef064['forEach'](_0x2155fd=>{const _0x2ec14c=_0x31d8;_0x2f2275['getUser'](_0x2155fd)&&_0x1ef064[_0x2ec14c(0x15a)](_0x2155fd);}),_0x1ef064[_0xdf02ab(0x175)]&&(await _0x128392['get'](_0xdf02ab(0x1a8),{'params':{'userIDs':[..._0x1ef064]}}))[_0xdf02ab(0x16c)]['users'][_0xdf02ab(0x1a7)](_0x5746a7=>{const _0x370f8f=_0xdf02ab;_0x5746a7&&_0x2f2275[_0x370f8f(0x165)](_0x5746a7);});};var K=Object[_0x527767(0x19a)],V=(_0x1d5bd7,_0x3e0e55,_0x432d31,_0x13a390)=>{const _0x5a8c02=_0x527767;for(var _0x545559=_0x13a390>0x1?void 0x0:_0x13a390?K(_0x3e0e55,_0x432d31):_0x3e0e55,_0x2a1bd5=_0x1d5bd7[_0x5a8c02(0x192)]-0x1,_0xf7ef1c;_0x2a1bd5>=0x0;_0x2a1bd5--)(_0xf7ef1c=_0x1d5bd7[_0x2a1bd5])&&(_0x545559=_0xf7ef1c(_0x545559)||_0x545559);return _0x545559;},p=(_0x49e6ba,_0x209b0a)=>(_0x5b2b2a,_0x40fa5f)=>_0x209b0a(_0x5b2b2a,_0x40fa5f,_0x49e6ba);let S=class extends _0x122226{constructor(_0x5d9a27,_0x29d15e,_0x120bad,_0x14c559){const _0x435a43=_0x527767;super(),this['_commentService']=_0x5d9a27,this[_0x435a43(0x1b6)]=_0x29d15e,this[_0x435a43(0x180)]=_0x120bad,this['_injector']=_0x14c559,this[_0x435a43(0x19d)](),this['_initUserSync']();}[_0x527767(0x176)](){const _0x48511b=_0x527767;this[_0x48511b(0x17a)](this[_0x48511b(0x1b6)][_0x48511b(0x1ba)][_0x48511b(0x17b)](_0x3bb693(0x10))[_0x48511b(0x171)](_0xc2e6f0=>{const _0x22dfe7=_0x48511b,_0xbf26e4=new Set();_0xc2e6f0[_0x22dfe7(0x1a7)](_0x33a795=>{const _0x309099=_0x22dfe7;switch(_0x33a795['type']){case _0x309099(0x1aa):{const _0x21be9f=_0x33a795[_0x309099(0x191)][_0x309099(0x17d)];_0xbf26e4['add'](_0x21be9f);break;}}}),B(this['_injector'],_0xbf26e4);}));}['_init'](){const _0xa3329a=_0x527767;this[_0xa3329a(0x17a)](this[_0xa3329a(0x16b)][_0xa3329a(0x1ba)][_0xa3329a(0x171)](async _0x43665c=>{const _0x5ee830=_0xa3329a;var _0x3c21cf,_0x488ba8,_0x345a50,_0x305063;const _0x8e1980=(_0x3c21cf=this[_0x5ee830(0x1b6)][_0x5ee830(0x18d)](_0x43665c[_0x5ee830(0x1a5)])[_0x5ee830(0x1a3)](_0x1358b8=>_0x1358b8['threadId']===_0x43665c[_0x5ee830(0x16a)]))==null?void 0x0:_0x3c21cf[_0x5ee830(0x193)];if(!_0x8e1980)return;const {unitId:_0x1c2333,subUnitId:_0x443cfc}=_0x8e1980;switch(_0x43665c[_0x5ee830(0x19f)]&&this['_userService'][_0x5ee830(0x165)](_0x43665c[_0x5ee830(0x19f)]),_0x43665c[_0x5ee830(0x164)]){case v['Add']:break;case v[_0x5ee830(0x162)]:{this[_0x5ee830(0x1b6)][_0x5ee830(0x1a4)](_0x1c2333,_0x443cfc,{'unitId':_0x1c2333,'subUnitId':_0x443cfc,'ref':'','id':_0x43665c[_0x5ee830(0x1bb)],'dT':D(+_0x43665c[_0x5ee830(0x168)]),'threadId':_0x43665c[_0x5ee830(0x16a)],'personId':(_0x345a50=(_0x488ba8=_0x43665c[_0x5ee830(0x19f)])==null?void 0x0:_0x488ba8[_0x5ee830(0x1a1)])!=null?_0x345a50:_0x43665c[_0x5ee830(0x1b3)],'text':JSON[_0x5ee830(0x185)](_0x43665c[_0x5ee830(0x1bd)]),'parentId':_0x8e1980['id']});break;}case v[_0x5ee830(0x1b2)]:{const _0x31fd53=this[_0x5ee830(0x1b6)][_0x5ee830(0x1b9)](_0x1c2333,_0x443cfc,_0x43665c[_0x5ee830(0x1bb)]);_0x31fd53&&_0x31fd53['parentId']&&this[_0x5ee830(0x1b6)][_0x5ee830(0x184)](_0x1c2333,_0x443cfc,_0x43665c[_0x5ee830(0x1bb)]);break;}case v['Edit']:{this['_threadCommentModel']['updateComment'](_0x1c2333,_0x443cfc,{'commentId':_0x43665c['replyId'],'text':JSON[_0x5ee830(0x185)](_0x43665c[_0x5ee830(0x1bd)])});break;}case v['Solve']:{const _0x20664a=(_0x305063=this['_threadCommentModel'][_0x5ee830(0x18d)](_0x43665c['unitId'])[_0x5ee830(0x1a3)](_0x553fa6=>_0x553fa6[_0x5ee830(0x16a)]===_0x43665c[_0x5ee830(0x16a)]))==null?void 0x0:_0x305063[_0x5ee830(0x193)];_0x20664a&&this[_0x5ee830(0x1b6)][_0x5ee830(0x158)](_0x1c2333,_0x443cfc,_0x20664a['id'],_0x43665c['solved']===I[_0x5ee830(0x19b)]);break;}}}));}};S=V([p(0x0,_0x298b9b(_0x33030c)),p(0x1,_0x298b9b(_0x48925f)),p(0x2,_0x298b9b(_0x2a03b2)),p(0x3,_0x298b9b(_0x188a2e))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x527767(0x19a)],Q=(_0xb0ae78,_0x3c42c7,_0x331113,_0x5ec32c)=>{const _0x4b50f8=_0x527767;for(var _0x53678e=_0x5ec32c>0x1?void 0x0:_0x5ec32c?k(_0x3c42c7,_0x331113):_0x3c42c7,_0x4cb368=_0xb0ae78[_0x4b50f8(0x192)]-0x1,_0x11f49f;_0x4cb368>=0x0;_0x4cb368--)(_0x11f49f=_0xb0ae78[_0x4cb368])&&(_0x53678e=_0x11f49f(_0x53678e)||_0x53678e);return _0x53678e;},_=(_0x5bd9d8,_0x3a7aa5)=>(_0x37c8b4,_0x230bbd)=>_0x3a7aa5(_0x37c8b4,_0x230bbd,_0x5bd9d8);function X(_0x2ca9fc,_0x2e1ebd){const _0x2704af=_0x527767,_0x5b76a4=_0x2ca9fc[_0x2704af(0x18b)][0x0];return{..._0x2e1ebd,'id':_0x5b76a4[_0x2704af(0x1bb)],'resolved':_0x2ca9fc['solved']===0x1,'dT':D(_0x5b76a4[_0x2704af(0x168)]),'personId':_0x5b76a4['userId'],'threadId':_0x5b76a4[_0x2704af(0x16a)]};}function ee(_0x569de8,_0x2e8e13,_0x1a25f4){const _0x21b7a3=_0x527767;var _0x5b3c39,_0x584ecd;if(((_0x584ecd=(_0x5b3c39=_0x569de8==null?void 0x0:_0x569de8[_0x21b7a3(0x18b)])==null?void 0x0:_0x5b3c39[_0x21b7a3(0x192)])!=null?_0x584ecd:0x0)>0x0){const _0x5819a2=(_0x1713e1,_0x3d9cde)=>({'id':_0x1713e1[_0x21b7a3(0x1bb)],'threadId':_0x1713e1[_0x21b7a3(0x16a)],'dT':D(_0x1713e1[_0x21b7a3(0x168)]),'personId':_0x1713e1[_0x21b7a3(0x1b3)],'resolved':_0x569de8[_0x21b7a3(0x167)]===I[_0x21b7a3(0x19b)],'unitId':_0x2e8e13,'subUnitId':_0x1a25f4,'text':JSON[_0x21b7a3(0x185)](_0x1713e1['content']),'parentId':_0x3d9cde}),_0x3bd0ee=_0x5819a2(_0x569de8[_0x21b7a3(0x18b)][0x0]);return{..._0x3bd0ee,'children':_0x569de8[_0x21b7a3(0x18b)][_0x21b7a3(0x174)](0x1)[_0x21b7a3(0x16e)](_0x2ba99f=>_0x5819a2(_0x2ba99f,_0x3bd0ee['id']))};}return null;}function _0x4c7b(){const _0x144c31=['_config','_userService','comments','saveCommentToSnapshot','reply','deleteComment','parse','COMMENT','4361988BXbpWV','resolved','error','symbol','replies','rangeType','getUnit','Edit','requireSession','customRanges','payload','length','root','603HhyIZH','7679376utKufS','210EMWCBx','filter','get','/universer-api/comment/unit/','getOwnPropertyDescriptor','Solved','pluginName','_init','24wfzHxd','user','29228GgQwQi','userID','_httpService','find','addComment','unitId','139832HQkXNh','forEach','/universer-api/user/list','getMemberID','add','values','comment','/edit','_sessionService','/add','dataSource','Unknown','Delete','userId','Add','28KvzsTG','_threadCommentModel','_threadCommentDataSourceService','_injector','getComment','commentUpdate$','replyId','onReady','content','onStarting','resolveComment','stringify','delete','OpenOrReOpen','390495dZAomR','/delete','post','users','/reply','code','Reply','UNRECOGNIZED','type','addUser','rangeId','solved','createTimestamp','_initDataSource','threadId','_commentService','body','syncUpdateMutationToColla','map','YYYY/MM/DD\x20HH:mm','2PCluWO','subscribe','192488GVZadU','/list','slice','size','_initUserSync','_threadCommentDataSource','updateComment','format','disposeWithMe','pipe','613063aeTcYr','personId','setConfig'];_0x4c7b=function(){return _0x144c31;};return _0x4c7b();}let f=class{constructor(_0x169bbb,_0x292ce7,_0x103462,_0x50af1b){const _0x250db4=_0x527767;this['_httpService']=_0x169bbb,this[_0x250db4(0x180)]=_0x292ce7,this[_0x250db4(0x1ae)]=_0x103462,this[_0x250db4(0x1b8)]=_0x50af1b;}async[_0x527767(0x1a4)](_0x29e6ef){const _0x1c646a=_0x527767;var _0x66c4de,_0x5e90a8;const {parentId:_0x5c7803,unitId:_0x3282c3,text:_0xe718ec,threadId:_0x5dc93a}=_0x29e6ef,_0x364c01=(_0x5e90a8=(_0x66c4de=_0xe718ec['customRanges'])==null?void 0x0:_0x66c4de['filter'](_0x438150=>_0x438150['rangeType']===_0x3da30b[_0x1c646a(0x186)])['map'](_0x23400d=>_0x23400d['rangeId']))!=null?_0x5e90a8:[],_0x8f024=JSON[_0x1c646a(0x159)](_0xe718ec),_0x15accd=(await this[_0x1c646a(0x1ae)][_0x1c646a(0x18f)](_0x3282c3))[_0x1c646a(0x1a9)]();if(_0x5c7803){const _0x55efec={'memberId':_0x15accd,'unitId':_0x3282c3,'content':_0x8f024,'mention':_0x364c01,'threadId':_0x5dc93a},_0x4d190d=(await this['_httpService'][_0x1c646a(0x15e)](_0x1c646a(0x199)+_0x3282c3+_0x1c646a(0x160),{'body':_0x55efec}))[_0x1c646a(0x16c)][_0x1c646a(0x183)];return{..._0x29e6ef,'id':_0x4d190d[_0x1c646a(0x1bb)],'dT':_0xc6c96a(+_0x4d190d[_0x1c646a(0x168)])['format'](_0x1c646a(0x16f)),'personId':_0x4d190d[_0x1c646a(0x1b3)]};}else{const _0x1c0793={'memberId':_0x15accd,'unitId':_0x3282c3,'content':_0x8f024,'mention':_0x364c01},_0x488855=await this['_httpService'][_0x1c646a(0x15e)](_0x1c646a(0x199)+_0x3282c3+_0x1c646a(0x1af),{'body':_0x1c0793});return X(_0x488855[_0x1c646a(0x16c)][_0x1c646a(0x1ac)],_0x29e6ef);}}async[_0x527767(0x178)](_0x4604ca){const _0x464c29=_0x527767;var _0xf96145,_0x55227d;const {text:_0x5921d5,unitId:_0x47c9f6}=_0x4604ca,_0x399b5a=(_0x55227d=(_0xf96145=_0x5921d5[_0x464c29(0x190)])==null?void 0x0:_0xf96145[_0x464c29(0x197)](_0x2340ab=>_0x2340ab[_0x464c29(0x18c)]===_0x3da30b['COMMENT'])['map'](_0x512aa7=>_0x512aa7[_0x464c29(0x166)]))!=null?_0x55227d:[],_0x1336b7=JSON[_0x464c29(0x159)](_0x5921d5),_0x1a3543=_0x4604ca['threadId'],_0x2d3d4a=_0x4604ca['id'],_0x4b426b={'memberId':(await this[_0x464c29(0x1ae)]['requireSession'](_0x47c9f6))['getMemberID'](),'unitId':_0x47c9f6,'threadId':_0x1a3543,'mention':_0x399b5a,'content':_0x1336b7,'replyId':_0x2d3d4a},_0x5edef3=await this[_0x464c29(0x1a2)][_0x464c29(0x15e)](_0x464c29(0x199)+_0x47c9f6+_0x464c29(0x1ad),{'body':_0x4b426b});return!_0x5edef3[_0x464c29(0x16c)]['error']||_0x5edef3[_0x464c29(0x16c)][_0x464c29(0x189)][_0x464c29(0x161)]===0x1;}async[_0x527767(0x158)](_0x49fbc0){const _0x55b4ec=_0x527767,{unitId:_0x3a801d}=_0x49fbc0,_0x48eb2b=_0x49fbc0[_0x55b4ec(0x16a)],_0xdceeb0={'memberId':this['_userService']['getCurrentUser']()[_0x55b4ec(0x1a1)],'unitId':_0x3a801d,'threadId':_0x48eb2b,'solved':_0x49fbc0[_0x55b4ec(0x188)]?I['Solved']:I[_0x55b4ec(0x15b)]},_0x424a30=await this[_0x55b4ec(0x1a2)][_0x55b4ec(0x15e)](_0x55b4ec(0x199)+_0x3a801d+'/solved',{'body':_0xdceeb0});return!_0x424a30[_0x55b4ec(0x16c)][_0x55b4ec(0x189)]||_0x424a30['body'][_0x55b4ec(0x189)][_0x55b4ec(0x161)]===0x1;}async[_0x527767(0x184)](_0x9d3c5a,_0x22b690,_0x111bd8,_0x1b65d8){const _0x4dc0a4=_0x527767,_0x3d12b9={'memberId':(await this[_0x4dc0a4(0x1ae)][_0x4dc0a4(0x18f)](_0x9d3c5a))[_0x4dc0a4(0x1a9)](),'threadId':_0x111bd8,'replyId':_0x1b65d8,'unitId':_0x9d3c5a},_0x39c706=await this[_0x4dc0a4(0x1a2)][_0x4dc0a4(0x15e)]('/universer-api/comment/unit/'+_0x9d3c5a+_0x4dc0a4(0x15d),{'body':_0x3d12b9});return!_0x39c706[_0x4dc0a4(0x16c)][_0x4dc0a4(0x189)]||_0x39c706[_0x4dc0a4(0x16c)][_0x4dc0a4(0x189)]['code']===0x1;}async['listComments'](_0x2c1d91,_0x3b59f2,_0x1bb685){const _0x2e642a=_0x527767,_0x19d376={'unitId':_0x2c1d91,'threadId':_0x1bb685},_0x12e729=await this['_httpService'][_0x2e642a(0x15e)]('/universer-api/comment/unit/'+_0x2c1d91+_0x2e642a(0x173),{'body':_0x19d376}),_0x44c586=_0x1bb685[_0x2e642a(0x16e)](_0x5a0795=>ee(_0x12e729[_0x2e642a(0x16c)][_0x2e642a(0x181)][_0x5a0795],_0x2c1d91,_0x3b59f2))[_0x2e642a(0x197)](Boolean);return Object[_0x2e642a(0x1ab)](_0x12e729[_0x2e642a(0x16c)][_0x2e642a(0x15f)])[_0x2e642a(0x1a7)](_0x2b1359=>{const _0x3f3e9a=_0x2e642a;this[_0x3f3e9a(0x180)]['addUser'](_0x2b1359);}),_0x44c586;}[_0x527767(0x182)](_0x38a2bb){const _0x50bbc5=_0x527767;return{'id':_0x38a2bb['id'],'threadId':_0x38a2bb[_0x50bbc5(0x16a)],'ref':_0x38a2bb['ref']};}};f=Q([_(0x0,_0x298b9b(_0x16b7e8)),_(0x1,_0x298b9b(_0x2a03b2)),_(0x2,_0x298b9b(_0x2bd9c2)),_(0x3,_0x298b9b(_0x188a2e))],f);var re=Object[_0x527767(0x19a)],te=(_0x1aca44,_0x2d955a,_0x41ddfb,_0x31f1a8)=>{const _0x1d9729=_0x527767;for(var _0x1515a6=_0x31f1a8>0x1?void 0x0:_0x31f1a8?re(_0x2d955a,_0x41ddfb):_0x2d955a,_0x15ca7e=_0x1aca44[_0x1d9729(0x192)]-0x1,_0x149e13;_0x15ca7e>=0x0;_0x15ca7e--)(_0x149e13=_0x1aca44[_0x15ca7e])&&(_0x1515a6=_0x149e13(_0x1515a6)||_0x1515a6);return _0x1515a6;},N=(_0x29e0ba,_0x379c71)=>(_0x1b7ff4,_0x270555)=>_0x379c71(_0x1b7ff4,_0x270555,_0x29e0ba);let g=class extends _0x122226{constructor(_0x2ae41e,_0x7e696a){const _0x2aa78b=_0x527767;super(),this[_0x2aa78b(0x1b7)]=_0x2ae41e,this['_threadCommentDataSource']=_0x7e696a,this['_initDataSource']();}[_0x527767(0x169)](){const _0x20554e=_0x527767;this[_0x20554e(0x1b7)][_0x20554e(0x1b0)]=this[_0x20554e(0x177)],this['_threadCommentDataSourceService'][_0x20554e(0x16d)]=!0x1;}};g=te([N(0x0,_0x22bfe1),N(0x1,_0x298b9b(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x77968f,_0x19a188,_0x46effd)=>_0x19a188 in _0x77968f?se(_0x77968f,_0x19a188,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x46effd}):_0x77968f[_0x19a188]=_0x46effd,ie=(_0x2e6daa,_0x40ab2a,_0x586c89,_0xff908d)=>{for(var _0x4d20f1=_0xff908d>0x1?void 0x0:_0xff908d?oe(_0x40ab2a,_0x586c89):_0x40ab2a,_0x2da7a5=_0x2e6daa['length']-0x1,_0x298a86;_0x2da7a5>=0x0;_0x2da7a5--)(_0x298a86=_0x2e6daa[_0x2da7a5])&&(_0x4d20f1=_0x298a86(_0x4d20f1)||_0x4d20f1);return _0x4d20f1;},w=(_0x54c4ad,_0x1fcb99)=>(_0x274831,_0x571749)=>_0x1fcb99(_0x274831,_0x571749,_0x54c4ad),$=(_0x42610a,_0x28372a,_0x312d8d)=>ne(_0x42610a,typeof _0x28372a!=_0x527767(0x18a)?_0x28372a+'':_0x28372a,_0x312d8d);let b=class extends _0x2c1efc{constructor(_0x4abead=M,_0x33ee57,_0x5ccdc9){const _0x58cf07=_0x527767;super(),this[_0x58cf07(0x17f)]=_0x4abead,this[_0x58cf07(0x1b8)]=_0x33ee57,this['_configService']=_0x5ccdc9;const {..._0x1c04ed}=_0x53f88d({},M,this[_0x58cf07(0x17f)]);this['_configService'][_0x58cf07(0x17e)](z,_0x1c04ed);}[_0x527767(0x1be)](){const _0x382838=_0x527767;[[f],[g],[S]][_0x382838(0x1a7)](_0x4c403d=>{const _0x5e2662=_0x382838;this[_0x5e2662(0x1b8)][_0x5e2662(0x1aa)](_0x4c403d);});}[_0x527767(0x1bc)](){const _0x1b59c4=_0x527767;this['_injector'][_0x1b59c4(0x198)](g),this[_0x1b59c4(0x1b8)][_0x1b59c4(0x198)](S);}};function _0x31d8(_0x1f90fd,_0xcbacba){const _0x4c7bdb=_0x4c7b();return _0x31d8=function(_0x31d8d2,_0x391ecf){_0x31d8d2=_0x31d8d2-0x158;let _0x1212ac=_0x4c7bdb[_0x31d8d2];return _0x1212ac;},_0x31d8(_0x1f90fd,_0xcbacba);}$(b,_0x527767(0x19c),W),$(b,_0x527767(0x164),_0x49b1ca['UNIVER_UNKNOWN']),b=ie([_0x56b124(_0x452024,_0x1d440a,_0x4ae0c4),w(0x1,_0x298b9b(_0x188a2e)),w(0x2,_0xc5891e)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x8eb16d=_0xa644;(function(_0x26f565,_0x4a5003){const _0x54cbc0=_0xa644,_0x11892c=_0x26f565();while(!![]){try{const _0x4e8a81=-parseInt(_0x54cbc0(0x181))/0x1*(parseInt(_0x54cbc0(0x1c4))/0x2)+-parseInt(_0x54cbc0(0x19a))/0x3*(-parseInt(_0x54cbc0(0x16b))/0x4)+parseInt(_0x54cbc0(0x176))/0x5+parseInt(_0x54cbc0(0x16e))/0x6*(-parseInt(_0x54cbc0(0x1a9))/0x7)+parseInt(_0x54cbc0(0x194))/0x8+-parseInt(_0x54cbc0(0x177))/0x9+parseInt(_0x54cbc0(0x1a7))/0xa;if(_0x4e8a81===_0x4a5003)break;else _0x11892c['push'](_0x11892c['shift']());}catch(_0x47526e){_0x11892c['push'](_0x11892c['shift']());}}}(_0x118a,0x2f9ea));import{CommentService as _0x1ccc3b,CollaborationSessionService as _0x3d3196,UniverCollaborationClientPlugin as _0x2caa97}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xe51017}from'@univerjs-pro/license';import{dayjs as _0x5eb8ae,UserManagerService as _0x4ba4f5,Inject as _0xdc24c4,Injector as _0x446729,Disposable as _0x4f817d,CustomRangeType as _0x19605a,UniverInstanceType as _0x20c5bd,DependentOn as _0x5aa5bd,IConfigService as _0x17f2a0,Plugin as _0x1d9dc9,merge as _0x147312}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x24bb62}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5c51a6,IThreadCommentDataSourceService as _0x1004f0}from'@univerjs/thread-comment';import{bufferTime as _0x200bd8}from'rxjs';import{HTTPService as _0x40e085}from'@univerjs/network';const W=_0x8eb16d(0x180);var I=(_0x4ed037=>(_0x4ed037[_0x4ed037[_0x8eb16d(0x1a2)]=0x0]='OpenOrReOpen',_0x4ed037[_0x4ed037[_0x8eb16d(0x1ce)]=0x1]=_0x8eb16d(0x1ce),_0x4ed037[_0x4ed037[_0x8eb16d(0x191)]=-0x1]='UNRECOGNIZED',_0x4ed037))(I||{}),v=(_0x4bf901=>(_0x4bf901[_0x4bf901[_0x8eb16d(0x192)]=0x0]=_0x8eb16d(0x192),_0x4bf901[_0x4bf901[_0x8eb16d(0x17e)]=0x1]=_0x8eb16d(0x17e),_0x4bf901[_0x4bf901['Reply']=0x2]='Reply',_0x4bf901[_0x4bf901[_0x8eb16d(0x17d)]=0x3]=_0x8eb16d(0x17d),_0x4bf901[_0x4bf901['Delete']=0x4]=_0x8eb16d(0x1b7),_0x4bf901[_0x4bf901[_0x8eb16d(0x197)]=0x5]=_0x8eb16d(0x197),_0x4bf901[_0x4bf901[_0x8eb16d(0x191)]=-0x1]=_0x8eb16d(0x191),_0x4bf901))(v||{});function _0x118a(){const _0x46d758=['6329fRKInW','syncUpdateMutationToColla','solved','parentId','customRanges','getMemberID','get','ref','saveCommentToSnapshot','_initUserSync','error','replyId','COMMENT','size','_threadCommentDataSource','length','UNRECOGNIZED','Unknown','userId','1711568NOOgTA','pipe','dataSource','Solve','getUser','content','3RcYeMr','_init','commentUpdate$','subscribe','/add','_config','setConfig','updateComment','OpenOrReOpen','user','getComment','symbol','add','4622420jpGjrG','body','1059730qnvOdn','payload','type','_httpService','createTimestamp','onStarting','userID','filter','root','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','_initDataSource','unitId','find','Delete','deleteComment','pluginName','reply','parse','Reply','defineProperty','_sessionService','_injector','UNIVER_UNKNOWN','post','/delete','/universer-api/user/list','56oJQoaw','threadId','/universer-api/comment/unit/','/list','forEach','listComments','users','_userService','map','values','Solved','replies','116868tYUBEI','_threadCommentModel','getCurrentUser','6dqmWOu','resolveComment','rangeId','addComment','_commentService','stringify','/solved','addUser','1028480wZfnXW','3487041OtjmXa','requireSession','getOwnPropertyDescriptor','getUnit','disposeWithMe','code','Edit','Add','onReady','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'];_0x118a=function(){return _0x46d758;};return _0x118a();}const D=_0x142eb4=>_0x5eb8ae(new Date(+_0x142eb4))['format'](_0x8eb16d(0x1b2)),B=async(_0x342391,_0x1ee11b)=>{const _0x3a57ee=_0x8eb16d,_0x30d120=_0x342391[_0x3a57ee(0x187)](_0x4ba4f5),_0xa4e10e=_0x342391[_0x3a57ee(0x187)](_0x40e085);_0x1ee11b[_0x3a57ee(0x1c8)](_0xf2ed1d=>{const _0x25ad56=_0x3a57ee;_0x30d120[_0x25ad56(0x198)](_0xf2ed1d)&&_0x1ee11b['delete'](_0xf2ed1d);}),_0x1ee11b[_0x3a57ee(0x18e)]&&(await _0xa4e10e[_0x3a57ee(0x187)](_0x3a57ee(0x1c3),{'params':{'userIDs':[..._0x1ee11b]}}))[_0x3a57ee(0x1a8)][_0x3a57ee(0x1ca)]['forEach'](_0x3019f4=>{const _0x281dd2=_0x3a57ee;_0x3019f4&&_0x30d120[_0x281dd2(0x175)](_0x3019f4);});};var K=Object[_0x8eb16d(0x179)],V=(_0x3c5927,_0x5460f6,_0x354784,_0x17d86c)=>{for(var _0x58200e=_0x17d86c>0x1?void 0x0:_0x17d86c?K(_0x5460f6,_0x354784):_0x5460f6,_0x5be380=_0x3c5927['length']-0x1,_0x4f4b0b;_0x5be380>=0x0;_0x5be380--)(_0x4f4b0b=_0x3c5927[_0x5be380])&&(_0x58200e=_0x4f4b0b(_0x58200e)||_0x58200e);return _0x58200e;},p=(_0x404226,_0x10b535)=>(_0x5efc4f,_0x5a6ec1)=>_0x10b535(_0x5efc4f,_0x5a6ec1,_0x404226);let S=class extends _0x4f817d{constructor(_0x3cb562,_0x2ffe30,_0x1dd3ff,_0x57a9dc){const _0x206d68=_0x8eb16d;super(),this['_commentService']=_0x3cb562,this[_0x206d68(0x16c)]=_0x2ffe30,this['_userService']=_0x1dd3ff,this['_injector']=_0x57a9dc,this[_0x206d68(0x19b)](),this[_0x206d68(0x18a)]();}[_0x8eb16d(0x18a)](){const _0x389b82=_0x8eb16d;this[_0x389b82(0x17b)](this[_0x389b82(0x16c)]['commentUpdate$'][_0x389b82(0x195)](_0x200bd8(0x10))[_0x389b82(0x19d)](_0x1eff56=>{const _0x486510=_0x389b82,_0xa1cf08=new Set();_0x1eff56[_0x486510(0x1c8)](_0x377008=>{const _0x1c4306=_0x486510;switch(_0x377008[_0x1c4306(0x1ab)]){case _0x1c4306(0x1a6):{const _0x5e5b80=_0x377008[_0x1c4306(0x1aa)]['personId'];_0xa1cf08[_0x1c4306(0x1a6)](_0x5e5b80);break;}}}),B(this[_0x486510(0x1bf)],_0xa1cf08);}));}['_init'](){const _0x4cb971=_0x8eb16d;this['disposeWithMe'](this[_0x4cb971(0x172)][_0x4cb971(0x19c)][_0x4cb971(0x19d)](async _0x80891f=>{const _0x27846d=_0x4cb971;var _0x2c0708,_0x16aaed,_0x1dbd4f,_0x479cc1;const _0xe01919=(_0x2c0708=this[_0x27846d(0x16c)][_0x27846d(0x17a)](_0x80891f['unitId'])[_0x27846d(0x1b6)](_0x17b8ca=>_0x17b8ca[_0x27846d(0x1c5)]===_0x80891f[_0x27846d(0x1c5)]))==null?void 0x0:_0x2c0708[_0x27846d(0x1b1)];if(!_0xe01919)return;const {unitId:_0x24c545,subUnitId:_0x506b4d}=_0xe01919;switch(_0x80891f['user']&&this[_0x27846d(0x1cb)]['addUser'](_0x80891f[_0x27846d(0x1a3)]),_0x80891f[_0x27846d(0x1ab)]){case v[_0x27846d(0x17e)]:break;case v[_0x27846d(0x1bc)]:{this[_0x27846d(0x16c)][_0x27846d(0x171)](_0x24c545,_0x506b4d,{'unitId':_0x24c545,'subUnitId':_0x506b4d,'ref':'','id':_0x80891f[_0x27846d(0x18c)],'dT':D(+_0x80891f[_0x27846d(0x1ad)]),'threadId':_0x80891f[_0x27846d(0x1c5)],'personId':(_0x1dbd4f=(_0x16aaed=_0x80891f[_0x27846d(0x1a3)])==null?void 0x0:_0x16aaed['userID'])!=null?_0x1dbd4f:_0x80891f['userId'],'text':JSON[_0x27846d(0x1bb)](_0x80891f['content']),'parentId':_0xe01919['id']});break;}case v[_0x27846d(0x1b7)]:{const _0x121518=this['_threadCommentModel'][_0x27846d(0x1a4)](_0x24c545,_0x506b4d,_0x80891f[_0x27846d(0x18c)]);_0x121518&&_0x121518[_0x27846d(0x184)]&&this[_0x27846d(0x16c)][_0x27846d(0x1b8)](_0x24c545,_0x506b4d,_0x80891f[_0x27846d(0x18c)]);break;}case v[_0x27846d(0x17d)]:{this[_0x27846d(0x16c)][_0x27846d(0x1a1)](_0x24c545,_0x506b4d,{'commentId':_0x80891f[_0x27846d(0x18c)],'text':JSON['parse'](_0x80891f[_0x27846d(0x199)])});break;}case v[_0x27846d(0x197)]:{const _0x52d86e=(_0x479cc1=this[_0x27846d(0x16c)]['getUnit'](_0x80891f[_0x27846d(0x1b5)])[_0x27846d(0x1b6)](_0x3f9878=>_0x3f9878[_0x27846d(0x1c5)]===_0x80891f[_0x27846d(0x1c5)]))==null?void 0x0:_0x479cc1[_0x27846d(0x1b1)];_0x52d86e&&this[_0x27846d(0x16c)]['resolveComment'](_0x24c545,_0x506b4d,_0x52d86e['id'],_0x80891f[_0x27846d(0x183)]===I[_0x27846d(0x1ce)]);break;}}}));}};S=V([p(0x0,_0xdc24c4(_0x1ccc3b)),p(0x1,_0xdc24c4(_0x5c51a6)),p(0x2,_0xdc24c4(_0x4ba4f5)),p(0x3,_0xdc24c4(_0x446729))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x17c693,_0x4d23a6,_0x2984df,_0xa31c13)=>{for(var _0xdc3e2d=_0xa31c13>0x1?void 0x0:_0xa31c13?k(_0x4d23a6,_0x2984df):_0x4d23a6,_0x36cdd9=_0x17c693['length']-0x1,_0x54f304;_0x36cdd9>=0x0;_0x36cdd9--)(_0x54f304=_0x17c693[_0x36cdd9])&&(_0xdc3e2d=_0x54f304(_0xdc3e2d)||_0xdc3e2d);return _0xdc3e2d;},_=(_0xe4c82f,_0x57f10e)=>(_0x16a164,_0x55a361)=>_0x57f10e(_0x16a164,_0x55a361,_0xe4c82f);function X(_0x5d0474,_0x1f2072){const _0x1b1af5=_0x8eb16d,_0x4ec919=_0x5d0474[_0x1b1af5(0x16a)][0x0];return{..._0x1f2072,'id':_0x4ec919['replyId'],'resolved':_0x5d0474[_0x1b1af5(0x183)]===0x1,'dT':D(_0x4ec919[_0x1b1af5(0x1ad)]),'personId':_0x4ec919['userId'],'threadId':_0x4ec919[_0x1b1af5(0x1c5)]};}function ee(_0x1dc058,_0x1d33a1,_0x4a29b8){const _0x3e4429=_0x8eb16d;var _0x16905e,_0x380e3e;if(((_0x380e3e=(_0x16905e=_0x1dc058==null?void 0x0:_0x1dc058[_0x3e4429(0x16a)])==null?void 0x0:_0x16905e[_0x3e4429(0x190)])!=null?_0x380e3e:0x0)>0x0){const _0x12a6fc=(_0x26be21,_0x102ff0)=>({'id':_0x26be21[_0x3e4429(0x18c)],'threadId':_0x26be21[_0x3e4429(0x1c5)],'dT':D(_0x26be21['createTimestamp']),'personId':_0x26be21[_0x3e4429(0x193)],'resolved':_0x1dc058[_0x3e4429(0x183)]===I['Solved'],'unitId':_0x1d33a1,'subUnitId':_0x4a29b8,'text':JSON[_0x3e4429(0x1bb)](_0x26be21[_0x3e4429(0x199)]),'parentId':_0x102ff0}),_0xa1c339=_0x12a6fc(_0x1dc058[_0x3e4429(0x16a)][0x0]);return{..._0xa1c339,'children':_0x1dc058[_0x3e4429(0x16a)]['slice'](0x1)['map'](_0x4353c8=>_0x12a6fc(_0x4353c8,_0xa1c339['id']))};}return null;}let f=class{constructor(_0xd527d1,_0x7b2f99,_0x5854ac,_0x43c529){const _0x16cda7=_0x8eb16d;this[_0x16cda7(0x1ac)]=_0xd527d1,this['_userService']=_0x7b2f99,this[_0x16cda7(0x1be)]=_0x5854ac,this[_0x16cda7(0x1bf)]=_0x43c529;}async['addComment'](_0x4e7085){const _0x3cabd4=_0x8eb16d;var _0x3d1b7c,_0x559fb9;const {parentId:_0x2ba49e,unitId:_0x460949,text:_0x1deed3,threadId:_0x96e33}=_0x4e7085,_0x3a2114=(_0x559fb9=(_0x3d1b7c=_0x1deed3[_0x3cabd4(0x185)])==null?void 0x0:_0x3d1b7c['filter'](_0x3cee94=>_0x3cee94['rangeType']===_0x19605a[_0x3cabd4(0x18d)])[_0x3cabd4(0x1cc)](_0x570fe8=>_0x570fe8['rangeId']))!=null?_0x559fb9:[],_0x4e9bb1=JSON[_0x3cabd4(0x173)](_0x1deed3),_0xaf8c4=(await this['_sessionService'][_0x3cabd4(0x178)](_0x460949))[_0x3cabd4(0x186)]();if(_0x2ba49e){const _0x3c9c5e={'memberId':_0xaf8c4,'unitId':_0x460949,'content':_0x4e9bb1,'mention':_0x3a2114,'threadId':_0x96e33},_0x7d3202=(await this[_0x3cabd4(0x1ac)][_0x3cabd4(0x1c1)](_0x3cabd4(0x1c6)+_0x460949+'/reply',{'body':_0x3c9c5e}))['body'][_0x3cabd4(0x1ba)];return{..._0x4e7085,'id':_0x7d3202[_0x3cabd4(0x18c)],'dT':_0x5eb8ae(+_0x7d3202[_0x3cabd4(0x1ad)])['format'](_0x3cabd4(0x1b2)),'personId':_0x7d3202['userId']};}else{const _0x4f2575={'memberId':_0xaf8c4,'unitId':_0x460949,'content':_0x4e9bb1,'mention':_0x3a2114},_0x5d5519=await this[_0x3cabd4(0x1ac)]['post'](_0x3cabd4(0x1c6)+_0x460949+_0x3cabd4(0x19e),{'body':_0x4f2575});return X(_0x5d5519[_0x3cabd4(0x1a8)]['comment'],_0x4e7085);}}async[_0x8eb16d(0x1a1)](_0x1d395f){const _0x31ebd5=_0x8eb16d;var _0x68d19,_0x45e08e;const {text:_0x16f826,unitId:_0x3aa872}=_0x1d395f,_0x47db8e=(_0x45e08e=(_0x68d19=_0x16f826[_0x31ebd5(0x185)])==null?void 0x0:_0x68d19[_0x31ebd5(0x1b0)](_0x28b20f=>_0x28b20f['rangeType']===_0x19605a[_0x31ebd5(0x18d)])[_0x31ebd5(0x1cc)](_0x31cdbd=>_0x31cdbd[_0x31ebd5(0x170)]))!=null?_0x45e08e:[],_0x65d2a2=JSON[_0x31ebd5(0x173)](_0x16f826),_0x2bdbe0=_0x1d395f[_0x31ebd5(0x1c5)],_0xfbdfbc=_0x1d395f['id'],_0x51b782={'memberId':(await this[_0x31ebd5(0x1be)][_0x31ebd5(0x178)](_0x3aa872))[_0x31ebd5(0x186)](),'unitId':_0x3aa872,'threadId':_0x2bdbe0,'mention':_0x47db8e,'content':_0x65d2a2,'replyId':_0xfbdfbc},_0x42177c=await this[_0x31ebd5(0x1ac)][_0x31ebd5(0x1c1)](_0x31ebd5(0x1c6)+_0x3aa872+'/edit',{'body':_0x51b782});return!_0x42177c[_0x31ebd5(0x1a8)]['error']||_0x42177c[_0x31ebd5(0x1a8)][_0x31ebd5(0x18b)][_0x31ebd5(0x17c)]===0x1;}async[_0x8eb16d(0x16f)](_0xc6e78){const _0x2cf62b=_0x8eb16d,{unitId:_0x1094dc}=_0xc6e78,_0x3577a6=_0xc6e78[_0x2cf62b(0x1c5)],_0x52d09a={'memberId':this['_userService'][_0x2cf62b(0x16d)]()[_0x2cf62b(0x1af)],'unitId':_0x1094dc,'threadId':_0x3577a6,'solved':_0xc6e78['resolved']?I['Solved']:I[_0x2cf62b(0x1a2)]},_0x4e9c2e=await this[_0x2cf62b(0x1ac)]['post']('/universer-api/comment/unit/'+_0x1094dc+_0x2cf62b(0x174),{'body':_0x52d09a});return!_0x4e9c2e[_0x2cf62b(0x1a8)][_0x2cf62b(0x18b)]||_0x4e9c2e['body'][_0x2cf62b(0x18b)][_0x2cf62b(0x17c)]===0x1;}async[_0x8eb16d(0x1b8)](_0x33b212,_0x495a01,_0x267a16,_0x418271){const _0x8964af=_0x8eb16d,_0x22d066={'memberId':(await this[_0x8964af(0x1be)]['requireSession'](_0x33b212))[_0x8964af(0x186)](),'threadId':_0x267a16,'replyId':_0x418271,'unitId':_0x33b212},_0x1d20bb=await this[_0x8964af(0x1ac)]['post']('/universer-api/comment/unit/'+_0x33b212+_0x8964af(0x1c2),{'body':_0x22d066});return!_0x1d20bb[_0x8964af(0x1a8)][_0x8964af(0x18b)]||_0x1d20bb[_0x8964af(0x1a8)][_0x8964af(0x18b)][_0x8964af(0x17c)]===0x1;}async[_0x8eb16d(0x1c9)](_0x27fe30,_0x4c6d96,_0xfce698){const _0x323c5f=_0x8eb16d,_0x2f967c={'unitId':_0x27fe30,'threadId':_0xfce698},_0xbcffa5=await this[_0x323c5f(0x1ac)][_0x323c5f(0x1c1)](_0x323c5f(0x1c6)+_0x27fe30+_0x323c5f(0x1c7),{'body':_0x2f967c}),_0x245734=_0xfce698['map'](_0x1092d9=>ee(_0xbcffa5[_0x323c5f(0x1a8)]['comments'][_0x1092d9],_0x27fe30,_0x4c6d96))[_0x323c5f(0x1b0)](Boolean);return Object[_0x323c5f(0x1cd)](_0xbcffa5[_0x323c5f(0x1a8)][_0x323c5f(0x1ca)])[_0x323c5f(0x1c8)](_0x1d3b4f=>{const _0x263c53=_0x323c5f;this['_userService'][_0x263c53(0x175)](_0x1d3b4f);}),_0x245734;}[_0x8eb16d(0x189)](_0x471f37){const _0xa6d548=_0x8eb16d;return{'id':_0x471f37['id'],'threadId':_0x471f37['threadId'],'ref':_0x471f37[_0xa6d548(0x188)]};}};f=Q([_(0x0,_0xdc24c4(_0x40e085)),_(0x1,_0xdc24c4(_0x4ba4f5)),_(0x2,_0xdc24c4(_0x3d3196)),_(0x3,_0xdc24c4(_0x446729))],f);function _0xa644(_0x4637c9,_0x265c74){const _0x118a90=_0x118a();return _0xa644=function(_0xa64400,_0x274b13){_0xa64400=_0xa64400-0x16a;let _0x3234dd=_0x118a90[_0xa64400];return _0x3234dd;},_0xa644(_0x4637c9,_0x265c74);}var re=Object[_0x8eb16d(0x179)],te=(_0x303b71,_0x52317d,_0x3de470,_0x264898)=>{for(var _0x2d7bfe=_0x264898>0x1?void 0x0:_0x264898?re(_0x52317d,_0x3de470):_0x52317d,_0x58bd3d=_0x303b71['length']-0x1,_0x1a17c3;_0x58bd3d>=0x0;_0x58bd3d--)(_0x1a17c3=_0x303b71[_0x58bd3d])&&(_0x2d7bfe=_0x1a17c3(_0x2d7bfe)||_0x2d7bfe);return _0x2d7bfe;},N=(_0x1ba854,_0x260363)=>(_0x42d615,_0x95e093)=>_0x260363(_0x42d615,_0x95e093,_0x1ba854);let g=class extends _0x4f817d{constructor(_0x248f39,_0x16617b){const _0x2dac32=_0x8eb16d;super(),this[_0x2dac32(0x1b3)]=_0x248f39,this['_threadCommentDataSource']=_0x16617b,this[_0x2dac32(0x1b4)]();}[_0x8eb16d(0x1b4)](){const _0x52ad67=_0x8eb16d;this['_threadCommentDataSourceService'][_0x52ad67(0x196)]=this[_0x52ad67(0x18f)],this['_threadCommentDataSourceService'][_0x52ad67(0x182)]=!0x1;}};g=te([N(0x0,_0x1004f0),N(0x1,_0xdc24c4(f))],g);var se=Object[_0x8eb16d(0x1bd)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x19bb16,_0x95b4f1,_0x3fbb49)=>_0x95b4f1 in _0x19bb16?se(_0x19bb16,_0x95b4f1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3fbb49}):_0x19bb16[_0x95b4f1]=_0x3fbb49,ie=(_0x3402be,_0x5b174a,_0x42d9bb,_0x28c724)=>{const _0x3c25d5=_0x8eb16d;for(var _0x48d123=_0x28c724>0x1?void 0x0:_0x28c724?oe(_0x5b174a,_0x42d9bb):_0x5b174a,_0x1b8a30=_0x3402be[_0x3c25d5(0x190)]-0x1,_0x28e325;_0x1b8a30>=0x0;_0x1b8a30--)(_0x28e325=_0x3402be[_0x1b8a30])&&(_0x48d123=_0x28e325(_0x48d123)||_0x48d123);return _0x48d123;},w=(_0x1724c1,_0x44ebcd)=>(_0x21969d,_0x194b4d)=>_0x44ebcd(_0x21969d,_0x194b4d,_0x1724c1),$=(_0x1fef6b,_0x57c003,_0x17f93f)=>ne(_0x1fef6b,typeof _0x57c003!=_0x8eb16d(0x1a5)?_0x57c003+'':_0x57c003,_0x17f93f);let b=class extends _0x1d9dc9{constructor(_0x210702=M,_0x227bab,_0x2a3f5a){const _0x3d47bc=_0x8eb16d;super(),this[_0x3d47bc(0x19f)]=_0x210702,this['_injector']=_0x227bab,this['_configService']=_0x2a3f5a;const {..._0x3fc915}=_0x147312({},M,this[_0x3d47bc(0x19f)]);this['_configService'][_0x3d47bc(0x1a0)](z,_0x3fc915);}[_0x8eb16d(0x1ae)](){const _0x46d7bd=_0x8eb16d;[[f],[g],[S]][_0x46d7bd(0x1c8)](_0xb809a5=>{const _0x4f1008=_0x46d7bd;this[_0x4f1008(0x1bf)]['add'](_0xb809a5);});}[_0x8eb16d(0x17f)](){const _0x19a14d=_0x8eb16d;this[_0x19a14d(0x1bf)][_0x19a14d(0x187)](g),this[_0x19a14d(0x1bf)][_0x19a14d(0x187)](S);}};$(b,_0x8eb16d(0x1b9),W),$(b,'type',_0x20c5bd[_0x8eb16d(0x1c0)]),b=ie([_0x5aa5bd(_0x24bb62,_0x2caa97,_0xe51017),w(0x1,_0xdc24c4(_0x446729)),w(0x2,_0x17f2a0)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x527767=_0x31d8;(function(_0x17b2fd,_0x2ddbdd){const _0x210e68=_0x31d8,_0x44913c=_0x17b2fd();while(!![]){try{const _0x2bbbd1=-parseInt(_0x210e68(0x170))/0x1*(parseInt(_0x210e68(0x172))/0x2)+-parseInt(_0x210e68(0x194))/0x3*(-parseInt(_0x210e68(0x1a0))/0x4)+-parseInt(_0x210e68(0x15c))/0x5*(-parseInt(_0x210e68(0x19e))/0x6)+parseInt(_0x210e68(0x1b5))/0x7*(-parseInt(_0x210e68(0x1a6))/0x8)+parseInt(_0x210e68(0x195))/0x9+-parseInt(_0x210e68(0x196))/0xa*(parseInt(_0x210e68(0x17c))/0xb)+-parseInt(_0x210e68(0x187))/0xc;if(_0x2bbbd1===_0x2ddbdd)break;else _0x44913c['push'](_0x44913c['shift']());}catch(_0x5f3d24){_0x44913c['push'](_0x44913c['shift']());}}}(_0x4c7b,0xcc9b7));import{CommentService as _0x33030c,CollaborationSessionService as _0x2bd9c2,UniverCollaborationClientPlugin as _0x1d440a}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4ae0c4}from'@univerjs-pro/license';import{dayjs as _0xc6c96a,UserManagerService as _0x2a03b2,Inject as _0x298b9b,Injector as _0x188a2e,Disposable as _0x122226,CustomRangeType as _0x3da30b,UniverInstanceType as _0x49b1ca,DependentOn as _0x56b124,IConfigService as _0xc5891e,Plugin as _0x2c1efc,merge as _0x53f88d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x452024}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x48925f,IThreadCommentDataSourceService as _0x22bfe1}from'@univerjs/thread-comment';import{bufferTime as _0x3bb693}from'rxjs';import{HTTPService as _0x16b7e8}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x356ae6=>(_0x356ae6[_0x356ae6[_0x527767(0x15b)]=0x0]=_0x527767(0x15b),_0x356ae6[_0x356ae6[_0x527767(0x19b)]=0x1]=_0x527767(0x19b),_0x356ae6[_0x356ae6[_0x527767(0x163)]=-0x1]='UNRECOGNIZED',_0x356ae6))(I||{}),v=(_0x126048=>(_0x126048[_0x126048[_0x527767(0x1b1)]=0x0]=_0x527767(0x1b1),_0x126048[_0x126048[_0x527767(0x1b4)]=0x1]=_0x527767(0x1b4),_0x126048[_0x126048[_0x527767(0x162)]=0x2]=_0x527767(0x162),_0x126048[_0x126048[_0x527767(0x18e)]=0x3]=_0x527767(0x18e),_0x126048[_0x126048[_0x527767(0x1b2)]=0x4]=_0x527767(0x1b2),_0x126048[_0x126048['Solve']=0x5]='Solve',_0x126048[_0x126048[_0x527767(0x163)]=-0x1]='UNRECOGNIZED',_0x126048))(v||{});const D=_0x4c999c=>_0xc6c96a(new Date(+_0x4c999c))[_0x527767(0x179)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x2bb37a,_0x1ef064)=>{const _0xdf02ab=_0x527767,_0x2f2275=_0x2bb37a['get'](_0x2a03b2),_0x128392=_0x2bb37a['get'](_0x16b7e8);_0x1ef064['forEach'](_0x2155fd=>{const _0x2ec14c=_0x31d8;_0x2f2275['getUser'](_0x2155fd)&&_0x1ef064[_0x2ec14c(0x15a)](_0x2155fd);}),_0x1ef064[_0xdf02ab(0x175)]&&(await _0x128392['get'](_0xdf02ab(0x1a8),{'params':{'userIDs':[..._0x1ef064]}}))[_0xdf02ab(0x16c)]['users'][_0xdf02ab(0x1a7)](_0x5746a7=>{const _0x370f8f=_0xdf02ab;_0x5746a7&&_0x2f2275[_0x370f8f(0x165)](_0x5746a7);});};var K=Object[_0x527767(0x19a)],V=(_0x1d5bd7,_0x3e0e55,_0x432d31,_0x13a390)=>{const _0x5a8c02=_0x527767;for(var _0x545559=_0x13a390>0x1?void 0x0:_0x13a390?K(_0x3e0e55,_0x432d31):_0x3e0e55,_0x2a1bd5=_0x1d5bd7[_0x5a8c02(0x192)]-0x1,_0xf7ef1c;_0x2a1bd5>=0x0;_0x2a1bd5--)(_0xf7ef1c=_0x1d5bd7[_0x2a1bd5])&&(_0x545559=_0xf7ef1c(_0x545559)||_0x545559);return _0x545559;},p=(_0x49e6ba,_0x209b0a)=>(_0x5b2b2a,_0x40fa5f)=>_0x209b0a(_0x5b2b2a,_0x40fa5f,_0x49e6ba);let S=class extends _0x122226{constructor(_0x5d9a27,_0x29d15e,_0x120bad,_0x14c559){const _0x435a43=_0x527767;super(),this['_commentService']=_0x5d9a27,this[_0x435a43(0x1b6)]=_0x29d15e,this[_0x435a43(0x180)]=_0x120bad,this['_injector']=_0x14c559,this[_0x435a43(0x19d)](),this['_initUserSync']();}[_0x527767(0x176)](){const _0x48511b=_0x527767;this[_0x48511b(0x17a)](this[_0x48511b(0x1b6)][_0x48511b(0x1ba)][_0x48511b(0x17b)](_0x3bb693(0x10))[_0x48511b(0x171)](_0xc2e6f0=>{const _0x22dfe7=_0x48511b,_0xbf26e4=new Set();_0xc2e6f0[_0x22dfe7(0x1a7)](_0x33a795=>{const _0x309099=_0x22dfe7;switch(_0x33a795['type']){case _0x309099(0x1aa):{const _0x21be9f=_0x33a795[_0x309099(0x191)][_0x309099(0x17d)];_0xbf26e4['add'](_0x21be9f);break;}}}),B(this['_injector'],_0xbf26e4);}));}['_init'](){const _0xa3329a=_0x527767;this[_0xa3329a(0x17a)](this[_0xa3329a(0x16b)][_0xa3329a(0x1ba)][_0xa3329a(0x171)](async _0x43665c=>{const _0x5ee830=_0xa3329a;var _0x3c21cf,_0x488ba8,_0x345a50,_0x305063;const _0x8e1980=(_0x3c21cf=this[_0x5ee830(0x1b6)][_0x5ee830(0x18d)](_0x43665c[_0x5ee830(0x1a5)])[_0x5ee830(0x1a3)](_0x1358b8=>_0x1358b8['threadId']===_0x43665c[_0x5ee830(0x16a)]))==null?void 0x0:_0x3c21cf[_0x5ee830(0x193)];if(!_0x8e1980)return;const {unitId:_0x1c2333,subUnitId:_0x443cfc}=_0x8e1980;switch(_0x43665c[_0x5ee830(0x19f)]&&this['_userService'][_0x5ee830(0x165)](_0x43665c[_0x5ee830(0x19f)]),_0x43665c[_0x5ee830(0x164)]){case v['Add']:break;case v[_0x5ee830(0x162)]:{this[_0x5ee830(0x1b6)][_0x5ee830(0x1a4)](_0x1c2333,_0x443cfc,{'unitId':_0x1c2333,'subUnitId':_0x443cfc,'ref':'','id':_0x43665c[_0x5ee830(0x1bb)],'dT':D(+_0x43665c[_0x5ee830(0x168)]),'threadId':_0x43665c[_0x5ee830(0x16a)],'personId':(_0x345a50=(_0x488ba8=_0x43665c[_0x5ee830(0x19f)])==null?void 0x0:_0x488ba8[_0x5ee830(0x1a1)])!=null?_0x345a50:_0x43665c[_0x5ee830(0x1b3)],'text':JSON[_0x5ee830(0x185)](_0x43665c[_0x5ee830(0x1bd)]),'parentId':_0x8e1980['id']});break;}case v[_0x5ee830(0x1b2)]:{const _0x31fd53=this[_0x5ee830(0x1b6)][_0x5ee830(0x1b9)](_0x1c2333,_0x443cfc,_0x43665c[_0x5ee830(0x1bb)]);_0x31fd53&&_0x31fd53['parentId']&&this[_0x5ee830(0x1b6)][_0x5ee830(0x184)](_0x1c2333,_0x443cfc,_0x43665c[_0x5ee830(0x1bb)]);break;}case v['Edit']:{this['_threadCommentModel']['updateComment'](_0x1c2333,_0x443cfc,{'commentId':_0x43665c['replyId'],'text':JSON[_0x5ee830(0x185)](_0x43665c[_0x5ee830(0x1bd)])});break;}case v['Solve']:{const _0x20664a=(_0x305063=this['_threadCommentModel'][_0x5ee830(0x18d)](_0x43665c['unitId'])[_0x5ee830(0x1a3)](_0x553fa6=>_0x553fa6[_0x5ee830(0x16a)]===_0x43665c[_0x5ee830(0x16a)]))==null?void 0x0:_0x305063[_0x5ee830(0x193)];_0x20664a&&this[_0x5ee830(0x1b6)][_0x5ee830(0x158)](_0x1c2333,_0x443cfc,_0x20664a['id'],_0x43665c['solved']===I[_0x5ee830(0x19b)]);break;}}}));}};S=V([p(0x0,_0x298b9b(_0x33030c)),p(0x1,_0x298b9b(_0x48925f)),p(0x2,_0x298b9b(_0x2a03b2)),p(0x3,_0x298b9b(_0x188a2e))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x527767(0x19a)],Q=(_0xb0ae78,_0x3c42c7,_0x331113,_0x5ec32c)=>{const _0x4b50f8=_0x527767;for(var _0x53678e=_0x5ec32c>0x1?void 0x0:_0x5ec32c?k(_0x3c42c7,_0x331113):_0x3c42c7,_0x4cb368=_0xb0ae78[_0x4b50f8(0x192)]-0x1,_0x11f49f;_0x4cb368>=0x0;_0x4cb368--)(_0x11f49f=_0xb0ae78[_0x4cb368])&&(_0x53678e=_0x11f49f(_0x53678e)||_0x53678e);return _0x53678e;},_=(_0x5bd9d8,_0x3a7aa5)=>(_0x37c8b4,_0x230bbd)=>_0x3a7aa5(_0x37c8b4,_0x230bbd,_0x5bd9d8);function X(_0x2ca9fc,_0x2e1ebd){const _0x2704af=_0x527767,_0x5b76a4=_0x2ca9fc[_0x2704af(0x18b)][0x0];return{..._0x2e1ebd,'id':_0x5b76a4[_0x2704af(0x1bb)],'resolved':_0x2ca9fc['solved']===0x1,'dT':D(_0x5b76a4[_0x2704af(0x168)]),'personId':_0x5b76a4['userId'],'threadId':_0x5b76a4[_0x2704af(0x16a)]};}function ee(_0x569de8,_0x2e8e13,_0x1a25f4){const _0x21b7a3=_0x527767;var _0x5b3c39,_0x584ecd;if(((_0x584ecd=(_0x5b3c39=_0x569de8==null?void 0x0:_0x569de8[_0x21b7a3(0x18b)])==null?void 0x0:_0x5b3c39[_0x21b7a3(0x192)])!=null?_0x584ecd:0x0)>0x0){const _0x5819a2=(_0x1713e1,_0x3d9cde)=>({'id':_0x1713e1[_0x21b7a3(0x1bb)],'threadId':_0x1713e1[_0x21b7a3(0x16a)],'dT':D(_0x1713e1[_0x21b7a3(0x168)]),'personId':_0x1713e1[_0x21b7a3(0x1b3)],'resolved':_0x569de8[_0x21b7a3(0x167)]===I[_0x21b7a3(0x19b)],'unitId':_0x2e8e13,'subUnitId':_0x1a25f4,'text':JSON[_0x21b7a3(0x185)](_0x1713e1['content']),'parentId':_0x3d9cde}),_0x3bd0ee=_0x5819a2(_0x569de8[_0x21b7a3(0x18b)][0x0]);return{..._0x3bd0ee,'children':_0x569de8[_0x21b7a3(0x18b)][_0x21b7a3(0x174)](0x1)[_0x21b7a3(0x16e)](_0x2ba99f=>_0x5819a2(_0x2ba99f,_0x3bd0ee['id']))};}return null;}function _0x4c7b(){const _0x144c31=['_config','_userService','comments','saveCommentToSnapshot','reply','deleteComment','parse','COMMENT','4361988BXbpWV','resolved','error','symbol','replies','rangeType','getUnit','Edit','requireSession','customRanges','payload','length','root','603HhyIZH','7679376utKufS','210EMWCBx','filter','get','/universer-api/comment/unit/','getOwnPropertyDescriptor','Solved','pluginName','_init','24wfzHxd','user','29228GgQwQi','userID','_httpService','find','addComment','unitId','139832HQkXNh','forEach','/universer-api/user/list','getMemberID','add','values','comment','/edit','_sessionService','/add','dataSource','Unknown','Delete','userId','Add','28KvzsTG','_threadCommentModel','_threadCommentDataSourceService','_injector','getComment','commentUpdate$','replyId','onReady','content','onStarting','resolveComment','stringify','delete','OpenOrReOpen','390495dZAomR','/delete','post','users','/reply','code','Reply','UNRECOGNIZED','type','addUser','rangeId','solved','createTimestamp','_initDataSource','threadId','_commentService','body','syncUpdateMutationToColla','map','YYYY/MM/DD\x20HH:mm','2PCluWO','subscribe','192488GVZadU','/list','slice','size','_initUserSync','_threadCommentDataSource','updateComment','format','disposeWithMe','pipe','613063aeTcYr','personId','setConfig'];_0x4c7b=function(){return _0x144c31;};return _0x4c7b();}let f=class{constructor(_0x169bbb,_0x292ce7,_0x103462,_0x50af1b){const _0x250db4=_0x527767;this['_httpService']=_0x169bbb,this[_0x250db4(0x180)]=_0x292ce7,this[_0x250db4(0x1ae)]=_0x103462,this[_0x250db4(0x1b8)]=_0x50af1b;}async[_0x527767(0x1a4)](_0x29e6ef){const _0x1c646a=_0x527767;var _0x66c4de,_0x5e90a8;const {parentId:_0x5c7803,unitId:_0x3282c3,text:_0xe718ec,threadId:_0x5dc93a}=_0x29e6ef,_0x364c01=(_0x5e90a8=(_0x66c4de=_0xe718ec['customRanges'])==null?void 0x0:_0x66c4de['filter'](_0x438150=>_0x438150['rangeType']===_0x3da30b[_0x1c646a(0x186)])['map'](_0x23400d=>_0x23400d['rangeId']))!=null?_0x5e90a8:[],_0x8f024=JSON[_0x1c646a(0x159)](_0xe718ec),_0x15accd=(await this[_0x1c646a(0x1ae)][_0x1c646a(0x18f)](_0x3282c3))[_0x1c646a(0x1a9)]();if(_0x5c7803){const _0x55efec={'memberId':_0x15accd,'unitId':_0x3282c3,'content':_0x8f024,'mention':_0x364c01,'threadId':_0x5dc93a},_0x4d190d=(await this['_httpService'][_0x1c646a(0x15e)](_0x1c646a(0x199)+_0x3282c3+_0x1c646a(0x160),{'body':_0x55efec}))[_0x1c646a(0x16c)][_0x1c646a(0x183)];return{..._0x29e6ef,'id':_0x4d190d[_0x1c646a(0x1bb)],'dT':_0xc6c96a(+_0x4d190d[_0x1c646a(0x168)])['format'](_0x1c646a(0x16f)),'personId':_0x4d190d[_0x1c646a(0x1b3)]};}else{const _0x1c0793={'memberId':_0x15accd,'unitId':_0x3282c3,'content':_0x8f024,'mention':_0x364c01},_0x488855=await this['_httpService'][_0x1c646a(0x15e)](_0x1c646a(0x199)+_0x3282c3+_0x1c646a(0x1af),{'body':_0x1c0793});return X(_0x488855[_0x1c646a(0x16c)][_0x1c646a(0x1ac)],_0x29e6ef);}}async[_0x527767(0x178)](_0x4604ca){const _0x464c29=_0x527767;var _0xf96145,_0x55227d;const {text:_0x5921d5,unitId:_0x47c9f6}=_0x4604ca,_0x399b5a=(_0x55227d=(_0xf96145=_0x5921d5[_0x464c29(0x190)])==null?void 0x0:_0xf96145[_0x464c29(0x197)](_0x2340ab=>_0x2340ab[_0x464c29(0x18c)]===_0x3da30b['COMMENT'])['map'](_0x512aa7=>_0x512aa7[_0x464c29(0x166)]))!=null?_0x55227d:[],_0x1336b7=JSON[_0x464c29(0x159)](_0x5921d5),_0x1a3543=_0x4604ca['threadId'],_0x2d3d4a=_0x4604ca['id'],_0x4b426b={'memberId':(await this[_0x464c29(0x1ae)]['requireSession'](_0x47c9f6))['getMemberID'](),'unitId':_0x47c9f6,'threadId':_0x1a3543,'mention':_0x399b5a,'content':_0x1336b7,'replyId':_0x2d3d4a},_0x5edef3=await this[_0x464c29(0x1a2)][_0x464c29(0x15e)](_0x464c29(0x199)+_0x47c9f6+_0x464c29(0x1ad),{'body':_0x4b426b});return!_0x5edef3[_0x464c29(0x16c)]['error']||_0x5edef3[_0x464c29(0x16c)][_0x464c29(0x189)][_0x464c29(0x161)]===0x1;}async[_0x527767(0x158)](_0x49fbc0){const _0x55b4ec=_0x527767,{unitId:_0x3a801d}=_0x49fbc0,_0x48eb2b=_0x49fbc0[_0x55b4ec(0x16a)],_0xdceeb0={'memberId':this['_userService']['getCurrentUser']()[_0x55b4ec(0x1a1)],'unitId':_0x3a801d,'threadId':_0x48eb2b,'solved':_0x49fbc0[_0x55b4ec(0x188)]?I['Solved']:I[_0x55b4ec(0x15b)]},_0x424a30=await this[_0x55b4ec(0x1a2)][_0x55b4ec(0x15e)](_0x55b4ec(0x199)+_0x3a801d+'/solved',{'body':_0xdceeb0});return!_0x424a30[_0x55b4ec(0x16c)][_0x55b4ec(0x189)]||_0x424a30['body'][_0x55b4ec(0x189)][_0x55b4ec(0x161)]===0x1;}async[_0x527767(0x184)](_0x9d3c5a,_0x22b690,_0x111bd8,_0x1b65d8){const _0x4dc0a4=_0x527767,_0x3d12b9={'memberId':(await this[_0x4dc0a4(0x1ae)][_0x4dc0a4(0x18f)](_0x9d3c5a))[_0x4dc0a4(0x1a9)](),'threadId':_0x111bd8,'replyId':_0x1b65d8,'unitId':_0x9d3c5a},_0x39c706=await this[_0x4dc0a4(0x1a2)][_0x4dc0a4(0x15e)]('/universer-api/comment/unit/'+_0x9d3c5a+_0x4dc0a4(0x15d),{'body':_0x3d12b9});return!_0x39c706[_0x4dc0a4(0x16c)][_0x4dc0a4(0x189)]||_0x39c706[_0x4dc0a4(0x16c)][_0x4dc0a4(0x189)]['code']===0x1;}async['listComments'](_0x2c1d91,_0x3b59f2,_0x1bb685){const _0x2e642a=_0x527767,_0x19d376={'unitId':_0x2c1d91,'threadId':_0x1bb685},_0x12e729=await this['_httpService'][_0x2e642a(0x15e)]('/universer-api/comment/unit/'+_0x2c1d91+_0x2e642a(0x173),{'body':_0x19d376}),_0x44c586=_0x1bb685[_0x2e642a(0x16e)](_0x5a0795=>ee(_0x12e729[_0x2e642a(0x16c)][_0x2e642a(0x181)][_0x5a0795],_0x2c1d91,_0x3b59f2))[_0x2e642a(0x197)](Boolean);return Object[_0x2e642a(0x1ab)](_0x12e729[_0x2e642a(0x16c)][_0x2e642a(0x15f)])[_0x2e642a(0x1a7)](_0x2b1359=>{const _0x3f3e9a=_0x2e642a;this[_0x3f3e9a(0x180)]['addUser'](_0x2b1359);}),_0x44c586;}[_0x527767(0x182)](_0x38a2bb){const _0x50bbc5=_0x527767;return{'id':_0x38a2bb['id'],'threadId':_0x38a2bb[_0x50bbc5(0x16a)],'ref':_0x38a2bb['ref']};}};f=Q([_(0x0,_0x298b9b(_0x16b7e8)),_(0x1,_0x298b9b(_0x2a03b2)),_(0x2,_0x298b9b(_0x2bd9c2)),_(0x3,_0x298b9b(_0x188a2e))],f);var re=Object[_0x527767(0x19a)],te=(_0x1aca44,_0x2d955a,_0x41ddfb,_0x31f1a8)=>{const _0x1d9729=_0x527767;for(var _0x1515a6=_0x31f1a8>0x1?void 0x0:_0x31f1a8?re(_0x2d955a,_0x41ddfb):_0x2d955a,_0x15ca7e=_0x1aca44[_0x1d9729(0x192)]-0x1,_0x149e13;_0x15ca7e>=0x0;_0x15ca7e--)(_0x149e13=_0x1aca44[_0x15ca7e])&&(_0x1515a6=_0x149e13(_0x1515a6)||_0x1515a6);return _0x1515a6;},N=(_0x29e0ba,_0x379c71)=>(_0x1b7ff4,_0x270555)=>_0x379c71(_0x1b7ff4,_0x270555,_0x29e0ba);let g=class extends _0x122226{constructor(_0x2ae41e,_0x7e696a){const _0x2aa78b=_0x527767;super(),this[_0x2aa78b(0x1b7)]=_0x2ae41e,this['_threadCommentDataSource']=_0x7e696a,this['_initDataSource']();}[_0x527767(0x169)](){const _0x20554e=_0x527767;this[_0x20554e(0x1b7)][_0x20554e(0x1b0)]=this[_0x20554e(0x177)],this['_threadCommentDataSourceService'][_0x20554e(0x16d)]=!0x1;}};g=te([N(0x0,_0x22bfe1),N(0x1,_0x298b9b(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x77968f,_0x19a188,_0x46effd)=>_0x19a188 in _0x77968f?se(_0x77968f,_0x19a188,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x46effd}):_0x77968f[_0x19a188]=_0x46effd,ie=(_0x2e6daa,_0x40ab2a,_0x586c89,_0xff908d)=>{for(var _0x4d20f1=_0xff908d>0x1?void 0x0:_0xff908d?oe(_0x40ab2a,_0x586c89):_0x40ab2a,_0x2da7a5=_0x2e6daa['length']-0x1,_0x298a86;_0x2da7a5>=0x0;_0x2da7a5--)(_0x298a86=_0x2e6daa[_0x2da7a5])&&(_0x4d20f1=_0x298a86(_0x4d20f1)||_0x4d20f1);return _0x4d20f1;},w=(_0x54c4ad,_0x1fcb99)=>(_0x274831,_0x571749)=>_0x1fcb99(_0x274831,_0x571749,_0x54c4ad),$=(_0x42610a,_0x28372a,_0x312d8d)=>ne(_0x42610a,typeof _0x28372a!=_0x527767(0x18a)?_0x28372a+'':_0x28372a,_0x312d8d);let b=class extends _0x2c1efc{constructor(_0x4abead=M,_0x33ee57,_0x5ccdc9){const _0x58cf07=_0x527767;super(),this[_0x58cf07(0x17f)]=_0x4abead,this[_0x58cf07(0x1b8)]=_0x33ee57,this['_configService']=_0x5ccdc9;const {..._0x1c04ed}=_0x53f88d({},M,this[_0x58cf07(0x17f)]);this['_configService'][_0x58cf07(0x17e)](z,_0x1c04ed);}[_0x527767(0x1be)](){const _0x382838=_0x527767;[[f],[g],[S]][_0x382838(0x1a7)](_0x4c403d=>{const _0x5e2662=_0x382838;this[_0x5e2662(0x1b8)][_0x5e2662(0x1aa)](_0x4c403d);});}[_0x527767(0x1bc)](){const _0x1b59c4=_0x527767;this['_injector'][_0x1b59c4(0x198)](g),this[_0x1b59c4(0x1b8)][_0x1b59c4(0x198)](S);}};function _0x31d8(_0x1f90fd,_0xcbacba){const _0x4c7bdb=_0x4c7b();return _0x31d8=function(_0x31d8d2,_0x391ecf){_0x31d8d2=_0x31d8d2-0x158;let _0x1212ac=_0x4c7bdb[_0x31d8d2];return _0x1212ac;},_0x31d8(_0x1f90fd,_0xcbacba);}$(b,_0x527767(0x19c),W),$(b,_0x527767(0x164),_0x49b1ca['UNIVER_UNKNOWN']),b=ie([_0x56b124(_0x452024,_0x1d440a,_0x4ae0c4),w(0x1,_0x298b9b(_0x188a2e)),w(0x2,_0xc5891e)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x3e85c4,_0x3de6e6){const _0xef7b96=_0x28a8,_0x580c=_0x3e85c4();while(!![]){try{const _0x1b8774=parseInt(_0xef7b96(0x19e))/0x1+parseInt(_0xef7b96(0x1c3))/0x2+parseInt(_0xef7b96(0x1d7))/0x3*(parseInt(_0xef7b96(0x159))/0x4)+-parseInt(_0xef7b96(0x16f))/0x5+parseInt(_0xef7b96(0x1b0))/0x6+parseInt(_0xef7b96(0x1a2))/0x7*(-parseInt(_0xef7b96(0x16a))/0x8)+-parseInt(_0xef7b96(0x1b9))/0x9;if(_0x1b8774===_0x3de6e6)break;else _0x580c['push'](_0x580c['shift']());}catch(_0x302887){_0x580c['push'](_0x580c['shift']());}}}(_0x33c2,0x7905b),function(_0x2f7f4e,_0x5c76c9){const _0x5c74f3=_0x28a8;typeof exports==_0x5c74f3(0x1d1)&&typeof module<'u'?_0x5c76c9(exports,require('@univerjs-pro/collaboration-client'),require(_0x5c74f3(0x192)),require(_0x5c74f3(0x1c8)),require(_0x5c74f3(0x188)),require(_0x5c74f3(0x1ac)),require(_0x5c74f3(0x15a)),require(_0x5c74f3(0x184))):typeof define==_0x5c74f3(0x1ce)&&define[_0x5c74f3(0x16b)]?define([_0x5c74f3(0x197),_0x5c74f3(0x196),_0x5c74f3(0x192),_0x5c74f3(0x1c8),_0x5c74f3(0x188),'@univerjs/thread-comment',_0x5c74f3(0x15a),_0x5c74f3(0x184)],_0x5c76c9):(_0x2f7f4e=typeof globalThis<'u'?globalThis:_0x2f7f4e||self,_0x5c76c9(_0x2f7f4e[_0x5c74f3(0x15c)]={},_0x2f7f4e[_0x5c74f3(0x1d4)],_0x2f7f4e[_0x5c74f3(0x17b)],_0x2f7f4e[_0x5c74f3(0x1b6)],_0x2f7f4e[_0x5c74f3(0x1c2)],_0x2f7f4e[_0x5c74f3(0x16c)],_0x2f7f4e['rxjs'],_0x2f7f4e['UniverNetwork']));}(this,function(_0x5aef6a,_0x4b7c90,_0x4ce647,_0xc82365,_0x3aebb4,_0x435464,_0x23220a,_0x481c25){'use strict';const _0x3f3b9e=_0x28a8;const _0x3b43ae='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x218ff7=(_0x3795d4=>(_0x3795d4[_0x3795d4['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x3795d4[_0x3795d4[_0x3f3b9e(0x1cf)]=0x1]='Solved',_0x3795d4[_0x3795d4[_0x3f3b9e(0x19d)]=-0x1]=_0x3f3b9e(0x19d),_0x3795d4))(_0x218ff7||{}),_0x3d72d3=(_0x397a5b=>(_0x397a5b[_0x397a5b[_0x3f3b9e(0x18a)]=0x0]=_0x3f3b9e(0x18a),_0x397a5b[_0x397a5b['Add']=0x1]='Add',_0x397a5b[_0x397a5b[_0x3f3b9e(0x18b)]=0x2]=_0x3f3b9e(0x18b),_0x397a5b[_0x397a5b[_0x3f3b9e(0x17f)]=0x3]=_0x3f3b9e(0x17f),_0x397a5b[_0x397a5b['Delete']=0x4]=_0x3f3b9e(0x183),_0x397a5b[_0x397a5b[_0x3f3b9e(0x1b3)]=0x5]=_0x3f3b9e(0x1b3),_0x397a5b[_0x397a5b['UNRECOGNIZED']=-0x1]=_0x3f3b9e(0x19d),_0x397a5b))(_0x3d72d3||{});const _0x459464=_0x2fd0ef=>_0xc82365[_0x3f3b9e(0x165)](new Date(+_0x2fd0ef))[_0x3f3b9e(0x1c7)]('YYYY/MM/DD\x20HH:mm'),_0x4e28a8=async(_0x531bc8,_0xb67f52)=>{const _0x44393e=_0x3f3b9e,_0x45a7d6=_0x531bc8[_0x44393e(0x1b4)](_0xc82365[_0x44393e(0x176)]),_0x21e21b=_0x531bc8[_0x44393e(0x1b4)](_0x481c25['HTTPService']);_0xb67f52[_0x44393e(0x168)](_0x3a8aa9=>{const _0x10bc45=_0x44393e;_0x45a7d6[_0x10bc45(0x15d)](_0x3a8aa9)&&_0xb67f52[_0x10bc45(0x1b5)](_0x3a8aa9);}),_0xb67f52[_0x44393e(0x1b7)]&&(await _0x21e21b[_0x44393e(0x1b4)](_0x44393e(0x171),{'params':{'userIDs':[..._0xb67f52]}}))[_0x44393e(0x1ab)][_0x44393e(0x18d)][_0x44393e(0x168)](_0x5c9ea0=>{const _0x4535dc=_0x44393e;_0x5c9ea0&&_0x45a7d6[_0x4535dc(0x160)](_0x5c9ea0);});};var _0x355be8=Object['getOwnPropertyDescriptor'],_0x4b6d93=(_0x393446,_0x504de5,_0x71356f,_0xcb97ec)=>{const _0x2005ef=_0x3f3b9e;for(var _0x511071=_0xcb97ec>0x1?void 0x0:_0xcb97ec?_0x355be8(_0x504de5,_0x71356f):_0x504de5,_0xe6daee=_0x393446[_0x2005ef(0x1ca)]-0x1,_0x3bff48;_0xe6daee>=0x0;_0xe6daee--)(_0x3bff48=_0x393446[_0xe6daee])&&(_0x511071=_0x3bff48(_0x511071)||_0x511071);return _0x511071;},_0x1d6953=(_0x1fd698,_0x135ae5)=>(_0x41b58a,_0x401ae0)=>_0x135ae5(_0x41b58a,_0x401ae0,_0x1fd698);let _0x19aef7=class extends _0xc82365[_0x3f3b9e(0x174)]{constructor(_0x99e13e,_0x482823,_0x8cae33,_0x4a6ec7){const _0x363f16=_0x3f3b9e;super(),this[_0x363f16(0x1c6)]=_0x99e13e,this[_0x363f16(0x179)]=_0x482823,this[_0x363f16(0x1c5)]=_0x8cae33,this[_0x363f16(0x186)]=_0x4a6ec7,this[_0x363f16(0x177)](),this[_0x363f16(0x181)]();}[_0x3f3b9e(0x181)](){const _0x34c16f=_0x3f3b9e;this[_0x34c16f(0x1a9)](this['_threadCommentModel'][_0x34c16f(0x17d)][_0x34c16f(0x17a)](_0x23220a['bufferTime'](0x10))[_0x34c16f(0x175)](_0x226139=>{const _0xa8fdbb=_0x34c16f,_0x2ec085=new Set();_0x226139['forEach'](_0x1e117f=>{const _0x3486db=_0x28a8;switch(_0x1e117f[_0x3486db(0x1a8)]){case'add':{const _0x3cad25=_0x1e117f[_0x3486db(0x19a)][_0x3486db(0x16d)];_0x2ec085['add'](_0x3cad25);break;}}}),_0x4e28a8(this[_0xa8fdbb(0x186)],_0x2ec085);}));}[_0x3f3b9e(0x177)](){const _0xbd0cc6=_0x3f3b9e;this[_0xbd0cc6(0x1a9)](this['_commentService'][_0xbd0cc6(0x17d)][_0xbd0cc6(0x175)](async _0x5e67df=>{const _0x3d1a1e=_0xbd0cc6;var _0x2b4670,_0x5bb884,_0x4c3843,_0x2a07bf;const _0x27e400=(_0x2b4670=this['_threadCommentModel'][_0x3d1a1e(0x1c0)](_0x5e67df[_0x3d1a1e(0x1b1)])['find'](_0x4b7d00=>_0x4b7d00[_0x3d1a1e(0x1d2)]===_0x5e67df['threadId']))==null?void 0x0:_0x2b4670[_0x3d1a1e(0x178)];if(!_0x27e400)return;const {unitId:_0x1a08ef,subUnitId:_0x22ca85}=_0x27e400;switch(_0x5e67df['user']&&this[_0x3d1a1e(0x1c5)]['addUser'](_0x5e67df['user']),_0x5e67df[_0x3d1a1e(0x1a8)]){case _0x3d72d3[_0x3d1a1e(0x17e)]:break;case _0x3d72d3[_0x3d1a1e(0x18b)]:{this[_0x3d1a1e(0x179)]['addComment'](_0x1a08ef,_0x22ca85,{'unitId':_0x1a08ef,'subUnitId':_0x22ca85,'ref':'','id':_0x5e67df[_0x3d1a1e(0x18e)],'dT':_0x459464(+_0x5e67df[_0x3d1a1e(0x163)]),'threadId':_0x5e67df[_0x3d1a1e(0x1d2)],'personId':(_0x4c3843=(_0x5bb884=_0x5e67df[_0x3d1a1e(0x1a0)])==null?void 0x0:_0x5bb884['userID'])!=null?_0x4c3843:_0x5e67df[_0x3d1a1e(0x18f)],'text':JSON['parse'](_0x5e67df[_0x3d1a1e(0x1a3)]),'parentId':_0x27e400['id']});break;}case _0x3d72d3['Delete']:{const _0x232450=this['_threadCommentModel'][_0x3d1a1e(0x15e)](_0x1a08ef,_0x22ca85,_0x5e67df[_0x3d1a1e(0x18e)]);_0x232450&&_0x232450[_0x3d1a1e(0x189)]&&this['_threadCommentModel']['deleteComment'](_0x1a08ef,_0x22ca85,_0x5e67df['replyId']);break;}case _0x3d72d3['Edit']:{this[_0x3d1a1e(0x179)]['updateComment'](_0x1a08ef,_0x22ca85,{'commentId':_0x5e67df['replyId'],'text':JSON[_0x3d1a1e(0x1cb)](_0x5e67df['content'])});break;}case _0x3d72d3[_0x3d1a1e(0x1b3)]:{const _0x1489c2=(_0x2a07bf=this[_0x3d1a1e(0x179)][_0x3d1a1e(0x1c0)](_0x5e67df[_0x3d1a1e(0x1b1)])[_0x3d1a1e(0x1d3)](_0x506095=>_0x506095['threadId']===_0x5e67df[_0x3d1a1e(0x1d2)]))==null?void 0x0:_0x2a07bf[_0x3d1a1e(0x178)];_0x1489c2&&this['_threadCommentModel']['resolveComment'](_0x1a08ef,_0x22ca85,_0x1489c2['id'],_0x5e67df[_0x3d1a1e(0x1ba)]===_0x218ff7[_0x3d1a1e(0x1cf)]);break;}}}));}};_0x19aef7=_0x4b6d93([_0x1d6953(0x0,_0xc82365[_0x3f3b9e(0x1bf)](_0x4b7c90['CommentService'])),_0x1d6953(0x1,_0xc82365[_0x3f3b9e(0x1bf)](_0x435464[_0x3f3b9e(0x1b2)])),_0x1d6953(0x2,_0xc82365[_0x3f3b9e(0x1bf)](_0xc82365[_0x3f3b9e(0x176)])),_0x1d6953(0x3,_0xc82365[_0x3f3b9e(0x1bf)](_0xc82365['Injector']))],_0x19aef7);const _0x18bcdf=_0x3f3b9e(0x166),_0x13396e={};var _0x40ea8d=Object['getOwnPropertyDescriptor'],_0x491e56=(_0x34730e,_0x457988,_0x5f345b,_0x248e55)=>{for(var _0x3b4d9b=_0x248e55>0x1?void 0x0:_0x248e55?_0x40ea8d(_0x457988,_0x5f345b):_0x457988,_0x27ca2e=_0x34730e['length']-0x1,_0x390415;_0x27ca2e>=0x0;_0x27ca2e--)(_0x390415=_0x34730e[_0x27ca2e])&&(_0x3b4d9b=_0x390415(_0x3b4d9b)||_0x3b4d9b);return _0x3b4d9b;},_0xce3454=(_0x4635f3,_0x40fddd)=>(_0x8ef1a8,_0x1010c5)=>_0x40fddd(_0x8ef1a8,_0x1010c5,_0x4635f3);function _0x253b60(_0x28cb3d,_0x3de7e8){const _0x530142=_0x3f3b9e,_0x4539ce=_0x28cb3d['replies'][0x0];return{..._0x3de7e8,'id':_0x4539ce[_0x530142(0x18e)],'resolved':_0x28cb3d[_0x530142(0x1ba)]===0x1,'dT':_0x459464(_0x4539ce[_0x530142(0x163)]),'personId':_0x4539ce[_0x530142(0x18f)],'threadId':_0x4539ce[_0x530142(0x1d2)]};}function _0x28bd6c(_0x4b8cf1,_0x3cd23f,_0x5efa1b){const _0xa1184b=_0x3f3b9e;var _0x1f91ab,_0x2e77c9;if(((_0x2e77c9=(_0x1f91ab=_0x4b8cf1==null?void 0x0:_0x4b8cf1['replies'])==null?void 0x0:_0x1f91ab['length'])!=null?_0x2e77c9:0x0)>0x0){const _0xf30381=(_0x26eb60,_0x5af123)=>({'id':_0x26eb60[_0xa1184b(0x18e)],'threadId':_0x26eb60[_0xa1184b(0x1d2)],'dT':_0x459464(_0x26eb60[_0xa1184b(0x163)]),'personId':_0x26eb60['userId'],'resolved':_0x4b8cf1[_0xa1184b(0x1ba)]===_0x218ff7[_0xa1184b(0x1cf)],'unitId':_0x3cd23f,'subUnitId':_0x5efa1b,'text':JSON[_0xa1184b(0x1cb)](_0x26eb60[_0xa1184b(0x1a3)]),'parentId':_0x5af123}),_0x3df7f5=_0xf30381(_0x4b8cf1[_0xa1184b(0x1c1)][0x0]);return{..._0x3df7f5,'children':_0x4b8cf1['replies'][_0xa1184b(0x164)](0x1)[_0xa1184b(0x1d6)](_0x354af2=>_0xf30381(_0x354af2,_0x3df7f5['id']))};}return null;}let _0x1ee8ec=class{constructor(_0x32acde,_0x3af678,_0x97b383,_0x5cdeb2){const _0x25cabb=_0x3f3b9e;this[_0x25cabb(0x1cc)]=_0x32acde,this[_0x25cabb(0x1c5)]=_0x3af678,this['_sessionService']=_0x97b383,this[_0x25cabb(0x186)]=_0x5cdeb2;}async['addComment'](_0x1053b2){const _0x439a09=_0x3f3b9e;var _0x577abc,_0x2b47a3;const {parentId:_0x401a07,unitId:_0x292e06,text:_0x427d19,threadId:_0x1576e6}=_0x1053b2,_0xa08641=(_0x2b47a3=(_0x577abc=_0x427d19[_0x439a09(0x1a7)])==null?void 0x0:_0x577abc['filter'](_0x48b17a=>_0x48b17a['rangeType']===_0xc82365[_0x439a09(0x1a1)][_0x439a09(0x1cd)])['map'](_0x1ac5df=>_0x1ac5df[_0x439a09(0x172)]))!=null?_0x2b47a3:[],_0x738c3=JSON[_0x439a09(0x17c)](_0x427d19),_0x52bf9e=(await this[_0x439a09(0x180)][_0x439a09(0x199)](_0x292e06))['getMemberID']();if(_0x401a07){const _0xd4d376={'memberId':_0x52bf9e,'unitId':_0x292e06,'content':_0x738c3,'mention':_0xa08641,'threadId':_0x1576e6},_0x1afd2d=(await this[_0x439a09(0x1cc)][_0x439a09(0x1a6)]('/universer-api/comment/unit/'+_0x292e06+_0x439a09(0x1b8),{'body':_0xd4d376}))[_0x439a09(0x1ab)][_0x439a09(0x1a5)];return{..._0x1053b2,'id':_0x1afd2d[_0x439a09(0x18e)],'dT':_0xc82365['dayjs'](+_0x1afd2d[_0x439a09(0x163)])[_0x439a09(0x1c7)](_0x439a09(0x1bd)),'personId':_0x1afd2d[_0x439a09(0x18f)]};}else{const _0x41609b={'memberId':_0x52bf9e,'unitId':_0x292e06,'content':_0x738c3,'mention':_0xa08641},_0x2bb7c0=await this['_httpService'][_0x439a09(0x1a6)](_0x439a09(0x19f)+_0x292e06+_0x439a09(0x1a4),{'body':_0x41609b});return _0x253b60(_0x2bb7c0[_0x439a09(0x1ab)]['comment'],_0x1053b2);}}async[_0x3f3b9e(0x18c)](_0x4c1ac0){const _0x164a6d=_0x3f3b9e;var _0x5bca94,_0x21852f;const {text:_0x2f9d28,unitId:_0x523c00}=_0x4c1ac0,_0x2c4ec2=(_0x21852f=(_0x5bca94=_0x2f9d28[_0x164a6d(0x1a7)])==null?void 0x0:_0x5bca94['filter'](_0x26094b=>_0x26094b[_0x164a6d(0x173)]===_0xc82365[_0x164a6d(0x1a1)][_0x164a6d(0x1cd)])[_0x164a6d(0x1d6)](_0x4d8949=>_0x4d8949['rangeId']))!=null?_0x21852f:[],_0x2b81fa=JSON[_0x164a6d(0x17c)](_0x2f9d28),_0x1cd74b=_0x4c1ac0['threadId'],_0x54f288=_0x4c1ac0['id'],_0x2e6f75={'memberId':(await this[_0x164a6d(0x180)]['requireSession'](_0x523c00))[_0x164a6d(0x169)](),'unitId':_0x523c00,'threadId':_0x1cd74b,'mention':_0x2c4ec2,'content':_0x2b81fa,'replyId':_0x54f288},_0x1ad429=await this[_0x164a6d(0x1cc)][_0x164a6d(0x1a6)](_0x164a6d(0x19f)+_0x523c00+_0x164a6d(0x16e),{'body':_0x2e6f75});return!_0x1ad429[_0x164a6d(0x1ab)]['error']||_0x1ad429['body'][_0x164a6d(0x1bb)][_0x164a6d(0x1aa)]===0x1;}async[_0x3f3b9e(0x162)](_0x126a55){const _0x415973=_0x3f3b9e,{unitId:_0x4edce6}=_0x126a55,_0x545032=_0x126a55[_0x415973(0x1d2)],_0x3c5b44={'memberId':this[_0x415973(0x1c5)]['getCurrentUser']()['userID'],'unitId':_0x4edce6,'threadId':_0x545032,'solved':_0x126a55['resolved']?_0x218ff7[_0x415973(0x1cf)]:_0x218ff7['OpenOrReOpen']},_0x5cbd0e=await this[_0x415973(0x1cc)][_0x415973(0x1a6)](_0x415973(0x19f)+_0x4edce6+_0x415973(0x167),{'body':_0x3c5b44});return!_0x5cbd0e[_0x415973(0x1ab)]['error']||_0x5cbd0e[_0x415973(0x1ab)]['error'][_0x415973(0x1aa)]===0x1;}async['deleteComment'](_0x4a98f4,_0xdb2860,_0x50c03e,_0x3a45f7){const _0x9dfb51=_0x3f3b9e,_0xc164b8={'memberId':(await this[_0x9dfb51(0x180)][_0x9dfb51(0x199)](_0x4a98f4))[_0x9dfb51(0x169)](),'threadId':_0x50c03e,'replyId':_0x3a45f7,'unitId':_0x4a98f4},_0x2b19ac=await this[_0x9dfb51(0x1cc)][_0x9dfb51(0x1a6)](_0x9dfb51(0x19f)+_0x4a98f4+'/delete',{'body':_0xc164b8});return!_0x2b19ac[_0x9dfb51(0x1ab)][_0x9dfb51(0x1bb)]||_0x2b19ac[_0x9dfb51(0x1ab)][_0x9dfb51(0x1bb)][_0x9dfb51(0x1aa)]===0x1;}async[_0x3f3b9e(0x1c9)](_0x569fe5,_0xd3a4a1,_0x2eec93){const _0x4770b3=_0x3f3b9e,_0x4029b1={'unitId':_0x569fe5,'threadId':_0x2eec93},_0x2b931d=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x569fe5+_0x4770b3(0x198),{'body':_0x4029b1}),_0x4f4664=_0x2eec93['map'](_0x2f08a7=>_0x28bd6c(_0x2b931d[_0x4770b3(0x1ab)][_0x4770b3(0x194)][_0x2f08a7],_0x569fe5,_0xd3a4a1))[_0x4770b3(0x187)](Boolean);return Object[_0x4770b3(0x170)](_0x2b931d[_0x4770b3(0x1ab)][_0x4770b3(0x18d)])['forEach'](_0x4a0d10=>{const _0x519539=_0x4770b3;this['_userService'][_0x519539(0x160)](_0x4a0d10);}),_0x4f4664;}['saveCommentToSnapshot'](_0x4bd6bb){const _0x574855=_0x3f3b9e;return{'id':_0x4bd6bb['id'],'threadId':_0x4bd6bb[_0x574855(0x1d2)],'ref':_0x4bd6bb['ref']};}};_0x1ee8ec=_0x491e56([_0xce3454(0x0,_0xc82365[_0x3f3b9e(0x1bf)](_0x481c25[_0x3f3b9e(0x1d5)])),_0xce3454(0x1,_0xc82365['Inject'](_0xc82365[_0x3f3b9e(0x176)])),_0xce3454(0x2,_0xc82365[_0x3f3b9e(0x1bf)](_0x4b7c90[_0x3f3b9e(0x190)])),_0xce3454(0x3,_0xc82365[_0x3f3b9e(0x1bf)](_0xc82365[_0x3f3b9e(0x15f)]))],_0x1ee8ec);var _0x180f3a=Object['getOwnPropertyDescriptor'],_0x343863=(_0x348e90,_0x3d654e,_0x59482a,_0x1ba828)=>{for(var _0x504ec2=_0x1ba828>0x1?void 0x0:_0x1ba828?_0x180f3a(_0x3d654e,_0x59482a):_0x3d654e,_0x1820a7=_0x348e90['length']-0x1,_0x414143;_0x1820a7>=0x0;_0x1820a7--)(_0x414143=_0x348e90[_0x1820a7])&&(_0x504ec2=_0x414143(_0x504ec2)||_0x504ec2);return _0x504ec2;},_0x55713f=(_0x4f6ef3,_0x54613f)=>(_0x40241a,_0x3a3f66)=>_0x54613f(_0x40241a,_0x3a3f66,_0x4f6ef3);let _0x4ce67b=class extends _0xc82365['Disposable']{constructor(_0x41b1a7,_0x17b06f){const _0x4d3625=_0x3f3b9e;super(),this['_threadCommentDataSourceService']=_0x41b1a7,this['_threadCommentDataSource']=_0x17b06f,this[_0x4d3625(0x1be)]();}[_0x3f3b9e(0x1be)](){const _0x53edf5=_0x3f3b9e;this[_0x53edf5(0x1af)]['dataSource']=this['_threadCommentDataSource'],this[_0x53edf5(0x1af)][_0x53edf5(0x1ae)]=!0x1;}};_0x4ce67b=_0x343863([_0x55713f(0x0,_0x435464[_0x3f3b9e(0x193)]),_0x55713f(0x1,_0xc82365[_0x3f3b9e(0x1bf)](_0x1ee8ec))],_0x4ce67b);var _0x88c4ae=Object[_0x3f3b9e(0x1c4)],_0x54ebfc=Object[_0x3f3b9e(0x185)],_0x1972d4=(_0x1ba96b,_0x3770d5,_0x22cd4c)=>_0x3770d5 in _0x1ba96b?_0x88c4ae(_0x1ba96b,_0x3770d5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x22cd4c}):_0x1ba96b[_0x3770d5]=_0x22cd4c,_0x32ec8a=(_0x11230d,_0x44e3c7,_0x272320,_0x4196da)=>{for(var _0x5bf3f6=_0x4196da>0x1?void 0x0:_0x4196da?_0x54ebfc(_0x44e3c7,_0x272320):_0x44e3c7,_0x4ed622=_0x11230d['length']-0x1,_0x182eb9;_0x4ed622>=0x0;_0x4ed622--)(_0x182eb9=_0x11230d[_0x4ed622])&&(_0x5bf3f6=_0x182eb9(_0x5bf3f6)||_0x5bf3f6);return _0x5bf3f6;},_0x1d369f=(_0x58c766,_0x36d79)=>(_0x460bd3,_0x3cdce3)=>_0x36d79(_0x460bd3,_0x3cdce3,_0x58c766),_0x2d65b0=(_0x7cc5e6,_0x3fb421,_0x5834cc)=>_0x1972d4(_0x7cc5e6,typeof _0x3fb421!='symbol'?_0x3fb421+'':_0x3fb421,_0x5834cc);_0x5aef6a[_0x3f3b9e(0x1bc)]=class extends _0xc82365['Plugin']{constructor(_0x100ff7=_0x13396e,_0x2a858a,_0x58553b){const _0x7af5ca=_0x3f3b9e;super(),this['_config']=_0x100ff7,this[_0x7af5ca(0x186)]=_0x2a858a,this['_configService']=_0x58553b;const {..._0x1bf34f}=_0xc82365[_0x7af5ca(0x1d0)]({},_0x13396e,this[_0x7af5ca(0x182)]);this[_0x7af5ca(0x191)][_0x7af5ca(0x161)](_0x18bcdf,_0x1bf34f);}['onStarting'](){[[_0x1ee8ec],[_0x4ce67b],[_0x19aef7]]['forEach'](_0x20aeb8=>{const _0xaceafa=_0x28a8;this[_0xaceafa(0x186)]['add'](_0x20aeb8);});}['onReady'](){const _0x691d06=_0x3f3b9e;this['_injector'][_0x691d06(0x1b4)](_0x4ce67b),this[_0x691d06(0x186)][_0x691d06(0x1b4)](_0x19aef7);}},_0x2d65b0(_0x5aef6a[_0x3f3b9e(0x1bc)],'pluginName',_0x3b43ae),_0x2d65b0(_0x5aef6a[_0x3f3b9e(0x1bc)],_0x3f3b9e(0x1a8),_0xc82365[_0x3f3b9e(0x195)]['UNIVER_UNKNOWN']),_0x5aef6a['UniverThreadCommentDataSourcePlugin']=_0x32ec8a([_0xc82365[_0x3f3b9e(0x15b)](_0x3aebb4[_0x3f3b9e(0x19b)],_0x4b7c90[_0x3f3b9e(0x158)],_0x4ce647[_0x3f3b9e(0x1ad)]),_0x1d369f(0x1,_0xc82365[_0x3f3b9e(0x1bf)](_0xc82365[_0x3f3b9e(0x15f)])),_0x1d369f(0x2,_0xc82365['IConfigService'])],_0x5aef6a[_0x3f3b9e(0x1bc)]),Object['defineProperty'](_0x5aef6a,Symbol[_0x3f3b9e(0x19c)],{'value':'Module'});}));function _0x28a8(_0x2a4037,_0x1b3767){const _0x33c242=_0x33c2();return _0x28a8=function(_0x28a88e,_0x1edbf0){_0x28a88e=_0x28a88e-0x158;let _0x103393=_0x33c242[_0x28a88e];return _0x103393;},_0x28a8(_0x2a4037,_0x1b3767);}function _0x33c2(){const _0x7089a0=['UniverCollaborationClientPlugin','28rBbWbe','rxjs','DependentOn','UniverProThreadCommentDatasource','getUser','getComment','Injector','addUser','setConfig','resolveComment','createTimestamp','slice','dayjs','thread-comment-data-source.config','/solved','forEach','getMemberID','3856sERCJM','amd','UniverThreadComment','personId','/edit','2356045LIMyPx','values','/universer-api/user/list','rangeId','rangeType','Disposable','subscribe','UserManagerService','_init','root','_threadCommentModel','pipe','UniverProLicense','stringify','commentUpdate$','Add','Edit','_sessionService','_initUserSync','_config','Delete','@univerjs/network','getOwnPropertyDescriptor','_injector','filter','@univerjs/thread-comment-ui','parentId','Unknown','Reply','updateComment','users','replyId','userId','CollaborationSessionService','_configService','@univerjs-pro/license','IThreadCommentDataSourceService','comments','UniverInstanceType','@univerjs-pro/collaboration-client','exports','/list','requireSession','payload','UniverThreadCommentUIPlugin','toStringTag','UNRECOGNIZED','640381xqOyQV','/universer-api/comment/unit/','user','CustomRangeType','10297EoTNGs','content','/add','reply','post','customRanges','type','disposeWithMe','code','body','@univerjs/thread-comment','UniverLicensePlugin','syncUpdateMutationToColla','_threadCommentDataSourceService','5785986JZWXHf','unitId','ThreadCommentModel','Solve','get','delete','UniverCore','size','/reply','6577938HiGudu','solved','error','UniverThreadCommentDataSourcePlugin','YYYY/MM/DD\x20HH:mm','_initDataSource','Inject','getUnit','replies','UniverThreadCommentUi','757202oKHMsj','defineProperty','_userService','_commentService','format','@univerjs/core','listComments','length','parse','_httpService','COMMENT','function','Solved','merge','object','threadId','find','UniverProCollaborationClient','HTTPService','map','181503MUrHEJ'];_0x33c2=function(){return _0x7089a0;};return _0x33c2();}
|
|
1
|
+
function _0x157f(_0x239edc,_0x12fd6f){const _0x36a908=_0x36a9();return _0x157f=function(_0x157f3b,_0x41b083){_0x157f3b=_0x157f3b-0x1e5;let _0x401679=_0x36a908[_0x157f3b];return _0x401679;},_0x157f(_0x239edc,_0x12fd6f);}function _0x36a9(){const _0x1c4573=['rangeId','toStringTag','content','Reply','get','map','add','2596HaqqMn','addUser','UserManagerService','solved','payload','pluginName','Injector','merge','filter','_config','find','1525072qgFYql','thread-comment-data-source.config','type','8727XquctO','getOwnPropertyDescriptor','defineProperty','object','Inject','_threadCommentDataSourceService','comments','rxjs','rangeType','110450WiXLjy','_initUserSync','unitId','getUnit','COMMENT','error','commentUpdate$','_sessionService','personId','onStarting','amd','function','replyId','Unknown','_threadCommentDataSource','@univerjs/core','/universer-api/user/list','@univerjs/thread-comment','customRanges','deleteComment','UniverProCollaborationClient','Edit','threadId','CommentService','/edit','UniverThreadCommentDataSourcePlugin','requireSession','getComment','/reply','182HxLUDL','473dZiinv','129000ZHwLxi','stringify','/universer-api/comment/unit/','Solve','getCurrentUser','resolveComment','body','9BPRRUo','saveCommentToSnapshot','getMemberID','getUser','updateComment','_configService','328345OWlqjr','@univerjs-pro/license','Module','comment','code','UniverInstanceType','676OuGDCS','/delete','replies','values','UniverCore','dayjs','parentId','IConfigService','reply','userId','Plugin','@univerjs/thread-comment-ui','IThreadCommentDataSourceService','userID','parse','UniverNetwork','/solved','root','disposeWithMe','_userService','Add','post','UniverProThreadCommentDatasource','UniverThreadCommentUi','_commentService','ref','_init','pipe','1300cnnjNX','onReady','forEach','CollaborationSessionService','UNRECOGNIZED','12XqxXIC','_httpService','createTimestamp','size','YYYY/MM/DD\x20HH:mm','_initDataSource','_threadCommentModel','setConfig','Disposable','Delete','Solved','1630930VqNUzV','length','DependentOn','users','user','format','subscribe','OpenOrReOpen','_injector'];_0x36a9=function(){return _0x1c4573;};return _0x36a9();}(function(_0x809a0d,_0x522cb2){const _0x24b017=_0x157f,_0x199afc=_0x809a0d();while(!![]){try{const _0x1c3df1=parseInt(_0x24b017(0x24e))/0x1*(parseInt(_0x24b017(0x21a))/0x2)+-parseInt(_0x24b017(0x228))/0x3*(parseInt(_0x24b017(0x263))/0x4)+parseInt(_0x24b017(0x25d))/0x5*(-parseInt(_0x24b017(0x1ff))/0x6)+parseInt(_0x24b017(0x20a))/0x7+parseInt(_0x24b017(0x225))/0x8*(-parseInt(_0x24b017(0x257))/0x9)+-parseInt(_0x24b017(0x231))/0xa*(parseInt(_0x24b017(0x24f))/0xb)+-parseInt(_0x24b017(0x250))/0xc*(-parseInt(_0x24b017(0x1fa))/0xd);if(_0x1c3df1===_0x522cb2)break;else _0x199afc['push'](_0x199afc['shift']());}catch(_0x3aa8b1){_0x199afc['push'](_0x199afc['shift']());}}}(_0x36a9,0x3e6d2),function(_0x4b6da4,_0xa1fcb6){const _0x74640d=_0x157f;typeof exports==_0x74640d(0x22b)&&typeof module<'u'?_0xa1fcb6(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require(_0x74640d(0x240)),require(_0x74640d(0x1e9)),require('@univerjs/thread-comment'),require(_0x74640d(0x22f)),require('@univerjs/network')):typeof define==_0x74640d(0x23c)&&define[_0x74640d(0x23b)]?define(['exports','@univerjs-pro/collaboration-client',_0x74640d(0x25e),'@univerjs/core',_0x74640d(0x1e9),_0x74640d(0x242),_0x74640d(0x22f),'@univerjs/network'],_0xa1fcb6):(_0x4b6da4=typeof globalThis<'u'?globalThis:_0x4b6da4||self,_0xa1fcb6(_0x4b6da4[_0x74640d(0x1f4)]={},_0x4b6da4[_0x74640d(0x245)],_0x4b6da4['UniverProLicense'],_0x4b6da4[_0x74640d(0x267)],_0x4b6da4[_0x74640d(0x1f5)],_0x4b6da4['UniverThreadComment'],_0x4b6da4[_0x74640d(0x22f)],_0x4b6da4[_0x74640d(0x1ed)]));}(this,function(_0x488082,_0x1cb0e9,_0x5bb6d9,_0x1fdbbe,_0x115615,_0x5e3d67,_0x371879,_0x313699){'use strict';const _0x48ae81=_0x157f;const _0x1aee3d='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x424cbc=(_0x307a52=>(_0x307a52[_0x307a52[_0x48ae81(0x211)]=0x0]=_0x48ae81(0x211),_0x307a52[_0x307a52['Solved']=0x1]=_0x48ae81(0x209),_0x307a52[_0x307a52[_0x48ae81(0x1fe)]=-0x1]='UNRECOGNIZED',_0x307a52))(_0x424cbc||{}),_0x496d7e=(_0x4330f4=>(_0x4330f4[_0x4330f4[_0x48ae81(0x23e)]=0x0]='Unknown',_0x4330f4[_0x4330f4[_0x48ae81(0x1f2)]=0x1]=_0x48ae81(0x1f2),_0x4330f4[_0x4330f4[_0x48ae81(0x216)]=0x2]=_0x48ae81(0x216),_0x4330f4[_0x4330f4[_0x48ae81(0x246)]=0x3]='Edit',_0x4330f4[_0x4330f4[_0x48ae81(0x208)]=0x4]=_0x48ae81(0x208),_0x4330f4[_0x4330f4[_0x48ae81(0x253)]=0x5]=_0x48ae81(0x253),_0x4330f4[_0x4330f4[_0x48ae81(0x1fe)]=-0x1]=_0x48ae81(0x1fe),_0x4330f4))(_0x496d7e||{});const _0x36e413=_0x4c3a44=>_0x1fdbbe['dayjs'](new Date(+_0x4c3a44))[_0x48ae81(0x20f)](_0x48ae81(0x203)),_0x31c7f9=async(_0x18cd63,_0x3f1f32)=>{const _0x529ad7=_0x48ae81,_0x479516=_0x18cd63['get'](_0x1fdbbe[_0x529ad7(0x21c)]),_0x2d4f5b=_0x18cd63[_0x529ad7(0x217)](_0x313699['HTTPService']);_0x3f1f32['forEach'](_0x3381f2=>{const _0x3ae452=_0x529ad7;_0x479516[_0x3ae452(0x25a)](_0x3381f2)&&_0x3f1f32['delete'](_0x3381f2);}),_0x3f1f32[_0x529ad7(0x202)]&&(await _0x2d4f5b[_0x529ad7(0x217)](_0x529ad7(0x241),{'params':{'userIDs':[..._0x3f1f32]}}))[_0x529ad7(0x256)][_0x529ad7(0x20d)][_0x529ad7(0x1fc)](_0x1ea53b=>{_0x1ea53b&&_0x479516['addUser'](_0x1ea53b);});};var _0x586b2f=Object[_0x48ae81(0x229)],_0x55dab6=(_0x551720,_0x2e8e78,_0x19bb2c,_0x351ce9)=>{const _0x525e78=_0x48ae81;for(var _0x31071c=_0x351ce9>0x1?void 0x0:_0x351ce9?_0x586b2f(_0x2e8e78,_0x19bb2c):_0x2e8e78,_0x38fdad=_0x551720[_0x525e78(0x20b)]-0x1,_0x252e5e;_0x38fdad>=0x0;_0x38fdad--)(_0x252e5e=_0x551720[_0x38fdad])&&(_0x31071c=_0x252e5e(_0x31071c)||_0x31071c);return _0x31071c;},_0x558b8d=(_0x2e1e9f,_0x96cb05)=>(_0x5c7153,_0x50cc36)=>_0x96cb05(_0x5c7153,_0x50cc36,_0x2e1e9f);let _0x4214a3=class extends _0x1fdbbe[_0x48ae81(0x207)]{constructor(_0xa5e5c4,_0x268f1a,_0x11d5d,_0x7ad10e){const _0x320bd3=_0x48ae81;super(),this['_commentService']=_0xa5e5c4,this[_0x320bd3(0x205)]=_0x268f1a,this[_0x320bd3(0x1f1)]=_0x11d5d,this[_0x320bd3(0x212)]=_0x7ad10e,this['_init'](),this[_0x320bd3(0x232)]();}[_0x48ae81(0x232)](){const _0x22d8a2=_0x48ae81;this[_0x22d8a2(0x1f0)](this[_0x22d8a2(0x205)][_0x22d8a2(0x237)][_0x22d8a2(0x1f9)](_0x371879['bufferTime'](0x10))[_0x22d8a2(0x210)](_0x1ea47a=>{const _0x156f08=_0x22d8a2,_0x2590df=new Set();_0x1ea47a[_0x156f08(0x1fc)](_0x42b1ac=>{const _0x2477d2=_0x156f08;switch(_0x42b1ac['type']){case _0x2477d2(0x219):{const _0x4253e1=_0x42b1ac[_0x2477d2(0x21e)][_0x2477d2(0x239)];_0x2590df['add'](_0x4253e1);break;}}}),_0x31c7f9(this[_0x156f08(0x212)],_0x2590df);}));}[_0x48ae81(0x1f8)](){const _0x170d5f=_0x48ae81;this['disposeWithMe'](this[_0x170d5f(0x1f6)][_0x170d5f(0x237)][_0x170d5f(0x210)](async _0x137d71=>{const _0x21adc6=_0x170d5f;var _0x2966d5,_0x223cd1,_0x1e70a1,_0x3cdb7d;const _0x3a3094=(_0x2966d5=this['_threadCommentModel']['getUnit'](_0x137d71[_0x21adc6(0x233)])[_0x21adc6(0x224)](_0x51125b=>_0x51125b['threadId']===_0x137d71['threadId']))==null?void 0x0:_0x2966d5[_0x21adc6(0x1ef)];if(!_0x3a3094)return;const {unitId:_0x1b1726,subUnitId:_0x20c947}=_0x3a3094;switch(_0x137d71[_0x21adc6(0x20e)]&&this['_userService'][_0x21adc6(0x21b)](_0x137d71['user']),_0x137d71[_0x21adc6(0x227)]){case _0x496d7e['Add']:break;case _0x496d7e['Reply']:{this[_0x21adc6(0x205)]['addComment'](_0x1b1726,_0x20c947,{'unitId':_0x1b1726,'subUnitId':_0x20c947,'ref':'','id':_0x137d71['replyId'],'dT':_0x36e413(+_0x137d71[_0x21adc6(0x201)]),'threadId':_0x137d71['threadId'],'personId':(_0x1e70a1=(_0x223cd1=_0x137d71[_0x21adc6(0x20e)])==null?void 0x0:_0x223cd1['userID'])!=null?_0x1e70a1:_0x137d71[_0x21adc6(0x1e7)],'text':JSON['parse'](_0x137d71[_0x21adc6(0x215)]),'parentId':_0x3a3094['id']});break;}case _0x496d7e[_0x21adc6(0x208)]:{const _0x470fae=this[_0x21adc6(0x205)][_0x21adc6(0x24c)](_0x1b1726,_0x20c947,_0x137d71[_0x21adc6(0x23d)]);_0x470fae&&_0x470fae[_0x21adc6(0x269)]&&this['_threadCommentModel'][_0x21adc6(0x244)](_0x1b1726,_0x20c947,_0x137d71[_0x21adc6(0x23d)]);break;}case _0x496d7e[_0x21adc6(0x246)]:{this['_threadCommentModel'][_0x21adc6(0x25b)](_0x1b1726,_0x20c947,{'commentId':_0x137d71[_0x21adc6(0x23d)],'text':JSON[_0x21adc6(0x1ec)](_0x137d71[_0x21adc6(0x215)])});break;}case _0x496d7e[_0x21adc6(0x253)]:{const _0x3bcfdc=(_0x3cdb7d=this['_threadCommentModel'][_0x21adc6(0x234)](_0x137d71[_0x21adc6(0x233)])[_0x21adc6(0x224)](_0x1ac2fc=>_0x1ac2fc['threadId']===_0x137d71['threadId']))==null?void 0x0:_0x3cdb7d[_0x21adc6(0x1ef)];_0x3bcfdc&&this['_threadCommentModel'][_0x21adc6(0x255)](_0x1b1726,_0x20c947,_0x3bcfdc['id'],_0x137d71[_0x21adc6(0x21d)]===_0x424cbc['Solved']);break;}}}));}};_0x4214a3=_0x55dab6([_0x558b8d(0x0,_0x1fdbbe[_0x48ae81(0x22c)](_0x1cb0e9[_0x48ae81(0x248)])),_0x558b8d(0x1,_0x1fdbbe[_0x48ae81(0x22c)](_0x5e3d67['ThreadCommentModel'])),_0x558b8d(0x2,_0x1fdbbe[_0x48ae81(0x22c)](_0x1fdbbe['UserManagerService'])),_0x558b8d(0x3,_0x1fdbbe['Inject'](_0x1fdbbe[_0x48ae81(0x220)]))],_0x4214a3);const _0x2dc0f7=_0x48ae81(0x226),_0x19f36c={};var _0x2dd27d=Object[_0x48ae81(0x229)],_0x4776e2=(_0x43cb77,_0x235a86,_0x27339d,_0x4d4ccc)=>{const _0x2e7b93=_0x48ae81;for(var _0x5bb26c=_0x4d4ccc>0x1?void 0x0:_0x4d4ccc?_0x2dd27d(_0x235a86,_0x27339d):_0x235a86,_0x5baac5=_0x43cb77[_0x2e7b93(0x20b)]-0x1,_0x3d4873;_0x5baac5>=0x0;_0x5baac5--)(_0x3d4873=_0x43cb77[_0x5baac5])&&(_0x5bb26c=_0x3d4873(_0x5bb26c)||_0x5bb26c);return _0x5bb26c;},_0x228557=(_0x24ee7b,_0x20376e)=>(_0x1bfbd3,_0x5e129d)=>_0x20376e(_0x1bfbd3,_0x5e129d,_0x24ee7b);function _0x1d75e7(_0x1f0d9f,_0x890cc8){const _0x205fdc=_0x48ae81,_0x167d43=_0x1f0d9f[_0x205fdc(0x265)][0x0];return{..._0x890cc8,'id':_0x167d43['replyId'],'resolved':_0x1f0d9f['solved']===0x1,'dT':_0x36e413(_0x167d43[_0x205fdc(0x201)]),'personId':_0x167d43[_0x205fdc(0x1e7)],'threadId':_0x167d43[_0x205fdc(0x247)]};}function _0x32b28d(_0x1a2fde,_0x2a3238,_0x58f674){const _0x5ceba5=_0x48ae81;var _0x1f3d37,_0x13dcac;if(((_0x13dcac=(_0x1f3d37=_0x1a2fde==null?void 0x0:_0x1a2fde['replies'])==null?void 0x0:_0x1f3d37['length'])!=null?_0x13dcac:0x0)>0x0){const _0x2d1563=(_0x502d09,_0x36aa85)=>({'id':_0x502d09[_0x5ceba5(0x23d)],'threadId':_0x502d09[_0x5ceba5(0x247)],'dT':_0x36e413(_0x502d09['createTimestamp']),'personId':_0x502d09['userId'],'resolved':_0x1a2fde['solved']===_0x424cbc[_0x5ceba5(0x209)],'unitId':_0x2a3238,'subUnitId':_0x58f674,'text':JSON[_0x5ceba5(0x1ec)](_0x502d09[_0x5ceba5(0x215)]),'parentId':_0x36aa85}),_0x3c9e2d=_0x2d1563(_0x1a2fde[_0x5ceba5(0x265)][0x0]);return{..._0x3c9e2d,'children':_0x1a2fde['replies']['slice'](0x1)['map'](_0x40bfc5=>_0x2d1563(_0x40bfc5,_0x3c9e2d['id']))};}return null;}let _0x1c2692=class{constructor(_0x18e78a,_0x4670aa,_0x4e3f6f,_0x5067ed){const _0x5351df=_0x48ae81;this[_0x5351df(0x200)]=_0x18e78a,this[_0x5351df(0x1f1)]=_0x4670aa,this['_sessionService']=_0x4e3f6f,this[_0x5351df(0x212)]=_0x5067ed;}async['addComment'](_0x3b0f78){const _0xfd304c=_0x48ae81;var _0x4fc80f,_0x4ab7f1;const {parentId:_0x33892d,unitId:_0x46d4b,text:_0x40c309,threadId:_0x23ce21}=_0x3b0f78,_0x81be85=(_0x4ab7f1=(_0x4fc80f=_0x40c309[_0xfd304c(0x243)])==null?void 0x0:_0x4fc80f['filter'](_0x4ec945=>_0x4ec945[_0xfd304c(0x230)]===_0x1fdbbe['CustomRangeType'][_0xfd304c(0x235)])[_0xfd304c(0x218)](_0x3a70fd=>_0x3a70fd[_0xfd304c(0x213)]))!=null?_0x4ab7f1:[],_0x11cc71=JSON[_0xfd304c(0x251)](_0x40c309),_0x5dd44f=(await this[_0xfd304c(0x238)]['requireSession'](_0x46d4b))['getMemberID']();if(_0x33892d){const _0x4d9e76={'memberId':_0x5dd44f,'unitId':_0x46d4b,'content':_0x11cc71,'mention':_0x81be85,'threadId':_0x23ce21},_0x400842=(await this[_0xfd304c(0x200)][_0xfd304c(0x1f3)](_0xfd304c(0x252)+_0x46d4b+_0xfd304c(0x24d),{'body':_0x4d9e76}))[_0xfd304c(0x256)][_0xfd304c(0x1e6)];return{..._0x3b0f78,'id':_0x400842[_0xfd304c(0x23d)],'dT':_0x1fdbbe[_0xfd304c(0x268)](+_0x400842[_0xfd304c(0x201)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x400842['userId']};}else{const _0x45669b={'memberId':_0x5dd44f,'unitId':_0x46d4b,'content':_0x11cc71,'mention':_0x81be85},_0x3566ea=await this[_0xfd304c(0x200)][_0xfd304c(0x1f3)]('/universer-api/comment/unit/'+_0x46d4b+'/add',{'body':_0x45669b});return _0x1d75e7(_0x3566ea[_0xfd304c(0x256)][_0xfd304c(0x260)],_0x3b0f78);}}async['updateComment'](_0x306061){const _0x236506=_0x48ae81;var _0x7cfb3d,_0x5ba000;const {text:_0x30649a,unitId:_0x585a4e}=_0x306061,_0xaf9488=(_0x5ba000=(_0x7cfb3d=_0x30649a['customRanges'])==null?void 0x0:_0x7cfb3d[_0x236506(0x222)](_0x1020b8=>_0x1020b8['rangeType']===_0x1fdbbe['CustomRangeType'][_0x236506(0x235)])['map'](_0x347712=>_0x347712[_0x236506(0x213)]))!=null?_0x5ba000:[],_0x509c00=JSON[_0x236506(0x251)](_0x30649a),_0x545d1c=_0x306061[_0x236506(0x247)],_0xe28e82=_0x306061['id'],_0x504314={'memberId':(await this[_0x236506(0x238)][_0x236506(0x24b)](_0x585a4e))['getMemberID'](),'unitId':_0x585a4e,'threadId':_0x545d1c,'mention':_0xaf9488,'content':_0x509c00,'replyId':_0xe28e82},_0x3ad11f=await this['_httpService'][_0x236506(0x1f3)](_0x236506(0x252)+_0x585a4e+_0x236506(0x249),{'body':_0x504314});return!_0x3ad11f[_0x236506(0x256)][_0x236506(0x236)]||_0x3ad11f['body'][_0x236506(0x236)][_0x236506(0x261)]===0x1;}async[_0x48ae81(0x255)](_0xd705a2){const _0x53361b=_0x48ae81,{unitId:_0x5eafca}=_0xd705a2,_0x428791=_0xd705a2[_0x53361b(0x247)],_0x4b92ab={'memberId':this[_0x53361b(0x1f1)][_0x53361b(0x254)]()[_0x53361b(0x1eb)],'unitId':_0x5eafca,'threadId':_0x428791,'solved':_0xd705a2['resolved']?_0x424cbc[_0x53361b(0x209)]:_0x424cbc[_0x53361b(0x211)]},_0x2e6079=await this['_httpService'][_0x53361b(0x1f3)](_0x53361b(0x252)+_0x5eafca+_0x53361b(0x1ee),{'body':_0x4b92ab});return!_0x2e6079[_0x53361b(0x256)][_0x53361b(0x236)]||_0x2e6079[_0x53361b(0x256)][_0x53361b(0x236)][_0x53361b(0x261)]===0x1;}async[_0x48ae81(0x244)](_0x3ba9ba,_0x1d64c3,_0x17f31e,_0x19323d){const _0x168565=_0x48ae81,_0x11d015={'memberId':(await this['_sessionService'][_0x168565(0x24b)](_0x3ba9ba))[_0x168565(0x259)](),'threadId':_0x17f31e,'replyId':_0x19323d,'unitId':_0x3ba9ba},_0x4e825e=await this[_0x168565(0x200)][_0x168565(0x1f3)](_0x168565(0x252)+_0x3ba9ba+_0x168565(0x264),{'body':_0x11d015});return!_0x4e825e['body'][_0x168565(0x236)]||_0x4e825e['body'][_0x168565(0x236)][_0x168565(0x261)]===0x1;}async['listComments'](_0x4161d0,_0x174f2a,_0x513ec9){const _0x2328f9=_0x48ae81,_0x52fafb={'unitId':_0x4161d0,'threadId':_0x513ec9},_0x34995f=await this[_0x2328f9(0x200)][_0x2328f9(0x1f3)](_0x2328f9(0x252)+_0x4161d0+'/list',{'body':_0x52fafb}),_0x10ba63=_0x513ec9[_0x2328f9(0x218)](_0x2d50c9=>_0x32b28d(_0x34995f[_0x2328f9(0x256)][_0x2328f9(0x22e)][_0x2d50c9],_0x4161d0,_0x174f2a))[_0x2328f9(0x222)](Boolean);return Object[_0x2328f9(0x266)](_0x34995f[_0x2328f9(0x256)]['users'])['forEach'](_0x2a9e4d=>{const _0xc2b5d4=_0x2328f9;this[_0xc2b5d4(0x1f1)][_0xc2b5d4(0x21b)](_0x2a9e4d);}),_0x10ba63;}[_0x48ae81(0x258)](_0x2ed70f){const _0x88b90c=_0x48ae81;return{'id':_0x2ed70f['id'],'threadId':_0x2ed70f[_0x88b90c(0x247)],'ref':_0x2ed70f[_0x88b90c(0x1f7)]};}};_0x1c2692=_0x4776e2([_0x228557(0x0,_0x1fdbbe[_0x48ae81(0x22c)](_0x313699['HTTPService'])),_0x228557(0x1,_0x1fdbbe[_0x48ae81(0x22c)](_0x1fdbbe[_0x48ae81(0x21c)])),_0x228557(0x2,_0x1fdbbe['Inject'](_0x1cb0e9[_0x48ae81(0x1fd)])),_0x228557(0x3,_0x1fdbbe[_0x48ae81(0x22c)](_0x1fdbbe[_0x48ae81(0x220)]))],_0x1c2692);var _0x1ff474=Object[_0x48ae81(0x229)],_0x6a556b=(_0x93375e,_0x36d1b0,_0x14e577,_0x3b6458)=>{const _0x361552=_0x48ae81;for(var _0x3cc062=_0x3b6458>0x1?void 0x0:_0x3b6458?_0x1ff474(_0x36d1b0,_0x14e577):_0x36d1b0,_0x11eadd=_0x93375e[_0x361552(0x20b)]-0x1,_0x1ce918;_0x11eadd>=0x0;_0x11eadd--)(_0x1ce918=_0x93375e[_0x11eadd])&&(_0x3cc062=_0x1ce918(_0x3cc062)||_0x3cc062);return _0x3cc062;},_0x537ccd=(_0x2bcb17,_0x35bcc2)=>(_0x25d377,_0x438630)=>_0x35bcc2(_0x25d377,_0x438630,_0x2bcb17);let _0x5c3fe0=class extends _0x1fdbbe[_0x48ae81(0x207)]{constructor(_0x2f9e21,_0x4c7013){const _0x4d3163=_0x48ae81;super(),this[_0x4d3163(0x22d)]=_0x2f9e21,this[_0x4d3163(0x23f)]=_0x4c7013,this['_initDataSource']();}[_0x48ae81(0x204)](){const _0x5408ee=_0x48ae81;this['_threadCommentDataSourceService']['dataSource']=this[_0x5408ee(0x23f)],this[_0x5408ee(0x22d)]['syncUpdateMutationToColla']=!0x1;}};_0x5c3fe0=_0x6a556b([_0x537ccd(0x0,_0x5e3d67[_0x48ae81(0x1ea)]),_0x537ccd(0x1,_0x1fdbbe['Inject'](_0x1c2692))],_0x5c3fe0);var _0x11f210=Object[_0x48ae81(0x22a)],_0x50eb9a=Object[_0x48ae81(0x229)],_0x527d66=(_0x5c8caf,_0x2301d2,_0x3b6d7a)=>_0x2301d2 in _0x5c8caf?_0x11f210(_0x5c8caf,_0x2301d2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b6d7a}):_0x5c8caf[_0x2301d2]=_0x3b6d7a,_0x57ab7b=(_0x82c002,_0x5b3275,_0x4138ce,_0x43686f)=>{for(var _0x4a6dd2=_0x43686f>0x1?void 0x0:_0x43686f?_0x50eb9a(_0x5b3275,_0x4138ce):_0x5b3275,_0x2ccacf=_0x82c002['length']-0x1,_0x2863a9;_0x2ccacf>=0x0;_0x2ccacf--)(_0x2863a9=_0x82c002[_0x2ccacf])&&(_0x4a6dd2=_0x2863a9(_0x4a6dd2)||_0x4a6dd2);return _0x4a6dd2;},_0x397474=(_0x2a880a,_0xab8144)=>(_0x3ceefa,_0x4ab212)=>_0xab8144(_0x3ceefa,_0x4ab212,_0x2a880a),_0x1fd8e3=(_0x39b581,_0x40ef3d,_0x3eb45b)=>_0x527d66(_0x39b581,typeof _0x40ef3d!='symbol'?_0x40ef3d+'':_0x40ef3d,_0x3eb45b);_0x488082[_0x48ae81(0x24a)]=class extends _0x1fdbbe[_0x48ae81(0x1e8)]{constructor(_0x2dcb41=_0x19f36c,_0x127119,_0x2a8231){const _0xc30b68=_0x48ae81;super(),this[_0xc30b68(0x223)]=_0x2dcb41,this[_0xc30b68(0x212)]=_0x127119,this[_0xc30b68(0x25c)]=_0x2a8231;const {..._0x374ad7}=_0x1fdbbe[_0xc30b68(0x221)]({},_0x19f36c,this[_0xc30b68(0x223)]);this[_0xc30b68(0x25c)][_0xc30b68(0x206)](_0x2dc0f7,_0x374ad7);}[_0x48ae81(0x23a)](){[[_0x1c2692],[_0x5c3fe0],[_0x4214a3]]['forEach'](_0x4a3244=>{const _0x3f434a=_0x157f;this[_0x3f434a(0x212)][_0x3f434a(0x219)](_0x4a3244);});}[_0x48ae81(0x1fb)](){const _0x2c004e=_0x48ae81;this['_injector'][_0x2c004e(0x217)](_0x5c3fe0),this[_0x2c004e(0x212)][_0x2c004e(0x217)](_0x4214a3);}},_0x1fd8e3(_0x488082[_0x48ae81(0x24a)],_0x48ae81(0x21f),_0x1aee3d),_0x1fd8e3(_0x488082[_0x48ae81(0x24a)],_0x48ae81(0x227),_0x1fdbbe[_0x48ae81(0x262)]['UNIVER_UNKNOWN']),_0x488082[_0x48ae81(0x24a)]=_0x57ab7b([_0x1fdbbe[_0x48ae81(0x20c)](_0x115615['UniverThreadCommentUIPlugin'],_0x1cb0e9['UniverCollaborationClientPlugin'],_0x5bb6d9['UniverLicensePlugin']),_0x397474(0x1,_0x1fdbbe['Inject'](_0x1fdbbe[_0x48ae81(0x220)])),_0x397474(0x2,_0x1fdbbe[_0x48ae81(0x1e5)])],_0x488082[_0x48ae81(0x24a)]),Object[_0x48ae81(0x22a)](_0x488082,Symbol[_0x48ae81(0x214)],{'value':_0x48ae81(0x25f)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.7.0-nightly.
|
|
3
|
+
"version": "0.7.0-nightly.202505031606",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.7.0-nightly.
|
|
49
|
-
"@univerjs-pro/license": "0.7.0-nightly.
|
|
50
|
-
"@univerjs/core": "0.7.0-nightly.
|
|
51
|
-
"@univerjs/network": "0.7.0-nightly.
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment": "0.7.0-nightly.
|
|
54
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.7.0-nightly.202505031606",
|
|
49
|
+
"@univerjs-pro/license": "0.7.0-nightly.202505031606",
|
|
50
|
+
"@univerjs/core": "0.7.0-nightly.202505031606",
|
|
51
|
+
"@univerjs/network": "0.7.0-nightly.202505031606",
|
|
52
|
+
"@univerjs/thread-comment": "0.7.0-nightly.202505031606",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.7.0-nightly.202505031606",
|
|
54
|
+
"@univerjs/protocol": "0.1.46-alpha.3"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|