@univerjs-pro/thread-comment-datasource 0.12.1-nightly.202511221011 → 0.12.2-experimental.20251129-0fa20cd
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 +10 -10
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x4e54ff=_0x1cb8;(function(_0x52bac1,_0x4f24fb){const _0x22dd45=_0x1cb8,_0x459b48=_0x52bac1();while(!![]){try{const _0x456d=parseInt(_0x22dd45(0x1b4))/0x1+-parseInt(_0x22dd45(0x15f))/0x2+parseInt(_0x22dd45(0x19f))/0x3*(-parseInt(_0x22dd45(0x19a))/0x4)+parseInt(_0x22dd45(0x19c))/0x5+parseInt(_0x22dd45(0x173))/0x6+-parseInt(_0x22dd45(0x16a))/0x7+parseInt(_0x22dd45(0x1a3))/0x8;if(_0x456d===_0x4f24fb)break;else _0x459b48['push'](_0x459b48['shift']());}catch(_0x1c90ec){_0x459b48['push'](_0x459b48['shift']());}}}(_0xbd57,0xa71f8));Object[_0x4e54ff(0x168)](exports,Symbol[_0x4e54ff(0x1aa)],{'value':_0x4e54ff(0x1a4)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x4e54ff(0x152);var I=(_0x2b5367=>(_0x2b5367[_0x2b5367[_0x4e54ff(0x14c)]=0x0]=_0x4e54ff(0x14c),_0x2b5367[_0x2b5367['Solved']=0x1]=_0x4e54ff(0x18e),_0x2b5367[_0x2b5367[_0x4e54ff(0x1b2)]=-0x1]='UNRECOGNIZED',_0x2b5367))(I||{}),v=(_0x2b3815=>(_0x2b3815[_0x2b3815[_0x4e54ff(0x175)]=0x0]=_0x4e54ff(0x175),_0x2b3815[_0x2b3815[_0x4e54ff(0x164)]=0x1]='Add',_0x2b3815[_0x2b3815[_0x4e54ff(0x181)]=0x2]=_0x4e54ff(0x181),_0x2b3815[_0x2b3815[_0x4e54ff(0x1a8)]=0x3]=_0x4e54ff(0x1a8),_0x2b3815[_0x2b3815[_0x4e54ff(0x17e)]=0x4]=_0x4e54ff(0x17e),_0x2b3815[_0x2b3815[_0x4e54ff(0x179)]=0x5]=_0x4e54ff(0x179),_0x2b3815[_0x2b3815[_0x4e54ff(0x1b2)]=-0x1]=_0x4e54ff(0x1b2),_0x2b3815))(v||{});const f=_0x2374ac=>c['dayjs'](new Date(+_0x2374ac))[_0x4e54ff(0x150)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x2e4ab4,_0x4cdfed)=>{const _0x9e3580=_0x4e54ff,_0x1effb6=_0x2e4ab4[_0x9e3580(0x196)](c[_0x9e3580(0x15b)]),_0x2db1f9=_0x2e4ab4[_0x9e3580(0x196)](P['HTTPService']);_0x4cdfed[_0x9e3580(0x191)](_0x32ae48=>{const _0x1a5fc4=_0x9e3580;_0x1effb6[_0x1a5fc4(0x162)](_0x32ae48)&&_0x4cdfed[_0x1a5fc4(0x15c)](_0x32ae48);}),_0x4cdfed['size']&&(await _0x2db1f9[_0x9e3580(0x196)](_0x9e3580(0x165),{'params':{'userIDs':[..._0x4cdfed]}}))[_0x9e3580(0x16f)][_0x9e3580(0x160)][_0x9e3580(0x191)](_0x310f87=>{const _0x577efb=_0x9e3580;_0x310f87&&_0x1effb6[_0x577efb(0x180)](_0x310f87);});};var $=Object[_0x4e54ff(0x18f)],E=(_0xb66bec,_0x540309,_0x128157,_0x49a46e)=>{const _0x2080e4=_0x4e54ff;for(var _0xfe0fb=_0x49a46e>0x1?void 0x0:_0x49a46e?$(_0x540309,_0x128157):_0x540309,_0x2e9330=_0xb66bec[_0x2080e4(0x1a9)]-0x1,_0x340629;_0x2e9330>=0x0;_0x2e9330--)(_0x340629=_0xb66bec[_0x2e9330])&&(_0xfe0fb=_0x340629(_0xfe0fb)||_0xfe0fb);return _0xfe0fb;},S=(_0x1b84f7,_0x47808e)=>(_0x2eb786,_0x42b586)=>_0x47808e(_0x2eb786,_0x42b586,_0x1b84f7);let _=class extends c[_0x4e54ff(0x177)]{constructor(_0x1c3c5c,_0x1691b2,_0x3253dc,_0x20be70){const _0x14e40f=_0x4e54ff;super(),this['_commentService']=_0x1c3c5c,this[_0x14e40f(0x15a)]=_0x1691b2,this['_userService']=_0x3253dc,this['_injector']=_0x20be70,this[_0x14e40f(0x148)](),this[_0x14e40f(0x184)]();}[_0x4e54ff(0x184)](){const _0x1f7c87=_0x4e54ff;this[_0x1f7c87(0x144)](this[_0x1f7c87(0x15a)][_0x1f7c87(0x176)][_0x1f7c87(0x1ad)](j[_0x1f7c87(0x14a)](0x10))[_0x1f7c87(0x170)](_0x4dfdf3=>{const _0x13570d=_0x1f7c87,_0x372b74=new Set();_0x4dfdf3['forEach'](_0x414801=>{const _0x4e455d=_0x1cb8;switch(_0x414801[_0x4e455d(0x16c)]){case _0x4e455d(0x185):{const _0x167a9a=_0x414801[_0x4e455d(0x1a0)][_0x4e455d(0x19e)];_0x372b74[_0x4e455d(0x185)](_0x167a9a);break;}}}),R(this[_0x13570d(0x1b1)],_0x372b74);}));}[_0x4e54ff(0x148)](){const _0x3acb1a=_0x4e54ff;this[_0x3acb1a(0x144)](this['_commentService'][_0x3acb1a(0x176)]['subscribe'](async _0x472c2c=>{const _0x258fc0=_0x3acb1a;var _0x49f19a,_0x46351c,_0x2ecc43,_0x756b29;const _0xbceed0=(_0x49f19a=this[_0x258fc0(0x15a)][_0x258fc0(0x167)](_0x472c2c['unitId'])[_0x258fc0(0x14d)](_0x1da577=>_0x1da577[_0x258fc0(0x195)]===_0x472c2c[_0x258fc0(0x195)]))==null?void 0x0:_0x49f19a['root'];if(!_0xbceed0)return;const {unitId:_0x3d45a3,subUnitId:_0x5a7e86}=_0xbceed0;switch(_0x472c2c[_0x258fc0(0x1b5)]&&this[_0x258fc0(0x15e)][_0x258fc0(0x180)](_0x472c2c[_0x258fc0(0x1b5)]),_0x472c2c[_0x258fc0(0x16c)]){case v[_0x258fc0(0x164)]:break;case v[_0x258fc0(0x181)]:{this[_0x258fc0(0x15a)][_0x258fc0(0x194)](_0x3d45a3,_0x5a7e86,{'unitId':_0x3d45a3,'subUnitId':_0x5a7e86,'ref':'','id':_0x472c2c[_0x258fc0(0x17c)],'dT':f(+_0x472c2c[_0x258fc0(0x154)]),'threadId':_0x472c2c[_0x258fc0(0x195)],'personId':(_0x2ecc43=(_0x46351c=_0x472c2c[_0x258fc0(0x1b5)])==null?void 0x0:_0x46351c[_0x258fc0(0x188)])!=null?_0x2ecc43:_0x472c2c['userId'],'text':JSON[_0x258fc0(0x1a2)](_0x472c2c[_0x258fc0(0x18a)]),'parentId':_0xbceed0['id']});break;}case v[_0x258fc0(0x17e)]:{const _0x52e86d=this['_threadCommentModel'][_0x258fc0(0x17f)](_0x3d45a3,_0x5a7e86,_0x472c2c[_0x258fc0(0x17c)]);_0x52e86d&&_0x52e86d[_0x258fc0(0x156)]&&this[_0x258fc0(0x15a)][_0x258fc0(0x147)](_0x3d45a3,_0x5a7e86,_0x472c2c['replyId']);break;}case v['Edit']:{this[_0x258fc0(0x15a)][_0x258fc0(0x14b)](_0x3d45a3,_0x5a7e86,{'commentId':_0x472c2c[_0x258fc0(0x17c)],'text':JSON[_0x258fc0(0x1a2)](_0x472c2c['content'])});break;}case v[_0x258fc0(0x179)]:{const _0x36d713=(_0x756b29=this['_threadCommentModel'][_0x258fc0(0x167)](_0x472c2c[_0x258fc0(0x190)])[_0x258fc0(0x14d)](_0x3c869d=>_0x3c869d[_0x258fc0(0x195)]===_0x472c2c[_0x258fc0(0x195)]))==null?void 0x0:_0x756b29[_0x258fc0(0x149)];_0x36d713&&this['_threadCommentModel'][_0x258fc0(0x174)](_0x3d45a3,_0x5a7e86,_0x36d713['id'],_0x472c2c[_0x258fc0(0x18d)]===I[_0x258fc0(0x18e)]);break;}}}));}};_=E([S(0x0,c['Inject'](b[_0x4e54ff(0x1ac)])),S(0x1,c[_0x4e54ff(0x1ae)](M[_0x4e54ff(0x14e)])),S(0x2,c[_0x4e54ff(0x1ae)](c[_0x4e54ff(0x15b)])),S(0x3,c[_0x4e54ff(0x1ae)](c[_0x4e54ff(0x13f)]))],_);const q=_0x4e54ff(0x1a5),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x23e8a2,_0x40a77d,_0xf58c63,_0x127c7f)=>{const _0x37b954=_0x4e54ff;for(var _0x5304ea=_0x127c7f>0x1?void 0x0:_0x127c7f?A(_0x40a77d,_0xf58c63):_0x40a77d,_0x328dd4=_0x23e8a2[_0x37b954(0x1a9)]-0x1,_0x44e6d2;_0x328dd4>=0x0;_0x328dd4--)(_0x44e6d2=_0x23e8a2[_0x328dd4])&&(_0x5304ea=_0x44e6d2(_0x5304ea)||_0x5304ea);return _0x5304ea;},C=(_0x3918c2,_0x511327)=>(_0x31383a,_0x18d330)=>_0x511327(_0x31383a,_0x18d330,_0x3918c2);function _0x1cb8(_0x55ac0b,_0x32ac73){const _0xbd57b9=_0xbd57();return _0x1cb8=function(_0x1cb85b,_0x3e1f4d){_0x1cb85b=_0x1cb85b-0x13c;let _0x6b4040=_0xbd57b9[_0x1cb85b];return _0x6b4040;},_0x1cb8(_0x55ac0b,_0x32ac73);}function Y(_0x26bdc2,_0x16855e){const _0x4cb573=_0x4e54ff,_0x361d5c=_0x26bdc2[_0x4cb573(0x13c)][0x0];return{..._0x16855e,'id':_0x361d5c['replyId'],'resolved':_0x26bdc2['solved']===0x1,'dT':f(_0x361d5c[_0x4cb573(0x154)]),'personId':_0x361d5c[_0x4cb573(0x1af)],'threadId':_0x361d5c[_0x4cb573(0x195)]};}function G(_0x3a8271,_0x4ff7e2,_0x5246ef){const _0x424a43=_0x4e54ff;var _0x2c6718,_0x54036e;if(((_0x54036e=(_0x2c6718=_0x3a8271==null?void 0x0:_0x3a8271[_0x424a43(0x13c)])==null?void 0x0:_0x2c6718[_0x424a43(0x1a9)])!=null?_0x54036e:0x0)>0x0){const _0x20255a=(_0xeac31a,_0x35d0b4)=>({'id':_0xeac31a[_0x424a43(0x17c)],'threadId':_0xeac31a['threadId'],'dT':f(_0xeac31a[_0x424a43(0x154)]),'personId':_0xeac31a[_0x424a43(0x1af)],'resolved':_0x3a8271['solved']===I['Solved'],'unitId':_0x4ff7e2,'subUnitId':_0x5246ef,'text':JSON[_0x424a43(0x1a2)](_0xeac31a[_0x424a43(0x18a)]),'parentId':_0x35d0b4}),_0x46ee90=_0x20255a(_0x3a8271['replies'][0x0]);return{..._0x46ee90,'children':_0x3a8271[_0x424a43(0x13c)][_0x424a43(0x16b)](0x1)[_0x424a43(0x186)](_0x19b6e6=>_0x20255a(_0x19b6e6,_0x46ee90['id']))};}return null;}function _0xbd57(){const _0x140152=['body','subscribe','saveCommentToSnapshot','CollaborationSessionService','423102EZRkaJ','resolveComment','Unknown','commentUpdate$','Disposable','values','Solve','/universer-api/comment/unit/','UniverCollaborationClientPlugin','replyId','getCurrentUser','Delete','getComment','addUser','Reply','onStarting','setConfig','_initUserSync','add','map','IThreadCommentDataSourceService','userID','_initDataSource','content','dayjs','syncUpdateMutationToColla','solved','Solved','getOwnPropertyDescriptor','unitId','forEach','customRanges','UniverThreadCommentDataSourcePlugin','addComment','threadId','get','YYYY/MM/DD\x20HH:mm','stringify','listComments','112EryYRw','DependentOn','2073995HTyGGy','code','personId','8142TerIUb','payload','rangeId','parse','12630584MSlfio','Module','thread-comment-data-source.config','post','_config','Edit','length','toStringTag','UniverThreadCommentUIPlugin','CommentService','pipe','Inject','userId','ref','_injector','UNRECOGNIZED','UniverLicensePlugin','18487GfIozu','user','replies','_threadCommentDataSource','filter','Injector','requireSession','merge','dataSource','UniverInstanceType','disposeWithMe','/list','CustomRangeType','deleteComment','_init','root','bufferTime','updateComment','OpenOrReOpen','find','ThreadCommentModel','/edit','format','comment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','COMMENT','createTimestamp','/add','parentId','/reply','_configService','_threadCommentDataSourceService','_threadCommentModel','UserManagerService','delete','_sessionService','_userService','626568praPRV','users','getMemberID','getUser','_httpService','Add','/universer-api/user/list','comments','getUnit','defineProperty','error','7061698Vtrcda','slice','type','/delete','pluginName'];_0xbd57=function(){return _0x140152;};return _0xbd57();}let p=class{constructor(_0x17296e,_0x527398,_0xb5969f){const _0x5cf7a4=_0x4e54ff;this[_0x5cf7a4(0x163)]=_0x17296e,this[_0x5cf7a4(0x15e)]=_0x527398,this[_0x5cf7a4(0x15d)]=_0xb5969f;}async[_0x4e54ff(0x194)](_0x444728){const _0x396126=_0x4e54ff;var _0x25949e,_0x2da73b;const {parentId:_0x2a8069,unitId:_0x50d2bb,text:_0x25210b,threadId:_0x41da55}=_0x444728,_0x276570=(_0x2da73b=(_0x25949e=_0x25210b['customRanges'])==null?void 0x0:_0x25949e[_0x396126(0x13e)](_0x15c0a2=>_0x15c0a2['rangeType']===c['CustomRangeType'][_0x396126(0x153)])[_0x396126(0x186)](_0x1a4ae6=>_0x1a4ae6[_0x396126(0x1a1)]))!=null?_0x2da73b:[],_0x426546=JSON[_0x396126(0x198)](_0x25210b),_0x51cd4b=(await this[_0x396126(0x15d)][_0x396126(0x140)](_0x50d2bb))[_0x396126(0x161)]();if(_0x2a8069){const _0x404e38={'memberId':_0x51cd4b,'unitId':_0x50d2bb,'content':_0x426546,'mention':_0x276570,'threadId':_0x41da55},_0x33c508=(await this[_0x396126(0x163)][_0x396126(0x1a6)]('/universer-api/comment/unit/'+_0x50d2bb+_0x396126(0x157),{'body':_0x404e38}))['body']['reply'];return{..._0x444728,'id':_0x33c508['replyId'],'dT':c[_0x396126(0x18b)](+_0x33c508[_0x396126(0x154)])[_0x396126(0x150)](_0x396126(0x197)),'personId':_0x33c508[_0x396126(0x1af)]};}else{const _0x7cf946={'memberId':_0x51cd4b,'unitId':_0x50d2bb,'content':_0x426546,'mention':_0x276570},_0x28fead=await this['_httpService'][_0x396126(0x1a6)](_0x396126(0x17a)+_0x50d2bb+_0x396126(0x155),{'body':_0x7cf946});return Y(_0x28fead['body'][_0x396126(0x151)],_0x444728);}}async[_0x4e54ff(0x14b)](_0x5a2458){const _0x4c0419=_0x4e54ff;var _0x3057d7,_0x5870d2;const {text:_0x29b576,unitId:_0xcc168f}=_0x5a2458,_0x2f4d54=(_0x5870d2=(_0x3057d7=_0x29b576[_0x4c0419(0x192)])==null?void 0x0:_0x3057d7[_0x4c0419(0x13e)](_0x232cdc=>_0x232cdc['rangeType']===c[_0x4c0419(0x146)]['COMMENT'])['map'](_0x197c9d=>_0x197c9d[_0x4c0419(0x1a1)]))!=null?_0x5870d2:[],_0x52ac1b=JSON[_0x4c0419(0x198)](_0x29b576),_0x746288=_0x5a2458[_0x4c0419(0x195)],_0x485a9f=_0x5a2458['id'],_0x40f209={'memberId':(await this[_0x4c0419(0x15d)][_0x4c0419(0x140)](_0xcc168f))[_0x4c0419(0x161)](),'unitId':_0xcc168f,'threadId':_0x746288,'mention':_0x2f4d54,'content':_0x52ac1b,'replyId':_0x485a9f},_0x528d08=await this[_0x4c0419(0x163)][_0x4c0419(0x1a6)](_0x4c0419(0x17a)+_0xcc168f+_0x4c0419(0x14f),{'body':_0x40f209});return!_0x528d08['body'][_0x4c0419(0x169)]||_0x528d08[_0x4c0419(0x16f)][_0x4c0419(0x169)][_0x4c0419(0x19d)]===0x1;}async['resolveComment'](_0x4d752a){const _0x1789f0=_0x4e54ff,{unitId:_0x4f2ec1}=_0x4d752a,_0x272e9e=_0x4d752a[_0x1789f0(0x195)],_0x1ba4c3={'memberId':this[_0x1789f0(0x15e)][_0x1789f0(0x17d)]()[_0x1789f0(0x188)],'unitId':_0x4f2ec1,'threadId':_0x272e9e,'solved':_0x4d752a['resolved']?I['Solved']:I['OpenOrReOpen']},_0x3a79f1=await this[_0x1789f0(0x163)][_0x1789f0(0x1a6)](_0x1789f0(0x17a)+_0x4f2ec1+'/solved',{'body':_0x1ba4c3});return!_0x3a79f1[_0x1789f0(0x16f)][_0x1789f0(0x169)]||_0x3a79f1[_0x1789f0(0x16f)][_0x1789f0(0x169)]['code']===0x1;}async[_0x4e54ff(0x147)](_0x461080,_0x55ee4e,_0x282edf,_0x151da1){const _0x38ecb8=_0x4e54ff,_0x38c708={'memberId':(await this[_0x38ecb8(0x15d)][_0x38ecb8(0x140)](_0x461080))[_0x38ecb8(0x161)](),'threadId':_0x282edf,'replyId':_0x151da1,'unitId':_0x461080},_0x3669e1=await this['_httpService'][_0x38ecb8(0x1a6)](_0x38ecb8(0x17a)+_0x461080+_0x38ecb8(0x16d),{'body':_0x38c708});return!_0x3669e1[_0x38ecb8(0x16f)][_0x38ecb8(0x169)]||_0x3669e1[_0x38ecb8(0x16f)][_0x38ecb8(0x169)][_0x38ecb8(0x19d)]===0x1;}async[_0x4e54ff(0x199)](_0x3ddd62,_0x2ed544,_0x3dfb07){const _0x3a292f=_0x4e54ff,_0x3b6979={'unitId':_0x3ddd62,'threadId':_0x3dfb07},_0x335d6e=await this[_0x3a292f(0x163)][_0x3a292f(0x1a6)]('/universer-api/comment/unit/'+_0x3ddd62+_0x3a292f(0x145),{'body':_0x3b6979}),_0x4dbde8=_0x3dfb07[_0x3a292f(0x186)](_0xf9ed7b=>G(_0x335d6e[_0x3a292f(0x16f)][_0x3a292f(0x166)][_0xf9ed7b],_0x3ddd62,_0x2ed544))[_0x3a292f(0x13e)](Boolean);return Object[_0x3a292f(0x178)](_0x335d6e[_0x3a292f(0x16f)][_0x3a292f(0x160)])[_0x3a292f(0x191)](_0x574e9b=>{const _0x4217ed=_0x3a292f;this['_userService'][_0x4217ed(0x180)](_0x574e9b);}),_0x4dbde8;}[_0x4e54ff(0x171)](_0x350d3e){const _0x490e42=_0x4e54ff;return{'id':_0x350d3e['id'],'threadId':_0x350d3e[_0x490e42(0x195)],'ref':_0x350d3e[_0x490e42(0x1b0)]};}};p=x([C(0x0,c[_0x4e54ff(0x1ae)](P['HTTPService'])),C(0x1,c[_0x4e54ff(0x1ae)](c[_0x4e54ff(0x15b)])),C(0x2,c['Inject'](b[_0x4e54ff(0x172)]))],p);var H=Object[_0x4e54ff(0x18f)],J=(_0x180cad,_0x3bf74d,_0x12cecf,_0x11683c)=>{const _0x2a644b=_0x4e54ff;for(var _0x4f2529=_0x11683c>0x1?void 0x0:_0x11683c?H(_0x3bf74d,_0x12cecf):_0x3bf74d,_0x193855=_0x180cad[_0x2a644b(0x1a9)]-0x1,_0x45ac9c;_0x193855>=0x0;_0x193855--)(_0x45ac9c=_0x180cad[_0x193855])&&(_0x4f2529=_0x45ac9c(_0x4f2529)||_0x4f2529);return _0x4f2529;},y=(_0x42648f,_0x3edba9)=>(_0x3253ef,_0x5715bd)=>_0x3edba9(_0x3253ef,_0x5715bd,_0x42648f);let g=class extends c[_0x4e54ff(0x177)]{constructor(_0x1591e4,_0x105306){const _0x1258b7=_0x4e54ff;super(),this[_0x1258b7(0x159)]=_0x1591e4,this['_threadCommentDataSource']=_0x105306,this[_0x1258b7(0x189)]();}[_0x4e54ff(0x189)](){const _0x45d4d1=_0x4e54ff;this[_0x45d4d1(0x159)][_0x45d4d1(0x142)]=this[_0x45d4d1(0x13d)],this[_0x45d4d1(0x159)][_0x45d4d1(0x18c)]=!0x1;}};g=J([y(0x0,M[_0x4e54ff(0x187)]),y(0x1,c[_0x4e54ff(0x1ae)](p))],g);var F=Object[_0x4e54ff(0x168)],L=Object['getOwnPropertyDescriptor'],Z=(_0x137594,_0xf1dcd9,_0x45e549)=>_0xf1dcd9 in _0x137594?F(_0x137594,_0xf1dcd9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x45e549}):_0x137594[_0xf1dcd9]=_0x45e549,W=(_0x1e0da3,_0x52957a,_0x2b186f,_0x2b2834)=>{const _0x40e015=_0x4e54ff;for(var _0x57e9cd=_0x2b2834>0x1?void 0x0:_0x2b2834?L(_0x52957a,_0x2b186f):_0x52957a,_0x1e53f8=_0x1e0da3[_0x40e015(0x1a9)]-0x1,_0x35c2db;_0x1e53f8>=0x0;_0x1e53f8--)(_0x35c2db=_0x1e0da3[_0x1e53f8])&&(_0x57e9cd=_0x35c2db(_0x57e9cd)||_0x57e9cd);return _0x57e9cd;},O=(_0x26bf63,_0x2197e2)=>(_0x5b1175,_0x4ade1b)=>_0x2197e2(_0x5b1175,_0x4ade1b,_0x26bf63),N=(_0x518dbf,_0x3875a9,_0x215cba)=>Z(_0x518dbf,typeof _0x3875a9!='symbol'?_0x3875a9+'':_0x3875a9,_0x215cba);exports['UniverThreadCommentDataSourcePlugin']=class extends c['Plugin']{constructor(_0x266e6c=D,_0x1a2a69,_0x83087f){const _0x52ce3e=_0x4e54ff;super(),this['_config']=_0x266e6c,this[_0x52ce3e(0x1b1)]=_0x1a2a69,this[_0x52ce3e(0x158)]=_0x83087f;const {..._0x34c0ac}=c[_0x52ce3e(0x141)]({},D,this[_0x52ce3e(0x1a7)]);this[_0x52ce3e(0x158)][_0x52ce3e(0x183)](q,_0x34c0ac);}[_0x4e54ff(0x182)](){const _0x2e5b54=_0x4e54ff;[[p],[g],[_]][_0x2e5b54(0x191)](_0x717d01=>{this['_injector']['add'](_0x717d01);});}['onReady'](){const _0x4a76d6=_0x4e54ff;this[_0x4a76d6(0x1b1)]['get'](g),this[_0x4a76d6(0x1b1)][_0x4a76d6(0x196)](_);}},N(exports[_0x4e54ff(0x193)],_0x4e54ff(0x16e),U),N(exports[_0x4e54ff(0x193)],'type',c[_0x4e54ff(0x143)]['UNIVER_UNKNOWN']),exports[_0x4e54ff(0x193)]=W([c[_0x4e54ff(0x19b)](w[_0x4e54ff(0x1ab)],b[_0x4e54ff(0x17b)],T[_0x4e54ff(0x1b3)]),O(0x1,c[_0x4e54ff(0x1ae)](c[_0x4e54ff(0x13f)])),O(0x2,c['IConfigService'])],exports[_0x4e54ff(0x193)]);
|
|
1
|
+
'use strict';const _0x1e7cb5=_0x5f4e;(function(_0x2061f0,_0x3bcba8){const _0x29fe78=_0x5f4e,_0x4db2b2=_0x2061f0();while(!![]){try{const _0xa47e75=-parseInt(_0x29fe78(0x188))/0x1*(-parseInt(_0x29fe78(0x139))/0x2)+-parseInt(_0x29fe78(0x16d))/0x3+-parseInt(_0x29fe78(0x12d))/0x4+parseInt(_0x29fe78(0x177))/0x5+-parseInt(_0x29fe78(0x182))/0x6+-parseInt(_0x29fe78(0x13a))/0x7+-parseInt(_0x29fe78(0x192))/0x8*(-parseInt(_0x29fe78(0x165))/0x9);if(_0xa47e75===_0x3bcba8)break;else _0x4db2b2['push'](_0x4db2b2['shift']());}catch(_0x44203e){_0x4db2b2['push'](_0x4db2b2['shift']());}}}(_0x3046,0x89aa2));Object['defineProperty'](exports,Symbol[_0x1e7cb5(0x15b)],{'value':_0x1e7cb5(0x184)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x1e7cb5(0x141);var I=(_0x2800ef=>(_0x2800ef[_0x2800ef['OpenOrReOpen']=0x0]=_0x1e7cb5(0x15c),_0x2800ef[_0x2800ef[_0x1e7cb5(0x1a3)]=0x1]=_0x1e7cb5(0x1a3),_0x2800ef[_0x2800ef[_0x1e7cb5(0x178)]=-0x1]=_0x1e7cb5(0x178),_0x2800ef))(I||{}),v=(_0x3448dc=>(_0x3448dc[_0x3448dc['Unknown']=0x0]=_0x1e7cb5(0x131),_0x3448dc[_0x3448dc[_0x1e7cb5(0x14d)]=0x1]=_0x1e7cb5(0x14d),_0x3448dc[_0x3448dc[_0x1e7cb5(0x17a)]=0x2]=_0x1e7cb5(0x17a),_0x3448dc[_0x3448dc[_0x1e7cb5(0x19d)]=0x3]='Edit',_0x3448dc[_0x3448dc[_0x1e7cb5(0x197)]=0x4]=_0x1e7cb5(0x197),_0x3448dc[_0x3448dc[_0x1e7cb5(0x132)]=0x5]='Solve',_0x3448dc[_0x3448dc[_0x1e7cb5(0x178)]=-0x1]=_0x1e7cb5(0x178),_0x3448dc))(v||{});const f=_0x2a64ab=>c[_0x1e7cb5(0x19e)](new Date(+_0x2a64ab))[_0x1e7cb5(0x172)](_0x1e7cb5(0x189)),R=async(_0x359d27,_0x2b078f)=>{const _0x4238c9=_0x1e7cb5,_0xe7c026=_0x359d27[_0x4238c9(0x15f)](c[_0x4238c9(0x175)]),_0x4ed49e=_0x359d27[_0x4238c9(0x15f)](P[_0x4238c9(0x128)]);_0x2b078f['forEach'](_0x10bc60=>{const _0x37ee00=_0x4238c9;_0xe7c026[_0x37ee00(0x195)](_0x10bc60)&&_0x2b078f[_0x37ee00(0x162)](_0x10bc60);}),_0x2b078f[_0x4238c9(0x137)]&&(await _0x4ed49e[_0x4238c9(0x15f)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2b078f]}}))[_0x4238c9(0x12b)][_0x4238c9(0x129)][_0x4238c9(0x159)](_0x18fffa=>{const _0x2c133f=_0x4238c9;_0x18fffa&&_0xe7c026[_0x2c133f(0x134)](_0x18fffa);});};var $=Object[_0x1e7cb5(0x174)],E=(_0x2bcbb3,_0x3b59b5,_0x361126,_0x3b466e)=>{const _0x4b67ed=_0x1e7cb5;for(var _0x1789bd=_0x3b466e>0x1?void 0x0:_0x3b466e?$(_0x3b59b5,_0x361126):_0x3b59b5,_0x2d686a=_0x2bcbb3[_0x4b67ed(0x160)]-0x1,_0x583293;_0x2d686a>=0x0;_0x2d686a--)(_0x583293=_0x2bcbb3[_0x2d686a])&&(_0x1789bd=_0x583293(_0x1789bd)||_0x1789bd);return _0x1789bd;},S=(_0x496b4f,_0x4cf4b9)=>(_0x4d679e,_0xb0d8f4)=>_0x4cf4b9(_0x4d679e,_0xb0d8f4,_0x496b4f);let _=class extends c['Disposable']{constructor(_0x51b070,_0x13dcc0,_0x41ab4b,_0x39b046){const _0x38652c=_0x1e7cb5;super(),this[_0x38652c(0x14e)]=_0x51b070,this[_0x38652c(0x18d)]=_0x13dcc0,this[_0x38652c(0x19b)]=_0x41ab4b,this['_injector']=_0x39b046,this['_init'](),this[_0x38652c(0x187)]();}[_0x1e7cb5(0x187)](){const _0x3005c9=_0x1e7cb5;this['disposeWithMe'](this[_0x3005c9(0x18d)][_0x3005c9(0x18c)]['pipe'](j[_0x3005c9(0x12c)](0x10))[_0x3005c9(0x161)](_0x4829c5=>{const _0x1e62fc=_0x3005c9,_0x2f0055=new Set();_0x4829c5['forEach'](_0xd2a82f=>{const _0x4e75e2=_0x5f4e;switch(_0xd2a82f[_0x4e75e2(0x18b)]){case'add':{const _0x18844c=_0xd2a82f[_0x4e75e2(0x171)][_0x4e75e2(0x167)];_0x2f0055[_0x4e75e2(0x19c)](_0x18844c);break;}}}),R(this[_0x1e62fc(0x133)],_0x2f0055);}));}[_0x1e7cb5(0x140)](){const _0x51aee0=_0x1e7cb5;this['disposeWithMe'](this[_0x51aee0(0x14e)]['commentUpdate$'][_0x51aee0(0x161)](async _0x2347a7=>{const _0x5811db=_0x51aee0;var _0x151c29,_0x51b07f,_0xec2dba,_0x23f185;const _0x1ef38e=(_0x151c29=this[_0x5811db(0x18d)][_0x5811db(0x16b)](_0x2347a7[_0x5811db(0x150)])[_0x5811db(0x148)](_0x17b92f=>_0x17b92f[_0x5811db(0x14c)]===_0x2347a7[_0x5811db(0x14c)]))==null?void 0x0:_0x151c29[_0x5811db(0x198)];if(!_0x1ef38e)return;const {unitId:_0x58f0dd,subUnitId:_0x1e7358}=_0x1ef38e;switch(_0x2347a7[_0x5811db(0x16f)]&&this[_0x5811db(0x19b)][_0x5811db(0x134)](_0x2347a7['user']),_0x2347a7[_0x5811db(0x18b)]){case v['Add']:break;case v['Reply']:{this[_0x5811db(0x18d)]['addComment'](_0x58f0dd,_0x1e7358,{'unitId':_0x58f0dd,'subUnitId':_0x1e7358,'ref':'','id':_0x2347a7['replyId'],'dT':f(+_0x2347a7['createTimestamp']),'threadId':_0x2347a7[_0x5811db(0x14c)],'personId':(_0xec2dba=(_0x51b07f=_0x2347a7['user'])==null?void 0x0:_0x51b07f[_0x5811db(0x15a)])!=null?_0xec2dba:_0x2347a7[_0x5811db(0x13e)],'text':JSON[_0x5811db(0x152)](_0x2347a7[_0x5811db(0x157)]),'parentId':_0x1ef38e['id']});break;}case v[_0x5811db(0x197)]:{const _0x227cea=this['_threadCommentModel'][_0x5811db(0x17c)](_0x58f0dd,_0x1e7358,_0x2347a7['replyId']);_0x227cea&&_0x227cea[_0x5811db(0x13c)]&&this[_0x5811db(0x18d)][_0x5811db(0x153)](_0x58f0dd,_0x1e7358,_0x2347a7[_0x5811db(0x17b)]);break;}case v[_0x5811db(0x19d)]:{this['_threadCommentModel']['updateComment'](_0x58f0dd,_0x1e7358,{'commentId':_0x2347a7[_0x5811db(0x17b)],'text':JSON[_0x5811db(0x152)](_0x2347a7[_0x5811db(0x157)])});break;}case v[_0x5811db(0x132)]:{const _0x47fb3c=(_0x23f185=this[_0x5811db(0x18d)]['getUnit'](_0x2347a7[_0x5811db(0x150)])[_0x5811db(0x148)](_0x2cf2dd=>_0x2cf2dd[_0x5811db(0x14c)]===_0x2347a7[_0x5811db(0x14c)]))==null?void 0x0:_0x23f185[_0x5811db(0x198)];_0x47fb3c&&this[_0x5811db(0x18d)][_0x5811db(0x168)](_0x58f0dd,_0x1e7358,_0x47fb3c['id'],_0x2347a7[_0x5811db(0x191)]===I[_0x5811db(0x1a3)]);break;}}}));}};_=E([S(0x0,c[_0x1e7cb5(0x196)](b[_0x1e7cb5(0x183)])),S(0x1,c['Inject'](M[_0x1e7cb5(0x142)])),S(0x2,c[_0x1e7cb5(0x196)](c['UserManagerService'])),S(0x3,c[_0x1e7cb5(0x196)](c[_0x1e7cb5(0x145)]))],_);const q=_0x1e7cb5(0x17e),D={};var A=Object[_0x1e7cb5(0x174)],x=(_0x1f28b6,_0x43ca8c,_0x21378a,_0x4a5ec9)=>{for(var _0x53cc0d=_0x4a5ec9>0x1?void 0x0:_0x4a5ec9?A(_0x43ca8c,_0x21378a):_0x43ca8c,_0x2d31fc=_0x1f28b6['length']-0x1,_0x496d5c;_0x2d31fc>=0x0;_0x2d31fc--)(_0x496d5c=_0x1f28b6[_0x2d31fc])&&(_0x53cc0d=_0x496d5c(_0x53cc0d)||_0x53cc0d);return _0x53cc0d;},C=(_0x3e91e1,_0x408eea)=>(_0x579df3,_0x3f8156)=>_0x408eea(_0x579df3,_0x3f8156,_0x3e91e1);function Y(_0x298722,_0x4c6eaf){const _0x399dce=_0x1e7cb5,_0x1580a0=_0x298722['replies'][0x0];return{..._0x4c6eaf,'id':_0x1580a0[_0x399dce(0x17b)],'resolved':_0x298722[_0x399dce(0x191)]===0x1,'dT':f(_0x1580a0['createTimestamp']),'personId':_0x1580a0[_0x399dce(0x13e)],'threadId':_0x1580a0['threadId']};}function G(_0x6dd30,_0x2684c7,_0x256ad6){const _0x3117df=_0x1e7cb5;var _0x55875f,_0xf992e7;if(((_0xf992e7=(_0x55875f=_0x6dd30==null?void 0x0:_0x6dd30[_0x3117df(0x146)])==null?void 0x0:_0x55875f[_0x3117df(0x160)])!=null?_0xf992e7:0x0)>0x0){const _0x225be5=(_0x44b1ed,_0x99de86)=>({'id':_0x44b1ed[_0x3117df(0x17b)],'threadId':_0x44b1ed['threadId'],'dT':f(_0x44b1ed[_0x3117df(0x17d)]),'personId':_0x44b1ed['userId'],'resolved':_0x6dd30['solved']===I[_0x3117df(0x1a3)],'unitId':_0x2684c7,'subUnitId':_0x256ad6,'text':JSON[_0x3117df(0x152)](_0x44b1ed[_0x3117df(0x157)]),'parentId':_0x99de86}),_0x3eb7cb=_0x225be5(_0x6dd30[_0x3117df(0x146)][0x0]);return{..._0x3eb7cb,'children':_0x6dd30[_0x3117df(0x146)][_0x3117df(0x185)](0x1)['map'](_0x53a68f=>_0x225be5(_0x53a68f,_0x3eb7cb['id']))};}return null;}let p=class{constructor(_0x55028b,_0x403b9d,_0x2e63a1){const _0x4727b2=_0x1e7cb5;this[_0x4727b2(0x13b)]=_0x55028b,this[_0x4727b2(0x19b)]=_0x403b9d,this[_0x4727b2(0x17f)]=_0x2e63a1;}async[_0x1e7cb5(0x14b)](_0x4b568a){const _0x491c80=_0x1e7cb5;var _0x15fec4,_0x4007b0;const {parentId:_0xfea93c,unitId:_0x2e8adc,text:_0x1bad22,threadId:_0xda7c73}=_0x4b568a,_0x29f89b=(_0x4007b0=(_0x15fec4=_0x1bad22[_0x491c80(0x180)])==null?void 0x0:_0x15fec4[_0x491c80(0x16a)](_0x40efd5=>_0x40efd5[_0x491c80(0x190)]===c[_0x491c80(0x14a)][_0x491c80(0x138)])[_0x491c80(0x18f)](_0x4d5b3b=>_0x4d5b3b[_0x491c80(0x156)]))!=null?_0x4007b0:[],_0x4d9f1d=JSON[_0x491c80(0x1a1)](_0x1bad22),_0x3eda97=(await this['_sessionService'][_0x491c80(0x164)](_0x2e8adc))[_0x491c80(0x14f)]();if(_0xfea93c){const _0x394315={'memberId':_0x3eda97,'unitId':_0x2e8adc,'content':_0x4d9f1d,'mention':_0x29f89b,'threadId':_0xda7c73},_0x5387ab=(await this[_0x491c80(0x13b)][_0x491c80(0x12e)](_0x491c80(0x19f)+_0x2e8adc+'/reply',{'body':_0x394315}))[_0x491c80(0x12b)][_0x491c80(0x15d)];return{..._0x4b568a,'id':_0x5387ab[_0x491c80(0x17b)],'dT':c[_0x491c80(0x19e)](+_0x5387ab[_0x491c80(0x17d)])[_0x491c80(0x172)](_0x491c80(0x189)),'personId':_0x5387ab['userId']};}else{const _0xdb8ce={'memberId':_0x3eda97,'unitId':_0x2e8adc,'content':_0x4d9f1d,'mention':_0x29f89b},_0x281353=await this[_0x491c80(0x13b)][_0x491c80(0x12e)]('/universer-api/comment/unit/'+_0x2e8adc+_0x491c80(0x12a),{'body':_0xdb8ce});return Y(_0x281353[_0x491c80(0x12b)][_0x491c80(0x158)],_0x4b568a);}}async[_0x1e7cb5(0x179)](_0x2b4a8e){const _0x41f6c6=_0x1e7cb5;var _0x1b7832,_0x15c3a4;const {text:_0xbb7631,unitId:_0x666f2d}=_0x2b4a8e,_0xadc1b2=(_0x15c3a4=(_0x1b7832=_0xbb7631[_0x41f6c6(0x180)])==null?void 0x0:_0x1b7832[_0x41f6c6(0x16a)](_0x1c432b=>_0x1c432b[_0x41f6c6(0x190)]===c[_0x41f6c6(0x14a)][_0x41f6c6(0x138)])[_0x41f6c6(0x18f)](_0x3e8c26=>_0x3e8c26[_0x41f6c6(0x156)]))!=null?_0x15c3a4:[],_0x4bf0d7=JSON[_0x41f6c6(0x1a1)](_0xbb7631),_0x5292ec=_0x2b4a8e[_0x41f6c6(0x14c)],_0x367973=_0x2b4a8e['id'],_0x185989={'memberId':(await this[_0x41f6c6(0x17f)]['requireSession'](_0x666f2d))[_0x41f6c6(0x14f)](),'unitId':_0x666f2d,'threadId':_0x5292ec,'mention':_0xadc1b2,'content':_0x4bf0d7,'replyId':_0x367973},_0x394ace=await this['_httpService'][_0x41f6c6(0x12e)](_0x41f6c6(0x19f)+_0x666f2d+'/edit',{'body':_0x185989});return!_0x394ace['body'][_0x41f6c6(0x199)]||_0x394ace['body']['error'][_0x41f6c6(0x143)]===0x1;}async[_0x1e7cb5(0x168)](_0x3ff9ea){const _0x2d4473=_0x1e7cb5,{unitId:_0x582c24}=_0x3ff9ea,_0x2729d1=_0x3ff9ea[_0x2d4473(0x14c)],_0xfc912e={'memberId':this['_userService'][_0x2d4473(0x13f)]()['userID'],'unitId':_0x582c24,'threadId':_0x2729d1,'solved':_0x3ff9ea[_0x2d4473(0x151)]?I[_0x2d4473(0x1a3)]:I['OpenOrReOpen']},_0x3ebc33=await this[_0x2d4473(0x13b)]['post']('/universer-api/comment/unit/'+_0x582c24+_0x2d4473(0x163),{'body':_0xfc912e});return!_0x3ebc33[_0x2d4473(0x12b)][_0x2d4473(0x199)]||_0x3ebc33['body']['error'][_0x2d4473(0x143)]===0x1;}async[_0x1e7cb5(0x153)](_0x1ca752,_0x386b12,_0x17bff5,_0x43ac6c){const _0x3e55e2=_0x1e7cb5,_0x59704f={'memberId':(await this['_sessionService'][_0x3e55e2(0x164)](_0x1ca752))[_0x3e55e2(0x14f)](),'threadId':_0x17bff5,'replyId':_0x43ac6c,'unitId':_0x1ca752},_0x936c02=await this['_httpService']['post'](_0x3e55e2(0x19f)+_0x1ca752+_0x3e55e2(0x154),{'body':_0x59704f});return!_0x936c02[_0x3e55e2(0x12b)][_0x3e55e2(0x199)]||_0x936c02[_0x3e55e2(0x12b)]['error'][_0x3e55e2(0x143)]===0x1;}async['listComments'](_0x94b353,_0x1f25cc,_0x4fa7f9){const _0x4a377f=_0x1e7cb5,_0x5eba11={'unitId':_0x94b353,'threadId':_0x4fa7f9},_0x2b708d=await this[_0x4a377f(0x13b)][_0x4a377f(0x12e)](_0x4a377f(0x19f)+_0x94b353+_0x4a377f(0x19a),{'body':_0x5eba11}),_0xf73ba7=_0x4fa7f9[_0x4a377f(0x18f)](_0xd023d8=>G(_0x2b708d[_0x4a377f(0x12b)][_0x4a377f(0x18a)][_0xd023d8],_0x94b353,_0x1f25cc))['filter'](Boolean);return Object[_0x4a377f(0x170)](_0x2b708d[_0x4a377f(0x12b)][_0x4a377f(0x129)])[_0x4a377f(0x159)](_0x56a594=>{const _0x599b12=_0x4a377f;this[_0x599b12(0x19b)][_0x599b12(0x134)](_0x56a594);}),_0xf73ba7;}[_0x1e7cb5(0x176)](_0x1af70c){const _0x56eac3=_0x1e7cb5;return{'id':_0x1af70c['id'],'threadId':_0x1af70c[_0x56eac3(0x14c)],'ref':_0x1af70c[_0x56eac3(0x1a6)]};}};p=x([C(0x0,c['Inject'](P['HTTPService'])),C(0x1,c[_0x1e7cb5(0x196)](c[_0x1e7cb5(0x175)])),C(0x2,c[_0x1e7cb5(0x196)](b[_0x1e7cb5(0x16e)]))],p);function _0x3046(){const _0x3ba01a=['Reply','replyId','getComment','createTimestamp','thread-comment-data-source.config','_sessionService','customRanges','_threadCommentDataSourceService','3367518tVwtpO','CommentService','Module','slice','symbol','_initUserSync','509nwvnhF','YYYY/MM/DD\x20HH:mm','comments','type','commentUpdate$','_threadCommentModel','pluginName','map','rangeType','solved','91912CEwTZg','UniverThreadCommentDataSourcePlugin','_initDataSource','getUser','Inject','Delete','root','error','/list','_userService','add','Edit','dayjs','/universer-api/comment/unit/','defineProperty','stringify','UniverThreadCommentUIPlugin','Solved','UniverCollaborationClientPlugin','_threadCommentDataSource','ref','HTTPService','users','/add','body','bufferTime','335812YeOHnO','post','Plugin','onReady','Unknown','Solve','_injector','addUser','_configService','syncUpdateMutationToColla','size','COMMENT','274xmtKkf','7305116genhgs','_httpService','parentId','_config','userId','getCurrentUser','_init','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','ThreadCommentModel','code','IThreadCommentDataSourceService','Injector','replies','DependentOn','find','Disposable','CustomRangeType','addComment','threadId','Add','_commentService','getMemberID','unitId','resolved','parse','deleteComment','/delete','merge','rangeId','content','comment','forEach','userID','toStringTag','OpenOrReOpen','reply','IConfigService','get','length','subscribe','delete','/solved','requireSession','1899wxfjqe','onStarting','personId','resolveComment','UniverInstanceType','filter','getUnit','UNIVER_UNKNOWN','2098425qjvEhV','CollaborationSessionService','user','values','payload','format','UniverLicensePlugin','getOwnPropertyDescriptor','UserManagerService','saveCommentToSnapshot','2291155Rmadms','UNRECOGNIZED','updateComment'];_0x3046=function(){return _0x3ba01a;};return _0x3046();}var H=Object[_0x1e7cb5(0x174)],J=(_0x19a4fe,_0x2848c5,_0x2892cf,_0x4d837d)=>{for(var _0x3b50eb=_0x4d837d>0x1?void 0x0:_0x4d837d?H(_0x2848c5,_0x2892cf):_0x2848c5,_0x103b65=_0x19a4fe['length']-0x1,_0x47dd99;_0x103b65>=0x0;_0x103b65--)(_0x47dd99=_0x19a4fe[_0x103b65])&&(_0x3b50eb=_0x47dd99(_0x3b50eb)||_0x3b50eb);return _0x3b50eb;},y=(_0x296e10,_0x4f249e)=>(_0x352eda,_0x9990eb)=>_0x4f249e(_0x352eda,_0x9990eb,_0x296e10);let g=class extends c[_0x1e7cb5(0x149)]{constructor(_0x43a265,_0x46edc2){const _0x423359=_0x1e7cb5;super(),this[_0x423359(0x181)]=_0x43a265,this[_0x423359(0x1a5)]=_0x46edc2,this[_0x423359(0x194)]();}[_0x1e7cb5(0x194)](){const _0x2a2b2e=_0x1e7cb5;this['_threadCommentDataSourceService']['dataSource']=this[_0x2a2b2e(0x1a5)],this['_threadCommentDataSourceService'][_0x2a2b2e(0x136)]=!0x1;}};g=J([y(0x0,M[_0x1e7cb5(0x144)]),y(0x1,c[_0x1e7cb5(0x196)](p))],g);var F=Object[_0x1e7cb5(0x1a0)],L=Object[_0x1e7cb5(0x174)],Z=(_0x1714a6,_0x26246f,_0xa7a2a5)=>_0x26246f in _0x1714a6?F(_0x1714a6,_0x26246f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xa7a2a5}):_0x1714a6[_0x26246f]=_0xa7a2a5,W=(_0x110216,_0x16a4b5,_0x995c46,_0x1d34bb)=>{const _0x5ced0f=_0x1e7cb5;for(var _0x444738=_0x1d34bb>0x1?void 0x0:_0x1d34bb?L(_0x16a4b5,_0x995c46):_0x16a4b5,_0x1095bf=_0x110216[_0x5ced0f(0x160)]-0x1,_0x2953db;_0x1095bf>=0x0;_0x1095bf--)(_0x2953db=_0x110216[_0x1095bf])&&(_0x444738=_0x2953db(_0x444738)||_0x444738);return _0x444738;},O=(_0x3e3397,_0x17d1cf)=>(_0x3576b8,_0x5c7fa7)=>_0x17d1cf(_0x3576b8,_0x5c7fa7,_0x3e3397),N=(_0x30bf33,_0xb8fa7e,_0x4e6001)=>Z(_0x30bf33,typeof _0xb8fa7e!=_0x1e7cb5(0x186)?_0xb8fa7e+'':_0xb8fa7e,_0x4e6001);function _0x5f4e(_0x581fe4,_0x19ee87){const _0x304638=_0x3046();return _0x5f4e=function(_0x5f4e89,_0x1056e5){_0x5f4e89=_0x5f4e89-0x128;let _0x59ef03=_0x304638[_0x5f4e89];return _0x59ef03;},_0x5f4e(_0x581fe4,_0x19ee87);}exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x1e7cb5(0x12f)]{constructor(_0x592498=D,_0x5d5ced,_0x25c828){const _0x2d34e2=_0x1e7cb5;super(),this[_0x2d34e2(0x13d)]=_0x592498,this['_injector']=_0x5d5ced,this[_0x2d34e2(0x135)]=_0x25c828;const {..._0x2d4576}=c[_0x2d34e2(0x155)]({},D,this[_0x2d34e2(0x13d)]);this['_configService']['setConfig'](q,_0x2d4576);}[_0x1e7cb5(0x166)](){const _0xc93a6d=_0x1e7cb5;[[p],[g],[_]][_0xc93a6d(0x159)](_0x24d615=>{const _0x29eb2d=_0xc93a6d;this[_0x29eb2d(0x133)][_0x29eb2d(0x19c)](_0x24d615);});}[_0x1e7cb5(0x130)](){const _0xceff50=_0x1e7cb5;this[_0xceff50(0x133)][_0xceff50(0x15f)](g),this[_0xceff50(0x133)][_0xceff50(0x15f)](_);}},N(exports[_0x1e7cb5(0x193)],_0x1e7cb5(0x18e),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x1e7cb5(0x18b),c[_0x1e7cb5(0x169)][_0x1e7cb5(0x16c)]),exports[_0x1e7cb5(0x193)]=W([c[_0x1e7cb5(0x147)](w[_0x1e7cb5(0x1a2)],b[_0x1e7cb5(0x1a4)],T[_0x1e7cb5(0x173)]),O(0x1,c[_0x1e7cb5(0x196)](c[_0x1e7cb5(0x145)])),O(0x2,c[_0x1e7cb5(0x15e)])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x450650=_0x1924;(function(_0x38d6eb,_0x19fe4c){const _0x5de90c=_0x1924,_0x5b6db2=_0x38d6eb();while(!![]){try{const _0x328a8b=-parseInt(_0x5de90c(0x140))/0x1+parseInt(_0x5de90c(0x13d))/0x2+parseInt(_0x5de90c(0x115))/0x3+-parseInt(_0x5de90c(0x109))/0x4+-parseInt(_0x5de90c(0x108))/0x5*(parseInt(_0x5de90c(0x10f))/0x6)+parseInt(_0x5de90c(0x13e))/0x7+parseInt(_0x5de90c(0x12a))/0x8*(parseInt(_0x5de90c(0xff))/0x9);if(_0x328a8b===_0x19fe4c)break;else _0x5b6db2['push'](_0x5b6db2['shift']());}catch(_0x504658){_0x5b6db2['push'](_0x5b6db2['shift']());}}}(_0x1a8e,0xb5cb2));import{CommentService as _0x4899ac,CollaborationSessionService as _0x4b7890,UniverCollaborationClientPlugin as _0x46de07}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x41bba8}from'@univerjs-pro/license';import{dayjs as _0x37a29a,UserManagerService as _0x50853d,Inject as _0x4de773,Injector as _0x202eaa,Disposable as _0x4222cc,CustomRangeType as _0x569be7,UniverInstanceType as _0xb46a4b,DependentOn as _0x542ceb,IConfigService as _0x5c022a,Plugin as _0x533345,merge as _0x326730}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4e15a3}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4cd4a3,IThreadCommentDataSourceService as _0x2c32f7}from'@univerjs/thread-comment';import{bufferTime as _0x11b7ff}from'rxjs';import{HTTPService as _0x328679}from'@univerjs/network';const W=_0x450650(0x156);var I=(_0x44c82c=>(_0x44c82c[_0x44c82c[_0x450650(0x11b)]=0x0]='OpenOrReOpen',_0x44c82c[_0x44c82c['Solved']=0x1]='Solved',_0x44c82c[_0x44c82c[_0x450650(0x14b)]=-0x1]=_0x450650(0x14b),_0x44c82c))(I||{}),v=(_0x590116=>(_0x590116[_0x590116['Unknown']=0x0]=_0x450650(0x152),_0x590116[_0x590116[_0x450650(0x107)]=0x1]=_0x450650(0x107),_0x590116[_0x590116[_0x450650(0x138)]=0x2]='Reply',_0x590116[_0x590116[_0x450650(0x126)]=0x3]='Edit',_0x590116[_0x590116[_0x450650(0x12c)]=0x4]=_0x450650(0x12c),_0x590116[_0x590116[_0x450650(0x134)]=0x5]=_0x450650(0x134),_0x590116[_0x590116[_0x450650(0x14b)]=-0x1]='UNRECOGNIZED',_0x590116))(v||{});const y=_0x37f553=>_0x37a29a(new Date(+_0x37f553))[_0x450650(0x154)](_0x450650(0x12d)),B=async(_0x2b0a42,_0x105b1c)=>{const _0x343fb0=_0x450650,_0x3f89cf=_0x2b0a42[_0x343fb0(0x15d)](_0x50853d),_0x56af5f=_0x2b0a42['get'](_0x328679);_0x105b1c[_0x343fb0(0x10d)](_0x5e2cff=>{const _0x1af291=_0x343fb0;_0x3f89cf[_0x1af291(0x10b)](_0x5e2cff)&&_0x105b1c['delete'](_0x5e2cff);}),_0x105b1c[_0x343fb0(0x11d)]&&(await _0x56af5f['get'](_0x343fb0(0x147),{'params':{'userIDs':[..._0x105b1c]}}))['body'][_0x343fb0(0x159)][_0x343fb0(0x10d)](_0x2c2f86=>{const _0x412c84=_0x343fb0;_0x2c2f86&&_0x3f89cf[_0x412c84(0x114)](_0x2c2f86);});};var K=Object[_0x450650(0x12f)],V=(_0x33efb4,_0x2cf513,_0x332bf3,_0x3eef2a)=>{const _0x18a9b4=_0x450650;for(var _0x29a0fa=_0x3eef2a>0x1?void 0x0:_0x3eef2a?K(_0x2cf513,_0x332bf3):_0x2cf513,_0x3a6492=_0x33efb4[_0x18a9b4(0x130)]-0x1,_0xf52b28;_0x3a6492>=0x0;_0x3a6492--)(_0xf52b28=_0x33efb4[_0x3a6492])&&(_0x29a0fa=_0xf52b28(_0x29a0fa)||_0x29a0fa);return _0x29a0fa;},p=(_0x521a2c,_0x36d664)=>(_0x1a7769,_0x2f2d6f)=>_0x36d664(_0x1a7769,_0x2f2d6f,_0x521a2c);let _=class extends _0x4222cc{constructor(_0x324abf,_0x401363,_0x1cdd56,_0x1bf407){const _0x232274=_0x450650;super(),this[_0x232274(0x129)]=_0x324abf,this[_0x232274(0x112)]=_0x401363,this['_userService']=_0x1cdd56,this[_0x232274(0x145)]=_0x1bf407,this[_0x232274(0x10e)](),this[_0x232274(0x13c)]();}[_0x450650(0x13c)](){const _0x117061=_0x450650;this[_0x117061(0x15b)](this[_0x117061(0x112)]['commentUpdate$'][_0x117061(0x142)](_0x11b7ff(0x10))[_0x117061(0x150)](_0x52703e=>{const _0xd28a4f=_0x117061,_0x3e0999=new Set();_0x52703e[_0xd28a4f(0x10d)](_0x384e79=>{const _0x473079=_0xd28a4f;switch(_0x384e79[_0x473079(0x12b)]){case _0x473079(0x13b):{const _0x45583c=_0x384e79['payload']['personId'];_0x3e0999['add'](_0x45583c);break;}}}),B(this['_injector'],_0x3e0999);}));}[_0x450650(0x10e)](){const _0x2c900d=_0x450650;this[_0x2c900d(0x15b)](this[_0x2c900d(0x129)][_0x2c900d(0x118)][_0x2c900d(0x150)](async _0x2d4ab2=>{const _0x3f6f2a=_0x2c900d;var _0x5433ce,_0x39f5d9,_0x34d0e3,_0xa26bd8;const _0x237772=(_0x5433ce=this[_0x3f6f2a(0x112)][_0x3f6f2a(0x11e)](_0x2d4ab2[_0x3f6f2a(0x146)])[_0x3f6f2a(0x111)](_0x2cf1ad=>_0x2cf1ad[_0x3f6f2a(0x102)]===_0x2d4ab2[_0x3f6f2a(0x102)]))==null?void 0x0:_0x5433ce[_0x3f6f2a(0x132)];if(!_0x237772)return;const {unitId:_0x2b0aa3,subUnitId:_0x1e8ca8}=_0x237772;switch(_0x2d4ab2[_0x3f6f2a(0x14e)]&&this['_userService'][_0x3f6f2a(0x114)](_0x2d4ab2[_0x3f6f2a(0x14e)]),_0x2d4ab2[_0x3f6f2a(0x12b)]){case v[_0x3f6f2a(0x107)]:break;case v['Reply']:{this['_threadCommentModel'][_0x3f6f2a(0x131)](_0x2b0aa3,_0x1e8ca8,{'unitId':_0x2b0aa3,'subUnitId':_0x1e8ca8,'ref':'','id':_0x2d4ab2[_0x3f6f2a(0x121)],'dT':y(+_0x2d4ab2['createTimestamp']),'threadId':_0x2d4ab2[_0x3f6f2a(0x102)],'personId':(_0x34d0e3=(_0x39f5d9=_0x2d4ab2[_0x3f6f2a(0x14e)])==null?void 0x0:_0x39f5d9[_0x3f6f2a(0x15e)])!=null?_0x34d0e3:_0x2d4ab2[_0x3f6f2a(0x155)],'text':JSON[_0x3f6f2a(0x162)](_0x2d4ab2['content']),'parentId':_0x237772['id']});break;}case v['Delete']:{const _0x38ab8a=this[_0x3f6f2a(0x112)][_0x3f6f2a(0x135)](_0x2b0aa3,_0x1e8ca8,_0x2d4ab2[_0x3f6f2a(0x121)]);_0x38ab8a&&_0x38ab8a['parentId']&&this[_0x3f6f2a(0x112)][_0x3f6f2a(0x128)](_0x2b0aa3,_0x1e8ca8,_0x2d4ab2[_0x3f6f2a(0x121)]);break;}case v[_0x3f6f2a(0x126)]:{this['_threadCommentModel']['updateComment'](_0x2b0aa3,_0x1e8ca8,{'commentId':_0x2d4ab2[_0x3f6f2a(0x121)],'text':JSON[_0x3f6f2a(0x162)](_0x2d4ab2[_0x3f6f2a(0x10c)])});break;}case v[_0x3f6f2a(0x134)]:{const _0x3c4d5b=(_0xa26bd8=this[_0x3f6f2a(0x112)]['getUnit'](_0x2d4ab2[_0x3f6f2a(0x146)])[_0x3f6f2a(0x111)](_0x3d6d1c=>_0x3d6d1c[_0x3f6f2a(0x102)]===_0x2d4ab2[_0x3f6f2a(0x102)]))==null?void 0x0:_0xa26bd8['root'];_0x3c4d5b&&this[_0x3f6f2a(0x112)]['resolveComment'](_0x2b0aa3,_0x1e8ca8,_0x3c4d5b['id'],_0x2d4ab2[_0x3f6f2a(0x157)]===I[_0x3f6f2a(0x110)]);break;}}}));}};_=V([p(0x0,_0x4de773(_0x4899ac)),p(0x1,_0x4de773(_0x4cd4a3)),p(0x2,_0x4de773(_0x50853d)),p(0x3,_0x4de773(_0x202eaa))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x450650(0x12f)],Q=(_0x4ddc77,_0x6098fb,_0x108dc2,_0x172c81)=>{const _0x133127=_0x450650;for(var _0x28a051=_0x172c81>0x1?void 0x0:_0x172c81?k(_0x6098fb,_0x108dc2):_0x6098fb,_0x1a2f8c=_0x4ddc77[_0x133127(0x130)]-0x1,_0x1b7ed2;_0x1a2f8c>=0x0;_0x1a2f8c--)(_0x1b7ed2=_0x4ddc77[_0x1a2f8c])&&(_0x28a051=_0x1b7ed2(_0x28a051)||_0x28a051);return _0x28a051;},b=(_0x2ee30c,_0x5c5d1c)=>(_0x3ad1d1,_0x1e6fc5)=>_0x5c5d1c(_0x3ad1d1,_0x1e6fc5,_0x2ee30c);function X(_0x4bf659,_0x311a27){const _0xc0a75b=_0x450650,_0x269da6=_0x4bf659['replies'][0x0];return{..._0x311a27,'id':_0x269da6[_0xc0a75b(0x121)],'resolved':_0x4bf659[_0xc0a75b(0x157)]===0x1,'dT':y(_0x269da6[_0xc0a75b(0x14d)]),'personId':_0x269da6[_0xc0a75b(0x155)],'threadId':_0x269da6[_0xc0a75b(0x102)]};}function ee(_0x2cba06,_0x5bc8bb,_0x2e0927){const _0x2a95ef=_0x450650;var _0x59c3fd,_0x3899ae;if(((_0x3899ae=(_0x59c3fd=_0x2cba06==null?void 0x0:_0x2cba06[_0x2a95ef(0x14c)])==null?void 0x0:_0x59c3fd['length'])!=null?_0x3899ae:0x0)>0x0){const _0x27e5d6=(_0x5a56c1,_0x51317f)=>({'id':_0x5a56c1[_0x2a95ef(0x121)],'threadId':_0x5a56c1[_0x2a95ef(0x102)],'dT':y(_0x5a56c1[_0x2a95ef(0x14d)]),'personId':_0x5a56c1[_0x2a95ef(0x155)],'resolved':_0x2cba06[_0x2a95ef(0x157)]===I['Solved'],'unitId':_0x5bc8bb,'subUnitId':_0x2e0927,'text':JSON[_0x2a95ef(0x162)](_0x5a56c1[_0x2a95ef(0x10c)]),'parentId':_0x51317f}),_0x5377a8=_0x27e5d6(_0x2cba06[_0x2a95ef(0x14c)][0x0]);return{..._0x5377a8,'children':_0x2cba06[_0x2a95ef(0x14c)][_0x2a95ef(0x143)](0x1)['map'](_0x5c3cd6=>_0x27e5d6(_0x5c3cd6,_0x5377a8['id']))};}return null;}function _0x1a8e(){const _0x3fd8dc=['code','Reply','comments','getMemberID','add','_initUserSync','1747996QwjSau','3650745YxwvFK','_userService','858119KAoNwk','dataSource','pipe','slice','filter','_injector','unitId','/universer-api/user/list','body','_threadCommentDataSourceService','_config','UNRECOGNIZED','replies','createTimestamp','user','_threadCommentDataSource','subscribe','setConfig','Unknown','error','format','userId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','COMMENT','users','syncUpdateMutationToColla','disposeWithMe','saveCommentToSnapshot','get','userID','_httpService','defineProperty','/reply','parse','5422104fqQprz','post','stringify','threadId','_sessionService','listComments','comment','/delete','Add','85epRCQh','2813356FJhUba','onReady','getUser','content','forEach','_init','295494AmpJjn','Solved','find','_threadCommentModel','/universer-api/comment/unit/','addUser','1628616yHAmUA','_configService','symbol','commentUpdate$','/list','values','OpenOrReOpen','/solved','size','getUnit','rangeId','ref','replyId','_initDataSource','customRanges','rangeType','resolveComment','Edit','requireSession','deleteComment','_commentService','16wXlDWw','type','Delete','YYYY/MM/DD\x20HH:mm','resolved','getOwnPropertyDescriptor','length','addComment','root','map','Solve','getComment','onStarting'];_0x1a8e=function(){return _0x3fd8dc;};return _0x1a8e();}let S=class{constructor(_0x238068,_0x177cfc,_0x148a5e){const _0x47d2bc=_0x450650;this['_httpService']=_0x238068,this['_userService']=_0x177cfc,this[_0x47d2bc(0x103)]=_0x148a5e;}async[_0x450650(0x131)](_0x3ba58f){const _0x574128=_0x450650;var _0x5aca7f,_0x7f726e;const {parentId:_0x4b6b8f,unitId:_0x4283ce,text:_0x48d656,threadId:_0x40c46c}=_0x3ba58f,_0x4cd983=(_0x7f726e=(_0x5aca7f=_0x48d656[_0x574128(0x123)])==null?void 0x0:_0x5aca7f[_0x574128(0x144)](_0x43d1b2=>_0x43d1b2[_0x574128(0x124)]===_0x569be7[_0x574128(0x158)])[_0x574128(0x133)](_0x20c471=>_0x20c471[_0x574128(0x11f)]))!=null?_0x7f726e:[],_0x51d695=JSON[_0x574128(0x101)](_0x48d656),_0x396279=(await this[_0x574128(0x103)][_0x574128(0x127)](_0x4283ce))['getMemberID']();if(_0x4b6b8f){const _0x5e4e5d={'memberId':_0x396279,'unitId':_0x4283ce,'content':_0x51d695,'mention':_0x4cd983,'threadId':_0x40c46c},_0x2d4faf=(await this['_httpService'][_0x574128(0x100)]('/universer-api/comment/unit/'+_0x4283ce+_0x574128(0x161),{'body':_0x5e4e5d}))[_0x574128(0x148)]['reply'];return{..._0x3ba58f,'id':_0x2d4faf['replyId'],'dT':_0x37a29a(+_0x2d4faf[_0x574128(0x14d)])['format'](_0x574128(0x12d)),'personId':_0x2d4faf['userId']};}else{const _0x581101={'memberId':_0x396279,'unitId':_0x4283ce,'content':_0x51d695,'mention':_0x4cd983},_0x184f58=await this[_0x574128(0x15f)][_0x574128(0x100)](_0x574128(0x113)+_0x4283ce+'/add',{'body':_0x581101});return X(_0x184f58['body'][_0x574128(0x105)],_0x3ba58f);}}async['updateComment'](_0x459dbb){const _0x276da0=_0x450650;var _0x573eac,_0x3193d7;const {text:_0x116c6c,unitId:_0x1e4eeb}=_0x459dbb,_0x3d4331=(_0x3193d7=(_0x573eac=_0x116c6c[_0x276da0(0x123)])==null?void 0x0:_0x573eac[_0x276da0(0x144)](_0x13cea7=>_0x13cea7['rangeType']===_0x569be7['COMMENT'])[_0x276da0(0x133)](_0x46874e=>_0x46874e[_0x276da0(0x11f)]))!=null?_0x3193d7:[],_0x4ee99e=JSON[_0x276da0(0x101)](_0x116c6c),_0x3b0949=_0x459dbb[_0x276da0(0x102)],_0x276211=_0x459dbb['id'],_0x28cd66={'memberId':(await this[_0x276da0(0x103)][_0x276da0(0x127)](_0x1e4eeb))[_0x276da0(0x13a)](),'unitId':_0x1e4eeb,'threadId':_0x3b0949,'mention':_0x3d4331,'content':_0x4ee99e,'replyId':_0x276211},_0x307bb4=await this[_0x276da0(0x15f)][_0x276da0(0x100)](_0x276da0(0x113)+_0x1e4eeb+'/edit',{'body':_0x28cd66});return!_0x307bb4[_0x276da0(0x148)][_0x276da0(0x153)]||_0x307bb4[_0x276da0(0x148)][_0x276da0(0x153)][_0x276da0(0x137)]===0x1;}async[_0x450650(0x125)](_0x5dc3ce){const _0xea7d8=_0x450650,{unitId:_0x27781b}=_0x5dc3ce,_0x57664f=_0x5dc3ce[_0xea7d8(0x102)],_0x419d92={'memberId':this[_0xea7d8(0x13f)]['getCurrentUser']()[_0xea7d8(0x15e)],'unitId':_0x27781b,'threadId':_0x57664f,'solved':_0x5dc3ce[_0xea7d8(0x12e)]?I[_0xea7d8(0x110)]:I[_0xea7d8(0x11b)]},_0x2798d7=await this[_0xea7d8(0x15f)]['post']('/universer-api/comment/unit/'+_0x27781b+_0xea7d8(0x11c),{'body':_0x419d92});return!_0x2798d7[_0xea7d8(0x148)][_0xea7d8(0x153)]||_0x2798d7['body']['error'][_0xea7d8(0x137)]===0x1;}async['deleteComment'](_0x2597bf,_0x25a58f,_0x5db11d,_0x258215){const _0x347b35=_0x450650,_0x4b0ca0={'memberId':(await this[_0x347b35(0x103)]['requireSession'](_0x2597bf))[_0x347b35(0x13a)](),'threadId':_0x5db11d,'replyId':_0x258215,'unitId':_0x2597bf},_0x4e0269=await this[_0x347b35(0x15f)]['post'](_0x347b35(0x113)+_0x2597bf+_0x347b35(0x106),{'body':_0x4b0ca0});return!_0x4e0269[_0x347b35(0x148)][_0x347b35(0x153)]||_0x4e0269['body'][_0x347b35(0x153)][_0x347b35(0x137)]===0x1;}async[_0x450650(0x104)](_0x2f338d,_0x352087,_0x44fe4a){const _0x2c3b8b=_0x450650,_0x500f19={'unitId':_0x2f338d,'threadId':_0x44fe4a},_0xdf1f69=await this['_httpService'][_0x2c3b8b(0x100)](_0x2c3b8b(0x113)+_0x2f338d+_0x2c3b8b(0x119),{'body':_0x500f19}),_0x5eaadf=_0x44fe4a[_0x2c3b8b(0x133)](_0x20845b=>ee(_0xdf1f69[_0x2c3b8b(0x148)][_0x2c3b8b(0x139)][_0x20845b],_0x2f338d,_0x352087))[_0x2c3b8b(0x144)](Boolean);return Object[_0x2c3b8b(0x11a)](_0xdf1f69[_0x2c3b8b(0x148)][_0x2c3b8b(0x159)])[_0x2c3b8b(0x10d)](_0x15c1ef=>{const _0x54250a=_0x2c3b8b;this[_0x54250a(0x13f)][_0x54250a(0x114)](_0x15c1ef);}),_0x5eaadf;}[_0x450650(0x15c)](_0x24330d){const _0x2d459d=_0x450650;return{'id':_0x24330d['id'],'threadId':_0x24330d[_0x2d459d(0x102)],'ref':_0x24330d[_0x2d459d(0x120)]};}};S=Q([b(0x0,_0x4de773(_0x328679)),b(0x1,_0x4de773(_0x50853d)),b(0x2,_0x4de773(_0x4b7890))],S);var re=Object[_0x450650(0x12f)],te=(_0x57c3ab,_0x5f06a2,_0x524422,_0x10cf71)=>{const _0x13a432=_0x450650;for(var _0xb5c623=_0x10cf71>0x1?void 0x0:_0x10cf71?re(_0x5f06a2,_0x524422):_0x5f06a2,_0x2af6fe=_0x57c3ab[_0x13a432(0x130)]-0x1,_0x7dee2e;_0x2af6fe>=0x0;_0x2af6fe--)(_0x7dee2e=_0x57c3ab[_0x2af6fe])&&(_0xb5c623=_0x7dee2e(_0xb5c623)||_0xb5c623);return _0xb5c623;},M=(_0x3d7186,_0x2a9bc4)=>(_0x3f3dbb,_0x4ea6fc)=>_0x2a9bc4(_0x3f3dbb,_0x4ea6fc,_0x3d7186);let f=class extends _0x4222cc{constructor(_0x6b2eb6,_0x580aae){const _0x2fb173=_0x450650;super(),this['_threadCommentDataSourceService']=_0x6b2eb6,this[_0x2fb173(0x14f)]=_0x580aae,this[_0x2fb173(0x122)]();}[_0x450650(0x122)](){const _0x2c6eeb=_0x450650;this[_0x2c6eeb(0x149)][_0x2c6eeb(0x141)]=this[_0x2c6eeb(0x14f)],this['_threadCommentDataSourceService'][_0x2c6eeb(0x15a)]=!0x1;}};f=te([M(0x0,_0x2c32f7),M(0x1,_0x4de773(S))],f);function _0x1924(_0xc3c12b,_0x218da0){const _0x1a8ed4=_0x1a8e();return _0x1924=function(_0x1924ea,_0x1a3cec){_0x1924ea=_0x1924ea-0xff;let _0x238a45=_0x1a8ed4[_0x1924ea];return _0x238a45;},_0x1924(_0xc3c12b,_0x218da0);}var se=Object[_0x450650(0x160)],oe=Object[_0x450650(0x12f)],ne=(_0x1be323,_0xd3ead9,_0x194ad1)=>_0xd3ead9 in _0x1be323?se(_0x1be323,_0xd3ead9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x194ad1}):_0x1be323[_0xd3ead9]=_0x194ad1,ie=(_0x1e250a,_0x16ac86,_0x2006c7,_0x4e1784)=>{const _0x219979=_0x450650;for(var _0x3471cb=_0x4e1784>0x1?void 0x0:_0x4e1784?oe(_0x16ac86,_0x2006c7):_0x16ac86,_0x4956a5=_0x1e250a[_0x219979(0x130)]-0x1,_0x38ee77;_0x4956a5>=0x0;_0x4956a5--)(_0x38ee77=_0x1e250a[_0x4956a5])&&(_0x3471cb=_0x38ee77(_0x3471cb)||_0x3471cb);return _0x3471cb;},N=(_0x462216,_0xa44542)=>(_0x1fc42f,_0x2da45a)=>_0xa44542(_0x1fc42f,_0x2da45a,_0x462216),$=(_0x345592,_0x232bcc,_0xfb10dc)=>ne(_0x345592,typeof _0x232bcc!=_0x450650(0x117)?_0x232bcc+'':_0x232bcc,_0xfb10dc);let g=class extends _0x533345{constructor(_0x23c501=O,_0x394f2e,_0x5cff35){const _0x93059f=_0x450650;super(),this[_0x93059f(0x14a)]=_0x23c501,this[_0x93059f(0x145)]=_0x394f2e,this[_0x93059f(0x116)]=_0x5cff35;const {..._0x5aa076}=_0x326730({},O,this['_config']);this[_0x93059f(0x116)][_0x93059f(0x151)](z,_0x5aa076);}[_0x450650(0x136)](){const _0x50800c=_0x450650;[[S],[f],[_]][_0x50800c(0x10d)](_0x3d78b9=>{const _0x3c158c=_0x50800c;this[_0x3c158c(0x145)][_0x3c158c(0x13b)](_0x3d78b9);});}[_0x450650(0x10a)](){const _0x140853=_0x450650;this[_0x140853(0x145)][_0x140853(0x15d)](f),this[_0x140853(0x145)]['get'](_);}};$(g,'pluginName',W),$(g,_0x450650(0x12b),_0xb46a4b['UNIVER_UNKNOWN']),g=ie([_0x542ceb(_0x4e15a3,_0x46de07,_0x41bba8),N(0x1,_0x4de773(_0x202eaa)),N(0x2,_0x5c022a)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x338a3e=_0x5a1c;(function(_0x421eef,_0x21576a){const _0x155f51=_0x5a1c,_0x1f40ca=_0x421eef();while(!![]){try{const _0x7a0bbb=-parseInt(_0x155f51(0x10b))/0x1*(-parseInt(_0x155f51(0x100))/0x2)+parseInt(_0x155f51(0x11b))/0x3+parseInt(_0x155f51(0x111))/0x4*(-parseInt(_0x155f51(0x14a))/0x5)+parseInt(_0x155f51(0x13a))/0x6+-parseInt(_0x155f51(0x156))/0x7+parseInt(_0x155f51(0x122))/0x8*(parseInt(_0x155f51(0x146))/0x9)+-parseInt(_0x155f51(0x12c))/0xa;if(_0x7a0bbb===_0x21576a)break;else _0x1f40ca['push'](_0x1f40ca['shift']());}catch(_0x2934f6){_0x1f40ca['push'](_0x1f40ca['shift']());}}}(_0x5587,0x4a60c));import{CommentService as _0x1def95,CollaborationSessionService as _0x2e0b26,UniverCollaborationClientPlugin as _0x5f22af}from'@univerjs-pro/collaboration-client';function _0x5587(){const _0x1ed97f=['add','defineProperty','/delete','error','_threadCommentDataSourceService','saveCommentToSnapshot','UNIVER_UNKNOWN','symbol','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','requireSession','11ZMXMml','Reply','find','getUnit','get','dataSource','995772toOZkT','getOwnPropertyDescriptor','_config','Edit','post','users','/list','filter','comment','Delete','1028079AWGkrD','updateComment','_threadCommentModel','getComment','format','code','solved','8dHujXV','subscribe','_httpService','_initDataSource','slice','YYYY/MM/DD\x20HH:mm','pipe','userId','root','_initUserSync','5072660gWPFPJ','resolveComment','/add','content','unitId','length','listComments','rangeId','reply','commentUpdate$','_init','_configService','Solve','customRanges','920280DFVkgd','_sessionService','Add','delete','createTimestamp','replyId','user','type','onReady','resolved','/reply','pluginName','2690757eNPXGv','getUser','/universer-api/comment/unit/','addUser','5HIVOuH','userID','rangeType','threadId','addComment','Solved','_userService','map','parse','body','stringify','COMMENT','1820896gWeTNH','_injector','getMemberID','getCurrentUser','size','_threadCommentDataSource','forEach','OpenOrReOpen','setConfig','syncUpdateMutationToColla','parentId','deleteComment','_commentService','replies','UNRECOGNIZED','95626EdJvYz'];_0x5587=function(){return _0x1ed97f;};return _0x5587();}import{UniverLicensePlugin as _0x1fa237}from'@univerjs-pro/license';import{dayjs as _0x2e89bc,UserManagerService as _0x1fa847,Inject as _0x3dcfa0,Injector as _0xac405f,Disposable as _0x4d943a,CustomRangeType as _0x265937,UniverInstanceType as _0x2d50f1,DependentOn as _0x266507,IConfigService as _0x108d43,Plugin as _0xc515d7,merge as _0xaa02ee}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3d6cdd}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2cf2a9,IThreadCommentDataSourceService as _0x4cbc34}from'@univerjs/thread-comment';import{bufferTime as _0x4bb671}from'rxjs';import{HTTPService as _0x112d55}from'@univerjs/network';const W=_0x338a3e(0x109);var I=(_0x4500c7=>(_0x4500c7[_0x4500c7[_0x338a3e(0x15d)]=0x0]='OpenOrReOpen',_0x4500c7[_0x4500c7['Solved']=0x1]=_0x338a3e(0x14f),_0x4500c7[_0x4500c7[_0x338a3e(0xff)]=-0x1]=_0x338a3e(0xff),_0x4500c7))(I||{}),v=(_0x35e1fb=>(_0x35e1fb[_0x35e1fb['Unknown']=0x0]='Unknown',_0x35e1fb[_0x35e1fb[_0x338a3e(0x13c)]=0x1]=_0x338a3e(0x13c),_0x35e1fb[_0x35e1fb[_0x338a3e(0x10c)]=0x2]=_0x338a3e(0x10c),_0x35e1fb[_0x35e1fb[_0x338a3e(0x114)]=0x3]=_0x338a3e(0x114),_0x35e1fb[_0x35e1fb[_0x338a3e(0x11a)]=0x4]='Delete',_0x35e1fb[_0x35e1fb[_0x338a3e(0x138)]=0x5]=_0x338a3e(0x138),_0x35e1fb[_0x35e1fb[_0x338a3e(0xff)]=-0x1]=_0x338a3e(0xff),_0x35e1fb))(v||{});const y=_0x226e89=>_0x2e89bc(new Date(+_0x226e89))[_0x338a3e(0x11f)](_0x338a3e(0x127)),B=async(_0x378fa9,_0x142af3)=>{const _0x447adb=_0x338a3e,_0x182c3d=_0x378fa9[_0x447adb(0x10f)](_0x1fa847),_0x3c579b=_0x378fa9[_0x447adb(0x10f)](_0x112d55);_0x142af3[_0x447adb(0x15c)](_0x41b28e=>{const _0x5da1c3=_0x447adb;_0x182c3d[_0x5da1c3(0x147)](_0x41b28e)&&_0x142af3[_0x5da1c3(0x13d)](_0x41b28e);}),_0x142af3[_0x447adb(0x15a)]&&(await _0x3c579b['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x142af3]}}))['body'][_0x447adb(0x116)][_0x447adb(0x15c)](_0x56e572=>{const _0x56958b=_0x447adb;_0x56e572&&_0x182c3d[_0x56958b(0x149)](_0x56e572);});};var K=Object[_0x338a3e(0x112)],V=(_0x4f6e70,_0x1b3a77,_0x548a66,_0x26bec7)=>{const _0x114894=_0x338a3e;for(var _0x2dc9f9=_0x26bec7>0x1?void 0x0:_0x26bec7?K(_0x1b3a77,_0x548a66):_0x1b3a77,_0x23d12d=_0x4f6e70[_0x114894(0x131)]-0x1,_0x21d864;_0x23d12d>=0x0;_0x23d12d--)(_0x21d864=_0x4f6e70[_0x23d12d])&&(_0x2dc9f9=_0x21d864(_0x2dc9f9)||_0x2dc9f9);return _0x2dc9f9;},p=(_0x351c9a,_0x4ffbb4)=>(_0x21d346,_0x4064a0)=>_0x4ffbb4(_0x21d346,_0x4064a0,_0x351c9a);let _=class extends _0x4d943a{constructor(_0x297217,_0xf241f0,_0x16f3f2,_0x543ccf){const _0x15c834=_0x338a3e;super(),this[_0x15c834(0xfd)]=_0x297217,this[_0x15c834(0x11d)]=_0xf241f0,this['_userService']=_0x16f3f2,this['_injector']=_0x543ccf,this['_init'](),this[_0x15c834(0x12b)]();}[_0x338a3e(0x12b)](){const _0x82eccc=_0x338a3e;this['disposeWithMe'](this[_0x82eccc(0x11d)]['commentUpdate$'][_0x82eccc(0x128)](_0x4bb671(0x10))[_0x82eccc(0x123)](_0x56da90=>{const _0x5d7d54=_0x82eccc,_0x44e3ee=new Set();_0x56da90[_0x5d7d54(0x15c)](_0x538286=>{const _0x4fcb7e=_0x5d7d54;switch(_0x538286[_0x4fcb7e(0x141)]){case _0x4fcb7e(0x101):{const _0x1cbb31=_0x538286['payload']['personId'];_0x44e3ee[_0x4fcb7e(0x101)](_0x1cbb31);break;}}}),B(this['_injector'],_0x44e3ee);}));}[_0x338a3e(0x136)](){const _0xa4ead8=_0x338a3e;this['disposeWithMe'](this['_commentService'][_0xa4ead8(0x135)][_0xa4ead8(0x123)](async _0x3694f6=>{const _0xcd9c24=_0xa4ead8;var _0x1f5d51,_0x41643d,_0x15beaf,_0x40b714;const _0x3d802e=(_0x1f5d51=this[_0xcd9c24(0x11d)][_0xcd9c24(0x10e)](_0x3694f6[_0xcd9c24(0x130)])[_0xcd9c24(0x10d)](_0x25f61f=>_0x25f61f[_0xcd9c24(0x14d)]===_0x3694f6['threadId']))==null?void 0x0:_0x1f5d51[_0xcd9c24(0x12a)];if(!_0x3d802e)return;const {unitId:_0x1363a9,subUnitId:_0x42d716}=_0x3d802e;switch(_0x3694f6[_0xcd9c24(0x140)]&&this[_0xcd9c24(0x150)][_0xcd9c24(0x149)](_0x3694f6[_0xcd9c24(0x140)]),_0x3694f6['type']){case v['Add']:break;case v[_0xcd9c24(0x10c)]:{this[_0xcd9c24(0x11d)][_0xcd9c24(0x14e)](_0x1363a9,_0x42d716,{'unitId':_0x1363a9,'subUnitId':_0x42d716,'ref':'','id':_0x3694f6[_0xcd9c24(0x13f)],'dT':y(+_0x3694f6[_0xcd9c24(0x13e)]),'threadId':_0x3694f6[_0xcd9c24(0x14d)],'personId':(_0x15beaf=(_0x41643d=_0x3694f6['user'])==null?void 0x0:_0x41643d[_0xcd9c24(0x14b)])!=null?_0x15beaf:_0x3694f6[_0xcd9c24(0x129)],'text':JSON[_0xcd9c24(0x152)](_0x3694f6[_0xcd9c24(0x12f)]),'parentId':_0x3d802e['id']});break;}case v[_0xcd9c24(0x11a)]:{const _0x1224f1=this[_0xcd9c24(0x11d)][_0xcd9c24(0x11e)](_0x1363a9,_0x42d716,_0x3694f6[_0xcd9c24(0x13f)]);_0x1224f1&&_0x1224f1[_0xcd9c24(0xfb)]&&this[_0xcd9c24(0x11d)][_0xcd9c24(0xfc)](_0x1363a9,_0x42d716,_0x3694f6[_0xcd9c24(0x13f)]);break;}case v[_0xcd9c24(0x114)]:{this[_0xcd9c24(0x11d)][_0xcd9c24(0x11c)](_0x1363a9,_0x42d716,{'commentId':_0x3694f6['replyId'],'text':JSON[_0xcd9c24(0x152)](_0x3694f6[_0xcd9c24(0x12f)])});break;}case v[_0xcd9c24(0x138)]:{const _0x32af58=(_0x40b714=this[_0xcd9c24(0x11d)][_0xcd9c24(0x10e)](_0x3694f6[_0xcd9c24(0x130)])[_0xcd9c24(0x10d)](_0x5edea5=>_0x5edea5[_0xcd9c24(0x14d)]===_0x3694f6['threadId']))==null?void 0x0:_0x40b714[_0xcd9c24(0x12a)];_0x32af58&&this[_0xcd9c24(0x11d)]['resolveComment'](_0x1363a9,_0x42d716,_0x32af58['id'],_0x3694f6[_0xcd9c24(0x121)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x3dcfa0(_0x1def95)),p(0x1,_0x3dcfa0(_0x2cf2a9)),p(0x2,_0x3dcfa0(_0x1fa847)),p(0x3,_0x3dcfa0(_0xac405f))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x338a3e(0x112)],Q=(_0x5cffac,_0x9fdacf,_0x1fcf1f,_0x4ac5c6)=>{const _0x5d2aab=_0x338a3e;for(var _0x3ea5c6=_0x4ac5c6>0x1?void 0x0:_0x4ac5c6?k(_0x9fdacf,_0x1fcf1f):_0x9fdacf,_0x5a1a7d=_0x5cffac[_0x5d2aab(0x131)]-0x1,_0x4220eb;_0x5a1a7d>=0x0;_0x5a1a7d--)(_0x4220eb=_0x5cffac[_0x5a1a7d])&&(_0x3ea5c6=_0x4220eb(_0x3ea5c6)||_0x3ea5c6);return _0x3ea5c6;},b=(_0x9731cc,_0x4af6e8)=>(_0x510a8d,_0x2c6b36)=>_0x4af6e8(_0x510a8d,_0x2c6b36,_0x9731cc);function X(_0x2ccde8,_0x176d52){const _0x3a1a10=_0x338a3e,_0x19bf87=_0x2ccde8['replies'][0x0];return{..._0x176d52,'id':_0x19bf87[_0x3a1a10(0x13f)],'resolved':_0x2ccde8[_0x3a1a10(0x121)]===0x1,'dT':y(_0x19bf87[_0x3a1a10(0x13e)]),'personId':_0x19bf87[_0x3a1a10(0x129)],'threadId':_0x19bf87['threadId']};}function ee(_0x2a1ce0,_0x451b4b,_0x22e8dc){const _0x5e87f7=_0x338a3e;var _0x3777e1,_0x30a3dc;if(((_0x30a3dc=(_0x3777e1=_0x2a1ce0==null?void 0x0:_0x2a1ce0['replies'])==null?void 0x0:_0x3777e1[_0x5e87f7(0x131)])!=null?_0x30a3dc:0x0)>0x0){const _0x147947=(_0x4a85a1,_0x5bd59b)=>({'id':_0x4a85a1[_0x5e87f7(0x13f)],'threadId':_0x4a85a1['threadId'],'dT':y(_0x4a85a1[_0x5e87f7(0x13e)]),'personId':_0x4a85a1[_0x5e87f7(0x129)],'resolved':_0x2a1ce0['solved']===I[_0x5e87f7(0x14f)],'unitId':_0x451b4b,'subUnitId':_0x22e8dc,'text':JSON['parse'](_0x4a85a1[_0x5e87f7(0x12f)]),'parentId':_0x5bd59b}),_0x968d23=_0x147947(_0x2a1ce0[_0x5e87f7(0xfe)][0x0]);return{..._0x968d23,'children':_0x2a1ce0[_0x5e87f7(0xfe)][_0x5e87f7(0x126)](0x1)[_0x5e87f7(0x151)](_0x54641e=>_0x147947(_0x54641e,_0x968d23['id']))};}return null;}let S=class{constructor(_0x3e1357,_0x2ca5a6,_0x44dade){const _0x2f836e=_0x338a3e;this['_httpService']=_0x3e1357,this[_0x2f836e(0x150)]=_0x2ca5a6,this[_0x2f836e(0x13b)]=_0x44dade;}async[_0x338a3e(0x14e)](_0x5b06db){const _0xb5aa14=_0x338a3e;var _0x54f22d,_0x598e90;const {parentId:_0x40580b,unitId:_0x1bea6d,text:_0x8a6db2,threadId:_0x4781a4}=_0x5b06db,_0x4db24c=(_0x598e90=(_0x54f22d=_0x8a6db2['customRanges'])==null?void 0x0:_0x54f22d[_0xb5aa14(0x118)](_0x359dc5=>_0x359dc5['rangeType']===_0x265937[_0xb5aa14(0x155)])['map'](_0x1bf44b=>_0x1bf44b[_0xb5aa14(0x133)]))!=null?_0x598e90:[],_0x2a07ba=JSON[_0xb5aa14(0x154)](_0x8a6db2),_0x488f3c=(await this[_0xb5aa14(0x13b)][_0xb5aa14(0x10a)](_0x1bea6d))[_0xb5aa14(0x158)]();if(_0x40580b){const _0x381699={'memberId':_0x488f3c,'unitId':_0x1bea6d,'content':_0x2a07ba,'mention':_0x4db24c,'threadId':_0x4781a4},_0x5a780b=(await this['_httpService'][_0xb5aa14(0x115)]('/universer-api/comment/unit/'+_0x1bea6d+_0xb5aa14(0x144),{'body':_0x381699}))[_0xb5aa14(0x153)][_0xb5aa14(0x134)];return{..._0x5b06db,'id':_0x5a780b[_0xb5aa14(0x13f)],'dT':_0x2e89bc(+_0x5a780b[_0xb5aa14(0x13e)])[_0xb5aa14(0x11f)](_0xb5aa14(0x127)),'personId':_0x5a780b[_0xb5aa14(0x129)]};}else{const _0x4e65e3={'memberId':_0x488f3c,'unitId':_0x1bea6d,'content':_0x2a07ba,'mention':_0x4db24c},_0xb727bf=await this[_0xb5aa14(0x124)]['post']('/universer-api/comment/unit/'+_0x1bea6d+_0xb5aa14(0x12e),{'body':_0x4e65e3});return X(_0xb727bf[_0xb5aa14(0x153)][_0xb5aa14(0x119)],_0x5b06db);}}async[_0x338a3e(0x11c)](_0x14f34d){const _0x32c5d4=_0x338a3e;var _0x5df3a9,_0x506e1c;const {text:_0x49c043,unitId:_0x24b95f}=_0x14f34d,_0x42e7fa=(_0x506e1c=(_0x5df3a9=_0x49c043[_0x32c5d4(0x139)])==null?void 0x0:_0x5df3a9[_0x32c5d4(0x118)](_0x418b2d=>_0x418b2d[_0x32c5d4(0x14c)]===_0x265937[_0x32c5d4(0x155)])[_0x32c5d4(0x151)](_0x4c4660=>_0x4c4660['rangeId']))!=null?_0x506e1c:[],_0x4fe81d=JSON['stringify'](_0x49c043),_0x5e7004=_0x14f34d[_0x32c5d4(0x14d)],_0x337074=_0x14f34d['id'],_0x56bedd={'memberId':(await this[_0x32c5d4(0x13b)]['requireSession'](_0x24b95f))[_0x32c5d4(0x158)](),'unitId':_0x24b95f,'threadId':_0x5e7004,'mention':_0x42e7fa,'content':_0x4fe81d,'replyId':_0x337074},_0x1dbc8e=await this[_0x32c5d4(0x124)][_0x32c5d4(0x115)]('/universer-api/comment/unit/'+_0x24b95f+'/edit',{'body':_0x56bedd});return!_0x1dbc8e['body'][_0x32c5d4(0x104)]||_0x1dbc8e['body'][_0x32c5d4(0x104)][_0x32c5d4(0x120)]===0x1;}async[_0x338a3e(0x12d)](_0x3382c9){const _0x150cc7=_0x338a3e,{unitId:_0x141cbe}=_0x3382c9,_0x334650=_0x3382c9['threadId'],_0x104119={'memberId':this['_userService'][_0x150cc7(0x159)]()[_0x150cc7(0x14b)],'unitId':_0x141cbe,'threadId':_0x334650,'solved':_0x3382c9[_0x150cc7(0x143)]?I[_0x150cc7(0x14f)]:I[_0x150cc7(0x15d)]},_0x64487c=await this[_0x150cc7(0x124)][_0x150cc7(0x115)]('/universer-api/comment/unit/'+_0x141cbe+'/solved',{'body':_0x104119});return!_0x64487c['body'][_0x150cc7(0x104)]||_0x64487c[_0x150cc7(0x153)][_0x150cc7(0x104)]['code']===0x1;}async['deleteComment'](_0x536d8b,_0x3b1700,_0x2d620a,_0x489a84){const _0x451505=_0x338a3e,_0x4bda8c={'memberId':(await this[_0x451505(0x13b)][_0x451505(0x10a)](_0x536d8b))[_0x451505(0x158)](),'threadId':_0x2d620a,'replyId':_0x489a84,'unitId':_0x536d8b},_0x38a2b3=await this[_0x451505(0x124)][_0x451505(0x115)](_0x451505(0x148)+_0x536d8b+_0x451505(0x103),{'body':_0x4bda8c});return!_0x38a2b3[_0x451505(0x153)][_0x451505(0x104)]||_0x38a2b3[_0x451505(0x153)]['error']['code']===0x1;}async[_0x338a3e(0x132)](_0x1c8cac,_0x5481b0,_0x831ede){const _0x5f4a19=_0x338a3e,_0x10092c={'unitId':_0x1c8cac,'threadId':_0x831ede},_0x157b19=await this[_0x5f4a19(0x124)][_0x5f4a19(0x115)](_0x5f4a19(0x148)+_0x1c8cac+_0x5f4a19(0x117),{'body':_0x10092c}),_0x46485d=_0x831ede[_0x5f4a19(0x151)](_0x132065=>ee(_0x157b19['body']['comments'][_0x132065],_0x1c8cac,_0x5481b0))[_0x5f4a19(0x118)](Boolean);return Object['values'](_0x157b19['body']['users'])[_0x5f4a19(0x15c)](_0x211611=>{const _0x4d090c=_0x5f4a19;this[_0x4d090c(0x150)][_0x4d090c(0x149)](_0x211611);}),_0x46485d;}[_0x338a3e(0x106)](_0x212752){return{'id':_0x212752['id'],'threadId':_0x212752['threadId'],'ref':_0x212752['ref']};}};S=Q([b(0x0,_0x3dcfa0(_0x112d55)),b(0x1,_0x3dcfa0(_0x1fa847)),b(0x2,_0x3dcfa0(_0x2e0b26))],S);var re=Object[_0x338a3e(0x112)],te=(_0x18f331,_0x795dbf,_0x3e4002,_0x33eb0f)=>{const _0x35834a=_0x338a3e;for(var _0x51100e=_0x33eb0f>0x1?void 0x0:_0x33eb0f?re(_0x795dbf,_0x3e4002):_0x795dbf,_0x5e9855=_0x18f331[_0x35834a(0x131)]-0x1,_0x5aba81;_0x5e9855>=0x0;_0x5e9855--)(_0x5aba81=_0x18f331[_0x5e9855])&&(_0x51100e=_0x5aba81(_0x51100e)||_0x51100e);return _0x51100e;},M=(_0x918176,_0x219454)=>(_0x244624,_0x48c445)=>_0x219454(_0x244624,_0x48c445,_0x918176);let f=class extends _0x4d943a{constructor(_0x2a873,_0x1a6cad){const _0x397510=_0x338a3e;super(),this[_0x397510(0x105)]=_0x2a873,this[_0x397510(0x15b)]=_0x1a6cad,this[_0x397510(0x125)]();}['_initDataSource'](){const _0xa8573=_0x338a3e;this[_0xa8573(0x105)][_0xa8573(0x110)]=this[_0xa8573(0x15b)],this[_0xa8573(0x105)][_0xa8573(0xfa)]=!0x1;}};f=te([M(0x0,_0x4cbc34),M(0x1,_0x3dcfa0(S))],f);var se=Object[_0x338a3e(0x102)],oe=Object[_0x338a3e(0x112)],ne=(_0x181a5a,_0x7a7a70,_0x5cbeb5)=>_0x7a7a70 in _0x181a5a?se(_0x181a5a,_0x7a7a70,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5cbeb5}):_0x181a5a[_0x7a7a70]=_0x5cbeb5,ie=(_0x328dfb,_0x5df7d7,_0x2b461b,_0x477789)=>{const _0x375b10=_0x338a3e;for(var _0x45ddc3=_0x477789>0x1?void 0x0:_0x477789?oe(_0x5df7d7,_0x2b461b):_0x5df7d7,_0x42a7c5=_0x328dfb[_0x375b10(0x131)]-0x1,_0x12e377;_0x42a7c5>=0x0;_0x42a7c5--)(_0x12e377=_0x328dfb[_0x42a7c5])&&(_0x45ddc3=_0x12e377(_0x45ddc3)||_0x45ddc3);return _0x45ddc3;},N=(_0x1dffd5,_0x13cbd7)=>(_0x352a40,_0x2a90f9)=>_0x13cbd7(_0x352a40,_0x2a90f9,_0x1dffd5),$=(_0x3a438f,_0x9d9e30,_0x155efe)=>ne(_0x3a438f,typeof _0x9d9e30!=_0x338a3e(0x108)?_0x9d9e30+'':_0x9d9e30,_0x155efe);let g=class extends _0xc515d7{constructor(_0x44dd69=O,_0x9b157c,_0x3d048f){const _0xabcd55=_0x338a3e;super(),this[_0xabcd55(0x113)]=_0x44dd69,this[_0xabcd55(0x157)]=_0x9b157c,this['_configService']=_0x3d048f;const {..._0x4cb607}=_0xaa02ee({},O,this['_config']);this[_0xabcd55(0x137)][_0xabcd55(0x15e)](z,_0x4cb607);}['onStarting'](){const _0x26d32d=_0x338a3e;[[S],[f],[_]][_0x26d32d(0x15c)](_0x361d75=>{const _0x5b897a=_0x26d32d;this[_0x5b897a(0x157)][_0x5b897a(0x101)](_0x361d75);});}[_0x338a3e(0x142)](){const _0x48806f=_0x338a3e;this['_injector'][_0x48806f(0x10f)](f),this[_0x48806f(0x157)][_0x48806f(0x10f)](_);}};function _0x5a1c(_0x3f2a5f,_0x50d58e){const _0x5587d2=_0x5587();return _0x5a1c=function(_0x5a1c5f,_0x46e39a){_0x5a1c5f=_0x5a1c5f-0xfa;let _0xdaf486=_0x5587d2[_0x5a1c5f];return _0xdaf486;},_0x5a1c(_0x3f2a5f,_0x50d58e);}$(g,_0x338a3e(0x145),W),$(g,_0x338a3e(0x141),_0x2d50f1[_0x338a3e(0x107)]),g=ie([_0x266507(_0x3d6cdd,_0x5f22af,_0x1fa237),N(0x1,_0x3dcfa0(_0xac405f)),N(0x2,_0x108d43)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x450650=_0x1924;(function(_0x38d6eb,_0x19fe4c){const _0x5de90c=_0x1924,_0x5b6db2=_0x38d6eb();while(!![]){try{const _0x328a8b=-parseInt(_0x5de90c(0x140))/0x1+parseInt(_0x5de90c(0x13d))/0x2+parseInt(_0x5de90c(0x115))/0x3+-parseInt(_0x5de90c(0x109))/0x4+-parseInt(_0x5de90c(0x108))/0x5*(parseInt(_0x5de90c(0x10f))/0x6)+parseInt(_0x5de90c(0x13e))/0x7+parseInt(_0x5de90c(0x12a))/0x8*(parseInt(_0x5de90c(0xff))/0x9);if(_0x328a8b===_0x19fe4c)break;else _0x5b6db2['push'](_0x5b6db2['shift']());}catch(_0x504658){_0x5b6db2['push'](_0x5b6db2['shift']());}}}(_0x1a8e,0xb5cb2));import{CommentService as _0x4899ac,CollaborationSessionService as _0x4b7890,UniverCollaborationClientPlugin as _0x46de07}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x41bba8}from'@univerjs-pro/license';import{dayjs as _0x37a29a,UserManagerService as _0x50853d,Inject as _0x4de773,Injector as _0x202eaa,Disposable as _0x4222cc,CustomRangeType as _0x569be7,UniverInstanceType as _0xb46a4b,DependentOn as _0x542ceb,IConfigService as _0x5c022a,Plugin as _0x533345,merge as _0x326730}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4e15a3}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4cd4a3,IThreadCommentDataSourceService as _0x2c32f7}from'@univerjs/thread-comment';import{bufferTime as _0x11b7ff}from'rxjs';import{HTTPService as _0x328679}from'@univerjs/network';const W=_0x450650(0x156);var I=(_0x44c82c=>(_0x44c82c[_0x44c82c[_0x450650(0x11b)]=0x0]='OpenOrReOpen',_0x44c82c[_0x44c82c['Solved']=0x1]='Solved',_0x44c82c[_0x44c82c[_0x450650(0x14b)]=-0x1]=_0x450650(0x14b),_0x44c82c))(I||{}),v=(_0x590116=>(_0x590116[_0x590116['Unknown']=0x0]=_0x450650(0x152),_0x590116[_0x590116[_0x450650(0x107)]=0x1]=_0x450650(0x107),_0x590116[_0x590116[_0x450650(0x138)]=0x2]='Reply',_0x590116[_0x590116[_0x450650(0x126)]=0x3]='Edit',_0x590116[_0x590116[_0x450650(0x12c)]=0x4]=_0x450650(0x12c),_0x590116[_0x590116[_0x450650(0x134)]=0x5]=_0x450650(0x134),_0x590116[_0x590116[_0x450650(0x14b)]=-0x1]='UNRECOGNIZED',_0x590116))(v||{});const y=_0x37f553=>_0x37a29a(new Date(+_0x37f553))[_0x450650(0x154)](_0x450650(0x12d)),B=async(_0x2b0a42,_0x105b1c)=>{const _0x343fb0=_0x450650,_0x3f89cf=_0x2b0a42[_0x343fb0(0x15d)](_0x50853d),_0x56af5f=_0x2b0a42['get'](_0x328679);_0x105b1c[_0x343fb0(0x10d)](_0x5e2cff=>{const _0x1af291=_0x343fb0;_0x3f89cf[_0x1af291(0x10b)](_0x5e2cff)&&_0x105b1c['delete'](_0x5e2cff);}),_0x105b1c[_0x343fb0(0x11d)]&&(await _0x56af5f['get'](_0x343fb0(0x147),{'params':{'userIDs':[..._0x105b1c]}}))['body'][_0x343fb0(0x159)][_0x343fb0(0x10d)](_0x2c2f86=>{const _0x412c84=_0x343fb0;_0x2c2f86&&_0x3f89cf[_0x412c84(0x114)](_0x2c2f86);});};var K=Object[_0x450650(0x12f)],V=(_0x33efb4,_0x2cf513,_0x332bf3,_0x3eef2a)=>{const _0x18a9b4=_0x450650;for(var _0x29a0fa=_0x3eef2a>0x1?void 0x0:_0x3eef2a?K(_0x2cf513,_0x332bf3):_0x2cf513,_0x3a6492=_0x33efb4[_0x18a9b4(0x130)]-0x1,_0xf52b28;_0x3a6492>=0x0;_0x3a6492--)(_0xf52b28=_0x33efb4[_0x3a6492])&&(_0x29a0fa=_0xf52b28(_0x29a0fa)||_0x29a0fa);return _0x29a0fa;},p=(_0x521a2c,_0x36d664)=>(_0x1a7769,_0x2f2d6f)=>_0x36d664(_0x1a7769,_0x2f2d6f,_0x521a2c);let _=class extends _0x4222cc{constructor(_0x324abf,_0x401363,_0x1cdd56,_0x1bf407){const _0x232274=_0x450650;super(),this[_0x232274(0x129)]=_0x324abf,this[_0x232274(0x112)]=_0x401363,this['_userService']=_0x1cdd56,this[_0x232274(0x145)]=_0x1bf407,this[_0x232274(0x10e)](),this[_0x232274(0x13c)]();}[_0x450650(0x13c)](){const _0x117061=_0x450650;this[_0x117061(0x15b)](this[_0x117061(0x112)]['commentUpdate$'][_0x117061(0x142)](_0x11b7ff(0x10))[_0x117061(0x150)](_0x52703e=>{const _0xd28a4f=_0x117061,_0x3e0999=new Set();_0x52703e[_0xd28a4f(0x10d)](_0x384e79=>{const _0x473079=_0xd28a4f;switch(_0x384e79[_0x473079(0x12b)]){case _0x473079(0x13b):{const _0x45583c=_0x384e79['payload']['personId'];_0x3e0999['add'](_0x45583c);break;}}}),B(this['_injector'],_0x3e0999);}));}[_0x450650(0x10e)](){const _0x2c900d=_0x450650;this[_0x2c900d(0x15b)](this[_0x2c900d(0x129)][_0x2c900d(0x118)][_0x2c900d(0x150)](async _0x2d4ab2=>{const _0x3f6f2a=_0x2c900d;var _0x5433ce,_0x39f5d9,_0x34d0e3,_0xa26bd8;const _0x237772=(_0x5433ce=this[_0x3f6f2a(0x112)][_0x3f6f2a(0x11e)](_0x2d4ab2[_0x3f6f2a(0x146)])[_0x3f6f2a(0x111)](_0x2cf1ad=>_0x2cf1ad[_0x3f6f2a(0x102)]===_0x2d4ab2[_0x3f6f2a(0x102)]))==null?void 0x0:_0x5433ce[_0x3f6f2a(0x132)];if(!_0x237772)return;const {unitId:_0x2b0aa3,subUnitId:_0x1e8ca8}=_0x237772;switch(_0x2d4ab2[_0x3f6f2a(0x14e)]&&this['_userService'][_0x3f6f2a(0x114)](_0x2d4ab2[_0x3f6f2a(0x14e)]),_0x2d4ab2[_0x3f6f2a(0x12b)]){case v[_0x3f6f2a(0x107)]:break;case v['Reply']:{this['_threadCommentModel'][_0x3f6f2a(0x131)](_0x2b0aa3,_0x1e8ca8,{'unitId':_0x2b0aa3,'subUnitId':_0x1e8ca8,'ref':'','id':_0x2d4ab2[_0x3f6f2a(0x121)],'dT':y(+_0x2d4ab2['createTimestamp']),'threadId':_0x2d4ab2[_0x3f6f2a(0x102)],'personId':(_0x34d0e3=(_0x39f5d9=_0x2d4ab2[_0x3f6f2a(0x14e)])==null?void 0x0:_0x39f5d9[_0x3f6f2a(0x15e)])!=null?_0x34d0e3:_0x2d4ab2[_0x3f6f2a(0x155)],'text':JSON[_0x3f6f2a(0x162)](_0x2d4ab2['content']),'parentId':_0x237772['id']});break;}case v['Delete']:{const _0x38ab8a=this[_0x3f6f2a(0x112)][_0x3f6f2a(0x135)](_0x2b0aa3,_0x1e8ca8,_0x2d4ab2[_0x3f6f2a(0x121)]);_0x38ab8a&&_0x38ab8a['parentId']&&this[_0x3f6f2a(0x112)][_0x3f6f2a(0x128)](_0x2b0aa3,_0x1e8ca8,_0x2d4ab2[_0x3f6f2a(0x121)]);break;}case v[_0x3f6f2a(0x126)]:{this['_threadCommentModel']['updateComment'](_0x2b0aa3,_0x1e8ca8,{'commentId':_0x2d4ab2[_0x3f6f2a(0x121)],'text':JSON[_0x3f6f2a(0x162)](_0x2d4ab2[_0x3f6f2a(0x10c)])});break;}case v[_0x3f6f2a(0x134)]:{const _0x3c4d5b=(_0xa26bd8=this[_0x3f6f2a(0x112)]['getUnit'](_0x2d4ab2[_0x3f6f2a(0x146)])[_0x3f6f2a(0x111)](_0x3d6d1c=>_0x3d6d1c[_0x3f6f2a(0x102)]===_0x2d4ab2[_0x3f6f2a(0x102)]))==null?void 0x0:_0xa26bd8['root'];_0x3c4d5b&&this[_0x3f6f2a(0x112)]['resolveComment'](_0x2b0aa3,_0x1e8ca8,_0x3c4d5b['id'],_0x2d4ab2[_0x3f6f2a(0x157)]===I[_0x3f6f2a(0x110)]);break;}}}));}};_=V([p(0x0,_0x4de773(_0x4899ac)),p(0x1,_0x4de773(_0x4cd4a3)),p(0x2,_0x4de773(_0x50853d)),p(0x3,_0x4de773(_0x202eaa))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x450650(0x12f)],Q=(_0x4ddc77,_0x6098fb,_0x108dc2,_0x172c81)=>{const _0x133127=_0x450650;for(var _0x28a051=_0x172c81>0x1?void 0x0:_0x172c81?k(_0x6098fb,_0x108dc2):_0x6098fb,_0x1a2f8c=_0x4ddc77[_0x133127(0x130)]-0x1,_0x1b7ed2;_0x1a2f8c>=0x0;_0x1a2f8c--)(_0x1b7ed2=_0x4ddc77[_0x1a2f8c])&&(_0x28a051=_0x1b7ed2(_0x28a051)||_0x28a051);return _0x28a051;},b=(_0x2ee30c,_0x5c5d1c)=>(_0x3ad1d1,_0x1e6fc5)=>_0x5c5d1c(_0x3ad1d1,_0x1e6fc5,_0x2ee30c);function X(_0x4bf659,_0x311a27){const _0xc0a75b=_0x450650,_0x269da6=_0x4bf659['replies'][0x0];return{..._0x311a27,'id':_0x269da6[_0xc0a75b(0x121)],'resolved':_0x4bf659[_0xc0a75b(0x157)]===0x1,'dT':y(_0x269da6[_0xc0a75b(0x14d)]),'personId':_0x269da6[_0xc0a75b(0x155)],'threadId':_0x269da6[_0xc0a75b(0x102)]};}function ee(_0x2cba06,_0x5bc8bb,_0x2e0927){const _0x2a95ef=_0x450650;var _0x59c3fd,_0x3899ae;if(((_0x3899ae=(_0x59c3fd=_0x2cba06==null?void 0x0:_0x2cba06[_0x2a95ef(0x14c)])==null?void 0x0:_0x59c3fd['length'])!=null?_0x3899ae:0x0)>0x0){const _0x27e5d6=(_0x5a56c1,_0x51317f)=>({'id':_0x5a56c1[_0x2a95ef(0x121)],'threadId':_0x5a56c1[_0x2a95ef(0x102)],'dT':y(_0x5a56c1[_0x2a95ef(0x14d)]),'personId':_0x5a56c1[_0x2a95ef(0x155)],'resolved':_0x2cba06[_0x2a95ef(0x157)]===I['Solved'],'unitId':_0x5bc8bb,'subUnitId':_0x2e0927,'text':JSON[_0x2a95ef(0x162)](_0x5a56c1[_0x2a95ef(0x10c)]),'parentId':_0x51317f}),_0x5377a8=_0x27e5d6(_0x2cba06[_0x2a95ef(0x14c)][0x0]);return{..._0x5377a8,'children':_0x2cba06[_0x2a95ef(0x14c)][_0x2a95ef(0x143)](0x1)['map'](_0x5c3cd6=>_0x27e5d6(_0x5c3cd6,_0x5377a8['id']))};}return null;}function _0x1a8e(){const _0x3fd8dc=['code','Reply','comments','getMemberID','add','_initUserSync','1747996QwjSau','3650745YxwvFK','_userService','858119KAoNwk','dataSource','pipe','slice','filter','_injector','unitId','/universer-api/user/list','body','_threadCommentDataSourceService','_config','UNRECOGNIZED','replies','createTimestamp','user','_threadCommentDataSource','subscribe','setConfig','Unknown','error','format','userId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','COMMENT','users','syncUpdateMutationToColla','disposeWithMe','saveCommentToSnapshot','get','userID','_httpService','defineProperty','/reply','parse','5422104fqQprz','post','stringify','threadId','_sessionService','listComments','comment','/delete','Add','85epRCQh','2813356FJhUba','onReady','getUser','content','forEach','_init','295494AmpJjn','Solved','find','_threadCommentModel','/universer-api/comment/unit/','addUser','1628616yHAmUA','_configService','symbol','commentUpdate$','/list','values','OpenOrReOpen','/solved','size','getUnit','rangeId','ref','replyId','_initDataSource','customRanges','rangeType','resolveComment','Edit','requireSession','deleteComment','_commentService','16wXlDWw','type','Delete','YYYY/MM/DD\x20HH:mm','resolved','getOwnPropertyDescriptor','length','addComment','root','map','Solve','getComment','onStarting'];_0x1a8e=function(){return _0x3fd8dc;};return _0x1a8e();}let S=class{constructor(_0x238068,_0x177cfc,_0x148a5e){const _0x47d2bc=_0x450650;this['_httpService']=_0x238068,this['_userService']=_0x177cfc,this[_0x47d2bc(0x103)]=_0x148a5e;}async[_0x450650(0x131)](_0x3ba58f){const _0x574128=_0x450650;var _0x5aca7f,_0x7f726e;const {parentId:_0x4b6b8f,unitId:_0x4283ce,text:_0x48d656,threadId:_0x40c46c}=_0x3ba58f,_0x4cd983=(_0x7f726e=(_0x5aca7f=_0x48d656[_0x574128(0x123)])==null?void 0x0:_0x5aca7f[_0x574128(0x144)](_0x43d1b2=>_0x43d1b2[_0x574128(0x124)]===_0x569be7[_0x574128(0x158)])[_0x574128(0x133)](_0x20c471=>_0x20c471[_0x574128(0x11f)]))!=null?_0x7f726e:[],_0x51d695=JSON[_0x574128(0x101)](_0x48d656),_0x396279=(await this[_0x574128(0x103)][_0x574128(0x127)](_0x4283ce))['getMemberID']();if(_0x4b6b8f){const _0x5e4e5d={'memberId':_0x396279,'unitId':_0x4283ce,'content':_0x51d695,'mention':_0x4cd983,'threadId':_0x40c46c},_0x2d4faf=(await this['_httpService'][_0x574128(0x100)]('/universer-api/comment/unit/'+_0x4283ce+_0x574128(0x161),{'body':_0x5e4e5d}))[_0x574128(0x148)]['reply'];return{..._0x3ba58f,'id':_0x2d4faf['replyId'],'dT':_0x37a29a(+_0x2d4faf[_0x574128(0x14d)])['format'](_0x574128(0x12d)),'personId':_0x2d4faf['userId']};}else{const _0x581101={'memberId':_0x396279,'unitId':_0x4283ce,'content':_0x51d695,'mention':_0x4cd983},_0x184f58=await this[_0x574128(0x15f)][_0x574128(0x100)](_0x574128(0x113)+_0x4283ce+'/add',{'body':_0x581101});return X(_0x184f58['body'][_0x574128(0x105)],_0x3ba58f);}}async['updateComment'](_0x459dbb){const _0x276da0=_0x450650;var _0x573eac,_0x3193d7;const {text:_0x116c6c,unitId:_0x1e4eeb}=_0x459dbb,_0x3d4331=(_0x3193d7=(_0x573eac=_0x116c6c[_0x276da0(0x123)])==null?void 0x0:_0x573eac[_0x276da0(0x144)](_0x13cea7=>_0x13cea7['rangeType']===_0x569be7['COMMENT'])[_0x276da0(0x133)](_0x46874e=>_0x46874e[_0x276da0(0x11f)]))!=null?_0x3193d7:[],_0x4ee99e=JSON[_0x276da0(0x101)](_0x116c6c),_0x3b0949=_0x459dbb[_0x276da0(0x102)],_0x276211=_0x459dbb['id'],_0x28cd66={'memberId':(await this[_0x276da0(0x103)][_0x276da0(0x127)](_0x1e4eeb))[_0x276da0(0x13a)](),'unitId':_0x1e4eeb,'threadId':_0x3b0949,'mention':_0x3d4331,'content':_0x4ee99e,'replyId':_0x276211},_0x307bb4=await this[_0x276da0(0x15f)][_0x276da0(0x100)](_0x276da0(0x113)+_0x1e4eeb+'/edit',{'body':_0x28cd66});return!_0x307bb4[_0x276da0(0x148)][_0x276da0(0x153)]||_0x307bb4[_0x276da0(0x148)][_0x276da0(0x153)][_0x276da0(0x137)]===0x1;}async[_0x450650(0x125)](_0x5dc3ce){const _0xea7d8=_0x450650,{unitId:_0x27781b}=_0x5dc3ce,_0x57664f=_0x5dc3ce[_0xea7d8(0x102)],_0x419d92={'memberId':this[_0xea7d8(0x13f)]['getCurrentUser']()[_0xea7d8(0x15e)],'unitId':_0x27781b,'threadId':_0x57664f,'solved':_0x5dc3ce[_0xea7d8(0x12e)]?I[_0xea7d8(0x110)]:I[_0xea7d8(0x11b)]},_0x2798d7=await this[_0xea7d8(0x15f)]['post']('/universer-api/comment/unit/'+_0x27781b+_0xea7d8(0x11c),{'body':_0x419d92});return!_0x2798d7[_0xea7d8(0x148)][_0xea7d8(0x153)]||_0x2798d7['body']['error'][_0xea7d8(0x137)]===0x1;}async['deleteComment'](_0x2597bf,_0x25a58f,_0x5db11d,_0x258215){const _0x347b35=_0x450650,_0x4b0ca0={'memberId':(await this[_0x347b35(0x103)]['requireSession'](_0x2597bf))[_0x347b35(0x13a)](),'threadId':_0x5db11d,'replyId':_0x258215,'unitId':_0x2597bf},_0x4e0269=await this[_0x347b35(0x15f)]['post'](_0x347b35(0x113)+_0x2597bf+_0x347b35(0x106),{'body':_0x4b0ca0});return!_0x4e0269[_0x347b35(0x148)][_0x347b35(0x153)]||_0x4e0269['body'][_0x347b35(0x153)][_0x347b35(0x137)]===0x1;}async[_0x450650(0x104)](_0x2f338d,_0x352087,_0x44fe4a){const _0x2c3b8b=_0x450650,_0x500f19={'unitId':_0x2f338d,'threadId':_0x44fe4a},_0xdf1f69=await this['_httpService'][_0x2c3b8b(0x100)](_0x2c3b8b(0x113)+_0x2f338d+_0x2c3b8b(0x119),{'body':_0x500f19}),_0x5eaadf=_0x44fe4a[_0x2c3b8b(0x133)](_0x20845b=>ee(_0xdf1f69[_0x2c3b8b(0x148)][_0x2c3b8b(0x139)][_0x20845b],_0x2f338d,_0x352087))[_0x2c3b8b(0x144)](Boolean);return Object[_0x2c3b8b(0x11a)](_0xdf1f69[_0x2c3b8b(0x148)][_0x2c3b8b(0x159)])[_0x2c3b8b(0x10d)](_0x15c1ef=>{const _0x54250a=_0x2c3b8b;this[_0x54250a(0x13f)][_0x54250a(0x114)](_0x15c1ef);}),_0x5eaadf;}[_0x450650(0x15c)](_0x24330d){const _0x2d459d=_0x450650;return{'id':_0x24330d['id'],'threadId':_0x24330d[_0x2d459d(0x102)],'ref':_0x24330d[_0x2d459d(0x120)]};}};S=Q([b(0x0,_0x4de773(_0x328679)),b(0x1,_0x4de773(_0x50853d)),b(0x2,_0x4de773(_0x4b7890))],S);var re=Object[_0x450650(0x12f)],te=(_0x57c3ab,_0x5f06a2,_0x524422,_0x10cf71)=>{const _0x13a432=_0x450650;for(var _0xb5c623=_0x10cf71>0x1?void 0x0:_0x10cf71?re(_0x5f06a2,_0x524422):_0x5f06a2,_0x2af6fe=_0x57c3ab[_0x13a432(0x130)]-0x1,_0x7dee2e;_0x2af6fe>=0x0;_0x2af6fe--)(_0x7dee2e=_0x57c3ab[_0x2af6fe])&&(_0xb5c623=_0x7dee2e(_0xb5c623)||_0xb5c623);return _0xb5c623;},M=(_0x3d7186,_0x2a9bc4)=>(_0x3f3dbb,_0x4ea6fc)=>_0x2a9bc4(_0x3f3dbb,_0x4ea6fc,_0x3d7186);let f=class extends _0x4222cc{constructor(_0x6b2eb6,_0x580aae){const _0x2fb173=_0x450650;super(),this['_threadCommentDataSourceService']=_0x6b2eb6,this[_0x2fb173(0x14f)]=_0x580aae,this[_0x2fb173(0x122)]();}[_0x450650(0x122)](){const _0x2c6eeb=_0x450650;this[_0x2c6eeb(0x149)][_0x2c6eeb(0x141)]=this[_0x2c6eeb(0x14f)],this['_threadCommentDataSourceService'][_0x2c6eeb(0x15a)]=!0x1;}};f=te([M(0x0,_0x2c32f7),M(0x1,_0x4de773(S))],f);function _0x1924(_0xc3c12b,_0x218da0){const _0x1a8ed4=_0x1a8e();return _0x1924=function(_0x1924ea,_0x1a3cec){_0x1924ea=_0x1924ea-0xff;let _0x238a45=_0x1a8ed4[_0x1924ea];return _0x238a45;},_0x1924(_0xc3c12b,_0x218da0);}var se=Object[_0x450650(0x160)],oe=Object[_0x450650(0x12f)],ne=(_0x1be323,_0xd3ead9,_0x194ad1)=>_0xd3ead9 in _0x1be323?se(_0x1be323,_0xd3ead9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x194ad1}):_0x1be323[_0xd3ead9]=_0x194ad1,ie=(_0x1e250a,_0x16ac86,_0x2006c7,_0x4e1784)=>{const _0x219979=_0x450650;for(var _0x3471cb=_0x4e1784>0x1?void 0x0:_0x4e1784?oe(_0x16ac86,_0x2006c7):_0x16ac86,_0x4956a5=_0x1e250a[_0x219979(0x130)]-0x1,_0x38ee77;_0x4956a5>=0x0;_0x4956a5--)(_0x38ee77=_0x1e250a[_0x4956a5])&&(_0x3471cb=_0x38ee77(_0x3471cb)||_0x3471cb);return _0x3471cb;},N=(_0x462216,_0xa44542)=>(_0x1fc42f,_0x2da45a)=>_0xa44542(_0x1fc42f,_0x2da45a,_0x462216),$=(_0x345592,_0x232bcc,_0xfb10dc)=>ne(_0x345592,typeof _0x232bcc!=_0x450650(0x117)?_0x232bcc+'':_0x232bcc,_0xfb10dc);let g=class extends _0x533345{constructor(_0x23c501=O,_0x394f2e,_0x5cff35){const _0x93059f=_0x450650;super(),this[_0x93059f(0x14a)]=_0x23c501,this[_0x93059f(0x145)]=_0x394f2e,this[_0x93059f(0x116)]=_0x5cff35;const {..._0x5aa076}=_0x326730({},O,this['_config']);this[_0x93059f(0x116)][_0x93059f(0x151)](z,_0x5aa076);}[_0x450650(0x136)](){const _0x50800c=_0x450650;[[S],[f],[_]][_0x50800c(0x10d)](_0x3d78b9=>{const _0x3c158c=_0x50800c;this[_0x3c158c(0x145)][_0x3c158c(0x13b)](_0x3d78b9);});}[_0x450650(0x10a)](){const _0x140853=_0x450650;this[_0x140853(0x145)][_0x140853(0x15d)](f),this[_0x140853(0x145)]['get'](_);}};$(g,'pluginName',W),$(g,_0x450650(0x12b),_0xb46a4b['UNIVER_UNKNOWN']),g=ie([_0x542ceb(_0x4e15a3,_0x46de07,_0x41bba8),N(0x1,_0x4de773(_0x202eaa)),N(0x2,_0x5c022a)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x338a3e=_0x5a1c;(function(_0x421eef,_0x21576a){const _0x155f51=_0x5a1c,_0x1f40ca=_0x421eef();while(!![]){try{const _0x7a0bbb=-parseInt(_0x155f51(0x10b))/0x1*(-parseInt(_0x155f51(0x100))/0x2)+parseInt(_0x155f51(0x11b))/0x3+parseInt(_0x155f51(0x111))/0x4*(-parseInt(_0x155f51(0x14a))/0x5)+parseInt(_0x155f51(0x13a))/0x6+-parseInt(_0x155f51(0x156))/0x7+parseInt(_0x155f51(0x122))/0x8*(parseInt(_0x155f51(0x146))/0x9)+-parseInt(_0x155f51(0x12c))/0xa;if(_0x7a0bbb===_0x21576a)break;else _0x1f40ca['push'](_0x1f40ca['shift']());}catch(_0x2934f6){_0x1f40ca['push'](_0x1f40ca['shift']());}}}(_0x5587,0x4a60c));import{CommentService as _0x1def95,CollaborationSessionService as _0x2e0b26,UniverCollaborationClientPlugin as _0x5f22af}from'@univerjs-pro/collaboration-client';function _0x5587(){const _0x1ed97f=['add','defineProperty','/delete','error','_threadCommentDataSourceService','saveCommentToSnapshot','UNIVER_UNKNOWN','symbol','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','requireSession','11ZMXMml','Reply','find','getUnit','get','dataSource','995772toOZkT','getOwnPropertyDescriptor','_config','Edit','post','users','/list','filter','comment','Delete','1028079AWGkrD','updateComment','_threadCommentModel','getComment','format','code','solved','8dHujXV','subscribe','_httpService','_initDataSource','slice','YYYY/MM/DD\x20HH:mm','pipe','userId','root','_initUserSync','5072660gWPFPJ','resolveComment','/add','content','unitId','length','listComments','rangeId','reply','commentUpdate$','_init','_configService','Solve','customRanges','920280DFVkgd','_sessionService','Add','delete','createTimestamp','replyId','user','type','onReady','resolved','/reply','pluginName','2690757eNPXGv','getUser','/universer-api/comment/unit/','addUser','5HIVOuH','userID','rangeType','threadId','addComment','Solved','_userService','map','parse','body','stringify','COMMENT','1820896gWeTNH','_injector','getMemberID','getCurrentUser','size','_threadCommentDataSource','forEach','OpenOrReOpen','setConfig','syncUpdateMutationToColla','parentId','deleteComment','_commentService','replies','UNRECOGNIZED','95626EdJvYz'];_0x5587=function(){return _0x1ed97f;};return _0x5587();}import{UniverLicensePlugin as _0x1fa237}from'@univerjs-pro/license';import{dayjs as _0x2e89bc,UserManagerService as _0x1fa847,Inject as _0x3dcfa0,Injector as _0xac405f,Disposable as _0x4d943a,CustomRangeType as _0x265937,UniverInstanceType as _0x2d50f1,DependentOn as _0x266507,IConfigService as _0x108d43,Plugin as _0xc515d7,merge as _0xaa02ee}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3d6cdd}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2cf2a9,IThreadCommentDataSourceService as _0x4cbc34}from'@univerjs/thread-comment';import{bufferTime as _0x4bb671}from'rxjs';import{HTTPService as _0x112d55}from'@univerjs/network';const W=_0x338a3e(0x109);var I=(_0x4500c7=>(_0x4500c7[_0x4500c7[_0x338a3e(0x15d)]=0x0]='OpenOrReOpen',_0x4500c7[_0x4500c7['Solved']=0x1]=_0x338a3e(0x14f),_0x4500c7[_0x4500c7[_0x338a3e(0xff)]=-0x1]=_0x338a3e(0xff),_0x4500c7))(I||{}),v=(_0x35e1fb=>(_0x35e1fb[_0x35e1fb['Unknown']=0x0]='Unknown',_0x35e1fb[_0x35e1fb[_0x338a3e(0x13c)]=0x1]=_0x338a3e(0x13c),_0x35e1fb[_0x35e1fb[_0x338a3e(0x10c)]=0x2]=_0x338a3e(0x10c),_0x35e1fb[_0x35e1fb[_0x338a3e(0x114)]=0x3]=_0x338a3e(0x114),_0x35e1fb[_0x35e1fb[_0x338a3e(0x11a)]=0x4]='Delete',_0x35e1fb[_0x35e1fb[_0x338a3e(0x138)]=0x5]=_0x338a3e(0x138),_0x35e1fb[_0x35e1fb[_0x338a3e(0xff)]=-0x1]=_0x338a3e(0xff),_0x35e1fb))(v||{});const y=_0x226e89=>_0x2e89bc(new Date(+_0x226e89))[_0x338a3e(0x11f)](_0x338a3e(0x127)),B=async(_0x378fa9,_0x142af3)=>{const _0x447adb=_0x338a3e,_0x182c3d=_0x378fa9[_0x447adb(0x10f)](_0x1fa847),_0x3c579b=_0x378fa9[_0x447adb(0x10f)](_0x112d55);_0x142af3[_0x447adb(0x15c)](_0x41b28e=>{const _0x5da1c3=_0x447adb;_0x182c3d[_0x5da1c3(0x147)](_0x41b28e)&&_0x142af3[_0x5da1c3(0x13d)](_0x41b28e);}),_0x142af3[_0x447adb(0x15a)]&&(await _0x3c579b['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x142af3]}}))['body'][_0x447adb(0x116)][_0x447adb(0x15c)](_0x56e572=>{const _0x56958b=_0x447adb;_0x56e572&&_0x182c3d[_0x56958b(0x149)](_0x56e572);});};var K=Object[_0x338a3e(0x112)],V=(_0x4f6e70,_0x1b3a77,_0x548a66,_0x26bec7)=>{const _0x114894=_0x338a3e;for(var _0x2dc9f9=_0x26bec7>0x1?void 0x0:_0x26bec7?K(_0x1b3a77,_0x548a66):_0x1b3a77,_0x23d12d=_0x4f6e70[_0x114894(0x131)]-0x1,_0x21d864;_0x23d12d>=0x0;_0x23d12d--)(_0x21d864=_0x4f6e70[_0x23d12d])&&(_0x2dc9f9=_0x21d864(_0x2dc9f9)||_0x2dc9f9);return _0x2dc9f9;},p=(_0x351c9a,_0x4ffbb4)=>(_0x21d346,_0x4064a0)=>_0x4ffbb4(_0x21d346,_0x4064a0,_0x351c9a);let _=class extends _0x4d943a{constructor(_0x297217,_0xf241f0,_0x16f3f2,_0x543ccf){const _0x15c834=_0x338a3e;super(),this[_0x15c834(0xfd)]=_0x297217,this[_0x15c834(0x11d)]=_0xf241f0,this['_userService']=_0x16f3f2,this['_injector']=_0x543ccf,this['_init'](),this[_0x15c834(0x12b)]();}[_0x338a3e(0x12b)](){const _0x82eccc=_0x338a3e;this['disposeWithMe'](this[_0x82eccc(0x11d)]['commentUpdate$'][_0x82eccc(0x128)](_0x4bb671(0x10))[_0x82eccc(0x123)](_0x56da90=>{const _0x5d7d54=_0x82eccc,_0x44e3ee=new Set();_0x56da90[_0x5d7d54(0x15c)](_0x538286=>{const _0x4fcb7e=_0x5d7d54;switch(_0x538286[_0x4fcb7e(0x141)]){case _0x4fcb7e(0x101):{const _0x1cbb31=_0x538286['payload']['personId'];_0x44e3ee[_0x4fcb7e(0x101)](_0x1cbb31);break;}}}),B(this['_injector'],_0x44e3ee);}));}[_0x338a3e(0x136)](){const _0xa4ead8=_0x338a3e;this['disposeWithMe'](this['_commentService'][_0xa4ead8(0x135)][_0xa4ead8(0x123)](async _0x3694f6=>{const _0xcd9c24=_0xa4ead8;var _0x1f5d51,_0x41643d,_0x15beaf,_0x40b714;const _0x3d802e=(_0x1f5d51=this[_0xcd9c24(0x11d)][_0xcd9c24(0x10e)](_0x3694f6[_0xcd9c24(0x130)])[_0xcd9c24(0x10d)](_0x25f61f=>_0x25f61f[_0xcd9c24(0x14d)]===_0x3694f6['threadId']))==null?void 0x0:_0x1f5d51[_0xcd9c24(0x12a)];if(!_0x3d802e)return;const {unitId:_0x1363a9,subUnitId:_0x42d716}=_0x3d802e;switch(_0x3694f6[_0xcd9c24(0x140)]&&this[_0xcd9c24(0x150)][_0xcd9c24(0x149)](_0x3694f6[_0xcd9c24(0x140)]),_0x3694f6['type']){case v['Add']:break;case v[_0xcd9c24(0x10c)]:{this[_0xcd9c24(0x11d)][_0xcd9c24(0x14e)](_0x1363a9,_0x42d716,{'unitId':_0x1363a9,'subUnitId':_0x42d716,'ref':'','id':_0x3694f6[_0xcd9c24(0x13f)],'dT':y(+_0x3694f6[_0xcd9c24(0x13e)]),'threadId':_0x3694f6[_0xcd9c24(0x14d)],'personId':(_0x15beaf=(_0x41643d=_0x3694f6['user'])==null?void 0x0:_0x41643d[_0xcd9c24(0x14b)])!=null?_0x15beaf:_0x3694f6[_0xcd9c24(0x129)],'text':JSON[_0xcd9c24(0x152)](_0x3694f6[_0xcd9c24(0x12f)]),'parentId':_0x3d802e['id']});break;}case v[_0xcd9c24(0x11a)]:{const _0x1224f1=this[_0xcd9c24(0x11d)][_0xcd9c24(0x11e)](_0x1363a9,_0x42d716,_0x3694f6[_0xcd9c24(0x13f)]);_0x1224f1&&_0x1224f1[_0xcd9c24(0xfb)]&&this[_0xcd9c24(0x11d)][_0xcd9c24(0xfc)](_0x1363a9,_0x42d716,_0x3694f6[_0xcd9c24(0x13f)]);break;}case v[_0xcd9c24(0x114)]:{this[_0xcd9c24(0x11d)][_0xcd9c24(0x11c)](_0x1363a9,_0x42d716,{'commentId':_0x3694f6['replyId'],'text':JSON[_0xcd9c24(0x152)](_0x3694f6[_0xcd9c24(0x12f)])});break;}case v[_0xcd9c24(0x138)]:{const _0x32af58=(_0x40b714=this[_0xcd9c24(0x11d)][_0xcd9c24(0x10e)](_0x3694f6[_0xcd9c24(0x130)])[_0xcd9c24(0x10d)](_0x5edea5=>_0x5edea5[_0xcd9c24(0x14d)]===_0x3694f6['threadId']))==null?void 0x0:_0x40b714[_0xcd9c24(0x12a)];_0x32af58&&this[_0xcd9c24(0x11d)]['resolveComment'](_0x1363a9,_0x42d716,_0x32af58['id'],_0x3694f6[_0xcd9c24(0x121)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x3dcfa0(_0x1def95)),p(0x1,_0x3dcfa0(_0x2cf2a9)),p(0x2,_0x3dcfa0(_0x1fa847)),p(0x3,_0x3dcfa0(_0xac405f))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x338a3e(0x112)],Q=(_0x5cffac,_0x9fdacf,_0x1fcf1f,_0x4ac5c6)=>{const _0x5d2aab=_0x338a3e;for(var _0x3ea5c6=_0x4ac5c6>0x1?void 0x0:_0x4ac5c6?k(_0x9fdacf,_0x1fcf1f):_0x9fdacf,_0x5a1a7d=_0x5cffac[_0x5d2aab(0x131)]-0x1,_0x4220eb;_0x5a1a7d>=0x0;_0x5a1a7d--)(_0x4220eb=_0x5cffac[_0x5a1a7d])&&(_0x3ea5c6=_0x4220eb(_0x3ea5c6)||_0x3ea5c6);return _0x3ea5c6;},b=(_0x9731cc,_0x4af6e8)=>(_0x510a8d,_0x2c6b36)=>_0x4af6e8(_0x510a8d,_0x2c6b36,_0x9731cc);function X(_0x2ccde8,_0x176d52){const _0x3a1a10=_0x338a3e,_0x19bf87=_0x2ccde8['replies'][0x0];return{..._0x176d52,'id':_0x19bf87[_0x3a1a10(0x13f)],'resolved':_0x2ccde8[_0x3a1a10(0x121)]===0x1,'dT':y(_0x19bf87[_0x3a1a10(0x13e)]),'personId':_0x19bf87[_0x3a1a10(0x129)],'threadId':_0x19bf87['threadId']};}function ee(_0x2a1ce0,_0x451b4b,_0x22e8dc){const _0x5e87f7=_0x338a3e;var _0x3777e1,_0x30a3dc;if(((_0x30a3dc=(_0x3777e1=_0x2a1ce0==null?void 0x0:_0x2a1ce0['replies'])==null?void 0x0:_0x3777e1[_0x5e87f7(0x131)])!=null?_0x30a3dc:0x0)>0x0){const _0x147947=(_0x4a85a1,_0x5bd59b)=>({'id':_0x4a85a1[_0x5e87f7(0x13f)],'threadId':_0x4a85a1['threadId'],'dT':y(_0x4a85a1[_0x5e87f7(0x13e)]),'personId':_0x4a85a1[_0x5e87f7(0x129)],'resolved':_0x2a1ce0['solved']===I[_0x5e87f7(0x14f)],'unitId':_0x451b4b,'subUnitId':_0x22e8dc,'text':JSON['parse'](_0x4a85a1[_0x5e87f7(0x12f)]),'parentId':_0x5bd59b}),_0x968d23=_0x147947(_0x2a1ce0[_0x5e87f7(0xfe)][0x0]);return{..._0x968d23,'children':_0x2a1ce0[_0x5e87f7(0xfe)][_0x5e87f7(0x126)](0x1)[_0x5e87f7(0x151)](_0x54641e=>_0x147947(_0x54641e,_0x968d23['id']))};}return null;}let S=class{constructor(_0x3e1357,_0x2ca5a6,_0x44dade){const _0x2f836e=_0x338a3e;this['_httpService']=_0x3e1357,this[_0x2f836e(0x150)]=_0x2ca5a6,this[_0x2f836e(0x13b)]=_0x44dade;}async[_0x338a3e(0x14e)](_0x5b06db){const _0xb5aa14=_0x338a3e;var _0x54f22d,_0x598e90;const {parentId:_0x40580b,unitId:_0x1bea6d,text:_0x8a6db2,threadId:_0x4781a4}=_0x5b06db,_0x4db24c=(_0x598e90=(_0x54f22d=_0x8a6db2['customRanges'])==null?void 0x0:_0x54f22d[_0xb5aa14(0x118)](_0x359dc5=>_0x359dc5['rangeType']===_0x265937[_0xb5aa14(0x155)])['map'](_0x1bf44b=>_0x1bf44b[_0xb5aa14(0x133)]))!=null?_0x598e90:[],_0x2a07ba=JSON[_0xb5aa14(0x154)](_0x8a6db2),_0x488f3c=(await this[_0xb5aa14(0x13b)][_0xb5aa14(0x10a)](_0x1bea6d))[_0xb5aa14(0x158)]();if(_0x40580b){const _0x381699={'memberId':_0x488f3c,'unitId':_0x1bea6d,'content':_0x2a07ba,'mention':_0x4db24c,'threadId':_0x4781a4},_0x5a780b=(await this['_httpService'][_0xb5aa14(0x115)]('/universer-api/comment/unit/'+_0x1bea6d+_0xb5aa14(0x144),{'body':_0x381699}))[_0xb5aa14(0x153)][_0xb5aa14(0x134)];return{..._0x5b06db,'id':_0x5a780b[_0xb5aa14(0x13f)],'dT':_0x2e89bc(+_0x5a780b[_0xb5aa14(0x13e)])[_0xb5aa14(0x11f)](_0xb5aa14(0x127)),'personId':_0x5a780b[_0xb5aa14(0x129)]};}else{const _0x4e65e3={'memberId':_0x488f3c,'unitId':_0x1bea6d,'content':_0x2a07ba,'mention':_0x4db24c},_0xb727bf=await this[_0xb5aa14(0x124)]['post']('/universer-api/comment/unit/'+_0x1bea6d+_0xb5aa14(0x12e),{'body':_0x4e65e3});return X(_0xb727bf[_0xb5aa14(0x153)][_0xb5aa14(0x119)],_0x5b06db);}}async[_0x338a3e(0x11c)](_0x14f34d){const _0x32c5d4=_0x338a3e;var _0x5df3a9,_0x506e1c;const {text:_0x49c043,unitId:_0x24b95f}=_0x14f34d,_0x42e7fa=(_0x506e1c=(_0x5df3a9=_0x49c043[_0x32c5d4(0x139)])==null?void 0x0:_0x5df3a9[_0x32c5d4(0x118)](_0x418b2d=>_0x418b2d[_0x32c5d4(0x14c)]===_0x265937[_0x32c5d4(0x155)])[_0x32c5d4(0x151)](_0x4c4660=>_0x4c4660['rangeId']))!=null?_0x506e1c:[],_0x4fe81d=JSON['stringify'](_0x49c043),_0x5e7004=_0x14f34d[_0x32c5d4(0x14d)],_0x337074=_0x14f34d['id'],_0x56bedd={'memberId':(await this[_0x32c5d4(0x13b)]['requireSession'](_0x24b95f))[_0x32c5d4(0x158)](),'unitId':_0x24b95f,'threadId':_0x5e7004,'mention':_0x42e7fa,'content':_0x4fe81d,'replyId':_0x337074},_0x1dbc8e=await this[_0x32c5d4(0x124)][_0x32c5d4(0x115)]('/universer-api/comment/unit/'+_0x24b95f+'/edit',{'body':_0x56bedd});return!_0x1dbc8e['body'][_0x32c5d4(0x104)]||_0x1dbc8e['body'][_0x32c5d4(0x104)][_0x32c5d4(0x120)]===0x1;}async[_0x338a3e(0x12d)](_0x3382c9){const _0x150cc7=_0x338a3e,{unitId:_0x141cbe}=_0x3382c9,_0x334650=_0x3382c9['threadId'],_0x104119={'memberId':this['_userService'][_0x150cc7(0x159)]()[_0x150cc7(0x14b)],'unitId':_0x141cbe,'threadId':_0x334650,'solved':_0x3382c9[_0x150cc7(0x143)]?I[_0x150cc7(0x14f)]:I[_0x150cc7(0x15d)]},_0x64487c=await this[_0x150cc7(0x124)][_0x150cc7(0x115)]('/universer-api/comment/unit/'+_0x141cbe+'/solved',{'body':_0x104119});return!_0x64487c['body'][_0x150cc7(0x104)]||_0x64487c[_0x150cc7(0x153)][_0x150cc7(0x104)]['code']===0x1;}async['deleteComment'](_0x536d8b,_0x3b1700,_0x2d620a,_0x489a84){const _0x451505=_0x338a3e,_0x4bda8c={'memberId':(await this[_0x451505(0x13b)][_0x451505(0x10a)](_0x536d8b))[_0x451505(0x158)](),'threadId':_0x2d620a,'replyId':_0x489a84,'unitId':_0x536d8b},_0x38a2b3=await this[_0x451505(0x124)][_0x451505(0x115)](_0x451505(0x148)+_0x536d8b+_0x451505(0x103),{'body':_0x4bda8c});return!_0x38a2b3[_0x451505(0x153)][_0x451505(0x104)]||_0x38a2b3[_0x451505(0x153)]['error']['code']===0x1;}async[_0x338a3e(0x132)](_0x1c8cac,_0x5481b0,_0x831ede){const _0x5f4a19=_0x338a3e,_0x10092c={'unitId':_0x1c8cac,'threadId':_0x831ede},_0x157b19=await this[_0x5f4a19(0x124)][_0x5f4a19(0x115)](_0x5f4a19(0x148)+_0x1c8cac+_0x5f4a19(0x117),{'body':_0x10092c}),_0x46485d=_0x831ede[_0x5f4a19(0x151)](_0x132065=>ee(_0x157b19['body']['comments'][_0x132065],_0x1c8cac,_0x5481b0))[_0x5f4a19(0x118)](Boolean);return Object['values'](_0x157b19['body']['users'])[_0x5f4a19(0x15c)](_0x211611=>{const _0x4d090c=_0x5f4a19;this[_0x4d090c(0x150)][_0x4d090c(0x149)](_0x211611);}),_0x46485d;}[_0x338a3e(0x106)](_0x212752){return{'id':_0x212752['id'],'threadId':_0x212752['threadId'],'ref':_0x212752['ref']};}};S=Q([b(0x0,_0x3dcfa0(_0x112d55)),b(0x1,_0x3dcfa0(_0x1fa847)),b(0x2,_0x3dcfa0(_0x2e0b26))],S);var re=Object[_0x338a3e(0x112)],te=(_0x18f331,_0x795dbf,_0x3e4002,_0x33eb0f)=>{const _0x35834a=_0x338a3e;for(var _0x51100e=_0x33eb0f>0x1?void 0x0:_0x33eb0f?re(_0x795dbf,_0x3e4002):_0x795dbf,_0x5e9855=_0x18f331[_0x35834a(0x131)]-0x1,_0x5aba81;_0x5e9855>=0x0;_0x5e9855--)(_0x5aba81=_0x18f331[_0x5e9855])&&(_0x51100e=_0x5aba81(_0x51100e)||_0x51100e);return _0x51100e;},M=(_0x918176,_0x219454)=>(_0x244624,_0x48c445)=>_0x219454(_0x244624,_0x48c445,_0x918176);let f=class extends _0x4d943a{constructor(_0x2a873,_0x1a6cad){const _0x397510=_0x338a3e;super(),this[_0x397510(0x105)]=_0x2a873,this[_0x397510(0x15b)]=_0x1a6cad,this[_0x397510(0x125)]();}['_initDataSource'](){const _0xa8573=_0x338a3e;this[_0xa8573(0x105)][_0xa8573(0x110)]=this[_0xa8573(0x15b)],this[_0xa8573(0x105)][_0xa8573(0xfa)]=!0x1;}};f=te([M(0x0,_0x4cbc34),M(0x1,_0x3dcfa0(S))],f);var se=Object[_0x338a3e(0x102)],oe=Object[_0x338a3e(0x112)],ne=(_0x181a5a,_0x7a7a70,_0x5cbeb5)=>_0x7a7a70 in _0x181a5a?se(_0x181a5a,_0x7a7a70,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5cbeb5}):_0x181a5a[_0x7a7a70]=_0x5cbeb5,ie=(_0x328dfb,_0x5df7d7,_0x2b461b,_0x477789)=>{const _0x375b10=_0x338a3e;for(var _0x45ddc3=_0x477789>0x1?void 0x0:_0x477789?oe(_0x5df7d7,_0x2b461b):_0x5df7d7,_0x42a7c5=_0x328dfb[_0x375b10(0x131)]-0x1,_0x12e377;_0x42a7c5>=0x0;_0x42a7c5--)(_0x12e377=_0x328dfb[_0x42a7c5])&&(_0x45ddc3=_0x12e377(_0x45ddc3)||_0x45ddc3);return _0x45ddc3;},N=(_0x1dffd5,_0x13cbd7)=>(_0x352a40,_0x2a90f9)=>_0x13cbd7(_0x352a40,_0x2a90f9,_0x1dffd5),$=(_0x3a438f,_0x9d9e30,_0x155efe)=>ne(_0x3a438f,typeof _0x9d9e30!=_0x338a3e(0x108)?_0x9d9e30+'':_0x9d9e30,_0x155efe);let g=class extends _0xc515d7{constructor(_0x44dd69=O,_0x9b157c,_0x3d048f){const _0xabcd55=_0x338a3e;super(),this[_0xabcd55(0x113)]=_0x44dd69,this[_0xabcd55(0x157)]=_0x9b157c,this['_configService']=_0x3d048f;const {..._0x4cb607}=_0xaa02ee({},O,this['_config']);this[_0xabcd55(0x137)][_0xabcd55(0x15e)](z,_0x4cb607);}['onStarting'](){const _0x26d32d=_0x338a3e;[[S],[f],[_]][_0x26d32d(0x15c)](_0x361d75=>{const _0x5b897a=_0x26d32d;this[_0x5b897a(0x157)][_0x5b897a(0x101)](_0x361d75);});}[_0x338a3e(0x142)](){const _0x48806f=_0x338a3e;this['_injector'][_0x48806f(0x10f)](f),this[_0x48806f(0x157)][_0x48806f(0x10f)](_);}};function _0x5a1c(_0x3f2a5f,_0x50d58e){const _0x5587d2=_0x5587();return _0x5a1c=function(_0x5a1c5f,_0x46e39a){_0x5a1c5f=_0x5a1c5f-0xfa;let _0xdaf486=_0x5587d2[_0x5a1c5f];return _0xdaf486;},_0x5a1c(_0x3f2a5f,_0x50d58e);}$(g,_0x338a3e(0x145),W),$(g,_0x338a3e(0x141),_0x2d50f1[_0x338a3e(0x107)]),g=ie([_0x266507(_0x3d6cdd,_0x5f22af,_0x1fa237),N(0x1,_0x3dcfa0(_0xac405f)),N(0x2,_0x108d43)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x3d29c9,_0x3aceba){const _0xdf231e=_0x779c,_0xff5e0c=_0x3d29c9();while(!![]){try{const _0x5434f1=parseInt(_0xdf231e(0x105))/0x1*(-parseInt(_0xdf231e(0xf6))/0x2)+parseInt(_0xdf231e(0xe6))/0x3*(-parseInt(_0xdf231e(0x120))/0x4)+parseInt(_0xdf231e(0xba))/0x5+parseInt(_0xdf231e(0xb9))/0x6*(-parseInt(_0xdf231e(0xab))/0x7)+-parseInt(_0xdf231e(0xb8))/0x8*(parseInt(_0xdf231e(0xcd))/0x9)+parseInt(_0xdf231e(0xc1))/0xa*(-parseInt(_0xdf231e(0xd3))/0xb)+parseInt(_0xdf231e(0x129))/0xc*(parseInt(_0xdf231e(0xff))/0xd);if(_0x5434f1===_0x3aceba)break;else _0xff5e0c['push'](_0xff5e0c['shift']());}catch(_0x2adf6d){_0xff5e0c['push'](_0xff5e0c['shift']());}}}(_0x1f48,0xd5149),function(_0x2f4a66,_0x19bcec){const _0x3e3d37=_0x779c;typeof exports=='object'&&typeof module<'u'?_0x19bcec(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x3e3d37(0xd6)&&define[_0x3e3d37(0xed)]?define(['exports',_0x3e3d37(0xe7),'@univerjs-pro/license',_0x3e3d37(0xdb),'@univerjs/thread-comment-ui','@univerjs/thread-comment','rxjs',_0x3e3d37(0xef)],_0x19bcec):(_0x2f4a66=typeof globalThis<'u'?globalThis:_0x2f4a66||self,_0x19bcec(_0x2f4a66[_0x3e3d37(0xd4)]={},_0x2f4a66[_0x3e3d37(0x108)],_0x2f4a66['UniverProLicense'],_0x2f4a66['UniverCore'],_0x2f4a66[_0x3e3d37(0xdc)],_0x2f4a66[_0x3e3d37(0x12a)],_0x2f4a66['rxjs'],_0x2f4a66[_0x3e3d37(0x124)]));}(this,function(_0x5243dd,_0x57866e,_0x5473a2,_0x534eba,_0x1a8000,_0x9f1156,_0x50231b,_0x3c27fd){'use strict';const _0x29560f=_0x779c;const _0x1bd9ca=_0x29560f(0x104);var _0x29d1d7=(_0x290b74=>(_0x290b74[_0x290b74['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x290b74[_0x290b74[_0x29560f(0x103)]=0x1]=_0x29560f(0x103),_0x290b74[_0x290b74[_0x29560f(0xaa)]=-0x1]=_0x29560f(0xaa),_0x290b74))(_0x29d1d7||{}),_0x774206=(_0x237ce5=>(_0x237ce5[_0x237ce5[_0x29560f(0x11b)]=0x0]=_0x29560f(0x11b),_0x237ce5[_0x237ce5['Add']=0x1]=_0x29560f(0x101),_0x237ce5[_0x237ce5['Reply']=0x2]='Reply',_0x237ce5[_0x237ce5['Edit']=0x3]=_0x29560f(0x121),_0x237ce5[_0x237ce5['Delete']=0x4]=_0x29560f(0xc0),_0x237ce5[_0x237ce5[_0x29560f(0xc5)]=0x5]=_0x29560f(0xc5),_0x237ce5[_0x237ce5[_0x29560f(0xaa)]=-0x1]='UNRECOGNIZED',_0x237ce5))(_0x774206||{});const _0x352bd5=_0x3f52a2=>_0x534eba[_0x29560f(0xb5)](new Date(+_0x3f52a2))[_0x29560f(0x11c)](_0x29560f(0xfd)),_0x1a3729=async(_0x1436c0,_0x42ce29)=>{const _0x487c45=_0x29560f,_0x304125=_0x1436c0[_0x487c45(0xf7)](_0x534eba[_0x487c45(0x107)]),_0x1246f9=_0x1436c0[_0x487c45(0xf7)](_0x3c27fd[_0x487c45(0x10e)]);_0x42ce29[_0x487c45(0xe2)](_0x55dab2=>{const _0x28e00b=_0x487c45;_0x304125['getUser'](_0x55dab2)&&_0x42ce29[_0x28e00b(0x10f)](_0x55dab2);}),_0x42ce29[_0x487c45(0x11f)]&&(await _0x1246f9[_0x487c45(0xf7)](_0x487c45(0xdd),{'params':{'userIDs':[..._0x42ce29]}}))['body'][_0x487c45(0xb2)][_0x487c45(0xe2)](_0x248c59=>{const _0x26a841=_0x487c45;_0x248c59&&_0x304125[_0x26a841(0xeb)](_0x248c59);});};var _0x436e63=Object[_0x29560f(0x110)],_0x54343d=(_0x5e9b8d,_0x2eca3a,_0x4204ab,_0x48afcb)=>{for(var _0x4d89b2=_0x48afcb>0x1?void 0x0:_0x48afcb?_0x436e63(_0x2eca3a,_0x4204ab):_0x2eca3a,_0x334472=_0x5e9b8d['length']-0x1,_0x33001a;_0x334472>=0x0;_0x334472--)(_0x33001a=_0x5e9b8d[_0x334472])&&(_0x4d89b2=_0x33001a(_0x4d89b2)||_0x4d89b2);return _0x4d89b2;},_0x5f3768=(_0x171269,_0x10491b)=>(_0x112199,_0x557828)=>_0x10491b(_0x112199,_0x557828,_0x171269);let _0x2e2e16=class extends _0x534eba[_0x29560f(0x11e)]{constructor(_0x422e79,_0x23e177,_0x223366,_0x4c4122){const _0x2b0e71=_0x29560f;super(),this[_0x2b0e71(0xe4)]=_0x422e79,this[_0x2b0e71(0x11a)]=_0x23e177,this['_userService']=_0x223366,this[_0x2b0e71(0xb1)]=_0x4c4122,this[_0x2b0e71(0x127)](),this[_0x2b0e71(0xcc)]();}[_0x29560f(0xcc)](){const _0x384d20=_0x29560f;this[_0x384d20(0xc9)](this[_0x384d20(0x11a)][_0x384d20(0xee)][_0x384d20(0x10a)](_0x50231b[_0x384d20(0xe1)](0x10))[_0x384d20(0xa9)](_0x32cd6b=>{const _0x160715=_0x384d20,_0xd2e16e=new Set();_0x32cd6b[_0x160715(0xe2)](_0x21cec5=>{const _0x568abd=_0x160715;switch(_0x21cec5[_0x568abd(0xd9)]){case'add':{const _0x4d168a=_0x21cec5[_0x568abd(0x118)][_0x568abd(0xd5)];_0xd2e16e['add'](_0x4d168a);break;}}}),_0x1a3729(this[_0x160715(0xb1)],_0xd2e16e);}));}[_0x29560f(0x127)](){const _0x352369=_0x29560f;this[_0x352369(0xc9)](this[_0x352369(0xe4)][_0x352369(0xee)][_0x352369(0xa9)](async _0x5d4577=>{const _0x2e7090=_0x352369;var _0x3163cf,_0x2c82e3,_0x58adc3,_0xf0256;const _0x53d98f=(_0x3163cf=this[_0x2e7090(0x11a)][_0x2e7090(0xd7)](_0x5d4577[_0x2e7090(0xe3)])[_0x2e7090(0xfa)](_0x21e020=>_0x21e020['threadId']===_0x5d4577[_0x2e7090(0xbe)]))==null?void 0x0:_0x3163cf[_0x2e7090(0x100)];if(!_0x53d98f)return;const {unitId:_0x33f4d6,subUnitId:_0x362716}=_0x53d98f;switch(_0x5d4577[_0x2e7090(0xe0)]&&this[_0x2e7090(0x111)][_0x2e7090(0xeb)](_0x5d4577[_0x2e7090(0xe0)]),_0x5d4577[_0x2e7090(0xd9)]){case _0x774206[_0x2e7090(0x101)]:break;case _0x774206[_0x2e7090(0xec)]:{this[_0x2e7090(0x11a)][_0x2e7090(0xe5)](_0x33f4d6,_0x362716,{'unitId':_0x33f4d6,'subUnitId':_0x362716,'ref':'','id':_0x5d4577[_0x2e7090(0xf0)],'dT':_0x352bd5(+_0x5d4577[_0x2e7090(0x116)]),'threadId':_0x5d4577[_0x2e7090(0xbe)],'personId':(_0x58adc3=(_0x2c82e3=_0x5d4577[_0x2e7090(0xe0)])==null?void 0x0:_0x2c82e3['userID'])!=null?_0x58adc3:_0x5d4577[_0x2e7090(0xe9)],'text':JSON['parse'](_0x5d4577['content']),'parentId':_0x53d98f['id']});break;}case _0x774206[_0x2e7090(0xc0)]:{const _0x11663a=this['_threadCommentModel']['getComment'](_0x33f4d6,_0x362716,_0x5d4577['replyId']);_0x11663a&&_0x11663a[_0x2e7090(0xbc)]&&this[_0x2e7090(0x11a)][_0x2e7090(0x122)](_0x33f4d6,_0x362716,_0x5d4577[_0x2e7090(0xf0)]);break;}case _0x774206[_0x2e7090(0x121)]:{this['_threadCommentModel'][_0x2e7090(0x119)](_0x33f4d6,_0x362716,{'commentId':_0x5d4577[_0x2e7090(0xf0)],'text':JSON[_0x2e7090(0xd1)](_0x5d4577[_0x2e7090(0xf5)])});break;}case _0x774206[_0x2e7090(0xc5)]:{const _0x57d724=(_0xf0256=this[_0x2e7090(0x11a)]['getUnit'](_0x5d4577[_0x2e7090(0xe3)])[_0x2e7090(0xfa)](_0x5f18c7=>_0x5f18c7[_0x2e7090(0xbe)]===_0x5d4577[_0x2e7090(0xbe)]))==null?void 0x0:_0xf0256[_0x2e7090(0x100)];_0x57d724&&this[_0x2e7090(0x11a)]['resolveComment'](_0x33f4d6,_0x362716,_0x57d724['id'],_0x5d4577['solved']===_0x29d1d7['Solved']);break;}}}));}};_0x2e2e16=_0x54343d([_0x5f3768(0x0,_0x534eba[_0x29560f(0xce)](_0x57866e[_0x29560f(0xae)])),_0x5f3768(0x1,_0x534eba[_0x29560f(0xce)](_0x9f1156['ThreadCommentModel'])),_0x5f3768(0x2,_0x534eba[_0x29560f(0xce)](_0x534eba[_0x29560f(0x107)])),_0x5f3768(0x3,_0x534eba[_0x29560f(0xce)](_0x534eba[_0x29560f(0xb7)]))],_0x2e2e16);const _0x2fb9b9='thread-comment-data-source.config',_0x4db5f3={};var _0x1944d9=Object[_0x29560f(0x110)],_0x22b0c0=(_0x2c27b1,_0x756492,_0x2e794a,_0x14cd2e)=>{const _0xc5b92b=_0x29560f;for(var _0x1e2eec=_0x14cd2e>0x1?void 0x0:_0x14cd2e?_0x1944d9(_0x756492,_0x2e794a):_0x756492,_0x28f474=_0x2c27b1[_0xc5b92b(0x102)]-0x1,_0x3ed690;_0x28f474>=0x0;_0x28f474--)(_0x3ed690=_0x2c27b1[_0x28f474])&&(_0x1e2eec=_0x3ed690(_0x1e2eec)||_0x1e2eec);return _0x1e2eec;},_0x1db0d7=(_0x387fa5,_0x77e376)=>(_0x172587,_0x246576)=>_0x77e376(_0x172587,_0x246576,_0x387fa5);function _0x2aa250(_0x5e7852,_0x55d587){const _0x338cae=_0x29560f,_0x55d388=_0x5e7852[_0x338cae(0xf1)][0x0];return{..._0x55d587,'id':_0x55d388[_0x338cae(0xf0)],'resolved':_0x5e7852['solved']===0x1,'dT':_0x352bd5(_0x55d388[_0x338cae(0x116)]),'personId':_0x55d388[_0x338cae(0xe9)],'threadId':_0x55d388[_0x338cae(0xbe)]};}function _0x20b6bf(_0x1c09a5,_0x231a01,_0x1848ff){const _0x436ec4=_0x29560f;var _0x2b6687,_0x4413b3;if(((_0x4413b3=(_0x2b6687=_0x1c09a5==null?void 0x0:_0x1c09a5[_0x436ec4(0xf1)])==null?void 0x0:_0x2b6687['length'])!=null?_0x4413b3:0x0)>0x0){const _0x4a5687=(_0x5c0821,_0x1dfa57)=>({'id':_0x5c0821[_0x436ec4(0xf0)],'threadId':_0x5c0821['threadId'],'dT':_0x352bd5(_0x5c0821['createTimestamp']),'personId':_0x5c0821['userId'],'resolved':_0x1c09a5[_0x436ec4(0x123)]===_0x29d1d7[_0x436ec4(0x103)],'unitId':_0x231a01,'subUnitId':_0x1848ff,'text':JSON[_0x436ec4(0xd1)](_0x5c0821[_0x436ec4(0xf5)]),'parentId':_0x1dfa57}),_0x192d30=_0x4a5687(_0x1c09a5[_0x436ec4(0xf1)][0x0]);return{..._0x192d30,'children':_0x1c09a5[_0x436ec4(0xf1)]['slice'](0x1)[_0x436ec4(0x114)](_0x5c46b7=>_0x4a5687(_0x5c46b7,_0x192d30['id']))};}return null;}let _0xa0207a=class{constructor(_0x2b1d5b,_0x4aa0ee,_0x12da8c){const _0x583a00=_0x29560f;this[_0x583a00(0xc8)]=_0x2b1d5b,this[_0x583a00(0x111)]=_0x4aa0ee,this[_0x583a00(0xc4)]=_0x12da8c;}async[_0x29560f(0xe5)](_0x15480f){const _0x188ac5=_0x29560f;var _0x1e2fc0,_0x25cc1e;const {parentId:_0x2b6142,unitId:_0x1a9fb7,text:_0x4abeee,threadId:_0x105a58}=_0x15480f,_0x2cdf86=(_0x25cc1e=(_0x1e2fc0=_0x4abeee['customRanges'])==null?void 0x0:_0x1e2fc0[_0x188ac5(0xf2)](_0x258e93=>_0x258e93[_0x188ac5(0xa7)]===_0x534eba['CustomRangeType'][_0x188ac5(0xde)])[_0x188ac5(0x114)](_0x45817a=>_0x45817a[_0x188ac5(0xf8)]))!=null?_0x25cc1e:[],_0x381c08=JSON[_0x188ac5(0x115)](_0x4abeee),_0x13aa25=(await this[_0x188ac5(0xc4)][_0x188ac5(0x109)](_0x1a9fb7))['getMemberID']();if(_0x2b6142){const _0x21e631={'memberId':_0x13aa25,'unitId':_0x1a9fb7,'content':_0x381c08,'mention':_0x2cdf86,'threadId':_0x105a58},_0x29ff43=(await this[_0x188ac5(0xc8)][_0x188ac5(0x10b)](_0x188ac5(0xc2)+_0x1a9fb7+'/reply',{'body':_0x21e631}))['body'][_0x188ac5(0x113)];return{..._0x15480f,'id':_0x29ff43['replyId'],'dT':_0x534eba['dayjs'](+_0x29ff43[_0x188ac5(0x116)])['format'](_0x188ac5(0xfd)),'personId':_0x29ff43[_0x188ac5(0xe9)]};}else{const _0x3c2d0a={'memberId':_0x13aa25,'unitId':_0x1a9fb7,'content':_0x381c08,'mention':_0x2cdf86},_0x18c05c=await this[_0x188ac5(0xc8)][_0x188ac5(0x10b)]('/universer-api/comment/unit/'+_0x1a9fb7+_0x188ac5(0xdf),{'body':_0x3c2d0a});return _0x2aa250(_0x18c05c[_0x188ac5(0xca)]['comment'],_0x15480f);}}async[_0x29560f(0x119)](_0x3bc4f2){const _0x33be60=_0x29560f;var _0x5a16f8,_0x47d31c;const {text:_0x169518,unitId:_0xde18d6}=_0x3bc4f2,_0x181922=(_0x47d31c=(_0x5a16f8=_0x169518[_0x33be60(0xb3)])==null?void 0x0:_0x5a16f8['filter'](_0x5846ef=>_0x5846ef[_0x33be60(0xa7)]===_0x534eba[_0x33be60(0x12b)][_0x33be60(0xde)])[_0x33be60(0x114)](_0x517a22=>_0x517a22['rangeId']))!=null?_0x47d31c:[],_0x311394=JSON[_0x33be60(0x115)](_0x169518),_0x182e8e=_0x3bc4f2['threadId'],_0x14c612=_0x3bc4f2['id'],_0x281a9a={'memberId':(await this[_0x33be60(0xc4)][_0x33be60(0x109)](_0xde18d6))[_0x33be60(0x117)](),'unitId':_0xde18d6,'threadId':_0x182e8e,'mention':_0x181922,'content':_0x311394,'replyId':_0x14c612},_0x3d3780=await this[_0x33be60(0xc8)]['post'](_0x33be60(0xc2)+_0xde18d6+_0x33be60(0xd0),{'body':_0x281a9a});return!_0x3d3780['body'][_0x33be60(0xbb)]||_0x3d3780[_0x33be60(0xca)][_0x33be60(0xbb)][_0x33be60(0xf3)]===0x1;}async[_0x29560f(0x126)](_0x46b17a){const _0x45ba2b=_0x29560f,{unitId:_0x3597e1}=_0x46b17a,_0x4370a2=_0x46b17a[_0x45ba2b(0xbe)],_0x4e1962={'memberId':this[_0x45ba2b(0x111)][_0x45ba2b(0xad)]()['userID'],'unitId':_0x3597e1,'threadId':_0x4370a2,'solved':_0x46b17a[_0x45ba2b(0xac)]?_0x29d1d7[_0x45ba2b(0x103)]:_0x29d1d7[_0x45ba2b(0xaf)]},_0x50eea0=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x3597e1+_0x45ba2b(0x112),{'body':_0x4e1962});return!_0x50eea0[_0x45ba2b(0xca)][_0x45ba2b(0xbb)]||_0x50eea0[_0x45ba2b(0xca)][_0x45ba2b(0xbb)][_0x45ba2b(0xf3)]===0x1;}async[_0x29560f(0x122)](_0x449b79,_0x228f0c,_0x5df298,_0x10fee4){const _0x3ae717=_0x29560f,_0x123211={'memberId':(await this['_sessionService']['requireSession'](_0x449b79))[_0x3ae717(0x117)](),'threadId':_0x5df298,'replyId':_0x10fee4,'unitId':_0x449b79},_0x4e93df=await this[_0x3ae717(0xc8)][_0x3ae717(0x10b)](_0x3ae717(0xc2)+_0x449b79+_0x3ae717(0xc7),{'body':_0x123211});return!_0x4e93df[_0x3ae717(0xca)][_0x3ae717(0xbb)]||_0x4e93df[_0x3ae717(0xca)][_0x3ae717(0xbb)][_0x3ae717(0xf3)]===0x1;}async['listComments'](_0x1aed1e,_0x351868,_0x3fd4c9){const _0x3d2725=_0x29560f,_0x5892e6={'unitId':_0x1aed1e,'threadId':_0x3fd4c9},_0x5d2259=await this[_0x3d2725(0xc8)]['post'](_0x3d2725(0xc2)+_0x1aed1e+'/list',{'body':_0x5892e6}),_0x4fef8d=_0x3fd4c9[_0x3d2725(0x114)](_0x5358e3=>_0x20b6bf(_0x5d2259['body'][_0x3d2725(0xfe)][_0x5358e3],_0x1aed1e,_0x351868))[_0x3d2725(0xf2)](Boolean);return Object[_0x3d2725(0x10c)](_0x5d2259['body'][_0x3d2725(0xb2)])[_0x3d2725(0xe2)](_0x4b5e90=>{const _0xfc4701=_0x3d2725;this[_0xfc4701(0x111)][_0xfc4701(0xeb)](_0x4b5e90);}),_0x4fef8d;}[_0x29560f(0xb0)](_0x3a4379){const _0xba88f1=_0x29560f;return{'id':_0x3a4379['id'],'threadId':_0x3a4379[_0xba88f1(0xbe)],'ref':_0x3a4379[_0xba88f1(0xfc)]};}};_0xa0207a=_0x22b0c0([_0x1db0d7(0x0,_0x534eba['Inject'](_0x3c27fd['HTTPService'])),_0x1db0d7(0x1,_0x534eba[_0x29560f(0xce)](_0x534eba[_0x29560f(0x107)])),_0x1db0d7(0x2,_0x534eba[_0x29560f(0xce)](_0x57866e[_0x29560f(0xf9)]))],_0xa0207a);var _0x22f630=Object['getOwnPropertyDescriptor'],_0xe04ed3=(_0x24edb3,_0x1912b7,_0x47a740,_0x5bac6b)=>{const _0x2ba8d4=_0x29560f;for(var _0x3e4644=_0x5bac6b>0x1?void 0x0:_0x5bac6b?_0x22f630(_0x1912b7,_0x47a740):_0x1912b7,_0x7171cb=_0x24edb3[_0x2ba8d4(0x102)]-0x1,_0x4b9500;_0x7171cb>=0x0;_0x7171cb--)(_0x4b9500=_0x24edb3[_0x7171cb])&&(_0x3e4644=_0x4b9500(_0x3e4644)||_0x3e4644);return _0x3e4644;},_0x4a30b9=(_0x2aa738,_0x5a2057)=>(_0x32eecb,_0x8eccc8)=>_0x5a2057(_0x32eecb,_0x8eccc8,_0x2aa738);let _0x9824f7=class extends _0x534eba[_0x29560f(0x11e)]{constructor(_0x5a2d99,_0x3f794b){const _0xb8ffb5=_0x29560f;super(),this['_threadCommentDataSourceService']=_0x5a2d99,this['_threadCommentDataSource']=_0x3f794b,this[_0xb8ffb5(0x125)]();}['_initDataSource'](){const _0x3061da=_0x29560f;this[_0x3061da(0xb4)]['dataSource']=this[_0x3061da(0x128)],this[_0x3061da(0xb4)]['syncUpdateMutationToColla']=!0x1;}};_0x9824f7=_0xe04ed3([_0x4a30b9(0x0,_0x9f1156['IThreadCommentDataSourceService']),_0x4a30b9(0x1,_0x534eba[_0x29560f(0xce)](_0xa0207a))],_0x9824f7);var _0xfd49c6=Object[_0x29560f(0xf4)],_0x55adcd=Object[_0x29560f(0x110)],_0x251c4a=(_0x1a7464,_0x4372b6,_0x3fd7eb)=>_0x4372b6 in _0x1a7464?_0xfd49c6(_0x1a7464,_0x4372b6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3fd7eb}):_0x1a7464[_0x4372b6]=_0x3fd7eb,_0x252366=(_0x1c4550,_0x292abb,_0xae7eca,_0xe17483)=>{const _0x45240a=_0x29560f;for(var _0x133c78=_0xe17483>0x1?void 0x0:_0xe17483?_0x55adcd(_0x292abb,_0xae7eca):_0x292abb,_0x43547b=_0x1c4550[_0x45240a(0x102)]-0x1,_0x36c8fa;_0x43547b>=0x0;_0x43547b--)(_0x36c8fa=_0x1c4550[_0x43547b])&&(_0x133c78=_0x36c8fa(_0x133c78)||_0x133c78);return _0x133c78;},_0x1e760b=(_0x228d18,_0x4072c5)=>(_0x1fc217,_0x2e6209)=>_0x4072c5(_0x1fc217,_0x2e6209,_0x228d18),_0xa6e0b2=(_0x297776,_0x287dcc,_0x1953c4)=>_0x251c4a(_0x297776,typeof _0x287dcc!=_0x29560f(0xd8)?_0x287dcc+'':_0x287dcc,_0x1953c4);_0x5243dd['UniverThreadCommentDataSourcePlugin']=class extends _0x534eba[_0x29560f(0xbf)]{constructor(_0xaf51d7=_0x4db5f3,_0x5c2758,_0x22fa21){const _0x255a95=_0x29560f;super(),this[_0x255a95(0xcb)]=_0xaf51d7,this[_0x255a95(0xb1)]=_0x5c2758,this[_0x255a95(0xc6)]=_0x22fa21;const {..._0x512692}=_0x534eba[_0x255a95(0xc3)]({},_0x4db5f3,this[_0x255a95(0xcb)]);this[_0x255a95(0xc6)]['setConfig'](_0x2fb9b9,_0x512692);}[_0x29560f(0xda)](){const _0x2dd43d=_0x29560f;[[_0xa0207a],[_0x9824f7],[_0x2e2e16]][_0x2dd43d(0xe2)](_0x3302aa=>{const _0x4810cb=_0x2dd43d;this[_0x4810cb(0xb1)][_0x4810cb(0xea)](_0x3302aa);});}[_0x29560f(0xfb)](){const _0x3b14b8=_0x29560f;this[_0x3b14b8(0xb1)][_0x3b14b8(0xf7)](_0x9824f7),this[_0x3b14b8(0xb1)]['get'](_0x2e2e16);}},_0xa6e0b2(_0x5243dd[_0x29560f(0xcf)],'pluginName',_0x1bd9ca),_0xa6e0b2(_0x5243dd['UniverThreadCommentDataSourcePlugin'],_0x29560f(0xd9),_0x534eba['UniverInstanceType'][_0x29560f(0xd2)]),_0x5243dd['UniverThreadCommentDataSourcePlugin']=_0x252366([_0x534eba[_0x29560f(0xa8)](_0x1a8000[_0x29560f(0x10d)],_0x57866e[_0x29560f(0x106)],_0x5473a2[_0x29560f(0xbd)]),_0x1e760b(0x1,_0x534eba['Inject'](_0x534eba[_0x29560f(0xb7)])),_0x1e760b(0x2,_0x534eba[_0x29560f(0xb6)])],_0x5243dd[_0x29560f(0xcf)]),Object[_0x29560f(0xf4)](_0x5243dd,Symbol[_0x29560f(0x11d)],{'value':_0x29560f(0xe8)});}));function _0x779c(_0x2a1b1c,_0xc7b3ef){const _0x1f480c=_0x1f48();return _0x779c=function(_0x779cc,_0x207d57){_0x779cc=_0x779cc-0xa7;let _0xadf0ca=_0x1f480c[_0x779cc];return _0xadf0ca;},_0x779c(_0x2a1b1c,_0xc7b3ef);}function _0x1f48(){const _0x305964=['user','bufferTime','forEach','unitId','_commentService','addComment','100452YSFwqp','@univerjs-pro/collaboration-client','Module','userId','add','addUser','Reply','amd','commentUpdate$','@univerjs/network','replyId','replies','filter','code','defineProperty','content','2CyVEqY','get','rangeId','CollaborationSessionService','find','onReady','ref','YYYY/MM/DD\x20HH:mm','comments','54055898TPGQNU','root','Add','length','Solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','1235499HVRFDi','UniverCollaborationClientPlugin','UserManagerService','UniverProCollaborationClient','requireSession','pipe','post','values','UniverThreadCommentUIPlugin','HTTPService','delete','getOwnPropertyDescriptor','_userService','/solved','reply','map','stringify','createTimestamp','getMemberID','payload','updateComment','_threadCommentModel','Unknown','format','toStringTag','Disposable','size','132vLZbRW','Edit','deleteComment','solved','UniverNetwork','_initDataSource','resolveComment','_init','_threadCommentDataSource','12BzWcsw','UniverThreadComment','CustomRangeType','rangeType','DependentOn','subscribe','UNRECOGNIZED','4998fyDmMx','resolved','getCurrentUser','CommentService','OpenOrReOpen','saveCommentToSnapshot','_injector','users','customRanges','_threadCommentDataSourceService','dayjs','IConfigService','Injector','2456392DRMDdQ','8328zfWqFK','4505905IjNlWw','error','parentId','UniverLicensePlugin','threadId','Plugin','Delete','230frarrg','/universer-api/comment/unit/','merge','_sessionService','Solve','_configService','/delete','_httpService','disposeWithMe','body','_config','_initUserSync','9PDvMpU','Inject','UniverThreadCommentDataSourcePlugin','/edit','parse','UNIVER_UNKNOWN','262086YefIct','UniverProThreadCommentDatasource','personId','function','getUnit','symbol','type','onStarting','@univerjs/core','UniverThreadCommentUi','/universer-api/user/list','COMMENT','/add'];_0x1f48=function(){return _0x305964;};return _0x1f48();}
|
|
1
|
+
function _0x1f0c(_0x3ef45c,_0x4f2046){const _0x1fde67=_0x1fde();return _0x1f0c=function(_0x1f0c3b,_0x9900f4){_0x1f0c3b=_0x1f0c3b-0xe1;let _0x19e2c1=_0x1fde67[_0x1f0c3b];return _0x19e2c1;},_0x1f0c(_0x3ef45c,_0x4f2046);}(function(_0x4ca8f5,_0x43720e){const _0x221748=_0x1f0c,_0x377697=_0x4ca8f5();while(!![]){try{const _0x24a847=-parseInt(_0x221748(0x165))/0x1*(parseInt(_0x221748(0x146))/0x2)+parseInt(_0x221748(0x113))/0x3*(-parseInt(_0x221748(0x110))/0x4)+-parseInt(_0x221748(0xed))/0x5*(parseInt(_0x221748(0x109))/0x6)+-parseInt(_0x221748(0xe8))/0x7*(parseInt(_0x221748(0x14e))/0x8)+parseInt(_0x221748(0x117))/0x9*(parseInt(_0x221748(0x108))/0xa)+-parseInt(_0x221748(0x12e))/0xb*(parseInt(_0x221748(0xe7))/0xc)+parseInt(_0x221748(0x136))/0xd;if(_0x24a847===_0x43720e)break;else _0x377697['push'](_0x377697['shift']());}catch(_0xf97030){_0x377697['push'](_0x377697['shift']());}}}(_0x1fde,0x20b68),function(_0x3520e9,_0x449285){const _0x1d9584=_0x1f0c;typeof exports=='object'&&typeof module<'u'?_0x449285(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x1d9584(0x153)&&define[_0x1d9584(0x118)]?define(['exports',_0x1d9584(0xf1),_0x1d9584(0xf8),_0x1d9584(0x15c),_0x1d9584(0xeb),_0x1d9584(0x132),_0x1d9584(0xec),_0x1d9584(0x107)],_0x449285):(_0x3520e9=typeof globalThis<'u'?globalThis:_0x3520e9||self,_0x449285(_0x3520e9[_0x1d9584(0x125)]={},_0x3520e9[_0x1d9584(0xe6)],_0x3520e9[_0x1d9584(0x162)],_0x3520e9[_0x1d9584(0x15b)],_0x3520e9['UniverThreadCommentUi'],_0x3520e9[_0x1d9584(0xfc)],_0x3520e9[_0x1d9584(0xec)],_0x3520e9['UniverNetwork']));}(this,function(_0x1812bf,_0x53a0d2,_0x481f6b,_0x4e03f5,_0x377150,_0x2f2ab9,_0x2cbfc0,_0x3ca965){'use strict';const _0x26004a=_0x1f0c;const _0x4a0e0e='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x40d01b=(_0x28a3a7=>(_0x28a3a7[_0x28a3a7[_0x26004a(0x13b)]=0x0]=_0x26004a(0x13b),_0x28a3a7[_0x28a3a7[_0x26004a(0xfa)]=0x1]=_0x26004a(0xfa),_0x28a3a7[_0x28a3a7[_0x26004a(0x131)]=-0x1]='UNRECOGNIZED',_0x28a3a7))(_0x40d01b||{}),_0x138f2b=(_0x2c9cb1=>(_0x2c9cb1[_0x2c9cb1[_0x26004a(0x10e)]=0x0]=_0x26004a(0x10e),_0x2c9cb1[_0x2c9cb1[_0x26004a(0x163)]=0x1]=_0x26004a(0x163),_0x2c9cb1[_0x2c9cb1['Reply']=0x2]=_0x26004a(0xfe),_0x2c9cb1[_0x2c9cb1[_0x26004a(0x11d)]=0x3]=_0x26004a(0x11d),_0x2c9cb1[_0x2c9cb1[_0x26004a(0x160)]=0x4]='Delete',_0x2c9cb1[_0x2c9cb1[_0x26004a(0x128)]=0x5]=_0x26004a(0x128),_0x2c9cb1[_0x2c9cb1[_0x26004a(0x131)]=-0x1]='UNRECOGNIZED',_0x2c9cb1))(_0x138f2b||{});const _0x1f5e7f=_0x45358a=>_0x4e03f5[_0x26004a(0x155)](new Date(+_0x45358a))['format']('YYYY/MM/DD\x20HH:mm'),_0x19bf2f=async(_0x27a385,_0x481241)=>{const _0x45b921=_0x26004a,_0x1aad2c=_0x27a385['get'](_0x4e03f5['UserManagerService']),_0x1d629a=_0x27a385[_0x45b921(0xfd)](_0x3ca965[_0x45b921(0x13a)]);_0x481241[_0x45b921(0x15a)](_0x373e72=>{const _0xd5b99e=_0x45b921;_0x1aad2c[_0xd5b99e(0x14a)](_0x373e72)&&_0x481241[_0xd5b99e(0x158)](_0x373e72);}),_0x481241[_0x45b921(0x11e)]&&(await _0x1d629a[_0x45b921(0xfd)](_0x45b921(0x15e),{'params':{'userIDs':[..._0x481241]}}))['body'][_0x45b921(0xe5)][_0x45b921(0x15a)](_0xd1ec02=>{const _0x50b3a5=_0x45b921;_0xd1ec02&&_0x1aad2c[_0x50b3a5(0x124)](_0xd1ec02);});};var _0x23dec8=Object[_0x26004a(0x10a)],_0x328dc9=(_0xffaa6c,_0x1e1908,_0x4dac8a,_0x559b0c)=>{const _0x1aa1b8=_0x26004a;for(var _0x299c0a=_0x559b0c>0x1?void 0x0:_0x559b0c?_0x23dec8(_0x1e1908,_0x4dac8a):_0x1e1908,_0x13f80b=_0xffaa6c[_0x1aa1b8(0x164)]-0x1,_0x4d7f36;_0x13f80b>=0x0;_0x13f80b--)(_0x4d7f36=_0xffaa6c[_0x13f80b])&&(_0x299c0a=_0x4d7f36(_0x299c0a)||_0x299c0a);return _0x299c0a;},_0x1a4246=(_0x3126f4,_0x387b67)=>(_0x5afcc9,_0x5831a2)=>_0x387b67(_0x5afcc9,_0x5831a2,_0x3126f4);let _0x4cd53f=class extends _0x4e03f5['Disposable']{constructor(_0x68f521,_0x21ef8f,_0x4d81f4,_0x4ee209){const _0xee2d65=_0x26004a;super(),this['_commentService']=_0x68f521,this[_0xee2d65(0x13d)]=_0x21ef8f,this[_0xee2d65(0x104)]=_0x4d81f4,this[_0xee2d65(0x10f)]=_0x4ee209,this[_0xee2d65(0xf6)](),this[_0xee2d65(0x134)]();}[_0x26004a(0x134)](){const _0x23b3b0=_0x26004a;this['disposeWithMe'](this[_0x23b3b0(0x13d)]['commentUpdate$'][_0x23b3b0(0x144)](_0x2cbfc0[_0x23b3b0(0xe1)](0x10))[_0x23b3b0(0xee)](_0x83bdaf=>{const _0x25da11=_0x23b3b0,_0x5635c4=new Set();_0x83bdaf[_0x25da11(0x15a)](_0x2fa831=>{const _0x39af63=_0x25da11;switch(_0x2fa831[_0x39af63(0x11c)]){case'add':{const _0xe4caa=_0x2fa831[_0x39af63(0x148)][_0x39af63(0x137)];_0x5635c4['add'](_0xe4caa);break;}}}),_0x19bf2f(this[_0x25da11(0x10f)],_0x5635c4);}));}[_0x26004a(0xf6)](){const _0x46acec=_0x26004a;this['disposeWithMe'](this['_commentService'][_0x46acec(0x142)][_0x46acec(0xee)](async _0x3ff8f5=>{const _0x4811ec=_0x46acec;var _0x597b64,_0x262bac,_0x32e883,_0x5774fa;const _0x266d8a=(_0x597b64=this[_0x4811ec(0x13d)][_0x4811ec(0x12c)](_0x3ff8f5['unitId'])[_0x4811ec(0x11b)](_0x4fe11c=>_0x4fe11c[_0x4811ec(0x12a)]===_0x3ff8f5[_0x4811ec(0x12a)]))==null?void 0x0:_0x597b64[_0x4811ec(0x100)];if(!_0x266d8a)return;const {unitId:_0x42098a,subUnitId:_0x5cfb33}=_0x266d8a;switch(_0x3ff8f5[_0x4811ec(0x16b)]&&this[_0x4811ec(0x104)][_0x4811ec(0x124)](_0x3ff8f5['user']),_0x3ff8f5[_0x4811ec(0x11c)]){case _0x138f2b[_0x4811ec(0x163)]:break;case _0x138f2b[_0x4811ec(0xfe)]:{this[_0x4811ec(0x13d)][_0x4811ec(0x14d)](_0x42098a,_0x5cfb33,{'unitId':_0x42098a,'subUnitId':_0x5cfb33,'ref':'','id':_0x3ff8f5['replyId'],'dT':_0x1f5e7f(+_0x3ff8f5[_0x4811ec(0x122)]),'threadId':_0x3ff8f5[_0x4811ec(0x12a)],'personId':(_0x32e883=(_0x262bac=_0x3ff8f5[_0x4811ec(0x16b)])==null?void 0x0:_0x262bac[_0x4811ec(0x13f)])!=null?_0x32e883:_0x3ff8f5['userId'],'text':JSON[_0x4811ec(0x167)](_0x3ff8f5[_0x4811ec(0x161)]),'parentId':_0x266d8a['id']});break;}case _0x138f2b[_0x4811ec(0x160)]:{const _0x27c838=this[_0x4811ec(0x13d)][_0x4811ec(0x10d)](_0x42098a,_0x5cfb33,_0x3ff8f5[_0x4811ec(0xe2)]);_0x27c838&&_0x27c838[_0x4811ec(0xf2)]&&this[_0x4811ec(0x13d)][_0x4811ec(0x157)](_0x42098a,_0x5cfb33,_0x3ff8f5[_0x4811ec(0xe2)]);break;}case _0x138f2b[_0x4811ec(0x11d)]:{this['_threadCommentModel'][_0x4811ec(0x135)](_0x42098a,_0x5cfb33,{'commentId':_0x3ff8f5[_0x4811ec(0xe2)],'text':JSON[_0x4811ec(0x167)](_0x3ff8f5['content'])});break;}case _0x138f2b['Solve']:{const _0x2dd667=(_0x5774fa=this['_threadCommentModel']['getUnit'](_0x3ff8f5[_0x4811ec(0x16c)])[_0x4811ec(0x11b)](_0x20b300=>_0x20b300[_0x4811ec(0x12a)]===_0x3ff8f5[_0x4811ec(0x12a)]))==null?void 0x0:_0x5774fa[_0x4811ec(0x100)];_0x2dd667&&this[_0x4811ec(0x13d)]['resolveComment'](_0x42098a,_0x5cfb33,_0x2dd667['id'],_0x3ff8f5['solved']===_0x40d01b[_0x4811ec(0xfa)]);break;}}}));}};_0x4cd53f=_0x328dc9([_0x1a4246(0x0,_0x4e03f5['Inject'](_0x53a0d2[_0x26004a(0x151)])),_0x1a4246(0x1,_0x4e03f5['Inject'](_0x2f2ab9['ThreadCommentModel'])),_0x1a4246(0x2,_0x4e03f5[_0x26004a(0xf0)](_0x4e03f5['UserManagerService'])),_0x1a4246(0x3,_0x4e03f5[_0x26004a(0xf0)](_0x4e03f5['Injector']))],_0x4cd53f);const _0x3f49b4=_0x26004a(0x13e),_0x32c45a={};var _0x2e3587=Object['getOwnPropertyDescriptor'],_0x23fee2=(_0x36feea,_0x3ca54f,_0x5c43b4,_0x2ce9eb)=>{const _0x5484b1=_0x26004a;for(var _0x3a69b8=_0x2ce9eb>0x1?void 0x0:_0x2ce9eb?_0x2e3587(_0x3ca54f,_0x5c43b4):_0x3ca54f,_0x1ed29c=_0x36feea[_0x5484b1(0x164)]-0x1,_0x2c4ee7;_0x1ed29c>=0x0;_0x1ed29c--)(_0x2c4ee7=_0x36feea[_0x1ed29c])&&(_0x3a69b8=_0x2c4ee7(_0x3a69b8)||_0x3a69b8);return _0x3a69b8;},_0x4a34ac=(_0x2e86b8,_0x5cfa71)=>(_0x57bf01,_0x56b91a)=>_0x5cfa71(_0x57bf01,_0x56b91a,_0x2e86b8);function _0x50f40d(_0x442064,_0xe5cb2f){const _0x3b0786=_0x26004a,_0x40b23b=_0x442064[_0x3b0786(0x145)][0x0];return{..._0xe5cb2f,'id':_0x40b23b[_0x3b0786(0xe2)],'resolved':_0x442064[_0x3b0786(0x150)]===0x1,'dT':_0x1f5e7f(_0x40b23b['createTimestamp']),'personId':_0x40b23b[_0x3b0786(0x14b)],'threadId':_0x40b23b[_0x3b0786(0x12a)]};}function _0x4161cc(_0x45038d,_0x23612d,_0x550362){const _0x28606c=_0x26004a;var _0x1b308a,_0x3c7f5c;if(((_0x3c7f5c=(_0x1b308a=_0x45038d==null?void 0x0:_0x45038d[_0x28606c(0x145)])==null?void 0x0:_0x1b308a[_0x28606c(0x164)])!=null?_0x3c7f5c:0x0)>0x0){const _0xd5ccc6=(_0x1c7c53,_0x5f399f)=>({'id':_0x1c7c53[_0x28606c(0xe2)],'threadId':_0x1c7c53[_0x28606c(0x12a)],'dT':_0x1f5e7f(_0x1c7c53['createTimestamp']),'personId':_0x1c7c53['userId'],'resolved':_0x45038d[_0x28606c(0x150)]===_0x40d01b[_0x28606c(0xfa)],'unitId':_0x23612d,'subUnitId':_0x550362,'text':JSON[_0x28606c(0x167)](_0x1c7c53[_0x28606c(0x161)]),'parentId':_0x5f399f}),_0x5510df=_0xd5ccc6(_0x45038d['replies'][0x0]);return{..._0x5510df,'children':_0x45038d[_0x28606c(0x145)][_0x28606c(0x12b)](0x1)[_0x28606c(0x111)](_0x5e344b=>_0xd5ccc6(_0x5e344b,_0x5510df['id']))};}return null;}let _0x4cdabd=class{constructor(_0x1c0ec5,_0x5999f3,_0x5dff14){const _0x470a39=_0x26004a;this['_httpService']=_0x1c0ec5,this[_0x470a39(0x104)]=_0x5999f3,this['_sessionService']=_0x5dff14;}async[_0x26004a(0x14d)](_0x4b5992){const _0x52736b=_0x26004a;var _0x466ea5,_0x10b189;const {parentId:_0x38841c,unitId:_0x4847ea,text:_0xfd9516,threadId:_0x5ae0e1}=_0x4b5992,_0x2a41f3=(_0x10b189=(_0x466ea5=_0xfd9516['customRanges'])==null?void 0x0:_0x466ea5[_0x52736b(0xf9)](_0x28702b=>_0x28702b[_0x52736b(0x102)]===_0x4e03f5[_0x52736b(0x106)][_0x52736b(0x12d)])[_0x52736b(0x111)](_0x32f29e=>_0x32f29e[_0x52736b(0x168)]))!=null?_0x10b189:[],_0xbe13e6=JSON[_0x52736b(0x130)](_0xfd9516),_0xcca53e=(await this[_0x52736b(0x159)]['requireSession'](_0x4847ea))[_0x52736b(0x12f)]();if(_0x38841c){const _0x36fbb6={'memberId':_0xcca53e,'unitId':_0x4847ea,'content':_0xbe13e6,'mention':_0x2a41f3,'threadId':_0x5ae0e1},_0x2c58f4=(await this[_0x52736b(0xfb)][_0x52736b(0xf3)](_0x52736b(0x129)+_0x4847ea+_0x52736b(0x13c),{'body':_0x36fbb6}))[_0x52736b(0x140)][_0x52736b(0x123)];return{..._0x4b5992,'id':_0x2c58f4[_0x52736b(0xe2)],'dT':_0x4e03f5[_0x52736b(0x155)](+_0x2c58f4[_0x52736b(0x122)])[_0x52736b(0x14f)](_0x52736b(0x139)),'personId':_0x2c58f4['userId']};}else{const _0x4028ba={'memberId':_0xcca53e,'unitId':_0x4847ea,'content':_0xbe13e6,'mention':_0x2a41f3},_0x425f8b=await this['_httpService']['post'](_0x52736b(0x129)+_0x4847ea+'/add',{'body':_0x4028ba});return _0x50f40d(_0x425f8b[_0x52736b(0x140)]['comment'],_0x4b5992);}}async['updateComment'](_0x51c7fe){const _0x360fe6=_0x26004a;var _0x254942,_0x3db29e;const {text:_0x29fb83,unitId:_0x3db13f}=_0x51c7fe,_0x4a955b=(_0x3db29e=(_0x254942=_0x29fb83[_0x360fe6(0xf4)])==null?void 0x0:_0x254942['filter'](_0x95a85f=>_0x95a85f[_0x360fe6(0x102)]===_0x4e03f5[_0x360fe6(0x106)][_0x360fe6(0x12d)])['map'](_0x24ab1b=>_0x24ab1b['rangeId']))!=null?_0x3db29e:[],_0x413ce1=JSON[_0x360fe6(0x130)](_0x29fb83),_0x422c5a=_0x51c7fe[_0x360fe6(0x12a)],_0x457950=_0x51c7fe['id'],_0x4714c1={'memberId':(await this[_0x360fe6(0x159)][_0x360fe6(0x101)](_0x3db13f))[_0x360fe6(0x12f)](),'unitId':_0x3db13f,'threadId':_0x422c5a,'mention':_0x4a955b,'content':_0x413ce1,'replyId':_0x457950},_0x5779f6=await this[_0x360fe6(0xfb)][_0x360fe6(0xf3)](_0x360fe6(0x129)+_0x3db13f+_0x360fe6(0x169),{'body':_0x4714c1});return!_0x5779f6[_0x360fe6(0x140)][_0x360fe6(0x138)]||_0x5779f6['body'][_0x360fe6(0x138)][_0x360fe6(0x126)]===0x1;}async['resolveComment'](_0x1767bc){const _0x8905da=_0x26004a,{unitId:_0x2feafd}=_0x1767bc,_0x2fc52c=_0x1767bc[_0x8905da(0x12a)],_0x36083f={'memberId':this['_userService'][_0x8905da(0x141)]()[_0x8905da(0x13f)],'unitId':_0x2feafd,'threadId':_0x2fc52c,'solved':_0x1767bc[_0x8905da(0x105)]?_0x40d01b[_0x8905da(0xfa)]:_0x40d01b[_0x8905da(0x13b)]},_0x163169=await this['_httpService'][_0x8905da(0xf3)](_0x8905da(0x129)+_0x2feafd+_0x8905da(0x166),{'body':_0x36083f});return!_0x163169[_0x8905da(0x140)]['error']||_0x163169[_0x8905da(0x140)][_0x8905da(0x138)][_0x8905da(0x126)]===0x1;}async['deleteComment'](_0x508045,_0x2e61ff,_0x42c85c,_0x4c765e){const _0x1d4220=_0x26004a,_0x33bc6e={'memberId':(await this[_0x1d4220(0x159)][_0x1d4220(0x101)](_0x508045))['getMemberID'](),'threadId':_0x42c85c,'replyId':_0x4c765e,'unitId':_0x508045},_0x1b9bd1=await this['_httpService'][_0x1d4220(0xf3)](_0x1d4220(0x129)+_0x508045+_0x1d4220(0x11f),{'body':_0x33bc6e});return!_0x1b9bd1['body'][_0x1d4220(0x138)]||_0x1b9bd1[_0x1d4220(0x140)]['error']['code']===0x1;}async[_0x26004a(0x147)](_0x23807b,_0x7e9b37,_0x3f112c){const _0x5a7ba1=_0x26004a,_0x4d711c={'unitId':_0x23807b,'threadId':_0x3f112c},_0x2ebd9c=await this[_0x5a7ba1(0xfb)][_0x5a7ba1(0xf3)](_0x5a7ba1(0x129)+_0x23807b+'/list',{'body':_0x4d711c}),_0x50df0f=_0x3f112c[_0x5a7ba1(0x111)](_0x4ecf7c=>_0x4161cc(_0x2ebd9c[_0x5a7ba1(0x140)][_0x5a7ba1(0x154)][_0x4ecf7c],_0x23807b,_0x7e9b37))[_0x5a7ba1(0xf9)](Boolean);return Object[_0x5a7ba1(0x133)](_0x2ebd9c[_0x5a7ba1(0x140)]['users'])[_0x5a7ba1(0x15a)](_0x175b77=>{const _0x107818=_0x5a7ba1;this[_0x107818(0x104)][_0x107818(0x124)](_0x175b77);}),_0x50df0f;}[_0x26004a(0xf7)](_0x4ba1ff){const _0x51214c=_0x26004a;return{'id':_0x4ba1ff['id'],'threadId':_0x4ba1ff[_0x51214c(0x12a)],'ref':_0x4ba1ff[_0x51214c(0x149)]};}};_0x4cdabd=_0x23fee2([_0x4a34ac(0x0,_0x4e03f5['Inject'](_0x3ca965['HTTPService'])),_0x4a34ac(0x1,_0x4e03f5[_0x26004a(0xf0)](_0x4e03f5['UserManagerService'])),_0x4a34ac(0x2,_0x4e03f5[_0x26004a(0xf0)](_0x53a0d2['CollaborationSessionService']))],_0x4cdabd);var _0x13d8c3=Object[_0x26004a(0x10a)],_0x23c0eb=(_0x182af6,_0x145463,_0x4ef266,_0x30d9c4)=>{const _0x2d81e8=_0x26004a;for(var _0x2f71e1=_0x30d9c4>0x1?void 0x0:_0x30d9c4?_0x13d8c3(_0x145463,_0x4ef266):_0x145463,_0x34d278=_0x182af6[_0x2d81e8(0x164)]-0x1,_0x416479;_0x34d278>=0x0;_0x34d278--)(_0x416479=_0x182af6[_0x34d278])&&(_0x2f71e1=_0x416479(_0x2f71e1)||_0x2f71e1);return _0x2f71e1;},_0x3c7fa9=(_0x28be74,_0x1b02ee)=>(_0x1c386c,_0x4919a4)=>_0x1b02ee(_0x1c386c,_0x4919a4,_0x28be74);let _0x406b40=class extends _0x4e03f5[_0x26004a(0x119)]{constructor(_0x4ab3a5,_0x3f0407){const _0x3900cc=_0x26004a;super(),this['_threadCommentDataSourceService']=_0x4ab3a5,this[_0x3900cc(0xef)]=_0x3f0407,this['_initDataSource']();}[_0x26004a(0xea)](){const _0x5b1292=_0x26004a;this[_0x5b1292(0x115)][_0x5b1292(0x120)]=this[_0x5b1292(0xef)],this[_0x5b1292(0x115)][_0x5b1292(0x116)]=!0x1;}};_0x406b40=_0x23c0eb([_0x3c7fa9(0x0,_0x2f2ab9[_0x26004a(0x127)]),_0x3c7fa9(0x1,_0x4e03f5['Inject'](_0x4cdabd))],_0x406b40);var _0x3ceb0a=Object['defineProperty'],_0x5c14f5=Object['getOwnPropertyDescriptor'],_0x3f9d24=(_0x1e5822,_0x310981,_0x5524f9)=>_0x310981 in _0x1e5822?_0x3ceb0a(_0x1e5822,_0x310981,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5524f9}):_0x1e5822[_0x310981]=_0x5524f9,_0x46b467=(_0x1fdec1,_0xa27ff5,_0x5709fc,_0x47eaf9)=>{const _0x554b8c=_0x26004a;for(var _0x167e3b=_0x47eaf9>0x1?void 0x0:_0x47eaf9?_0x5c14f5(_0xa27ff5,_0x5709fc):_0xa27ff5,_0x20d668=_0x1fdec1[_0x554b8c(0x164)]-0x1,_0x36d26a;_0x20d668>=0x0;_0x20d668--)(_0x36d26a=_0x1fdec1[_0x20d668])&&(_0x167e3b=_0x36d26a(_0x167e3b)||_0x167e3b);return _0x167e3b;},_0x3ee0c0=(_0x3af733,_0x269093)=>(_0x272494,_0x70b85e)=>_0x269093(_0x272494,_0x70b85e,_0x3af733),_0x52bb14=(_0xdd445d,_0xe53dbf,_0x4697e8)=>_0x3f9d24(_0xdd445d,typeof _0xe53dbf!=_0x26004a(0x11a)?_0xe53dbf+'':_0xe53dbf,_0x4697e8);_0x1812bf[_0x26004a(0x143)]=class extends _0x4e03f5[_0x26004a(0xe3)]{constructor(_0x4c2d6a=_0x32c45a,_0x120982,_0x3afc2a){const _0x2ba581=_0x26004a;super(),this['_config']=_0x4c2d6a,this[_0x2ba581(0x10f)]=_0x120982,this[_0x2ba581(0x156)]=_0x3afc2a;const {..._0xbd74b4}=_0x4e03f5[_0x2ba581(0xf5)]({},_0x32c45a,this[_0x2ba581(0xe9)]);this['_configService'][_0x2ba581(0x14c)](_0x3f49b4,_0xbd74b4);}[_0x26004a(0xff)](){[[_0x4cdabd],[_0x406b40],[_0x4cd53f]]['forEach'](_0x44d3b1=>{const _0x2cf0c6=_0x1f0c;this[_0x2cf0c6(0x10f)]['add'](_0x44d3b1);});}[_0x26004a(0x16e)](){const _0x4609cc=_0x26004a;this['_injector'][_0x4609cc(0xfd)](_0x406b40),this[_0x4609cc(0x10f)][_0x4609cc(0xfd)](_0x4cd53f);}},_0x52bb14(_0x1812bf['UniverThreadCommentDataSourcePlugin'],_0x26004a(0x114),_0x4a0e0e),_0x52bb14(_0x1812bf[_0x26004a(0x143)],_0x26004a(0x11c),_0x4e03f5[_0x26004a(0x121)][_0x26004a(0x15f)]),_0x1812bf[_0x26004a(0x143)]=_0x46b467([_0x4e03f5[_0x26004a(0x10c)](_0x377150[_0x26004a(0x16a)],_0x53a0d2[_0x26004a(0x112)],_0x481f6b[_0x26004a(0x16d)]),_0x3ee0c0(0x1,_0x4e03f5[_0x26004a(0xf0)](_0x4e03f5[_0x26004a(0x103)])),_0x3ee0c0(0x2,_0x4e03f5[_0x26004a(0x10b)])],_0x1812bf[_0x26004a(0x143)]),Object[_0x26004a(0x152)](_0x1812bf,Symbol[_0x26004a(0xe4)],{'value':_0x26004a(0x15d)});}));function _0x1fde(){const _0x43d12a=['updateComment','8543028GJENlb','personId','error','YYYY/MM/DD\x20HH:mm','HTTPService','OpenOrReOpen','/reply','_threadCommentModel','thread-comment-data-source.config','userID','body','getCurrentUser','commentUpdate$','UniverThreadCommentDataSourcePlugin','pipe','replies','518iCzsWJ','listComments','payload','ref','getUser','userId','setConfig','addComment','301448mRjRAB','format','solved','CommentService','defineProperty','function','comments','dayjs','_configService','deleteComment','delete','_sessionService','forEach','UniverCore','@univerjs/core','Module','/universer-api/user/list','UNIVER_UNKNOWN','Delete','content','UniverProLicense','Add','length','167OxYvaU','/solved','parse','rangeId','/edit','UniverThreadCommentUIPlugin','user','unitId','UniverLicensePlugin','onReady','bufferTime','replyId','Plugin','toStringTag','users','UniverProCollaborationClient','36CiEqvC','7WDzPAI','_config','_initDataSource','@univerjs/thread-comment-ui','rxjs','5iHOGFc','subscribe','_threadCommentDataSource','Inject','@univerjs-pro/collaboration-client','parentId','post','customRanges','merge','_init','saveCommentToSnapshot','@univerjs-pro/license','filter','Solved','_httpService','UniverThreadComment','get','Reply','onStarting','root','requireSession','rangeType','Injector','_userService','resolved','CustomRangeType','@univerjs/network','330dNgwMP','1074318uoDCJW','getOwnPropertyDescriptor','IConfigService','DependentOn','getComment','Unknown','_injector','269788HyGnjm','map','UniverCollaborationClientPlugin','6eZmizk','pluginName','_threadCommentDataSourceService','syncUpdateMutationToColla','27567wnNnov','amd','Disposable','symbol','find','type','Edit','size','/delete','dataSource','UniverInstanceType','createTimestamp','reply','addUser','UniverProThreadCommentDatasource','code','IThreadCommentDataSourceService','Solve','/universer-api/comment/unit/','threadId','slice','getUnit','COMMENT','840994ezrDAk','getMemberID','stringify','UNRECOGNIZED','@univerjs/thread-comment','values','_initUserSync'];_0x1fde=function(){return _0x43d12a;};return _0x1fde();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2-experimental.20251129-0fa20cd",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/
|
|
49
|
-
"@univerjs
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/thread-comment": "0.12.
|
|
52
|
-
"@univerjs/thread-comment-ui": "0.12.1-nightly.202511221011",
|
|
48
|
+
"@univerjs-pro/license": "0.12.2-experimental.20251129-0fa20cd",
|
|
49
|
+
"@univerjs/core": "0.12.2-experimental.20251129-0fa20cd",
|
|
50
|
+
"@univerjs/network": "0.12.2-experimental.20251129-0fa20cd",
|
|
51
|
+
"@univerjs/thread-comment": "0.12.2-experimental.20251129-0fa20cd",
|
|
53
52
|
"@univerjs/protocol": "0.1.47",
|
|
54
|
-
"@univerjs/
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.12.2-experimental.20251129-0fa20cd",
|
|
54
|
+
"@univerjs-pro/collaboration-client": "0.12.2-experimental.20251129-0fa20cd"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.9.3",
|
|
59
|
-
"vite": "^7.2.
|
|
60
|
-
"vitest": "^
|
|
61
|
-
"@univerjs-infra/shared": "0.12.
|
|
59
|
+
"vite": "^7.2.4",
|
|
60
|
+
"vitest": "^4.0.14",
|
|
61
|
+
"@univerjs-infra/shared": "0.12.2"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|