@univerjs-pro/thread-comment-datasource 0.6.7-experimental.20250331-1a09136 → 0.6.7-experimental.20250331-45dde91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x4f7d5f=_0x4576;(function(_0x1ed414,_0x53fd5c){const _0x57a443=_0x4576,_0x5d9ee5=_0x1ed414();while(!![]){try{const _0x585afb=-parseInt(_0x57a443(0xfa))/0x1+-parseInt(_0x57a443(0x132))/0x2*(parseInt(_0x57a443(0x135))/0x3)+-parseInt(_0x57a443(0x123))/0x4+-parseInt(_0x57a443(0x160))/0x5+parseInt(_0x57a443(0x12e))/0x6+parseInt(_0x57a443(0x143))/0x7*(parseInt(_0x57a443(0x16e))/0x8)+parseInt(_0x57a443(0x164))/0x9;if(_0x585afb===_0x53fd5c)break;else _0x5d9ee5['push'](_0x5d9ee5['shift']());}catch(_0x3a3f5a){_0x5d9ee5['push'](_0x5d9ee5['shift']());}}}(_0x105b,0x3592d));Object['defineProperty'](exports,Symbol[_0x4f7d5f(0x104)],{'value':_0x4f7d5f(0x12d)});const b=require(_0x4f7d5f(0x13a)),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require(_0x4f7d5f(0xfb)),M=require(_0x4f7d5f(0x129)),w=require(_0x4f7d5f(0x150)),P=require(_0x4f7d5f(0x157)),U=_0x4f7d5f(0x141);var I=(_0x18c264=>(_0x18c264[_0x18c264[_0x4f7d5f(0x112)]=0x0]=_0x4f7d5f(0x112),_0x18c264[_0x18c264[_0x4f7d5f(0x156)]=0x1]=_0x4f7d5f(0x156),_0x18c264[_0x18c264[_0x4f7d5f(0x12f)]=-0x1]=_0x4f7d5f(0x12f),_0x18c264))(I||{}),v=(_0x339c76=>(_0x339c76[_0x339c76['Unknown']=0x0]=_0x4f7d5f(0x12a),_0x339c76[_0x339c76['Add']=0x1]='Add',_0x339c76[_0x339c76[_0x4f7d5f(0x154)]=0x2]=_0x4f7d5f(0x154),_0x339c76[_0x339c76[_0x4f7d5f(0x140)]=0x3]=_0x4f7d5f(0x140),_0x339c76[_0x339c76[_0x4f7d5f(0x158)]=0x4]='Delete',_0x339c76[_0x339c76[_0x4f7d5f(0x14b)]=0x5]=_0x4f7d5f(0x14b),_0x339c76[_0x339c76[_0x4f7d5f(0x12f)]=-0x1]=_0x4f7d5f(0x12f),_0x339c76))(v||{});const f=_0x1c0a9c=>c[_0x4f7d5f(0x162)](new Date(+_0x1c0a9c))[_0x4f7d5f(0x167)](_0x4f7d5f(0x126)),R=async(_0x480a90,_0x12e826)=>{const _0x3e61b6=_0x4f7d5f,_0x4967ba=_0x480a90[_0x3e61b6(0x161)](c[_0x3e61b6(0x151)]),_0x211123=_0x480a90[_0x3e61b6(0x161)](P[_0x3e61b6(0x138)]);_0x12e826['forEach'](_0x265931=>{const _0x4c7217=_0x3e61b6;_0x4967ba[_0x4c7217(0x14e)](_0x265931)&&_0x12e826['delete'](_0x265931);}),_0x12e826[_0x3e61b6(0x169)]&&(await _0x211123[_0x3e61b6(0x161)](_0x3e61b6(0x15c),{'params':{'userIDs':[..._0x12e826]}}))[_0x3e61b6(0xfd)][_0x3e61b6(0x153)][_0x3e61b6(0x133)](_0x2cac8f=>{const _0x2cad4f=_0x3e61b6;_0x2cac8f&&_0x4967ba[_0x2cad4f(0x148)](_0x2cac8f);});};function _0x105b(){const _0x397150=['resolveComment','_configService','rangeType','comments','_httpService','OpenOrReOpen','disposeWithMe','DependentOn','error','COMMENT','updateComment','Plugin','content','thread-comment-data-source.config','filter','/reply','length','root','CollaborationSessionService','UniverCollaborationClientPlugin','replies','createTimestamp','1067644VPBAmZ','symbol','dataSource','YYYY/MM/DD\x20HH:mm','getMemberID','onReady','@univerjs/thread-comment','Unknown','reply','requireSession','Module','1609542DtaLNc','UNRECOGNIZED','stringify','onStarting','558rJvgrI','forEach','_init','2511mePNMO','_threadCommentModel','_initUserSync','HTTPService','commentUpdate$','@univerjs-pro/collaboration-client','_injector','post','Disposable','_initDataSource','CustomRangeType','Edit','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_userService','235459VwPgib','Add','_config','_commentService','/add','addUser','Inject','userID','Solve','subscribe','UNIVER_UNKNOWN','getUser','defineProperty','rxjs','UserManagerService','userId','users','Reply','getOwnPropertyDescriptor','Solved','@univerjs/network','Delete','UniverLicensePlugin','/universer-api/comment/unit/','_threadCommentDataSource','/universer-api/user/list','IConfigService','Injector','getComment','191405WEZpny','get','dayjs','rangeId','7667064MZVoYw','/edit','listComments','format','/delete','size','values','pluginName','UniverThreadCommentDataSourcePlugin','IThreadCommentDataSourceService','8EinSNx','add','/list','parentId','_sessionService','UniverInstanceType','slice','map','395638OaPWXr','@univerjs/thread-comment-ui','threadId','body','customRanges','comment','getCurrentUser','user','replyId','_threadCommentDataSourceService','toStringTag','ThreadCommentModel','payload','unitId','pipe','type','addComment','find','solved'];_0x105b=function(){return _0x397150;};return _0x105b();}var $=Object[_0x4f7d5f(0x155)],E=(_0x4f2e79,_0x85a310,_0x36ca61,_0x1f576a)=>{const _0x2e9135=_0x4f7d5f;for(var _0x57a948=_0x1f576a>0x1?void 0x0:_0x1f576a?$(_0x85a310,_0x36ca61):_0x85a310,_0x11f1ac=_0x4f2e79[_0x2e9135(0x11d)]-0x1,_0x492fff;_0x11f1ac>=0x0;_0x11f1ac--)(_0x492fff=_0x4f2e79[_0x11f1ac])&&(_0x57a948=_0x492fff(_0x57a948)||_0x57a948);return _0x57a948;},S=(_0x1a23f5,_0x2bace4)=>(_0x35799e,_0x505618)=>_0x2bace4(_0x35799e,_0x505618,_0x1a23f5);let p=class extends c[_0x4f7d5f(0x13d)]{constructor(_0x442acb,_0xad4e6,_0x3d1574,_0x36b384){const _0x916dd8=_0x4f7d5f;super(),this[_0x916dd8(0x146)]=_0x442acb,this[_0x916dd8(0x136)]=_0xad4e6,this[_0x916dd8(0x142)]=_0x3d1574,this[_0x916dd8(0x13b)]=_0x36b384,this['_init'](),this[_0x916dd8(0x137)]();}[_0x4f7d5f(0x137)](){const _0x2b536b=_0x4f7d5f;this['disposeWithMe'](this[_0x2b536b(0x136)][_0x2b536b(0x139)][_0x2b536b(0x108)](w['bufferTime'](0x10))[_0x2b536b(0x14c)](_0x1797a0=>{const _0x5bb6d7=_0x2b536b,_0x374349=new Set();_0x1797a0['forEach'](_0x4d27f2=>{const _0x440eed=_0x4576;switch(_0x4d27f2[_0x440eed(0x109)]){case _0x440eed(0x16f):{const _0x1a4b82=_0x4d27f2[_0x440eed(0x106)]['personId'];_0x374349['add'](_0x1a4b82);break;}}}),R(this[_0x5bb6d7(0x13b)],_0x374349);}));}[_0x4f7d5f(0x134)](){const _0x450168=_0x4f7d5f;this[_0x450168(0x113)](this[_0x450168(0x146)][_0x450168(0x139)][_0x450168(0x14c)](async _0x358cc3=>{const _0x1ce19e=_0x450168;var _0x27533e,_0xe17254,_0x4131ce,_0x232e31;const _0x380eb0=(_0x27533e=this[_0x1ce19e(0x136)]['getUnit'](_0x358cc3[_0x1ce19e(0x107)])['find'](_0x22ef04=>_0x22ef04[_0x1ce19e(0xfc)]===_0x358cc3[_0x1ce19e(0xfc)]))==null?void 0x0:_0x27533e['root'];if(!_0x380eb0)return;const {unitId:_0x1dda9a,subUnitId:_0xec946c}=_0x380eb0;switch(_0x358cc3[_0x1ce19e(0x101)]&&this[_0x1ce19e(0x142)]['addUser'](_0x358cc3['user']),_0x358cc3[_0x1ce19e(0x109)]){case v[_0x1ce19e(0x144)]:break;case v[_0x1ce19e(0x154)]:{this[_0x1ce19e(0x136)]['addComment'](_0x1dda9a,_0xec946c,{'unitId':_0x1dda9a,'subUnitId':_0xec946c,'ref':'','id':_0x358cc3[_0x1ce19e(0x102)],'dT':f(+_0x358cc3[_0x1ce19e(0x122)]),'threadId':_0x358cc3[_0x1ce19e(0xfc)],'personId':(_0x4131ce=(_0xe17254=_0x358cc3['user'])==null?void 0x0:_0xe17254[_0x1ce19e(0x14a)])!=null?_0x4131ce:_0x358cc3[_0x1ce19e(0x152)],'text':JSON['parse'](_0x358cc3[_0x1ce19e(0x119)]),'parentId':_0x380eb0['id']});break;}case v['Delete']:{const _0x505038=this[_0x1ce19e(0x136)][_0x1ce19e(0x15f)](_0x1dda9a,_0xec946c,_0x358cc3[_0x1ce19e(0x102)]);_0x505038&&_0x505038[_0x1ce19e(0x171)]&&this[_0x1ce19e(0x136)]['deleteComment'](_0x1dda9a,_0xec946c,_0x358cc3[_0x1ce19e(0x102)]);break;}case v[_0x1ce19e(0x140)]:{this['_threadCommentModel'][_0x1ce19e(0x117)](_0x1dda9a,_0xec946c,{'commentId':_0x358cc3[_0x1ce19e(0x102)],'text':JSON['parse'](_0x358cc3['content'])});break;}case v[_0x1ce19e(0x14b)]:{const _0x45e0c3=(_0x232e31=this[_0x1ce19e(0x136)]['getUnit'](_0x358cc3['unitId'])[_0x1ce19e(0x10b)](_0x53569a=>_0x53569a[_0x1ce19e(0xfc)]===_0x358cc3[_0x1ce19e(0xfc)]))==null?void 0x0:_0x232e31[_0x1ce19e(0x11e)];_0x45e0c3&&this['_threadCommentModel']['resolveComment'](_0x1dda9a,_0xec946c,_0x45e0c3['id'],_0x358cc3[_0x1ce19e(0x10c)]===I[_0x1ce19e(0x156)]);break;}}}));}};p=E([S(0x0,c[_0x4f7d5f(0x149)](b['CommentService'])),S(0x1,c[_0x4f7d5f(0x149)](M[_0x4f7d5f(0x105)])),S(0x2,c[_0x4f7d5f(0x149)](c[_0x4f7d5f(0x151)])),S(0x3,c['Inject'](c[_0x4f7d5f(0x15e)]))],p);const q=_0x4f7d5f(0x11a),D={};var A=Object[_0x4f7d5f(0x155)],x=(_0x4fc890,_0xbba8cd,_0x142db5,_0x392614)=>{for(var _0x56af93=_0x392614>0x1?void 0x0:_0x392614?A(_0xbba8cd,_0x142db5):_0xbba8cd,_0x1175a1=_0x4fc890['length']-0x1,_0x27e5e1;_0x1175a1>=0x0;_0x1175a1--)(_0x27e5e1=_0x4fc890[_0x1175a1])&&(_0x56af93=_0x27e5e1(_0x56af93)||_0x56af93);return _0x56af93;},_=(_0x42ad0c,_0x3dccb0)=>(_0x3f9f1e,_0x33d027)=>_0x3dccb0(_0x3f9f1e,_0x33d027,_0x42ad0c);function _0x4576(_0x569a68,_0x2cee1c){const _0x105b7b=_0x105b();return _0x4576=function(_0x457621,_0x1b754e){_0x457621=_0x457621-0xf7;let _0x50dfda=_0x105b7b[_0x457621];return _0x50dfda;},_0x4576(_0x569a68,_0x2cee1c);}function Y(_0x1ad10e,_0x2717c4){const _0x3005bd=_0x4f7d5f,_0x2a4a62=_0x1ad10e[_0x3005bd(0x121)][0x0];return{..._0x2717c4,'id':_0x2a4a62[_0x3005bd(0x102)],'resolved':_0x1ad10e['solved']===0x1,'dT':f(_0x2a4a62['createTimestamp']),'personId':_0x2a4a62[_0x3005bd(0x152)],'threadId':_0x2a4a62['threadId']};}function G(_0x140a35,_0xcd6c9d,_0x2dca0e){const _0x120678=_0x4f7d5f;var _0x57ae3b,_0x47914b;if(((_0x47914b=(_0x57ae3b=_0x140a35==null?void 0x0:_0x140a35['replies'])==null?void 0x0:_0x57ae3b[_0x120678(0x11d)])!=null?_0x47914b:0x0)>0x0){const _0x4eb57f=(_0x5bd891,_0x2a6b29)=>({'id':_0x5bd891[_0x120678(0x102)],'threadId':_0x5bd891[_0x120678(0xfc)],'dT':f(_0x5bd891[_0x120678(0x122)]),'personId':_0x5bd891[_0x120678(0x152)],'resolved':_0x140a35[_0x120678(0x10c)]===I[_0x120678(0x156)],'unitId':_0xcd6c9d,'subUnitId':_0x2dca0e,'text':JSON['parse'](_0x5bd891[_0x120678(0x119)]),'parentId':_0x2a6b29}),_0x1a40aa=_0x4eb57f(_0x140a35[_0x120678(0x121)][0x0]);return{..._0x1a40aa,'children':_0x140a35[_0x120678(0x121)][_0x120678(0xf8)](0x1)[_0x120678(0xf9)](_0x32e6b4=>_0x4eb57f(_0x32e6b4,_0x1a40aa['id']))};}return null;}let g=class{constructor(_0x38056a,_0x204f9c,_0x357958,_0x1d8ac1){const _0x572664=_0x4f7d5f;this[_0x572664(0x111)]=_0x38056a,this[_0x572664(0x142)]=_0x204f9c,this[_0x572664(0x172)]=_0x357958,this[_0x572664(0x13b)]=_0x1d8ac1;}async[_0x4f7d5f(0x10a)](_0xb4aa23){const _0x2d5a52=_0x4f7d5f;var _0x523c5a,_0x563a80;const {parentId:_0x5a4e6a,unitId:_0x2cef49,text:_0xa52d48,threadId:_0x200bd9}=_0xb4aa23,_0x42a1a3=(_0x563a80=(_0x523c5a=_0xa52d48[_0x2d5a52(0xfe)])==null?void 0x0:_0x523c5a[_0x2d5a52(0x11b)](_0x2d4fcd=>_0x2d4fcd[_0x2d5a52(0x10f)]===c[_0x2d5a52(0x13f)][_0x2d5a52(0x116)])[_0x2d5a52(0xf9)](_0x2faffa=>_0x2faffa['rangeId']))!=null?_0x563a80:[],_0x48c2ee=JSON[_0x2d5a52(0x130)](_0xa52d48),_0x1007b2=(await this[_0x2d5a52(0x172)][_0x2d5a52(0x12c)](_0x2cef49))['getMemberID']();if(_0x5a4e6a){const _0x45afaa={'memberId':_0x1007b2,'unitId':_0x2cef49,'content':_0x48c2ee,'mention':_0x42a1a3,'threadId':_0x200bd9},_0x48986b=(await this[_0x2d5a52(0x111)][_0x2d5a52(0x13c)](_0x2d5a52(0x15a)+_0x2cef49+_0x2d5a52(0x11c),{'body':_0x45afaa}))['body'][_0x2d5a52(0x12b)];return{..._0xb4aa23,'id':_0x48986b[_0x2d5a52(0x102)],'dT':c[_0x2d5a52(0x162)](+_0x48986b[_0x2d5a52(0x122)])[_0x2d5a52(0x167)](_0x2d5a52(0x126)),'personId':_0x48986b['userId']};}else{const _0x490233={'memberId':_0x1007b2,'unitId':_0x2cef49,'content':_0x48c2ee,'mention':_0x42a1a3},_0x229271=await this[_0x2d5a52(0x111)][_0x2d5a52(0x13c)](_0x2d5a52(0x15a)+_0x2cef49+_0x2d5a52(0x147),{'body':_0x490233});return Y(_0x229271['body'][_0x2d5a52(0xff)],_0xb4aa23);}}async[_0x4f7d5f(0x117)](_0x1d2473){const _0x184ac8=_0x4f7d5f;var _0x11f30f,_0x3fab2c;const {text:_0x36604a,unitId:_0x43fc73}=_0x1d2473,_0xc50916=(_0x3fab2c=(_0x11f30f=_0x36604a[_0x184ac8(0xfe)])==null?void 0x0:_0x11f30f[_0x184ac8(0x11b)](_0x4439fb=>_0x4439fb[_0x184ac8(0x10f)]===c[_0x184ac8(0x13f)][_0x184ac8(0x116)])[_0x184ac8(0xf9)](_0x2aa148=>_0x2aa148[_0x184ac8(0x163)]))!=null?_0x3fab2c:[],_0x138543=JSON[_0x184ac8(0x130)](_0x36604a),_0x211ba0=_0x1d2473['threadId'],_0x1e13f1=_0x1d2473['id'],_0x960fa0={'memberId':(await this[_0x184ac8(0x172)][_0x184ac8(0x12c)](_0x43fc73))[_0x184ac8(0x127)](),'unitId':_0x43fc73,'threadId':_0x211ba0,'mention':_0xc50916,'content':_0x138543,'replyId':_0x1e13f1},_0x3dc6de=await this['_httpService'][_0x184ac8(0x13c)](_0x184ac8(0x15a)+_0x43fc73+_0x184ac8(0x165),{'body':_0x960fa0});return!_0x3dc6de[_0x184ac8(0xfd)][_0x184ac8(0x115)]||_0x3dc6de[_0x184ac8(0xfd)][_0x184ac8(0x115)]['code']===0x1;}async[_0x4f7d5f(0x10d)](_0x185f27){const _0x4ee2cb=_0x4f7d5f,{unitId:_0x22d3b7}=_0x185f27,_0x51150a=_0x185f27[_0x4ee2cb(0xfc)],_0x30fcec={'memberId':this[_0x4ee2cb(0x142)][_0x4ee2cb(0x100)]()[_0x4ee2cb(0x14a)],'unitId':_0x22d3b7,'threadId':_0x51150a,'solved':_0x185f27['resolved']?I[_0x4ee2cb(0x156)]:I['OpenOrReOpen']},_0x32ed56=await this[_0x4ee2cb(0x111)][_0x4ee2cb(0x13c)](_0x4ee2cb(0x15a)+_0x22d3b7+'/solved',{'body':_0x30fcec});return!_0x32ed56[_0x4ee2cb(0xfd)][_0x4ee2cb(0x115)]||_0x32ed56['body'][_0x4ee2cb(0x115)]['code']===0x1;}async['deleteComment'](_0xed0726,_0xe28250,_0x5ac9d4,_0x93973e){const _0x4b631a=_0x4f7d5f,_0x368aa3={'memberId':(await this[_0x4b631a(0x172)][_0x4b631a(0x12c)](_0xed0726))[_0x4b631a(0x127)](),'threadId':_0x5ac9d4,'replyId':_0x93973e,'unitId':_0xed0726},_0x22b7f8=await this[_0x4b631a(0x111)][_0x4b631a(0x13c)]('/universer-api/comment/unit/'+_0xed0726+_0x4b631a(0x168),{'body':_0x368aa3});return!_0x22b7f8[_0x4b631a(0xfd)][_0x4b631a(0x115)]||_0x22b7f8[_0x4b631a(0xfd)][_0x4b631a(0x115)]['code']===0x1;}async[_0x4f7d5f(0x166)](_0x415fcc,_0xbb663c,_0x3c10bb){const _0x44f773=_0x4f7d5f,_0x36fa87={'unitId':_0x415fcc,'threadId':_0x3c10bb},_0x103a13=await this[_0x44f773(0x111)][_0x44f773(0x13c)](_0x44f773(0x15a)+_0x415fcc+_0x44f773(0x170),{'body':_0x36fa87}),_0x5b36d4=_0x3c10bb[_0x44f773(0xf9)](_0x213104=>G(_0x103a13['body'][_0x44f773(0x110)][_0x213104],_0x415fcc,_0xbb663c))[_0x44f773(0x11b)](Boolean);return Object[_0x44f773(0x16a)](_0x103a13[_0x44f773(0xfd)][_0x44f773(0x153)])[_0x44f773(0x133)](_0x4ff936=>{const _0x4db673=_0x44f773;this[_0x4db673(0x142)]['addUser'](_0x4ff936);}),_0x5b36d4;}['saveCommentToSnapshot'](_0x566549){const _0x5a6f08=_0x4f7d5f;return{'id':_0x566549['id'],'threadId':_0x566549[_0x5a6f08(0xfc)],'ref':_0x566549['ref']};}};g=x([_(0x0,c[_0x4f7d5f(0x149)](P[_0x4f7d5f(0x138)])),_(0x1,c[_0x4f7d5f(0x149)](c[_0x4f7d5f(0x151)])),_(0x2,c['Inject'](b[_0x4f7d5f(0x11f)])),_(0x3,c[_0x4f7d5f(0x149)](c[_0x4f7d5f(0x15e)]))],g);var H=Object[_0x4f7d5f(0x155)],J=(_0x5a8a4e,_0x510c24,_0x428176,_0x4edcf1)=>{const _0xffaf5b=_0x4f7d5f;for(var _0x4f9870=_0x4edcf1>0x1?void 0x0:_0x4edcf1?H(_0x510c24,_0x428176):_0x510c24,_0x5ae0f6=_0x5a8a4e[_0xffaf5b(0x11d)]-0x1,_0x37af9c;_0x5ae0f6>=0x0;_0x5ae0f6--)(_0x37af9c=_0x5a8a4e[_0x5ae0f6])&&(_0x4f9870=_0x37af9c(_0x4f9870)||_0x4f9870);return _0x4f9870;},y=(_0x30937d,_0x33fa3b)=>(_0x5b3084,_0x3cf5ca)=>_0x33fa3b(_0x5b3084,_0x3cf5ca,_0x30937d);let C=class extends c[_0x4f7d5f(0x13d)]{constructor(_0x326dbc,_0x510996){const _0xc79541=_0x4f7d5f;super(),this[_0xc79541(0x103)]=_0x326dbc,this[_0xc79541(0x15b)]=_0x510996,this[_0xc79541(0x13e)]();}[_0x4f7d5f(0x13e)](){const _0x1c5b6e=_0x4f7d5f;this[_0x1c5b6e(0x103)][_0x1c5b6e(0x125)]=this['_threadCommentDataSource'],this[_0x1c5b6e(0x103)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x4f7d5f(0x16d)]),y(0x1,c[_0x4f7d5f(0x149)](g))],C);var F=Object[_0x4f7d5f(0x14f)],L=Object[_0x4f7d5f(0x155)],Z=(_0x46f35d,_0x35dc4b,_0x2d1168)=>_0x35dc4b in _0x46f35d?F(_0x46f35d,_0x35dc4b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2d1168}):_0x46f35d[_0x35dc4b]=_0x2d1168,W=(_0x4d478e,_0x3cd590,_0x12fd7d,_0x2c7e70)=>{const _0x49abea=_0x4f7d5f;for(var _0x4e678b=_0x2c7e70>0x1?void 0x0:_0x2c7e70?L(_0x3cd590,_0x12fd7d):_0x3cd590,_0x560264=_0x4d478e[_0x49abea(0x11d)]-0x1,_0x48db85;_0x560264>=0x0;_0x560264--)(_0x48db85=_0x4d478e[_0x560264])&&(_0x4e678b=_0x48db85(_0x4e678b)||_0x4e678b);return _0x4e678b;},O=(_0x4a0076,_0x156de8)=>(_0x29d0fc,_0x120fea)=>_0x156de8(_0x29d0fc,_0x120fea,_0x4a0076),N=(_0x376330,_0x170af0,_0x2756f4)=>Z(_0x376330,typeof _0x170af0!=_0x4f7d5f(0x124)?_0x170af0+'':_0x170af0,_0x2756f4);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x4f7d5f(0x118)]{constructor(_0x5394b9=D,_0x266dfb,_0x5077e4){const _0x290b5c=_0x4f7d5f;super(),this[_0x290b5c(0x145)]=_0x5394b9,this[_0x290b5c(0x13b)]=_0x266dfb,this[_0x290b5c(0x10e)]=_0x5077e4;const {..._0x519c85}=c['merge']({},D,this[_0x290b5c(0x145)]);this[_0x290b5c(0x10e)]['setConfig'](q,_0x519c85);}[_0x4f7d5f(0x131)](){const _0x3f3005=_0x4f7d5f;[[g],[C],[p]][_0x3f3005(0x133)](_0x12d738=>{const _0x229420=_0x3f3005;this[_0x229420(0x13b)][_0x229420(0x16f)](_0x12d738);});}[_0x4f7d5f(0x128)](){const _0x5a10f8=_0x4f7d5f;this[_0x5a10f8(0x13b)][_0x5a10f8(0x161)](C),this['_injector']['get'](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x4f7d5f(0x16b),U),N(exports[_0x4f7d5f(0x16c)],_0x4f7d5f(0x109),c[_0x4f7d5f(0xf7)][_0x4f7d5f(0x14d)]),exports[_0x4f7d5f(0x16c)]=W([c[_0x4f7d5f(0x114)](j['UniverThreadCommentUIPlugin'],b[_0x4f7d5f(0x120)],T[_0x4f7d5f(0x159)]),O(0x1,c['Inject'](c[_0x4f7d5f(0x15e)])),O(0x2,c[_0x4f7d5f(0x15d)])],exports[_0x4f7d5f(0x16c)]);
|
|
1
|
+
'use strict';const _0x128554=_0x2707;(function(_0x3c2a81,_0x2ecea3){const _0x3ee1d7=_0x2707,_0x45694e=_0x3c2a81();while(!![]){try{const _0x58e1ff=-parseInt(_0x3ee1d7(0x1b4))/0x1*(-parseInt(_0x3ee1d7(0x1e5))/0x2)+-parseInt(_0x3ee1d7(0x1fe))/0x3+-parseInt(_0x3ee1d7(0x1f8))/0x4+parseInt(_0x3ee1d7(0x1db))/0x5+parseInt(_0x3ee1d7(0x1d6))/0x6+parseInt(_0x3ee1d7(0x209))/0x7*(-parseInt(_0x3ee1d7(0x1ed))/0x8)+parseInt(_0x3ee1d7(0x1ca))/0x9;if(_0x58e1ff===_0x2ecea3)break;else _0x45694e['push'](_0x45694e['shift']());}catch(_0x49f140){_0x45694e['push'](_0x45694e['shift']());}}}(_0xc131,0xb1a44));Object[_0x128554(0x1a8)](exports,Symbol[_0x128554(0x200)],{'value':'Module'});const b=require(_0x128554(0x1ab)),T=require(_0x128554(0x216)),c=require('@univerjs/core'),j=require(_0x128554(0x1f9)),M=require(_0x128554(0x1f6)),w=require(_0x128554(0x202)),P=require('@univerjs/network'),U=_0x128554(0x1c9);var I=(_0x181417=>(_0x181417[_0x181417[_0x128554(0x1b1)]=0x0]=_0x128554(0x1b1),_0x181417[_0x181417['Solved']=0x1]=_0x128554(0x1da),_0x181417[_0x181417['UNRECOGNIZED']=-0x1]=_0x128554(0x21f),_0x181417))(I||{}),v=(_0x2ed225=>(_0x2ed225[_0x2ed225[_0x128554(0x1a0)]=0x0]=_0x128554(0x1a0),_0x2ed225[_0x2ed225[_0x128554(0x1e9)]=0x1]=_0x128554(0x1e9),_0x2ed225[_0x2ed225['Reply']=0x2]=_0x128554(0x1a6),_0x2ed225[_0x2ed225['Edit']=0x3]=_0x128554(0x1d7),_0x2ed225[_0x2ed225[_0x128554(0x1bb)]=0x4]=_0x128554(0x1bb),_0x2ed225[_0x2ed225[_0x128554(0x1dc)]=0x5]=_0x128554(0x1dc),_0x2ed225[_0x2ed225[_0x128554(0x21f)]=-0x1]='UNRECOGNIZED',_0x2ed225))(v||{});const f=_0x14f3c2=>c['dayjs'](new Date(+_0x14f3c2))['format'](_0x128554(0x218)),R=async(_0x1485db,_0x5cbf5b)=>{const _0x6635c5=_0x128554,_0x121985=_0x1485db[_0x6635c5(0x1d0)](c[_0x6635c5(0x1d8)]),_0x227a61=_0x1485db[_0x6635c5(0x1d0)](P['HTTPService']);_0x5cbf5b[_0x6635c5(0x1b2)](_0x5422d8=>{const _0x2dbccd=_0x6635c5;_0x121985[_0x2dbccd(0x21b)](_0x5422d8)&&_0x5cbf5b[_0x2dbccd(0x220)](_0x5422d8);}),_0x5cbf5b[_0x6635c5(0x1ce)]&&(await _0x227a61['get'](_0x6635c5(0x221),{'params':{'userIDs':[..._0x5cbf5b]}}))[_0x6635c5(0x213)]['users'][_0x6635c5(0x1b2)](_0x4844d6=>{const _0x57eae4=_0x6635c5;_0x4844d6&&_0x121985[_0x57eae4(0x1a5)](_0x4844d6);});};function _0x2707(_0xffa231,_0x511b52){const _0xc13191=_0xc131();return _0x2707=function(_0x270708,_0x2cfb9c){_0x270708=_0x270708-0x19e;let _0x308624=_0xc13191[_0x270708];return _0x308624;},_0x2707(_0xffa231,_0x511b52);}var $=Object[_0x128554(0x1ff)],E=(_0x4519d5,_0x2c5fe0,_0x451ab8,_0x1fd051)=>{const _0x116375=_0x128554;for(var _0x15fe54=_0x1fd051>0x1?void 0x0:_0x1fd051?$(_0x2c5fe0,_0x451ab8):_0x2c5fe0,_0x4bd9b4=_0x4519d5[_0x116375(0x1a1)]-0x1,_0x2be078;_0x4bd9b4>=0x0;_0x4bd9b4--)(_0x2be078=_0x4519d5[_0x4bd9b4])&&(_0x15fe54=_0x2be078(_0x15fe54)||_0x15fe54);return _0x15fe54;},S=(_0x348200,_0x3ff8c2)=>(_0x24c465,_0x316f15)=>_0x3ff8c2(_0x24c465,_0x316f15,_0x348200);let p=class extends c['Disposable']{constructor(_0x391efa,_0x3dde9b,_0x462281,_0x4cc674){const _0x174f58=_0x128554;super(),this[_0x174f58(0x211)]=_0x391efa,this['_threadCommentModel']=_0x3dde9b,this[_0x174f58(0x1aa)]=_0x462281,this[_0x174f58(0x201)]=_0x4cc674,this[_0x174f58(0x1af)](),this[_0x174f58(0x1cb)]();}[_0x128554(0x1cb)](){const _0x387852=_0x128554;this['disposeWithMe'](this[_0x387852(0x1f5)][_0x387852(0x20e)][_0x387852(0x1f2)](w[_0x387852(0x206)](0x10))['subscribe'](_0x3ad68d=>{const _0x3ec6a6=_0x387852,_0x1375d4=new Set();_0x3ad68d[_0x3ec6a6(0x1b2)](_0x1bc844=>{const _0x3a0617=_0x3ec6a6;switch(_0x1bc844['type']){case'add':{const _0x5f367c=_0x1bc844[_0x3a0617(0x1e0)][_0x3a0617(0x1a4)];_0x1375d4['add'](_0x5f367c);break;}}}),R(this[_0x3ec6a6(0x201)],_0x1375d4);}));}[_0x128554(0x1af)](){const _0x1d33c4=_0x128554;this[_0x1d33c4(0x1b8)](this[_0x1d33c4(0x211)][_0x1d33c4(0x20e)]['subscribe'](async _0x2c3f9a=>{const _0x2525f8=_0x1d33c4;var _0x28bd5b,_0x56f46f,_0x526f2a,_0x1d3bf7;const _0x224758=(_0x28bd5b=this[_0x2525f8(0x1f5)][_0x2525f8(0x21c)](_0x2c3f9a['unitId'])['find'](_0x25328a=>_0x25328a[_0x2525f8(0x1c2)]===_0x2c3f9a[_0x2525f8(0x1c2)]))==null?void 0x0:_0x28bd5b[_0x2525f8(0x20b)];if(!_0x224758)return;const {unitId:_0x119c1e,subUnitId:_0x1f1764}=_0x224758;switch(_0x2c3f9a[_0x2525f8(0x21d)]&&this[_0x2525f8(0x1aa)][_0x2525f8(0x1a5)](_0x2c3f9a[_0x2525f8(0x21d)]),_0x2c3f9a[_0x2525f8(0x1ad)]){case v['Add']:break;case v[_0x2525f8(0x1a6)]:{this[_0x2525f8(0x1f5)][_0x2525f8(0x1bd)](_0x119c1e,_0x1f1764,{'unitId':_0x119c1e,'subUnitId':_0x1f1764,'ref':'','id':_0x2c3f9a[_0x2525f8(0x1d1)],'dT':f(+_0x2c3f9a[_0x2525f8(0x208)]),'threadId':_0x2c3f9a[_0x2525f8(0x1c2)],'personId':(_0x526f2a=(_0x56f46f=_0x2c3f9a[_0x2525f8(0x21d)])==null?void 0x0:_0x56f46f['userID'])!=null?_0x526f2a:_0x2c3f9a[_0x2525f8(0x1ec)],'text':JSON[_0x2525f8(0x1b5)](_0x2c3f9a[_0x2525f8(0x1ae)]),'parentId':_0x224758['id']});break;}case v['Delete']:{const _0x4a08d8=this[_0x2525f8(0x1f5)][_0x2525f8(0x1b7)](_0x119c1e,_0x1f1764,_0x2c3f9a[_0x2525f8(0x1d1)]);_0x4a08d8&&_0x4a08d8[_0x2525f8(0x1b3)]&&this[_0x2525f8(0x1f5)][_0x2525f8(0x21e)](_0x119c1e,_0x1f1764,_0x2c3f9a[_0x2525f8(0x1d1)]);break;}case v['Edit']:{this[_0x2525f8(0x1f5)]['updateComment'](_0x119c1e,_0x1f1764,{'commentId':_0x2c3f9a[_0x2525f8(0x1d1)],'text':JSON[_0x2525f8(0x1b5)](_0x2c3f9a[_0x2525f8(0x1ae)])});break;}case v[_0x2525f8(0x1dc)]:{const _0xe92dbf=(_0x1d3bf7=this[_0x2525f8(0x1f5)][_0x2525f8(0x21c)](_0x2c3f9a[_0x2525f8(0x1f4)])[_0x2525f8(0x1cc)](_0x76e3af=>_0x76e3af[_0x2525f8(0x1c2)]===_0x2c3f9a['threadId']))==null?void 0x0:_0x1d3bf7[_0x2525f8(0x20b)];_0xe92dbf&&this[_0x2525f8(0x1f5)][_0x2525f8(0x1e6)](_0x119c1e,_0x1f1764,_0xe92dbf['id'],_0x2c3f9a[_0x2525f8(0x217)]===I[_0x2525f8(0x1da)]);break;}}}));}};p=E([S(0x0,c[_0x128554(0x1d3)](b[_0x128554(0x1ee)])),S(0x1,c[_0x128554(0x1d3)](M[_0x128554(0x1be)])),S(0x2,c[_0x128554(0x1d3)](c['UserManagerService'])),S(0x3,c[_0x128554(0x1d3)](c[_0x128554(0x1de)]))],p);const q=_0x128554(0x1eb),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x15d864,_0x17a1bf,_0x505ac0,_0x1dccbf)=>{const _0x240521=_0x128554;for(var _0x18d309=_0x1dccbf>0x1?void 0x0:_0x1dccbf?A(_0x17a1bf,_0x505ac0):_0x17a1bf,_0x3d1e61=_0x15d864[_0x240521(0x1a1)]-0x1,_0x24e546;_0x3d1e61>=0x0;_0x3d1e61--)(_0x24e546=_0x15d864[_0x3d1e61])&&(_0x18d309=_0x24e546(_0x18d309)||_0x18d309);return _0x18d309;},_=(_0x3b3942,_0x25bec5)=>(_0x3cc9d1,_0x548b04)=>_0x25bec5(_0x3cc9d1,_0x548b04,_0x3b3942);function Y(_0x4b5ec9,_0x14da3f){const _0x149d3e=_0x128554,_0x5b4006=_0x4b5ec9[_0x149d3e(0x1d5)][0x0];return{..._0x14da3f,'id':_0x5b4006[_0x149d3e(0x1d1)],'resolved':_0x4b5ec9[_0x149d3e(0x217)]===0x1,'dT':f(_0x5b4006[_0x149d3e(0x208)]),'personId':_0x5b4006[_0x149d3e(0x1ec)],'threadId':_0x5b4006[_0x149d3e(0x1c2)]};}function G(_0x352db8,_0x38f793,_0x454c54){const _0x5a90aa=_0x128554;var _0x6433cd,_0x5c9e99;if(((_0x5c9e99=(_0x6433cd=_0x352db8==null?void 0x0:_0x352db8[_0x5a90aa(0x1d5)])==null?void 0x0:_0x6433cd['length'])!=null?_0x5c9e99:0x0)>0x0){const _0x5e24d9=(_0x408fce,_0xebbf9b)=>({'id':_0x408fce['replyId'],'threadId':_0x408fce[_0x5a90aa(0x1c2)],'dT':f(_0x408fce[_0x5a90aa(0x208)]),'personId':_0x408fce['userId'],'resolved':_0x352db8[_0x5a90aa(0x217)]===I['Solved'],'unitId':_0x38f793,'subUnitId':_0x454c54,'text':JSON['parse'](_0x408fce[_0x5a90aa(0x1ae)]),'parentId':_0xebbf9b}),_0x1a302d=_0x5e24d9(_0x352db8['replies'][0x0]);return{..._0x1a302d,'children':_0x352db8[_0x5a90aa(0x1d5)][_0x5a90aa(0x1d9)](0x1)[_0x5a90aa(0x207)](_0x3608bf=>_0x5e24d9(_0x3608bf,_0x1a302d['id']))};}return null;}let g=class{constructor(_0x2ed677,_0x2a2941,_0x3a9163,_0x28f228){const _0x219a91=_0x128554;this[_0x219a91(0x1e2)]=_0x2ed677,this[_0x219a91(0x1aa)]=_0x2a2941,this['_sessionService']=_0x3a9163,this[_0x219a91(0x201)]=_0x28f228;}async[_0x128554(0x1bd)](_0x2036b8){const _0x4b1ded=_0x128554;var _0x3a41ef,_0x4fccbb;const {parentId:_0x4a2a31,unitId:_0x17fefa,text:_0x274c2a,threadId:_0xb617e3}=_0x2036b8,_0xafd377=(_0x4fccbb=(_0x3a41ef=_0x274c2a['customRanges'])==null?void 0x0:_0x3a41ef[_0x4b1ded(0x20c)](_0x25c1b6=>_0x25c1b6['rangeType']===c[_0x4b1ded(0x1ea)][_0x4b1ded(0x1f7)])[_0x4b1ded(0x207)](_0x4f118e=>_0x4f118e[_0x4b1ded(0x21a)]))!=null?_0x4fccbb:[],_0x1fc807=JSON[_0x4b1ded(0x20d)](_0x274c2a),_0x578d10=(await this[_0x4b1ded(0x19f)][_0x4b1ded(0x1d2)](_0x17fefa))['getMemberID']();if(_0x4a2a31){const _0x44b429={'memberId':_0x578d10,'unitId':_0x17fefa,'content':_0x1fc807,'mention':_0xafd377,'threadId':_0xb617e3},_0x19c0b9=(await this[_0x4b1ded(0x1e2)][_0x4b1ded(0x1fa)]('/universer-api/comment/unit/'+_0x17fefa+_0x4b1ded(0x1bf),{'body':_0x44b429}))[_0x4b1ded(0x213)][_0x4b1ded(0x1b0)];return{..._0x2036b8,'id':_0x19c0b9[_0x4b1ded(0x1d1)],'dT':c[_0x4b1ded(0x1ac)](+_0x19c0b9[_0x4b1ded(0x208)])['format'](_0x4b1ded(0x218)),'personId':_0x19c0b9[_0x4b1ded(0x1ec)]};}else{const _0x27d92c={'memberId':_0x578d10,'unitId':_0x17fefa,'content':_0x1fc807,'mention':_0xafd377},_0x4e6395=await this[_0x4b1ded(0x1e2)]['post'](_0x4b1ded(0x19e)+_0x17fefa+_0x4b1ded(0x1e3),{'body':_0x27d92c});return Y(_0x4e6395[_0x4b1ded(0x213)][_0x4b1ded(0x1f1)],_0x2036b8);}}async[_0x128554(0x20f)](_0x444f56){const _0x183c24=_0x128554;var _0x184e3c,_0x2457e8;const {text:_0x1f0933,unitId:_0xe39534}=_0x444f56,_0x1e162f=(_0x2457e8=(_0x184e3c=_0x1f0933[_0x183c24(0x1c0)])==null?void 0x0:_0x184e3c[_0x183c24(0x20c)](_0x26ff6e=>_0x26ff6e[_0x183c24(0x1ba)]===c[_0x183c24(0x1ea)][_0x183c24(0x1f7)])['map'](_0x3c9a3e=>_0x3c9a3e[_0x183c24(0x21a)]))!=null?_0x2457e8:[],_0x56785f=JSON[_0x183c24(0x20d)](_0x1f0933),_0x3a6e46=_0x444f56[_0x183c24(0x1c2)],_0x1118f6=_0x444f56['id'],_0x515107={'memberId':(await this[_0x183c24(0x19f)]['requireSession'](_0xe39534))['getMemberID'](),'unitId':_0xe39534,'threadId':_0x3a6e46,'mention':_0x1e162f,'content':_0x56785f,'replyId':_0x1118f6},_0x258886=await this[_0x183c24(0x1e2)][_0x183c24(0x1fa)](_0x183c24(0x19e)+_0xe39534+_0x183c24(0x1cd),{'body':_0x515107});return!_0x258886[_0x183c24(0x213)][_0x183c24(0x1b6)]||_0x258886[_0x183c24(0x213)][_0x183c24(0x1b6)][_0x183c24(0x1c4)]===0x1;}async[_0x128554(0x1e6)](_0x2a655d){const _0x450c12=_0x128554,{unitId:_0xbc2cf3}=_0x2a655d,_0x5408d9=_0x2a655d[_0x450c12(0x1c2)],_0x10d982={'memberId':this['_userService'][_0x450c12(0x205)]()[_0x450c12(0x1e1)],'unitId':_0xbc2cf3,'threadId':_0x5408d9,'solved':_0x2a655d[_0x450c12(0x1ef)]?I[_0x450c12(0x1da)]:I[_0x450c12(0x1b1)]},_0x2a82bd=await this['_httpService'][_0x450c12(0x1fa)]('/universer-api/comment/unit/'+_0xbc2cf3+'/solved',{'body':_0x10d982});return!_0x2a82bd[_0x450c12(0x213)]['error']||_0x2a82bd['body'][_0x450c12(0x1b6)][_0x450c12(0x1c4)]===0x1;}async[_0x128554(0x21e)](_0x727ee1,_0x383ee6,_0x2feb6f,_0x59bfc4){const _0x89db1=_0x128554,_0x3b66f1={'memberId':(await this['_sessionService']['requireSession'](_0x727ee1))[_0x89db1(0x203)](),'threadId':_0x2feb6f,'replyId':_0x59bfc4,'unitId':_0x727ee1},_0xbd8508=await this[_0x89db1(0x1e2)][_0x89db1(0x1fa)]('/universer-api/comment/unit/'+_0x727ee1+_0x89db1(0x1bc),{'body':_0x3b66f1});return!_0xbd8508[_0x89db1(0x213)]['error']||_0xbd8508[_0x89db1(0x213)][_0x89db1(0x1b6)][_0x89db1(0x1c4)]===0x1;}async[_0x128554(0x1d4)](_0x1b2048,_0x50010e,_0x3e29d7){const _0x2cde6f=_0x128554,_0x48de5f={'unitId':_0x1b2048,'threadId':_0x3e29d7},_0x5e890f=await this[_0x2cde6f(0x1e2)][_0x2cde6f(0x1fa)](_0x2cde6f(0x19e)+_0x1b2048+_0x2cde6f(0x1df),{'body':_0x48de5f}),_0x113b8=_0x3e29d7[_0x2cde6f(0x207)](_0x5bcb65=>G(_0x5e890f[_0x2cde6f(0x213)]['comments'][_0x5bcb65],_0x1b2048,_0x50010e))[_0x2cde6f(0x20c)](Boolean);return Object[_0x2cde6f(0x1cf)](_0x5e890f[_0x2cde6f(0x213)][_0x2cde6f(0x204)])[_0x2cde6f(0x1b2)](_0x293fee=>{const _0x359dbc=_0x2cde6f;this['_userService'][_0x359dbc(0x1a5)](_0x293fee);}),_0x113b8;}[_0x128554(0x20a)](_0xe40573){const _0x487aa6=_0x128554;return{'id':_0xe40573['id'],'threadId':_0xe40573[_0x487aa6(0x1c2)],'ref':_0xe40573[_0x487aa6(0x212)]};}};g=x([_(0x0,c[_0x128554(0x1d3)](P[_0x128554(0x1dd)])),_(0x1,c['Inject'](c[_0x128554(0x1d8)])),_(0x2,c[_0x128554(0x1d3)](b['CollaborationSessionService'])),_(0x3,c['Inject'](c[_0x128554(0x1de)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x20a535,_0x3fa1ac,_0x530c62,_0x386b26)=>{const _0x3b9175=_0x128554;for(var _0x28d83d=_0x386b26>0x1?void 0x0:_0x386b26?H(_0x3fa1ac,_0x530c62):_0x3fa1ac,_0x59975e=_0x20a535[_0x3b9175(0x1a1)]-0x1,_0xd10014;_0x59975e>=0x0;_0x59975e--)(_0xd10014=_0x20a535[_0x59975e])&&(_0x28d83d=_0xd10014(_0x28d83d)||_0x28d83d);return _0x28d83d;},y=(_0x3d6e1d,_0x2dec35)=>(_0x310455,_0x1ecf7f)=>_0x2dec35(_0x310455,_0x1ecf7f,_0x3d6e1d);let C=class extends c[_0x128554(0x210)]{constructor(_0x58a1ef,_0x176aaa){const _0x30f6cd=_0x128554;super(),this['_threadCommentDataSourceService']=_0x58a1ef,this[_0x30f6cd(0x1fd)]=_0x176aaa,this[_0x30f6cd(0x1a2)]();}['_initDataSource'](){const _0xf28d70=_0x128554;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0xf28d70(0x1b9)][_0xf28d70(0x1c7)]=!0x1;}};C=J([y(0x0,M[_0x128554(0x1c1)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x128554(0x1a8)],L=Object[_0x128554(0x1ff)],Z=(_0x21afaf,_0x2baeb5,_0x5aeac5)=>_0x2baeb5 in _0x21afaf?F(_0x21afaf,_0x2baeb5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5aeac5}):_0x21afaf[_0x2baeb5]=_0x5aeac5,W=(_0x1156bd,_0x9f7345,_0x4a05ce,_0xad9e82)=>{const _0xd9a1a3=_0x128554;for(var _0x40bf9a=_0xad9e82>0x1?void 0x0:_0xad9e82?L(_0x9f7345,_0x4a05ce):_0x9f7345,_0x57cfab=_0x1156bd[_0xd9a1a3(0x1a1)]-0x1,_0xaf1fb2;_0x57cfab>=0x0;_0x57cfab--)(_0xaf1fb2=_0x1156bd[_0x57cfab])&&(_0x40bf9a=_0xaf1fb2(_0x40bf9a)||_0x40bf9a);return _0x40bf9a;},O=(_0x202c0a,_0xb25569)=>(_0x4cfeda,_0x2407bf)=>_0xb25569(_0x4cfeda,_0x2407bf,_0x202c0a),N=(_0x2f6e2c,_0x3a7d88,_0x13a36c)=>Z(_0x2f6e2c,typeof _0x3a7d88!=_0x128554(0x219)?_0x3a7d88+'':_0x3a7d88,_0x13a36c);exports[_0x128554(0x1f3)]=class extends c[_0x128554(0x214)]{constructor(_0x19e9f1=D,_0x17618f,_0x182876){const _0x1164fb=_0x128554;super(),this[_0x1164fb(0x1a9)]=_0x19e9f1,this[_0x1164fb(0x201)]=_0x17618f,this[_0x1164fb(0x1a7)]=_0x182876;const {..._0xadeb1e}=c[_0x1164fb(0x1e8)]({},D,this[_0x1164fb(0x1a9)]);this[_0x1164fb(0x1a7)][_0x1164fb(0x1fc)](q,_0xadeb1e);}[_0x128554(0x1c5)](){const _0x46af38=_0x128554;[[g],[C],[p]][_0x46af38(0x1b2)](_0x722912=>{this['_injector']['add'](_0x722912);});}[_0x128554(0x1c6)](){const _0x473847=_0x128554;this[_0x473847(0x201)][_0x473847(0x1d0)](C),this['_injector'][_0x473847(0x1d0)](p);}},N(exports[_0x128554(0x1f3)],_0x128554(0x215),U),N(exports[_0x128554(0x1f3)],_0x128554(0x1ad),c[_0x128554(0x1c3)][_0x128554(0x1a3)]),exports[_0x128554(0x1f3)]=W([c[_0x128554(0x1f0)](j[_0x128554(0x1fb)],b[_0x128554(0x1c8)],T[_0x128554(0x1e4)]),O(0x1,c['Inject'](c[_0x128554(0x1de)])),O(0x2,c[_0x128554(0x1e7)])],exports[_0x128554(0x1f3)]);function _0xc131(){const _0x3d7308=['resolveComment','IConfigService','merge','Add','CustomRangeType','thread-comment-data-source.config','userId','96SIrbtr','CommentService','resolved','DependentOn','comment','pipe','UniverThreadCommentDataSourcePlugin','unitId','_threadCommentModel','@univerjs/thread-comment','COMMENT','4977248euPxPl','@univerjs/thread-comment-ui','post','UniverThreadCommentUIPlugin','setConfig','_threadCommentDataSource','2857365ViBYiG','getOwnPropertyDescriptor','toStringTag','_injector','rxjs','getMemberID','users','getCurrentUser','bufferTime','map','createTimestamp','34811mOllZR','saveCommentToSnapshot','root','filter','stringify','commentUpdate$','updateComment','Disposable','_commentService','ref','body','Plugin','pluginName','@univerjs-pro/license','solved','YYYY/MM/DD\x20HH:mm','symbol','rangeId','getUser','getUnit','user','deleteComment','UNRECOGNIZED','delete','/universer-api/user/list','/universer-api/comment/unit/','_sessionService','Unknown','length','_initDataSource','UNIVER_UNKNOWN','personId','addUser','Reply','_configService','defineProperty','_config','_userService','@univerjs-pro/collaboration-client','dayjs','type','content','_init','reply','OpenOrReOpen','forEach','parentId','4367uzaJaW','parse','error','getComment','disposeWithMe','_threadCommentDataSourceService','rangeType','Delete','/delete','addComment','ThreadCommentModel','/reply','customRanges','IThreadCommentDataSourceService','threadId','UniverInstanceType','code','onStarting','onReady','syncUpdateMutationToColla','UniverCollaborationClientPlugin','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','1338327eyewGe','_initUserSync','find','/edit','size','values','get','replyId','requireSession','Inject','listComments','replies','8248386TgWDjs','Edit','UserManagerService','slice','Solved','6713600mMaaCL','Solve','HTTPService','Injector','/list','payload','userID','_httpService','/add','UniverLicensePlugin','54yyulZh'];_0xc131=function(){return _0x3d7308;};return _0xc131();}
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4b07e7=_0x181b;(function(_0x2791fb,_0x4da5a1){const _0x521bea=_0x181b,_0x550324=_0x2791fb();while(!![]){try{const _0x1a9c71=-parseInt(_0x521bea(0x106))/0x1*(-parseInt(_0x521bea(0x151))/0x2)+parseInt(_0x521bea(0xf8))/0x3*(parseInt(_0x521bea(0x120))/0x4)+-parseInt(_0x521bea(0x121))/0x5+-parseInt(_0x521bea(0x154))/0x6*(-parseInt(_0x521bea(0x107))/0x7)+parseInt(_0x521bea(0x134))/0x8*(parseInt(_0x521bea(0x110))/0x9)+-parseInt(_0x521bea(0x13f))/0xa*(-parseInt(_0x521bea(0x108))/0xb)+-parseInt(_0x521bea(0x14c))/0xc*(parseInt(_0x521bea(0x10b))/0xd);if(_0x1a9c71===_0x4da5a1)break;else _0x550324['push'](_0x550324['shift']());}catch(_0x2d228d){_0x550324['push'](_0x550324['shift']());}}}(_0x1923,0x7b47f));import{CommentService as _0x1a1583,CollaborationSessionService as _0x1fd658,UniverCollaborationClientPlugin as _0x3d47fa}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x21e0fd}from'@univerjs-pro/license';import{dayjs as _0x471760,UserManagerService as _0x416fe6,Inject as _0x3c112c,Injector as _0x15e34d,Disposable as _0x6c7d02,CustomRangeType as _0x23fccf,UniverInstanceType as _0x514331,DependentOn as _0x5e5e54,IConfigService as _0x1e0359,Plugin as _0x2f5ef4,merge as _0x4a2386}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xe804bc}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x52f7ea,IThreadCommentDataSourceService as _0x4013bc}from'@univerjs/thread-comment';import{bufferTime as _0x5984f4}from'rxjs';import{HTTPService as _0x3849c5}from'@univerjs/network';const W=_0x4b07e7(0xf7);function _0x1923(){const _0x5595fb=['_threadCommentDataSourceService','_sessionService','COMMENT','unitId','get','_commentService','symbol','defineProperty','filter','disposeWithMe','241448yIyFkS','pluginName','YYYY/MM/DD\x20HH:mm','getUnit','userId','_userService','addUser','users','/delete','getMemberID','getOwnPropertyDescriptor','27460jbIabh','delete','user','values','personId','solved','Reply','code','syncUpdateMutationToColla','_config','slice','getComment','_configService','98664bwJkjc','UNRECOGNIZED','format','threadId','commentUpdate$','2EkVeVN','replyId','comment','6slXwyg','_injector','rangeId','thread-comment-data-source.config','OpenOrReOpen','stringify','content','Delete','addComment','ref','Edit','find','requireSession','forEach','listComments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','3AYQNmX','size','subscribe','length','Add','updateComment','Solved','/universer-api/comment/unit/','createTimestamp','rangeType','parse','resolved','/list','/edit','507930tvnOII','4267585kMQSso','2651HoayUC','pipe','replies','3653zSsDez','getUser','deleteComment','add','parentId','171XKoZlS','setConfig','error','post','dataSource','_initUserSync','getCurrentUser','/universer-api/user/list','/reply','map','Solve','root','_threadCommentDataSource','userID','resolveComment','type','1853308qdwozu','3980aQywqa','_threadCommentModel','onStarting','_init','body','_initDataSource','_httpService','payload','Unknown'];_0x1923=function(){return _0x5595fb;};return _0x1923();}var I=(_0x31d8b8=>(_0x31d8b8[_0x31d8b8[_0x4b07e7(0x158)]=0x0]='OpenOrReOpen',_0x31d8b8[_0x31d8b8['Solved']=0x1]=_0x4b07e7(0xfe),_0x31d8b8[_0x31d8b8[_0x4b07e7(0x14d)]=-0x1]='UNRECOGNIZED',_0x31d8b8))(I||{}),v=(_0x5d3573=>(_0x5d3573[_0x5d3573[_0x4b07e7(0x129)]=0x0]=_0x4b07e7(0x129),_0x5d3573[_0x5d3573[_0x4b07e7(0xfc)]=0x1]=_0x4b07e7(0xfc),_0x5d3573[_0x5d3573[_0x4b07e7(0x145)]=0x2]=_0x4b07e7(0x145),_0x5d3573[_0x5d3573['Edit']=0x3]=_0x4b07e7(0x15e),_0x5d3573[_0x5d3573['Delete']=0x4]=_0x4b07e7(0x15b),_0x5d3573[_0x5d3573[_0x4b07e7(0x11a)]=0x5]=_0x4b07e7(0x11a),_0x5d3573[_0x5d3573[_0x4b07e7(0x14d)]=-0x1]=_0x4b07e7(0x14d),_0x5d3573))(v||{});const D=_0x3c2d82=>_0x471760(new Date(+_0x3c2d82))[_0x4b07e7(0x14e)](_0x4b07e7(0x136)),B=async(_0x1cde4d,_0xe92fe5)=>{const _0xaa6722=_0x4b07e7,_0xab947f=_0x1cde4d[_0xaa6722(0x12e)](_0x416fe6),_0x1ef13a=_0x1cde4d[_0xaa6722(0x12e)](_0x3849c5);_0xe92fe5['forEach'](_0x5a1bdb=>{const _0x5de147=_0xaa6722;_0xab947f[_0x5de147(0x10c)](_0x5a1bdb)&&_0xe92fe5[_0x5de147(0x140)](_0x5a1bdb);}),_0xe92fe5[_0xaa6722(0xf9)]&&(await _0x1ef13a['get'](_0xaa6722(0x117),{'params':{'userIDs':[..._0xe92fe5]}}))[_0xaa6722(0x125)][_0xaa6722(0x13b)]['forEach'](_0x406591=>{const _0x3be61b=_0xaa6722;_0x406591&&_0xab947f[_0x3be61b(0x13a)](_0x406591);});};var K=Object[_0x4b07e7(0x13e)],V=(_0x2a6c1b,_0xd948de,_0x508d56,_0xaca8b0)=>{const _0x1deed3=_0x4b07e7;for(var _0x5844b2=_0xaca8b0>0x1?void 0x0:_0xaca8b0?K(_0xd948de,_0x508d56):_0xd948de,_0x5766e1=_0x2a6c1b[_0x1deed3(0xfb)]-0x1,_0x54902d;_0x5766e1>=0x0;_0x5766e1--)(_0x54902d=_0x2a6c1b[_0x5766e1])&&(_0x5844b2=_0x54902d(_0x5844b2)||_0x5844b2);return _0x5844b2;},p=(_0x5b1438,_0x1d7b6b)=>(_0x1ef566,_0x3ea25f)=>_0x1d7b6b(_0x1ef566,_0x3ea25f,_0x5b1438);let S=class extends _0x6c7d02{constructor(_0x19bb64,_0x218317,_0x4ce68c,_0x4922a3){const _0x237b44=_0x4b07e7;super(),this[_0x237b44(0x12f)]=_0x19bb64,this[_0x237b44(0x122)]=_0x218317,this['_userService']=_0x4ce68c,this['_injector']=_0x4922a3,this[_0x237b44(0x124)](),this[_0x237b44(0x115)]();}[_0x4b07e7(0x115)](){const _0x42c3b3=_0x4b07e7;this['disposeWithMe'](this[_0x42c3b3(0x122)]['commentUpdate$'][_0x42c3b3(0x109)](_0x5984f4(0x10))[_0x42c3b3(0xfa)](_0xf821f6=>{const _0x1c1c92=_0x42c3b3,_0x11dfb5=new Set();_0xf821f6['forEach'](_0x3926f1=>{const _0x942c36=_0x181b;switch(_0x3926f1[_0x942c36(0x11f)]){case _0x942c36(0x10e):{const _0x2cf316=_0x3926f1[_0x942c36(0x128)][_0x942c36(0x143)];_0x11dfb5[_0x942c36(0x10e)](_0x2cf316);break;}}}),B(this[_0x1c1c92(0x155)],_0x11dfb5);}));}[_0x4b07e7(0x124)](){const _0x1a1700=_0x4b07e7;this[_0x1a1700(0x133)](this['_commentService'][_0x1a1700(0x150)][_0x1a1700(0xfa)](async _0x483617=>{const _0x31cf19=_0x1a1700;var _0x4dddb6,_0x8c2546,_0x33af4c,_0xd89e1a;const _0x187d48=(_0x4dddb6=this[_0x31cf19(0x122)][_0x31cf19(0x137)](_0x483617[_0x31cf19(0x12d)])['find'](_0xb1ef45=>_0xb1ef45[_0x31cf19(0x14f)]===_0x483617['threadId']))==null?void 0x0:_0x4dddb6[_0x31cf19(0x11b)];if(!_0x187d48)return;const {unitId:_0x80eb4b,subUnitId:_0x599791}=_0x187d48;switch(_0x483617[_0x31cf19(0x141)]&&this['_userService'][_0x31cf19(0x13a)](_0x483617[_0x31cf19(0x141)]),_0x483617[_0x31cf19(0x11f)]){case v['Add']:break;case v[_0x31cf19(0x145)]:{this[_0x31cf19(0x122)]['addComment'](_0x80eb4b,_0x599791,{'unitId':_0x80eb4b,'subUnitId':_0x599791,'ref':'','id':_0x483617[_0x31cf19(0x152)],'dT':D(+_0x483617[_0x31cf19(0x100)]),'threadId':_0x483617[_0x31cf19(0x14f)],'personId':(_0x33af4c=(_0x8c2546=_0x483617[_0x31cf19(0x141)])==null?void 0x0:_0x8c2546['userID'])!=null?_0x33af4c:_0x483617['userId'],'text':JSON[_0x31cf19(0x102)](_0x483617['content']),'parentId':_0x187d48['id']});break;}case v[_0x31cf19(0x15b)]:{const _0x4e0c9a=this[_0x31cf19(0x122)][_0x31cf19(0x14a)](_0x80eb4b,_0x599791,_0x483617[_0x31cf19(0x152)]);_0x4e0c9a&&_0x4e0c9a[_0x31cf19(0x10f)]&&this[_0x31cf19(0x122)][_0x31cf19(0x10d)](_0x80eb4b,_0x599791,_0x483617['replyId']);break;}case v[_0x31cf19(0x15e)]:{this[_0x31cf19(0x122)][_0x31cf19(0xfd)](_0x80eb4b,_0x599791,{'commentId':_0x483617['replyId'],'text':JSON['parse'](_0x483617[_0x31cf19(0x15a)])});break;}case v['Solve']:{const _0x8cf9d8=(_0xd89e1a=this['_threadCommentModel'][_0x31cf19(0x137)](_0x483617[_0x31cf19(0x12d)])[_0x31cf19(0x15f)](_0x4001df=>_0x4001df[_0x31cf19(0x14f)]===_0x483617[_0x31cf19(0x14f)]))==null?void 0x0:_0xd89e1a[_0x31cf19(0x11b)];_0x8cf9d8&&this[_0x31cf19(0x122)][_0x31cf19(0x11e)](_0x80eb4b,_0x599791,_0x8cf9d8['id'],_0x483617[_0x31cf19(0x144)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x3c112c(_0x1a1583)),p(0x1,_0x3c112c(_0x52f7ea)),p(0x2,_0x3c112c(_0x416fe6)),p(0x3,_0x3c112c(_0x15e34d))],S);const z=_0x4b07e7(0x157),M={};var k=Object[_0x4b07e7(0x13e)],Q=(_0x1950c6,_0x4cf0e0,_0x49ccc0,_0x33a086)=>{const _0x273370=_0x4b07e7;for(var _0xec26fb=_0x33a086>0x1?void 0x0:_0x33a086?k(_0x4cf0e0,_0x49ccc0):_0x4cf0e0,_0x3359eb=_0x1950c6[_0x273370(0xfb)]-0x1,_0x2a84f7;_0x3359eb>=0x0;_0x3359eb--)(_0x2a84f7=_0x1950c6[_0x3359eb])&&(_0xec26fb=_0x2a84f7(_0xec26fb)||_0xec26fb);return _0xec26fb;},_=(_0x2ee0ab,_0x344c50)=>(_0x1c2240,_0xa54929)=>_0x344c50(_0x1c2240,_0xa54929,_0x2ee0ab);function _0x181b(_0xb1ae11,_0x318b9f){const _0x192349=_0x1923();return _0x181b=function(_0x181bd3,_0x418c9d){_0x181bd3=_0x181bd3-0xf5;let _0x4defb7=_0x192349[_0x181bd3];return _0x4defb7;},_0x181b(_0xb1ae11,_0x318b9f);}function X(_0x25bb61,_0xe72036){const _0x286d65=_0x4b07e7,_0x8e733f=_0x25bb61[_0x286d65(0x10a)][0x0];return{..._0xe72036,'id':_0x8e733f['replyId'],'resolved':_0x25bb61['solved']===0x1,'dT':D(_0x8e733f[_0x286d65(0x100)]),'personId':_0x8e733f[_0x286d65(0x138)],'threadId':_0x8e733f[_0x286d65(0x14f)]};}function ee(_0x34270e,_0x3c5a87,_0x6b82ad){const _0x4a34f9=_0x4b07e7;var _0x30047c,_0x4aeb13;if(((_0x4aeb13=(_0x30047c=_0x34270e==null?void 0x0:_0x34270e[_0x4a34f9(0x10a)])==null?void 0x0:_0x30047c[_0x4a34f9(0xfb)])!=null?_0x4aeb13:0x0)>0x0){const _0x3cc799=(_0x474b6b,_0x632057)=>({'id':_0x474b6b[_0x4a34f9(0x152)],'threadId':_0x474b6b['threadId'],'dT':D(_0x474b6b[_0x4a34f9(0x100)]),'personId':_0x474b6b['userId'],'resolved':_0x34270e[_0x4a34f9(0x144)]===I[_0x4a34f9(0xfe)],'unitId':_0x3c5a87,'subUnitId':_0x6b82ad,'text':JSON['parse'](_0x474b6b[_0x4a34f9(0x15a)]),'parentId':_0x632057}),_0x5b5a02=_0x3cc799(_0x34270e['replies'][0x0]);return{..._0x5b5a02,'children':_0x34270e[_0x4a34f9(0x10a)][_0x4a34f9(0x149)](0x1)[_0x4a34f9(0x119)](_0x4e43f9=>_0x3cc799(_0x4e43f9,_0x5b5a02['id']))};}return null;}let f=class{constructor(_0xa96396,_0xf6c0e7,_0x25aae8,_0xa13c7a){const _0x349230=_0x4b07e7;this[_0x349230(0x127)]=_0xa96396,this[_0x349230(0x139)]=_0xf6c0e7,this[_0x349230(0x12b)]=_0x25aae8,this[_0x349230(0x155)]=_0xa13c7a;}async[_0x4b07e7(0x15c)](_0x268f50){const _0x492111=_0x4b07e7;var _0x26e451,_0xc31f89;const {parentId:_0x4d0ae6,unitId:_0x2ffe0e,text:_0x2f6cc1,threadId:_0xd0ceb5}=_0x268f50,_0x5b0c99=(_0xc31f89=(_0x26e451=_0x2f6cc1['customRanges'])==null?void 0x0:_0x26e451[_0x492111(0x132)](_0x5c52ac=>_0x5c52ac[_0x492111(0x101)]===_0x23fccf[_0x492111(0x12c)])[_0x492111(0x119)](_0x396ad5=>_0x396ad5[_0x492111(0x156)]))!=null?_0xc31f89:[],_0x223fe2=JSON[_0x492111(0x159)](_0x2f6cc1),_0x578938=(await this[_0x492111(0x12b)][_0x492111(0x160)](_0x2ffe0e))['getMemberID']();if(_0x4d0ae6){const _0x22a6ab={'memberId':_0x578938,'unitId':_0x2ffe0e,'content':_0x223fe2,'mention':_0x5b0c99,'threadId':_0xd0ceb5},_0x307626=(await this['_httpService']['post'](_0x492111(0xff)+_0x2ffe0e+_0x492111(0x118),{'body':_0x22a6ab}))[_0x492111(0x125)]['reply'];return{..._0x268f50,'id':_0x307626[_0x492111(0x152)],'dT':_0x471760(+_0x307626[_0x492111(0x100)])[_0x492111(0x14e)](_0x492111(0x136)),'personId':_0x307626[_0x492111(0x138)]};}else{const _0x38e7be={'memberId':_0x578938,'unitId':_0x2ffe0e,'content':_0x223fe2,'mention':_0x5b0c99},_0x56dca0=await this[_0x492111(0x127)][_0x492111(0x113)]('/universer-api/comment/unit/'+_0x2ffe0e+'/add',{'body':_0x38e7be});return X(_0x56dca0[_0x492111(0x125)][_0x492111(0x153)],_0x268f50);}}async[_0x4b07e7(0xfd)](_0x2b5825){const _0x43bce7=_0x4b07e7;var _0xb1a846,_0x37e651;const {text:_0x3d9ae5,unitId:_0x20c932}=_0x2b5825,_0x6841ec=(_0x37e651=(_0xb1a846=_0x3d9ae5['customRanges'])==null?void 0x0:_0xb1a846[_0x43bce7(0x132)](_0x349cb4=>_0x349cb4[_0x43bce7(0x101)]===_0x23fccf['COMMENT'])[_0x43bce7(0x119)](_0x11c5df=>_0x11c5df[_0x43bce7(0x156)]))!=null?_0x37e651:[],_0x35375a=JSON[_0x43bce7(0x159)](_0x3d9ae5),_0x1dbf12=_0x2b5825['threadId'],_0x4f956c=_0x2b5825['id'],_0xdf99f8={'memberId':(await this[_0x43bce7(0x12b)]['requireSession'](_0x20c932))[_0x43bce7(0x13d)](),'unitId':_0x20c932,'threadId':_0x1dbf12,'mention':_0x6841ec,'content':_0x35375a,'replyId':_0x4f956c},_0x4c504c=await this[_0x43bce7(0x127)][_0x43bce7(0x113)](_0x43bce7(0xff)+_0x20c932+_0x43bce7(0x105),{'body':_0xdf99f8});return!_0x4c504c[_0x43bce7(0x125)]['error']||_0x4c504c['body'][_0x43bce7(0x112)][_0x43bce7(0x146)]===0x1;}async['resolveComment'](_0xeda29b){const _0x23942d=_0x4b07e7,{unitId:_0x106db7}=_0xeda29b,_0x2e58a0=_0xeda29b[_0x23942d(0x14f)],_0x586e94={'memberId':this[_0x23942d(0x139)][_0x23942d(0x116)]()[_0x23942d(0x11d)],'unitId':_0x106db7,'threadId':_0x2e58a0,'solved':_0xeda29b[_0x23942d(0x103)]?I[_0x23942d(0xfe)]:I[_0x23942d(0x158)]},_0x47f213=await this[_0x23942d(0x127)]['post']('/universer-api/comment/unit/'+_0x106db7+'/solved',{'body':_0x586e94});return!_0x47f213['body'][_0x23942d(0x112)]||_0x47f213[_0x23942d(0x125)][_0x23942d(0x112)][_0x23942d(0x146)]===0x1;}async[_0x4b07e7(0x10d)](_0x52f61f,_0x24553e,_0x3d6b6e,_0x4d1b87){const _0x4825c8=_0x4b07e7,_0x24be61={'memberId':(await this[_0x4825c8(0x12b)][_0x4825c8(0x160)](_0x52f61f))[_0x4825c8(0x13d)](),'threadId':_0x3d6b6e,'replyId':_0x4d1b87,'unitId':_0x52f61f},_0x3740a2=await this['_httpService']['post'](_0x4825c8(0xff)+_0x52f61f+_0x4825c8(0x13c),{'body':_0x24be61});return!_0x3740a2[_0x4825c8(0x125)][_0x4825c8(0x112)]||_0x3740a2['body'][_0x4825c8(0x112)][_0x4825c8(0x146)]===0x1;}async[_0x4b07e7(0xf6)](_0xb39f73,_0x9fb586,_0x43b657){const _0x3127e2=_0x4b07e7,_0x35685f={'unitId':_0xb39f73,'threadId':_0x43b657},_0x1323e3=await this['_httpService'][_0x3127e2(0x113)]('/universer-api/comment/unit/'+_0xb39f73+_0x3127e2(0x104),{'body':_0x35685f}),_0x1e6210=_0x43b657[_0x3127e2(0x119)](_0x464aad=>ee(_0x1323e3[_0x3127e2(0x125)]['comments'][_0x464aad],_0xb39f73,_0x9fb586))[_0x3127e2(0x132)](Boolean);return Object[_0x3127e2(0x142)](_0x1323e3['body'][_0x3127e2(0x13b)])[_0x3127e2(0xf5)](_0x457901=>{const _0x3beb47=_0x3127e2;this[_0x3beb47(0x139)][_0x3beb47(0x13a)](_0x457901);}),_0x1e6210;}['saveCommentToSnapshot'](_0x4cdda2){const _0x347081=_0x4b07e7;return{'id':_0x4cdda2['id'],'threadId':_0x4cdda2['threadId'],'ref':_0x4cdda2[_0x347081(0x15d)]};}};f=Q([_(0x0,_0x3c112c(_0x3849c5)),_(0x1,_0x3c112c(_0x416fe6)),_(0x2,_0x3c112c(_0x1fd658)),_(0x3,_0x3c112c(_0x15e34d))],f);var re=Object[_0x4b07e7(0x13e)],te=(_0x35f8b3,_0x572dc3,_0x31f1d6,_0x5e12e9)=>{const _0x3ed32d=_0x4b07e7;for(var _0x448a9e=_0x5e12e9>0x1?void 0x0:_0x5e12e9?re(_0x572dc3,_0x31f1d6):_0x572dc3,_0x3da971=_0x35f8b3[_0x3ed32d(0xfb)]-0x1,_0x226144;_0x3da971>=0x0;_0x3da971--)(_0x226144=_0x35f8b3[_0x3da971])&&(_0x448a9e=_0x226144(_0x448a9e)||_0x448a9e);return _0x448a9e;},N=(_0x225574,_0x52e624)=>(_0x48768a,_0x4b2472)=>_0x52e624(_0x48768a,_0x4b2472,_0x225574);let g=class extends _0x6c7d02{constructor(_0x511312,_0x556241){const _0x209718=_0x4b07e7;super(),this[_0x209718(0x12a)]=_0x511312,this[_0x209718(0x11c)]=_0x556241,this[_0x209718(0x126)]();}['_initDataSource'](){const _0x5e7ed7=_0x4b07e7;this['_threadCommentDataSourceService'][_0x5e7ed7(0x114)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x5e7ed7(0x147)]=!0x1;}};g=te([N(0x0,_0x4013bc),N(0x1,_0x3c112c(f))],g);var se=Object[_0x4b07e7(0x131)],oe=Object[_0x4b07e7(0x13e)],ne=(_0x23ed34,_0x149197,_0xf47f53)=>_0x149197 in _0x23ed34?se(_0x23ed34,_0x149197,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf47f53}):_0x23ed34[_0x149197]=_0xf47f53,ie=(_0x30f388,_0x4f08ba,_0x28af5a,_0x36b259)=>{const _0x42e9e8=_0x4b07e7;for(var _0xb1b034=_0x36b259>0x1?void 0x0:_0x36b259?oe(_0x4f08ba,_0x28af5a):_0x4f08ba,_0x2f1e0b=_0x30f388[_0x42e9e8(0xfb)]-0x1,_0x559d65;_0x2f1e0b>=0x0;_0x2f1e0b--)(_0x559d65=_0x30f388[_0x2f1e0b])&&(_0xb1b034=_0x559d65(_0xb1b034)||_0xb1b034);return _0xb1b034;},w=(_0x292aee,_0x414712)=>(_0x167677,_0xb23af6)=>_0x414712(_0x167677,_0xb23af6,_0x292aee),$=(_0x2d8b37,_0x791142,_0x3859c1)=>ne(_0x2d8b37,typeof _0x791142!=_0x4b07e7(0x130)?_0x791142+'':_0x791142,_0x3859c1);let b=class extends _0x2f5ef4{constructor(_0x39969e=M,_0x292be0,_0x38ca6c){const _0x3d7004=_0x4b07e7;super(),this['_config']=_0x39969e,this['_injector']=_0x292be0,this[_0x3d7004(0x14b)]=_0x38ca6c;const {..._0x3a1b14}=_0x4a2386({},M,this[_0x3d7004(0x148)]);this[_0x3d7004(0x14b)][_0x3d7004(0x111)](z,_0x3a1b14);}[_0x4b07e7(0x123)](){const _0x4f8495=_0x4b07e7;[[f],[g],[S]][_0x4f8495(0xf5)](_0x45d384=>{const _0x281297=_0x4f8495;this[_0x281297(0x155)][_0x281297(0x10e)](_0x45d384);});}['onReady'](){const _0x4943ec=_0x4b07e7;this['_injector'][_0x4943ec(0x12e)](g),this['_injector']['get'](S);}};$(b,_0x4b07e7(0x135),W),$(b,'type',_0x514331['UNIVER_UNKNOWN']),b=ie([_0x5e5e54(_0xe804bc,_0x3d47fa,_0x21e0fd),w(0x1,_0x3c112c(_0x15e34d)),w(0x2,_0x1e0359)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0xef2ac3=_0x14bf;(function(_0x14f7d5,_0x673000){const _0x1e46e6=_0x14bf,_0x5a0836=_0x14f7d5();while(!![]){try{const _0x50a9de=parseInt(_0x1e46e6(0xf7))/0x1*(-parseInt(_0x1e46e6(0xd8))/0x2)+-parseInt(_0x1e46e6(0xa5))/0x3*(-parseInt(_0x1e46e6(0xfa))/0x4)+-parseInt(_0x1e46e6(0xff))/0x5*(-parseInt(_0x1e46e6(0xfd))/0x6)+-parseInt(_0x1e46e6(0xa6))/0x7*(parseInt(_0x1e46e6(0xdd))/0x8)+parseInt(_0x1e46e6(0x10b))/0x9*(-parseInt(_0x1e46e6(0xf4))/0xa)+-parseInt(_0x1e46e6(0xf6))/0xb*(parseInt(_0x1e46e6(0x109))/0xc)+-parseInt(_0x1e46e6(0xa9))/0xd*(-parseInt(_0x1e46e6(0xf5))/0xe);if(_0x50a9de===_0x673000)break;else _0x5a0836['push'](_0x5a0836['shift']());}catch(_0x1a17e7){_0x5a0836['push'](_0x5a0836['shift']());}}}(_0x7407,0x6a8dd));import{CommentService as _0x245f3b,CollaborationSessionService as _0x38ed50,UniverCollaborationClientPlugin as _0x35d9c6}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x157e4d}from'@univerjs-pro/license';import{dayjs as _0x5802de,UserManagerService as _0x45265e,Inject as _0xaac0e8,Injector as _0x20745a,Disposable as _0x3e49f1,CustomRangeType as _0x11800a,UniverInstanceType as _0x20fd11,DependentOn as _0xe266c6,IConfigService as _0xf1feab,Plugin as _0x2c8fc5,merge as _0x47eecf}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x33dd69}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x38c2e2,IThreadCommentDataSourceService as _0x334a2b}from'@univerjs/thread-comment';import{bufferTime as _0x279e3b}from'rxjs';import{HTTPService as _0x20b61d}from'@univerjs/network';const W=_0xef2ac3(0xcd);var I=(_0x61f09c=>(_0x61f09c[_0x61f09c[_0xef2ac3(0xaa)]=0x0]=_0xef2ac3(0xaa),_0x61f09c[_0x61f09c['Solved']=0x1]=_0xef2ac3(0xd0),_0x61f09c[_0x61f09c[_0xef2ac3(0xf8)]=-0x1]=_0xef2ac3(0xf8),_0x61f09c))(I||{}),v=(_0x489c32=>(_0x489c32[_0x489c32[_0xef2ac3(0xe5)]=0x0]=_0xef2ac3(0xe5),_0x489c32[_0x489c32[_0xef2ac3(0xfc)]=0x1]='Add',_0x489c32[_0x489c32[_0xef2ac3(0xa7)]=0x2]=_0xef2ac3(0xa7),_0x489c32[_0x489c32['Edit']=0x3]=_0xef2ac3(0xc7),_0x489c32[_0x489c32['Delete']=0x4]=_0xef2ac3(0xd2),_0x489c32[_0x489c32[_0xef2ac3(0xbf)]=0x5]='Solve',_0x489c32[_0x489c32[_0xef2ac3(0xf8)]=-0x1]='UNRECOGNIZED',_0x489c32))(v||{});function _0x14bf(_0x378c77,_0x537f7c){const _0x740784=_0x7407();return _0x14bf=function(_0x14bfd7,_0x46733d){_0x14bfd7=_0x14bfd7-0xa5;let _0x3fcb45=_0x740784[_0x14bfd7];return _0x3fcb45;},_0x14bf(_0x378c77,_0x537f7c);}const D=_0x5b3d53=>_0x5802de(new Date(+_0x5b3d53))[_0xef2ac3(0xd6)](_0xef2ac3(0xd1)),B=async(_0x2301ee,_0x4a61ea)=>{const _0x3cd868=_0xef2ac3,_0x8d7d88=_0x2301ee[_0x3cd868(0xba)](_0x45265e),_0x29cdf3=_0x2301ee[_0x3cd868(0xba)](_0x20b61d);_0x4a61ea['forEach'](_0x1f0264=>{const _0x76ab13=_0x3cd868;_0x8d7d88[_0x76ab13(0x104)](_0x1f0264)&&_0x4a61ea[_0x76ab13(0x10a)](_0x1f0264);}),_0x4a61ea[_0x3cd868(0xea)]&&(await _0x29cdf3['get'](_0x3cd868(0xbe),{'params':{'userIDs':[..._0x4a61ea]}}))[_0x3cd868(0xc3)][_0x3cd868(0xca)][_0x3cd868(0xd9)](_0x4f473b=>{const _0x466bd5=_0x3cd868;_0x4f473b&&_0x8d7d88[_0x466bd5(0xe7)](_0x4f473b);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2d42a8,_0x46f336,_0x1b8431,_0xa367e2)=>{for(var _0x3b2c17=_0xa367e2>0x1?void 0x0:_0xa367e2?K(_0x46f336,_0x1b8431):_0x46f336,_0x194b73=_0x2d42a8['length']-0x1,_0x3bbbb5;_0x194b73>=0x0;_0x194b73--)(_0x3bbbb5=_0x2d42a8[_0x194b73])&&(_0x3b2c17=_0x3bbbb5(_0x3b2c17)||_0x3b2c17);return _0x3b2c17;},p=(_0x1cd65c,_0x232ee1)=>(_0x449967,_0x25b825)=>_0x232ee1(_0x449967,_0x25b825,_0x1cd65c);function _0x7407(){const _0x357070=['parse','userID','syncUpdateMutationToColla','getCurrentUser','getUser','replies','pluginName','_threadCommentDataSource','saveCommentToSnapshot','2348376PBGovc','delete','27kOWmQI','rangeType','getComment','/list','191946tlktrL','14uVLaeX','Reply','/universer-api/comment/unit/','15596945cNZSKq','OpenOrReOpen','_commentService','payload','_injector','createTimestamp','error','userId','_configService','personId','ref','find','addComment','/edit','customRanges','reply','resolved','get','getUnit','resolveComment','threadId','/universer-api/user/list','Solve','getMemberID','deleteComment','disposeWithMe','body','code','parentId','_initUserSync','Edit','defineProperty','unitId','users','rangeId','filter','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getOwnPropertyDescriptor','_threadCommentModel','Solved','YYYY/MM/DD\x20HH:mm','Delete','listComments','content','requireSession','format','_config','26374NqBYcr','forEach','/delete','COMMENT','length','3161792LnqBXq','_init','add','post','updateComment','/solved','user','replyId','Unknown','_userService','addUser','_threadCommentDataSourceService','subscribe','size','root','_httpService','comments','_initDataSource','/reply','map','_sessionService','thread-comment-data-source.config','/add','1925330ExTfOj','14jViaFV','33agDBHs','4raeWhP','UNRECOGNIZED','commentUpdate$','24IBJZlP','type','Add','5118pFIxRU','pipe','5045dySPzw'];_0x7407=function(){return _0x357070;};return _0x7407();}let S=class extends _0x3e49f1{constructor(_0x34681d,_0x32df14,_0x53183e,_0x175829){const _0x13ff75=_0xef2ac3;super(),this[_0x13ff75(0xab)]=_0x34681d,this['_threadCommentModel']=_0x32df14,this['_userService']=_0x53183e,this[_0x13ff75(0xad)]=_0x175829,this[_0x13ff75(0xde)](),this[_0x13ff75(0xc6)]();}[_0xef2ac3(0xc6)](){const _0x3ade16=_0xef2ac3;this[_0x3ade16(0xc2)](this[_0x3ade16(0xcf)][_0x3ade16(0xf9)][_0x3ade16(0xfe)](_0x279e3b(0x10))[_0x3ade16(0xe9)](_0x484049=>{const _0x1b7d1a=_0x3ade16,_0x35891a=new Set();_0x484049[_0x1b7d1a(0xd9)](_0xad9c2e=>{const _0x3e4e60=_0x1b7d1a;switch(_0xad9c2e[_0x3e4e60(0xfb)]){case'add':{const _0x2c424a=_0xad9c2e[_0x3e4e60(0xac)][_0x3e4e60(0xb2)];_0x35891a[_0x3e4e60(0xdf)](_0x2c424a);break;}}}),B(this['_injector'],_0x35891a);}));}['_init'](){const _0x43d943=_0xef2ac3;this[_0x43d943(0xc2)](this[_0x43d943(0xab)][_0x43d943(0xf9)][_0x43d943(0xe9)](async _0x5d4325=>{const _0x4c8f98=_0x43d943;var _0xa401a4,_0x5677e8,_0x5c250a,_0x4fe39d;const _0x1d7703=(_0xa401a4=this[_0x4c8f98(0xcf)][_0x4c8f98(0xbb)](_0x5d4325[_0x4c8f98(0xc9)])[_0x4c8f98(0xb4)](_0x3bee46=>_0x3bee46['threadId']===_0x5d4325[_0x4c8f98(0xbd)]))==null?void 0x0:_0xa401a4[_0x4c8f98(0xeb)];if(!_0x1d7703)return;const {unitId:_0x1d6b92,subUnitId:_0x297662}=_0x1d7703;switch(_0x5d4325[_0x4c8f98(0xe3)]&&this['_userService'][_0x4c8f98(0xe7)](_0x5d4325[_0x4c8f98(0xe3)]),_0x5d4325[_0x4c8f98(0xfb)]){case v['Add']:break;case v[_0x4c8f98(0xa7)]:{this['_threadCommentModel']['addComment'](_0x1d6b92,_0x297662,{'unitId':_0x1d6b92,'subUnitId':_0x297662,'ref':'','id':_0x5d4325[_0x4c8f98(0xe4)],'dT':D(+_0x5d4325[_0x4c8f98(0xae)]),'threadId':_0x5d4325[_0x4c8f98(0xbd)],'personId':(_0x5c250a=(_0x5677e8=_0x5d4325[_0x4c8f98(0xe3)])==null?void 0x0:_0x5677e8[_0x4c8f98(0x101)])!=null?_0x5c250a:_0x5d4325[_0x4c8f98(0xb0)],'text':JSON[_0x4c8f98(0x100)](_0x5d4325['content']),'parentId':_0x1d7703['id']});break;}case v['Delete']:{const _0x2c575b=this[_0x4c8f98(0xcf)][_0x4c8f98(0x10d)](_0x1d6b92,_0x297662,_0x5d4325['replyId']);_0x2c575b&&_0x2c575b[_0x4c8f98(0xc5)]&&this[_0x4c8f98(0xcf)][_0x4c8f98(0xc1)](_0x1d6b92,_0x297662,_0x5d4325[_0x4c8f98(0xe4)]);break;}case v[_0x4c8f98(0xc7)]:{this[_0x4c8f98(0xcf)][_0x4c8f98(0xe1)](_0x1d6b92,_0x297662,{'commentId':_0x5d4325[_0x4c8f98(0xe4)],'text':JSON['parse'](_0x5d4325['content'])});break;}case v[_0x4c8f98(0xbf)]:{const _0x325e6e=(_0x4fe39d=this[_0x4c8f98(0xcf)]['getUnit'](_0x5d4325[_0x4c8f98(0xc9)])['find'](_0x5e995f=>_0x5e995f['threadId']===_0x5d4325[_0x4c8f98(0xbd)]))==null?void 0x0:_0x4fe39d[_0x4c8f98(0xeb)];_0x325e6e&&this[_0x4c8f98(0xcf)][_0x4c8f98(0xbc)](_0x1d6b92,_0x297662,_0x325e6e['id'],_0x5d4325['solved']===I[_0x4c8f98(0xd0)]);break;}}}));}};S=V([p(0x0,_0xaac0e8(_0x245f3b)),p(0x1,_0xaac0e8(_0x38c2e2)),p(0x2,_0xaac0e8(_0x45265e)),p(0x3,_0xaac0e8(_0x20745a))],S);const z=_0xef2ac3(0xf2),M={};var k=Object[_0xef2ac3(0xce)],Q=(_0x4b00ca,_0x47edbb,_0x1fab8f,_0x2d8ce4)=>{for(var _0x17e4ac=_0x2d8ce4>0x1?void 0x0:_0x2d8ce4?k(_0x47edbb,_0x1fab8f):_0x47edbb,_0x4e8f41=_0x4b00ca['length']-0x1,_0x1eb821;_0x4e8f41>=0x0;_0x4e8f41--)(_0x1eb821=_0x4b00ca[_0x4e8f41])&&(_0x17e4ac=_0x1eb821(_0x17e4ac)||_0x17e4ac);return _0x17e4ac;},_=(_0x12fda2,_0x233132)=>(_0x51483e,_0x46c0c4)=>_0x233132(_0x51483e,_0x46c0c4,_0x12fda2);function X(_0x40afd3,_0xb542df){const _0x20d48f=_0xef2ac3,_0x41a08c=_0x40afd3[_0x20d48f(0x105)][0x0];return{..._0xb542df,'id':_0x41a08c[_0x20d48f(0xe4)],'resolved':_0x40afd3['solved']===0x1,'dT':D(_0x41a08c['createTimestamp']),'personId':_0x41a08c[_0x20d48f(0xb0)],'threadId':_0x41a08c['threadId']};}function ee(_0x48fc58,_0x43d309,_0x127dcd){const _0x353562=_0xef2ac3;var _0x5e396f,_0xf97301;if(((_0xf97301=(_0x5e396f=_0x48fc58==null?void 0x0:_0x48fc58['replies'])==null?void 0x0:_0x5e396f[_0x353562(0xdc)])!=null?_0xf97301:0x0)>0x0){const _0xe44c6d=(_0x3141ec,_0x4e0602)=>({'id':_0x3141ec['replyId'],'threadId':_0x3141ec[_0x353562(0xbd)],'dT':D(_0x3141ec['createTimestamp']),'personId':_0x3141ec['userId'],'resolved':_0x48fc58['solved']===I['Solved'],'unitId':_0x43d309,'subUnitId':_0x127dcd,'text':JSON[_0x353562(0x100)](_0x3141ec[_0x353562(0xd4)]),'parentId':_0x4e0602}),_0x2d895=_0xe44c6d(_0x48fc58['replies'][0x0]);return{..._0x2d895,'children':_0x48fc58['replies']['slice'](0x1)[_0x353562(0xf0)](_0x5b6cf8=>_0xe44c6d(_0x5b6cf8,_0x2d895['id']))};}return null;}let f=class{constructor(_0x5db0c5,_0x19d232,_0x10d091,_0x5423f7){const _0xb33276=_0xef2ac3;this[_0xb33276(0xec)]=_0x5db0c5,this[_0xb33276(0xe6)]=_0x19d232,this['_sessionService']=_0x10d091,this['_injector']=_0x5423f7;}async[_0xef2ac3(0xb5)](_0x442fcf){const _0x33f642=_0xef2ac3;var _0x1e1426,_0x4a9db3;const {parentId:_0x27b835,unitId:_0x5a79fb,text:_0x2bcf15,threadId:_0xdebc0d}=_0x442fcf,_0x1fbc83=(_0x4a9db3=(_0x1e1426=_0x2bcf15[_0x33f642(0xb7)])==null?void 0x0:_0x1e1426['filter'](_0x2d69cb=>_0x2d69cb[_0x33f642(0x10c)]===_0x11800a['COMMENT'])[_0x33f642(0xf0)](_0x13364a=>_0x13364a[_0x33f642(0xcb)]))!=null?_0x4a9db3:[],_0x28e7a1=JSON['stringify'](_0x2bcf15),_0x5bfb43=(await this[_0x33f642(0xf1)][_0x33f642(0xd5)](_0x5a79fb))['getMemberID']();if(_0x27b835){const _0x581b36={'memberId':_0x5bfb43,'unitId':_0x5a79fb,'content':_0x28e7a1,'mention':_0x1fbc83,'threadId':_0xdebc0d},_0x35d062=(await this[_0x33f642(0xec)][_0x33f642(0xe0)](_0x33f642(0xa8)+_0x5a79fb+_0x33f642(0xef),{'body':_0x581b36}))[_0x33f642(0xc3)][_0x33f642(0xb8)];return{..._0x442fcf,'id':_0x35d062[_0x33f642(0xe4)],'dT':_0x5802de(+_0x35d062['createTimestamp'])['format'](_0x33f642(0xd1)),'personId':_0x35d062[_0x33f642(0xb0)]};}else{const _0x3d29c0={'memberId':_0x5bfb43,'unitId':_0x5a79fb,'content':_0x28e7a1,'mention':_0x1fbc83},_0x2ad157=await this[_0x33f642(0xec)][_0x33f642(0xe0)](_0x33f642(0xa8)+_0x5a79fb+_0x33f642(0xf3),{'body':_0x3d29c0});return X(_0x2ad157[_0x33f642(0xc3)]['comment'],_0x442fcf);}}async['updateComment'](_0x3ca510){const _0x2651a3=_0xef2ac3;var _0x2ef7f7,_0x392b88;const {text:_0xb69a1c,unitId:_0x579c28}=_0x3ca510,_0x4d3b06=(_0x392b88=(_0x2ef7f7=_0xb69a1c['customRanges'])==null?void 0x0:_0x2ef7f7[_0x2651a3(0xcc)](_0x1ec50f=>_0x1ec50f[_0x2651a3(0x10c)]===_0x11800a[_0x2651a3(0xdb)])[_0x2651a3(0xf0)](_0x5e1c21=>_0x5e1c21[_0x2651a3(0xcb)]))!=null?_0x392b88:[],_0x5ede28=JSON['stringify'](_0xb69a1c),_0x3a56dd=_0x3ca510[_0x2651a3(0xbd)],_0x5d27ec=_0x3ca510['id'],_0x110ab6={'memberId':(await this[_0x2651a3(0xf1)][_0x2651a3(0xd5)](_0x579c28))[_0x2651a3(0xc0)](),'unitId':_0x579c28,'threadId':_0x3a56dd,'mention':_0x4d3b06,'content':_0x5ede28,'replyId':_0x5d27ec},_0x3817a0=await this[_0x2651a3(0xec)][_0x2651a3(0xe0)]('/universer-api/comment/unit/'+_0x579c28+_0x2651a3(0xb6),{'body':_0x110ab6});return!_0x3817a0[_0x2651a3(0xc3)]['error']||_0x3817a0[_0x2651a3(0xc3)][_0x2651a3(0xaf)][_0x2651a3(0xc4)]===0x1;}async[_0xef2ac3(0xbc)](_0x2d8be3){const _0x2bf397=_0xef2ac3,{unitId:_0xb07b31}=_0x2d8be3,_0x413f4a=_0x2d8be3[_0x2bf397(0xbd)],_0xba14bc={'memberId':this['_userService'][_0x2bf397(0x103)]()[_0x2bf397(0x101)],'unitId':_0xb07b31,'threadId':_0x413f4a,'solved':_0x2d8be3[_0x2bf397(0xb9)]?I[_0x2bf397(0xd0)]:I[_0x2bf397(0xaa)]},_0x511262=await this[_0x2bf397(0xec)][_0x2bf397(0xe0)](_0x2bf397(0xa8)+_0xb07b31+_0x2bf397(0xe2),{'body':_0xba14bc});return!_0x511262[_0x2bf397(0xc3)][_0x2bf397(0xaf)]||_0x511262[_0x2bf397(0xc3)][_0x2bf397(0xaf)][_0x2bf397(0xc4)]===0x1;}async['deleteComment'](_0x43197f,_0x381705,_0x55669a,_0x10ad64){const _0x1b7d07=_0xef2ac3,_0x2c8cd6={'memberId':(await this[_0x1b7d07(0xf1)][_0x1b7d07(0xd5)](_0x43197f))[_0x1b7d07(0xc0)](),'threadId':_0x55669a,'replyId':_0x10ad64,'unitId':_0x43197f},_0x46767d=await this[_0x1b7d07(0xec)]['post']('/universer-api/comment/unit/'+_0x43197f+_0x1b7d07(0xda),{'body':_0x2c8cd6});return!_0x46767d[_0x1b7d07(0xc3)]['error']||_0x46767d[_0x1b7d07(0xc3)][_0x1b7d07(0xaf)][_0x1b7d07(0xc4)]===0x1;}async[_0xef2ac3(0xd3)](_0x5e027e,_0x2c4d19,_0x598a33){const _0x31ec37=_0xef2ac3,_0x4a60db={'unitId':_0x5e027e,'threadId':_0x598a33},_0x5703e7=await this[_0x31ec37(0xec)][_0x31ec37(0xe0)](_0x31ec37(0xa8)+_0x5e027e+_0x31ec37(0x10e),{'body':_0x4a60db}),_0x17b0ee=_0x598a33[_0x31ec37(0xf0)](_0xa2b4e2=>ee(_0x5703e7[_0x31ec37(0xc3)][_0x31ec37(0xed)][_0xa2b4e2],_0x5e027e,_0x2c4d19))[_0x31ec37(0xcc)](Boolean);return Object['values'](_0x5703e7['body'][_0x31ec37(0xca)])[_0x31ec37(0xd9)](_0x11e39d=>{const _0x3495b4=_0x31ec37;this['_userService'][_0x3495b4(0xe7)](_0x11e39d);}),_0x17b0ee;}[_0xef2ac3(0x108)](_0x23d661){const _0x27a70d=_0xef2ac3;return{'id':_0x23d661['id'],'threadId':_0x23d661['threadId'],'ref':_0x23d661[_0x27a70d(0xb3)]};}};f=Q([_(0x0,_0xaac0e8(_0x20b61d)),_(0x1,_0xaac0e8(_0x45265e)),_(0x2,_0xaac0e8(_0x38ed50)),_(0x3,_0xaac0e8(_0x20745a))],f);var re=Object[_0xef2ac3(0xce)],te=(_0x1fa5ff,_0x310297,_0x557b8d,_0x10608e)=>{for(var _0x927c35=_0x10608e>0x1?void 0x0:_0x10608e?re(_0x310297,_0x557b8d):_0x310297,_0x28b27a=_0x1fa5ff['length']-0x1,_0x509d43;_0x28b27a>=0x0;_0x28b27a--)(_0x509d43=_0x1fa5ff[_0x28b27a])&&(_0x927c35=_0x509d43(_0x927c35)||_0x927c35);return _0x927c35;},N=(_0x2666c3,_0x5be33b)=>(_0x1150a2,_0x4d91de)=>_0x5be33b(_0x1150a2,_0x4d91de,_0x2666c3);let g=class extends _0x3e49f1{constructor(_0x4e790a,_0xbff171){const _0x4b1ced=_0xef2ac3;super(),this[_0x4b1ced(0xe8)]=_0x4e790a,this[_0x4b1ced(0x107)]=_0xbff171,this[_0x4b1ced(0xee)]();}[_0xef2ac3(0xee)](){const _0x3dc1ba=_0xef2ac3;this[_0x3dc1ba(0xe8)]['dataSource']=this[_0x3dc1ba(0x107)],this[_0x3dc1ba(0xe8)][_0x3dc1ba(0x102)]=!0x1;}};g=te([N(0x0,_0x334a2b),N(0x1,_0xaac0e8(f))],g);var se=Object[_0xef2ac3(0xc8)],oe=Object[_0xef2ac3(0xce)],ne=(_0x5487d2,_0x540370,_0x44f898)=>_0x540370 in _0x5487d2?se(_0x5487d2,_0x540370,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x44f898}):_0x5487d2[_0x540370]=_0x44f898,ie=(_0x57d0b9,_0x48c692,_0x3893d7,_0x2ceb52)=>{const _0x40c232=_0xef2ac3;for(var _0x5c3f9e=_0x2ceb52>0x1?void 0x0:_0x2ceb52?oe(_0x48c692,_0x3893d7):_0x48c692,_0x33596a=_0x57d0b9[_0x40c232(0xdc)]-0x1,_0x1e70ac;_0x33596a>=0x0;_0x33596a--)(_0x1e70ac=_0x57d0b9[_0x33596a])&&(_0x5c3f9e=_0x1e70ac(_0x5c3f9e)||_0x5c3f9e);return _0x5c3f9e;},w=(_0x48528d,_0x56d06e)=>(_0x260918,_0x2a7313)=>_0x56d06e(_0x260918,_0x2a7313,_0x48528d),$=(_0x2f1a0a,_0x305b57,_0x4fa42d)=>ne(_0x2f1a0a,typeof _0x305b57!='symbol'?_0x305b57+'':_0x305b57,_0x4fa42d);let b=class extends _0x2c8fc5{constructor(_0x5e6db6=M,_0x59f833,_0x5b921d){const _0x47fb5c=_0xef2ac3;super(),this[_0x47fb5c(0xd7)]=_0x5e6db6,this[_0x47fb5c(0xad)]=_0x59f833,this[_0x47fb5c(0xb1)]=_0x5b921d;const {..._0x3053b6}=_0x47eecf({},M,this[_0x47fb5c(0xd7)]);this[_0x47fb5c(0xb1)]['setConfig'](z,_0x3053b6);}['onStarting'](){const _0x2cbf17=_0xef2ac3;[[f],[g],[S]][_0x2cbf17(0xd9)](_0x4ee1e3=>{const _0x4eef37=_0x2cbf17;this[_0x4eef37(0xad)][_0x4eef37(0xdf)](_0x4ee1e3);});}['onReady'](){const _0x56ed42=_0xef2ac3;this[_0x56ed42(0xad)][_0x56ed42(0xba)](g),this['_injector'][_0x56ed42(0xba)](S);}};$(b,_0xef2ac3(0x106),W),$(b,_0xef2ac3(0xfb),_0x20fd11['UNIVER_UNKNOWN']),b=ie([_0xe266c6(_0x33dd69,_0x35d9c6,_0x157e4d),w(0x1,_0xaac0e8(_0x20745a)),w(0x2,_0xf1feab)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4b07e7=_0x181b;(function(_0x2791fb,_0x4da5a1){const _0x521bea=_0x181b,_0x550324=_0x2791fb();while(!![]){try{const _0x1a9c71=-parseInt(_0x521bea(0x106))/0x1*(-parseInt(_0x521bea(0x151))/0x2)+parseInt(_0x521bea(0xf8))/0x3*(parseInt(_0x521bea(0x120))/0x4)+-parseInt(_0x521bea(0x121))/0x5+-parseInt(_0x521bea(0x154))/0x6*(-parseInt(_0x521bea(0x107))/0x7)+parseInt(_0x521bea(0x134))/0x8*(parseInt(_0x521bea(0x110))/0x9)+-parseInt(_0x521bea(0x13f))/0xa*(-parseInt(_0x521bea(0x108))/0xb)+-parseInt(_0x521bea(0x14c))/0xc*(parseInt(_0x521bea(0x10b))/0xd);if(_0x1a9c71===_0x4da5a1)break;else _0x550324['push'](_0x550324['shift']());}catch(_0x2d228d){_0x550324['push'](_0x550324['shift']());}}}(_0x1923,0x7b47f));import{CommentService as _0x1a1583,CollaborationSessionService as _0x1fd658,UniverCollaborationClientPlugin as _0x3d47fa}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x21e0fd}from'@univerjs-pro/license';import{dayjs as _0x471760,UserManagerService as _0x416fe6,Inject as _0x3c112c,Injector as _0x15e34d,Disposable as _0x6c7d02,CustomRangeType as _0x23fccf,UniverInstanceType as _0x514331,DependentOn as _0x5e5e54,IConfigService as _0x1e0359,Plugin as _0x2f5ef4,merge as _0x4a2386}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xe804bc}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x52f7ea,IThreadCommentDataSourceService as _0x4013bc}from'@univerjs/thread-comment';import{bufferTime as _0x5984f4}from'rxjs';import{HTTPService as _0x3849c5}from'@univerjs/network';const W=_0x4b07e7(0xf7);function _0x1923(){const _0x5595fb=['_threadCommentDataSourceService','_sessionService','COMMENT','unitId','get','_commentService','symbol','defineProperty','filter','disposeWithMe','241448yIyFkS','pluginName','YYYY/MM/DD\x20HH:mm','getUnit','userId','_userService','addUser','users','/delete','getMemberID','getOwnPropertyDescriptor','27460jbIabh','delete','user','values','personId','solved','Reply','code','syncUpdateMutationToColla','_config','slice','getComment','_configService','98664bwJkjc','UNRECOGNIZED','format','threadId','commentUpdate$','2EkVeVN','replyId','comment','6slXwyg','_injector','rangeId','thread-comment-data-source.config','OpenOrReOpen','stringify','content','Delete','addComment','ref','Edit','find','requireSession','forEach','listComments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','3AYQNmX','size','subscribe','length','Add','updateComment','Solved','/universer-api/comment/unit/','createTimestamp','rangeType','parse','resolved','/list','/edit','507930tvnOII','4267585kMQSso','2651HoayUC','pipe','replies','3653zSsDez','getUser','deleteComment','add','parentId','171XKoZlS','setConfig','error','post','dataSource','_initUserSync','getCurrentUser','/universer-api/user/list','/reply','map','Solve','root','_threadCommentDataSource','userID','resolveComment','type','1853308qdwozu','3980aQywqa','_threadCommentModel','onStarting','_init','body','_initDataSource','_httpService','payload','Unknown'];_0x1923=function(){return _0x5595fb;};return _0x1923();}var I=(_0x31d8b8=>(_0x31d8b8[_0x31d8b8[_0x4b07e7(0x158)]=0x0]='OpenOrReOpen',_0x31d8b8[_0x31d8b8['Solved']=0x1]=_0x4b07e7(0xfe),_0x31d8b8[_0x31d8b8[_0x4b07e7(0x14d)]=-0x1]='UNRECOGNIZED',_0x31d8b8))(I||{}),v=(_0x5d3573=>(_0x5d3573[_0x5d3573[_0x4b07e7(0x129)]=0x0]=_0x4b07e7(0x129),_0x5d3573[_0x5d3573[_0x4b07e7(0xfc)]=0x1]=_0x4b07e7(0xfc),_0x5d3573[_0x5d3573[_0x4b07e7(0x145)]=0x2]=_0x4b07e7(0x145),_0x5d3573[_0x5d3573['Edit']=0x3]=_0x4b07e7(0x15e),_0x5d3573[_0x5d3573['Delete']=0x4]=_0x4b07e7(0x15b),_0x5d3573[_0x5d3573[_0x4b07e7(0x11a)]=0x5]=_0x4b07e7(0x11a),_0x5d3573[_0x5d3573[_0x4b07e7(0x14d)]=-0x1]=_0x4b07e7(0x14d),_0x5d3573))(v||{});const D=_0x3c2d82=>_0x471760(new Date(+_0x3c2d82))[_0x4b07e7(0x14e)](_0x4b07e7(0x136)),B=async(_0x1cde4d,_0xe92fe5)=>{const _0xaa6722=_0x4b07e7,_0xab947f=_0x1cde4d[_0xaa6722(0x12e)](_0x416fe6),_0x1ef13a=_0x1cde4d[_0xaa6722(0x12e)](_0x3849c5);_0xe92fe5['forEach'](_0x5a1bdb=>{const _0x5de147=_0xaa6722;_0xab947f[_0x5de147(0x10c)](_0x5a1bdb)&&_0xe92fe5[_0x5de147(0x140)](_0x5a1bdb);}),_0xe92fe5[_0xaa6722(0xf9)]&&(await _0x1ef13a['get'](_0xaa6722(0x117),{'params':{'userIDs':[..._0xe92fe5]}}))[_0xaa6722(0x125)][_0xaa6722(0x13b)]['forEach'](_0x406591=>{const _0x3be61b=_0xaa6722;_0x406591&&_0xab947f[_0x3be61b(0x13a)](_0x406591);});};var K=Object[_0x4b07e7(0x13e)],V=(_0x2a6c1b,_0xd948de,_0x508d56,_0xaca8b0)=>{const _0x1deed3=_0x4b07e7;for(var _0x5844b2=_0xaca8b0>0x1?void 0x0:_0xaca8b0?K(_0xd948de,_0x508d56):_0xd948de,_0x5766e1=_0x2a6c1b[_0x1deed3(0xfb)]-0x1,_0x54902d;_0x5766e1>=0x0;_0x5766e1--)(_0x54902d=_0x2a6c1b[_0x5766e1])&&(_0x5844b2=_0x54902d(_0x5844b2)||_0x5844b2);return _0x5844b2;},p=(_0x5b1438,_0x1d7b6b)=>(_0x1ef566,_0x3ea25f)=>_0x1d7b6b(_0x1ef566,_0x3ea25f,_0x5b1438);let S=class extends _0x6c7d02{constructor(_0x19bb64,_0x218317,_0x4ce68c,_0x4922a3){const _0x237b44=_0x4b07e7;super(),this[_0x237b44(0x12f)]=_0x19bb64,this[_0x237b44(0x122)]=_0x218317,this['_userService']=_0x4ce68c,this['_injector']=_0x4922a3,this[_0x237b44(0x124)](),this[_0x237b44(0x115)]();}[_0x4b07e7(0x115)](){const _0x42c3b3=_0x4b07e7;this['disposeWithMe'](this[_0x42c3b3(0x122)]['commentUpdate$'][_0x42c3b3(0x109)](_0x5984f4(0x10))[_0x42c3b3(0xfa)](_0xf821f6=>{const _0x1c1c92=_0x42c3b3,_0x11dfb5=new Set();_0xf821f6['forEach'](_0x3926f1=>{const _0x942c36=_0x181b;switch(_0x3926f1[_0x942c36(0x11f)]){case _0x942c36(0x10e):{const _0x2cf316=_0x3926f1[_0x942c36(0x128)][_0x942c36(0x143)];_0x11dfb5[_0x942c36(0x10e)](_0x2cf316);break;}}}),B(this[_0x1c1c92(0x155)],_0x11dfb5);}));}[_0x4b07e7(0x124)](){const _0x1a1700=_0x4b07e7;this[_0x1a1700(0x133)](this['_commentService'][_0x1a1700(0x150)][_0x1a1700(0xfa)](async _0x483617=>{const _0x31cf19=_0x1a1700;var _0x4dddb6,_0x8c2546,_0x33af4c,_0xd89e1a;const _0x187d48=(_0x4dddb6=this[_0x31cf19(0x122)][_0x31cf19(0x137)](_0x483617[_0x31cf19(0x12d)])['find'](_0xb1ef45=>_0xb1ef45[_0x31cf19(0x14f)]===_0x483617['threadId']))==null?void 0x0:_0x4dddb6[_0x31cf19(0x11b)];if(!_0x187d48)return;const {unitId:_0x80eb4b,subUnitId:_0x599791}=_0x187d48;switch(_0x483617[_0x31cf19(0x141)]&&this['_userService'][_0x31cf19(0x13a)](_0x483617[_0x31cf19(0x141)]),_0x483617[_0x31cf19(0x11f)]){case v['Add']:break;case v[_0x31cf19(0x145)]:{this[_0x31cf19(0x122)]['addComment'](_0x80eb4b,_0x599791,{'unitId':_0x80eb4b,'subUnitId':_0x599791,'ref':'','id':_0x483617[_0x31cf19(0x152)],'dT':D(+_0x483617[_0x31cf19(0x100)]),'threadId':_0x483617[_0x31cf19(0x14f)],'personId':(_0x33af4c=(_0x8c2546=_0x483617[_0x31cf19(0x141)])==null?void 0x0:_0x8c2546['userID'])!=null?_0x33af4c:_0x483617['userId'],'text':JSON[_0x31cf19(0x102)](_0x483617['content']),'parentId':_0x187d48['id']});break;}case v[_0x31cf19(0x15b)]:{const _0x4e0c9a=this[_0x31cf19(0x122)][_0x31cf19(0x14a)](_0x80eb4b,_0x599791,_0x483617[_0x31cf19(0x152)]);_0x4e0c9a&&_0x4e0c9a[_0x31cf19(0x10f)]&&this[_0x31cf19(0x122)][_0x31cf19(0x10d)](_0x80eb4b,_0x599791,_0x483617['replyId']);break;}case v[_0x31cf19(0x15e)]:{this[_0x31cf19(0x122)][_0x31cf19(0xfd)](_0x80eb4b,_0x599791,{'commentId':_0x483617['replyId'],'text':JSON['parse'](_0x483617[_0x31cf19(0x15a)])});break;}case v['Solve']:{const _0x8cf9d8=(_0xd89e1a=this['_threadCommentModel'][_0x31cf19(0x137)](_0x483617[_0x31cf19(0x12d)])[_0x31cf19(0x15f)](_0x4001df=>_0x4001df[_0x31cf19(0x14f)]===_0x483617[_0x31cf19(0x14f)]))==null?void 0x0:_0xd89e1a[_0x31cf19(0x11b)];_0x8cf9d8&&this[_0x31cf19(0x122)][_0x31cf19(0x11e)](_0x80eb4b,_0x599791,_0x8cf9d8['id'],_0x483617[_0x31cf19(0x144)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x3c112c(_0x1a1583)),p(0x1,_0x3c112c(_0x52f7ea)),p(0x2,_0x3c112c(_0x416fe6)),p(0x3,_0x3c112c(_0x15e34d))],S);const z=_0x4b07e7(0x157),M={};var k=Object[_0x4b07e7(0x13e)],Q=(_0x1950c6,_0x4cf0e0,_0x49ccc0,_0x33a086)=>{const _0x273370=_0x4b07e7;for(var _0xec26fb=_0x33a086>0x1?void 0x0:_0x33a086?k(_0x4cf0e0,_0x49ccc0):_0x4cf0e0,_0x3359eb=_0x1950c6[_0x273370(0xfb)]-0x1,_0x2a84f7;_0x3359eb>=0x0;_0x3359eb--)(_0x2a84f7=_0x1950c6[_0x3359eb])&&(_0xec26fb=_0x2a84f7(_0xec26fb)||_0xec26fb);return _0xec26fb;},_=(_0x2ee0ab,_0x344c50)=>(_0x1c2240,_0xa54929)=>_0x344c50(_0x1c2240,_0xa54929,_0x2ee0ab);function _0x181b(_0xb1ae11,_0x318b9f){const _0x192349=_0x1923();return _0x181b=function(_0x181bd3,_0x418c9d){_0x181bd3=_0x181bd3-0xf5;let _0x4defb7=_0x192349[_0x181bd3];return _0x4defb7;},_0x181b(_0xb1ae11,_0x318b9f);}function X(_0x25bb61,_0xe72036){const _0x286d65=_0x4b07e7,_0x8e733f=_0x25bb61[_0x286d65(0x10a)][0x0];return{..._0xe72036,'id':_0x8e733f['replyId'],'resolved':_0x25bb61['solved']===0x1,'dT':D(_0x8e733f[_0x286d65(0x100)]),'personId':_0x8e733f[_0x286d65(0x138)],'threadId':_0x8e733f[_0x286d65(0x14f)]};}function ee(_0x34270e,_0x3c5a87,_0x6b82ad){const _0x4a34f9=_0x4b07e7;var _0x30047c,_0x4aeb13;if(((_0x4aeb13=(_0x30047c=_0x34270e==null?void 0x0:_0x34270e[_0x4a34f9(0x10a)])==null?void 0x0:_0x30047c[_0x4a34f9(0xfb)])!=null?_0x4aeb13:0x0)>0x0){const _0x3cc799=(_0x474b6b,_0x632057)=>({'id':_0x474b6b[_0x4a34f9(0x152)],'threadId':_0x474b6b['threadId'],'dT':D(_0x474b6b[_0x4a34f9(0x100)]),'personId':_0x474b6b['userId'],'resolved':_0x34270e[_0x4a34f9(0x144)]===I[_0x4a34f9(0xfe)],'unitId':_0x3c5a87,'subUnitId':_0x6b82ad,'text':JSON['parse'](_0x474b6b[_0x4a34f9(0x15a)]),'parentId':_0x632057}),_0x5b5a02=_0x3cc799(_0x34270e['replies'][0x0]);return{..._0x5b5a02,'children':_0x34270e[_0x4a34f9(0x10a)][_0x4a34f9(0x149)](0x1)[_0x4a34f9(0x119)](_0x4e43f9=>_0x3cc799(_0x4e43f9,_0x5b5a02['id']))};}return null;}let f=class{constructor(_0xa96396,_0xf6c0e7,_0x25aae8,_0xa13c7a){const _0x349230=_0x4b07e7;this[_0x349230(0x127)]=_0xa96396,this[_0x349230(0x139)]=_0xf6c0e7,this[_0x349230(0x12b)]=_0x25aae8,this[_0x349230(0x155)]=_0xa13c7a;}async[_0x4b07e7(0x15c)](_0x268f50){const _0x492111=_0x4b07e7;var _0x26e451,_0xc31f89;const {parentId:_0x4d0ae6,unitId:_0x2ffe0e,text:_0x2f6cc1,threadId:_0xd0ceb5}=_0x268f50,_0x5b0c99=(_0xc31f89=(_0x26e451=_0x2f6cc1['customRanges'])==null?void 0x0:_0x26e451[_0x492111(0x132)](_0x5c52ac=>_0x5c52ac[_0x492111(0x101)]===_0x23fccf[_0x492111(0x12c)])[_0x492111(0x119)](_0x396ad5=>_0x396ad5[_0x492111(0x156)]))!=null?_0xc31f89:[],_0x223fe2=JSON[_0x492111(0x159)](_0x2f6cc1),_0x578938=(await this[_0x492111(0x12b)][_0x492111(0x160)](_0x2ffe0e))['getMemberID']();if(_0x4d0ae6){const _0x22a6ab={'memberId':_0x578938,'unitId':_0x2ffe0e,'content':_0x223fe2,'mention':_0x5b0c99,'threadId':_0xd0ceb5},_0x307626=(await this['_httpService']['post'](_0x492111(0xff)+_0x2ffe0e+_0x492111(0x118),{'body':_0x22a6ab}))[_0x492111(0x125)]['reply'];return{..._0x268f50,'id':_0x307626[_0x492111(0x152)],'dT':_0x471760(+_0x307626[_0x492111(0x100)])[_0x492111(0x14e)](_0x492111(0x136)),'personId':_0x307626[_0x492111(0x138)]};}else{const _0x38e7be={'memberId':_0x578938,'unitId':_0x2ffe0e,'content':_0x223fe2,'mention':_0x5b0c99},_0x56dca0=await this[_0x492111(0x127)][_0x492111(0x113)]('/universer-api/comment/unit/'+_0x2ffe0e+'/add',{'body':_0x38e7be});return X(_0x56dca0[_0x492111(0x125)][_0x492111(0x153)],_0x268f50);}}async[_0x4b07e7(0xfd)](_0x2b5825){const _0x43bce7=_0x4b07e7;var _0xb1a846,_0x37e651;const {text:_0x3d9ae5,unitId:_0x20c932}=_0x2b5825,_0x6841ec=(_0x37e651=(_0xb1a846=_0x3d9ae5['customRanges'])==null?void 0x0:_0xb1a846[_0x43bce7(0x132)](_0x349cb4=>_0x349cb4[_0x43bce7(0x101)]===_0x23fccf['COMMENT'])[_0x43bce7(0x119)](_0x11c5df=>_0x11c5df[_0x43bce7(0x156)]))!=null?_0x37e651:[],_0x35375a=JSON[_0x43bce7(0x159)](_0x3d9ae5),_0x1dbf12=_0x2b5825['threadId'],_0x4f956c=_0x2b5825['id'],_0xdf99f8={'memberId':(await this[_0x43bce7(0x12b)]['requireSession'](_0x20c932))[_0x43bce7(0x13d)](),'unitId':_0x20c932,'threadId':_0x1dbf12,'mention':_0x6841ec,'content':_0x35375a,'replyId':_0x4f956c},_0x4c504c=await this[_0x43bce7(0x127)][_0x43bce7(0x113)](_0x43bce7(0xff)+_0x20c932+_0x43bce7(0x105),{'body':_0xdf99f8});return!_0x4c504c[_0x43bce7(0x125)]['error']||_0x4c504c['body'][_0x43bce7(0x112)][_0x43bce7(0x146)]===0x1;}async['resolveComment'](_0xeda29b){const _0x23942d=_0x4b07e7,{unitId:_0x106db7}=_0xeda29b,_0x2e58a0=_0xeda29b[_0x23942d(0x14f)],_0x586e94={'memberId':this[_0x23942d(0x139)][_0x23942d(0x116)]()[_0x23942d(0x11d)],'unitId':_0x106db7,'threadId':_0x2e58a0,'solved':_0xeda29b[_0x23942d(0x103)]?I[_0x23942d(0xfe)]:I[_0x23942d(0x158)]},_0x47f213=await this[_0x23942d(0x127)]['post']('/universer-api/comment/unit/'+_0x106db7+'/solved',{'body':_0x586e94});return!_0x47f213['body'][_0x23942d(0x112)]||_0x47f213[_0x23942d(0x125)][_0x23942d(0x112)][_0x23942d(0x146)]===0x1;}async[_0x4b07e7(0x10d)](_0x52f61f,_0x24553e,_0x3d6b6e,_0x4d1b87){const _0x4825c8=_0x4b07e7,_0x24be61={'memberId':(await this[_0x4825c8(0x12b)][_0x4825c8(0x160)](_0x52f61f))[_0x4825c8(0x13d)](),'threadId':_0x3d6b6e,'replyId':_0x4d1b87,'unitId':_0x52f61f},_0x3740a2=await this['_httpService']['post'](_0x4825c8(0xff)+_0x52f61f+_0x4825c8(0x13c),{'body':_0x24be61});return!_0x3740a2[_0x4825c8(0x125)][_0x4825c8(0x112)]||_0x3740a2['body'][_0x4825c8(0x112)][_0x4825c8(0x146)]===0x1;}async[_0x4b07e7(0xf6)](_0xb39f73,_0x9fb586,_0x43b657){const _0x3127e2=_0x4b07e7,_0x35685f={'unitId':_0xb39f73,'threadId':_0x43b657},_0x1323e3=await this['_httpService'][_0x3127e2(0x113)]('/universer-api/comment/unit/'+_0xb39f73+_0x3127e2(0x104),{'body':_0x35685f}),_0x1e6210=_0x43b657[_0x3127e2(0x119)](_0x464aad=>ee(_0x1323e3[_0x3127e2(0x125)]['comments'][_0x464aad],_0xb39f73,_0x9fb586))[_0x3127e2(0x132)](Boolean);return Object[_0x3127e2(0x142)](_0x1323e3['body'][_0x3127e2(0x13b)])[_0x3127e2(0xf5)](_0x457901=>{const _0x3beb47=_0x3127e2;this[_0x3beb47(0x139)][_0x3beb47(0x13a)](_0x457901);}),_0x1e6210;}['saveCommentToSnapshot'](_0x4cdda2){const _0x347081=_0x4b07e7;return{'id':_0x4cdda2['id'],'threadId':_0x4cdda2['threadId'],'ref':_0x4cdda2[_0x347081(0x15d)]};}};f=Q([_(0x0,_0x3c112c(_0x3849c5)),_(0x1,_0x3c112c(_0x416fe6)),_(0x2,_0x3c112c(_0x1fd658)),_(0x3,_0x3c112c(_0x15e34d))],f);var re=Object[_0x4b07e7(0x13e)],te=(_0x35f8b3,_0x572dc3,_0x31f1d6,_0x5e12e9)=>{const _0x3ed32d=_0x4b07e7;for(var _0x448a9e=_0x5e12e9>0x1?void 0x0:_0x5e12e9?re(_0x572dc3,_0x31f1d6):_0x572dc3,_0x3da971=_0x35f8b3[_0x3ed32d(0xfb)]-0x1,_0x226144;_0x3da971>=0x0;_0x3da971--)(_0x226144=_0x35f8b3[_0x3da971])&&(_0x448a9e=_0x226144(_0x448a9e)||_0x448a9e);return _0x448a9e;},N=(_0x225574,_0x52e624)=>(_0x48768a,_0x4b2472)=>_0x52e624(_0x48768a,_0x4b2472,_0x225574);let g=class extends _0x6c7d02{constructor(_0x511312,_0x556241){const _0x209718=_0x4b07e7;super(),this[_0x209718(0x12a)]=_0x511312,this[_0x209718(0x11c)]=_0x556241,this[_0x209718(0x126)]();}['_initDataSource'](){const _0x5e7ed7=_0x4b07e7;this['_threadCommentDataSourceService'][_0x5e7ed7(0x114)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x5e7ed7(0x147)]=!0x1;}};g=te([N(0x0,_0x4013bc),N(0x1,_0x3c112c(f))],g);var se=Object[_0x4b07e7(0x131)],oe=Object[_0x4b07e7(0x13e)],ne=(_0x23ed34,_0x149197,_0xf47f53)=>_0x149197 in _0x23ed34?se(_0x23ed34,_0x149197,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf47f53}):_0x23ed34[_0x149197]=_0xf47f53,ie=(_0x30f388,_0x4f08ba,_0x28af5a,_0x36b259)=>{const _0x42e9e8=_0x4b07e7;for(var _0xb1b034=_0x36b259>0x1?void 0x0:_0x36b259?oe(_0x4f08ba,_0x28af5a):_0x4f08ba,_0x2f1e0b=_0x30f388[_0x42e9e8(0xfb)]-0x1,_0x559d65;_0x2f1e0b>=0x0;_0x2f1e0b--)(_0x559d65=_0x30f388[_0x2f1e0b])&&(_0xb1b034=_0x559d65(_0xb1b034)||_0xb1b034);return _0xb1b034;},w=(_0x292aee,_0x414712)=>(_0x167677,_0xb23af6)=>_0x414712(_0x167677,_0xb23af6,_0x292aee),$=(_0x2d8b37,_0x791142,_0x3859c1)=>ne(_0x2d8b37,typeof _0x791142!=_0x4b07e7(0x130)?_0x791142+'':_0x791142,_0x3859c1);let b=class extends _0x2f5ef4{constructor(_0x39969e=M,_0x292be0,_0x38ca6c){const _0x3d7004=_0x4b07e7;super(),this['_config']=_0x39969e,this['_injector']=_0x292be0,this[_0x3d7004(0x14b)]=_0x38ca6c;const {..._0x3a1b14}=_0x4a2386({},M,this[_0x3d7004(0x148)]);this[_0x3d7004(0x14b)][_0x3d7004(0x111)](z,_0x3a1b14);}[_0x4b07e7(0x123)](){const _0x4f8495=_0x4b07e7;[[f],[g],[S]][_0x4f8495(0xf5)](_0x45d384=>{const _0x281297=_0x4f8495;this[_0x281297(0x155)][_0x281297(0x10e)](_0x45d384);});}['onReady'](){const _0x4943ec=_0x4b07e7;this['_injector'][_0x4943ec(0x12e)](g),this['_injector']['get'](S);}};$(b,_0x4b07e7(0x135),W),$(b,'type',_0x514331['UNIVER_UNKNOWN']),b=ie([_0x5e5e54(_0xe804bc,_0x3d47fa,_0x21e0fd),w(0x1,_0x3c112c(_0x15e34d)),w(0x2,_0x1e0359)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0xef2ac3=_0x14bf;(function(_0x14f7d5,_0x673000){const _0x1e46e6=_0x14bf,_0x5a0836=_0x14f7d5();while(!![]){try{const _0x50a9de=parseInt(_0x1e46e6(0xf7))/0x1*(-parseInt(_0x1e46e6(0xd8))/0x2)+-parseInt(_0x1e46e6(0xa5))/0x3*(-parseInt(_0x1e46e6(0xfa))/0x4)+-parseInt(_0x1e46e6(0xff))/0x5*(-parseInt(_0x1e46e6(0xfd))/0x6)+-parseInt(_0x1e46e6(0xa6))/0x7*(parseInt(_0x1e46e6(0xdd))/0x8)+parseInt(_0x1e46e6(0x10b))/0x9*(-parseInt(_0x1e46e6(0xf4))/0xa)+-parseInt(_0x1e46e6(0xf6))/0xb*(parseInt(_0x1e46e6(0x109))/0xc)+-parseInt(_0x1e46e6(0xa9))/0xd*(-parseInt(_0x1e46e6(0xf5))/0xe);if(_0x50a9de===_0x673000)break;else _0x5a0836['push'](_0x5a0836['shift']());}catch(_0x1a17e7){_0x5a0836['push'](_0x5a0836['shift']());}}}(_0x7407,0x6a8dd));import{CommentService as _0x245f3b,CollaborationSessionService as _0x38ed50,UniverCollaborationClientPlugin as _0x35d9c6}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x157e4d}from'@univerjs-pro/license';import{dayjs as _0x5802de,UserManagerService as _0x45265e,Inject as _0xaac0e8,Injector as _0x20745a,Disposable as _0x3e49f1,CustomRangeType as _0x11800a,UniverInstanceType as _0x20fd11,DependentOn as _0xe266c6,IConfigService as _0xf1feab,Plugin as _0x2c8fc5,merge as _0x47eecf}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x33dd69}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x38c2e2,IThreadCommentDataSourceService as _0x334a2b}from'@univerjs/thread-comment';import{bufferTime as _0x279e3b}from'rxjs';import{HTTPService as _0x20b61d}from'@univerjs/network';const W=_0xef2ac3(0xcd);var I=(_0x61f09c=>(_0x61f09c[_0x61f09c[_0xef2ac3(0xaa)]=0x0]=_0xef2ac3(0xaa),_0x61f09c[_0x61f09c['Solved']=0x1]=_0xef2ac3(0xd0),_0x61f09c[_0x61f09c[_0xef2ac3(0xf8)]=-0x1]=_0xef2ac3(0xf8),_0x61f09c))(I||{}),v=(_0x489c32=>(_0x489c32[_0x489c32[_0xef2ac3(0xe5)]=0x0]=_0xef2ac3(0xe5),_0x489c32[_0x489c32[_0xef2ac3(0xfc)]=0x1]='Add',_0x489c32[_0x489c32[_0xef2ac3(0xa7)]=0x2]=_0xef2ac3(0xa7),_0x489c32[_0x489c32['Edit']=0x3]=_0xef2ac3(0xc7),_0x489c32[_0x489c32['Delete']=0x4]=_0xef2ac3(0xd2),_0x489c32[_0x489c32[_0xef2ac3(0xbf)]=0x5]='Solve',_0x489c32[_0x489c32[_0xef2ac3(0xf8)]=-0x1]='UNRECOGNIZED',_0x489c32))(v||{});function _0x14bf(_0x378c77,_0x537f7c){const _0x740784=_0x7407();return _0x14bf=function(_0x14bfd7,_0x46733d){_0x14bfd7=_0x14bfd7-0xa5;let _0x3fcb45=_0x740784[_0x14bfd7];return _0x3fcb45;},_0x14bf(_0x378c77,_0x537f7c);}const D=_0x5b3d53=>_0x5802de(new Date(+_0x5b3d53))[_0xef2ac3(0xd6)](_0xef2ac3(0xd1)),B=async(_0x2301ee,_0x4a61ea)=>{const _0x3cd868=_0xef2ac3,_0x8d7d88=_0x2301ee[_0x3cd868(0xba)](_0x45265e),_0x29cdf3=_0x2301ee[_0x3cd868(0xba)](_0x20b61d);_0x4a61ea['forEach'](_0x1f0264=>{const _0x76ab13=_0x3cd868;_0x8d7d88[_0x76ab13(0x104)](_0x1f0264)&&_0x4a61ea[_0x76ab13(0x10a)](_0x1f0264);}),_0x4a61ea[_0x3cd868(0xea)]&&(await _0x29cdf3['get'](_0x3cd868(0xbe),{'params':{'userIDs':[..._0x4a61ea]}}))[_0x3cd868(0xc3)][_0x3cd868(0xca)][_0x3cd868(0xd9)](_0x4f473b=>{const _0x466bd5=_0x3cd868;_0x4f473b&&_0x8d7d88[_0x466bd5(0xe7)](_0x4f473b);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2d42a8,_0x46f336,_0x1b8431,_0xa367e2)=>{for(var _0x3b2c17=_0xa367e2>0x1?void 0x0:_0xa367e2?K(_0x46f336,_0x1b8431):_0x46f336,_0x194b73=_0x2d42a8['length']-0x1,_0x3bbbb5;_0x194b73>=0x0;_0x194b73--)(_0x3bbbb5=_0x2d42a8[_0x194b73])&&(_0x3b2c17=_0x3bbbb5(_0x3b2c17)||_0x3b2c17);return _0x3b2c17;},p=(_0x1cd65c,_0x232ee1)=>(_0x449967,_0x25b825)=>_0x232ee1(_0x449967,_0x25b825,_0x1cd65c);function _0x7407(){const _0x357070=['parse','userID','syncUpdateMutationToColla','getCurrentUser','getUser','replies','pluginName','_threadCommentDataSource','saveCommentToSnapshot','2348376PBGovc','delete','27kOWmQI','rangeType','getComment','/list','191946tlktrL','14uVLaeX','Reply','/universer-api/comment/unit/','15596945cNZSKq','OpenOrReOpen','_commentService','payload','_injector','createTimestamp','error','userId','_configService','personId','ref','find','addComment','/edit','customRanges','reply','resolved','get','getUnit','resolveComment','threadId','/universer-api/user/list','Solve','getMemberID','deleteComment','disposeWithMe','body','code','parentId','_initUserSync','Edit','defineProperty','unitId','users','rangeId','filter','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getOwnPropertyDescriptor','_threadCommentModel','Solved','YYYY/MM/DD\x20HH:mm','Delete','listComments','content','requireSession','format','_config','26374NqBYcr','forEach','/delete','COMMENT','length','3161792LnqBXq','_init','add','post','updateComment','/solved','user','replyId','Unknown','_userService','addUser','_threadCommentDataSourceService','subscribe','size','root','_httpService','comments','_initDataSource','/reply','map','_sessionService','thread-comment-data-source.config','/add','1925330ExTfOj','14jViaFV','33agDBHs','4raeWhP','UNRECOGNIZED','commentUpdate$','24IBJZlP','type','Add','5118pFIxRU','pipe','5045dySPzw'];_0x7407=function(){return _0x357070;};return _0x7407();}let S=class extends _0x3e49f1{constructor(_0x34681d,_0x32df14,_0x53183e,_0x175829){const _0x13ff75=_0xef2ac3;super(),this[_0x13ff75(0xab)]=_0x34681d,this['_threadCommentModel']=_0x32df14,this['_userService']=_0x53183e,this[_0x13ff75(0xad)]=_0x175829,this[_0x13ff75(0xde)](),this[_0x13ff75(0xc6)]();}[_0xef2ac3(0xc6)](){const _0x3ade16=_0xef2ac3;this[_0x3ade16(0xc2)](this[_0x3ade16(0xcf)][_0x3ade16(0xf9)][_0x3ade16(0xfe)](_0x279e3b(0x10))[_0x3ade16(0xe9)](_0x484049=>{const _0x1b7d1a=_0x3ade16,_0x35891a=new Set();_0x484049[_0x1b7d1a(0xd9)](_0xad9c2e=>{const _0x3e4e60=_0x1b7d1a;switch(_0xad9c2e[_0x3e4e60(0xfb)]){case'add':{const _0x2c424a=_0xad9c2e[_0x3e4e60(0xac)][_0x3e4e60(0xb2)];_0x35891a[_0x3e4e60(0xdf)](_0x2c424a);break;}}}),B(this['_injector'],_0x35891a);}));}['_init'](){const _0x43d943=_0xef2ac3;this[_0x43d943(0xc2)](this[_0x43d943(0xab)][_0x43d943(0xf9)][_0x43d943(0xe9)](async _0x5d4325=>{const _0x4c8f98=_0x43d943;var _0xa401a4,_0x5677e8,_0x5c250a,_0x4fe39d;const _0x1d7703=(_0xa401a4=this[_0x4c8f98(0xcf)][_0x4c8f98(0xbb)](_0x5d4325[_0x4c8f98(0xc9)])[_0x4c8f98(0xb4)](_0x3bee46=>_0x3bee46['threadId']===_0x5d4325[_0x4c8f98(0xbd)]))==null?void 0x0:_0xa401a4[_0x4c8f98(0xeb)];if(!_0x1d7703)return;const {unitId:_0x1d6b92,subUnitId:_0x297662}=_0x1d7703;switch(_0x5d4325[_0x4c8f98(0xe3)]&&this['_userService'][_0x4c8f98(0xe7)](_0x5d4325[_0x4c8f98(0xe3)]),_0x5d4325[_0x4c8f98(0xfb)]){case v['Add']:break;case v[_0x4c8f98(0xa7)]:{this['_threadCommentModel']['addComment'](_0x1d6b92,_0x297662,{'unitId':_0x1d6b92,'subUnitId':_0x297662,'ref':'','id':_0x5d4325[_0x4c8f98(0xe4)],'dT':D(+_0x5d4325[_0x4c8f98(0xae)]),'threadId':_0x5d4325[_0x4c8f98(0xbd)],'personId':(_0x5c250a=(_0x5677e8=_0x5d4325[_0x4c8f98(0xe3)])==null?void 0x0:_0x5677e8[_0x4c8f98(0x101)])!=null?_0x5c250a:_0x5d4325[_0x4c8f98(0xb0)],'text':JSON[_0x4c8f98(0x100)](_0x5d4325['content']),'parentId':_0x1d7703['id']});break;}case v['Delete']:{const _0x2c575b=this[_0x4c8f98(0xcf)][_0x4c8f98(0x10d)](_0x1d6b92,_0x297662,_0x5d4325['replyId']);_0x2c575b&&_0x2c575b[_0x4c8f98(0xc5)]&&this[_0x4c8f98(0xcf)][_0x4c8f98(0xc1)](_0x1d6b92,_0x297662,_0x5d4325[_0x4c8f98(0xe4)]);break;}case v[_0x4c8f98(0xc7)]:{this[_0x4c8f98(0xcf)][_0x4c8f98(0xe1)](_0x1d6b92,_0x297662,{'commentId':_0x5d4325[_0x4c8f98(0xe4)],'text':JSON['parse'](_0x5d4325['content'])});break;}case v[_0x4c8f98(0xbf)]:{const _0x325e6e=(_0x4fe39d=this[_0x4c8f98(0xcf)]['getUnit'](_0x5d4325[_0x4c8f98(0xc9)])['find'](_0x5e995f=>_0x5e995f['threadId']===_0x5d4325[_0x4c8f98(0xbd)]))==null?void 0x0:_0x4fe39d[_0x4c8f98(0xeb)];_0x325e6e&&this[_0x4c8f98(0xcf)][_0x4c8f98(0xbc)](_0x1d6b92,_0x297662,_0x325e6e['id'],_0x5d4325['solved']===I[_0x4c8f98(0xd0)]);break;}}}));}};S=V([p(0x0,_0xaac0e8(_0x245f3b)),p(0x1,_0xaac0e8(_0x38c2e2)),p(0x2,_0xaac0e8(_0x45265e)),p(0x3,_0xaac0e8(_0x20745a))],S);const z=_0xef2ac3(0xf2),M={};var k=Object[_0xef2ac3(0xce)],Q=(_0x4b00ca,_0x47edbb,_0x1fab8f,_0x2d8ce4)=>{for(var _0x17e4ac=_0x2d8ce4>0x1?void 0x0:_0x2d8ce4?k(_0x47edbb,_0x1fab8f):_0x47edbb,_0x4e8f41=_0x4b00ca['length']-0x1,_0x1eb821;_0x4e8f41>=0x0;_0x4e8f41--)(_0x1eb821=_0x4b00ca[_0x4e8f41])&&(_0x17e4ac=_0x1eb821(_0x17e4ac)||_0x17e4ac);return _0x17e4ac;},_=(_0x12fda2,_0x233132)=>(_0x51483e,_0x46c0c4)=>_0x233132(_0x51483e,_0x46c0c4,_0x12fda2);function X(_0x40afd3,_0xb542df){const _0x20d48f=_0xef2ac3,_0x41a08c=_0x40afd3[_0x20d48f(0x105)][0x0];return{..._0xb542df,'id':_0x41a08c[_0x20d48f(0xe4)],'resolved':_0x40afd3['solved']===0x1,'dT':D(_0x41a08c['createTimestamp']),'personId':_0x41a08c[_0x20d48f(0xb0)],'threadId':_0x41a08c['threadId']};}function ee(_0x48fc58,_0x43d309,_0x127dcd){const _0x353562=_0xef2ac3;var _0x5e396f,_0xf97301;if(((_0xf97301=(_0x5e396f=_0x48fc58==null?void 0x0:_0x48fc58['replies'])==null?void 0x0:_0x5e396f[_0x353562(0xdc)])!=null?_0xf97301:0x0)>0x0){const _0xe44c6d=(_0x3141ec,_0x4e0602)=>({'id':_0x3141ec['replyId'],'threadId':_0x3141ec[_0x353562(0xbd)],'dT':D(_0x3141ec['createTimestamp']),'personId':_0x3141ec['userId'],'resolved':_0x48fc58['solved']===I['Solved'],'unitId':_0x43d309,'subUnitId':_0x127dcd,'text':JSON[_0x353562(0x100)](_0x3141ec[_0x353562(0xd4)]),'parentId':_0x4e0602}),_0x2d895=_0xe44c6d(_0x48fc58['replies'][0x0]);return{..._0x2d895,'children':_0x48fc58['replies']['slice'](0x1)[_0x353562(0xf0)](_0x5b6cf8=>_0xe44c6d(_0x5b6cf8,_0x2d895['id']))};}return null;}let f=class{constructor(_0x5db0c5,_0x19d232,_0x10d091,_0x5423f7){const _0xb33276=_0xef2ac3;this[_0xb33276(0xec)]=_0x5db0c5,this[_0xb33276(0xe6)]=_0x19d232,this['_sessionService']=_0x10d091,this['_injector']=_0x5423f7;}async[_0xef2ac3(0xb5)](_0x442fcf){const _0x33f642=_0xef2ac3;var _0x1e1426,_0x4a9db3;const {parentId:_0x27b835,unitId:_0x5a79fb,text:_0x2bcf15,threadId:_0xdebc0d}=_0x442fcf,_0x1fbc83=(_0x4a9db3=(_0x1e1426=_0x2bcf15[_0x33f642(0xb7)])==null?void 0x0:_0x1e1426['filter'](_0x2d69cb=>_0x2d69cb[_0x33f642(0x10c)]===_0x11800a['COMMENT'])[_0x33f642(0xf0)](_0x13364a=>_0x13364a[_0x33f642(0xcb)]))!=null?_0x4a9db3:[],_0x28e7a1=JSON['stringify'](_0x2bcf15),_0x5bfb43=(await this[_0x33f642(0xf1)][_0x33f642(0xd5)](_0x5a79fb))['getMemberID']();if(_0x27b835){const _0x581b36={'memberId':_0x5bfb43,'unitId':_0x5a79fb,'content':_0x28e7a1,'mention':_0x1fbc83,'threadId':_0xdebc0d},_0x35d062=(await this[_0x33f642(0xec)][_0x33f642(0xe0)](_0x33f642(0xa8)+_0x5a79fb+_0x33f642(0xef),{'body':_0x581b36}))[_0x33f642(0xc3)][_0x33f642(0xb8)];return{..._0x442fcf,'id':_0x35d062[_0x33f642(0xe4)],'dT':_0x5802de(+_0x35d062['createTimestamp'])['format'](_0x33f642(0xd1)),'personId':_0x35d062[_0x33f642(0xb0)]};}else{const _0x3d29c0={'memberId':_0x5bfb43,'unitId':_0x5a79fb,'content':_0x28e7a1,'mention':_0x1fbc83},_0x2ad157=await this[_0x33f642(0xec)][_0x33f642(0xe0)](_0x33f642(0xa8)+_0x5a79fb+_0x33f642(0xf3),{'body':_0x3d29c0});return X(_0x2ad157[_0x33f642(0xc3)]['comment'],_0x442fcf);}}async['updateComment'](_0x3ca510){const _0x2651a3=_0xef2ac3;var _0x2ef7f7,_0x392b88;const {text:_0xb69a1c,unitId:_0x579c28}=_0x3ca510,_0x4d3b06=(_0x392b88=(_0x2ef7f7=_0xb69a1c['customRanges'])==null?void 0x0:_0x2ef7f7[_0x2651a3(0xcc)](_0x1ec50f=>_0x1ec50f[_0x2651a3(0x10c)]===_0x11800a[_0x2651a3(0xdb)])[_0x2651a3(0xf0)](_0x5e1c21=>_0x5e1c21[_0x2651a3(0xcb)]))!=null?_0x392b88:[],_0x5ede28=JSON['stringify'](_0xb69a1c),_0x3a56dd=_0x3ca510[_0x2651a3(0xbd)],_0x5d27ec=_0x3ca510['id'],_0x110ab6={'memberId':(await this[_0x2651a3(0xf1)][_0x2651a3(0xd5)](_0x579c28))[_0x2651a3(0xc0)](),'unitId':_0x579c28,'threadId':_0x3a56dd,'mention':_0x4d3b06,'content':_0x5ede28,'replyId':_0x5d27ec},_0x3817a0=await this[_0x2651a3(0xec)][_0x2651a3(0xe0)]('/universer-api/comment/unit/'+_0x579c28+_0x2651a3(0xb6),{'body':_0x110ab6});return!_0x3817a0[_0x2651a3(0xc3)]['error']||_0x3817a0[_0x2651a3(0xc3)][_0x2651a3(0xaf)][_0x2651a3(0xc4)]===0x1;}async[_0xef2ac3(0xbc)](_0x2d8be3){const _0x2bf397=_0xef2ac3,{unitId:_0xb07b31}=_0x2d8be3,_0x413f4a=_0x2d8be3[_0x2bf397(0xbd)],_0xba14bc={'memberId':this['_userService'][_0x2bf397(0x103)]()[_0x2bf397(0x101)],'unitId':_0xb07b31,'threadId':_0x413f4a,'solved':_0x2d8be3[_0x2bf397(0xb9)]?I[_0x2bf397(0xd0)]:I[_0x2bf397(0xaa)]},_0x511262=await this[_0x2bf397(0xec)][_0x2bf397(0xe0)](_0x2bf397(0xa8)+_0xb07b31+_0x2bf397(0xe2),{'body':_0xba14bc});return!_0x511262[_0x2bf397(0xc3)][_0x2bf397(0xaf)]||_0x511262[_0x2bf397(0xc3)][_0x2bf397(0xaf)][_0x2bf397(0xc4)]===0x1;}async['deleteComment'](_0x43197f,_0x381705,_0x55669a,_0x10ad64){const _0x1b7d07=_0xef2ac3,_0x2c8cd6={'memberId':(await this[_0x1b7d07(0xf1)][_0x1b7d07(0xd5)](_0x43197f))[_0x1b7d07(0xc0)](),'threadId':_0x55669a,'replyId':_0x10ad64,'unitId':_0x43197f},_0x46767d=await this[_0x1b7d07(0xec)]['post']('/universer-api/comment/unit/'+_0x43197f+_0x1b7d07(0xda),{'body':_0x2c8cd6});return!_0x46767d[_0x1b7d07(0xc3)]['error']||_0x46767d[_0x1b7d07(0xc3)][_0x1b7d07(0xaf)][_0x1b7d07(0xc4)]===0x1;}async[_0xef2ac3(0xd3)](_0x5e027e,_0x2c4d19,_0x598a33){const _0x31ec37=_0xef2ac3,_0x4a60db={'unitId':_0x5e027e,'threadId':_0x598a33},_0x5703e7=await this[_0x31ec37(0xec)][_0x31ec37(0xe0)](_0x31ec37(0xa8)+_0x5e027e+_0x31ec37(0x10e),{'body':_0x4a60db}),_0x17b0ee=_0x598a33[_0x31ec37(0xf0)](_0xa2b4e2=>ee(_0x5703e7[_0x31ec37(0xc3)][_0x31ec37(0xed)][_0xa2b4e2],_0x5e027e,_0x2c4d19))[_0x31ec37(0xcc)](Boolean);return Object['values'](_0x5703e7['body'][_0x31ec37(0xca)])[_0x31ec37(0xd9)](_0x11e39d=>{const _0x3495b4=_0x31ec37;this['_userService'][_0x3495b4(0xe7)](_0x11e39d);}),_0x17b0ee;}[_0xef2ac3(0x108)](_0x23d661){const _0x27a70d=_0xef2ac3;return{'id':_0x23d661['id'],'threadId':_0x23d661['threadId'],'ref':_0x23d661[_0x27a70d(0xb3)]};}};f=Q([_(0x0,_0xaac0e8(_0x20b61d)),_(0x1,_0xaac0e8(_0x45265e)),_(0x2,_0xaac0e8(_0x38ed50)),_(0x3,_0xaac0e8(_0x20745a))],f);var re=Object[_0xef2ac3(0xce)],te=(_0x1fa5ff,_0x310297,_0x557b8d,_0x10608e)=>{for(var _0x927c35=_0x10608e>0x1?void 0x0:_0x10608e?re(_0x310297,_0x557b8d):_0x310297,_0x28b27a=_0x1fa5ff['length']-0x1,_0x509d43;_0x28b27a>=0x0;_0x28b27a--)(_0x509d43=_0x1fa5ff[_0x28b27a])&&(_0x927c35=_0x509d43(_0x927c35)||_0x927c35);return _0x927c35;},N=(_0x2666c3,_0x5be33b)=>(_0x1150a2,_0x4d91de)=>_0x5be33b(_0x1150a2,_0x4d91de,_0x2666c3);let g=class extends _0x3e49f1{constructor(_0x4e790a,_0xbff171){const _0x4b1ced=_0xef2ac3;super(),this[_0x4b1ced(0xe8)]=_0x4e790a,this[_0x4b1ced(0x107)]=_0xbff171,this[_0x4b1ced(0xee)]();}[_0xef2ac3(0xee)](){const _0x3dc1ba=_0xef2ac3;this[_0x3dc1ba(0xe8)]['dataSource']=this[_0x3dc1ba(0x107)],this[_0x3dc1ba(0xe8)][_0x3dc1ba(0x102)]=!0x1;}};g=te([N(0x0,_0x334a2b),N(0x1,_0xaac0e8(f))],g);var se=Object[_0xef2ac3(0xc8)],oe=Object[_0xef2ac3(0xce)],ne=(_0x5487d2,_0x540370,_0x44f898)=>_0x540370 in _0x5487d2?se(_0x5487d2,_0x540370,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x44f898}):_0x5487d2[_0x540370]=_0x44f898,ie=(_0x57d0b9,_0x48c692,_0x3893d7,_0x2ceb52)=>{const _0x40c232=_0xef2ac3;for(var _0x5c3f9e=_0x2ceb52>0x1?void 0x0:_0x2ceb52?oe(_0x48c692,_0x3893d7):_0x48c692,_0x33596a=_0x57d0b9[_0x40c232(0xdc)]-0x1,_0x1e70ac;_0x33596a>=0x0;_0x33596a--)(_0x1e70ac=_0x57d0b9[_0x33596a])&&(_0x5c3f9e=_0x1e70ac(_0x5c3f9e)||_0x5c3f9e);return _0x5c3f9e;},w=(_0x48528d,_0x56d06e)=>(_0x260918,_0x2a7313)=>_0x56d06e(_0x260918,_0x2a7313,_0x48528d),$=(_0x2f1a0a,_0x305b57,_0x4fa42d)=>ne(_0x2f1a0a,typeof _0x305b57!='symbol'?_0x305b57+'':_0x305b57,_0x4fa42d);let b=class extends _0x2c8fc5{constructor(_0x5e6db6=M,_0x59f833,_0x5b921d){const _0x47fb5c=_0xef2ac3;super(),this[_0x47fb5c(0xd7)]=_0x5e6db6,this[_0x47fb5c(0xad)]=_0x59f833,this[_0x47fb5c(0xb1)]=_0x5b921d;const {..._0x3053b6}=_0x47eecf({},M,this[_0x47fb5c(0xd7)]);this[_0x47fb5c(0xb1)]['setConfig'](z,_0x3053b6);}['onStarting'](){const _0x2cbf17=_0xef2ac3;[[f],[g],[S]][_0x2cbf17(0xd9)](_0x4ee1e3=>{const _0x4eef37=_0x2cbf17;this[_0x4eef37(0xad)][_0x4eef37(0xdf)](_0x4ee1e3);});}['onReady'](){const _0x56ed42=_0xef2ac3;this[_0x56ed42(0xad)][_0x56ed42(0xba)](g),this['_injector'][_0x56ed42(0xba)](S);}};$(b,_0xef2ac3(0x106),W),$(b,_0xef2ac3(0xfb),_0x20fd11['UNIVER_UNKNOWN']),b=ie([_0xe266c6(_0x33dd69,_0x35d9c6,_0x157e4d),w(0x1,_0xaac0e8(_0x20745a)),w(0x2,_0xf1feab)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x495c(_0x20bd29,_0x30fb79){const _0x408862=_0x4088();return _0x495c=function(_0x495c7d,_0x5fd996){_0x495c7d=_0x495c7d-0xbd;let _0x393b7b=_0x408862[_0x495c7d];return _0x393b7b;},_0x495c(_0x20bd29,_0x30fb79);}(function(_0xa3c9a7,_0x2703f6){const _0x357327=_0x495c,_0x56e544=_0xa3c9a7();while(!![]){try{const _0x5bd3ec=parseInt(_0x357327(0xe7))/0x1+-parseInt(_0x357327(0xbd))/0x2*(parseInt(_0x357327(0xd1))/0x3)+-parseInt(_0x357327(0xda))/0x4+-parseInt(_0x357327(0x10f))/0x5*(parseInt(_0x357327(0x117))/0x6)+parseInt(_0x357327(0x131))/0x7+parseInt(_0x357327(0x10a))/0x8+parseInt(_0x357327(0xf3))/0x9*(parseInt(_0x357327(0x123))/0xa);if(_0x5bd3ec===_0x2703f6)break;else _0x56e544['push'](_0x56e544['shift']());}catch(_0x251772){_0x56e544['push'](_0x56e544['shift']());}}}(_0x4088,0xa6a3f),function(_0x3486ea,_0x317126){const _0x36df24=_0x495c;typeof exports==_0x36df24(0xd3)&&typeof module<'u'?_0x317126(exports,require('@univerjs-pro/collaboration-client'),require(_0x36df24(0x134)),require(_0x36df24(0xf6)),require(_0x36df24(0xea)),require(_0x36df24(0xfe)),require('rxjs'),require(_0x36df24(0xca))):typeof define==_0x36df24(0xe6)&&define['amd']?define(['exports','@univerjs-pro/collaboration-client',_0x36df24(0x134),_0x36df24(0xf6),'@univerjs/thread-comment-ui',_0x36df24(0xfe),'rxjs','@univerjs/network'],_0x317126):(_0x3486ea=typeof globalThis<'u'?globalThis:_0x3486ea||self,_0x317126(_0x3486ea['UniverProThreadCommentDatasource']={},_0x3486ea[_0x36df24(0x11a)],_0x3486ea['UniverProLicense'],_0x3486ea[_0x36df24(0x13c)],_0x3486ea[_0x36df24(0xe4)],_0x3486ea[_0x36df24(0xc5)],_0x3486ea[_0x36df24(0xf0)],_0x3486ea['UniverNetwork']));}(this,function(_0x4f4d62,_0x4be1ec,_0x5699d5,_0xab27a6,_0x4df0d4,_0x313a66,_0x257afd,_0x4f5a03){'use strict';const _0x4d69f0=_0x495c;const _0x43a0a7=_0x4d69f0(0x100);var _0x523864=(_0x4e6981=>(_0x4e6981[_0x4e6981[_0x4d69f0(0x13e)]=0x0]=_0x4d69f0(0x13e),_0x4e6981[_0x4e6981[_0x4d69f0(0x10d)]=0x1]=_0x4d69f0(0x10d),_0x4e6981[_0x4e6981[_0x4d69f0(0x12b)]=-0x1]=_0x4d69f0(0x12b),_0x4e6981))(_0x523864||{}),_0x37cf78=(_0x5c11a0=>(_0x5c11a0[_0x5c11a0['Unknown']=0x0]=_0x4d69f0(0x133),_0x5c11a0[_0x5c11a0[_0x4d69f0(0xf8)]=0x1]=_0x4d69f0(0xf8),_0x5c11a0[_0x5c11a0['Reply']=0x2]='Reply',_0x5c11a0[_0x5c11a0[_0x4d69f0(0x124)]=0x3]=_0x4d69f0(0x124),_0x5c11a0[_0x5c11a0['Delete']=0x4]='Delete',_0x5c11a0[_0x5c11a0['Solve']=0x5]=_0x4d69f0(0x138),_0x5c11a0[_0x5c11a0['UNRECOGNIZED']=-0x1]=_0x4d69f0(0x12b),_0x5c11a0))(_0x37cf78||{});const _0x21145a=_0x1ee46e=>_0xab27a6[_0x4d69f0(0xf4)](new Date(+_0x1ee46e))[_0x4d69f0(0xc1)](_0x4d69f0(0x11b)),_0x6824af=async(_0x302bbd,_0x4d4fb1)=>{const _0x5e068d=_0x4d69f0,_0x4c9815=_0x302bbd[_0x5e068d(0x112)](_0xab27a6[_0x5e068d(0x122)]),_0x3f9578=_0x302bbd[_0x5e068d(0x112)](_0x4f5a03[_0x5e068d(0xf1)]);_0x4d4fb1[_0x5e068d(0xde)](_0x37ce4a=>{const _0x59a987=_0x5e068d;_0x4c9815[_0x59a987(0xef)](_0x37ce4a)&&_0x4d4fb1['delete'](_0x37ce4a);}),_0x4d4fb1['size']&&(await _0x3f9578[_0x5e068d(0x112)](_0x5e068d(0x105),{'params':{'userIDs':[..._0x4d4fb1]}}))['body'][_0x5e068d(0x126)][_0x5e068d(0xde)](_0x2e1f25=>{const _0x2dff17=_0x5e068d;_0x2e1f25&&_0x4c9815[_0x2dff17(0xc2)](_0x2e1f25);});};var _0x4aff70=Object[_0x4d69f0(0xdb)],_0x4b0991=(_0x205b53,_0x4b65ca,_0x3a3f34,_0x7feb2c)=>{const _0x2a24ef=_0x4d69f0;for(var _0x5de04b=_0x7feb2c>0x1?void 0x0:_0x7feb2c?_0x4aff70(_0x4b65ca,_0x3a3f34):_0x4b65ca,_0x3b0051=_0x205b53[_0x2a24ef(0xc7)]-0x1,_0x2f53c1;_0x3b0051>=0x0;_0x3b0051--)(_0x2f53c1=_0x205b53[_0x3b0051])&&(_0x5de04b=_0x2f53c1(_0x5de04b)||_0x5de04b);return _0x5de04b;},_0x507ccd=(_0x17a9e4,_0x28f1d8)=>(_0x5eeaa3,_0x3d51ff)=>_0x28f1d8(_0x5eeaa3,_0x3d51ff,_0x17a9e4);let _0x1aa0a9=class extends _0xab27a6[_0x4d69f0(0xc9)]{constructor(_0x11dc96,_0x5cc002,_0x3b9b1d,_0x5101a3){const _0x3ca6e4=_0x4d69f0;super(),this[_0x3ca6e4(0xe8)]=_0x11dc96,this[_0x3ca6e4(0xd4)]=_0x5cc002,this[_0x3ca6e4(0xf9)]=_0x3b9b1d,this['_injector']=_0x5101a3,this['_init'](),this[_0x3ca6e4(0x11e)]();}[_0x4d69f0(0x11e)](){const _0x4abcf2=_0x4d69f0;this[_0x4abcf2(0x12a)](this[_0x4abcf2(0xd4)][_0x4abcf2(0x110)]['pipe'](_0x257afd[_0x4abcf2(0x129)](0x10))[_0x4abcf2(0xd7)](_0x3c2d90=>{const _0x3ad64d=_0x4abcf2,_0x545905=new Set();_0x3c2d90[_0x3ad64d(0xde)](_0x39dc87=>{const _0x13e8de=_0x3ad64d;switch(_0x39dc87[_0x13e8de(0x130)]){case _0x13e8de(0xd9):{const _0x39018f=_0x39dc87[_0x13e8de(0x139)][_0x13e8de(0x11c)];_0x545905['add'](_0x39018f);break;}}}),_0x6824af(this['_injector'],_0x545905);}));}[_0x4d69f0(0xc0)](){const _0x7346b3=_0x4d69f0;this['disposeWithMe'](this['_commentService']['commentUpdate$'][_0x7346b3(0xd7)](async _0x1a1917=>{const _0x3a5a33=_0x7346b3;var _0x44a090,_0x359ff5,_0x56a2f2,_0x10e22d;const _0x59e5f3=(_0x44a090=this[_0x3a5a33(0xd4)][_0x3a5a33(0xd5)](_0x1a1917[_0x3a5a33(0xe5)])[_0x3a5a33(0xbe)](_0x431753=>_0x431753['threadId']===_0x1a1917['threadId']))==null?void 0x0:_0x44a090[_0x3a5a33(0xf2)];if(!_0x59e5f3)return;const {unitId:_0x11b199,subUnitId:_0x5940d5}=_0x59e5f3;switch(_0x1a1917[_0x3a5a33(0xc8)]&&this[_0x3a5a33(0xf9)][_0x3a5a33(0xc2)](_0x1a1917['user']),_0x1a1917['type']){case _0x37cf78['Add']:break;case _0x37cf78[_0x3a5a33(0xed)]:{this[_0x3a5a33(0xd4)][_0x3a5a33(0xeb)](_0x11b199,_0x5940d5,{'unitId':_0x11b199,'subUnitId':_0x5940d5,'ref':'','id':_0x1a1917['replyId'],'dT':_0x21145a(+_0x1a1917['createTimestamp']),'threadId':_0x1a1917[_0x3a5a33(0xcf)],'personId':(_0x56a2f2=(_0x359ff5=_0x1a1917[_0x3a5a33(0xc8)])==null?void 0x0:_0x359ff5[_0x3a5a33(0x119)])!=null?_0x56a2f2:_0x1a1917[_0x3a5a33(0x12f)],'text':JSON[_0x3a5a33(0x128)](_0x1a1917[_0x3a5a33(0x115)]),'parentId':_0x59e5f3['id']});break;}case _0x37cf78[_0x3a5a33(0x108)]:{const _0x111d26=this[_0x3a5a33(0xd4)]['getComment'](_0x11b199,_0x5940d5,_0x1a1917[_0x3a5a33(0xcd)]);_0x111d26&&_0x111d26[_0x3a5a33(0xd8)]&&this[_0x3a5a33(0xd4)][_0x3a5a33(0x13a)](_0x11b199,_0x5940d5,_0x1a1917[_0x3a5a33(0xcd)]);break;}case _0x37cf78[_0x3a5a33(0x124)]:{this[_0x3a5a33(0xd4)][_0x3a5a33(0x107)](_0x11b199,_0x5940d5,{'commentId':_0x1a1917['replyId'],'text':JSON[_0x3a5a33(0x128)](_0x1a1917[_0x3a5a33(0x115)])});break;}case _0x37cf78[_0x3a5a33(0x138)]:{const _0x24d6bc=(_0x10e22d=this[_0x3a5a33(0xd4)][_0x3a5a33(0xd5)](_0x1a1917['unitId'])[_0x3a5a33(0xbe)](_0x59a370=>_0x59a370[_0x3a5a33(0xcf)]===_0x1a1917['threadId']))==null?void 0x0:_0x10e22d[_0x3a5a33(0xf2)];_0x24d6bc&&this[_0x3a5a33(0xd4)][_0x3a5a33(0x11f)](_0x11b199,_0x5940d5,_0x24d6bc['id'],_0x1a1917[_0x3a5a33(0x127)]===_0x523864['Solved']);break;}}}));}};_0x1aa0a9=_0x4b0991([_0x507ccd(0x0,_0xab27a6['Inject'](_0x4be1ec[_0x4d69f0(0xe9)])),_0x507ccd(0x1,_0xab27a6['Inject'](_0x313a66[_0x4d69f0(0x11d)])),_0x507ccd(0x2,_0xab27a6[_0x4d69f0(0xc4)](_0xab27a6[_0x4d69f0(0x122)])),_0x507ccd(0x3,_0xab27a6[_0x4d69f0(0xc4)](_0xab27a6[_0x4d69f0(0xd6)]))],_0x1aa0a9);const _0x1f5605=_0x4d69f0(0x10c),_0x4b6f52={};var _0x36980a=Object['getOwnPropertyDescriptor'],_0x166a2d=(_0x475e2b,_0x4013b2,_0x1d4ee8,_0x227916)=>{const _0xceba13=_0x4d69f0;for(var _0x15bebd=_0x227916>0x1?void 0x0:_0x227916?_0x36980a(_0x4013b2,_0x1d4ee8):_0x4013b2,_0x4bac9b=_0x475e2b[_0xceba13(0xc7)]-0x1,_0x2cc268;_0x4bac9b>=0x0;_0x4bac9b--)(_0x2cc268=_0x475e2b[_0x4bac9b])&&(_0x15bebd=_0x2cc268(_0x15bebd)||_0x15bebd);return _0x15bebd;},_0x125dc5=(_0xb73bf3,_0x3c159d)=>(_0x25e4f7,_0x4525b4)=>_0x3c159d(_0x25e4f7,_0x4525b4,_0xb73bf3);function _0x5729bb(_0x4d85eb,_0x1b974a){const _0x26dcad=_0x4d69f0,_0x27d1bd=_0x4d85eb[_0x26dcad(0xff)][0x0];return{..._0x1b974a,'id':_0x27d1bd[_0x26dcad(0xcd)],'resolved':_0x4d85eb[_0x26dcad(0x127)]===0x1,'dT':_0x21145a(_0x27d1bd[_0x26dcad(0x10e)]),'personId':_0x27d1bd['userId'],'threadId':_0x27d1bd['threadId']};}function _0x1a2f96(_0x34efd0,_0x19f6e1,_0x30587b){const _0x3f1935=_0x4d69f0;var _0x2a410f,_0x3975f7;if(((_0x3975f7=(_0x2a410f=_0x34efd0==null?void 0x0:_0x34efd0[_0x3f1935(0xff)])==null?void 0x0:_0x2a410f['length'])!=null?_0x3975f7:0x0)>0x0){const _0x4ba5c1=(_0x256ffc,_0x85ccf6)=>({'id':_0x256ffc[_0x3f1935(0xcd)],'threadId':_0x256ffc[_0x3f1935(0xcf)],'dT':_0x21145a(_0x256ffc[_0x3f1935(0x10e)]),'personId':_0x256ffc[_0x3f1935(0x12f)],'resolved':_0x34efd0[_0x3f1935(0x127)]===_0x523864[_0x3f1935(0x10d)],'unitId':_0x19f6e1,'subUnitId':_0x30587b,'text':JSON[_0x3f1935(0x128)](_0x256ffc[_0x3f1935(0x115)]),'parentId':_0x85ccf6}),_0x74174c=_0x4ba5c1(_0x34efd0[_0x3f1935(0xff)][0x0]);return{..._0x74174c,'children':_0x34efd0[_0x3f1935(0xff)][_0x3f1935(0x125)](0x1)[_0x3f1935(0x101)](_0x2037b3=>_0x4ba5c1(_0x2037b3,_0x74174c['id']))};}return null;}let _0x45c26b=class{constructor(_0x15cd4f,_0x60b8bf,_0x40a9a0,_0x53f914){const _0x3861a9=_0x4d69f0;this[_0x3861a9(0x12c)]=_0x15cd4f,this[_0x3861a9(0xf9)]=_0x60b8bf,this[_0x3861a9(0xcb)]=_0x40a9a0,this[_0x3861a9(0x136)]=_0x53f914;}async[_0x4d69f0(0xeb)](_0x53d4bc){const _0x15169a=_0x4d69f0;var _0x475079,_0x5880a9;const {parentId:_0x104d37,unitId:_0x4f3653,text:_0x1eec2e,threadId:_0x2aa013}=_0x53d4bc,_0x428023=(_0x5880a9=(_0x475079=_0x1eec2e['customRanges'])==null?void 0x0:_0x475079[_0x15169a(0xdd)](_0x568119=>_0x568119[_0x15169a(0xce)]===_0xab27a6[_0x15169a(0xd2)]['COMMENT'])['map'](_0x57f7d7=>_0x57f7d7['rangeId']))!=null?_0x5880a9:[],_0x204d80=JSON[_0x15169a(0xf7)](_0x1eec2e),_0x1dfbbe=(await this[_0x15169a(0xcb)][_0x15169a(0xfc)](_0x4f3653))['getMemberID']();if(_0x104d37){const _0x501b0f={'memberId':_0x1dfbbe,'unitId':_0x4f3653,'content':_0x204d80,'mention':_0x428023,'threadId':_0x2aa013},_0x235249=(await this['_httpService']['post'](_0x15169a(0x106)+_0x4f3653+_0x15169a(0xd0),{'body':_0x501b0f}))[_0x15169a(0x13f)][_0x15169a(0x114)];return{..._0x53d4bc,'id':_0x235249[_0x15169a(0xcd)],'dT':_0xab27a6['dayjs'](+_0x235249[_0x15169a(0x10e)])[_0x15169a(0xc1)](_0x15169a(0x11b)),'personId':_0x235249['userId']};}else{const _0x205c3e={'memberId':_0x1dfbbe,'unitId':_0x4f3653,'content':_0x204d80,'mention':_0x428023},_0x50453d=await this[_0x15169a(0x12c)][_0x15169a(0x104)](_0x15169a(0x106)+_0x4f3653+_0x15169a(0x116),{'body':_0x205c3e});return _0x5729bb(_0x50453d[_0x15169a(0x13f)][_0x15169a(0xdf)],_0x53d4bc);}}async[_0x4d69f0(0x107)](_0x101936){const _0x1d8674=_0x4d69f0;var _0x411dc6,_0x30ea97;const {text:_0x19f7d4,unitId:_0x5e130f}=_0x101936,_0x1f4ac3=(_0x30ea97=(_0x411dc6=_0x19f7d4[_0x1d8674(0xcc)])==null?void 0x0:_0x411dc6['filter'](_0x62b157=>_0x62b157[_0x1d8674(0xce)]===_0xab27a6[_0x1d8674(0xd2)][_0x1d8674(0x132)])[_0x1d8674(0x101)](_0x4afa6c=>_0x4afa6c['rangeId']))!=null?_0x30ea97:[],_0x338f3f=JSON[_0x1d8674(0xf7)](_0x19f7d4),_0xba0fed=_0x101936[_0x1d8674(0xcf)],_0x4aa8dd=_0x101936['id'],_0x2775c0={'memberId':(await this[_0x1d8674(0xcb)][_0x1d8674(0xfc)](_0x5e130f))[_0x1d8674(0x12d)](),'unitId':_0x5e130f,'threadId':_0xba0fed,'mention':_0x1f4ac3,'content':_0x338f3f,'replyId':_0x4aa8dd},_0x2eaf6e=await this[_0x1d8674(0x12c)][_0x1d8674(0x104)]('/universer-api/comment/unit/'+_0x5e130f+_0x1d8674(0x109),{'body':_0x2775c0});return!_0x2eaf6e[_0x1d8674(0x13f)][_0x1d8674(0x113)]||_0x2eaf6e['body'][_0x1d8674(0x113)][_0x1d8674(0xec)]===0x1;}async['resolveComment'](_0x25eeec){const _0x3282c8=_0x4d69f0,{unitId:_0x37d67a}=_0x25eeec,_0x34c00a=_0x25eeec[_0x3282c8(0xcf)],_0x5cf4e8={'memberId':this[_0x3282c8(0xf9)]['getCurrentUser']()['userID'],'unitId':_0x37d67a,'threadId':_0x34c00a,'solved':_0x25eeec[_0x3282c8(0x10b)]?_0x523864[_0x3282c8(0x10d)]:_0x523864[_0x3282c8(0x13e)]},_0x4af850=await this['_httpService']['post'](_0x3282c8(0x106)+_0x37d67a+_0x3282c8(0x118),{'body':_0x5cf4e8});return!_0x4af850[_0x3282c8(0x13f)][_0x3282c8(0x113)]||_0x4af850[_0x3282c8(0x13f)]['error'][_0x3282c8(0xec)]===0x1;}async[_0x4d69f0(0x13a)](_0x1d507a,_0x3ff1ea,_0xf521a5,_0x2b29d8){const _0x1b55b1=_0x4d69f0,_0x10af34={'memberId':(await this[_0x1b55b1(0xcb)]['requireSession'](_0x1d507a))[_0x1b55b1(0x12d)](),'threadId':_0xf521a5,'replyId':_0x2b29d8,'unitId':_0x1d507a},_0xd04208=await this['_httpService'][_0x1b55b1(0x104)]('/universer-api/comment/unit/'+_0x1d507a+_0x1b55b1(0xe1),{'body':_0x10af34});return!_0xd04208[_0x1b55b1(0x13f)][_0x1b55b1(0x113)]||_0xd04208['body']['error'][_0x1b55b1(0xec)]===0x1;}async['listComments'](_0x3b0fe4,_0x4ab459,_0x222c24){const _0x59e2c9=_0x4d69f0,_0x3f0c53={'unitId':_0x3b0fe4,'threadId':_0x222c24},_0x27ae75=await this[_0x59e2c9(0x12c)][_0x59e2c9(0x104)](_0x59e2c9(0x106)+_0x3b0fe4+_0x59e2c9(0xee),{'body':_0x3f0c53}),_0x35711b=_0x222c24[_0x59e2c9(0x101)](_0x24a639=>_0x1a2f96(_0x27ae75[_0x59e2c9(0x13f)]['comments'][_0x24a639],_0x3b0fe4,_0x4ab459))['filter'](Boolean);return Object[_0x59e2c9(0x120)](_0x27ae75['body'][_0x59e2c9(0x126)])[_0x59e2c9(0xde)](_0x324968=>{const _0x2c2ba4=_0x59e2c9;this[_0x2c2ba4(0xf9)]['addUser'](_0x324968);}),_0x35711b;}[_0x4d69f0(0xc3)](_0x8eb15){const _0x3e7396=_0x4d69f0;return{'id':_0x8eb15['id'],'threadId':_0x8eb15[_0x3e7396(0xcf)],'ref':_0x8eb15[_0x3e7396(0xe2)]};}};_0x45c26b=_0x166a2d([_0x125dc5(0x0,_0xab27a6[_0x4d69f0(0xc4)](_0x4f5a03['HTTPService'])),_0x125dc5(0x1,_0xab27a6[_0x4d69f0(0xc4)](_0xab27a6[_0x4d69f0(0x122)])),_0x125dc5(0x2,_0xab27a6[_0x4d69f0(0xc4)](_0x4be1ec[_0x4d69f0(0x12e)])),_0x125dc5(0x3,_0xab27a6[_0x4d69f0(0xc4)](_0xab27a6[_0x4d69f0(0xd6)]))],_0x45c26b);var _0x2c83e3=Object['getOwnPropertyDescriptor'],_0x20ce87=(_0x5614aa,_0x2ef186,_0x1a0ae4,_0x1373ed)=>{const _0x1afad1=_0x4d69f0;for(var _0x57d500=_0x1373ed>0x1?void 0x0:_0x1373ed?_0x2c83e3(_0x2ef186,_0x1a0ae4):_0x2ef186,_0x4bdae2=_0x5614aa[_0x1afad1(0xc7)]-0x1,_0xd695b8;_0x4bdae2>=0x0;_0x4bdae2--)(_0xd695b8=_0x5614aa[_0x4bdae2])&&(_0x57d500=_0xd695b8(_0x57d500)||_0x57d500);return _0x57d500;},_0xf66220=(_0x52ddc6,_0xe9fc40)=>(_0x4e8c4f,_0x18d8e6)=>_0xe9fc40(_0x4e8c4f,_0x18d8e6,_0x52ddc6);let _0x4643c0=class extends _0xab27a6[_0x4d69f0(0xc9)]{constructor(_0x10dc9d,_0x1476b2){const _0x4d62ed=_0x4d69f0;super(),this['_threadCommentDataSourceService']=_0x10dc9d,this[_0x4d62ed(0xe3)]=_0x1476b2,this['_initDataSource']();}['_initDataSource'](){const _0x44945a=_0x4d69f0;this[_0x44945a(0x103)]['dataSource']=this[_0x44945a(0xe3)],this[_0x44945a(0x103)][_0x44945a(0x137)]=!0x1;}};_0x4643c0=_0x20ce87([_0xf66220(0x0,_0x313a66[_0x4d69f0(0xbf)]),_0xf66220(0x1,_0xab27a6[_0x4d69f0(0xc4)](_0x45c26b))],_0x4643c0);var _0x13c838=Object[_0x4d69f0(0xf5)],_0x3d8df0=Object['getOwnPropertyDescriptor'],_0x51c580=(_0x538264,_0x19cf21,_0x4ad2e0)=>_0x19cf21 in _0x538264?_0x13c838(_0x538264,_0x19cf21,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4ad2e0}):_0x538264[_0x19cf21]=_0x4ad2e0,_0x24f5c2=(_0x3231aa,_0x1f1dfd,_0x20c0b5,_0x5bf2b7)=>{for(var _0x49efc7=_0x5bf2b7>0x1?void 0x0:_0x5bf2b7?_0x3d8df0(_0x1f1dfd,_0x20c0b5):_0x1f1dfd,_0x42308c=_0x3231aa['length']-0x1,_0x1be820;_0x42308c>=0x0;_0x42308c--)(_0x1be820=_0x3231aa[_0x42308c])&&(_0x49efc7=_0x1be820(_0x49efc7)||_0x49efc7);return _0x49efc7;},_0xb7e5b8=(_0x37f166,_0x1de625)=>(_0xf7fdb1,_0x2375d8)=>_0x1de625(_0xf7fdb1,_0x2375d8,_0x37f166),_0x1d6842=(_0x37d0dc,_0x5b8408,_0x2ae1ce)=>_0x51c580(_0x37d0dc,typeof _0x5b8408!='symbol'?_0x5b8408+'':_0x5b8408,_0x2ae1ce);_0x4f4d62[_0x4d69f0(0xfa)]=class extends _0xab27a6[_0x4d69f0(0x121)]{constructor(_0x1ad055=_0x4b6f52,_0x248c69,_0x543aa4){const _0x3de0f2=_0x4d69f0;super(),this['_config']=_0x1ad055,this['_injector']=_0x248c69,this[_0x3de0f2(0x102)]=_0x543aa4;const {..._0x276d8a}=_0xab27a6[_0x3de0f2(0x13b)]({},_0x4b6f52,this[_0x3de0f2(0x13d)]);this[_0x3de0f2(0x102)]['setConfig'](_0x1f5605,_0x276d8a);}['onStarting'](){const _0x48ce7d=_0x4d69f0;[[_0x45c26b],[_0x4643c0],[_0x1aa0a9]][_0x48ce7d(0xde)](_0x2dca17=>{const _0x1e44e7=_0x48ce7d;this[_0x1e44e7(0x136)][_0x1e44e7(0xd9)](_0x2dca17);});}['onReady'](){const _0x3f0d19=_0x4d69f0;this[_0x3f0d19(0x136)][_0x3f0d19(0x112)](_0x4643c0),this[_0x3f0d19(0x136)][_0x3f0d19(0x112)](_0x1aa0a9);}},_0x1d6842(_0x4f4d62[_0x4d69f0(0xfa)],_0x4d69f0(0xdc),_0x43a0a7),_0x1d6842(_0x4f4d62[_0x4d69f0(0xfa)],'type',_0xab27a6['UniverInstanceType'][_0x4d69f0(0xe0)]),_0x4f4d62[_0x4d69f0(0xfa)]=_0x24f5c2([_0xab27a6[_0x4d69f0(0xfd)](_0x4df0d4[_0x4d69f0(0x135)],_0x4be1ec[_0x4d69f0(0xfb)],_0x5699d5['UniverLicensePlugin']),_0xb7e5b8(0x1,_0xab27a6[_0x4d69f0(0xc4)](_0xab27a6[_0x4d69f0(0xd6)])),_0xb7e5b8(0x2,_0xab27a6[_0x4d69f0(0xc6)])],_0x4f4d62['UniverThreadCommentDataSourcePlugin']),Object[_0x4d69f0(0xf5)](_0x4f4d62,Symbol['toStringTag'],{'value':_0x4d69f0(0x111)});}));function _0x4088(){const _0xfee050=['reply','content','/add','24TpXImn','/solved','userID','UniverProCollaborationClient','YYYY/MM/DD\x20HH:mm','personId','ThreadCommentModel','_initUserSync','resolveComment','values','Plugin','UserManagerService','10BsRNhH','Edit','slice','users','solved','parse','bufferTime','disposeWithMe','UNRECOGNIZED','_httpService','getMemberID','CollaborationSessionService','userId','type','5500306PMZbmN','COMMENT','Unknown','@univerjs-pro/license','UniverThreadCommentUIPlugin','_injector','syncUpdateMutationToColla','Solve','payload','deleteComment','merge','UniverCore','_config','OpenOrReOpen','body','330452dbAkFm','find','IThreadCommentDataSourceService','_init','format','addUser','saveCommentToSnapshot','Inject','UniverThreadComment','IConfigService','length','user','Disposable','@univerjs/network','_sessionService','customRanges','replyId','rangeType','threadId','/reply','18XAAFfm','CustomRangeType','object','_threadCommentModel','getUnit','Injector','subscribe','parentId','add','1475836jSqCGl','getOwnPropertyDescriptor','pluginName','filter','forEach','comment','UNIVER_UNKNOWN','/delete','ref','_threadCommentDataSource','UniverThreadCommentUi','unitId','function','1115818aPIYoa','_commentService','CommentService','@univerjs/thread-comment-ui','addComment','code','Reply','/list','getUser','rxjs','HTTPService','root','4625568iXOnUQ','dayjs','defineProperty','@univerjs/core','stringify','Add','_userService','UniverThreadCommentDataSourcePlugin','UniverCollaborationClientPlugin','requireSession','DependentOn','@univerjs/thread-comment','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','map','_configService','_threadCommentDataSourceService','post','/universer-api/user/list','/universer-api/comment/unit/','updateComment','Delete','/edit','3099664zTYMMk','resolved','thread-comment-data-source.config','Solved','createTimestamp','950140HYBvgU','commentUpdate$','Module','get','error'];_0x4088=function(){return _0xfee050;};return _0x4088();}
|
|
1
|
+
function _0x45b4(_0x42545b,_0x3caf63){const _0x4db7b5=_0x4db7();return _0x45b4=function(_0x45b4ac,_0x157b84){_0x45b4ac=_0x45b4ac-0x1e5;let _0x2ecf37=_0x4db7b5[_0x45b4ac];return _0x2ecf37;},_0x45b4(_0x42545b,_0x3caf63);}function _0x4db7(){const _0x4616b7=['Solved','297nloNRj','DependentOn','getUser','unitId','addUser','UNIVER_UNKNOWN','solved','COMMENT','747984yTrbAB','OpenOrReOpen','customRanges','exports','Plugin','setConfig','UniverCollaborationClientPlugin','/delete','updateComment','UniverProThreadCommentDatasource','YYYY/MM/DD\x20HH:mm','UNRECOGNIZED','rangeType','parse','@univerjs-pro/license','_threadCommentModel','threadId','pipe','body','replies','Edit','_threadCommentDataSourceService','commentUpdate$','saveCommentToSnapshot','/add','userID','resolveComment','addComment','error','/universer-api/user/list','/solved','_userService','comment','Unknown','code','forEach','rxjs','UniverThreadCommentUi','personId','UniverNetwork','find','HTTPService','dataSource','5lXjUVX','get','_sessionService','Add','subscribe','getCurrentUser','getComment','size','type','thread-comment-data-source.config','deleteComment','_injector','1291903urByfM','Module','onStarting','defineProperty','users','stringify','_threadCommentDataSource','_initUserSync','UniverProLicense','@univerjs/thread-comment-ui','_commentService','filter','getOwnPropertyDescriptor','object','UniverThreadCommentDataSourcePlugin','UniverInstanceType','11349180wapMYv','replyId','@univerjs-pro/collaboration-client','Disposable','_config','ref','resolved','Inject','pluginName','disposeWithMe','CommentService','Solve','payload','108600GgKImb','function','Reply','userId','requireSession','UniverProCollaborationClient','map','delete','891hrLLWR','_configService','format','ThreadCommentModel','6092442AokcGD','_initDataSource','reply','_httpService','onReady','UniverCore','/universer-api/comment/unit/','Delete','user','getUnit','parentId','createTimestamp','_init','post','@univerjs/network','1392774JSSsYI','length','2EHvcqB','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','toStringTag','add','amd','7nHgjsU','getMemberID','UserManagerService','root','IThreadCommentDataSourceService','content','comments','25644EyATSz','listComments','@univerjs/core','merge','dayjs','Injector'];_0x4db7=function(){return _0x4616b7;};return _0x4db7();}(function(_0x40a60d,_0x384517){const _0x30c3f6=_0x45b4,_0x3dac12=_0x40a60d();while(!![]){try{const _0x52a5ff=-parseInt(_0x30c3f6(0x1ee))/0x1*(parseInt(_0x30c3f6(0x228))/0x2)+parseInt(_0x30c3f6(0x23b))/0x3*(parseInt(_0x30c3f6(0x234))/0x4)+-parseInt(_0x30c3f6(0x26e))/0x5*(-parseInt(_0x30c3f6(0x226))/0x6)+-parseInt(_0x30c3f6(0x22d))/0x7*(-parseInt(_0x30c3f6(0x243))/0x8)+parseInt(_0x30c3f6(0x217))/0x9+parseInt(_0x30c3f6(0x1fe))/0xa+parseInt(_0x30c3f6(0x213))/0xb*(-parseInt(_0x30c3f6(0x20b))/0xc);if(_0x52a5ff===_0x384517)break;else _0x3dac12['push'](_0x3dac12['shift']());}catch(_0x2371f0){_0x3dac12['push'](_0x3dac12['shift']());}}}(_0x4db7,0xb66d3),function(_0x2e37e0,_0x124c20){const _0x41ea3b=_0x45b4;typeof exports==_0x41ea3b(0x1fb)&&typeof module<'u'?_0x124c20(exports,require('@univerjs-pro/collaboration-client'),require(_0x41ea3b(0x251)),require(_0x41ea3b(0x236)),require(_0x41ea3b(0x1f7)),require('@univerjs/thread-comment'),require(_0x41ea3b(0x267)),require(_0x41ea3b(0x225))):typeof define==_0x41ea3b(0x20c)&&define[_0x41ea3b(0x22c)]?define([_0x41ea3b(0x246),_0x41ea3b(0x200),_0x41ea3b(0x251),_0x41ea3b(0x236),_0x41ea3b(0x1f7),'@univerjs/thread-comment',_0x41ea3b(0x267),_0x41ea3b(0x225)],_0x124c20):(_0x2e37e0=typeof globalThis<'u'?globalThis:_0x2e37e0||self,_0x124c20(_0x2e37e0[_0x41ea3b(0x24c)]={},_0x2e37e0[_0x41ea3b(0x210)],_0x2e37e0[_0x41ea3b(0x1f6)],_0x2e37e0[_0x41ea3b(0x21c)],_0x2e37e0[_0x41ea3b(0x268)],_0x2e37e0['UniverThreadComment'],_0x2e37e0['rxjs'],_0x2e37e0[_0x41ea3b(0x26a)]));}(this,function(_0x483f35,_0x22f43d,_0x22ad29,_0x30e2b8,_0x1c69cc,_0x30c642,_0x5bf552,_0x546ee6){'use strict';const _0x11225e=_0x45b4;const _0x9c1ce5=_0x11225e(0x229);var _0x319730=(_0xb67e98=>(_0xb67e98[_0xb67e98[_0x11225e(0x244)]=0x0]=_0x11225e(0x244),_0xb67e98[_0xb67e98[_0x11225e(0x23a)]=0x1]=_0x11225e(0x23a),_0xb67e98[_0xb67e98[_0x11225e(0x24e)]=-0x1]='UNRECOGNIZED',_0xb67e98))(_0x319730||{}),_0x55acbe=(_0x3334ca=>(_0x3334ca[_0x3334ca['Unknown']=0x0]=_0x11225e(0x264),_0x3334ca[_0x3334ca[_0x11225e(0x1e5)]=0x1]=_0x11225e(0x1e5),_0x3334ca[_0x3334ca[_0x11225e(0x20d)]=0x2]='Reply',_0x3334ca[_0x3334ca[_0x11225e(0x257)]=0x3]=_0x11225e(0x257),_0x3334ca[_0x3334ca[_0x11225e(0x21e)]=0x4]=_0x11225e(0x21e),_0x3334ca[_0x3334ca[_0x11225e(0x209)]=0x5]=_0x11225e(0x209),_0x3334ca[_0x3334ca[_0x11225e(0x24e)]=-0x1]=_0x11225e(0x24e),_0x3334ca))(_0x55acbe||{});const _0x3e49d9=_0x3b77e7=>_0x30e2b8['dayjs'](new Date(+_0x3b77e7))['format']('YYYY/MM/DD\x20HH:mm'),_0x3132c4=async(_0x32a2d1,_0x5bbb1f)=>{const _0x5bfe73=_0x11225e,_0x5d7817=_0x32a2d1[_0x5bfe73(0x26f)](_0x30e2b8[_0x5bfe73(0x22f)]),_0x9c8a0b=_0x32a2d1['get'](_0x546ee6[_0x5bfe73(0x26c)]);_0x5bbb1f[_0x5bfe73(0x266)](_0x658e08=>{const _0x131060=_0x5bfe73;_0x5d7817[_0x131060(0x23d)](_0x658e08)&&_0x5bbb1f[_0x131060(0x212)](_0x658e08);}),_0x5bbb1f[_0x5bfe73(0x1e9)]&&(await _0x9c8a0b['get'](_0x5bfe73(0x260),{'params':{'userIDs':[..._0x5bbb1f]}}))['body'][_0x5bfe73(0x1f2)][_0x5bfe73(0x266)](_0x41f336=>{const _0xd3866d=_0x5bfe73;_0x41f336&&_0x5d7817[_0xd3866d(0x23f)](_0x41f336);});};var _0x58bcd3=Object[_0x11225e(0x1fa)],_0x3e5c80=(_0x4f2c4d,_0x2cae86,_0x16856c,_0x47e4cc)=>{for(var _0x30ada8=_0x47e4cc>0x1?void 0x0:_0x47e4cc?_0x58bcd3(_0x2cae86,_0x16856c):_0x2cae86,_0x15ba25=_0x4f2c4d['length']-0x1,_0x2bd494;_0x15ba25>=0x0;_0x15ba25--)(_0x2bd494=_0x4f2c4d[_0x15ba25])&&(_0x30ada8=_0x2bd494(_0x30ada8)||_0x30ada8);return _0x30ada8;},_0x54c65b=(_0x2db8f8,_0x48aee3)=>(_0x113a8a,_0x12085e)=>_0x48aee3(_0x113a8a,_0x12085e,_0x2db8f8);let _0x544f61=class extends _0x30e2b8[_0x11225e(0x201)]{constructor(_0x2175d4,_0x1cdf75,_0x283a22,_0x3bb43b){const _0x14ccc3=_0x11225e;super(),this[_0x14ccc3(0x1f8)]=_0x2175d4,this[_0x14ccc3(0x252)]=_0x1cdf75,this[_0x14ccc3(0x262)]=_0x283a22,this['_injector']=_0x3bb43b,this[_0x14ccc3(0x223)](),this[_0x14ccc3(0x1f5)]();}['_initUserSync'](){const _0x5ea876=_0x11225e;this[_0x5ea876(0x207)](this[_0x5ea876(0x252)][_0x5ea876(0x259)][_0x5ea876(0x254)](_0x5bf552['bufferTime'](0x10))[_0x5ea876(0x1e6)](_0x15a60e=>{const _0x4af589=_0x5ea876,_0x5cae82=new Set();_0x15a60e['forEach'](_0x4fa0b3=>{const _0x2e4bf3=_0x45b4;switch(_0x4fa0b3[_0x2e4bf3(0x1ea)]){case'add':{const _0x193d2e=_0x4fa0b3[_0x2e4bf3(0x20a)][_0x2e4bf3(0x269)];_0x5cae82[_0x2e4bf3(0x22b)](_0x193d2e);break;}}}),_0x3132c4(this[_0x4af589(0x1ed)],_0x5cae82);}));}[_0x11225e(0x223)](){const _0x110566=_0x11225e;this[_0x110566(0x207)](this['_commentService'][_0x110566(0x259)]['subscribe'](async _0xf6214a=>{const _0x345125=_0x110566;var _0x116078,_0x5bb71b,_0x477019,_0x5c9d2a;const _0x248bfe=(_0x116078=this[_0x345125(0x252)][_0x345125(0x220)](_0xf6214a[_0x345125(0x23e)])[_0x345125(0x26b)](_0x3fc115=>_0x3fc115[_0x345125(0x253)]===_0xf6214a[_0x345125(0x253)]))==null?void 0x0:_0x116078[_0x345125(0x230)];if(!_0x248bfe)return;const {unitId:_0x32d68e,subUnitId:_0x477391}=_0x248bfe;switch(_0xf6214a[_0x345125(0x21f)]&&this[_0x345125(0x262)][_0x345125(0x23f)](_0xf6214a[_0x345125(0x21f)]),_0xf6214a[_0x345125(0x1ea)]){case _0x55acbe[_0x345125(0x1e5)]:break;case _0x55acbe['Reply']:{this[_0x345125(0x252)][_0x345125(0x25e)](_0x32d68e,_0x477391,{'unitId':_0x32d68e,'subUnitId':_0x477391,'ref':'','id':_0xf6214a['replyId'],'dT':_0x3e49d9(+_0xf6214a['createTimestamp']),'threadId':_0xf6214a[_0x345125(0x253)],'personId':(_0x477019=(_0x5bb71b=_0xf6214a['user'])==null?void 0x0:_0x5bb71b[_0x345125(0x25c)])!=null?_0x477019:_0xf6214a['userId'],'text':JSON[_0x345125(0x250)](_0xf6214a[_0x345125(0x232)]),'parentId':_0x248bfe['id']});break;}case _0x55acbe[_0x345125(0x21e)]:{const _0x2a1ee1=this['_threadCommentModel'][_0x345125(0x1e8)](_0x32d68e,_0x477391,_0xf6214a['replyId']);_0x2a1ee1&&_0x2a1ee1[_0x345125(0x221)]&&this[_0x345125(0x252)][_0x345125(0x1ec)](_0x32d68e,_0x477391,_0xf6214a[_0x345125(0x1ff)]);break;}case _0x55acbe['Edit']:{this['_threadCommentModel'][_0x345125(0x24b)](_0x32d68e,_0x477391,{'commentId':_0xf6214a[_0x345125(0x1ff)],'text':JSON[_0x345125(0x250)](_0xf6214a[_0x345125(0x232)])});break;}case _0x55acbe[_0x345125(0x209)]:{const _0x11904f=(_0x5c9d2a=this[_0x345125(0x252)]['getUnit'](_0xf6214a[_0x345125(0x23e)])['find'](_0x2b445d=>_0x2b445d[_0x345125(0x253)]===_0xf6214a[_0x345125(0x253)]))==null?void 0x0:_0x5c9d2a['root'];_0x11904f&&this[_0x345125(0x252)]['resolveComment'](_0x32d68e,_0x477391,_0x11904f['id'],_0xf6214a[_0x345125(0x241)]===_0x319730['Solved']);break;}}}));}};_0x544f61=_0x3e5c80([_0x54c65b(0x0,_0x30e2b8[_0x11225e(0x205)](_0x22f43d[_0x11225e(0x208)])),_0x54c65b(0x1,_0x30e2b8['Inject'](_0x30c642[_0x11225e(0x216)])),_0x54c65b(0x2,_0x30e2b8[_0x11225e(0x205)](_0x30e2b8['UserManagerService'])),_0x54c65b(0x3,_0x30e2b8['Inject'](_0x30e2b8[_0x11225e(0x239)]))],_0x544f61);const _0x2c06d0=_0x11225e(0x1eb),_0x1d737d={};var _0x1da95f=Object[_0x11225e(0x1fa)],_0x2c9cf2=(_0x5052b6,_0x5a6507,_0x4bfd49,_0x29f4f6)=>{const _0x1f49b3=_0x11225e;for(var _0x468eee=_0x29f4f6>0x1?void 0x0:_0x29f4f6?_0x1da95f(_0x5a6507,_0x4bfd49):_0x5a6507,_0x5c30fb=_0x5052b6[_0x1f49b3(0x227)]-0x1,_0x3d94c0;_0x5c30fb>=0x0;_0x5c30fb--)(_0x3d94c0=_0x5052b6[_0x5c30fb])&&(_0x468eee=_0x3d94c0(_0x468eee)||_0x468eee);return _0x468eee;},_0x15696e=(_0x5566b9,_0x2a0a42)=>(_0x48429d,_0x5c74ca)=>_0x2a0a42(_0x48429d,_0x5c74ca,_0x5566b9);function _0x114edd(_0x2e5a69,_0x2558c7){const _0x1e2dd7=_0x11225e,_0x1a6cd9=_0x2e5a69[_0x1e2dd7(0x256)][0x0];return{..._0x2558c7,'id':_0x1a6cd9[_0x1e2dd7(0x1ff)],'resolved':_0x2e5a69['solved']===0x1,'dT':_0x3e49d9(_0x1a6cd9[_0x1e2dd7(0x222)]),'personId':_0x1a6cd9['userId'],'threadId':_0x1a6cd9['threadId']};}function _0x4c7dbd(_0x178bce,_0x8926ee,_0x5022d9){const _0x1d3e53=_0x11225e;var _0x382ea4,_0x52fc30;if(((_0x52fc30=(_0x382ea4=_0x178bce==null?void 0x0:_0x178bce['replies'])==null?void 0x0:_0x382ea4[_0x1d3e53(0x227)])!=null?_0x52fc30:0x0)>0x0){const _0x2bb322=(_0x5d268b,_0x199d38)=>({'id':_0x5d268b[_0x1d3e53(0x1ff)],'threadId':_0x5d268b[_0x1d3e53(0x253)],'dT':_0x3e49d9(_0x5d268b[_0x1d3e53(0x222)]),'personId':_0x5d268b[_0x1d3e53(0x20e)],'resolved':_0x178bce[_0x1d3e53(0x241)]===_0x319730[_0x1d3e53(0x23a)],'unitId':_0x8926ee,'subUnitId':_0x5022d9,'text':JSON['parse'](_0x5d268b[_0x1d3e53(0x232)]),'parentId':_0x199d38}),_0x13cc7b=_0x2bb322(_0x178bce[_0x1d3e53(0x256)][0x0]);return{..._0x13cc7b,'children':_0x178bce[_0x1d3e53(0x256)]['slice'](0x1)[_0x1d3e53(0x211)](_0x46eec4=>_0x2bb322(_0x46eec4,_0x13cc7b['id']))};}return null;}let _0x9076c7=class{constructor(_0x7dd25,_0x1c6a38,_0x5354a4,_0x18cf1f){const _0x1d61e1=_0x11225e;this['_httpService']=_0x7dd25,this[_0x1d61e1(0x262)]=_0x1c6a38,this[_0x1d61e1(0x270)]=_0x5354a4,this['_injector']=_0x18cf1f;}async[_0x11225e(0x25e)](_0xaf8821){const _0x3e9e66=_0x11225e;var _0x1fe8b9,_0x3ad7d3;const {parentId:_0x1f55d0,unitId:_0x3e5f97,text:_0x5d9a82,threadId:_0x3b6130}=_0xaf8821,_0x2eb0e2=(_0x3ad7d3=(_0x1fe8b9=_0x5d9a82['customRanges'])==null?void 0x0:_0x1fe8b9[_0x3e9e66(0x1f9)](_0x2f0a35=>_0x2f0a35[_0x3e9e66(0x24f)]===_0x30e2b8['CustomRangeType'][_0x3e9e66(0x242)])[_0x3e9e66(0x211)](_0x5afa3b=>_0x5afa3b['rangeId']))!=null?_0x3ad7d3:[],_0x2bac07=JSON[_0x3e9e66(0x1f3)](_0x5d9a82),_0x10435b=(await this[_0x3e9e66(0x270)]['requireSession'](_0x3e5f97))['getMemberID']();if(_0x1f55d0){const _0x43607f={'memberId':_0x10435b,'unitId':_0x3e5f97,'content':_0x2bac07,'mention':_0x2eb0e2,'threadId':_0x3b6130},_0x56d6d1=(await this[_0x3e9e66(0x21a)][_0x3e9e66(0x224)]('/universer-api/comment/unit/'+_0x3e5f97+'/reply',{'body':_0x43607f}))[_0x3e9e66(0x255)][_0x3e9e66(0x219)];return{..._0xaf8821,'id':_0x56d6d1[_0x3e9e66(0x1ff)],'dT':_0x30e2b8[_0x3e9e66(0x238)](+_0x56d6d1['createTimestamp'])[_0x3e9e66(0x215)](_0x3e9e66(0x24d)),'personId':_0x56d6d1['userId']};}else{const _0x291d6e={'memberId':_0x10435b,'unitId':_0x3e5f97,'content':_0x2bac07,'mention':_0x2eb0e2},_0x3459b5=await this[_0x3e9e66(0x21a)][_0x3e9e66(0x224)](_0x3e9e66(0x21d)+_0x3e5f97+_0x3e9e66(0x25b),{'body':_0x291d6e});return _0x114edd(_0x3459b5[_0x3e9e66(0x255)][_0x3e9e66(0x263)],_0xaf8821);}}async[_0x11225e(0x24b)](_0x53895e){const _0x590738=_0x11225e;var _0x38bcb6,_0x4d45e0;const {text:_0x20f72d,unitId:_0x2f5f4b}=_0x53895e,_0x21756b=(_0x4d45e0=(_0x38bcb6=_0x20f72d[_0x590738(0x245)])==null?void 0x0:_0x38bcb6[_0x590738(0x1f9)](_0x322001=>_0x322001[_0x590738(0x24f)]===_0x30e2b8['CustomRangeType']['COMMENT'])[_0x590738(0x211)](_0x42d785=>_0x42d785['rangeId']))!=null?_0x4d45e0:[],_0x502828=JSON[_0x590738(0x1f3)](_0x20f72d),_0x3ef73c=_0x53895e[_0x590738(0x253)],_0xaa6ef5=_0x53895e['id'],_0x41cb0f={'memberId':(await this['_sessionService'][_0x590738(0x20f)](_0x2f5f4b))[_0x590738(0x22e)](),'unitId':_0x2f5f4b,'threadId':_0x3ef73c,'mention':_0x21756b,'content':_0x502828,'replyId':_0xaa6ef5},_0x5ba3b4=await this[_0x590738(0x21a)][_0x590738(0x224)]('/universer-api/comment/unit/'+_0x2f5f4b+'/edit',{'body':_0x41cb0f});return!_0x5ba3b4[_0x590738(0x255)][_0x590738(0x25f)]||_0x5ba3b4[_0x590738(0x255)][_0x590738(0x25f)]['code']===0x1;}async[_0x11225e(0x25d)](_0x56d111){const _0x293bce=_0x11225e,{unitId:_0x2deda3}=_0x56d111,_0x43aed6=_0x56d111[_0x293bce(0x253)],_0x20ea68={'memberId':this['_userService'][_0x293bce(0x1e7)]()[_0x293bce(0x25c)],'unitId':_0x2deda3,'threadId':_0x43aed6,'solved':_0x56d111[_0x293bce(0x204)]?_0x319730[_0x293bce(0x23a)]:_0x319730[_0x293bce(0x244)]},_0x59f41b=await this[_0x293bce(0x21a)]['post'](_0x293bce(0x21d)+_0x2deda3+_0x293bce(0x261),{'body':_0x20ea68});return!_0x59f41b[_0x293bce(0x255)]['error']||_0x59f41b[_0x293bce(0x255)][_0x293bce(0x25f)][_0x293bce(0x265)]===0x1;}async[_0x11225e(0x1ec)](_0x599604,_0x5be484,_0x59ae35,_0x23b497){const _0x5b8fbc=_0x11225e,_0x313dc5={'memberId':(await this['_sessionService'][_0x5b8fbc(0x20f)](_0x599604))['getMemberID'](),'threadId':_0x59ae35,'replyId':_0x23b497,'unitId':_0x599604},_0x43da39=await this[_0x5b8fbc(0x21a)][_0x5b8fbc(0x224)]('/universer-api/comment/unit/'+_0x599604+_0x5b8fbc(0x24a),{'body':_0x313dc5});return!_0x43da39['body'][_0x5b8fbc(0x25f)]||_0x43da39['body'][_0x5b8fbc(0x25f)][_0x5b8fbc(0x265)]===0x1;}async[_0x11225e(0x235)](_0x13622d,_0x30e828,_0x342b46){const _0x546412=_0x11225e,_0x1858f6={'unitId':_0x13622d,'threadId':_0x342b46},_0x56f3bf=await this[_0x546412(0x21a)][_0x546412(0x224)](_0x546412(0x21d)+_0x13622d+'/list',{'body':_0x1858f6}),_0x25e5a6=_0x342b46['map'](_0x4c64d2=>_0x4c7dbd(_0x56f3bf[_0x546412(0x255)][_0x546412(0x233)][_0x4c64d2],_0x13622d,_0x30e828))[_0x546412(0x1f9)](Boolean);return Object['values'](_0x56f3bf['body'][_0x546412(0x1f2)])[_0x546412(0x266)](_0x55b350=>{const _0x575679=_0x546412;this[_0x575679(0x262)]['addUser'](_0x55b350);}),_0x25e5a6;}[_0x11225e(0x25a)](_0x19d062){const _0x40e519=_0x11225e;return{'id':_0x19d062['id'],'threadId':_0x19d062[_0x40e519(0x253)],'ref':_0x19d062[_0x40e519(0x203)]};}};_0x9076c7=_0x2c9cf2([_0x15696e(0x0,_0x30e2b8['Inject'](_0x546ee6[_0x11225e(0x26c)])),_0x15696e(0x1,_0x30e2b8[_0x11225e(0x205)](_0x30e2b8[_0x11225e(0x22f)])),_0x15696e(0x2,_0x30e2b8[_0x11225e(0x205)](_0x22f43d['CollaborationSessionService'])),_0x15696e(0x3,_0x30e2b8['Inject'](_0x30e2b8[_0x11225e(0x239)]))],_0x9076c7);var _0xbd072a=Object[_0x11225e(0x1fa)],_0x3e25bd=(_0x50a3e6,_0x138030,_0x134e2b,_0x5d5632)=>{const _0x3c99a0=_0x11225e;for(var _0x2dc333=_0x5d5632>0x1?void 0x0:_0x5d5632?_0xbd072a(_0x138030,_0x134e2b):_0x138030,_0x10f56b=_0x50a3e6[_0x3c99a0(0x227)]-0x1,_0x949e40;_0x10f56b>=0x0;_0x10f56b--)(_0x949e40=_0x50a3e6[_0x10f56b])&&(_0x2dc333=_0x949e40(_0x2dc333)||_0x2dc333);return _0x2dc333;},_0x32e70f=(_0x198417,_0x3e658d)=>(_0x282ee0,_0x254c4c)=>_0x3e658d(_0x282ee0,_0x254c4c,_0x198417);let _0x51c9e0=class extends _0x30e2b8[_0x11225e(0x201)]{constructor(_0x5c00e5,_0x44eb3f){const _0x370422=_0x11225e;super(),this[_0x370422(0x258)]=_0x5c00e5,this['_threadCommentDataSource']=_0x44eb3f,this[_0x370422(0x218)]();}[_0x11225e(0x218)](){const _0x37ece0=_0x11225e;this['_threadCommentDataSourceService'][_0x37ece0(0x26d)]=this[_0x37ece0(0x1f4)],this[_0x37ece0(0x258)]['syncUpdateMutationToColla']=!0x1;}};_0x51c9e0=_0x3e25bd([_0x32e70f(0x0,_0x30c642[_0x11225e(0x231)]),_0x32e70f(0x1,_0x30e2b8['Inject'](_0x9076c7))],_0x51c9e0);var _0x2df534=Object['defineProperty'],_0x3b6a19=Object['getOwnPropertyDescriptor'],_0x5f0105=(_0xde0c6f,_0x29e53a,_0x18c17e)=>_0x29e53a in _0xde0c6f?_0x2df534(_0xde0c6f,_0x29e53a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x18c17e}):_0xde0c6f[_0x29e53a]=_0x18c17e,_0x2b0d4c=(_0x81d220,_0x27bcb2,_0x5b1b45,_0x53c2b7)=>{const _0x206f72=_0x11225e;for(var _0x301e8e=_0x53c2b7>0x1?void 0x0:_0x53c2b7?_0x3b6a19(_0x27bcb2,_0x5b1b45):_0x27bcb2,_0x51e433=_0x81d220[_0x206f72(0x227)]-0x1,_0x3bd8f7;_0x51e433>=0x0;_0x51e433--)(_0x3bd8f7=_0x81d220[_0x51e433])&&(_0x301e8e=_0x3bd8f7(_0x301e8e)||_0x301e8e);return _0x301e8e;},_0x22c4d3=(_0x57d44b,_0x3cf0d7)=>(_0x13beb0,_0x26e700)=>_0x3cf0d7(_0x13beb0,_0x26e700,_0x57d44b),_0x231aab=(_0x26645a,_0x3bbe3f,_0x377f9d)=>_0x5f0105(_0x26645a,typeof _0x3bbe3f!='symbol'?_0x3bbe3f+'':_0x3bbe3f,_0x377f9d);_0x483f35[_0x11225e(0x1fc)]=class extends _0x30e2b8[_0x11225e(0x247)]{constructor(_0x5dfdf0=_0x1d737d,_0x4ccf6f,_0x51c525){const _0x257fe2=_0x11225e;super(),this['_config']=_0x5dfdf0,this[_0x257fe2(0x1ed)]=_0x4ccf6f,this[_0x257fe2(0x214)]=_0x51c525;const {..._0x1093a3}=_0x30e2b8[_0x257fe2(0x237)]({},_0x1d737d,this[_0x257fe2(0x202)]);this[_0x257fe2(0x214)][_0x257fe2(0x248)](_0x2c06d0,_0x1093a3);}[_0x11225e(0x1f0)](){const _0x59faf1=_0x11225e;[[_0x9076c7],[_0x51c9e0],[_0x544f61]][_0x59faf1(0x266)](_0x40d33b=>{const _0x4be4ed=_0x59faf1;this[_0x4be4ed(0x1ed)]['add'](_0x40d33b);});}[_0x11225e(0x21b)](){const _0xf0b341=_0x11225e;this[_0xf0b341(0x1ed)]['get'](_0x51c9e0),this[_0xf0b341(0x1ed)][_0xf0b341(0x26f)](_0x544f61);}},_0x231aab(_0x483f35['UniverThreadCommentDataSourcePlugin'],_0x11225e(0x206),_0x9c1ce5),_0x231aab(_0x483f35[_0x11225e(0x1fc)],_0x11225e(0x1ea),_0x30e2b8[_0x11225e(0x1fd)][_0x11225e(0x240)]),_0x483f35['UniverThreadCommentDataSourcePlugin']=_0x2b0d4c([_0x30e2b8[_0x11225e(0x23c)](_0x1c69cc['UniverThreadCommentUIPlugin'],_0x22f43d[_0x11225e(0x249)],_0x22ad29['UniverLicensePlugin']),_0x22c4d3(0x1,_0x30e2b8[_0x11225e(0x205)](_0x30e2b8[_0x11225e(0x239)])),_0x22c4d3(0x2,_0x30e2b8['IConfigService'])],_0x483f35[_0x11225e(0x1fc)]),Object[_0x11225e(0x1f1)](_0x483f35,Symbol[_0x11225e(0x22a)],{'value':_0x11225e(0x1ef)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.6.7-experimental.20250331-
|
|
3
|
+
"version": "0.6.7-experimental.20250331-45dde91",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs
|
|
51
|
-
"@univerjs/network": "0.6.7-experimental.20250331-
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.6.7-experimental.20250331-45dde91",
|
|
49
|
+
"@univerjs-pro/license": "0.6.7-experimental.20250331-45dde91",
|
|
50
|
+
"@univerjs/core": "0.6.7-experimental.20250331-45dde91",
|
|
51
|
+
"@univerjs/network": "0.6.7-experimental.20250331-45dde91",
|
|
52
52
|
"@univerjs/protocol": "0.1.45",
|
|
53
|
-
"@univerjs/thread-comment": "0.6.7-experimental.20250331-
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.6.7-experimental.20250331-
|
|
53
|
+
"@univerjs/thread-comment": "0.6.7-experimental.20250331-45dde91",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.6.7-experimental.20250331-45dde91"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|