@univerjs-pro/thread-comment-datasource 0.7.0-nightly.202505191607 → 0.7.0-nightly.202505201607
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 +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x359eaa=_0x36fd;(function(_0x5c88e4,_0x3b5374){const _0xaea755=_0x36fd,_0x30459d=_0x5c88e4();while(!![]){try{const _0x3effb7=-parseInt(_0xaea755(0x13a))/0x1+-parseInt(_0xaea755(0x14f))/0x2*(parseInt(_0xaea755(0x15c))/0x3)+parseInt(_0xaea755(0x16c))/0x4+-parseInt(_0xaea755(0x10d))/0x5*(-parseInt(_0xaea755(0x16d))/0x6)+parseInt(_0xaea755(0x14d))/0x7*(parseInt(_0xaea755(0x15f))/0x8)+-parseInt(_0xaea755(0x110))/0x9+parseInt(_0xaea755(0x113))/0xa*(parseInt(_0xaea755(0x120))/0xb);if(_0x3effb7===_0x3b5374)break;else _0x30459d['push'](_0x30459d['shift']());}catch(_0x2d1beb){_0x30459d['push'](_0x30459d['shift']());}}}(_0x23d6,0xbe469));Object[_0x359eaa(0xff)](exports,Symbol[_0x359eaa(0x144)],{'value':_0x359eaa(0x14e)});const b=require(_0x359eaa(0x104)),T=require('@univerjs-pro/license'),c=require(_0x359eaa(0x103)),j=require('@univerjs/thread-comment-ui'),M=require(_0x359eaa(0x106)),w=require(_0x359eaa(0x116)),P=require('@univerjs/network'),U=_0x359eaa(0x109);var I=(_0xf26e87=>(_0xf26e87[_0xf26e87[_0x359eaa(0xf0)]=0x0]=_0x359eaa(0xf0),_0xf26e87[_0xf26e87[_0x359eaa(0x11f)]=0x1]='Solved',_0xf26e87[_0xf26e87[_0x359eaa(0x132)]=-0x1]='UNRECOGNIZED',_0xf26e87))(I||{}),v=(_0x155126=>(_0x155126[_0x155126[_0x359eaa(0x141)]=0x0]='Unknown',_0x155126[_0x155126[_0x359eaa(0x14c)]=0x1]=_0x359eaa(0x14c),_0x155126[_0x155126[_0x359eaa(0x107)]=0x2]=_0x359eaa(0x107),_0x155126[_0x155126[_0x359eaa(0x11b)]=0x3]=_0x359eaa(0x11b),_0x155126[_0x155126['Delete']=0x4]='Delete',_0x155126[_0x155126[_0x359eaa(0x124)]=0x5]=_0x359eaa(0x124),_0x155126[_0x155126['UNRECOGNIZED']=-0x1]=_0x359eaa(0x132),_0x155126))(v||{});const f=_0x729ad2=>c[_0x359eaa(0x164)](new Date(+_0x729ad2))[_0x359eaa(0xf5)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x51a645,_0x59c00d)=>{const _0x33024d=_0x359eaa,_0x237285=_0x51a645[_0x33024d(0x160)](c['UserManagerService']),_0x1ebf32=_0x51a645[_0x33024d(0x160)](P[_0x33024d(0x13f)]);_0x59c00d['forEach'](_0x573c82=>{const _0x50eddc=_0x33024d;_0x237285[_0x50eddc(0x168)](_0x573c82)&&_0x59c00d['delete'](_0x573c82);}),_0x59c00d['size']&&(await _0x1ebf32[_0x33024d(0x160)]('/universer-api/user/list',{'params':{'userIDs':[..._0x59c00d]}}))[_0x33024d(0xf9)][_0x33024d(0xfb)][_0x33024d(0x100)](_0x2d0e70=>{_0x2d0e70&&_0x237285['addUser'](_0x2d0e70);});};var $=Object[_0x359eaa(0x136)],E=(_0x5bda5,_0xfbe328,_0x19ad48,_0x5dfa1c)=>{const _0x31e73b=_0x359eaa;for(var _0x2ca9a8=_0x5dfa1c>0x1?void 0x0:_0x5dfa1c?$(_0xfbe328,_0x19ad48):_0xfbe328,_0x30b44c=_0x5bda5[_0x31e73b(0x114)]-0x1,_0x10ed05;_0x30b44c>=0x0;_0x30b44c--)(_0x10ed05=_0x5bda5[_0x30b44c])&&(_0x2ca9a8=_0x10ed05(_0x2ca9a8)||_0x2ca9a8);return _0x2ca9a8;},S=(_0x3d1c29,_0x1da384)=>(_0x3dcfe8,_0x2a09dc)=>_0x1da384(_0x3dcfe8,_0x2a09dc,_0x3d1c29);let p=class extends c[_0x359eaa(0x134)]{constructor(_0x1bc4be,_0xa2bc06,_0x5ceef0,_0x22da33){const _0x5e4698=_0x359eaa;super(),this[_0x5e4698(0x155)]=_0x1bc4be,this['_threadCommentModel']=_0xa2bc06,this[_0x5e4698(0x143)]=_0x5ceef0,this[_0x5e4698(0x121)]=_0x22da33,this[_0x5e4698(0x108)](),this['_initUserSync']();}[_0x359eaa(0x11e)](){const _0x326263=_0x359eaa;this[_0x326263(0x12f)](this[_0x326263(0x111)]['commentUpdate$'][_0x326263(0xf8)](w[_0x326263(0x166)](0x10))[_0x326263(0x119)](_0x433c1f=>{const _0x3d66e5=_0x326263,_0x5a9269=new Set();_0x433c1f[_0x3d66e5(0x100)](_0x244081=>{const _0x5583da=_0x3d66e5;switch(_0x244081[_0x5583da(0xfa)]){case'add':{const _0x11c141=_0x244081[_0x5583da(0x12a)][_0x5583da(0x13d)];_0x5a9269[_0x5583da(0x152)](_0x11c141);break;}}}),R(this[_0x3d66e5(0x121)],_0x5a9269);}));}[_0x359eaa(0x108)](){const _0xe84ff=_0x359eaa;this[_0xe84ff(0x12f)](this['_commentService']['commentUpdate$'][_0xe84ff(0x119)](async _0x5e2353=>{const _0x5dd938=_0xe84ff;var _0x36f976,_0x1e87fc,_0x24108a,_0x45bf88;const _0x29e205=(_0x36f976=this[_0x5dd938(0x111)][_0x5dd938(0x126)](_0x5e2353[_0x5dd938(0x15a)])['find'](_0x48978c=>_0x48978c['threadId']===_0x5e2353[_0x5dd938(0x14b)]))==null?void 0x0:_0x36f976[_0x5dd938(0x10f)];if(!_0x29e205)return;const {unitId:_0x285c61,subUnitId:_0x6695a8}=_0x29e205;switch(_0x5e2353[_0x5dd938(0x158)]&&this['_userService'][_0x5dd938(0xfc)](_0x5e2353[_0x5dd938(0x158)]),_0x5e2353['type']){case v['Add']:break;case v['Reply']:{this['_threadCommentModel'][_0x5dd938(0x148)](_0x285c61,_0x6695a8,{'unitId':_0x285c61,'subUnitId':_0x6695a8,'ref':'','id':_0x5e2353[_0x5dd938(0x118)],'dT':f(+_0x5e2353[_0x5dd938(0x12b)]),'threadId':_0x5e2353[_0x5dd938(0x14b)],'personId':(_0x24108a=(_0x1e87fc=_0x5e2353[_0x5dd938(0x158)])==null?void 0x0:_0x1e87fc[_0x5dd938(0xf4)])!=null?_0x24108a:_0x5e2353[_0x5dd938(0x10c)],'text':JSON[_0x5dd938(0x149)](_0x5e2353[_0x5dd938(0x13b)]),'parentId':_0x29e205['id']});break;}case v[_0x5dd938(0x140)]:{const _0x215244=this[_0x5dd938(0x111)][_0x5dd938(0x15e)](_0x285c61,_0x6695a8,_0x5e2353[_0x5dd938(0x118)]);_0x215244&&_0x215244[_0x5dd938(0x10a)]&&this[_0x5dd938(0x111)][_0x5dd938(0x165)](_0x285c61,_0x6695a8,_0x5e2353['replyId']);break;}case v[_0x5dd938(0x11b)]:{this['_threadCommentModel'][_0x5dd938(0xf3)](_0x285c61,_0x6695a8,{'commentId':_0x5e2353[_0x5dd938(0x118)],'text':JSON['parse'](_0x5e2353[_0x5dd938(0x13b)])});break;}case v[_0x5dd938(0x124)]:{const _0xf74777=(_0x45bf88=this['_threadCommentModel'][_0x5dd938(0x126)](_0x5e2353['unitId'])[_0x5dd938(0x138)](_0x54f3e7=>_0x54f3e7[_0x5dd938(0x14b)]===_0x5e2353[_0x5dd938(0x14b)]))==null?void 0x0:_0x45bf88[_0x5dd938(0x10f)];_0xf74777&&this[_0x5dd938(0x111)][_0x5dd938(0xf2)](_0x285c61,_0x6695a8,_0xf74777['id'],_0x5e2353[_0x5dd938(0x11a)]===I[_0x5dd938(0x11f)]);break;}}}));}};p=E([S(0x0,c[_0x359eaa(0x14a)](b[_0x359eaa(0x125)])),S(0x1,c[_0x359eaa(0x14a)](M['ThreadCommentModel'])),S(0x2,c[_0x359eaa(0x14a)](c[_0x359eaa(0x12c)])),S(0x3,c['Inject'](c['Injector']))],p);const q=_0x359eaa(0x129),D={};function _0x36fd(_0x104295,_0x373066){const _0x23d6cd=_0x23d6();return _0x36fd=function(_0x36fd7a,_0x57d016){_0x36fd7a=_0x36fd7a-0xf0;let _0x46895e=_0x23d6cd[_0x36fd7a];return _0x46895e;},_0x36fd(_0x104295,_0x373066);}var A=Object[_0x359eaa(0x136)],x=(_0x4d7388,_0x1bc795,_0x443f16,_0x99dd67)=>{for(var _0x3e5bac=_0x99dd67>0x1?void 0x0:_0x99dd67?A(_0x1bc795,_0x443f16):_0x1bc795,_0x5a28e1=_0x4d7388['length']-0x1,_0x5aea80;_0x5a28e1>=0x0;_0x5a28e1--)(_0x5aea80=_0x4d7388[_0x5a28e1])&&(_0x3e5bac=_0x5aea80(_0x3e5bac)||_0x3e5bac);return _0x3e5bac;},_=(_0x21ea27,_0x4db676)=>(_0x3515b1,_0x1e6906)=>_0x4db676(_0x3515b1,_0x1e6906,_0x21ea27);function Y(_0x473fcf,_0x354fc2){const _0x205bff=_0x359eaa,_0x2bfb5a=_0x473fcf[_0x205bff(0xfe)][0x0];return{..._0x354fc2,'id':_0x2bfb5a[_0x205bff(0x118)],'resolved':_0x473fcf[_0x205bff(0x11a)]===0x1,'dT':f(_0x2bfb5a[_0x205bff(0x12b)]),'personId':_0x2bfb5a[_0x205bff(0x10c)],'threadId':_0x2bfb5a[_0x205bff(0x14b)]};}function G(_0x1cf2e1,_0x1b794f,_0x57018d){const _0x2346dd=_0x359eaa;var _0x9d7907,_0x569f5a;if(((_0x569f5a=(_0x9d7907=_0x1cf2e1==null?void 0x0:_0x1cf2e1[_0x2346dd(0xfe)])==null?void 0x0:_0x9d7907[_0x2346dd(0x114)])!=null?_0x569f5a:0x0)>0x0){const _0x41b9ab=(_0x5e6f72,_0x51bb6d)=>({'id':_0x5e6f72[_0x2346dd(0x118)],'threadId':_0x5e6f72[_0x2346dd(0x14b)],'dT':f(_0x5e6f72[_0x2346dd(0x12b)]),'personId':_0x5e6f72[_0x2346dd(0x10c)],'resolved':_0x1cf2e1[_0x2346dd(0x11a)]===I['Solved'],'unitId':_0x1b794f,'subUnitId':_0x57018d,'text':JSON['parse'](_0x5e6f72[_0x2346dd(0x13b)]),'parentId':_0x51bb6d}),_0x20b4f6=_0x41b9ab(_0x1cf2e1['replies'][0x0]);return{..._0x20b4f6,'children':_0x1cf2e1[_0x2346dd(0xfe)][_0x2346dd(0x16e)](0x1)[_0x2346dd(0x115)](_0x1fe1e4=>_0x41b9ab(_0x1fe1e4,_0x20b4f6['id']))};}return null;}let g=class{constructor(_0x21907f,_0x2b9b08,_0x13867f,_0x33a4ee){const _0x470332=_0x359eaa;this[_0x470332(0x15d)]=_0x21907f,this[_0x470332(0x143)]=_0x2b9b08,this[_0x470332(0x102)]=_0x13867f,this['_injector']=_0x33a4ee;}async[_0x359eaa(0x148)](_0x53f684){const _0x253fce=_0x359eaa;var _0x117452,_0x2fada1;const {parentId:_0xeac7cc,unitId:_0x136a6d,text:_0x1822eb,threadId:_0xbd134}=_0x53f684,_0x142d74=(_0x2fada1=(_0x117452=_0x1822eb[_0x253fce(0x128)])==null?void 0x0:_0x117452['filter'](_0x4b0579=>_0x4b0579['rangeType']===c['CustomRangeType'][_0x253fce(0x13e)])['map'](_0x535b01=>_0x535b01[_0x253fce(0x16a)]))!=null?_0x2fada1:[],_0x3f3d8c=JSON['stringify'](_0x1822eb),_0x3ca266=(await this['_sessionService'][_0x253fce(0x117)](_0x136a6d))[_0x253fce(0x135)]();if(_0xeac7cc){const _0x1fa7a5={'memberId':_0x3ca266,'unitId':_0x136a6d,'content':_0x3f3d8c,'mention':_0x142d74,'threadId':_0xbd134},_0x4775ae=(await this['_httpService'][_0x253fce(0x162)](_0x253fce(0x101)+_0x136a6d+_0x253fce(0x11c),{'body':_0x1fa7a5}))[_0x253fce(0xf9)][_0x253fce(0x154)];return{..._0x53f684,'id':_0x4775ae['replyId'],'dT':c['dayjs'](+_0x4775ae['createTimestamp'])[_0x253fce(0xf5)](_0x253fce(0x105)),'personId':_0x4775ae[_0x253fce(0x10c)]};}else{const _0x785698={'memberId':_0x3ca266,'unitId':_0x136a6d,'content':_0x3f3d8c,'mention':_0x142d74},_0x159da4=await this[_0x253fce(0x15d)][_0x253fce(0x162)](_0x253fce(0x101)+_0x136a6d+_0x253fce(0x150),{'body':_0x785698});return Y(_0x159da4[_0x253fce(0xf9)][_0x253fce(0x10b)],_0x53f684);}}async[_0x359eaa(0xf3)](_0x587389){const _0x34cf8b=_0x359eaa;var _0x3bd984,_0x10dd0f;const {text:_0x211358,unitId:_0x4ff69e}=_0x587389,_0x129895=(_0x10dd0f=(_0x3bd984=_0x211358[_0x34cf8b(0x128)])==null?void 0x0:_0x3bd984[_0x34cf8b(0x137)](_0x4775ab=>_0x4775ab[_0x34cf8b(0xfd)]===c[_0x34cf8b(0x146)][_0x34cf8b(0x13e)])[_0x34cf8b(0x115)](_0x1becc3=>_0x1becc3[_0x34cf8b(0x16a)]))!=null?_0x10dd0f:[],_0x20b436=JSON[_0x34cf8b(0x12d)](_0x211358),_0x13a399=_0x587389[_0x34cf8b(0x14b)],_0x15e5c4=_0x587389['id'],_0x2f637e={'memberId':(await this[_0x34cf8b(0x102)][_0x34cf8b(0x117)](_0x4ff69e))[_0x34cf8b(0x135)](),'unitId':_0x4ff69e,'threadId':_0x13a399,'mention':_0x129895,'content':_0x20b436,'replyId':_0x15e5c4},_0x101313=await this[_0x34cf8b(0x15d)]['post'](_0x34cf8b(0x101)+_0x4ff69e+_0x34cf8b(0x112),{'body':_0x2f637e});return!_0x101313[_0x34cf8b(0xf9)]['error']||_0x101313[_0x34cf8b(0xf9)][_0x34cf8b(0x167)]['code']===0x1;}async[_0x359eaa(0xf2)](_0x3e954b){const _0x1f0f00=_0x359eaa,{unitId:_0x22a85c}=_0x3e954b,_0x36d0e0=_0x3e954b['threadId'],_0xa63acd={'memberId':this[_0x1f0f00(0x143)][_0x1f0f00(0x11d)]()['userID'],'unitId':_0x22a85c,'threadId':_0x36d0e0,'solved':_0x3e954b[_0x1f0f00(0x156)]?I['Solved']:I[_0x1f0f00(0xf0)]},_0x1bc35e=await this[_0x1f0f00(0x15d)]['post'](_0x1f0f00(0x101)+_0x22a85c+_0x1f0f00(0x10e),{'body':_0xa63acd});return!_0x1bc35e[_0x1f0f00(0xf9)][_0x1f0f00(0x167)]||_0x1bc35e[_0x1f0f00(0xf9)][_0x1f0f00(0x167)][_0x1f0f00(0xf6)]===0x1;}async[_0x359eaa(0x165)](_0x4cea89,_0x2a7822,_0x5837e3,_0x1c3619){const _0x3a6a80=_0x359eaa,_0x5d15e5={'memberId':(await this[_0x3a6a80(0x102)][_0x3a6a80(0x117)](_0x4cea89))['getMemberID'](),'threadId':_0x5837e3,'replyId':_0x1c3619,'unitId':_0x4cea89},_0x33dd7b=await this['_httpService'][_0x3a6a80(0x162)](_0x3a6a80(0x101)+_0x4cea89+'/delete',{'body':_0x5d15e5});return!_0x33dd7b[_0x3a6a80(0xf9)]['error']||_0x33dd7b[_0x3a6a80(0xf9)][_0x3a6a80(0x167)][_0x3a6a80(0xf6)]===0x1;}async[_0x359eaa(0x147)](_0x4362e2,_0x24a9c0,_0x58474c){const _0x40f16c=_0x359eaa,_0xd4abd2={'unitId':_0x4362e2,'threadId':_0x58474c},_0x1080d3=await this[_0x40f16c(0x15d)][_0x40f16c(0x162)]('/universer-api/comment/unit/'+_0x4362e2+'/list',{'body':_0xd4abd2}),_0x526b81=_0x58474c['map'](_0x9c531=>G(_0x1080d3[_0x40f16c(0xf9)][_0x40f16c(0x153)][_0x9c531],_0x4362e2,_0x24a9c0))[_0x40f16c(0x137)](Boolean);return Object[_0x40f16c(0xf7)](_0x1080d3[_0x40f16c(0xf9)][_0x40f16c(0xfb)])['forEach'](_0xb75ce9=>{const _0x128aac=_0x40f16c;this[_0x128aac(0x143)][_0x128aac(0xfc)](_0xb75ce9);}),_0x526b81;}[_0x359eaa(0x142)](_0xa0f214){const _0x1b6ebb=_0x359eaa;return{'id':_0xa0f214['id'],'threadId':_0xa0f214[_0x1b6ebb(0x14b)],'ref':_0xa0f214[_0x1b6ebb(0x139)]};}};g=x([_(0x0,c['Inject'](P['HTTPService'])),_(0x1,c[_0x359eaa(0x14a)](c[_0x359eaa(0x12c)])),_(0x2,c[_0x359eaa(0x14a)](b['CollaborationSessionService'])),_(0x3,c['Inject'](c[_0x359eaa(0x130)]))],g);var H=Object[_0x359eaa(0x136)],J=(_0x1e58ed,_0x5b15a8,_0x199ec9,_0x55cd70)=>{const _0x1c88a7=_0x359eaa;for(var _0x29dc1a=_0x55cd70>0x1?void 0x0:_0x55cd70?H(_0x5b15a8,_0x199ec9):_0x5b15a8,_0xef5554=_0x1e58ed[_0x1c88a7(0x114)]-0x1,_0x47c30e;_0xef5554>=0x0;_0xef5554--)(_0x47c30e=_0x1e58ed[_0xef5554])&&(_0x29dc1a=_0x47c30e(_0x29dc1a)||_0x29dc1a);return _0x29dc1a;},y=(_0x3c6bdb,_0x19888f)=>(_0x2467e1,_0x2b6355)=>_0x19888f(_0x2467e1,_0x2b6355,_0x3c6bdb);let C=class extends c[_0x359eaa(0x134)]{constructor(_0x5008b2,_0x4d22a8){const _0x43b313=_0x359eaa;super(),this[_0x43b313(0x163)]=_0x5008b2,this[_0x43b313(0x161)]=_0x4d22a8,this[_0x43b313(0x122)]();}[_0x359eaa(0x122)](){const _0x33f5e3=_0x359eaa;this['_threadCommentDataSourceService'][_0x33f5e3(0x16b)]=this[_0x33f5e3(0x161)],this[_0x33f5e3(0x163)][_0x33f5e3(0x133)]=!0x1;}};function _0x23d6(){const _0xd328f7=['rangeType','replies','defineProperty','forEach','/universer-api/comment/unit/','_sessionService','@univerjs/core','@univerjs-pro/collaboration-client','YYYY/MM/DD\x20HH:mm','@univerjs/thread-comment','Reply','_init','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','parentId','comment','userId','4550FJSerE','/solved','root','7928163jLOwdY','_threadCommentModel','/edit','10CYkznj','length','map','rxjs','requireSession','replyId','subscribe','solved','Edit','/reply','getCurrentUser','_initUserSync','Solved','13553507MeLaLA','_injector','_initDataSource','onStarting','Solve','CommentService','getUnit','pluginName','customRanges','thread-comment-data-source.config','payload','createTimestamp','UserManagerService','stringify','UniverInstanceType','disposeWithMe','Injector','merge','UNRECOGNIZED','syncUpdateMutationToColla','Disposable','getMemberID','getOwnPropertyDescriptor','filter','find','ref','1496886YItiVU','content','DependentOn','personId','COMMENT','HTTPService','Delete','Unknown','saveCommentToSnapshot','_userService','toStringTag','UniverThreadCommentDataSourcePlugin','CustomRangeType','listComments','addComment','parse','Inject','threadId','Add','329gfuVfo','Module','53188uKWkUz','/add','IThreadCommentDataSourceService','add','comments','reply','_commentService','resolved','UNIVER_UNKNOWN','user','_config','unitId','UniverCollaborationClientPlugin','39HdUUqh','_httpService','getComment','188536xdtdRg','get','_threadCommentDataSource','post','_threadCommentDataSourceService','dayjs','deleteComment','bufferTime','error','getUser','setConfig','rangeId','dataSource','4550472dNvQLx','168moiDuk','slice','OpenOrReOpen','_configService','resolveComment','updateComment','userID','format','code','values','pipe','body','type','users','addUser'];_0x23d6=function(){return _0xd328f7;};return _0x23d6();}C=J([y(0x0,M[_0x359eaa(0x151)]),y(0x1,c[_0x359eaa(0x14a)](g))],C);var F=Object[_0x359eaa(0xff)],L=Object[_0x359eaa(0x136)],Z=(_0x13e869,_0x114a29,_0x12f7f4)=>_0x114a29 in _0x13e869?F(_0x13e869,_0x114a29,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x12f7f4}):_0x13e869[_0x114a29]=_0x12f7f4,W=(_0x356df3,_0x13ae2c,_0x18380d,_0x1266f8)=>{const _0xbc8cf9=_0x359eaa;for(var _0xae5df5=_0x1266f8>0x1?void 0x0:_0x1266f8?L(_0x13ae2c,_0x18380d):_0x13ae2c,_0x597c93=_0x356df3[_0xbc8cf9(0x114)]-0x1,_0x48ada2;_0x597c93>=0x0;_0x597c93--)(_0x48ada2=_0x356df3[_0x597c93])&&(_0xae5df5=_0x48ada2(_0xae5df5)||_0xae5df5);return _0xae5df5;},O=(_0x242978,_0x5e377e)=>(_0x3ad9b8,_0x488eee)=>_0x5e377e(_0x3ad9b8,_0x488eee,_0x242978),N=(_0x299bfd,_0x17ad3,_0x7f9fbb)=>Z(_0x299bfd,typeof _0x17ad3!='symbol'?_0x17ad3+'':_0x17ad3,_0x7f9fbb);exports['UniverThreadCommentDataSourcePlugin']=class extends c['Plugin']{constructor(_0x2cf942=D,_0x3cd05d,_0x1ca6c6){const _0x3c6b8a=_0x359eaa;super(),this[_0x3c6b8a(0x159)]=_0x2cf942,this['_injector']=_0x3cd05d,this[_0x3c6b8a(0xf1)]=_0x1ca6c6;const {..._0x24d9f0}=c[_0x3c6b8a(0x131)]({},D,this[_0x3c6b8a(0x159)]);this[_0x3c6b8a(0xf1)][_0x3c6b8a(0x169)](q,_0x24d9f0);}[_0x359eaa(0x123)](){const _0x3a6a9b=_0x359eaa;[[g],[C],[p]][_0x3a6a9b(0x100)](_0x517f55=>{const _0x44b8d2=_0x3a6a9b;this['_injector'][_0x44b8d2(0x152)](_0x517f55);});}['onReady'](){const _0x19b8e6=_0x359eaa;this[_0x19b8e6(0x121)][_0x19b8e6(0x160)](C),this[_0x19b8e6(0x121)]['get'](p);}},N(exports[_0x359eaa(0x145)],_0x359eaa(0x127),U),N(exports[_0x359eaa(0x145)],_0x359eaa(0xfa),c[_0x359eaa(0x12e)][_0x359eaa(0x157)]),exports[_0x359eaa(0x145)]=W([c[_0x359eaa(0x13c)](j['UniverThreadCommentUIPlugin'],b[_0x359eaa(0x15b)],T['UniverLicensePlugin']),O(0x1,c[_0x359eaa(0x14a)](c[_0x359eaa(0x130)])),O(0x2,c['IConfigService'])],exports[_0x359eaa(0x145)]);
|
|
1
|
+
'use strict';const _0x54d2b6=_0x4e5f;(function(_0x500d0d,_0x118707){const _0x5eaefd=_0x4e5f,_0x5a4f37=_0x500d0d();while(!![]){try{const _0x489c8c=-parseInt(_0x5eaefd(0x88))/0x1*(parseInt(_0x5eaefd(0xe5))/0x2)+parseInt(_0x5eaefd(0xdd))/0x3*(parseInt(_0x5eaefd(0xb0))/0x4)+parseInt(_0x5eaefd(0xb9))/0x5+parseInt(_0x5eaefd(0x84))/0x6*(-parseInt(_0x5eaefd(0xa5))/0x7)+parseInt(_0x5eaefd(0x72))/0x8*(parseInt(_0x5eaefd(0xd6))/0x9)+-parseInt(_0x5eaefd(0xda))/0xa+parseInt(_0x5eaefd(0xe7))/0xb;if(_0x489c8c===_0x118707)break;else _0x5a4f37['push'](_0x5a4f37['shift']());}catch(_0x5b2525){_0x5a4f37['push'](_0x5a4f37['shift']());}}}(_0xcfff,0x38cca));Object['defineProperty'](exports,Symbol[_0x54d2b6(0xc3)],{'value':_0x54d2b6(0x81)});const b=require(_0x54d2b6(0x77)),T=require('@univerjs-pro/license'),c=require(_0x54d2b6(0xd0)),j=require(_0x54d2b6(0xd3)),M=require(_0x54d2b6(0xb2)),w=require(_0x54d2b6(0xc2)),P=require('@univerjs/network'),U=_0x54d2b6(0x99);var I=(_0xd81179=>(_0xd81179[_0xd81179['OpenOrReOpen']=0x0]=_0x54d2b6(0xc5),_0xd81179[_0xd81179[_0x54d2b6(0xc6)]=0x1]=_0x54d2b6(0xc6),_0xd81179[_0xd81179['UNRECOGNIZED']=-0x1]=_0x54d2b6(0xb8),_0xd81179))(I||{}),v=(_0x4256f3=>(_0x4256f3[_0x4256f3[_0x54d2b6(0x7c)]=0x0]=_0x54d2b6(0x7c),_0x4256f3[_0x4256f3['Add']=0x1]='Add',_0x4256f3[_0x4256f3[_0x54d2b6(0x85)]=0x2]='Reply',_0x4256f3[_0x4256f3[_0x54d2b6(0xc7)]=0x3]=_0x54d2b6(0xc7),_0x4256f3[_0x4256f3[_0x54d2b6(0xbc)]=0x4]=_0x54d2b6(0xbc),_0x4256f3[_0x4256f3[_0x54d2b6(0xe1)]=0x5]=_0x54d2b6(0xe1),_0x4256f3[_0x4256f3[_0x54d2b6(0xb8)]=-0x1]=_0x54d2b6(0xb8),_0x4256f3))(v||{});const f=_0x47eec8=>c[_0x54d2b6(0xd4)](new Date(+_0x47eec8))[_0x54d2b6(0xa2)](_0x54d2b6(0xe0)),R=async(_0x23efbd,_0x5dd69b)=>{const _0x30ea7d=_0x54d2b6,_0x4be781=_0x23efbd['get'](c['UserManagerService']),_0xf637fc=_0x23efbd['get'](P[_0x30ea7d(0xa7)]);_0x5dd69b['forEach'](_0x1efdad=>{const _0x3a6043=_0x30ea7d;_0x4be781['getUser'](_0x1efdad)&&_0x5dd69b[_0x3a6043(0xe4)](_0x1efdad);}),_0x5dd69b['size']&&(await _0xf637fc[_0x30ea7d(0xa1)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5dd69b]}}))[_0x30ea7d(0xe6)][_0x30ea7d(0xad)]['forEach'](_0x36770d=>{const _0x355a8a=_0x30ea7d;_0x36770d&&_0x4be781[_0x355a8a(0x73)](_0x36770d);});};function _0x4e5f(_0x976592,_0x3d7f7f){const _0xcfff69=_0xcfff();return _0x4e5f=function(_0x4e5ff6,_0x4705d4){_0x4e5ff6=_0x4e5ff6-0x6e;let _0x444ae0=_0xcfff69[_0x4e5ff6];return _0x444ae0;},_0x4e5f(_0x976592,_0x3d7f7f);}function _0xcfff(){const _0x30b276=['find','commentUpdate$','Inject','@univerjs/core','userId','UniverLicensePlugin','@univerjs/thread-comment-ui','dayjs','requireSession','369ZejqLT','Injector','code','disposeWithMe','1245080qEqmZb','_httpService','threadId','3sVvawn','Plugin','_init','YYYY/MM/DD\x20HH:mm','Solve','listComments','post','delete','466FERhXK','body','415008XesoDY','DependentOn','_sessionService','customRanges','comment','addComment','64440pqBuaM','addUser','getOwnPropertyDescriptor','pipe','replyId','@univerjs-pro/collaboration-client','stringify','root','UniverThreadCommentUIPlugin','/delete','Unknown','userID','symbol','payload','IConfigService','Module','forEach','resolveComment','18OOqPHr','Reply','comments','_threadCommentDataSourceService','1052mEMiwN','syncUpdateMutationToColla','ref','pluginName','IThreadCommentDataSourceService','values','onReady','updateComment','_threadCommentDataSource','rangeType','error','createTimestamp','reply','parse','map','subscribe','CommentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_userService','COMMENT','CustomRangeType','_config','getMemberID','length','UniverThreadCommentDataSourcePlugin','get','format','getUnit','filter','699139zQPJri','content','HTTPService','getCurrentUser','_injector','slice','/universer-api/comment/unit/','_initDataSource','users','_configService','saveCommentToSnapshot','637148BtlUSg','_initUserSync','@univerjs/thread-comment','deleteComment','Disposable','_threadCommentModel','rangeId','onStarting','UNRECOGNIZED','1873175nltUPi','_commentService','type','Delete','solved','bufferTime','user','add','getComment','rxjs','toStringTag','replies','OpenOrReOpen','Solved','Edit','personId','parentId','/reply','UserManagerService','unitId'];_0xcfff=function(){return _0x30b276;};return _0xcfff();}var $=Object[_0x54d2b6(0x74)],E=(_0x32e8c5,_0x3bbc1c,_0x3cd596,_0x58ee1e)=>{const _0x143e61=_0x54d2b6;for(var _0xa1505e=_0x58ee1e>0x1?void 0x0:_0x58ee1e?$(_0x3bbc1c,_0x3cd596):_0x3bbc1c,_0x3182bb=_0x32e8c5[_0x143e61(0x9f)]-0x1,_0x208ea1;_0x3182bb>=0x0;_0x3182bb--)(_0x208ea1=_0x32e8c5[_0x3182bb])&&(_0xa1505e=_0x208ea1(_0xa1505e)||_0xa1505e);return _0xa1505e;},S=(_0x6e72f2,_0x414da5)=>(_0x298c3b,_0x2514f9)=>_0x414da5(_0x298c3b,_0x2514f9,_0x6e72f2);let p=class extends c[_0x54d2b6(0xb4)]{constructor(_0x374d6f,_0x48b41f,_0x2085ab,_0x36397f){const _0x423911=_0x54d2b6;super(),this[_0x423911(0xba)]=_0x374d6f,this[_0x423911(0xb5)]=_0x48b41f,this['_userService']=_0x2085ab,this[_0x423911(0xa9)]=_0x36397f,this[_0x423911(0xdf)](),this['_initUserSync']();}[_0x54d2b6(0xb1)](){const _0x19d1f5=_0x54d2b6;this[_0x19d1f5(0xd9)](this[_0x19d1f5(0xb5)][_0x19d1f5(0xce)][_0x19d1f5(0x75)](w[_0x19d1f5(0xbe)](0x10))[_0x19d1f5(0x97)](_0x40df0a=>{const _0x3d8150=_0x19d1f5,_0x17fffc=new Set();_0x40df0a['forEach'](_0x105235=>{const _0x5668f7=_0x4e5f;switch(_0x105235[_0x5668f7(0xbb)]){case'add':{const _0x2e0df1=_0x105235[_0x5668f7(0x7f)][_0x5668f7(0xc8)];_0x17fffc[_0x5668f7(0xc0)](_0x2e0df1);break;}}}),R(this[_0x3d8150(0xa9)],_0x17fffc);}));}[_0x54d2b6(0xdf)](){const _0x590ee8=_0x54d2b6;this[_0x590ee8(0xd9)](this[_0x590ee8(0xba)][_0x590ee8(0xce)][_0x590ee8(0x97)](async _0x39d8d5=>{const _0x969405=_0x590ee8;var _0x28c620,_0x24db95,_0x1d7ccc,_0x3e83a4;const _0x5a0f31=(_0x28c620=this['_threadCommentModel'][_0x969405(0xa3)](_0x39d8d5[_0x969405(0xcc)])[_0x969405(0xcd)](_0x5ae67e=>_0x5ae67e[_0x969405(0xdc)]===_0x39d8d5[_0x969405(0xdc)]))==null?void 0x0:_0x28c620[_0x969405(0x79)];if(!_0x5a0f31)return;const {unitId:_0x2ee970,subUnitId:_0x238e2a}=_0x5a0f31;switch(_0x39d8d5['user']&&this[_0x969405(0x9a)][_0x969405(0x73)](_0x39d8d5[_0x969405(0xbf)]),_0x39d8d5[_0x969405(0xbb)]){case v['Add']:break;case v[_0x969405(0x85)]:{this[_0x969405(0xb5)][_0x969405(0x71)](_0x2ee970,_0x238e2a,{'unitId':_0x2ee970,'subUnitId':_0x238e2a,'ref':'','id':_0x39d8d5[_0x969405(0x76)],'dT':f(+_0x39d8d5['createTimestamp']),'threadId':_0x39d8d5[_0x969405(0xdc)],'personId':(_0x1d7ccc=(_0x24db95=_0x39d8d5[_0x969405(0xbf)])==null?void 0x0:_0x24db95[_0x969405(0x7d)])!=null?_0x1d7ccc:_0x39d8d5[_0x969405(0xd1)],'text':JSON[_0x969405(0x95)](_0x39d8d5['content']),'parentId':_0x5a0f31['id']});break;}case v['Delete']:{const _0x19e470=this[_0x969405(0xb5)][_0x969405(0xc1)](_0x2ee970,_0x238e2a,_0x39d8d5[_0x969405(0x76)]);_0x19e470&&_0x19e470[_0x969405(0xc9)]&&this['_threadCommentModel'][_0x969405(0xb3)](_0x2ee970,_0x238e2a,_0x39d8d5[_0x969405(0x76)]);break;}case v[_0x969405(0xc7)]:{this[_0x969405(0xb5)][_0x969405(0x8f)](_0x2ee970,_0x238e2a,{'commentId':_0x39d8d5[_0x969405(0x76)],'text':JSON[_0x969405(0x95)](_0x39d8d5[_0x969405(0xa6)])});break;}case v[_0x969405(0xe1)]:{const _0x3c988b=(_0x3e83a4=this['_threadCommentModel'][_0x969405(0xa3)](_0x39d8d5[_0x969405(0xcc)])['find'](_0x441646=>_0x441646[_0x969405(0xdc)]===_0x39d8d5[_0x969405(0xdc)]))==null?void 0x0:_0x3e83a4[_0x969405(0x79)];_0x3c988b&&this[_0x969405(0xb5)][_0x969405(0x83)](_0x2ee970,_0x238e2a,_0x3c988b['id'],_0x39d8d5[_0x969405(0xbd)]===I[_0x969405(0xc6)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x54d2b6(0x98)])),S(0x1,c[_0x54d2b6(0xcf)](M['ThreadCommentModel'])),S(0x2,c[_0x54d2b6(0xcf)](c[_0x54d2b6(0xcb)])),S(0x3,c[_0x54d2b6(0xcf)](c['Injector']))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x54d2b6(0x74)],x=(_0x575574,_0xb5ce43,_0xb9767e,_0x3e90d0)=>{const _0x1a127a=_0x54d2b6;for(var _0x26c60e=_0x3e90d0>0x1?void 0x0:_0x3e90d0?A(_0xb5ce43,_0xb9767e):_0xb5ce43,_0x583db8=_0x575574[_0x1a127a(0x9f)]-0x1,_0x110fe1;_0x583db8>=0x0;_0x583db8--)(_0x110fe1=_0x575574[_0x583db8])&&(_0x26c60e=_0x110fe1(_0x26c60e)||_0x26c60e);return _0x26c60e;},_=(_0x25f9a0,_0x3cd812)=>(_0x7e3d4c,_0x5c252b)=>_0x3cd812(_0x7e3d4c,_0x5c252b,_0x25f9a0);function Y(_0x3830e6,_0x17002c){const _0x5c82e2=_0x54d2b6,_0x1af852=_0x3830e6[_0x5c82e2(0xc4)][0x0];return{..._0x17002c,'id':_0x1af852['replyId'],'resolved':_0x3830e6[_0x5c82e2(0xbd)]===0x1,'dT':f(_0x1af852[_0x5c82e2(0x93)]),'personId':_0x1af852[_0x5c82e2(0xd1)],'threadId':_0x1af852['threadId']};}function G(_0x3ed7fc,_0xf8674,_0x50406e){const _0x2e22c8=_0x54d2b6;var _0x4e98c9,_0x11dde5;if(((_0x11dde5=(_0x4e98c9=_0x3ed7fc==null?void 0x0:_0x3ed7fc['replies'])==null?void 0x0:_0x4e98c9['length'])!=null?_0x11dde5:0x0)>0x0){const _0x593fdd=(_0x460531,_0x2015f7)=>({'id':_0x460531[_0x2e22c8(0x76)],'threadId':_0x460531['threadId'],'dT':f(_0x460531[_0x2e22c8(0x93)]),'personId':_0x460531[_0x2e22c8(0xd1)],'resolved':_0x3ed7fc['solved']===I[_0x2e22c8(0xc6)],'unitId':_0xf8674,'subUnitId':_0x50406e,'text':JSON[_0x2e22c8(0x95)](_0x460531[_0x2e22c8(0xa6)]),'parentId':_0x2015f7}),_0x36d63f=_0x593fdd(_0x3ed7fc['replies'][0x0]);return{..._0x36d63f,'children':_0x3ed7fc[_0x2e22c8(0xc4)][_0x2e22c8(0xaa)](0x1)[_0x2e22c8(0x96)](_0x2700b0=>_0x593fdd(_0x2700b0,_0x36d63f['id']))};}return null;}let g=class{constructor(_0x250fa3,_0x37d81c,_0xf08d44,_0x5be0f7){const _0x2244bc=_0x54d2b6;this[_0x2244bc(0xdb)]=_0x250fa3,this[_0x2244bc(0x9a)]=_0x37d81c,this['_sessionService']=_0xf08d44,this[_0x2244bc(0xa9)]=_0x5be0f7;}async[_0x54d2b6(0x71)](_0x50c067){const _0x1de139=_0x54d2b6;var _0x47aafa,_0x1d9705;const {parentId:_0x5a3415,unitId:_0x4677e0,text:_0xb40a97,threadId:_0x42fc97}=_0x50c067,_0x180665=(_0x1d9705=(_0x47aafa=_0xb40a97[_0x1de139(0x6f)])==null?void 0x0:_0x47aafa[_0x1de139(0xa4)](_0x23b8dd=>_0x23b8dd[_0x1de139(0x91)]===c[_0x1de139(0x9c)]['COMMENT'])[_0x1de139(0x96)](_0x4e51d4=>_0x4e51d4[_0x1de139(0xb6)]))!=null?_0x1d9705:[],_0x1f80c2=JSON[_0x1de139(0x78)](_0xb40a97),_0x5d7541=(await this[_0x1de139(0x6e)]['requireSession'](_0x4677e0))[_0x1de139(0x9e)]();if(_0x5a3415){const _0x2106f4={'memberId':_0x5d7541,'unitId':_0x4677e0,'content':_0x1f80c2,'mention':_0x180665,'threadId':_0x42fc97},_0x1a8c9d=(await this[_0x1de139(0xdb)][_0x1de139(0xe3)](_0x1de139(0xab)+_0x4677e0+_0x1de139(0xca),{'body':_0x2106f4}))[_0x1de139(0xe6)][_0x1de139(0x94)];return{..._0x50c067,'id':_0x1a8c9d[_0x1de139(0x76)],'dT':c[_0x1de139(0xd4)](+_0x1a8c9d[_0x1de139(0x93)])[_0x1de139(0xa2)](_0x1de139(0xe0)),'personId':_0x1a8c9d[_0x1de139(0xd1)]};}else{const _0x1e7eee={'memberId':_0x5d7541,'unitId':_0x4677e0,'content':_0x1f80c2,'mention':_0x180665},_0x1eb2d0=await this['_httpService'][_0x1de139(0xe3)](_0x1de139(0xab)+_0x4677e0+'/add',{'body':_0x1e7eee});return Y(_0x1eb2d0[_0x1de139(0xe6)][_0x1de139(0x70)],_0x50c067);}}async[_0x54d2b6(0x8f)](_0x579fef){const _0x24775d=_0x54d2b6;var _0x5329af,_0x2d4b50;const {text:_0x4caa1f,unitId:_0x43cf58}=_0x579fef,_0x30e715=(_0x2d4b50=(_0x5329af=_0x4caa1f[_0x24775d(0x6f)])==null?void 0x0:_0x5329af['filter'](_0x2d8d41=>_0x2d8d41[_0x24775d(0x91)]===c[_0x24775d(0x9c)][_0x24775d(0x9b)])['map'](_0x45bc60=>_0x45bc60[_0x24775d(0xb6)]))!=null?_0x2d4b50:[],_0x5730a4=JSON['stringify'](_0x4caa1f),_0xb79d65=_0x579fef['threadId'],_0x13d139=_0x579fef['id'],_0x2a7013={'memberId':(await this[_0x24775d(0x6e)][_0x24775d(0xd5)](_0x43cf58))['getMemberID'](),'unitId':_0x43cf58,'threadId':_0xb79d65,'mention':_0x30e715,'content':_0x5730a4,'replyId':_0x13d139},_0x23c277=await this[_0x24775d(0xdb)]['post']('/universer-api/comment/unit/'+_0x43cf58+'/edit',{'body':_0x2a7013});return!_0x23c277[_0x24775d(0xe6)][_0x24775d(0x92)]||_0x23c277[_0x24775d(0xe6)][_0x24775d(0x92)]['code']===0x1;}async[_0x54d2b6(0x83)](_0x3970cc){const _0x560e75=_0x54d2b6,{unitId:_0x2f8b68}=_0x3970cc,_0x1ef2c1=_0x3970cc['threadId'],_0xa388c9={'memberId':this['_userService'][_0x560e75(0xa8)]()[_0x560e75(0x7d)],'unitId':_0x2f8b68,'threadId':_0x1ef2c1,'solved':_0x3970cc['resolved']?I[_0x560e75(0xc6)]:I[_0x560e75(0xc5)]},_0x4319f6=await this[_0x560e75(0xdb)][_0x560e75(0xe3)](_0x560e75(0xab)+_0x2f8b68+'/solved',{'body':_0xa388c9});return!_0x4319f6[_0x560e75(0xe6)][_0x560e75(0x92)]||_0x4319f6['body'][_0x560e75(0x92)][_0x560e75(0xd8)]===0x1;}async[_0x54d2b6(0xb3)](_0x32639e,_0x1b5992,_0x465600,_0x4a0d5c){const _0x271554=_0x54d2b6,_0x8cad2a={'memberId':(await this[_0x271554(0x6e)][_0x271554(0xd5)](_0x32639e))['getMemberID'](),'threadId':_0x465600,'replyId':_0x4a0d5c,'unitId':_0x32639e},_0x307c8d=await this[_0x271554(0xdb)][_0x271554(0xe3)](_0x271554(0xab)+_0x32639e+_0x271554(0x7b),{'body':_0x8cad2a});return!_0x307c8d[_0x271554(0xe6)][_0x271554(0x92)]||_0x307c8d[_0x271554(0xe6)][_0x271554(0x92)][_0x271554(0xd8)]===0x1;}async[_0x54d2b6(0xe2)](_0x486a58,_0x9309b,_0x3287d8){const _0xb3ac84=_0x54d2b6,_0xe2bd36={'unitId':_0x486a58,'threadId':_0x3287d8},_0xe243f4=await this['_httpService'][_0xb3ac84(0xe3)](_0xb3ac84(0xab)+_0x486a58+'/list',{'body':_0xe2bd36}),_0x258dcc=_0x3287d8['map'](_0x328f93=>G(_0xe243f4[_0xb3ac84(0xe6)][_0xb3ac84(0x86)][_0x328f93],_0x486a58,_0x9309b))[_0xb3ac84(0xa4)](Boolean);return Object[_0xb3ac84(0x8d)](_0xe243f4[_0xb3ac84(0xe6)][_0xb3ac84(0xad)])['forEach'](_0x408dd0=>{const _0x2b177b=_0xb3ac84;this[_0x2b177b(0x9a)]['addUser'](_0x408dd0);}),_0x258dcc;}[_0x54d2b6(0xaf)](_0x4e6c69){const _0x493702=_0x54d2b6;return{'id':_0x4e6c69['id'],'threadId':_0x4e6c69[_0x493702(0xdc)],'ref':_0x4e6c69[_0x493702(0x8a)]};}};g=x([_(0x0,c[_0x54d2b6(0xcf)](P['HTTPService'])),_(0x1,c['Inject'](c['UserManagerService'])),_(0x2,c[_0x54d2b6(0xcf)](b['CollaborationSessionService'])),_(0x3,c[_0x54d2b6(0xcf)](c[_0x54d2b6(0xd7)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x165231,_0x43bb64,_0x1a7a27,_0x51c89d)=>{const _0x6c0fcd=_0x54d2b6;for(var _0x5b264f=_0x51c89d>0x1?void 0x0:_0x51c89d?H(_0x43bb64,_0x1a7a27):_0x43bb64,_0x5aaf5e=_0x165231[_0x6c0fcd(0x9f)]-0x1,_0x29892c;_0x5aaf5e>=0x0;_0x5aaf5e--)(_0x29892c=_0x165231[_0x5aaf5e])&&(_0x5b264f=_0x29892c(_0x5b264f)||_0x5b264f);return _0x5b264f;},y=(_0x481818,_0x29a272)=>(_0x1a891e,_0x40097b)=>_0x29a272(_0x1a891e,_0x40097b,_0x481818);let C=class extends c[_0x54d2b6(0xb4)]{constructor(_0x4300a6,_0x1e20a6){const _0xdde43c=_0x54d2b6;super(),this[_0xdde43c(0x87)]=_0x4300a6,this[_0xdde43c(0x90)]=_0x1e20a6,this[_0xdde43c(0xac)]();}[_0x54d2b6(0xac)](){const _0x402ec6=_0x54d2b6;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x402ec6(0x87)][_0x402ec6(0x89)]=!0x1;}};C=J([y(0x0,M[_0x54d2b6(0x8c)]),y(0x1,c[_0x54d2b6(0xcf)](g))],C);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x25a770,_0x3796b1,_0x5bca13)=>_0x3796b1 in _0x25a770?F(_0x25a770,_0x3796b1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5bca13}):_0x25a770[_0x3796b1]=_0x5bca13,W=(_0x423547,_0x1d4ec9,_0x560521,_0x2c61e6)=>{const _0x589a15=_0x54d2b6;for(var _0x12dce6=_0x2c61e6>0x1?void 0x0:_0x2c61e6?L(_0x1d4ec9,_0x560521):_0x1d4ec9,_0x1a4829=_0x423547[_0x589a15(0x9f)]-0x1,_0x3798b3;_0x1a4829>=0x0;_0x1a4829--)(_0x3798b3=_0x423547[_0x1a4829])&&(_0x12dce6=_0x3798b3(_0x12dce6)||_0x12dce6);return _0x12dce6;},O=(_0x46675b,_0x1914e2)=>(_0x23c9e8,_0x26df91)=>_0x1914e2(_0x23c9e8,_0x26df91,_0x46675b),N=(_0x556760,_0x290fe0,_0x5f3e32)=>Z(_0x556760,typeof _0x290fe0!=_0x54d2b6(0x7e)?_0x290fe0+'':_0x290fe0,_0x5f3e32);exports[_0x54d2b6(0xa0)]=class extends c[_0x54d2b6(0xde)]{constructor(_0x2a4197=D,_0x31525f,_0x5bbf7f){const _0x1cf3e6=_0x54d2b6;super(),this[_0x1cf3e6(0x9d)]=_0x2a4197,this['_injector']=_0x31525f,this[_0x1cf3e6(0xae)]=_0x5bbf7f;const {..._0x4bf596}=c['merge']({},D,this[_0x1cf3e6(0x9d)]);this[_0x1cf3e6(0xae)]['setConfig'](q,_0x4bf596);}[_0x54d2b6(0xb7)](){const _0x396d9d=_0x54d2b6;[[g],[C],[p]][_0x396d9d(0x82)](_0x5a9f5d=>{const _0x3ba1cc=_0x396d9d;this['_injector'][_0x3ba1cc(0xc0)](_0x5a9f5d);});}[_0x54d2b6(0x8e)](){const _0x3655ad=_0x54d2b6;this[_0x3655ad(0xa9)]['get'](C),this[_0x3655ad(0xa9)][_0x3655ad(0xa1)](p);}},N(exports[_0x54d2b6(0xa0)],_0x54d2b6(0x8b),U),N(exports[_0x54d2b6(0xa0)],_0x54d2b6(0xbb),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports[_0x54d2b6(0xa0)]=W([c[_0x54d2b6(0xe8)](j[_0x54d2b6(0x7a)],b['UniverCollaborationClientPlugin'],T[_0x54d2b6(0xd2)]),O(0x1,c['Inject'](c[_0x54d2b6(0xd7)])),O(0x2,c[_0x54d2b6(0x80)])],exports[_0x54d2b6(0xa0)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xd82d43=_0x1572;(function(_0x5b5441,_0x36fc3e){const _0x3c9df9=_0x1572,_0x4768c6=_0x5b5441();while(!![]){try{const _0xbef156=parseInt(_0x3c9df9(0x126))/0x1*(parseInt(_0x3c9df9(0xf4))/0x2)+-parseInt(_0x3c9df9(0x13f))/0x3+-parseInt(_0x3c9df9(0x137))/0x4+-parseInt(_0x3c9df9(0x132))/0x5+parseInt(_0x3c9df9(0x107))/0x6*(-parseInt(_0x3c9df9(0x103))/0x7)+-parseInt(_0x3c9df9(0xf5))/0x8*(-parseInt(_0x3c9df9(0x12f))/0x9)+parseInt(_0x3c9df9(0x127))/0xa;if(_0xbef156===_0x36fc3e)break;else _0x4768c6['push'](_0x4768c6['shift']());}catch(_0x136615){_0x4768c6['push'](_0x4768c6['shift']());}}}(_0x3d56,0x524df));import{CommentService as _0x2afbd1,CollaborationSessionService as _0x309717,UniverCollaborationClientPlugin as _0x5e0c12}from'@univerjs-pro/collaboration-client';function _0x3d56(){const _0x2c5c0c=['comments','unitId','getMemberID','content','replyId','user','596253qhlIDC','_userService','YYYY/MM/DD\x20HH:mm','length','18PovyPk','_configService','parentId','subscribe','Delete','_sessionService','listComments','addComment','rangeId','/list','/edit','post','getUnit','disposeWithMe','code','_threadCommentDataSourceService','_commentService','addUser','deleteComment','symbol','setConfig','syncUpdateMutationToColla','/universer-api/user/list','Add','Reply','body','payload','_initDataSource','Edit','_initUserSync','COMMENT','1641JrHVBX','12962320WRGTXQ','personId','_init','UNRECOGNIZED','getComment','customRanges','_threadCommentModel','thread-comment-data-source.config','8586PXQyRI','commentUpdate$','_injector','901470WLWzAq','dataSource','solved','saveCommentToSnapshot','userId','106868DixNtn','Solved','createTimestamp','Solve','format','root','resolved','rangeType','1785408wzthXx','resolveComment','/reply','_config','pluginName','replies','values','map','getOwnPropertyDescriptor','error','parse','stringify','get','/universer-api/comment/unit/','/delete','OpenOrReOpen','onStarting','_httpService','userID','Unknown','find','filter','add','defineProperty','users','pipe','forEach','type','62JHcdZg','400GvExMy','delete','threadId','updateComment','requireSession','/solved','onReady','_threadCommentDataSource'];_0x3d56=function(){return _0x2c5c0c;};return _0x3d56();}import{UniverLicensePlugin as _0x4d7a5a}from'@univerjs-pro/license';import{dayjs as _0xd05752,UserManagerService as _0x41b9cd,Inject as _0x5d8c37,Injector as _0x4cf3db,Disposable as _0x275151,CustomRangeType as _0x181f60,UniverInstanceType as _0xf2bc01,DependentOn as _0x29bf69,IConfigService as _0x6c6242,Plugin as _0x36e53a,merge as _0x438ac3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x43ebb9}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x271da6,IThreadCommentDataSourceService as _0x815dfc}from'@univerjs/thread-comment';import{bufferTime as _0x2dd4ef}from'rxjs';import{HTTPService as _0x54b85d}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5134d7=>(_0x5134d7[_0x5134d7[_0xd82d43(0x14e)]=0x0]='OpenOrReOpen',_0x5134d7[_0x5134d7[_0xd82d43(0x138)]=0x1]=_0xd82d43(0x138),_0x5134d7[_0x5134d7['UNRECOGNIZED']=-0x1]=_0xd82d43(0x12a),_0x5134d7))(I||{}),v=(_0xff5a21=>(_0xff5a21[_0xff5a21[_0xd82d43(0xeb)]=0x0]='Unknown',_0xff5a21[_0xff5a21[_0xd82d43(0x11e)]=0x1]='Add',_0xff5a21[_0xff5a21[_0xd82d43(0x11f)]=0x2]=_0xd82d43(0x11f),_0xff5a21[_0xff5a21[_0xd82d43(0x123)]=0x3]='Edit',_0xff5a21[_0xff5a21[_0xd82d43(0x10b)]=0x4]=_0xd82d43(0x10b),_0xff5a21[_0xff5a21[_0xd82d43(0x13a)]=0x5]=_0xd82d43(0x13a),_0xff5a21[_0xff5a21[_0xd82d43(0x12a)]=-0x1]=_0xd82d43(0x12a),_0xff5a21))(v||{});const D=_0x32dae8=>_0xd05752(new Date(+_0x32dae8))[_0xd82d43(0x13b)](_0xd82d43(0x105)),B=async(_0x530237,_0x1f227e)=>{const _0x540796=_0xd82d43,_0x304797=_0x530237[_0x540796(0x14b)](_0x41b9cd),_0x4f22b0=_0x530237[_0x540796(0x14b)](_0x54b85d);_0x1f227e[_0x540796(0xf2)](_0x59e5b5=>{const _0x3b77ff=_0x540796;_0x304797['getUser'](_0x59e5b5)&&_0x1f227e[_0x3b77ff(0xf6)](_0x59e5b5);}),_0x1f227e['size']&&(await _0x4f22b0[_0x540796(0x14b)](_0x540796(0x11d),{'params':{'userIDs':[..._0x1f227e]}}))[_0x540796(0x120)][_0x540796(0xf0)]['forEach'](_0x4e76a1=>{const _0x3731f3=_0x540796;_0x4e76a1&&_0x304797[_0x3731f3(0x118)](_0x4e76a1);});};var K=Object[_0xd82d43(0x147)],V=(_0x4495f8,_0x45ba53,_0x4a91f5,_0x5af961)=>{for(var _0x2170b0=_0x5af961>0x1?void 0x0:_0x5af961?K(_0x45ba53,_0x4a91f5):_0x45ba53,_0x1994ac=_0x4495f8['length']-0x1,_0x3c338b;_0x1994ac>=0x0;_0x1994ac--)(_0x3c338b=_0x4495f8[_0x1994ac])&&(_0x2170b0=_0x3c338b(_0x2170b0)||_0x2170b0);return _0x2170b0;},p=(_0x442411,_0x2414d9)=>(_0x2c58d5,_0x56d89f)=>_0x2414d9(_0x2c58d5,_0x56d89f,_0x442411);let S=class extends _0x275151{constructor(_0x5692e6,_0x509ecb,_0x4e2a48,_0x3098bb){const _0x48b0cf=_0xd82d43;super(),this[_0x48b0cf(0x117)]=_0x5692e6,this[_0x48b0cf(0x12d)]=_0x509ecb,this[_0x48b0cf(0x104)]=_0x4e2a48,this[_0x48b0cf(0x131)]=_0x3098bb,this[_0x48b0cf(0x129)](),this[_0x48b0cf(0x124)]();}[_0xd82d43(0x124)](){const _0x27fe34=_0xd82d43;this[_0x27fe34(0x114)](this['_threadCommentModel'][_0x27fe34(0x130)][_0x27fe34(0xf1)](_0x2dd4ef(0x10))['subscribe'](_0x434863=>{const _0x114694=_0x27fe34,_0x2b5227=new Set();_0x434863[_0x114694(0xf2)](_0x247e9e=>{const _0x471372=_0x114694;switch(_0x247e9e[_0x471372(0xf3)]){case _0x471372(0xee):{const _0x466f50=_0x247e9e[_0x471372(0x121)][_0x471372(0x128)];_0x2b5227[_0x471372(0xee)](_0x466f50);break;}}}),B(this['_injector'],_0x2b5227);}));}['_init'](){const _0x281b0d=_0xd82d43;this[_0x281b0d(0x114)](this[_0x281b0d(0x117)]['commentUpdate$'][_0x281b0d(0x10a)](async _0xb56ee=>{const _0x1ea863=_0x281b0d;var _0x25780a,_0x5d58cd,_0x3047a2,_0x2b773a;const _0x3418ab=(_0x25780a=this[_0x1ea863(0x12d)]['getUnit'](_0xb56ee[_0x1ea863(0xfe)])[_0x1ea863(0xec)](_0x5d50eb=>_0x5d50eb[_0x1ea863(0xf7)]===_0xb56ee[_0x1ea863(0xf7)]))==null?void 0x0:_0x25780a[_0x1ea863(0x13c)];if(!_0x3418ab)return;const {unitId:_0x115efd,subUnitId:_0x157cde}=_0x3418ab;switch(_0xb56ee[_0x1ea863(0x102)]&&this[_0x1ea863(0x104)]['addUser'](_0xb56ee[_0x1ea863(0x102)]),_0xb56ee[_0x1ea863(0xf3)]){case v[_0x1ea863(0x11e)]:break;case v[_0x1ea863(0x11f)]:{this[_0x1ea863(0x12d)][_0x1ea863(0x10e)](_0x115efd,_0x157cde,{'unitId':_0x115efd,'subUnitId':_0x157cde,'ref':'','id':_0xb56ee[_0x1ea863(0x101)],'dT':D(+_0xb56ee[_0x1ea863(0x139)]),'threadId':_0xb56ee[_0x1ea863(0xf7)],'personId':(_0x3047a2=(_0x5d58cd=_0xb56ee['user'])==null?void 0x0:_0x5d58cd[_0x1ea863(0x151)])!=null?_0x3047a2:_0xb56ee[_0x1ea863(0x136)],'text':JSON['parse'](_0xb56ee['content']),'parentId':_0x3418ab['id']});break;}case v[_0x1ea863(0x10b)]:{const _0x2f354c=this[_0x1ea863(0x12d)][_0x1ea863(0x12b)](_0x115efd,_0x157cde,_0xb56ee[_0x1ea863(0x101)]);_0x2f354c&&_0x2f354c[_0x1ea863(0x109)]&&this[_0x1ea863(0x12d)]['deleteComment'](_0x115efd,_0x157cde,_0xb56ee['replyId']);break;}case v[_0x1ea863(0x123)]:{this[_0x1ea863(0x12d)][_0x1ea863(0xf8)](_0x115efd,_0x157cde,{'commentId':_0xb56ee[_0x1ea863(0x101)],'text':JSON[_0x1ea863(0x149)](_0xb56ee['content'])});break;}case v['Solve']:{const _0x268532=(_0x2b773a=this['_threadCommentModel'][_0x1ea863(0x113)](_0xb56ee['unitId'])[_0x1ea863(0xec)](_0x1d0a84=>_0x1d0a84[_0x1ea863(0xf7)]===_0xb56ee[_0x1ea863(0xf7)]))==null?void 0x0:_0x2b773a[_0x1ea863(0x13c)];_0x268532&&this[_0x1ea863(0x12d)][_0x1ea863(0x140)](_0x115efd,_0x157cde,_0x268532['id'],_0xb56ee[_0x1ea863(0x134)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x5d8c37(_0x2afbd1)),p(0x1,_0x5d8c37(_0x271da6)),p(0x2,_0x5d8c37(_0x41b9cd)),p(0x3,_0x5d8c37(_0x4cf3db))],S);const z=_0xd82d43(0x12e),M={};function _0x1572(_0x3327ea,_0x4c73b8){const _0x3d5678=_0x3d56();return _0x1572=function(_0x1572ec,_0x528845){_0x1572ec=_0x1572ec-0xeb;let _0x5cd1b8=_0x3d5678[_0x1572ec];return _0x5cd1b8;},_0x1572(_0x3327ea,_0x4c73b8);}var k=Object[_0xd82d43(0x147)],Q=(_0x25e839,_0x1eab5a,_0x8ce6d6,_0x1ddd4b)=>{for(var _0x502771=_0x1ddd4b>0x1?void 0x0:_0x1ddd4b?k(_0x1eab5a,_0x8ce6d6):_0x1eab5a,_0x2caf64=_0x25e839['length']-0x1,_0x560723;_0x2caf64>=0x0;_0x2caf64--)(_0x560723=_0x25e839[_0x2caf64])&&(_0x502771=_0x560723(_0x502771)||_0x502771);return _0x502771;},_=(_0x49f117,_0x164e7e)=>(_0x8c55ef,_0x3bf822)=>_0x164e7e(_0x8c55ef,_0x3bf822,_0x49f117);function X(_0x1b5380,_0x3d7683){const _0x2a729c=_0xd82d43,_0x547be9=_0x1b5380[_0x2a729c(0x144)][0x0];return{..._0x3d7683,'id':_0x547be9[_0x2a729c(0x101)],'resolved':_0x1b5380[_0x2a729c(0x134)]===0x1,'dT':D(_0x547be9[_0x2a729c(0x139)]),'personId':_0x547be9[_0x2a729c(0x136)],'threadId':_0x547be9[_0x2a729c(0xf7)]};}function ee(_0x59c2f1,_0x144c2a,_0x12a879){const _0x41aee2=_0xd82d43;var _0x264ecc,_0x5346b0;if(((_0x5346b0=(_0x264ecc=_0x59c2f1==null?void 0x0:_0x59c2f1[_0x41aee2(0x144)])==null?void 0x0:_0x264ecc[_0x41aee2(0x106)])!=null?_0x5346b0:0x0)>0x0){const _0x7b37d=(_0x41b163,_0x4fcd08)=>({'id':_0x41b163[_0x41aee2(0x101)],'threadId':_0x41b163[_0x41aee2(0xf7)],'dT':D(_0x41b163['createTimestamp']),'personId':_0x41b163[_0x41aee2(0x136)],'resolved':_0x59c2f1[_0x41aee2(0x134)]===I[_0x41aee2(0x138)],'unitId':_0x144c2a,'subUnitId':_0x12a879,'text':JSON[_0x41aee2(0x149)](_0x41b163[_0x41aee2(0x100)]),'parentId':_0x4fcd08}),_0x3a2fa2=_0x7b37d(_0x59c2f1[_0x41aee2(0x144)][0x0]);return{..._0x3a2fa2,'children':_0x59c2f1[_0x41aee2(0x144)]['slice'](0x1)['map'](_0x3f2457=>_0x7b37d(_0x3f2457,_0x3a2fa2['id']))};}return null;}let f=class{constructor(_0x1dbfc0,_0x1257a3,_0x4f3416,_0x5103c2){const _0x5ca99d=_0xd82d43;this[_0x5ca99d(0x150)]=_0x1dbfc0,this[_0x5ca99d(0x104)]=_0x1257a3,this[_0x5ca99d(0x10c)]=_0x4f3416,this[_0x5ca99d(0x131)]=_0x5103c2;}async[_0xd82d43(0x10e)](_0x525e3d){const _0x45c37a=_0xd82d43;var _0x6d07ab,_0x48ef73;const {parentId:_0x41bcbf,unitId:_0x2a996d,text:_0x5b35db,threadId:_0x5d0217}=_0x525e3d,_0x18bfeb=(_0x48ef73=(_0x6d07ab=_0x5b35db[_0x45c37a(0x12c)])==null?void 0x0:_0x6d07ab[_0x45c37a(0xed)](_0x21321e=>_0x21321e[_0x45c37a(0x13e)]===_0x181f60[_0x45c37a(0x125)])[_0x45c37a(0x146)](_0x15a50f=>_0x15a50f['rangeId']))!=null?_0x48ef73:[],_0x38ced0=JSON[_0x45c37a(0x14a)](_0x5b35db),_0x4bcc49=(await this[_0x45c37a(0x10c)][_0x45c37a(0xf9)](_0x2a996d))['getMemberID']();if(_0x41bcbf){const _0x51407f={'memberId':_0x4bcc49,'unitId':_0x2a996d,'content':_0x38ced0,'mention':_0x18bfeb,'threadId':_0x5d0217},_0x52fafa=(await this[_0x45c37a(0x150)]['post'](_0x45c37a(0x14c)+_0x2a996d+_0x45c37a(0x141),{'body':_0x51407f}))['body']['reply'];return{..._0x525e3d,'id':_0x52fafa[_0x45c37a(0x101)],'dT':_0xd05752(+_0x52fafa[_0x45c37a(0x139)])[_0x45c37a(0x13b)](_0x45c37a(0x105)),'personId':_0x52fafa[_0x45c37a(0x136)]};}else{const _0x159e48={'memberId':_0x4bcc49,'unitId':_0x2a996d,'content':_0x38ced0,'mention':_0x18bfeb},_0x36fa45=await this['_httpService'][_0x45c37a(0x112)]('/universer-api/comment/unit/'+_0x2a996d+'/add',{'body':_0x159e48});return X(_0x36fa45[_0x45c37a(0x120)]['comment'],_0x525e3d);}}async['updateComment'](_0x2b106a){const _0x5e2e5d=_0xd82d43;var _0x445c6f,_0x2dfa91;const {text:_0x45aaf8,unitId:_0x517b32}=_0x2b106a,_0x1d6e6d=(_0x2dfa91=(_0x445c6f=_0x45aaf8[_0x5e2e5d(0x12c)])==null?void 0x0:_0x445c6f[_0x5e2e5d(0xed)](_0x44b896=>_0x44b896['rangeType']===_0x181f60[_0x5e2e5d(0x125)])[_0x5e2e5d(0x146)](_0xbaa41d=>_0xbaa41d[_0x5e2e5d(0x10f)]))!=null?_0x2dfa91:[],_0x4d8653=JSON[_0x5e2e5d(0x14a)](_0x45aaf8),_0x367182=_0x2b106a[_0x5e2e5d(0xf7)],_0x2ba288=_0x2b106a['id'],_0x11a720={'memberId':(await this[_0x5e2e5d(0x10c)]['requireSession'](_0x517b32))[_0x5e2e5d(0xff)](),'unitId':_0x517b32,'threadId':_0x367182,'mention':_0x1d6e6d,'content':_0x4d8653,'replyId':_0x2ba288},_0x1b9c67=await this['_httpService']['post'](_0x5e2e5d(0x14c)+_0x517b32+_0x5e2e5d(0x111),{'body':_0x11a720});return!_0x1b9c67[_0x5e2e5d(0x120)]['error']||_0x1b9c67[_0x5e2e5d(0x120)][_0x5e2e5d(0x148)][_0x5e2e5d(0x115)]===0x1;}async[_0xd82d43(0x140)](_0x4893f4){const _0x519710=_0xd82d43,{unitId:_0x466518}=_0x4893f4,_0x47b68c=_0x4893f4[_0x519710(0xf7)],_0x274a1b={'memberId':this['_userService']['getCurrentUser']()[_0x519710(0x151)],'unitId':_0x466518,'threadId':_0x47b68c,'solved':_0x4893f4[_0x519710(0x13d)]?I[_0x519710(0x138)]:I[_0x519710(0x14e)]},_0x606572=await this[_0x519710(0x150)][_0x519710(0x112)]('/universer-api/comment/unit/'+_0x466518+_0x519710(0xfa),{'body':_0x274a1b});return!_0x606572['body'][_0x519710(0x148)]||_0x606572[_0x519710(0x120)][_0x519710(0x148)][_0x519710(0x115)]===0x1;}async[_0xd82d43(0x119)](_0x26b4a3,_0x123483,_0x4adb8a,_0xf9cfad){const _0x4c9b52=_0xd82d43,_0x1d428d={'memberId':(await this[_0x4c9b52(0x10c)][_0x4c9b52(0xf9)](_0x26b4a3))[_0x4c9b52(0xff)](),'threadId':_0x4adb8a,'replyId':_0xf9cfad,'unitId':_0x26b4a3},_0x3f0bfd=await this[_0x4c9b52(0x150)][_0x4c9b52(0x112)](_0x4c9b52(0x14c)+_0x26b4a3+_0x4c9b52(0x14d),{'body':_0x1d428d});return!_0x3f0bfd[_0x4c9b52(0x120)][_0x4c9b52(0x148)]||_0x3f0bfd['body'][_0x4c9b52(0x148)][_0x4c9b52(0x115)]===0x1;}async[_0xd82d43(0x10d)](_0x577f57,_0x52d722,_0xe7beeb){const _0x4ff479=_0xd82d43,_0x245c77={'unitId':_0x577f57,'threadId':_0xe7beeb},_0x20f99a=await this[_0x4ff479(0x150)][_0x4ff479(0x112)](_0x4ff479(0x14c)+_0x577f57+_0x4ff479(0x110),{'body':_0x245c77}),_0x3de7a1=_0xe7beeb[_0x4ff479(0x146)](_0x45f73e=>ee(_0x20f99a[_0x4ff479(0x120)][_0x4ff479(0xfd)][_0x45f73e],_0x577f57,_0x52d722))[_0x4ff479(0xed)](Boolean);return Object[_0x4ff479(0x145)](_0x20f99a[_0x4ff479(0x120)][_0x4ff479(0xf0)])['forEach'](_0x403c56=>{const _0x1e968c=_0x4ff479;this[_0x1e968c(0x104)][_0x1e968c(0x118)](_0x403c56);}),_0x3de7a1;}[_0xd82d43(0x135)](_0x5b8d97){const _0x59cd6a=_0xd82d43;return{'id':_0x5b8d97['id'],'threadId':_0x5b8d97[_0x59cd6a(0xf7)],'ref':_0x5b8d97['ref']};}};f=Q([_(0x0,_0x5d8c37(_0x54b85d)),_(0x1,_0x5d8c37(_0x41b9cd)),_(0x2,_0x5d8c37(_0x309717)),_(0x3,_0x5d8c37(_0x4cf3db))],f);var re=Object[_0xd82d43(0x147)],te=(_0x4fad81,_0x1ab5c0,_0x1ba570,_0x46bdf7)=>{const _0x52bbe1=_0xd82d43;for(var _0x2e1037=_0x46bdf7>0x1?void 0x0:_0x46bdf7?re(_0x1ab5c0,_0x1ba570):_0x1ab5c0,_0x284fa9=_0x4fad81[_0x52bbe1(0x106)]-0x1,_0xb47cff;_0x284fa9>=0x0;_0x284fa9--)(_0xb47cff=_0x4fad81[_0x284fa9])&&(_0x2e1037=_0xb47cff(_0x2e1037)||_0x2e1037);return _0x2e1037;},N=(_0x1f9535,_0x51001e)=>(_0x3ffdbb,_0x4962bb)=>_0x51001e(_0x3ffdbb,_0x4962bb,_0x1f9535);let g=class extends _0x275151{constructor(_0x2ba7c3,_0x2d6df2){const _0x23c949=_0xd82d43;super(),this[_0x23c949(0x116)]=_0x2ba7c3,this['_threadCommentDataSource']=_0x2d6df2,this[_0x23c949(0x122)]();}[_0xd82d43(0x122)](){const _0x2ca8e6=_0xd82d43;this[_0x2ca8e6(0x116)][_0x2ca8e6(0x133)]=this[_0x2ca8e6(0xfc)],this['_threadCommentDataSourceService'][_0x2ca8e6(0x11c)]=!0x1;}};g=te([N(0x0,_0x815dfc),N(0x1,_0x5d8c37(f))],g);var se=Object[_0xd82d43(0xef)],oe=Object[_0xd82d43(0x147)],ne=(_0x12af1d,_0x1366f5,_0x179e08)=>_0x1366f5 in _0x12af1d?se(_0x12af1d,_0x1366f5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x179e08}):_0x12af1d[_0x1366f5]=_0x179e08,ie=(_0x3c2b43,_0x21e10a,_0x515854,_0x47b6a1)=>{const _0x4831e8=_0xd82d43;for(var _0x1bc770=_0x47b6a1>0x1?void 0x0:_0x47b6a1?oe(_0x21e10a,_0x515854):_0x21e10a,_0x4ba224=_0x3c2b43[_0x4831e8(0x106)]-0x1,_0x49c03d;_0x4ba224>=0x0;_0x4ba224--)(_0x49c03d=_0x3c2b43[_0x4ba224])&&(_0x1bc770=_0x49c03d(_0x1bc770)||_0x1bc770);return _0x1bc770;},w=(_0xfc2d1a,_0x5568de)=>(_0x1a761a,_0x391a44)=>_0x5568de(_0x1a761a,_0x391a44,_0xfc2d1a),$=(_0x72e15c,_0x4ba227,_0x3c9664)=>ne(_0x72e15c,typeof _0x4ba227!=_0xd82d43(0x11a)?_0x4ba227+'':_0x4ba227,_0x3c9664);let b=class extends _0x36e53a{constructor(_0xfa57f2=M,_0x419983,_0x2f46ef){const _0x3b0ad6=_0xd82d43;super(),this[_0x3b0ad6(0x142)]=_0xfa57f2,this['_injector']=_0x419983,this[_0x3b0ad6(0x108)]=_0x2f46ef;const {..._0x2da69e}=_0x438ac3({},M,this['_config']);this[_0x3b0ad6(0x108)][_0x3b0ad6(0x11b)](z,_0x2da69e);}[_0xd82d43(0x14f)](){const _0x3ec210=_0xd82d43;[[f],[g],[S]][_0x3ec210(0xf2)](_0x19d377=>{const _0x28ccd0=_0x3ec210;this[_0x28ccd0(0x131)][_0x28ccd0(0xee)](_0x19d377);});}[_0xd82d43(0xfb)](){const _0x58524b=_0xd82d43;this[_0x58524b(0x131)][_0x58524b(0x14b)](g),this[_0x58524b(0x131)]['get'](S);}};$(b,_0xd82d43(0x143),W),$(b,_0xd82d43(0xf3),_0xf2bc01['UNIVER_UNKNOWN']),b=ie([_0x29bf69(_0x43ebb9,_0x5e0c12,_0x4d7a5a),w(0x1,_0x5d8c37(_0x4cf3db)),w(0x2,_0x6c6242)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x2410e5=_0x4b6a;(function(_0x54248b,_0x4d1961){const _0x31c1b1=_0x4b6a,_0x55f0a7=_0x54248b();while(!![]){try{const _0x58f5e2=-parseInt(_0x31c1b1(0x1b5))/0x1*(parseInt(_0x31c1b1(0x180))/0x2)+-parseInt(_0x31c1b1(0x1a8))/0x3+parseInt(_0x31c1b1(0x1ab))/0x4+-parseInt(_0x31c1b1(0x193))/0x5*(-parseInt(_0x31c1b1(0x1bf))/0x6)+-parseInt(_0x31c1b1(0x17d))/0x7*(parseInt(_0x31c1b1(0x1a0))/0x8)+-parseInt(_0x31c1b1(0x1a3))/0x9*(-parseInt(_0x31c1b1(0x18b))/0xa)+parseInt(_0x31c1b1(0x1b1))/0xb;if(_0x58f5e2===_0x4d1961)break;else _0x55f0a7['push'](_0x55f0a7['shift']());}catch(_0x5a1313){_0x55f0a7['push'](_0x55f0a7['shift']());}}}(_0x3382,0xd8b6b));import{CommentService as _0x52a730,CollaborationSessionService as _0x1bcb6a,UniverCollaborationClientPlugin as _0x54e958}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x171464}from'@univerjs-pro/license';import{dayjs as _0x44a548,UserManagerService as _0x48ddeb,Inject as _0x242445,Injector as _0x2598ce,Disposable as _0x3f72a7,CustomRangeType as _0x2453e6,UniverInstanceType as _0x28a7b0,DependentOn as _0xea713d,IConfigService as _0x1580e0,Plugin as _0x17faa2,merge as _0x529fa5}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1e752b}from'@univerjs/thread-comment-ui';function _0x4b6a(_0x217636,_0x5c5cd0){const _0x33828f=_0x3382();return _0x4b6a=function(_0x4b6a54,_0x17998d){_0x4b6a54=_0x4b6a54-0x16e;let _0x29b66f=_0x33828f[_0x4b6a54];return _0x29b66f;},_0x4b6a(_0x217636,_0x5c5cd0);}import{ThreadCommentModel as _0x5e8297,IThreadCommentDataSourceService as _0x4e5822}from'@univerjs/thread-comment';import{bufferTime as _0x40b7dd}from'rxjs';import{HTTPService as _0xdc3710}from'@univerjs/network';const W=_0x2410e5(0x1b6);var I=(_0x41f863=>(_0x41f863[_0x41f863[_0x2410e5(0x1b0)]=0x0]=_0x2410e5(0x1b0),_0x41f863[_0x41f863[_0x2410e5(0x17b)]=0x1]=_0x2410e5(0x17b),_0x41f863[_0x41f863[_0x2410e5(0x173)]=-0x1]=_0x2410e5(0x173),_0x41f863))(I||{}),v=(_0x5dd029=>(_0x5dd029[_0x5dd029[_0x2410e5(0x19a)]=0x0]=_0x2410e5(0x19a),_0x5dd029[_0x5dd029[_0x2410e5(0x1aa)]=0x1]=_0x2410e5(0x1aa),_0x5dd029[_0x5dd029[_0x2410e5(0x19c)]=0x2]=_0x2410e5(0x19c),_0x5dd029[_0x5dd029[_0x2410e5(0x1b7)]=0x3]=_0x2410e5(0x1b7),_0x5dd029[_0x5dd029['Delete']=0x4]=_0x2410e5(0x184),_0x5dd029[_0x5dd029['Solve']=0x5]='Solve',_0x5dd029[_0x5dd029[_0x2410e5(0x173)]=-0x1]='UNRECOGNIZED',_0x5dd029))(v||{});const D=_0x96802f=>_0x44a548(new Date(+_0x96802f))[_0x2410e5(0x172)](_0x2410e5(0x1bb)),B=async(_0x1770f9,_0x1cd85a)=>{const _0x4f0ef0=_0x2410e5,_0x15555c=_0x1770f9['get'](_0x48ddeb),_0x30680d=_0x1770f9['get'](_0xdc3710);_0x1cd85a['forEach'](_0x368461=>{const _0x62680d=_0x4b6a;_0x15555c[_0x62680d(0x1d0)](_0x368461)&&_0x1cd85a[_0x62680d(0x17a)](_0x368461);}),_0x1cd85a['size']&&(await _0x30680d[_0x4f0ef0(0x1c3)](_0x4f0ef0(0x1cc),{'params':{'userIDs':[..._0x1cd85a]}}))[_0x4f0ef0(0x17e)][_0x4f0ef0(0x1b4)][_0x4f0ef0(0x1bc)](_0x27355c=>{const _0x4163b0=_0x4f0ef0;_0x27355c&&_0x15555c[_0x4163b0(0x179)](_0x27355c);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x3d474d,_0x3af0ae,_0x29d1da,_0xc6d2eb)=>{const _0x467abe=_0x2410e5;for(var _0x2d6e53=_0xc6d2eb>0x1?void 0x0:_0xc6d2eb?K(_0x3af0ae,_0x29d1da):_0x3af0ae,_0x3cce0a=_0x3d474d[_0x467abe(0x1c2)]-0x1,_0x33a45e;_0x3cce0a>=0x0;_0x3cce0a--)(_0x33a45e=_0x3d474d[_0x3cce0a])&&(_0x2d6e53=_0x33a45e(_0x2d6e53)||_0x2d6e53);return _0x2d6e53;},p=(_0x124707,_0x5eefe5)=>(_0x16053c,_0x5283dd)=>_0x5eefe5(_0x16053c,_0x5283dd,_0x124707);let S=class extends _0x3f72a7{constructor(_0x1b3909,_0x10fc5b,_0x163f6f,_0x30bab3){const _0x214331=_0x2410e5;super(),this['_commentService']=_0x1b3909,this[_0x214331(0x1c1)]=_0x10fc5b,this[_0x214331(0x1c5)]=_0x163f6f,this[_0x214331(0x1d1)]=_0x30bab3,this[_0x214331(0x1a1)](),this['_initUserSync']();}['_initUserSync'](){const _0x3b308d=_0x2410e5;this[_0x3b308d(0x194)](this['_threadCommentModel']['commentUpdate$'][_0x3b308d(0x1ba)](_0x40b7dd(0x10))[_0x3b308d(0x174)](_0x1cdb36=>{const _0x2668c4=_0x3b308d,_0xa1c514=new Set();_0x1cdb36[_0x2668c4(0x1bc)](_0x52e708=>{const _0x53608f=_0x2668c4;switch(_0x52e708['type']){case'add':{const _0x2b07da=_0x52e708['payload'][_0x53608f(0x176)];_0xa1c514[_0x53608f(0x18e)](_0x2b07da);break;}}}),B(this[_0x2668c4(0x1d1)],_0xa1c514);}));}[_0x2410e5(0x1a1)](){const _0x1674ee=_0x2410e5;this[_0x1674ee(0x194)](this[_0x1674ee(0x189)][_0x1674ee(0x1a6)]['subscribe'](async _0x4aed82=>{const _0x2f5fda=_0x1674ee;var _0x3a3279,_0x1fa207,_0x3cf015,_0x2450c4;const _0x554bbc=(_0x3a3279=this[_0x2f5fda(0x1c1)]['getUnit'](_0x4aed82[_0x2f5fda(0x1c0)])[_0x2f5fda(0x1c4)](_0x377dc2=>_0x377dc2['threadId']===_0x4aed82[_0x2f5fda(0x1b9)]))==null?void 0x0:_0x3a3279['root'];if(!_0x554bbc)return;const {unitId:_0x3df3ac,subUnitId:_0x24c24f}=_0x554bbc;switch(_0x4aed82[_0x2f5fda(0x1cb)]&&this['_userService']['addUser'](_0x4aed82[_0x2f5fda(0x1cb)]),_0x4aed82[_0x2f5fda(0x1ae)]){case v[_0x2f5fda(0x1aa)]:break;case v[_0x2f5fda(0x19c)]:{this[_0x2f5fda(0x1c1)][_0x2f5fda(0x18d)](_0x3df3ac,_0x24c24f,{'unitId':_0x3df3ac,'subUnitId':_0x24c24f,'ref':'','id':_0x4aed82[_0x2f5fda(0x181)],'dT':D(+_0x4aed82[_0x2f5fda(0x1be)]),'threadId':_0x4aed82[_0x2f5fda(0x1b9)],'personId':(_0x3cf015=(_0x1fa207=_0x4aed82[_0x2f5fda(0x1cb)])==null?void 0x0:_0x1fa207['userID'])!=null?_0x3cf015:_0x4aed82[_0x2f5fda(0x192)],'text':JSON['parse'](_0x4aed82['content']),'parentId':_0x554bbc['id']});break;}case v['Delete']:{const _0x15ae54=this['_threadCommentModel'][_0x2f5fda(0x170)](_0x3df3ac,_0x24c24f,_0x4aed82['replyId']);_0x15ae54&&_0x15ae54['parentId']&&this[_0x2f5fda(0x1c1)][_0x2f5fda(0x177)](_0x3df3ac,_0x24c24f,_0x4aed82[_0x2f5fda(0x181)]);break;}case v[_0x2f5fda(0x1b7)]:{this[_0x2f5fda(0x1c1)][_0x2f5fda(0x18f)](_0x3df3ac,_0x24c24f,{'commentId':_0x4aed82['replyId'],'text':JSON[_0x2f5fda(0x1c7)](_0x4aed82[_0x2f5fda(0x191)])});break;}case v[_0x2f5fda(0x17c)]:{const _0x3e33de=(_0x2450c4=this[_0x2f5fda(0x1c1)][_0x2f5fda(0x186)](_0x4aed82[_0x2f5fda(0x1c0)])[_0x2f5fda(0x1c4)](_0x248556=>_0x248556[_0x2f5fda(0x1b9)]===_0x4aed82[_0x2f5fda(0x1b9)]))==null?void 0x0:_0x2450c4[_0x2f5fda(0x1b2)];_0x3e33de&&this['_threadCommentModel'][_0x2f5fda(0x19b)](_0x3df3ac,_0x24c24f,_0x3e33de['id'],_0x4aed82[_0x2f5fda(0x16f)]===I[_0x2f5fda(0x17b)]);break;}}}));}};S=V([p(0x0,_0x242445(_0x52a730)),p(0x1,_0x242445(_0x5e8297)),p(0x2,_0x242445(_0x48ddeb)),p(0x3,_0x242445(_0x2598ce))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x2410e5(0x185)],Q=(_0x699e42,_0x28a0d7,_0x1ab014,_0x5f0088)=>{const _0x25c08d=_0x2410e5;for(var _0x44014b=_0x5f0088>0x1?void 0x0:_0x5f0088?k(_0x28a0d7,_0x1ab014):_0x28a0d7,_0x14dd9a=_0x699e42[_0x25c08d(0x1c2)]-0x1,_0x203361;_0x14dd9a>=0x0;_0x14dd9a--)(_0x203361=_0x699e42[_0x14dd9a])&&(_0x44014b=_0x203361(_0x44014b)||_0x44014b);return _0x44014b;},_=(_0x45a154,_0x1f79c1)=>(_0x1db020,_0x36b377)=>_0x1f79c1(_0x1db020,_0x36b377,_0x45a154);function X(_0x3c67fb,_0x38fa33){const _0x545b55=_0x2410e5,_0x5778d7=_0x3c67fb[_0x545b55(0x1b3)][0x0];return{..._0x38fa33,'id':_0x5778d7[_0x545b55(0x181)],'resolved':_0x3c67fb[_0x545b55(0x16f)]===0x1,'dT':D(_0x5778d7[_0x545b55(0x1be)]),'personId':_0x5778d7[_0x545b55(0x192)],'threadId':_0x5778d7['threadId']};}function ee(_0x17b5f7,_0x5e3ff9,_0x5694f){const _0x4e6185=_0x2410e5;var _0x218ba8,_0x2ef392;if(((_0x2ef392=(_0x218ba8=_0x17b5f7==null?void 0x0:_0x17b5f7[_0x4e6185(0x1b3)])==null?void 0x0:_0x218ba8[_0x4e6185(0x1c2)])!=null?_0x2ef392:0x0)>0x0){const _0x2a8bc5=(_0x17b1f0,_0x2e0264)=>({'id':_0x17b1f0[_0x4e6185(0x181)],'threadId':_0x17b1f0[_0x4e6185(0x1b9)],'dT':D(_0x17b1f0['createTimestamp']),'personId':_0x17b1f0[_0x4e6185(0x192)],'resolved':_0x17b5f7[_0x4e6185(0x16f)]===I[_0x4e6185(0x17b)],'unitId':_0x5e3ff9,'subUnitId':_0x5694f,'text':JSON[_0x4e6185(0x1c7)](_0x17b1f0[_0x4e6185(0x191)]),'parentId':_0x2e0264}),_0x29e24d=_0x2a8bc5(_0x17b5f7[_0x4e6185(0x1b3)][0x0]);return{..._0x29e24d,'children':_0x17b5f7[_0x4e6185(0x1b3)][_0x4e6185(0x1cf)](0x1)[_0x4e6185(0x16e)](_0x3fb438=>_0x2a8bc5(_0x3fb438,_0x29e24d['id']))};}return null;}let f=class{constructor(_0x1344ad,_0x282938,_0x408534,_0x373c56){const _0xc9aacb=_0x2410e5;this['_httpService']=_0x1344ad,this['_userService']=_0x282938,this[_0xc9aacb(0x1cd)]=_0x408534,this[_0xc9aacb(0x1d1)]=_0x373c56;}async['addComment'](_0x3eb50e){const _0xcc6bbb=_0x2410e5;var _0x25bb37,_0x1102d3;const {parentId:_0x5ae26a,unitId:_0x13f933,text:_0x4387ba,threadId:_0x3d7906}=_0x3eb50e,_0x3c0c6d=(_0x1102d3=(_0x25bb37=_0x4387ba[_0xcc6bbb(0x1ce)])==null?void 0x0:_0x25bb37[_0xcc6bbb(0x19d)](_0x3bee86=>_0x3bee86['rangeType']===_0x2453e6[_0xcc6bbb(0x1d4)])['map'](_0x22cbf8=>_0x22cbf8[_0xcc6bbb(0x1a9)]))!=null?_0x1102d3:[],_0x59f443=JSON[_0xcc6bbb(0x1d3)](_0x4387ba),_0x24a6a8=(await this[_0xcc6bbb(0x1cd)][_0xcc6bbb(0x1a4)](_0x13f933))['getMemberID']();if(_0x5ae26a){const _0x5b61a5={'memberId':_0x24a6a8,'unitId':_0x13f933,'content':_0x59f443,'mention':_0x3c0c6d,'threadId':_0x3d7906},_0x2fb2fb=(await this[_0xcc6bbb(0x19e)][_0xcc6bbb(0x199)](_0xcc6bbb(0x1c6)+_0x13f933+_0xcc6bbb(0x1c9),{'body':_0x5b61a5}))[_0xcc6bbb(0x17e)][_0xcc6bbb(0x1ad)];return{..._0x3eb50e,'id':_0x2fb2fb[_0xcc6bbb(0x181)],'dT':_0x44a548(+_0x2fb2fb['createTimestamp'])[_0xcc6bbb(0x172)](_0xcc6bbb(0x1bb)),'personId':_0x2fb2fb[_0xcc6bbb(0x192)]};}else{const _0x12127e={'memberId':_0x24a6a8,'unitId':_0x13f933,'content':_0x59f443,'mention':_0x3c0c6d},_0x277808=await this[_0xcc6bbb(0x19e)][_0xcc6bbb(0x199)]('/universer-api/comment/unit/'+_0x13f933+_0xcc6bbb(0x18a),{'body':_0x12127e});return X(_0x277808[_0xcc6bbb(0x17e)][_0xcc6bbb(0x171)],_0x3eb50e);}}async[_0x2410e5(0x18f)](_0x43b857){const _0x2d9c55=_0x2410e5;var _0x35020b,_0x12d7cf;const {text:_0x33227b,unitId:_0x431792}=_0x43b857,_0x5ab77c=(_0x12d7cf=(_0x35020b=_0x33227b['customRanges'])==null?void 0x0:_0x35020b[_0x2d9c55(0x19d)](_0x555c8e=>_0x555c8e['rangeType']===_0x2453e6['COMMENT'])['map'](_0x20ee6=>_0x20ee6['rangeId']))!=null?_0x12d7cf:[],_0x41f0b6=JSON['stringify'](_0x33227b),_0x1cfc24=_0x43b857[_0x2d9c55(0x1b9)],_0x4e1223=_0x43b857['id'],_0x347a63={'memberId':(await this[_0x2d9c55(0x1cd)][_0x2d9c55(0x1a4)](_0x431792))['getMemberID'](),'unitId':_0x431792,'threadId':_0x1cfc24,'mention':_0x5ab77c,'content':_0x41f0b6,'replyId':_0x4e1223},_0xb6eeb1=await this[_0x2d9c55(0x19e)][_0x2d9c55(0x199)](_0x2d9c55(0x1c6)+_0x431792+_0x2d9c55(0x178),{'body':_0x347a63});return!_0xb6eeb1[_0x2d9c55(0x17e)][_0x2d9c55(0x1a5)]||_0xb6eeb1['body'][_0x2d9c55(0x1a5)][_0x2d9c55(0x183)]===0x1;}async[_0x2410e5(0x19b)](_0x368e1e){const _0x5adbce=_0x2410e5,{unitId:_0x5bdfea}=_0x368e1e,_0x4df1d0=_0x368e1e['threadId'],_0x43e8b8={'memberId':this[_0x5adbce(0x1c5)][_0x5adbce(0x1bd)]()['userID'],'unitId':_0x5bdfea,'threadId':_0x4df1d0,'solved':_0x368e1e[_0x5adbce(0x1a2)]?I[_0x5adbce(0x17b)]:I['OpenOrReOpen']},_0x283e19=await this[_0x5adbce(0x19e)][_0x5adbce(0x199)](_0x5adbce(0x1c6)+_0x5bdfea+_0x5adbce(0x1a7),{'body':_0x43e8b8});return!_0x283e19[_0x5adbce(0x17e)][_0x5adbce(0x1a5)]||_0x283e19[_0x5adbce(0x17e)][_0x5adbce(0x1a5)][_0x5adbce(0x183)]===0x1;}async[_0x2410e5(0x177)](_0x34e1d8,_0x426e58,_0x3f269e,_0x4cf0f7){const _0xfb1a1d=_0x2410e5,_0x4053e1={'memberId':(await this[_0xfb1a1d(0x1cd)]['requireSession'](_0x34e1d8))[_0xfb1a1d(0x18c)](),'threadId':_0x3f269e,'replyId':_0x4cf0f7,'unitId':_0x34e1d8},_0x3891ae=await this[_0xfb1a1d(0x19e)][_0xfb1a1d(0x199)]('/universer-api/comment/unit/'+_0x34e1d8+'/delete',{'body':_0x4053e1});return!_0x3891ae['body']['error']||_0x3891ae[_0xfb1a1d(0x17e)][_0xfb1a1d(0x1a5)][_0xfb1a1d(0x183)]===0x1;}async[_0x2410e5(0x197)](_0x4bab33,_0x5c1eb0,_0x4f2be8){const _0x418282=_0x2410e5,_0x17caac={'unitId':_0x4bab33,'threadId':_0x4f2be8},_0x3fd059=await this['_httpService']['post'](_0x418282(0x1c6)+_0x4bab33+_0x418282(0x1b8),{'body':_0x17caac}),_0x53325e=_0x4f2be8[_0x418282(0x16e)](_0x251d66=>ee(_0x3fd059[_0x418282(0x17e)][_0x418282(0x1ac)][_0x251d66],_0x4bab33,_0x5c1eb0))[_0x418282(0x19d)](Boolean);return Object[_0x418282(0x195)](_0x3fd059['body'][_0x418282(0x1b4)])[_0x418282(0x1bc)](_0x425499=>{const _0x59e482=_0x418282;this[_0x59e482(0x1c5)][_0x59e482(0x179)](_0x425499);}),_0x53325e;}[_0x2410e5(0x175)](_0x4e672e){const _0x4694d5=_0x2410e5;return{'id':_0x4e672e['id'],'threadId':_0x4e672e['threadId'],'ref':_0x4e672e[_0x4694d5(0x188)]};}};f=Q([_(0x0,_0x242445(_0xdc3710)),_(0x1,_0x242445(_0x48ddeb)),_(0x2,_0x242445(_0x1bcb6a)),_(0x3,_0x242445(_0x2598ce))],f);function _0x3382(){const _0x23d14f=['getComment','comment','format','UNRECOGNIZED','subscribe','saveCommentToSnapshot','personId','deleteComment','/edit','addUser','delete','Solved','Solve','2919644vOZaiM','body','_threadCommentDataSource','10yErazo','replyId','dataSource','code','Delete','getOwnPropertyDescriptor','getUnit','onReady','ref','_commentService','/add','600jbqNmG','getMemberID','addComment','add','updateComment','symbol','content','userId','805gzPFMA','disposeWithMe','values','_threadCommentDataSourceService','listComments','_configService','post','Unknown','resolveComment','Reply','filter','_httpService','_initDataSource','32JLEGzS','_init','resolved','33372aAHcHx','requireSession','error','commentUpdate$','/solved','3798117fTDBRI','rangeId','Add','6365064ndAYgs','comments','reply','type','onStarting','OpenOrReOpen','18166203YYlfHu','root','replies','users','281768rZePpj','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','/list','threadId','pipe','YYYY/MM/DD\x20HH:mm','forEach','getCurrentUser','createTimestamp','65802IaJzil','unitId','_threadCommentModel','length','get','find','_userService','/universer-api/comment/unit/','parse','pluginName','/reply','UNIVER_UNKNOWN','user','/universer-api/user/list','_sessionService','customRanges','slice','getUser','_injector','_config','stringify','COMMENT','map','solved'];_0x3382=function(){return _0x23d14f;};return _0x3382();}var re=Object[_0x2410e5(0x185)],te=(_0x1bed3c,_0x12576f,_0x2968a1,_0x1a13ca)=>{const _0x588ed9=_0x2410e5;for(var _0x723de9=_0x1a13ca>0x1?void 0x0:_0x1a13ca?re(_0x12576f,_0x2968a1):_0x12576f,_0x135474=_0x1bed3c[_0x588ed9(0x1c2)]-0x1,_0x54cdf1;_0x135474>=0x0;_0x135474--)(_0x54cdf1=_0x1bed3c[_0x135474])&&(_0x723de9=_0x54cdf1(_0x723de9)||_0x723de9);return _0x723de9;},N=(_0x37743c,_0x4fdb42)=>(_0x2cbcbb,_0x427891)=>_0x4fdb42(_0x2cbcbb,_0x427891,_0x37743c);let g=class extends _0x3f72a7{constructor(_0x2b9864,_0x475ab6){const _0x5596ed=_0x2410e5;super(),this['_threadCommentDataSourceService']=_0x2b9864,this[_0x5596ed(0x17f)]=_0x475ab6,this[_0x5596ed(0x19f)]();}[_0x2410e5(0x19f)](){const _0x3e0afb=_0x2410e5;this['_threadCommentDataSourceService'][_0x3e0afb(0x182)]=this['_threadCommentDataSource'],this[_0x3e0afb(0x196)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x4e5822),N(0x1,_0x242445(f))],g);var se=Object['defineProperty'],oe=Object[_0x2410e5(0x185)],ne=(_0x1653cd,_0x2f98ea,_0x2d7bf1)=>_0x2f98ea in _0x1653cd?se(_0x1653cd,_0x2f98ea,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2d7bf1}):_0x1653cd[_0x2f98ea]=_0x2d7bf1,ie=(_0x52b8f0,_0x20a987,_0xde68c7,_0x1bb2a7)=>{const _0x118216=_0x2410e5;for(var _0x3f2125=_0x1bb2a7>0x1?void 0x0:_0x1bb2a7?oe(_0x20a987,_0xde68c7):_0x20a987,_0x19e9cb=_0x52b8f0[_0x118216(0x1c2)]-0x1,_0x1b6ed2;_0x19e9cb>=0x0;_0x19e9cb--)(_0x1b6ed2=_0x52b8f0[_0x19e9cb])&&(_0x3f2125=_0x1b6ed2(_0x3f2125)||_0x3f2125);return _0x3f2125;},w=(_0x4f2f64,_0x46afd1)=>(_0x890f8c,_0x203444)=>_0x46afd1(_0x890f8c,_0x203444,_0x4f2f64),$=(_0x525889,_0x400275,_0x2ad653)=>ne(_0x525889,typeof _0x400275!=_0x2410e5(0x190)?_0x400275+'':_0x400275,_0x2ad653);let b=class extends _0x17faa2{constructor(_0x1311c4=M,_0x3c9838,_0x116c54){const _0x24e1c9=_0x2410e5;super(),this[_0x24e1c9(0x1d2)]=_0x1311c4,this['_injector']=_0x3c9838,this[_0x24e1c9(0x198)]=_0x116c54;const {..._0x196701}=_0x529fa5({},M,this[_0x24e1c9(0x1d2)]);this[_0x24e1c9(0x198)]['setConfig'](z,_0x196701);}[_0x2410e5(0x1af)](){const _0x26afdc=_0x2410e5;[[f],[g],[S]][_0x26afdc(0x1bc)](_0x194d81=>{this['_injector']['add'](_0x194d81);});}[_0x2410e5(0x187)](){const _0x5ba4a8=_0x2410e5;this[_0x5ba4a8(0x1d1)]['get'](g),this[_0x5ba4a8(0x1d1)][_0x5ba4a8(0x1c3)](S);}};$(b,_0x2410e5(0x1c8),W),$(b,_0x2410e5(0x1ae),_0x28a7b0[_0x2410e5(0x1ca)]),b=ie([_0xea713d(_0x1e752b,_0x54e958,_0x171464),w(0x1,_0x242445(_0x2598ce)),w(0x2,_0x1580e0)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xd82d43=_0x1572;(function(_0x5b5441,_0x36fc3e){const _0x3c9df9=_0x1572,_0x4768c6=_0x5b5441();while(!![]){try{const _0xbef156=parseInt(_0x3c9df9(0x126))/0x1*(parseInt(_0x3c9df9(0xf4))/0x2)+-parseInt(_0x3c9df9(0x13f))/0x3+-parseInt(_0x3c9df9(0x137))/0x4+-parseInt(_0x3c9df9(0x132))/0x5+parseInt(_0x3c9df9(0x107))/0x6*(-parseInt(_0x3c9df9(0x103))/0x7)+-parseInt(_0x3c9df9(0xf5))/0x8*(-parseInt(_0x3c9df9(0x12f))/0x9)+parseInt(_0x3c9df9(0x127))/0xa;if(_0xbef156===_0x36fc3e)break;else _0x4768c6['push'](_0x4768c6['shift']());}catch(_0x136615){_0x4768c6['push'](_0x4768c6['shift']());}}}(_0x3d56,0x524df));import{CommentService as _0x2afbd1,CollaborationSessionService as _0x309717,UniverCollaborationClientPlugin as _0x5e0c12}from'@univerjs-pro/collaboration-client';function _0x3d56(){const _0x2c5c0c=['comments','unitId','getMemberID','content','replyId','user','596253qhlIDC','_userService','YYYY/MM/DD\x20HH:mm','length','18PovyPk','_configService','parentId','subscribe','Delete','_sessionService','listComments','addComment','rangeId','/list','/edit','post','getUnit','disposeWithMe','code','_threadCommentDataSourceService','_commentService','addUser','deleteComment','symbol','setConfig','syncUpdateMutationToColla','/universer-api/user/list','Add','Reply','body','payload','_initDataSource','Edit','_initUserSync','COMMENT','1641JrHVBX','12962320WRGTXQ','personId','_init','UNRECOGNIZED','getComment','customRanges','_threadCommentModel','thread-comment-data-source.config','8586PXQyRI','commentUpdate$','_injector','901470WLWzAq','dataSource','solved','saveCommentToSnapshot','userId','106868DixNtn','Solved','createTimestamp','Solve','format','root','resolved','rangeType','1785408wzthXx','resolveComment','/reply','_config','pluginName','replies','values','map','getOwnPropertyDescriptor','error','parse','stringify','get','/universer-api/comment/unit/','/delete','OpenOrReOpen','onStarting','_httpService','userID','Unknown','find','filter','add','defineProperty','users','pipe','forEach','type','62JHcdZg','400GvExMy','delete','threadId','updateComment','requireSession','/solved','onReady','_threadCommentDataSource'];_0x3d56=function(){return _0x2c5c0c;};return _0x3d56();}import{UniverLicensePlugin as _0x4d7a5a}from'@univerjs-pro/license';import{dayjs as _0xd05752,UserManagerService as _0x41b9cd,Inject as _0x5d8c37,Injector as _0x4cf3db,Disposable as _0x275151,CustomRangeType as _0x181f60,UniverInstanceType as _0xf2bc01,DependentOn as _0x29bf69,IConfigService as _0x6c6242,Plugin as _0x36e53a,merge as _0x438ac3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x43ebb9}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x271da6,IThreadCommentDataSourceService as _0x815dfc}from'@univerjs/thread-comment';import{bufferTime as _0x2dd4ef}from'rxjs';import{HTTPService as _0x54b85d}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5134d7=>(_0x5134d7[_0x5134d7[_0xd82d43(0x14e)]=0x0]='OpenOrReOpen',_0x5134d7[_0x5134d7[_0xd82d43(0x138)]=0x1]=_0xd82d43(0x138),_0x5134d7[_0x5134d7['UNRECOGNIZED']=-0x1]=_0xd82d43(0x12a),_0x5134d7))(I||{}),v=(_0xff5a21=>(_0xff5a21[_0xff5a21[_0xd82d43(0xeb)]=0x0]='Unknown',_0xff5a21[_0xff5a21[_0xd82d43(0x11e)]=0x1]='Add',_0xff5a21[_0xff5a21[_0xd82d43(0x11f)]=0x2]=_0xd82d43(0x11f),_0xff5a21[_0xff5a21[_0xd82d43(0x123)]=0x3]='Edit',_0xff5a21[_0xff5a21[_0xd82d43(0x10b)]=0x4]=_0xd82d43(0x10b),_0xff5a21[_0xff5a21[_0xd82d43(0x13a)]=0x5]=_0xd82d43(0x13a),_0xff5a21[_0xff5a21[_0xd82d43(0x12a)]=-0x1]=_0xd82d43(0x12a),_0xff5a21))(v||{});const D=_0x32dae8=>_0xd05752(new Date(+_0x32dae8))[_0xd82d43(0x13b)](_0xd82d43(0x105)),B=async(_0x530237,_0x1f227e)=>{const _0x540796=_0xd82d43,_0x304797=_0x530237[_0x540796(0x14b)](_0x41b9cd),_0x4f22b0=_0x530237[_0x540796(0x14b)](_0x54b85d);_0x1f227e[_0x540796(0xf2)](_0x59e5b5=>{const _0x3b77ff=_0x540796;_0x304797['getUser'](_0x59e5b5)&&_0x1f227e[_0x3b77ff(0xf6)](_0x59e5b5);}),_0x1f227e['size']&&(await _0x4f22b0[_0x540796(0x14b)](_0x540796(0x11d),{'params':{'userIDs':[..._0x1f227e]}}))[_0x540796(0x120)][_0x540796(0xf0)]['forEach'](_0x4e76a1=>{const _0x3731f3=_0x540796;_0x4e76a1&&_0x304797[_0x3731f3(0x118)](_0x4e76a1);});};var K=Object[_0xd82d43(0x147)],V=(_0x4495f8,_0x45ba53,_0x4a91f5,_0x5af961)=>{for(var _0x2170b0=_0x5af961>0x1?void 0x0:_0x5af961?K(_0x45ba53,_0x4a91f5):_0x45ba53,_0x1994ac=_0x4495f8['length']-0x1,_0x3c338b;_0x1994ac>=0x0;_0x1994ac--)(_0x3c338b=_0x4495f8[_0x1994ac])&&(_0x2170b0=_0x3c338b(_0x2170b0)||_0x2170b0);return _0x2170b0;},p=(_0x442411,_0x2414d9)=>(_0x2c58d5,_0x56d89f)=>_0x2414d9(_0x2c58d5,_0x56d89f,_0x442411);let S=class extends _0x275151{constructor(_0x5692e6,_0x509ecb,_0x4e2a48,_0x3098bb){const _0x48b0cf=_0xd82d43;super(),this[_0x48b0cf(0x117)]=_0x5692e6,this[_0x48b0cf(0x12d)]=_0x509ecb,this[_0x48b0cf(0x104)]=_0x4e2a48,this[_0x48b0cf(0x131)]=_0x3098bb,this[_0x48b0cf(0x129)](),this[_0x48b0cf(0x124)]();}[_0xd82d43(0x124)](){const _0x27fe34=_0xd82d43;this[_0x27fe34(0x114)](this['_threadCommentModel'][_0x27fe34(0x130)][_0x27fe34(0xf1)](_0x2dd4ef(0x10))['subscribe'](_0x434863=>{const _0x114694=_0x27fe34,_0x2b5227=new Set();_0x434863[_0x114694(0xf2)](_0x247e9e=>{const _0x471372=_0x114694;switch(_0x247e9e[_0x471372(0xf3)]){case _0x471372(0xee):{const _0x466f50=_0x247e9e[_0x471372(0x121)][_0x471372(0x128)];_0x2b5227[_0x471372(0xee)](_0x466f50);break;}}}),B(this['_injector'],_0x2b5227);}));}['_init'](){const _0x281b0d=_0xd82d43;this[_0x281b0d(0x114)](this[_0x281b0d(0x117)]['commentUpdate$'][_0x281b0d(0x10a)](async _0xb56ee=>{const _0x1ea863=_0x281b0d;var _0x25780a,_0x5d58cd,_0x3047a2,_0x2b773a;const _0x3418ab=(_0x25780a=this[_0x1ea863(0x12d)]['getUnit'](_0xb56ee[_0x1ea863(0xfe)])[_0x1ea863(0xec)](_0x5d50eb=>_0x5d50eb[_0x1ea863(0xf7)]===_0xb56ee[_0x1ea863(0xf7)]))==null?void 0x0:_0x25780a[_0x1ea863(0x13c)];if(!_0x3418ab)return;const {unitId:_0x115efd,subUnitId:_0x157cde}=_0x3418ab;switch(_0xb56ee[_0x1ea863(0x102)]&&this[_0x1ea863(0x104)]['addUser'](_0xb56ee[_0x1ea863(0x102)]),_0xb56ee[_0x1ea863(0xf3)]){case v[_0x1ea863(0x11e)]:break;case v[_0x1ea863(0x11f)]:{this[_0x1ea863(0x12d)][_0x1ea863(0x10e)](_0x115efd,_0x157cde,{'unitId':_0x115efd,'subUnitId':_0x157cde,'ref':'','id':_0xb56ee[_0x1ea863(0x101)],'dT':D(+_0xb56ee[_0x1ea863(0x139)]),'threadId':_0xb56ee[_0x1ea863(0xf7)],'personId':(_0x3047a2=(_0x5d58cd=_0xb56ee['user'])==null?void 0x0:_0x5d58cd[_0x1ea863(0x151)])!=null?_0x3047a2:_0xb56ee[_0x1ea863(0x136)],'text':JSON['parse'](_0xb56ee['content']),'parentId':_0x3418ab['id']});break;}case v[_0x1ea863(0x10b)]:{const _0x2f354c=this[_0x1ea863(0x12d)][_0x1ea863(0x12b)](_0x115efd,_0x157cde,_0xb56ee[_0x1ea863(0x101)]);_0x2f354c&&_0x2f354c[_0x1ea863(0x109)]&&this[_0x1ea863(0x12d)]['deleteComment'](_0x115efd,_0x157cde,_0xb56ee['replyId']);break;}case v[_0x1ea863(0x123)]:{this[_0x1ea863(0x12d)][_0x1ea863(0xf8)](_0x115efd,_0x157cde,{'commentId':_0xb56ee[_0x1ea863(0x101)],'text':JSON[_0x1ea863(0x149)](_0xb56ee['content'])});break;}case v['Solve']:{const _0x268532=(_0x2b773a=this['_threadCommentModel'][_0x1ea863(0x113)](_0xb56ee['unitId'])[_0x1ea863(0xec)](_0x1d0a84=>_0x1d0a84[_0x1ea863(0xf7)]===_0xb56ee[_0x1ea863(0xf7)]))==null?void 0x0:_0x2b773a[_0x1ea863(0x13c)];_0x268532&&this[_0x1ea863(0x12d)][_0x1ea863(0x140)](_0x115efd,_0x157cde,_0x268532['id'],_0xb56ee[_0x1ea863(0x134)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x5d8c37(_0x2afbd1)),p(0x1,_0x5d8c37(_0x271da6)),p(0x2,_0x5d8c37(_0x41b9cd)),p(0x3,_0x5d8c37(_0x4cf3db))],S);const z=_0xd82d43(0x12e),M={};function _0x1572(_0x3327ea,_0x4c73b8){const _0x3d5678=_0x3d56();return _0x1572=function(_0x1572ec,_0x528845){_0x1572ec=_0x1572ec-0xeb;let _0x5cd1b8=_0x3d5678[_0x1572ec];return _0x5cd1b8;},_0x1572(_0x3327ea,_0x4c73b8);}var k=Object[_0xd82d43(0x147)],Q=(_0x25e839,_0x1eab5a,_0x8ce6d6,_0x1ddd4b)=>{for(var _0x502771=_0x1ddd4b>0x1?void 0x0:_0x1ddd4b?k(_0x1eab5a,_0x8ce6d6):_0x1eab5a,_0x2caf64=_0x25e839['length']-0x1,_0x560723;_0x2caf64>=0x0;_0x2caf64--)(_0x560723=_0x25e839[_0x2caf64])&&(_0x502771=_0x560723(_0x502771)||_0x502771);return _0x502771;},_=(_0x49f117,_0x164e7e)=>(_0x8c55ef,_0x3bf822)=>_0x164e7e(_0x8c55ef,_0x3bf822,_0x49f117);function X(_0x1b5380,_0x3d7683){const _0x2a729c=_0xd82d43,_0x547be9=_0x1b5380[_0x2a729c(0x144)][0x0];return{..._0x3d7683,'id':_0x547be9[_0x2a729c(0x101)],'resolved':_0x1b5380[_0x2a729c(0x134)]===0x1,'dT':D(_0x547be9[_0x2a729c(0x139)]),'personId':_0x547be9[_0x2a729c(0x136)],'threadId':_0x547be9[_0x2a729c(0xf7)]};}function ee(_0x59c2f1,_0x144c2a,_0x12a879){const _0x41aee2=_0xd82d43;var _0x264ecc,_0x5346b0;if(((_0x5346b0=(_0x264ecc=_0x59c2f1==null?void 0x0:_0x59c2f1[_0x41aee2(0x144)])==null?void 0x0:_0x264ecc[_0x41aee2(0x106)])!=null?_0x5346b0:0x0)>0x0){const _0x7b37d=(_0x41b163,_0x4fcd08)=>({'id':_0x41b163[_0x41aee2(0x101)],'threadId':_0x41b163[_0x41aee2(0xf7)],'dT':D(_0x41b163['createTimestamp']),'personId':_0x41b163[_0x41aee2(0x136)],'resolved':_0x59c2f1[_0x41aee2(0x134)]===I[_0x41aee2(0x138)],'unitId':_0x144c2a,'subUnitId':_0x12a879,'text':JSON[_0x41aee2(0x149)](_0x41b163[_0x41aee2(0x100)]),'parentId':_0x4fcd08}),_0x3a2fa2=_0x7b37d(_0x59c2f1[_0x41aee2(0x144)][0x0]);return{..._0x3a2fa2,'children':_0x59c2f1[_0x41aee2(0x144)]['slice'](0x1)['map'](_0x3f2457=>_0x7b37d(_0x3f2457,_0x3a2fa2['id']))};}return null;}let f=class{constructor(_0x1dbfc0,_0x1257a3,_0x4f3416,_0x5103c2){const _0x5ca99d=_0xd82d43;this[_0x5ca99d(0x150)]=_0x1dbfc0,this[_0x5ca99d(0x104)]=_0x1257a3,this[_0x5ca99d(0x10c)]=_0x4f3416,this[_0x5ca99d(0x131)]=_0x5103c2;}async[_0xd82d43(0x10e)](_0x525e3d){const _0x45c37a=_0xd82d43;var _0x6d07ab,_0x48ef73;const {parentId:_0x41bcbf,unitId:_0x2a996d,text:_0x5b35db,threadId:_0x5d0217}=_0x525e3d,_0x18bfeb=(_0x48ef73=(_0x6d07ab=_0x5b35db[_0x45c37a(0x12c)])==null?void 0x0:_0x6d07ab[_0x45c37a(0xed)](_0x21321e=>_0x21321e[_0x45c37a(0x13e)]===_0x181f60[_0x45c37a(0x125)])[_0x45c37a(0x146)](_0x15a50f=>_0x15a50f['rangeId']))!=null?_0x48ef73:[],_0x38ced0=JSON[_0x45c37a(0x14a)](_0x5b35db),_0x4bcc49=(await this[_0x45c37a(0x10c)][_0x45c37a(0xf9)](_0x2a996d))['getMemberID']();if(_0x41bcbf){const _0x51407f={'memberId':_0x4bcc49,'unitId':_0x2a996d,'content':_0x38ced0,'mention':_0x18bfeb,'threadId':_0x5d0217},_0x52fafa=(await this[_0x45c37a(0x150)]['post'](_0x45c37a(0x14c)+_0x2a996d+_0x45c37a(0x141),{'body':_0x51407f}))['body']['reply'];return{..._0x525e3d,'id':_0x52fafa[_0x45c37a(0x101)],'dT':_0xd05752(+_0x52fafa[_0x45c37a(0x139)])[_0x45c37a(0x13b)](_0x45c37a(0x105)),'personId':_0x52fafa[_0x45c37a(0x136)]};}else{const _0x159e48={'memberId':_0x4bcc49,'unitId':_0x2a996d,'content':_0x38ced0,'mention':_0x18bfeb},_0x36fa45=await this['_httpService'][_0x45c37a(0x112)]('/universer-api/comment/unit/'+_0x2a996d+'/add',{'body':_0x159e48});return X(_0x36fa45[_0x45c37a(0x120)]['comment'],_0x525e3d);}}async['updateComment'](_0x2b106a){const _0x5e2e5d=_0xd82d43;var _0x445c6f,_0x2dfa91;const {text:_0x45aaf8,unitId:_0x517b32}=_0x2b106a,_0x1d6e6d=(_0x2dfa91=(_0x445c6f=_0x45aaf8[_0x5e2e5d(0x12c)])==null?void 0x0:_0x445c6f[_0x5e2e5d(0xed)](_0x44b896=>_0x44b896['rangeType']===_0x181f60[_0x5e2e5d(0x125)])[_0x5e2e5d(0x146)](_0xbaa41d=>_0xbaa41d[_0x5e2e5d(0x10f)]))!=null?_0x2dfa91:[],_0x4d8653=JSON[_0x5e2e5d(0x14a)](_0x45aaf8),_0x367182=_0x2b106a[_0x5e2e5d(0xf7)],_0x2ba288=_0x2b106a['id'],_0x11a720={'memberId':(await this[_0x5e2e5d(0x10c)]['requireSession'](_0x517b32))[_0x5e2e5d(0xff)](),'unitId':_0x517b32,'threadId':_0x367182,'mention':_0x1d6e6d,'content':_0x4d8653,'replyId':_0x2ba288},_0x1b9c67=await this['_httpService']['post'](_0x5e2e5d(0x14c)+_0x517b32+_0x5e2e5d(0x111),{'body':_0x11a720});return!_0x1b9c67[_0x5e2e5d(0x120)]['error']||_0x1b9c67[_0x5e2e5d(0x120)][_0x5e2e5d(0x148)][_0x5e2e5d(0x115)]===0x1;}async[_0xd82d43(0x140)](_0x4893f4){const _0x519710=_0xd82d43,{unitId:_0x466518}=_0x4893f4,_0x47b68c=_0x4893f4[_0x519710(0xf7)],_0x274a1b={'memberId':this['_userService']['getCurrentUser']()[_0x519710(0x151)],'unitId':_0x466518,'threadId':_0x47b68c,'solved':_0x4893f4[_0x519710(0x13d)]?I[_0x519710(0x138)]:I[_0x519710(0x14e)]},_0x606572=await this[_0x519710(0x150)][_0x519710(0x112)]('/universer-api/comment/unit/'+_0x466518+_0x519710(0xfa),{'body':_0x274a1b});return!_0x606572['body'][_0x519710(0x148)]||_0x606572[_0x519710(0x120)][_0x519710(0x148)][_0x519710(0x115)]===0x1;}async[_0xd82d43(0x119)](_0x26b4a3,_0x123483,_0x4adb8a,_0xf9cfad){const _0x4c9b52=_0xd82d43,_0x1d428d={'memberId':(await this[_0x4c9b52(0x10c)][_0x4c9b52(0xf9)](_0x26b4a3))[_0x4c9b52(0xff)](),'threadId':_0x4adb8a,'replyId':_0xf9cfad,'unitId':_0x26b4a3},_0x3f0bfd=await this[_0x4c9b52(0x150)][_0x4c9b52(0x112)](_0x4c9b52(0x14c)+_0x26b4a3+_0x4c9b52(0x14d),{'body':_0x1d428d});return!_0x3f0bfd[_0x4c9b52(0x120)][_0x4c9b52(0x148)]||_0x3f0bfd['body'][_0x4c9b52(0x148)][_0x4c9b52(0x115)]===0x1;}async[_0xd82d43(0x10d)](_0x577f57,_0x52d722,_0xe7beeb){const _0x4ff479=_0xd82d43,_0x245c77={'unitId':_0x577f57,'threadId':_0xe7beeb},_0x20f99a=await this[_0x4ff479(0x150)][_0x4ff479(0x112)](_0x4ff479(0x14c)+_0x577f57+_0x4ff479(0x110),{'body':_0x245c77}),_0x3de7a1=_0xe7beeb[_0x4ff479(0x146)](_0x45f73e=>ee(_0x20f99a[_0x4ff479(0x120)][_0x4ff479(0xfd)][_0x45f73e],_0x577f57,_0x52d722))[_0x4ff479(0xed)](Boolean);return Object[_0x4ff479(0x145)](_0x20f99a[_0x4ff479(0x120)][_0x4ff479(0xf0)])['forEach'](_0x403c56=>{const _0x1e968c=_0x4ff479;this[_0x1e968c(0x104)][_0x1e968c(0x118)](_0x403c56);}),_0x3de7a1;}[_0xd82d43(0x135)](_0x5b8d97){const _0x59cd6a=_0xd82d43;return{'id':_0x5b8d97['id'],'threadId':_0x5b8d97[_0x59cd6a(0xf7)],'ref':_0x5b8d97['ref']};}};f=Q([_(0x0,_0x5d8c37(_0x54b85d)),_(0x1,_0x5d8c37(_0x41b9cd)),_(0x2,_0x5d8c37(_0x309717)),_(0x3,_0x5d8c37(_0x4cf3db))],f);var re=Object[_0xd82d43(0x147)],te=(_0x4fad81,_0x1ab5c0,_0x1ba570,_0x46bdf7)=>{const _0x52bbe1=_0xd82d43;for(var _0x2e1037=_0x46bdf7>0x1?void 0x0:_0x46bdf7?re(_0x1ab5c0,_0x1ba570):_0x1ab5c0,_0x284fa9=_0x4fad81[_0x52bbe1(0x106)]-0x1,_0xb47cff;_0x284fa9>=0x0;_0x284fa9--)(_0xb47cff=_0x4fad81[_0x284fa9])&&(_0x2e1037=_0xb47cff(_0x2e1037)||_0x2e1037);return _0x2e1037;},N=(_0x1f9535,_0x51001e)=>(_0x3ffdbb,_0x4962bb)=>_0x51001e(_0x3ffdbb,_0x4962bb,_0x1f9535);let g=class extends _0x275151{constructor(_0x2ba7c3,_0x2d6df2){const _0x23c949=_0xd82d43;super(),this[_0x23c949(0x116)]=_0x2ba7c3,this['_threadCommentDataSource']=_0x2d6df2,this[_0x23c949(0x122)]();}[_0xd82d43(0x122)](){const _0x2ca8e6=_0xd82d43;this[_0x2ca8e6(0x116)][_0x2ca8e6(0x133)]=this[_0x2ca8e6(0xfc)],this['_threadCommentDataSourceService'][_0x2ca8e6(0x11c)]=!0x1;}};g=te([N(0x0,_0x815dfc),N(0x1,_0x5d8c37(f))],g);var se=Object[_0xd82d43(0xef)],oe=Object[_0xd82d43(0x147)],ne=(_0x12af1d,_0x1366f5,_0x179e08)=>_0x1366f5 in _0x12af1d?se(_0x12af1d,_0x1366f5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x179e08}):_0x12af1d[_0x1366f5]=_0x179e08,ie=(_0x3c2b43,_0x21e10a,_0x515854,_0x47b6a1)=>{const _0x4831e8=_0xd82d43;for(var _0x1bc770=_0x47b6a1>0x1?void 0x0:_0x47b6a1?oe(_0x21e10a,_0x515854):_0x21e10a,_0x4ba224=_0x3c2b43[_0x4831e8(0x106)]-0x1,_0x49c03d;_0x4ba224>=0x0;_0x4ba224--)(_0x49c03d=_0x3c2b43[_0x4ba224])&&(_0x1bc770=_0x49c03d(_0x1bc770)||_0x1bc770);return _0x1bc770;},w=(_0xfc2d1a,_0x5568de)=>(_0x1a761a,_0x391a44)=>_0x5568de(_0x1a761a,_0x391a44,_0xfc2d1a),$=(_0x72e15c,_0x4ba227,_0x3c9664)=>ne(_0x72e15c,typeof _0x4ba227!=_0xd82d43(0x11a)?_0x4ba227+'':_0x4ba227,_0x3c9664);let b=class extends _0x36e53a{constructor(_0xfa57f2=M,_0x419983,_0x2f46ef){const _0x3b0ad6=_0xd82d43;super(),this[_0x3b0ad6(0x142)]=_0xfa57f2,this['_injector']=_0x419983,this[_0x3b0ad6(0x108)]=_0x2f46ef;const {..._0x2da69e}=_0x438ac3({},M,this['_config']);this[_0x3b0ad6(0x108)][_0x3b0ad6(0x11b)](z,_0x2da69e);}[_0xd82d43(0x14f)](){const _0x3ec210=_0xd82d43;[[f],[g],[S]][_0x3ec210(0xf2)](_0x19d377=>{const _0x28ccd0=_0x3ec210;this[_0x28ccd0(0x131)][_0x28ccd0(0xee)](_0x19d377);});}[_0xd82d43(0xfb)](){const _0x58524b=_0xd82d43;this[_0x58524b(0x131)][_0x58524b(0x14b)](g),this[_0x58524b(0x131)]['get'](S);}};$(b,_0xd82d43(0x143),W),$(b,_0xd82d43(0xf3),_0xf2bc01['UNIVER_UNKNOWN']),b=ie([_0x29bf69(_0x43ebb9,_0x5e0c12,_0x4d7a5a),w(0x1,_0x5d8c37(_0x4cf3db)),w(0x2,_0x6c6242)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x2410e5=_0x4b6a;(function(_0x54248b,_0x4d1961){const _0x31c1b1=_0x4b6a,_0x55f0a7=_0x54248b();while(!![]){try{const _0x58f5e2=-parseInt(_0x31c1b1(0x1b5))/0x1*(parseInt(_0x31c1b1(0x180))/0x2)+-parseInt(_0x31c1b1(0x1a8))/0x3+parseInt(_0x31c1b1(0x1ab))/0x4+-parseInt(_0x31c1b1(0x193))/0x5*(-parseInt(_0x31c1b1(0x1bf))/0x6)+-parseInt(_0x31c1b1(0x17d))/0x7*(parseInt(_0x31c1b1(0x1a0))/0x8)+-parseInt(_0x31c1b1(0x1a3))/0x9*(-parseInt(_0x31c1b1(0x18b))/0xa)+parseInt(_0x31c1b1(0x1b1))/0xb;if(_0x58f5e2===_0x4d1961)break;else _0x55f0a7['push'](_0x55f0a7['shift']());}catch(_0x5a1313){_0x55f0a7['push'](_0x55f0a7['shift']());}}}(_0x3382,0xd8b6b));import{CommentService as _0x52a730,CollaborationSessionService as _0x1bcb6a,UniverCollaborationClientPlugin as _0x54e958}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x171464}from'@univerjs-pro/license';import{dayjs as _0x44a548,UserManagerService as _0x48ddeb,Inject as _0x242445,Injector as _0x2598ce,Disposable as _0x3f72a7,CustomRangeType as _0x2453e6,UniverInstanceType as _0x28a7b0,DependentOn as _0xea713d,IConfigService as _0x1580e0,Plugin as _0x17faa2,merge as _0x529fa5}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1e752b}from'@univerjs/thread-comment-ui';function _0x4b6a(_0x217636,_0x5c5cd0){const _0x33828f=_0x3382();return _0x4b6a=function(_0x4b6a54,_0x17998d){_0x4b6a54=_0x4b6a54-0x16e;let _0x29b66f=_0x33828f[_0x4b6a54];return _0x29b66f;},_0x4b6a(_0x217636,_0x5c5cd0);}import{ThreadCommentModel as _0x5e8297,IThreadCommentDataSourceService as _0x4e5822}from'@univerjs/thread-comment';import{bufferTime as _0x40b7dd}from'rxjs';import{HTTPService as _0xdc3710}from'@univerjs/network';const W=_0x2410e5(0x1b6);var I=(_0x41f863=>(_0x41f863[_0x41f863[_0x2410e5(0x1b0)]=0x0]=_0x2410e5(0x1b0),_0x41f863[_0x41f863[_0x2410e5(0x17b)]=0x1]=_0x2410e5(0x17b),_0x41f863[_0x41f863[_0x2410e5(0x173)]=-0x1]=_0x2410e5(0x173),_0x41f863))(I||{}),v=(_0x5dd029=>(_0x5dd029[_0x5dd029[_0x2410e5(0x19a)]=0x0]=_0x2410e5(0x19a),_0x5dd029[_0x5dd029[_0x2410e5(0x1aa)]=0x1]=_0x2410e5(0x1aa),_0x5dd029[_0x5dd029[_0x2410e5(0x19c)]=0x2]=_0x2410e5(0x19c),_0x5dd029[_0x5dd029[_0x2410e5(0x1b7)]=0x3]=_0x2410e5(0x1b7),_0x5dd029[_0x5dd029['Delete']=0x4]=_0x2410e5(0x184),_0x5dd029[_0x5dd029['Solve']=0x5]='Solve',_0x5dd029[_0x5dd029[_0x2410e5(0x173)]=-0x1]='UNRECOGNIZED',_0x5dd029))(v||{});const D=_0x96802f=>_0x44a548(new Date(+_0x96802f))[_0x2410e5(0x172)](_0x2410e5(0x1bb)),B=async(_0x1770f9,_0x1cd85a)=>{const _0x4f0ef0=_0x2410e5,_0x15555c=_0x1770f9['get'](_0x48ddeb),_0x30680d=_0x1770f9['get'](_0xdc3710);_0x1cd85a['forEach'](_0x368461=>{const _0x62680d=_0x4b6a;_0x15555c[_0x62680d(0x1d0)](_0x368461)&&_0x1cd85a[_0x62680d(0x17a)](_0x368461);}),_0x1cd85a['size']&&(await _0x30680d[_0x4f0ef0(0x1c3)](_0x4f0ef0(0x1cc),{'params':{'userIDs':[..._0x1cd85a]}}))[_0x4f0ef0(0x17e)][_0x4f0ef0(0x1b4)][_0x4f0ef0(0x1bc)](_0x27355c=>{const _0x4163b0=_0x4f0ef0;_0x27355c&&_0x15555c[_0x4163b0(0x179)](_0x27355c);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x3d474d,_0x3af0ae,_0x29d1da,_0xc6d2eb)=>{const _0x467abe=_0x2410e5;for(var _0x2d6e53=_0xc6d2eb>0x1?void 0x0:_0xc6d2eb?K(_0x3af0ae,_0x29d1da):_0x3af0ae,_0x3cce0a=_0x3d474d[_0x467abe(0x1c2)]-0x1,_0x33a45e;_0x3cce0a>=0x0;_0x3cce0a--)(_0x33a45e=_0x3d474d[_0x3cce0a])&&(_0x2d6e53=_0x33a45e(_0x2d6e53)||_0x2d6e53);return _0x2d6e53;},p=(_0x124707,_0x5eefe5)=>(_0x16053c,_0x5283dd)=>_0x5eefe5(_0x16053c,_0x5283dd,_0x124707);let S=class extends _0x3f72a7{constructor(_0x1b3909,_0x10fc5b,_0x163f6f,_0x30bab3){const _0x214331=_0x2410e5;super(),this['_commentService']=_0x1b3909,this[_0x214331(0x1c1)]=_0x10fc5b,this[_0x214331(0x1c5)]=_0x163f6f,this[_0x214331(0x1d1)]=_0x30bab3,this[_0x214331(0x1a1)](),this['_initUserSync']();}['_initUserSync'](){const _0x3b308d=_0x2410e5;this[_0x3b308d(0x194)](this['_threadCommentModel']['commentUpdate$'][_0x3b308d(0x1ba)](_0x40b7dd(0x10))[_0x3b308d(0x174)](_0x1cdb36=>{const _0x2668c4=_0x3b308d,_0xa1c514=new Set();_0x1cdb36[_0x2668c4(0x1bc)](_0x52e708=>{const _0x53608f=_0x2668c4;switch(_0x52e708['type']){case'add':{const _0x2b07da=_0x52e708['payload'][_0x53608f(0x176)];_0xa1c514[_0x53608f(0x18e)](_0x2b07da);break;}}}),B(this[_0x2668c4(0x1d1)],_0xa1c514);}));}[_0x2410e5(0x1a1)](){const _0x1674ee=_0x2410e5;this[_0x1674ee(0x194)](this[_0x1674ee(0x189)][_0x1674ee(0x1a6)]['subscribe'](async _0x4aed82=>{const _0x2f5fda=_0x1674ee;var _0x3a3279,_0x1fa207,_0x3cf015,_0x2450c4;const _0x554bbc=(_0x3a3279=this[_0x2f5fda(0x1c1)]['getUnit'](_0x4aed82[_0x2f5fda(0x1c0)])[_0x2f5fda(0x1c4)](_0x377dc2=>_0x377dc2['threadId']===_0x4aed82[_0x2f5fda(0x1b9)]))==null?void 0x0:_0x3a3279['root'];if(!_0x554bbc)return;const {unitId:_0x3df3ac,subUnitId:_0x24c24f}=_0x554bbc;switch(_0x4aed82[_0x2f5fda(0x1cb)]&&this['_userService']['addUser'](_0x4aed82[_0x2f5fda(0x1cb)]),_0x4aed82[_0x2f5fda(0x1ae)]){case v[_0x2f5fda(0x1aa)]:break;case v[_0x2f5fda(0x19c)]:{this[_0x2f5fda(0x1c1)][_0x2f5fda(0x18d)](_0x3df3ac,_0x24c24f,{'unitId':_0x3df3ac,'subUnitId':_0x24c24f,'ref':'','id':_0x4aed82[_0x2f5fda(0x181)],'dT':D(+_0x4aed82[_0x2f5fda(0x1be)]),'threadId':_0x4aed82[_0x2f5fda(0x1b9)],'personId':(_0x3cf015=(_0x1fa207=_0x4aed82[_0x2f5fda(0x1cb)])==null?void 0x0:_0x1fa207['userID'])!=null?_0x3cf015:_0x4aed82[_0x2f5fda(0x192)],'text':JSON['parse'](_0x4aed82['content']),'parentId':_0x554bbc['id']});break;}case v['Delete']:{const _0x15ae54=this['_threadCommentModel'][_0x2f5fda(0x170)](_0x3df3ac,_0x24c24f,_0x4aed82['replyId']);_0x15ae54&&_0x15ae54['parentId']&&this[_0x2f5fda(0x1c1)][_0x2f5fda(0x177)](_0x3df3ac,_0x24c24f,_0x4aed82[_0x2f5fda(0x181)]);break;}case v[_0x2f5fda(0x1b7)]:{this[_0x2f5fda(0x1c1)][_0x2f5fda(0x18f)](_0x3df3ac,_0x24c24f,{'commentId':_0x4aed82['replyId'],'text':JSON[_0x2f5fda(0x1c7)](_0x4aed82[_0x2f5fda(0x191)])});break;}case v[_0x2f5fda(0x17c)]:{const _0x3e33de=(_0x2450c4=this[_0x2f5fda(0x1c1)][_0x2f5fda(0x186)](_0x4aed82[_0x2f5fda(0x1c0)])[_0x2f5fda(0x1c4)](_0x248556=>_0x248556[_0x2f5fda(0x1b9)]===_0x4aed82[_0x2f5fda(0x1b9)]))==null?void 0x0:_0x2450c4[_0x2f5fda(0x1b2)];_0x3e33de&&this['_threadCommentModel'][_0x2f5fda(0x19b)](_0x3df3ac,_0x24c24f,_0x3e33de['id'],_0x4aed82[_0x2f5fda(0x16f)]===I[_0x2f5fda(0x17b)]);break;}}}));}};S=V([p(0x0,_0x242445(_0x52a730)),p(0x1,_0x242445(_0x5e8297)),p(0x2,_0x242445(_0x48ddeb)),p(0x3,_0x242445(_0x2598ce))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x2410e5(0x185)],Q=(_0x699e42,_0x28a0d7,_0x1ab014,_0x5f0088)=>{const _0x25c08d=_0x2410e5;for(var _0x44014b=_0x5f0088>0x1?void 0x0:_0x5f0088?k(_0x28a0d7,_0x1ab014):_0x28a0d7,_0x14dd9a=_0x699e42[_0x25c08d(0x1c2)]-0x1,_0x203361;_0x14dd9a>=0x0;_0x14dd9a--)(_0x203361=_0x699e42[_0x14dd9a])&&(_0x44014b=_0x203361(_0x44014b)||_0x44014b);return _0x44014b;},_=(_0x45a154,_0x1f79c1)=>(_0x1db020,_0x36b377)=>_0x1f79c1(_0x1db020,_0x36b377,_0x45a154);function X(_0x3c67fb,_0x38fa33){const _0x545b55=_0x2410e5,_0x5778d7=_0x3c67fb[_0x545b55(0x1b3)][0x0];return{..._0x38fa33,'id':_0x5778d7[_0x545b55(0x181)],'resolved':_0x3c67fb[_0x545b55(0x16f)]===0x1,'dT':D(_0x5778d7[_0x545b55(0x1be)]),'personId':_0x5778d7[_0x545b55(0x192)],'threadId':_0x5778d7['threadId']};}function ee(_0x17b5f7,_0x5e3ff9,_0x5694f){const _0x4e6185=_0x2410e5;var _0x218ba8,_0x2ef392;if(((_0x2ef392=(_0x218ba8=_0x17b5f7==null?void 0x0:_0x17b5f7[_0x4e6185(0x1b3)])==null?void 0x0:_0x218ba8[_0x4e6185(0x1c2)])!=null?_0x2ef392:0x0)>0x0){const _0x2a8bc5=(_0x17b1f0,_0x2e0264)=>({'id':_0x17b1f0[_0x4e6185(0x181)],'threadId':_0x17b1f0[_0x4e6185(0x1b9)],'dT':D(_0x17b1f0['createTimestamp']),'personId':_0x17b1f0[_0x4e6185(0x192)],'resolved':_0x17b5f7[_0x4e6185(0x16f)]===I[_0x4e6185(0x17b)],'unitId':_0x5e3ff9,'subUnitId':_0x5694f,'text':JSON[_0x4e6185(0x1c7)](_0x17b1f0[_0x4e6185(0x191)]),'parentId':_0x2e0264}),_0x29e24d=_0x2a8bc5(_0x17b5f7[_0x4e6185(0x1b3)][0x0]);return{..._0x29e24d,'children':_0x17b5f7[_0x4e6185(0x1b3)][_0x4e6185(0x1cf)](0x1)[_0x4e6185(0x16e)](_0x3fb438=>_0x2a8bc5(_0x3fb438,_0x29e24d['id']))};}return null;}let f=class{constructor(_0x1344ad,_0x282938,_0x408534,_0x373c56){const _0xc9aacb=_0x2410e5;this['_httpService']=_0x1344ad,this['_userService']=_0x282938,this[_0xc9aacb(0x1cd)]=_0x408534,this[_0xc9aacb(0x1d1)]=_0x373c56;}async['addComment'](_0x3eb50e){const _0xcc6bbb=_0x2410e5;var _0x25bb37,_0x1102d3;const {parentId:_0x5ae26a,unitId:_0x13f933,text:_0x4387ba,threadId:_0x3d7906}=_0x3eb50e,_0x3c0c6d=(_0x1102d3=(_0x25bb37=_0x4387ba[_0xcc6bbb(0x1ce)])==null?void 0x0:_0x25bb37[_0xcc6bbb(0x19d)](_0x3bee86=>_0x3bee86['rangeType']===_0x2453e6[_0xcc6bbb(0x1d4)])['map'](_0x22cbf8=>_0x22cbf8[_0xcc6bbb(0x1a9)]))!=null?_0x1102d3:[],_0x59f443=JSON[_0xcc6bbb(0x1d3)](_0x4387ba),_0x24a6a8=(await this[_0xcc6bbb(0x1cd)][_0xcc6bbb(0x1a4)](_0x13f933))['getMemberID']();if(_0x5ae26a){const _0x5b61a5={'memberId':_0x24a6a8,'unitId':_0x13f933,'content':_0x59f443,'mention':_0x3c0c6d,'threadId':_0x3d7906},_0x2fb2fb=(await this[_0xcc6bbb(0x19e)][_0xcc6bbb(0x199)](_0xcc6bbb(0x1c6)+_0x13f933+_0xcc6bbb(0x1c9),{'body':_0x5b61a5}))[_0xcc6bbb(0x17e)][_0xcc6bbb(0x1ad)];return{..._0x3eb50e,'id':_0x2fb2fb[_0xcc6bbb(0x181)],'dT':_0x44a548(+_0x2fb2fb['createTimestamp'])[_0xcc6bbb(0x172)](_0xcc6bbb(0x1bb)),'personId':_0x2fb2fb[_0xcc6bbb(0x192)]};}else{const _0x12127e={'memberId':_0x24a6a8,'unitId':_0x13f933,'content':_0x59f443,'mention':_0x3c0c6d},_0x277808=await this[_0xcc6bbb(0x19e)][_0xcc6bbb(0x199)]('/universer-api/comment/unit/'+_0x13f933+_0xcc6bbb(0x18a),{'body':_0x12127e});return X(_0x277808[_0xcc6bbb(0x17e)][_0xcc6bbb(0x171)],_0x3eb50e);}}async[_0x2410e5(0x18f)](_0x43b857){const _0x2d9c55=_0x2410e5;var _0x35020b,_0x12d7cf;const {text:_0x33227b,unitId:_0x431792}=_0x43b857,_0x5ab77c=(_0x12d7cf=(_0x35020b=_0x33227b['customRanges'])==null?void 0x0:_0x35020b[_0x2d9c55(0x19d)](_0x555c8e=>_0x555c8e['rangeType']===_0x2453e6['COMMENT'])['map'](_0x20ee6=>_0x20ee6['rangeId']))!=null?_0x12d7cf:[],_0x41f0b6=JSON['stringify'](_0x33227b),_0x1cfc24=_0x43b857[_0x2d9c55(0x1b9)],_0x4e1223=_0x43b857['id'],_0x347a63={'memberId':(await this[_0x2d9c55(0x1cd)][_0x2d9c55(0x1a4)](_0x431792))['getMemberID'](),'unitId':_0x431792,'threadId':_0x1cfc24,'mention':_0x5ab77c,'content':_0x41f0b6,'replyId':_0x4e1223},_0xb6eeb1=await this[_0x2d9c55(0x19e)][_0x2d9c55(0x199)](_0x2d9c55(0x1c6)+_0x431792+_0x2d9c55(0x178),{'body':_0x347a63});return!_0xb6eeb1[_0x2d9c55(0x17e)][_0x2d9c55(0x1a5)]||_0xb6eeb1['body'][_0x2d9c55(0x1a5)][_0x2d9c55(0x183)]===0x1;}async[_0x2410e5(0x19b)](_0x368e1e){const _0x5adbce=_0x2410e5,{unitId:_0x5bdfea}=_0x368e1e,_0x4df1d0=_0x368e1e['threadId'],_0x43e8b8={'memberId':this[_0x5adbce(0x1c5)][_0x5adbce(0x1bd)]()['userID'],'unitId':_0x5bdfea,'threadId':_0x4df1d0,'solved':_0x368e1e[_0x5adbce(0x1a2)]?I[_0x5adbce(0x17b)]:I['OpenOrReOpen']},_0x283e19=await this[_0x5adbce(0x19e)][_0x5adbce(0x199)](_0x5adbce(0x1c6)+_0x5bdfea+_0x5adbce(0x1a7),{'body':_0x43e8b8});return!_0x283e19[_0x5adbce(0x17e)][_0x5adbce(0x1a5)]||_0x283e19[_0x5adbce(0x17e)][_0x5adbce(0x1a5)][_0x5adbce(0x183)]===0x1;}async[_0x2410e5(0x177)](_0x34e1d8,_0x426e58,_0x3f269e,_0x4cf0f7){const _0xfb1a1d=_0x2410e5,_0x4053e1={'memberId':(await this[_0xfb1a1d(0x1cd)]['requireSession'](_0x34e1d8))[_0xfb1a1d(0x18c)](),'threadId':_0x3f269e,'replyId':_0x4cf0f7,'unitId':_0x34e1d8},_0x3891ae=await this[_0xfb1a1d(0x19e)][_0xfb1a1d(0x199)]('/universer-api/comment/unit/'+_0x34e1d8+'/delete',{'body':_0x4053e1});return!_0x3891ae['body']['error']||_0x3891ae[_0xfb1a1d(0x17e)][_0xfb1a1d(0x1a5)][_0xfb1a1d(0x183)]===0x1;}async[_0x2410e5(0x197)](_0x4bab33,_0x5c1eb0,_0x4f2be8){const _0x418282=_0x2410e5,_0x17caac={'unitId':_0x4bab33,'threadId':_0x4f2be8},_0x3fd059=await this['_httpService']['post'](_0x418282(0x1c6)+_0x4bab33+_0x418282(0x1b8),{'body':_0x17caac}),_0x53325e=_0x4f2be8[_0x418282(0x16e)](_0x251d66=>ee(_0x3fd059[_0x418282(0x17e)][_0x418282(0x1ac)][_0x251d66],_0x4bab33,_0x5c1eb0))[_0x418282(0x19d)](Boolean);return Object[_0x418282(0x195)](_0x3fd059['body'][_0x418282(0x1b4)])[_0x418282(0x1bc)](_0x425499=>{const _0x59e482=_0x418282;this[_0x59e482(0x1c5)][_0x59e482(0x179)](_0x425499);}),_0x53325e;}[_0x2410e5(0x175)](_0x4e672e){const _0x4694d5=_0x2410e5;return{'id':_0x4e672e['id'],'threadId':_0x4e672e['threadId'],'ref':_0x4e672e[_0x4694d5(0x188)]};}};f=Q([_(0x0,_0x242445(_0xdc3710)),_(0x1,_0x242445(_0x48ddeb)),_(0x2,_0x242445(_0x1bcb6a)),_(0x3,_0x242445(_0x2598ce))],f);function _0x3382(){const _0x23d14f=['getComment','comment','format','UNRECOGNIZED','subscribe','saveCommentToSnapshot','personId','deleteComment','/edit','addUser','delete','Solved','Solve','2919644vOZaiM','body','_threadCommentDataSource','10yErazo','replyId','dataSource','code','Delete','getOwnPropertyDescriptor','getUnit','onReady','ref','_commentService','/add','600jbqNmG','getMemberID','addComment','add','updateComment','symbol','content','userId','805gzPFMA','disposeWithMe','values','_threadCommentDataSourceService','listComments','_configService','post','Unknown','resolveComment','Reply','filter','_httpService','_initDataSource','32JLEGzS','_init','resolved','33372aAHcHx','requireSession','error','commentUpdate$','/solved','3798117fTDBRI','rangeId','Add','6365064ndAYgs','comments','reply','type','onStarting','OpenOrReOpen','18166203YYlfHu','root','replies','users','281768rZePpj','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','/list','threadId','pipe','YYYY/MM/DD\x20HH:mm','forEach','getCurrentUser','createTimestamp','65802IaJzil','unitId','_threadCommentModel','length','get','find','_userService','/universer-api/comment/unit/','parse','pluginName','/reply','UNIVER_UNKNOWN','user','/universer-api/user/list','_sessionService','customRanges','slice','getUser','_injector','_config','stringify','COMMENT','map','solved'];_0x3382=function(){return _0x23d14f;};return _0x3382();}var re=Object[_0x2410e5(0x185)],te=(_0x1bed3c,_0x12576f,_0x2968a1,_0x1a13ca)=>{const _0x588ed9=_0x2410e5;for(var _0x723de9=_0x1a13ca>0x1?void 0x0:_0x1a13ca?re(_0x12576f,_0x2968a1):_0x12576f,_0x135474=_0x1bed3c[_0x588ed9(0x1c2)]-0x1,_0x54cdf1;_0x135474>=0x0;_0x135474--)(_0x54cdf1=_0x1bed3c[_0x135474])&&(_0x723de9=_0x54cdf1(_0x723de9)||_0x723de9);return _0x723de9;},N=(_0x37743c,_0x4fdb42)=>(_0x2cbcbb,_0x427891)=>_0x4fdb42(_0x2cbcbb,_0x427891,_0x37743c);let g=class extends _0x3f72a7{constructor(_0x2b9864,_0x475ab6){const _0x5596ed=_0x2410e5;super(),this['_threadCommentDataSourceService']=_0x2b9864,this[_0x5596ed(0x17f)]=_0x475ab6,this[_0x5596ed(0x19f)]();}[_0x2410e5(0x19f)](){const _0x3e0afb=_0x2410e5;this['_threadCommentDataSourceService'][_0x3e0afb(0x182)]=this['_threadCommentDataSource'],this[_0x3e0afb(0x196)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x4e5822),N(0x1,_0x242445(f))],g);var se=Object['defineProperty'],oe=Object[_0x2410e5(0x185)],ne=(_0x1653cd,_0x2f98ea,_0x2d7bf1)=>_0x2f98ea in _0x1653cd?se(_0x1653cd,_0x2f98ea,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2d7bf1}):_0x1653cd[_0x2f98ea]=_0x2d7bf1,ie=(_0x52b8f0,_0x20a987,_0xde68c7,_0x1bb2a7)=>{const _0x118216=_0x2410e5;for(var _0x3f2125=_0x1bb2a7>0x1?void 0x0:_0x1bb2a7?oe(_0x20a987,_0xde68c7):_0x20a987,_0x19e9cb=_0x52b8f0[_0x118216(0x1c2)]-0x1,_0x1b6ed2;_0x19e9cb>=0x0;_0x19e9cb--)(_0x1b6ed2=_0x52b8f0[_0x19e9cb])&&(_0x3f2125=_0x1b6ed2(_0x3f2125)||_0x3f2125);return _0x3f2125;},w=(_0x4f2f64,_0x46afd1)=>(_0x890f8c,_0x203444)=>_0x46afd1(_0x890f8c,_0x203444,_0x4f2f64),$=(_0x525889,_0x400275,_0x2ad653)=>ne(_0x525889,typeof _0x400275!=_0x2410e5(0x190)?_0x400275+'':_0x400275,_0x2ad653);let b=class extends _0x17faa2{constructor(_0x1311c4=M,_0x3c9838,_0x116c54){const _0x24e1c9=_0x2410e5;super(),this[_0x24e1c9(0x1d2)]=_0x1311c4,this['_injector']=_0x3c9838,this[_0x24e1c9(0x198)]=_0x116c54;const {..._0x196701}=_0x529fa5({},M,this[_0x24e1c9(0x1d2)]);this[_0x24e1c9(0x198)]['setConfig'](z,_0x196701);}[_0x2410e5(0x1af)](){const _0x26afdc=_0x2410e5;[[f],[g],[S]][_0x26afdc(0x1bc)](_0x194d81=>{this['_injector']['add'](_0x194d81);});}[_0x2410e5(0x187)](){const _0x5ba4a8=_0x2410e5;this[_0x5ba4a8(0x1d1)]['get'](g),this[_0x5ba4a8(0x1d1)][_0x5ba4a8(0x1c3)](S);}};$(b,_0x2410e5(0x1c8),W),$(b,_0x2410e5(0x1ae),_0x28a7b0[_0x2410e5(0x1ca)]),b=ie([_0xea713d(_0x1e752b,_0x54e958,_0x171464),w(0x1,_0x242445(_0x2598ce)),w(0x2,_0x1580e0)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x144e(_0x5da490,_0x3b2b93){const _0x58681b=_0x5868();return _0x144e=function(_0x144e43,_0x579c0a){_0x144e43=_0x144e43-0x11b;let _0x4fe74c=_0x58681b[_0x144e43];return _0x4fe74c;},_0x144e(_0x5da490,_0x3b2b93);}function _0x5868(){const _0x2c62cd=['Solved','_config','onStarting','CustomRangeType','Reply','values','map','UniverThreadCommentDataSourcePlugin','273xeQsBR','UniverNetwork','users','parse','replies','CommentService','createTimestamp','Add','rangeId','DependentOn','body','UniverProLicense','_threadCommentDataSourceService','deleteComment','getOwnPropertyDescriptor','unitId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_httpService','YYYY/MM/DD\x20HH:mm','userId','addUser','reply','_init','ref','merge','_injector','dayjs','5rXmnaQ','amd','post','CollaborationSessionService','exports','filter','bufferTime','saveCommentToSnapshot','object','COMMENT','getComment','user','toStringTag','/list','getCurrentUser','size','addComment','get','type','UniverProCollaborationClient','updateComment','error','comment','/universer-api/comment/unit/','Plugin','forEach','listComments','customRanges','root','requireSession','Disposable','pluginName','subscribe','slice','3677052QzxaML','10VOQAkj','delete','replyId','resolved','UniverProThreadCommentDatasource','OpenOrReOpen','/solved','Edit','setConfig','64716RslTfQ','personId','UniverThreadCommentUi','Injector','@univerjs-pro/collaboration-client','_initDataSource','UserManagerService','_userService','Solve','defineProperty','1368YFIlIc','@univerjs/network','UNRECOGNIZED','Module','11034126BwrxHB','HTTPService','/reply','/universer-api/user/list','dataSource','UniverThreadCommentUIPlugin','solved','disposeWithMe','_commentService','code','getMemberID','3442802NTzETH','UNIVER_UNKNOWN','parentId','_configService','_threadCommentDataSource','payload','rangeType','Inject','syncUpdateMutationToColla','length','_sessionService','threadId','64519TYTFzW','userID','rxjs','_threadCommentModel','@univerjs-pro/license','UniverCore','IThreadCommentDataSourceService','@univerjs/core','12CdeURU','Unknown','resolveComment','comments','_initUserSync','1629267RREtYT','stringify','@univerjs/thread-comment-ui','getUnit','Delete','add','find','commentUpdate$','25269673ynAwDC','content'];_0x5868=function(){return _0x2c62cd;};return _0x5868();}(function(_0x30f443,_0x32520b){const _0x3585fc=_0x144e,_0x301b34=_0x30f443();while(!![]){try{const _0x3245b4=parseInt(_0x3585fc(0x121))/0x1+-parseInt(_0x3585fc(0x193))/0x2+-parseInt(_0x3585fc(0x133))/0x3*(parseInt(_0x3585fc(0x17a))/0x4)+parseInt(_0x3585fc(0x14e))/0x5*(parseInt(_0x3585fc(0x170))/0x6)+parseInt(_0x3585fc(0x19f))/0x7*(-parseInt(_0x3585fc(0x184))/0x8)+parseInt(_0x3585fc(0x188))/0x9*(parseInt(_0x3585fc(0x171))/0xa)+parseInt(_0x3585fc(0x129))/0xb*(parseInt(_0x3585fc(0x11c))/0xc);if(_0x3245b4===_0x32520b)break;else _0x301b34['push'](_0x301b34['shift']());}catch(_0x38f0d4){_0x301b34['push'](_0x301b34['shift']());}}}(_0x5868,0xf30f1),function(_0x7e8278,_0x2d4a1c){const _0x3793be=_0x144e;typeof exports==_0x3793be(0x156)&&typeof module<'u'?_0x2d4a1c(exports,require(_0x3793be(0x17e)),require(_0x3793be(0x1a3)),require('@univerjs/core'),require(_0x3793be(0x123)),require('@univerjs/thread-comment'),require(_0x3793be(0x1a1)),require(_0x3793be(0x185))):typeof define=='function'&&define[_0x3793be(0x14f)]?define([_0x3793be(0x152),_0x3793be(0x17e),_0x3793be(0x1a3),_0x3793be(0x11b),_0x3793be(0x123),'@univerjs/thread-comment',_0x3793be(0x1a1),_0x3793be(0x185)],_0x2d4a1c):(_0x7e8278=typeof globalThis<'u'?globalThis:_0x7e8278||self,_0x2d4a1c(_0x7e8278[_0x3793be(0x175)]={},_0x7e8278[_0x3793be(0x161)],_0x7e8278[_0x3793be(0x13e)],_0x7e8278[_0x3793be(0x1a4)],_0x7e8278[_0x3793be(0x17c)],_0x7e8278['UniverThreadComment'],_0x7e8278['rxjs'],_0x7e8278[_0x3793be(0x134)]));}(this,function(_0x52fcf5,_0x460bf4,_0x3b803c,_0x533f59,_0x374430,_0x3271af,_0x1d0038,_0x57e286){'use strict';const _0x2386f2=_0x144e;const _0x3d6877=_0x2386f2(0x143);var _0x459f91=(_0x2b496f=>(_0x2b496f[_0x2b496f[_0x2386f2(0x176)]=0x0]=_0x2386f2(0x176),_0x2b496f[_0x2b496f[_0x2386f2(0x12b)]=0x1]='Solved',_0x2b496f[_0x2b496f['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2b496f))(_0x459f91||{}),_0x84442c=(_0x61b418=>(_0x61b418[_0x61b418[_0x2386f2(0x11d)]=0x0]=_0x2386f2(0x11d),_0x61b418[_0x61b418[_0x2386f2(0x13a)]=0x1]='Add',_0x61b418[_0x61b418['Reply']=0x2]=_0x2386f2(0x12f),_0x61b418[_0x61b418['Edit']=0x3]='Edit',_0x61b418[_0x61b418[_0x2386f2(0x125)]=0x4]='Delete',_0x61b418[_0x61b418[_0x2386f2(0x182)]=0x5]=_0x2386f2(0x182),_0x61b418[_0x61b418[_0x2386f2(0x186)]=-0x1]=_0x2386f2(0x186),_0x61b418))(_0x84442c||{});const _0x4dace6=_0x1acd73=>_0x533f59[_0x2386f2(0x14d)](new Date(+_0x1acd73))['format'](_0x2386f2(0x145)),_0x2f3f71=async(_0x4c44ff,_0x18c701)=>{const _0x2982de=_0x2386f2,_0x29596a=_0x4c44ff[_0x2982de(0x15f)](_0x533f59[_0x2982de(0x180)]),_0x2012d8=_0x4c44ff[_0x2982de(0x15f)](_0x57e286[_0x2982de(0x189)]);_0x18c701[_0x2982de(0x167)](_0x120917=>{const _0x556330=_0x2982de;_0x29596a['getUser'](_0x120917)&&_0x18c701[_0x556330(0x172)](_0x120917);}),_0x18c701[_0x2982de(0x15d)]&&(await _0x2012d8[_0x2982de(0x15f)](_0x2982de(0x18b),{'params':{'userIDs':[..._0x18c701]}}))[_0x2982de(0x13d)][_0x2982de(0x135)]['forEach'](_0x4ed85b=>{const _0x4f4c7a=_0x2982de;_0x4ed85b&&_0x29596a[_0x4f4c7a(0x147)](_0x4ed85b);});};var _0x5a889f=Object[_0x2386f2(0x141)],_0x1017d3=(_0x50197a,_0x424c7b,_0xc08815,_0x1f61ca)=>{for(var _0x47b1a9=_0x1f61ca>0x1?void 0x0:_0x1f61ca?_0x5a889f(_0x424c7b,_0xc08815):_0x424c7b,_0x3a703d=_0x50197a['length']-0x1,_0x54cff3;_0x3a703d>=0x0;_0x3a703d--)(_0x54cff3=_0x50197a[_0x3a703d])&&(_0x47b1a9=_0x54cff3(_0x47b1a9)||_0x47b1a9);return _0x47b1a9;},_0x5d3c09=(_0x5c79cc,_0x1b509c)=>(_0x1ae58d,_0x1a83cb)=>_0x1b509c(_0x1ae58d,_0x1a83cb,_0x5c79cc);let _0x263cbc=class extends _0x533f59[_0x2386f2(0x16c)]{constructor(_0xc9a493,_0x4148e9,_0x34c174,_0x30effe){const _0x4c7d3c=_0x2386f2;super(),this[_0x4c7d3c(0x190)]=_0xc9a493,this[_0x4c7d3c(0x1a2)]=_0x4148e9,this[_0x4c7d3c(0x181)]=_0x34c174,this['_injector']=_0x30effe,this[_0x4c7d3c(0x149)](),this[_0x4c7d3c(0x120)]();}[_0x2386f2(0x120)](){const _0x32e899=_0x2386f2;this['disposeWithMe'](this['_threadCommentModel'][_0x32e899(0x128)]['pipe'](_0x1d0038[_0x32e899(0x154)](0x10))[_0x32e899(0x16e)](_0xed4857=>{const _0x105050=_0x32e899,_0x3f1c3c=new Set();_0xed4857[_0x105050(0x167)](_0x5a94bf=>{const _0x1ff796=_0x105050;switch(_0x5a94bf['type']){case _0x1ff796(0x126):{const _0x48b069=_0x5a94bf[_0x1ff796(0x198)][_0x1ff796(0x17b)];_0x3f1c3c['add'](_0x48b069);break;}}}),_0x2f3f71(this[_0x105050(0x14c)],_0x3f1c3c);}));}[_0x2386f2(0x149)](){const _0x7ee1ac=_0x2386f2;this[_0x7ee1ac(0x18f)](this[_0x7ee1ac(0x190)][_0x7ee1ac(0x128)][_0x7ee1ac(0x16e)](async _0x405cdc=>{const _0x1da5fc=_0x7ee1ac;var _0x2e6ec4,_0x3ef01e,_0x3d6e3a,_0x2d7f59;const _0x54d233=(_0x2e6ec4=this[_0x1da5fc(0x1a2)][_0x1da5fc(0x124)](_0x405cdc[_0x1da5fc(0x142)])[_0x1da5fc(0x127)](_0x9f3afb=>_0x9f3afb['threadId']===_0x405cdc[_0x1da5fc(0x19e)]))==null?void 0x0:_0x2e6ec4[_0x1da5fc(0x16a)];if(!_0x54d233)return;const {unitId:_0xd35bd8,subUnitId:_0x289a41}=_0x54d233;switch(_0x405cdc[_0x1da5fc(0x159)]&&this['_userService'][_0x1da5fc(0x147)](_0x405cdc[_0x1da5fc(0x159)]),_0x405cdc[_0x1da5fc(0x160)]){case _0x84442c[_0x1da5fc(0x13a)]:break;case _0x84442c[_0x1da5fc(0x12f)]:{this[_0x1da5fc(0x1a2)][_0x1da5fc(0x15e)](_0xd35bd8,_0x289a41,{'unitId':_0xd35bd8,'subUnitId':_0x289a41,'ref':'','id':_0x405cdc[_0x1da5fc(0x173)],'dT':_0x4dace6(+_0x405cdc[_0x1da5fc(0x139)]),'threadId':_0x405cdc[_0x1da5fc(0x19e)],'personId':(_0x3d6e3a=(_0x3ef01e=_0x405cdc[_0x1da5fc(0x159)])==null?void 0x0:_0x3ef01e[_0x1da5fc(0x1a0)])!=null?_0x3d6e3a:_0x405cdc[_0x1da5fc(0x146)],'text':JSON[_0x1da5fc(0x136)](_0x405cdc[_0x1da5fc(0x12a)]),'parentId':_0x54d233['id']});break;}case _0x84442c['Delete']:{const _0x5942da=this['_threadCommentModel'][_0x1da5fc(0x158)](_0xd35bd8,_0x289a41,_0x405cdc[_0x1da5fc(0x173)]);_0x5942da&&_0x5942da[_0x1da5fc(0x195)]&&this['_threadCommentModel'][_0x1da5fc(0x140)](_0xd35bd8,_0x289a41,_0x405cdc['replyId']);break;}case _0x84442c[_0x1da5fc(0x178)]:{this[_0x1da5fc(0x1a2)][_0x1da5fc(0x162)](_0xd35bd8,_0x289a41,{'commentId':_0x405cdc[_0x1da5fc(0x173)],'text':JSON[_0x1da5fc(0x136)](_0x405cdc['content'])});break;}case _0x84442c[_0x1da5fc(0x182)]:{const _0x585260=(_0x2d7f59=this['_threadCommentModel'][_0x1da5fc(0x124)](_0x405cdc['unitId'])[_0x1da5fc(0x127)](_0x5be8e6=>_0x5be8e6[_0x1da5fc(0x19e)]===_0x405cdc[_0x1da5fc(0x19e)]))==null?void 0x0:_0x2d7f59['root'];_0x585260&&this[_0x1da5fc(0x1a2)]['resolveComment'](_0xd35bd8,_0x289a41,_0x585260['id'],_0x405cdc[_0x1da5fc(0x18e)]===_0x459f91[_0x1da5fc(0x12b)]);break;}}}));}};_0x263cbc=_0x1017d3([_0x5d3c09(0x0,_0x533f59[_0x2386f2(0x19a)](_0x460bf4[_0x2386f2(0x138)])),_0x5d3c09(0x1,_0x533f59[_0x2386f2(0x19a)](_0x3271af['ThreadCommentModel'])),_0x5d3c09(0x2,_0x533f59[_0x2386f2(0x19a)](_0x533f59['UserManagerService'])),_0x5d3c09(0x3,_0x533f59['Inject'](_0x533f59['Injector']))],_0x263cbc);const _0x400adb='thread-comment-data-source.config',_0x14bcf8={};var _0x4358da=Object[_0x2386f2(0x141)],_0x282d75=(_0x1387f2,_0x12c240,_0x45f8aa,_0xd662af)=>{for(var _0x57e31c=_0xd662af>0x1?void 0x0:_0xd662af?_0x4358da(_0x12c240,_0x45f8aa):_0x12c240,_0x2cccdf=_0x1387f2['length']-0x1,_0x418287;_0x2cccdf>=0x0;_0x2cccdf--)(_0x418287=_0x1387f2[_0x2cccdf])&&(_0x57e31c=_0x418287(_0x57e31c)||_0x57e31c);return _0x57e31c;},_0x162e0f=(_0xd841c3,_0x25e74e)=>(_0x48b2dc,_0x14a1d6)=>_0x25e74e(_0x48b2dc,_0x14a1d6,_0xd841c3);function _0x28e354(_0x50f178,_0x5cb8d7){const _0x164757=_0x2386f2,_0x154998=_0x50f178[_0x164757(0x137)][0x0];return{..._0x5cb8d7,'id':_0x154998['replyId'],'resolved':_0x50f178[_0x164757(0x18e)]===0x1,'dT':_0x4dace6(_0x154998['createTimestamp']),'personId':_0x154998['userId'],'threadId':_0x154998[_0x164757(0x19e)]};}function _0x245674(_0x505be3,_0x18b5ba,_0x4711a6){const _0x430009=_0x2386f2;var _0x393384,_0x13aeab;if(((_0x13aeab=(_0x393384=_0x505be3==null?void 0x0:_0x505be3[_0x430009(0x137)])==null?void 0x0:_0x393384[_0x430009(0x19c)])!=null?_0x13aeab:0x0)>0x0){const _0x49f296=(_0x1faeeb,_0xd6642)=>({'id':_0x1faeeb[_0x430009(0x173)],'threadId':_0x1faeeb[_0x430009(0x19e)],'dT':_0x4dace6(_0x1faeeb[_0x430009(0x139)]),'personId':_0x1faeeb[_0x430009(0x146)],'resolved':_0x505be3[_0x430009(0x18e)]===_0x459f91[_0x430009(0x12b)],'unitId':_0x18b5ba,'subUnitId':_0x4711a6,'text':JSON['parse'](_0x1faeeb[_0x430009(0x12a)]),'parentId':_0xd6642}),_0x4b4b9a=_0x49f296(_0x505be3[_0x430009(0x137)][0x0]);return{..._0x4b4b9a,'children':_0x505be3[_0x430009(0x137)][_0x430009(0x16f)](0x1)[_0x430009(0x131)](_0x329db7=>_0x49f296(_0x329db7,_0x4b4b9a['id']))};}return null;}let _0x48590c=class{constructor(_0x2fd508,_0x395f10,_0x368e3d,_0x592b78){const _0x398a93=_0x2386f2;this[_0x398a93(0x144)]=_0x2fd508,this['_userService']=_0x395f10,this['_sessionService']=_0x368e3d,this['_injector']=_0x592b78;}async[_0x2386f2(0x15e)](_0x162e4d){const _0x11a6c0=_0x2386f2;var _0x540377,_0x37f56b;const {parentId:_0x4fdf33,unitId:_0x2f3531,text:_0x57b59f,threadId:_0x43135a}=_0x162e4d,_0x45d8cc=(_0x37f56b=(_0x540377=_0x57b59f[_0x11a6c0(0x169)])==null?void 0x0:_0x540377[_0x11a6c0(0x153)](_0x41b6c8=>_0x41b6c8[_0x11a6c0(0x199)]===_0x533f59['CustomRangeType'][_0x11a6c0(0x157)])[_0x11a6c0(0x131)](_0x4bcff5=>_0x4bcff5[_0x11a6c0(0x13b)]))!=null?_0x37f56b:[],_0x178236=JSON[_0x11a6c0(0x122)](_0x57b59f),_0x2c782d=(await this[_0x11a6c0(0x19d)][_0x11a6c0(0x16b)](_0x2f3531))[_0x11a6c0(0x192)]();if(_0x4fdf33){const _0x1f4fab={'memberId':_0x2c782d,'unitId':_0x2f3531,'content':_0x178236,'mention':_0x45d8cc,'threadId':_0x43135a},_0x208fab=(await this[_0x11a6c0(0x144)][_0x11a6c0(0x150)]('/universer-api/comment/unit/'+_0x2f3531+_0x11a6c0(0x18a),{'body':_0x1f4fab}))[_0x11a6c0(0x13d)][_0x11a6c0(0x148)];return{..._0x162e4d,'id':_0x208fab[_0x11a6c0(0x173)],'dT':_0x533f59[_0x11a6c0(0x14d)](+_0x208fab[_0x11a6c0(0x139)])['format'](_0x11a6c0(0x145)),'personId':_0x208fab[_0x11a6c0(0x146)]};}else{const _0x299f9c={'memberId':_0x2c782d,'unitId':_0x2f3531,'content':_0x178236,'mention':_0x45d8cc},_0x113cb2=await this[_0x11a6c0(0x144)][_0x11a6c0(0x150)](_0x11a6c0(0x165)+_0x2f3531+'/add',{'body':_0x299f9c});return _0x28e354(_0x113cb2[_0x11a6c0(0x13d)][_0x11a6c0(0x164)],_0x162e4d);}}async[_0x2386f2(0x162)](_0x287dc5){const _0x5dfd0d=_0x2386f2;var _0x8f3cf4,_0x2f0cb1;const {text:_0xf5b636,unitId:_0x5a8a0e}=_0x287dc5,_0x2dc080=(_0x2f0cb1=(_0x8f3cf4=_0xf5b636[_0x5dfd0d(0x169)])==null?void 0x0:_0x8f3cf4[_0x5dfd0d(0x153)](_0xc2c3b1=>_0xc2c3b1[_0x5dfd0d(0x199)]===_0x533f59[_0x5dfd0d(0x12e)]['COMMENT'])[_0x5dfd0d(0x131)](_0x313874=>_0x313874[_0x5dfd0d(0x13b)]))!=null?_0x2f0cb1:[],_0x4769f2=JSON[_0x5dfd0d(0x122)](_0xf5b636),_0x541115=_0x287dc5[_0x5dfd0d(0x19e)],_0x2d581c=_0x287dc5['id'],_0x5c02b7={'memberId':(await this['_sessionService']['requireSession'](_0x5a8a0e))[_0x5dfd0d(0x192)](),'unitId':_0x5a8a0e,'threadId':_0x541115,'mention':_0x2dc080,'content':_0x4769f2,'replyId':_0x2d581c},_0x2eb59c=await this[_0x5dfd0d(0x144)][_0x5dfd0d(0x150)](_0x5dfd0d(0x165)+_0x5a8a0e+'/edit',{'body':_0x5c02b7});return!_0x2eb59c[_0x5dfd0d(0x13d)][_0x5dfd0d(0x163)]||_0x2eb59c[_0x5dfd0d(0x13d)]['error'][_0x5dfd0d(0x191)]===0x1;}async[_0x2386f2(0x11e)](_0x21aea6){const _0x3123d7=_0x2386f2,{unitId:_0x4da0ce}=_0x21aea6,_0x199f1d=_0x21aea6[_0x3123d7(0x19e)],_0x44681a={'memberId':this['_userService'][_0x3123d7(0x15c)]()['userID'],'unitId':_0x4da0ce,'threadId':_0x199f1d,'solved':_0x21aea6[_0x3123d7(0x174)]?_0x459f91[_0x3123d7(0x12b)]:_0x459f91['OpenOrReOpen']},_0x302cd0=await this['_httpService'][_0x3123d7(0x150)](_0x3123d7(0x165)+_0x4da0ce+_0x3123d7(0x177),{'body':_0x44681a});return!_0x302cd0[_0x3123d7(0x13d)][_0x3123d7(0x163)]||_0x302cd0[_0x3123d7(0x13d)][_0x3123d7(0x163)][_0x3123d7(0x191)]===0x1;}async[_0x2386f2(0x140)](_0x30a1d7,_0x3314fb,_0x31b129,_0x424c42){const _0x451a23=_0x2386f2,_0x3d5773={'memberId':(await this[_0x451a23(0x19d)][_0x451a23(0x16b)](_0x30a1d7))[_0x451a23(0x192)](),'threadId':_0x31b129,'replyId':_0x424c42,'unitId':_0x30a1d7},_0x10783c=await this['_httpService'][_0x451a23(0x150)](_0x451a23(0x165)+_0x30a1d7+'/delete',{'body':_0x3d5773});return!_0x10783c['body'][_0x451a23(0x163)]||_0x10783c[_0x451a23(0x13d)]['error'][_0x451a23(0x191)]===0x1;}async[_0x2386f2(0x168)](_0x21b6db,_0x2d656b,_0x59ce0a){const _0x34e14e=_0x2386f2,_0x5d595d={'unitId':_0x21b6db,'threadId':_0x59ce0a},_0x2d09c6=await this[_0x34e14e(0x144)][_0x34e14e(0x150)](_0x34e14e(0x165)+_0x21b6db+_0x34e14e(0x15b),{'body':_0x5d595d}),_0x5c3270=_0x59ce0a[_0x34e14e(0x131)](_0x233dcb=>_0x245674(_0x2d09c6['body'][_0x34e14e(0x11f)][_0x233dcb],_0x21b6db,_0x2d656b))['filter'](Boolean);return Object[_0x34e14e(0x130)](_0x2d09c6[_0x34e14e(0x13d)][_0x34e14e(0x135)])['forEach'](_0x52b848=>{const _0x4aaf01=_0x34e14e;this[_0x4aaf01(0x181)][_0x4aaf01(0x147)](_0x52b848);}),_0x5c3270;}[_0x2386f2(0x155)](_0x19b81a){const _0x11c25c=_0x2386f2;return{'id':_0x19b81a['id'],'threadId':_0x19b81a[_0x11c25c(0x19e)],'ref':_0x19b81a[_0x11c25c(0x14a)]};}};_0x48590c=_0x282d75([_0x162e0f(0x0,_0x533f59[_0x2386f2(0x19a)](_0x57e286[_0x2386f2(0x189)])),_0x162e0f(0x1,_0x533f59[_0x2386f2(0x19a)](_0x533f59[_0x2386f2(0x180)])),_0x162e0f(0x2,_0x533f59[_0x2386f2(0x19a)](_0x460bf4[_0x2386f2(0x151)])),_0x162e0f(0x3,_0x533f59[_0x2386f2(0x19a)](_0x533f59[_0x2386f2(0x17d)]))],_0x48590c);var _0x3a80ec=Object[_0x2386f2(0x141)],_0x1fe58b=(_0x426c80,_0x45ac1d,_0x3d9df2,_0x1f7684)=>{const _0x2f8a41=_0x2386f2;for(var _0x562714=_0x1f7684>0x1?void 0x0:_0x1f7684?_0x3a80ec(_0x45ac1d,_0x3d9df2):_0x45ac1d,_0x5e4d0d=_0x426c80[_0x2f8a41(0x19c)]-0x1,_0x4c0df6;_0x5e4d0d>=0x0;_0x5e4d0d--)(_0x4c0df6=_0x426c80[_0x5e4d0d])&&(_0x562714=_0x4c0df6(_0x562714)||_0x562714);return _0x562714;},_0x353c57=(_0x3bddc3,_0x3f777d)=>(_0x341426,_0x17fad9)=>_0x3f777d(_0x341426,_0x17fad9,_0x3bddc3);let _0x236d90=class extends _0x533f59['Disposable']{constructor(_0x728e00,_0x3ee7f0){const _0x2a5f58=_0x2386f2;super(),this[_0x2a5f58(0x13f)]=_0x728e00,this[_0x2a5f58(0x197)]=_0x3ee7f0,this[_0x2a5f58(0x17f)]();}[_0x2386f2(0x17f)](){const _0x5aa5ab=_0x2386f2;this['_threadCommentDataSourceService'][_0x5aa5ab(0x18c)]=this['_threadCommentDataSource'],this[_0x5aa5ab(0x13f)][_0x5aa5ab(0x19b)]=!0x1;}};_0x236d90=_0x1fe58b([_0x353c57(0x0,_0x3271af[_0x2386f2(0x1a5)]),_0x353c57(0x1,_0x533f59[_0x2386f2(0x19a)](_0x48590c))],_0x236d90);var _0x145173=Object[_0x2386f2(0x183)],_0x56b775=Object[_0x2386f2(0x141)],_0x357519=(_0x405743,_0x1815ea,_0x256757)=>_0x1815ea in _0x405743?_0x145173(_0x405743,_0x1815ea,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x256757}):_0x405743[_0x1815ea]=_0x256757,_0x3579d8=(_0x3967d0,_0x2a84ab,_0xf6c7de,_0x22b5ab)=>{const _0x1665cd=_0x2386f2;for(var _0x40fa8e=_0x22b5ab>0x1?void 0x0:_0x22b5ab?_0x56b775(_0x2a84ab,_0xf6c7de):_0x2a84ab,_0x263861=_0x3967d0[_0x1665cd(0x19c)]-0x1,_0x5c8c4e;_0x263861>=0x0;_0x263861--)(_0x5c8c4e=_0x3967d0[_0x263861])&&(_0x40fa8e=_0x5c8c4e(_0x40fa8e)||_0x40fa8e);return _0x40fa8e;},_0x5f22ad=(_0x53159c,_0x2dedfa)=>(_0x44fb77,_0xbae929)=>_0x2dedfa(_0x44fb77,_0xbae929,_0x53159c),_0x3982ad=(_0x5ee866,_0xceede4,_0x5147ec)=>_0x357519(_0x5ee866,typeof _0xceede4!='symbol'?_0xceede4+'':_0xceede4,_0x5147ec);_0x52fcf5['UniverThreadCommentDataSourcePlugin']=class extends _0x533f59[_0x2386f2(0x166)]{constructor(_0x178b68=_0x14bcf8,_0x1e159f,_0x21ef8e){const _0x234528=_0x2386f2;super(),this[_0x234528(0x12c)]=_0x178b68,this['_injector']=_0x1e159f,this['_configService']=_0x21ef8e;const {..._0x20c222}=_0x533f59[_0x234528(0x14b)]({},_0x14bcf8,this[_0x234528(0x12c)]);this[_0x234528(0x196)][_0x234528(0x179)](_0x400adb,_0x20c222);}[_0x2386f2(0x12d)](){const _0x176332=_0x2386f2;[[_0x48590c],[_0x236d90],[_0x263cbc]][_0x176332(0x167)](_0x3f41b5=>{const _0x2e9ad3=_0x176332;this[_0x2e9ad3(0x14c)]['add'](_0x3f41b5);});}['onReady'](){const _0x4aee00=_0x2386f2;this[_0x4aee00(0x14c)]['get'](_0x236d90),this['_injector'][_0x4aee00(0x15f)](_0x263cbc);}},_0x3982ad(_0x52fcf5[_0x2386f2(0x132)],_0x2386f2(0x16d),_0x3d6877),_0x3982ad(_0x52fcf5[_0x2386f2(0x132)],_0x2386f2(0x160),_0x533f59['UniverInstanceType'][_0x2386f2(0x194)]),_0x52fcf5[_0x2386f2(0x132)]=_0x3579d8([_0x533f59[_0x2386f2(0x13c)](_0x374430[_0x2386f2(0x18d)],_0x460bf4['UniverCollaborationClientPlugin'],_0x3b803c['UniverLicensePlugin']),_0x5f22ad(0x1,_0x533f59[_0x2386f2(0x19a)](_0x533f59[_0x2386f2(0x17d)])),_0x5f22ad(0x2,_0x533f59['IConfigService'])],_0x52fcf5['UniverThreadCommentDataSourcePlugin']),Object[_0x2386f2(0x183)](_0x52fcf5,Symbol[_0x2386f2(0x15a)],{'value':_0x2386f2(0x187)});}));
|
|
1
|
+
function _0x2834(){const _0x5a2e04=['@univerjs/thread-comment-ui','merge','defineProperty','deleteComment','stringify','customRanges','post','38zZwzbO','_userService','replies','UniverCollaborationClientPlugin','/reply','rxjs','UniverCore','/solved','UniverProLicense','getCurrentUser','resolved','bufferTime','@univerjs/core','_threadCommentDataSource','Solve','getUnit','rangeType','/delete','parse','Reply','user','root','@univerjs-pro/license','setConfig','_threadCommentDataSourceService','map','getOwnPropertyDescriptor','CollaborationSessionService','_initUserSync','UniverProThreadCommentDatasource','reply','object','updateComment','find','_init','Disposable','_config','thread-comment-data-source.config','UniverProCollaborationClient','/add','code','_configService','Edit','getUser','values','_sessionService','OpenOrReOpen','4870dmbAde','subscribe','comment','IThreadCommentDataSourceService','IConfigService','commentUpdate$','body','listComments','symbol','Inject','8tQgLoi','4724bbjQfl','onReady','filter','_initDataSource','error','createTimestamp','getMemberID','YYYY/MM/DD\x20HH:mm','@univerjs/network','88JhempU','Add','COMMENT','DependentOn','addUser','syncUpdateMutationToColla','CustomRangeType','rangeId','UNRECOGNIZED','UniverThreadComment','@univerjs-pro/collaboration-client','personId','UniverThreadCommentDataSourcePlugin','userID','ThreadCommentModel','add','_injector','get','@univerjs/thread-comment','/universer-api/user/list','users','resolveComment','ref','replyId','HTTPService','364932WBWGzu','UniverThreadCommentUIPlugin','50188qaLzUn','size','requireSession','/edit','solved','Module','Delete','7224427vIdrRT','_commentService','content','_threadCommentModel','delete','UserManagerService','threadId','UNIVER_UNKNOWN','dataSource','amd','Plugin','getComment','unitId','format','Injector','type','forEach','3407610qSiQjC','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/universer-api/comment/unit/','length','exports','parentId','_httpService','userId','Unknown','4802244pnlmfi','8721423xYQUPs','disposeWithMe','Solved','addComment','pluginName'];_0x2834=function(){return _0x5a2e04;};return _0x2834();}function _0x3204(_0x387fdb,_0x28e565){const _0x2834e4=_0x2834();return _0x3204=function(_0x3204f7,_0x24ca26){_0x3204f7=_0x3204f7-0x89;let _0x23f547=_0x2834e4[_0x3204f7];return _0x23f547;},_0x3204(_0x387fdb,_0x28e565);}(function(_0x66dde0,_0x4d5935){const _0x54f45c=_0x3204,_0x31cde5=_0x66dde0();while(!![]){try{const _0x4354f8=parseInt(_0x54f45c(0xaf))/0x1*(parseInt(_0x54f45c(0x10d))/0x2)+parseInt(_0x54f45c(0x10b))/0x3+-parseInt(_0x54f45c(0xe9))/0x4*(-parseInt(_0x54f45c(0xde))/0x5)+-parseInt(_0x54f45c(0xa2))/0x6+parseInt(_0x54f45c(0x114))/0x7+-parseInt(_0x54f45c(0xe8))/0x8*(-parseInt(_0x54f45c(0xa3))/0x9)+parseInt(_0x54f45c(0x99))/0xa*(-parseInt(_0x54f45c(0xf2))/0xb);if(_0x4354f8===_0x4d5935)break;else _0x31cde5['push'](_0x31cde5['shift']());}catch(_0x433822){_0x31cde5['push'](_0x31cde5['shift']());}}}(_0x2834,0xaaefc),function(_0x12b489,_0x4d08ed){const _0x411320=_0x3204;typeof exports==_0x411320(0xce)&&typeof module<'u'?_0x4d08ed(exports,require(_0x411320(0xfc)),require('@univerjs-pro/license'),require(_0x411320(0xbb)),require(_0x411320(0xa8)),require(_0x411320(0x104)),require(_0x411320(0xb4)),require(_0x411320(0xf1))):typeof define=='function'&&define[_0x411320(0x91)]?define([_0x411320(0x9d),_0x411320(0xfc),_0x411320(0xc5),_0x411320(0xbb),_0x411320(0xa8),_0x411320(0x104),_0x411320(0xb4),_0x411320(0xf1)],_0x4d08ed):(_0x12b489=typeof globalThis<'u'?globalThis:_0x12b489||self,_0x4d08ed(_0x12b489[_0x411320(0xcc)]={},_0x12b489[_0x411320(0xd5)],_0x12b489[_0x411320(0xb7)],_0x12b489[_0x411320(0xb5)],_0x12b489['UniverThreadCommentUi'],_0x12b489[_0x411320(0xfb)],_0x12b489[_0x411320(0xb4)],_0x12b489['UniverNetwork']));}(this,function(_0x321e48,_0x182396,_0x14c201,_0x151fa6,_0x5f4ed7,_0x1650f0,_0x68007b,_0xfa25ec){'use strict';const _0x591f68=_0x3204;const _0x58b3e4=_0x591f68(0x9a);var _0x37ebf4=(_0x1b8e99=>(_0x1b8e99[_0x1b8e99[_0x591f68(0xdd)]=0x0]=_0x591f68(0xdd),_0x1b8e99[_0x1b8e99[_0x591f68(0xa5)]=0x1]=_0x591f68(0xa5),_0x1b8e99[_0x1b8e99['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x1b8e99))(_0x37ebf4||{}),_0x40cbd3=(_0x2dbf52=>(_0x2dbf52[_0x2dbf52[_0x591f68(0xa1)]=0x0]=_0x591f68(0xa1),_0x2dbf52[_0x2dbf52['Add']=0x1]='Add',_0x2dbf52[_0x2dbf52[_0x591f68(0xc2)]=0x2]='Reply',_0x2dbf52[_0x2dbf52[_0x591f68(0xd9)]=0x3]=_0x591f68(0xd9),_0x2dbf52[_0x2dbf52[_0x591f68(0x113)]=0x4]=_0x591f68(0x113),_0x2dbf52[_0x2dbf52[_0x591f68(0xbd)]=0x5]=_0x591f68(0xbd),_0x2dbf52[_0x2dbf52[_0x591f68(0xfa)]=-0x1]=_0x591f68(0xfa),_0x2dbf52))(_0x40cbd3||{});const _0x4f5f2a=_0x556077=>_0x151fa6['dayjs'](new Date(+_0x556077))[_0x591f68(0x95)](_0x591f68(0xf0)),_0x49ec44=async(_0x3d9529,_0x4c4a9a)=>{const _0x46f547=_0x591f68,_0x27a463=_0x3d9529[_0x46f547(0x103)](_0x151fa6[_0x46f547(0x8d)]),_0x2bebf3=_0x3d9529['get'](_0xfa25ec[_0x46f547(0x10a)]);_0x4c4a9a[_0x46f547(0x98)](_0x5c91ae=>{const _0x67ffc3=_0x46f547;_0x27a463[_0x67ffc3(0xda)](_0x5c91ae)&&_0x4c4a9a[_0x67ffc3(0x8c)](_0x5c91ae);}),_0x4c4a9a[_0x46f547(0x10e)]&&(await _0x2bebf3[_0x46f547(0x103)](_0x46f547(0x105),{'params':{'userIDs':[..._0x4c4a9a]}}))[_0x46f547(0xe4)]['users'][_0x46f547(0x98)](_0x43e595=>{const _0x565d02=_0x46f547;_0x43e595&&_0x27a463[_0x565d02(0xf6)](_0x43e595);});};var _0x5bed7c=Object[_0x591f68(0xc9)],_0x5edcc7=(_0x58aceb,_0x5396f2,_0x49ec16,_0xce402b)=>{const _0x328681=_0x591f68;for(var _0x55e6fd=_0xce402b>0x1?void 0x0:_0xce402b?_0x5bed7c(_0x5396f2,_0x49ec16):_0x5396f2,_0x297fa2=_0x58aceb[_0x328681(0x9c)]-0x1,_0x411f46;_0x297fa2>=0x0;_0x297fa2--)(_0x411f46=_0x58aceb[_0x297fa2])&&(_0x55e6fd=_0x411f46(_0x55e6fd)||_0x55e6fd);return _0x55e6fd;},_0x46cf7d=(_0x548a71,_0x267290)=>(_0x4ff830,_0x5b9baa)=>_0x267290(_0x4ff830,_0x5b9baa,_0x548a71);let _0x2232cc=class extends _0x151fa6[_0x591f68(0xd2)]{constructor(_0x153efa,_0x2983e2,_0x2a20d0,_0x2d0e54){const _0xfded7a=_0x591f68;super(),this['_commentService']=_0x153efa,this[_0xfded7a(0x8b)]=_0x2983e2,this[_0xfded7a(0xb0)]=_0x2a20d0,this[_0xfded7a(0x102)]=_0x2d0e54,this['_init'](),this[_0xfded7a(0xcb)]();}[_0x591f68(0xcb)](){const _0x927726=_0x591f68;this[_0x927726(0xa4)](this[_0x927726(0x8b)][_0x927726(0xe3)]['pipe'](_0x68007b[_0x927726(0xba)](0x10))['subscribe'](_0x1ff493=>{const _0x33398d=_0x927726,_0x2505a7=new Set();_0x1ff493[_0x33398d(0x98)](_0x5b73c8=>{const _0x139fdd=_0x33398d;switch(_0x5b73c8[_0x139fdd(0x97)]){case _0x139fdd(0x101):{const _0x19af81=_0x5b73c8['payload'][_0x139fdd(0xfd)];_0x2505a7[_0x139fdd(0x101)](_0x19af81);break;}}}),_0x49ec44(this[_0x33398d(0x102)],_0x2505a7);}));}[_0x591f68(0xd1)](){const _0x5105a3=_0x591f68;this[_0x5105a3(0xa4)](this[_0x5105a3(0x89)][_0x5105a3(0xe3)][_0x5105a3(0xdf)](async _0x26cfa1=>{const _0x1292b0=_0x5105a3;var _0x19a9d4,_0x4dd764,_0x238576,_0x468231;const _0x431740=(_0x19a9d4=this[_0x1292b0(0x8b)][_0x1292b0(0xbe)](_0x26cfa1[_0x1292b0(0x94)])[_0x1292b0(0xd0)](_0x39599d=>_0x39599d[_0x1292b0(0x8e)]===_0x26cfa1['threadId']))==null?void 0x0:_0x19a9d4[_0x1292b0(0xc4)];if(!_0x431740)return;const {unitId:_0x2e0f3c,subUnitId:_0x5d9bb1}=_0x431740;switch(_0x26cfa1[_0x1292b0(0xc3)]&&this[_0x1292b0(0xb0)][_0x1292b0(0xf6)](_0x26cfa1[_0x1292b0(0xc3)]),_0x26cfa1['type']){case _0x40cbd3[_0x1292b0(0xf3)]:break;case _0x40cbd3['Reply']:{this['_threadCommentModel'][_0x1292b0(0xa6)](_0x2e0f3c,_0x5d9bb1,{'unitId':_0x2e0f3c,'subUnitId':_0x5d9bb1,'ref':'','id':_0x26cfa1[_0x1292b0(0x109)],'dT':_0x4f5f2a(+_0x26cfa1[_0x1292b0(0xee)]),'threadId':_0x26cfa1[_0x1292b0(0x8e)],'personId':(_0x238576=(_0x4dd764=_0x26cfa1[_0x1292b0(0xc3)])==null?void 0x0:_0x4dd764[_0x1292b0(0xff)])!=null?_0x238576:_0x26cfa1[_0x1292b0(0xa0)],'text':JSON[_0x1292b0(0xc1)](_0x26cfa1[_0x1292b0(0x8a)]),'parentId':_0x431740['id']});break;}case _0x40cbd3[_0x1292b0(0x113)]:{const _0x222496=this[_0x1292b0(0x8b)][_0x1292b0(0x93)](_0x2e0f3c,_0x5d9bb1,_0x26cfa1[_0x1292b0(0x109)]);_0x222496&&_0x222496[_0x1292b0(0x9e)]&&this[_0x1292b0(0x8b)]['deleteComment'](_0x2e0f3c,_0x5d9bb1,_0x26cfa1[_0x1292b0(0x109)]);break;}case _0x40cbd3[_0x1292b0(0xd9)]:{this[_0x1292b0(0x8b)][_0x1292b0(0xcf)](_0x2e0f3c,_0x5d9bb1,{'commentId':_0x26cfa1[_0x1292b0(0x109)],'text':JSON[_0x1292b0(0xc1)](_0x26cfa1['content'])});break;}case _0x40cbd3['Solve']:{const _0x15bc78=(_0x468231=this[_0x1292b0(0x8b)][_0x1292b0(0xbe)](_0x26cfa1[_0x1292b0(0x94)])[_0x1292b0(0xd0)](_0x3eaa3e=>_0x3eaa3e[_0x1292b0(0x8e)]===_0x26cfa1[_0x1292b0(0x8e)]))==null?void 0x0:_0x468231[_0x1292b0(0xc4)];_0x15bc78&&this[_0x1292b0(0x8b)][_0x1292b0(0x107)](_0x2e0f3c,_0x5d9bb1,_0x15bc78['id'],_0x26cfa1[_0x1292b0(0x111)]===_0x37ebf4[_0x1292b0(0xa5)]);break;}}}));}};_0x2232cc=_0x5edcc7([_0x46cf7d(0x0,_0x151fa6[_0x591f68(0xe7)](_0x182396['CommentService'])),_0x46cf7d(0x1,_0x151fa6[_0x591f68(0xe7)](_0x1650f0[_0x591f68(0x100)])),_0x46cf7d(0x2,_0x151fa6[_0x591f68(0xe7)](_0x151fa6[_0x591f68(0x8d)])),_0x46cf7d(0x3,_0x151fa6[_0x591f68(0xe7)](_0x151fa6[_0x591f68(0x96)]))],_0x2232cc);const _0x23ed33=_0x591f68(0xd4),_0x31f529={};var _0x202b9f=Object['getOwnPropertyDescriptor'],_0x523dcf=(_0x3598ad,_0x2341d5,_0x1c47ee,_0x186091)=>{const _0x53b717=_0x591f68;for(var _0x3993fe=_0x186091>0x1?void 0x0:_0x186091?_0x202b9f(_0x2341d5,_0x1c47ee):_0x2341d5,_0x37ebe7=_0x3598ad[_0x53b717(0x9c)]-0x1,_0x5cfa7f;_0x37ebe7>=0x0;_0x37ebe7--)(_0x5cfa7f=_0x3598ad[_0x37ebe7])&&(_0x3993fe=_0x5cfa7f(_0x3993fe)||_0x3993fe);return _0x3993fe;},_0x952504=(_0x487477,_0x2eff42)=>(_0x4e6788,_0x231564)=>_0x2eff42(_0x4e6788,_0x231564,_0x487477);function _0x16ac71(_0x1d6b9b,_0x21fc5e){const _0x5d74e5=_0x591f68,_0x480ad0=_0x1d6b9b[_0x5d74e5(0xb1)][0x0];return{..._0x21fc5e,'id':_0x480ad0[_0x5d74e5(0x109)],'resolved':_0x1d6b9b[_0x5d74e5(0x111)]===0x1,'dT':_0x4f5f2a(_0x480ad0[_0x5d74e5(0xee)]),'personId':_0x480ad0['userId'],'threadId':_0x480ad0[_0x5d74e5(0x8e)]};}function _0x3212ca(_0x5efa6b,_0x5f7df6,_0x4f45d2){const _0x5dcb63=_0x591f68;var _0x1e3df1,_0x32ff26;if(((_0x32ff26=(_0x1e3df1=_0x5efa6b==null?void 0x0:_0x5efa6b[_0x5dcb63(0xb1)])==null?void 0x0:_0x1e3df1[_0x5dcb63(0x9c)])!=null?_0x32ff26:0x0)>0x0){const _0x1db11b=(_0x39ca3a,_0x517d3a)=>({'id':_0x39ca3a[_0x5dcb63(0x109)],'threadId':_0x39ca3a[_0x5dcb63(0x8e)],'dT':_0x4f5f2a(_0x39ca3a[_0x5dcb63(0xee)]),'personId':_0x39ca3a[_0x5dcb63(0xa0)],'resolved':_0x5efa6b['solved']===_0x37ebf4['Solved'],'unitId':_0x5f7df6,'subUnitId':_0x4f45d2,'text':JSON[_0x5dcb63(0xc1)](_0x39ca3a[_0x5dcb63(0x8a)]),'parentId':_0x517d3a}),_0x59d225=_0x1db11b(_0x5efa6b['replies'][0x0]);return{..._0x59d225,'children':_0x5efa6b[_0x5dcb63(0xb1)]['slice'](0x1)[_0x5dcb63(0xc8)](_0x5a3b86=>_0x1db11b(_0x5a3b86,_0x59d225['id']))};}return null;}let _0x22c519=class{constructor(_0x22223b,_0x3e0423,_0x2d09cd,_0x5ca60f){const _0x23e9c2=_0x591f68;this['_httpService']=_0x22223b,this[_0x23e9c2(0xb0)]=_0x3e0423,this[_0x23e9c2(0xdc)]=_0x2d09cd,this['_injector']=_0x5ca60f;}async[_0x591f68(0xa6)](_0x20af83){const _0x53c072=_0x591f68;var _0x56b22b,_0x1e6555;const {parentId:_0x7d3ae4,unitId:_0x15b5f7,text:_0x18bd38,threadId:_0x4e2077}=_0x20af83,_0x3e3746=(_0x1e6555=(_0x56b22b=_0x18bd38[_0x53c072(0xad)])==null?void 0x0:_0x56b22b[_0x53c072(0xeb)](_0x13c418=>_0x13c418[_0x53c072(0xbf)]===_0x151fa6[_0x53c072(0xf8)]['COMMENT'])['map'](_0x4711d3=>_0x4711d3[_0x53c072(0xf9)]))!=null?_0x1e6555:[],_0x3e1fa7=JSON['stringify'](_0x18bd38),_0x3805e8=(await this[_0x53c072(0xdc)][_0x53c072(0x10f)](_0x15b5f7))[_0x53c072(0xef)]();if(_0x7d3ae4){const _0x2e5043={'memberId':_0x3805e8,'unitId':_0x15b5f7,'content':_0x3e1fa7,'mention':_0x3e3746,'threadId':_0x4e2077},_0x2686b7=(await this[_0x53c072(0x9f)][_0x53c072(0xae)](_0x53c072(0x9b)+_0x15b5f7+_0x53c072(0xb3),{'body':_0x2e5043}))[_0x53c072(0xe4)][_0x53c072(0xcd)];return{..._0x20af83,'id':_0x2686b7[_0x53c072(0x109)],'dT':_0x151fa6['dayjs'](+_0x2686b7['createTimestamp'])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x2686b7[_0x53c072(0xa0)]};}else{const _0x26a2e2={'memberId':_0x3805e8,'unitId':_0x15b5f7,'content':_0x3e1fa7,'mention':_0x3e3746},_0x589df6=await this['_httpService'][_0x53c072(0xae)](_0x53c072(0x9b)+_0x15b5f7+_0x53c072(0xd6),{'body':_0x26a2e2});return _0x16ac71(_0x589df6[_0x53c072(0xe4)][_0x53c072(0xe0)],_0x20af83);}}async['updateComment'](_0x1b8937){const _0x4846cb=_0x591f68;var _0x3ea558,_0x242c34;const {text:_0x3e4d6b,unitId:_0x2d9637}=_0x1b8937,_0x3cca61=(_0x242c34=(_0x3ea558=_0x3e4d6b[_0x4846cb(0xad)])==null?void 0x0:_0x3ea558['filter'](_0x406ba7=>_0x406ba7[_0x4846cb(0xbf)]===_0x151fa6[_0x4846cb(0xf8)][_0x4846cb(0xf4)])[_0x4846cb(0xc8)](_0x47a021=>_0x47a021['rangeId']))!=null?_0x242c34:[],_0x8bcd8b=JSON[_0x4846cb(0xac)](_0x3e4d6b),_0x1d8821=_0x1b8937[_0x4846cb(0x8e)],_0x3f0c37=_0x1b8937['id'],_0x4a9b67={'memberId':(await this[_0x4846cb(0xdc)]['requireSession'](_0x2d9637))[_0x4846cb(0xef)](),'unitId':_0x2d9637,'threadId':_0x1d8821,'mention':_0x3cca61,'content':_0x8bcd8b,'replyId':_0x3f0c37},_0x31d8af=await this[_0x4846cb(0x9f)][_0x4846cb(0xae)](_0x4846cb(0x9b)+_0x2d9637+_0x4846cb(0x110),{'body':_0x4a9b67});return!_0x31d8af['body'][_0x4846cb(0xed)]||_0x31d8af[_0x4846cb(0xe4)][_0x4846cb(0xed)][_0x4846cb(0xd7)]===0x1;}async['resolveComment'](_0xcafcc9){const _0x45ec97=_0x591f68,{unitId:_0x45a25f}=_0xcafcc9,_0x40c451=_0xcafcc9[_0x45ec97(0x8e)],_0x47638f={'memberId':this[_0x45ec97(0xb0)][_0x45ec97(0xb8)]()[_0x45ec97(0xff)],'unitId':_0x45a25f,'threadId':_0x40c451,'solved':_0xcafcc9[_0x45ec97(0xb9)]?_0x37ebf4['Solved']:_0x37ebf4[_0x45ec97(0xdd)]},_0xa46a85=await this['_httpService'][_0x45ec97(0xae)]('/universer-api/comment/unit/'+_0x45a25f+_0x45ec97(0xb6),{'body':_0x47638f});return!_0xa46a85['body']['error']||_0xa46a85[_0x45ec97(0xe4)][_0x45ec97(0xed)][_0x45ec97(0xd7)]===0x1;}async[_0x591f68(0xab)](_0x5b1b03,_0x473a29,_0x328b95,_0x2de5c2){const _0x299214=_0x591f68,_0x128747={'memberId':(await this['_sessionService'][_0x299214(0x10f)](_0x5b1b03))[_0x299214(0xef)](),'threadId':_0x328b95,'replyId':_0x2de5c2,'unitId':_0x5b1b03},_0x2e7e4d=await this[_0x299214(0x9f)]['post'](_0x299214(0x9b)+_0x5b1b03+_0x299214(0xc0),{'body':_0x128747});return!_0x2e7e4d[_0x299214(0xe4)][_0x299214(0xed)]||_0x2e7e4d[_0x299214(0xe4)][_0x299214(0xed)][_0x299214(0xd7)]===0x1;}async[_0x591f68(0xe5)](_0x3a55d9,_0x5755e1,_0x3736eb){const _0xf616d7=_0x591f68,_0x3824e9={'unitId':_0x3a55d9,'threadId':_0x3736eb},_0x417f0f=await this[_0xf616d7(0x9f)]['post'](_0xf616d7(0x9b)+_0x3a55d9+'/list',{'body':_0x3824e9}),_0xdf3050=_0x3736eb[_0xf616d7(0xc8)](_0x61a6ae=>_0x3212ca(_0x417f0f[_0xf616d7(0xe4)]['comments'][_0x61a6ae],_0x3a55d9,_0x5755e1))['filter'](Boolean);return Object[_0xf616d7(0xdb)](_0x417f0f[_0xf616d7(0xe4)][_0xf616d7(0x106)])[_0xf616d7(0x98)](_0x14e5be=>{const _0x4ac085=_0xf616d7;this[_0x4ac085(0xb0)][_0x4ac085(0xf6)](_0x14e5be);}),_0xdf3050;}['saveCommentToSnapshot'](_0x193524){const _0x82d3a3=_0x591f68;return{'id':_0x193524['id'],'threadId':_0x193524[_0x82d3a3(0x8e)],'ref':_0x193524[_0x82d3a3(0x108)]};}};_0x22c519=_0x523dcf([_0x952504(0x0,_0x151fa6[_0x591f68(0xe7)](_0xfa25ec[_0x591f68(0x10a)])),_0x952504(0x1,_0x151fa6['Inject'](_0x151fa6[_0x591f68(0x8d)])),_0x952504(0x2,_0x151fa6[_0x591f68(0xe7)](_0x182396[_0x591f68(0xca)])),_0x952504(0x3,_0x151fa6[_0x591f68(0xe7)](_0x151fa6['Injector']))],_0x22c519);var _0x24b408=Object[_0x591f68(0xc9)],_0x4553f8=(_0x465afa,_0x46e9df,_0x34c0b5,_0xcb9e8f)=>{for(var _0x1281d5=_0xcb9e8f>0x1?void 0x0:_0xcb9e8f?_0x24b408(_0x46e9df,_0x34c0b5):_0x46e9df,_0x5cb80e=_0x465afa['length']-0x1,_0x4017ca;_0x5cb80e>=0x0;_0x5cb80e--)(_0x4017ca=_0x465afa[_0x5cb80e])&&(_0x1281d5=_0x4017ca(_0x1281d5)||_0x1281d5);return _0x1281d5;},_0x23d751=(_0x34edef,_0x11648f)=>(_0x27a4c1,_0x159667)=>_0x11648f(_0x27a4c1,_0x159667,_0x34edef);let _0x49b07e=class extends _0x151fa6[_0x591f68(0xd2)]{constructor(_0x446c22,_0x1a7c8a){const _0x2092f6=_0x591f68;super(),this[_0x2092f6(0xc7)]=_0x446c22,this[_0x2092f6(0xbc)]=_0x1a7c8a,this['_initDataSource']();}[_0x591f68(0xec)](){const _0x3dcbd2=_0x591f68;this[_0x3dcbd2(0xc7)][_0x3dcbd2(0x90)]=this[_0x3dcbd2(0xbc)],this[_0x3dcbd2(0xc7)][_0x3dcbd2(0xf7)]=!0x1;}};_0x49b07e=_0x4553f8([_0x23d751(0x0,_0x1650f0[_0x591f68(0xe1)]),_0x23d751(0x1,_0x151fa6[_0x591f68(0xe7)](_0x22c519))],_0x49b07e);var _0x130bd4=Object['defineProperty'],_0x373e95=Object[_0x591f68(0xc9)],_0x2225d9=(_0x30cfaf,_0x4ed427,_0x37d1a3)=>_0x4ed427 in _0x30cfaf?_0x130bd4(_0x30cfaf,_0x4ed427,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x37d1a3}):_0x30cfaf[_0x4ed427]=_0x37d1a3,_0x48bb38=(_0x439de5,_0x38ecf2,_0x1cf9a0,_0x4b20bb)=>{const _0x1e41a5=_0x591f68;for(var _0x27f783=_0x4b20bb>0x1?void 0x0:_0x4b20bb?_0x373e95(_0x38ecf2,_0x1cf9a0):_0x38ecf2,_0x494d41=_0x439de5[_0x1e41a5(0x9c)]-0x1,_0x8ea9c0;_0x494d41>=0x0;_0x494d41--)(_0x8ea9c0=_0x439de5[_0x494d41])&&(_0x27f783=_0x8ea9c0(_0x27f783)||_0x27f783);return _0x27f783;},_0x30ff86=(_0xfd8066,_0x3513fe)=>(_0x39a9e6,_0x5dcde4)=>_0x3513fe(_0x39a9e6,_0x5dcde4,_0xfd8066),_0x3f44cd=(_0x95d6a1,_0xed0ecb,_0x2788c7)=>_0x2225d9(_0x95d6a1,typeof _0xed0ecb!=_0x591f68(0xe6)?_0xed0ecb+'':_0xed0ecb,_0x2788c7);_0x321e48[_0x591f68(0xfe)]=class extends _0x151fa6[_0x591f68(0x92)]{constructor(_0x4fb092=_0x31f529,_0x26fad8,_0x3e303f){const _0x7ed6a3=_0x591f68;super(),this[_0x7ed6a3(0xd3)]=_0x4fb092,this['_injector']=_0x26fad8,this[_0x7ed6a3(0xd8)]=_0x3e303f;const {..._0x283788}=_0x151fa6[_0x7ed6a3(0xa9)]({},_0x31f529,this[_0x7ed6a3(0xd3)]);this[_0x7ed6a3(0xd8)][_0x7ed6a3(0xc6)](_0x23ed33,_0x283788);}['onStarting'](){[[_0x22c519],[_0x49b07e],[_0x2232cc]]['forEach'](_0x51a747=>{const _0x506ca2=_0x3204;this[_0x506ca2(0x102)][_0x506ca2(0x101)](_0x51a747);});}[_0x591f68(0xea)](){const _0x50565c=_0x591f68;this[_0x50565c(0x102)][_0x50565c(0x103)](_0x49b07e),this['_injector']['get'](_0x2232cc);}},_0x3f44cd(_0x321e48[_0x591f68(0xfe)],_0x591f68(0xa7),_0x58b3e4),_0x3f44cd(_0x321e48[_0x591f68(0xfe)],_0x591f68(0x97),_0x151fa6['UniverInstanceType'][_0x591f68(0x8f)]),_0x321e48[_0x591f68(0xfe)]=_0x48bb38([_0x151fa6[_0x591f68(0xf5)](_0x5f4ed7[_0x591f68(0x10c)],_0x182396[_0x591f68(0xb2)],_0x14c201['UniverLicensePlugin']),_0x30ff86(0x1,_0x151fa6[_0x591f68(0xe7)](_0x151fa6['Injector'])),_0x30ff86(0x2,_0x151fa6[_0x591f68(0xe2)])],_0x321e48['UniverThreadCommentDataSourcePlugin']),Object[_0x591f68(0xaa)](_0x321e48,Symbol['toStringTag'],{'value':_0x591f68(0x112)});}));
|
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.202505201607",
|
|
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/
|
|
51
|
-
"@univerjs/core": "0.7.0-nightly.202505191607",
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.7.0-nightly.202505201607",
|
|
49
|
+
"@univerjs-pro/license": "0.7.0-nightly.202505201607",
|
|
50
|
+
"@univerjs/core": "0.7.0-nightly.202505201607",
|
|
52
51
|
"@univerjs/protocol": "0.1.46-alpha.3",
|
|
53
|
-
"@univerjs/thread-comment": "0.7.0-nightly.
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.7.0-nightly.
|
|
52
|
+
"@univerjs/thread-comment": "0.7.0-nightly.202505201607",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.7.0-nightly.202505201607",
|
|
54
|
+
"@univerjs/network": "0.7.0-nightly.202505201607"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|